Closed georg-x closed 3 years ago
I am sure you are aware that OpenSSL 3.0 has been released last month, while Java 8 was released in 2014. Do you really expect Java 8 to support the same algorithms as OpenSSL 3.0?
To make it short, if you use a recent Java runtime (the latest release is Java 17), it will support the newer algorithms for PKCS#12. I can recommend Adoptium.
Thank you for documenting that behavior here. Works like a charm with newer Java version. Maybe some kind of warning would be nice. Not everyone knows when what feature was added to Java.
Describe the bug Import of PKCS12 file generated by OpenSSL 3.0.0 defaults not possible. Same appears when the file was created in Windows with selected Encryption AES256-SHA256"
Info about working example openssl pkcs12 -info -in example.com.pfx ... PKCS7 Data Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048 Bag Attributes localKeyID: XX XX XX A6 3D B5 25 4C 2C 5D A6 9F EE 47 D5 04 3A XX XX XX friendlyName: example.com…
Info about not working example openssl pkcs12 -info -in example.com.pfx ... PKCS7 Data Shrouded Keybag: PBES2, PBKDF2, AES-256-CBC, Iteration 2048, PRF hmacWithSHA256 Bag Attributes localKeyID: XX XX XX 8F 02 83 21 04 A9 1F C8 29 22 85 90 33 1D XX XX XX friendlyName: example.com… Key Attributes:
To Reproduce
Expected behavior The encryption should be detected automatically and the import from PKCS12 files with current encryption should work. The expected minimum would be, that the error message states that the encryption is not supported. Edit: Screenshot removed.
Screenshots
Environment