Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue to convert the ssl certificates from pfx to peem with openssl

Tags:

openssl

when i try to convert the .pfx certifates to .pem to import to ACM, i get this error

Error outputting keys and certificates 8C2B0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto\evp\evp_fetch.c:346:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()

the command i run

openssl pkcs12 -in filename.pfx -out filename.pem

like image 982
Waelalmerri Avatar asked Jan 24 '26 19:01

Waelalmerri


1 Answers

If the command used to work in previous OpenSSL versions, try the following:

Ensure you have the legacy library (file named legacy*.<os_lib_ext>, e.g. legacy-x64.dll). Instead of configuring environment variables it may be easier to just copy the library as legacy.<os_lib_ext> (e.g. legacy.dll) in both the libraries path and the path containing openssl executable.

Then add -legacy -provider-path "/path/to/legacy_library/dir" -provider default:

openssl pkcs12 -in filename.pfx -out filename.pem -legacy -provider-path "/path/to/legacy_library/dir" -provider default
like image 105
Jon Avatar answered Jan 26 '26 20:01

Jon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!