I getting this error when trying to load a .p12 certificate in .Net 7:
System.Security.Cryptography.CryptographicException: 'The specified network password is not correct.'
With this code:
var certs = new X509Certificate2Collection();
certs.Import(certBytes, password);
And after a some mailing with the support of the service provider i try to connect to with the server certificate i got a new certificate that works fine.
They saying that the first one giving “network password is not correct” was created in new version of OpenSSL with AES-256-CBC and the new one working is done with with OpenSSL 1.1.1 and pbeWithSHA1And40BitRC2-CBC but both is created from same original pem and key files.
Anyone having a idea why i can not load in .Net 7 the certificate created with new OpenSSL and AES-256-CBC ?