@@ -202,12 +202,6 @@ private void ConnectWithWrongCaCert_ThrowsCryptographicException(SslProtocols pr
202202 ex . ErrorCode != 0 ,
203203 "ErrorCode should be non-zero (MBEDTLS_X509_BADCERT_* bitmask)" ) ;
204204 }
205- catch ( InvalidOperationException ex )
206- {
207- exceptionCaught = true ;
208-
209- OutputHelper . WriteLine ( $ "InvalidOperationException caught: { ex . Message } ") ;
210- }
211205
212206 Assert . IsTrue ( exceptionCaught , "Expected an exception when using wrong CA certificate" ) ;
213207 }
@@ -252,13 +246,6 @@ private void ConnectWithBadHostname_ThrowsCryptographicException(SslProtocols pr
252246 ex . ErrorCode != 0 ,
253247 "ErrorCode should be non-zero (MBEDTLS_X509_BADCERT_* bitmask)" ) ;
254248 }
255- catch ( InvalidOperationException ex )
256- {
257- // HandshakeBadContext or HandshakeSetHostname
258- exceptionCaught = true ;
259-
260- OutputHelper . WriteLine ( $ "InvalidOperationException caught: { ex . Message } ") ;
261- }
262249
263250 Assert . IsTrue ( exceptionCaught , "Expected an exception from hostname mismatch authentication" ) ;
264251 }
@@ -301,13 +288,6 @@ private void ConnectWithoutAuth_ThrowsCryptographicException(SslProtocols protoc
301288 ex . ErrorCode != 0 ,
302289 "ErrorCode should be non-zero (certificate verification failure flags)" ) ;
303290 }
304- catch ( InvalidOperationException ex )
305- {
306- // HandshakeBadContext or HandshakeSetHostname
307- exceptionCaught = true ;
308-
309- OutputHelper . WriteLine ( $ "InvalidOperationException caught: { ex . Message } ") ;
310- }
311291
312292 Assert . IsTrue ( exceptionCaught , "Expected an exception when connecting without authentication" ) ;
313293 }
0 commit comments