1 BaseException 2 Message:error:23076071:PKCS12 routines:PKCS12_parse:mac verify failure 3 StackTrace: 4 InnerException:error:23076071:PKCS12 routines:PKCS12_parse:mac verify failure 5 InnerException.StackTrace: at Internal.Cryptography.Pal.OpenSslPkcs12Reader.Decrypt(SafePasswordHandle password) 6 at Internal.Cryptography.Pal.PkcsFormatReader.TryReadPkcs12(OpenSslPkcs12Reader pfx, SafePasswordHandle password, Boolean single, ICertificatePal& readPal, List`1& readCerts) 7 at Internal.Cryptography.Pal.PkcsFormatReader.TryReadPkcs12(SafeBioHandle bio, SafePasswordHandle password, Boolean single, ICertificatePal& readPal, List`1& readCerts, Exception& openSslException) 8 at Internal.Cryptography.Pal.OpenSslX509CertificateReader.FromBio(SafeBioHandle bio, SafePasswordHandle password) 9 at Internal.Cryptography.Pal.OpenSslX509CertificateReader.FromFile(String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags) 10 at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) 11 at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) 12 at Senparc.Weixin.TenPay.V3.TenPayV3InfoCollection.Register(TenPayV3Info tenPayV3Info, String name)
项目里用到了盛派,出现这个问题是因为配置文件中证书密码字段名变了,原先是TenPayV3_CertPassword,现在变成了TenPayV3_CertSecret,所以加载证书时导致密码不对,无法正常加载,特此记录一下,防止忘记。
标签:String,Cryptography,微信,PKCS12,SafePasswordHandle,Internal,支付,password From: https://www.cnblogs.com/dotnetmonkey/p/17372885.html