File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
Security/Authentication/WsFederation/samples/WsFedSample
WebTransportInteractiveSampleApp
Tools/FirstRunCertGenerator/test Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ private static X509Certificate2 LoadCertificate()
54
54
certificatePayload = memoryStream . ToArray ( ) ;
55
55
}
56
56
57
- return X509CertificateLoader . LoadPkcs12FromFile ( certificatePayload , "testPassword" ) ;
57
+ return X509CertificateLoader . LoadPkcs12 ( certificatePayload , "testPassword" ) ;
58
58
}
59
59
}
60
60
}
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ static X509Certificate2 GenerateManualCertificate()
192
192
req . CertificateExtensions . Add ( sanBuilder . Build ( ) ) ;
193
193
// Sign
194
194
using var crt = req . CreateSelfSigned ( now , now . AddDays ( 14 ) ) ; // 14 days is the max duration of a certificate for this
195
- cert = new ( crt . Export ( X509ContentType . Pfx ) ) ;
195
+ cert = X509CertificateLoader . LoadPkcs12 ( crt . Export ( X509ContentType . Pfx ) ) ;
196
196
197
197
// Save
198
198
store . Add ( cert ) ;
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ static X509Certificate2 GenerateManualCertificate()
78
78
req . CertificateExtensions . Add ( sanBuilder . Build ( ) ) ;
79
79
// Sign
80
80
using var crt = req . CreateSelfSigned ( now , now . AddDays ( 14 ) ) ; // 14 days is the max duration of a certificate for this
81
- cert = new ( crt . Export ( X509ContentType . Pfx ) ) ;
81
+ cert = X509CertificateLoader . LoadPkcs12 ( crt . Export ( X509ContentType . Pfx ) ) ;
82
82
83
83
// Save
84
84
store . Add ( cert ) ;
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ public void EnsureCreateHttpsCertificate_CanExportTheCertInPemFormat_WithoutKey(
215
215
Assert . Equal ( EnsureCertificateResult . ValidCertificatePresent , result ) ;
216
216
Assert . True ( File . Exists ( CertificateName ) ) ;
217
217
218
- var exportedCertificate = X509CertificateLoader . LoadCertificate ( CertificateName ) ;
218
+ var exportedCertificate = X509CertificateLoader . LoadCertificateFromFile ( CertificateName ) ;
219
219
Assert . NotNull ( exportedCertificate ) ;
220
220
Assert . False ( exportedCertificate . HasPrivateKey ) ;
221
221
}
You can’t perform that action at this time.
0 commit comments