@@ -1338,139 +1338,139 @@ protected override SecureMimeContext CreateContext ()
13381338 [ Test ]
13391339 public void TestEncryptRevokedRecipient ( )
13401340 {
1341- using ( var ctx = new MyTemporarySecureMimeContext ( ) ) {
1342- ImportAll ( ctx ) ;
1341+ using ( var tmp = new MyTemporarySecureMimeContext ( ) ) {
1342+ ImportAll ( tmp ) ;
13431343
1344- VerifyRevokedRecipient ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , false ) ;
1344+ VerifyRevokedRecipient ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , false ) ;
13451345 }
13461346
1347- using ( var ctx = new MyTemporarySecureMimeContext ( ) ) {
1348- ImportAll ( ctx ) ;
1347+ using ( var tmp = new MyTemporarySecureMimeContext ( ) ) {
1348+ ImportAll ( tmp ) ;
13491349
1350- VerifyRevokedRecipient ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , true ) ;
1350+ VerifyRevokedRecipient ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , true ) ;
13511351 }
13521352
1353- using ( var ctx = new MyTemporarySecureMimeContext ( CreateMockHttpMessageHandler ( RevokedNoChainCertificateResponses ( ) ) ) ) {
1354- ImportAll ( ctx ) ;
1353+ using ( var tmp = new MyTemporarySecureMimeContext ( CreateMockHttpMessageHandler ( RevokedNoChainCertificateResponses ( ) ) ) ) {
1354+ ImportAll ( tmp ) ;
13551355
1356- VerifyRevokedRecipient ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . RevokedNoChainCertificate , false ) ;
1356+ VerifyRevokedRecipient ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . RevokedNoChainCertificate , false ) ;
13571357 }
13581358
1359- using ( var ctx = new MyTemporarySecureMimeContext ( CreateMockHttpMessageHandler ( RevokedNoChainCertificateResponses ( ) ) ) ) {
1360- ImportAll ( ctx ) ;
1359+ using ( var tmp = new MyTemporarySecureMimeContext ( CreateMockHttpMessageHandler ( RevokedNoChainCertificateResponses ( ) ) ) ) {
1360+ ImportAll ( tmp ) ;
13611361
1362- VerifyRevokedRecipient ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . RevokedNoChainCertificate , true ) ;
1362+ VerifyRevokedRecipient ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . RevokedNoChainCertificate , true ) ;
13631363 }
13641364 }
13651365
13661366 [ Test ]
13671367 public async Task TestEncryptRevokedRecipientAsync ( )
13681368 {
1369- using ( var ctx = new MyTemporarySecureMimeContext ( ) ) {
1370- await ImportAllAsync ( ctx ) ;
1369+ using ( var tmp = new MyTemporarySecureMimeContext ( ) ) {
1370+ await ImportAllAsync ( tmp ) ;
13711371
1372- await VerifyRevokedRecipientAsync ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , false ) ;
1372+ await VerifyRevokedRecipientAsync ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , false ) ;
13731373 }
13741374
1375- using ( var ctx = new MyTemporarySecureMimeContext ( ) ) {
1376- await ImportAllAsync ( ctx ) ;
1375+ using ( var tmp = new MyTemporarySecureMimeContext ( ) ) {
1376+ await ImportAllAsync ( tmp ) ;
13771377
1378- await VerifyRevokedRecipientAsync ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , true ) ;
1378+ await VerifyRevokedRecipientAsync ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , true ) ;
13791379 }
13801380
1381- using ( var ctx = new MyTemporarySecureMimeContext ( CreateMockHttpMessageHandler ( RevokedNoChainCertificateResponses ( ) ) ) ) {
1382- await ImportAllAsync ( ctx ) ;
1381+ using ( var tmp = new MyTemporarySecureMimeContext ( CreateMockHttpMessageHandler ( RevokedNoChainCertificateResponses ( ) ) ) ) {
1382+ await ImportAllAsync ( tmp ) ;
13831383
1384- await VerifyRevokedRecipientAsync ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . RevokedNoChainCertificate , false ) ;
1384+ await VerifyRevokedRecipientAsync ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . RevokedNoChainCertificate , false ) ;
13851385 }
13861386
1387- using ( var ctx = new MyTemporarySecureMimeContext ( CreateMockHttpMessageHandler ( RevokedNoChainCertificateResponses ( ) ) ) ) {
1388- await ImportAllAsync ( ctx ) ;
1387+ using ( var tmp = new MyTemporarySecureMimeContext ( CreateMockHttpMessageHandler ( RevokedNoChainCertificateResponses ( ) ) ) ) {
1388+ await ImportAllAsync ( tmp ) ;
13891389
1390- await VerifyRevokedRecipientAsync ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . RevokedNoChainCertificate , true ) ;
1390+ await VerifyRevokedRecipientAsync ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . RevokedNoChainCertificate , true ) ;
13911391 }
13921392 }
13931393
13941394 [ Test ]
13951395 public void TestEncryptPartialRevokedRecipients ( )
13961396 {
1397- using ( var ctx = new MyTemporarySecureMimeContext ( ) ) {
1398- ImportAll ( ctx ) ;
1397+ using ( var tmp = new MyTemporarySecureMimeContext ( ) ) {
1398+ ImportAll ( tmp ) ;
13991399
1400- VerifyPartialRevokedRecipients ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . RevokedCertificate ) ;
1400+ VerifyPartialRevokedRecipients ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . RevokedCertificate ) ;
14011401 }
14021402 }
14031403
14041404 [ Test ]
14051405 public async Task TestEncryptPartialRevokedRecipientsAsync ( )
14061406 {
1407- using ( var ctx = new MyTemporarySecureMimeContext ( ) ) {
1408- await ImportAllAsync ( ctx ) ;
1407+ using ( var tmp = new MyTemporarySecureMimeContext ( ) ) {
1408+ await ImportAllAsync ( tmp ) ;
14091409
1410- await VerifyPartialRevokedRecipientsAsync ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . RevokedCertificate ) ;
1410+ await VerifyPartialRevokedRecipientsAsync ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . RevokedCertificate ) ;
14111411 }
14121412 }
14131413
14141414 [ Test ]
14151415 public void TestEncryptToValidRecipientsOnly ( )
14161416 {
1417- using ( var ctx = new MyTemporarySecureMimeContext ( ) ) {
1418- ImportAll ( ctx ) ;
1417+ using ( var tmp = new MyTemporarySecureMimeContext ( ) ) {
1418+ ImportAll ( tmp ) ;
14191419
1420- VerifyEncryptToValidRecipientsOnly ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . RevokedCertificate ) ;
1420+ VerifyEncryptToValidRecipientsOnly ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . RevokedCertificate ) ;
14211421 }
14221422 }
14231423
14241424 [ Test ]
14251425 public async Task TestEncryptToValidRecipientsOnlyAsync ( )
14261426 {
1427- using ( var ctx = new MyTemporarySecureMimeContext ( ) ) {
1428- await ImportAllAsync ( ctx ) ;
1427+ using ( var tmp = new MyTemporarySecureMimeContext ( ) ) {
1428+ await ImportAllAsync ( tmp ) ;
14291429
1430- await VerifyEncryptToValidRecipientsOnlyAsync ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . RevokedCertificate ) ;
1430+ await VerifyEncryptToValidRecipientsOnlyAsync ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . RevokedCertificate ) ;
14311431 }
14321432 }
14331433
14341434 [ Test ]
14351435 public void TestEncryptToValidRecipientsOnlyAllFail ( )
14361436 {
1437- using ( var ctx = new MyTemporarySecureMimeContext ( ) ) {
1438- ImportAll ( ctx ) ;
1437+ using ( var tmp = new MyTemporarySecureMimeContext ( ) ) {
1438+ ImportAll ( tmp ) ;
14391439
1440- VerifyEncryptToRevokedCertificateFails ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , SecureMimeTestsBase . CrlRequestUris ) ;
1440+ VerifyEncryptToRevokedCertificateFails ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . RevokedCertificate , SecureMimeTestsBase . CrlRequestUris ) ;
14411441 }
14421442 }
14431443
14441444 [ Test ]
14451445 public void TestEncryptToValidRecipientsOnlySubCaRevoked ( )
14461446 {
14471447 var mockHandler = CreateSubCaRevokedMockHttpMessageHandler ( ) ;
1448- using ( var ctx = new MyTemporarySecureMimeContext ( mockHandler ) ) {
1449- ImportAll ( ctx ) ;
1448+ using ( var tmp = new MyTemporarySecureMimeContext ( mockHandler ) ) {
1449+ ImportAll ( tmp ) ;
14501450
1451- VerifyEncryptToValidRecipientsOnly ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . SubCaRevokedCertificate ) ;
1451+ VerifyEncryptToValidRecipientsOnly ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . SubCaRevokedCertificate ) ;
14521452 }
14531453 }
14541454
14551455 [ Test ]
14561456 public async Task TestEncryptToValidRecipientsOnlySubCaRevokedAsync ( )
14571457 {
14581458 var mockHandler = CreateSubCaRevokedMockHttpMessageHandler ( ) ;
1459- using ( var ctx = new MyTemporarySecureMimeContext ( mockHandler ) ) {
1460- await ImportAllAsync ( ctx ) ;
1459+ using ( var tmp = new MyTemporarySecureMimeContext ( mockHandler ) ) {
1460+ await ImportAllAsync ( tmp ) ;
14611461
1462- await VerifyEncryptToValidRecipientsOnlyAsync ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . SubCaRevokedCertificate ) ;
1462+ await VerifyEncryptToValidRecipientsOnlyAsync ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . SupportedCertificates [ 0 ] , SecureMimeTestsBase . SubCaRevokedCertificate ) ;
14631463 }
14641464 }
14651465
14661466 [ Test ]
14671467 public void TestEncryptToRevokedSubCaCertificateFails ( )
14681468 {
14691469 var mockHandler = CreateSubCaRevokedMockHttpMessageHandler ( ) ;
1470- using ( var ctx = new MyTemporarySecureMimeContext ( mockHandler ) ) {
1471- ImportAll ( ctx ) ;
1470+ using ( var tmp = new MyTemporarySecureMimeContext ( mockHandler ) ) {
1471+ ImportAll ( tmp ) ;
14721472
1473- VerifyEncryptToRevokedCertificateFails ( ctx , ctx . MockHttpMessageHandler , SecureMimeTestsBase . SubCaRevokedCertificate , new Uri [ ] { SecureMimeTestsBase . CrlRequestUris [ 0 ] } ) ;
1473+ VerifyEncryptToRevokedCertificateFails ( tmp , tmp . MockHttpMessageHandler , SecureMimeTestsBase . SubCaRevokedCertificate , new Uri [ ] { SecureMimeTestsBase . CrlRequestUris [ 0 ] } ) ;
14741474 }
14751475 }
14761476 }
0 commit comments