Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 9 breaking changes #58

Open
damienbod opened this issue Jan 1, 2025 · 1 comment
Open

.NET 9 breaking changes #58

damienbod opened this issue Jan 1, 2025 · 1 comment

Comments

@damienbod
Copy link
Owner

damienbod commented Jan 1, 2025

See dotnet/docs#41662

// X509CertificateLoader.LoadPkcs12(cert.Export(X509ContentType.Pkcs12, null))
// var cert = X509CertificateLoader.LoadPkcs12FromFile(Path.Combine(environment.ContentRootPath, "sts_dev_cert.pfx"), "1234");

@damienbod
Copy link
Owner Author

To fix:

C:\repos\git\damienbod\AspNetCoreCertificates\src\CertificateManager\ImportExportCertificate.cs(21):var signingCertWithoutPrivateKey = new X509Certificate2(publicKeyBytes);
C:\repos\git\damienbod\AspNetCoreCertificates\src\CertificateManager\ImportExportCertificate.cs(168):var certificate = new X509Certificate2(certBytes);
C:\repos\git\damienbod\AspNetCoreCertificates\src\CertificateManager\ImportExportCertificate.cs(173):var certificate = new X509Certificate2(certBytes, password);
C:\repos\git\damienbod\AspNetCoreCertificates\src\CertificateManager\ImportExportCertificate.cs(201):var certCollection = new X509Certificate2Collection(certificate);
C:\repos\git\damienbod\AspNetCoreCertificates\src\CertificateManager\ImportExportCertificate.cs(218):var certificateCollection = new X509Certificate2Collection();
C:\repos\git\damienbod\AspNetCoreCertificates\src\CertificateManager\ImportExportCertificate.cs(223):var outcollection = new X509Certificate2Collection();
C:\repos\git\damienbod\AspNetCoreCertificates\src\CertificateManager\PemDecoder.cs(146):var certificateOut = new X509Certificate2(pkcs12bytes);
C:\repos\git\damienbod\AspNetCoreCertificates\src\CertificateManager\PemDecoder.cs(151):var certificateOut = new X509Certificate2(pkcs12bytes, password);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant