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'm having trouble using the OpenSSL::PKCS12 class in Ruby 3.1.x onwards.
Some .p12 files still work, but the vast majority do not.
The error I am getting is: PKCS12_parse: unsupported (OpenSSL::PKCS12::PKCS12Error)
To simulate, I'm going to use a .pfx that I have to use as support for automated tests. It's a self-signed certificate that was generated a while ago. But it generates the same error to which I quoted. I don't know how to create a .p12 to simulate the problem, due to lack of knowledge. And I cannot expose a real .p12 here because it violates my users' privacy policy.
Hope this is enough to explain the error.
This is the problem (cf. #500). RC2 belongs to the legacy provider in OpenSSL >= 3.0, which is not enabled by default. openssl pkcs12 will also refuse to load this file without the -provider default -provider legacy options.
#635 will allow loading providers explicitly with:
Activity
marcosdemelo commentedon Apr 30, 2023
On
Ruby 3.2.2the error persists...rhenium commentedon Jun 13, 2023
This is the problem (cf. #500). RC2 belongs to the
legacyprovider in OpenSSL >= 3.0, which is not enabled by default.openssl pkcs12will also refuse to load this file without the-provider default -provider legacyoptions.#635 will allow loading providers explicitly with:
dtonon commentedon Jul 1, 2023
I have the same problem:
I tried to vendorize the last github version too, same problem.
Any help, please?
abiagini commentedon Jul 7, 2023
@dtonon is not released yet, the last realease was on december 22.
You should go with the approach of #635