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
{{ message }}
Repository navigation
Issue imporitng certificates created using OpenSSL::PKCS12 on macOS devices #654
Info dump from “openssl pkcs12 -info -in /tmp/my-certificate.p12” shows that the certificate is generated with:
MAC: sha256, Iteration 2048
MAC length: 32, salt length: 8
Seems macOS have issues with hash function HMAC and only SHA1 is supported. Using older version of either Ruby's OpenSSL gem (tested with 2.1.4) or older System's OpenSSL version (Tested with OpenSSL 1.1.1f 31 Mar 2020) seems to work as it generates certificate with:
MAC: sha1, Iteration 1
MAC length: 20, salt length: 8
changed the title [-]Issue with certificates created using OpenSSL::PKCS12 and imported on macOS devices[/-][+]Issue imporitng certificates created using OpenSSL::PKCS12 on macOS devices[/+]on Jul 24, 2023
Activity
[-]Issue with certificates created using OpenSSL::PKCS12 and imported on macOS devices[/-][+]Issue imporitng certificates created using OpenSSL::PKCS12 on macOS devices[/+]ravinderrana commentedon Jul 25, 2023
Found similar issue reported for one of Python's cryptography package
There they've added support to set different PBES choices as well as set KDF rounds and MAC algorithm. Here's the relevant PR
Not sure if we need similar approach here or if there is any alternative that we can go with.
rhenium commentedon Aug 4, 2023
The issue is with RC2.
OpenSSL::PKCS12.createfails because OpenSSL >= 3.0 implements RC2 in itslegacyprovider and it's not enabled by default.Please see #611.
paihu commentedon Jun 24, 2024
This issue doesn't seem to be resolved.
Here's what we created using the legacy provider:
It uses sha256 instead of sha1.