You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to get PKCS12/PFX file generated by the openSSLLikeInternal function from the PKCS12SimpleExample to work on Windows 10, and after some debugging it turned out that what was preventing it from working is the salt size.
When OpenSSL generates similar file (also with AES) it always sets salt size to 8, while PKI.js has it hard-coded to 64. So suprisingly enough, after changing 64 to 8 in CryptoEngine:
the resulting PKCS12 file suddenly works in Windows.
This is clearly not a bug in the PKI.js, but rather in Windows. However, it would be really helpful if PKI.js would allow to specify this salt size, to make it possible to generate PKCS12 files that work on Windows.
Please verify and consider reducing this salt length in pkijs from 64 to 32 or 16 bytes or making it configurable as proposed in this issue for Windows compatibility.
I've been trying to get PKCS12/PFX file generated by the
openSSLLikeInternal
function from thePKCS12SimpleExample
to work on Windows 10, and after some debugging it turned out that what was preventing it from working is the salt size.When OpenSSL generates similar file (also with AES) it always sets salt size to 8, while PKI.js has it hard-coded to 64. So suprisingly enough, after changing 64 to 8 in CryptoEngine:
PKI.js/src/CryptoEngine.js
Line 1842 in 275992a
the resulting PKCS12 file suddenly works in Windows.
This is clearly not a bug in the PKI.js, but rather in Windows. However, it would be really helpful if PKI.js would allow to specify this salt size, to make it possible to generate PKCS12 files that work on Windows.
Linking #211 as it is tangentially related.
The text was updated successfully, but these errors were encountered: