I wish to covert a .p12
file to .pem
file. In Mac terminal, this command works,
openssl pkcs12 -in cert.p12 -out cert.pem -nodes -clcerts
I am using laravel 5.5
I tries using exec() but it outputs an empty file.
$p12path = storage_path($path).'/cert.p12';
$outputpem = storage_path($path).'/cert.pem';
exec('openssl pkcs12 -in ' . $p12path . ' -out '. $outputpem .' -nodes -clcerts');
Tried the above code but doesn't work.