fullstackproltd / AspNetCoreSpa

Asp.Net 7.0 & Angular 15 SPA Fullstack application with plenty of examples. Live demo:
https://aspnetcorespa.fullstackpro.co.uk
MIT License
1.47k stars 464 forks source link

MAC verification failed during PKCS12 import #266

Closed eng1n88r closed 4 years ago

eng1n88r commented 4 years ago

During step 7 of Installation getting the following exception when trying to run ID server project on Mac: Unhandled exception. Interop+AppleCrypto+AppleCommonCryptoCryptographicException: MAC verification failed during PKCS12 import (wrong password?) at Interop.AppleCrypto.X509ImportCertificate(Byte[] bytes, X509ContentType contentType, SafePasswordHandle importPassword, SafeKeychainHandle keychain, Boolean exportable, SafeSecIdentityHandle& identityHandle)

Exception is thrown at line 51 of Startup.cs class

cert = new X509Certificate2(base64EncodedStr, string.Empty, X509KeyStorageFlags.MachineKeySet);
asadsahi commented 4 years ago

this should fix.