Skip to content

Commit 197b7bf

Browse files
committed
Replace obsolete methods
1 parent 55d74ba commit 197b7bf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/EasySign/Bundle.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,12 @@ public X509Certificate2 GetCertificate(string certificateHash)
458458
Logger.LogDebug("Reading certificate with hash {hash} from the bundle", certificateHash);
459459
using var zip = OpenZipArchive();
460460
var certData = ReadEntry(zip, certificateHash);
461+
462+
#if NET9_0_OR_GREATER
463+
certificate = X509CertificateLoader.LoadCertificate(certData);
464+
#else
461465
certificate = new X509Certificate2(certData);
466+
#endif
462467

463468
if (IsReadOnly)
464469
{

0 commit comments

Comments
 (0)