Converts .pfx to .pem files (key, cert or both) with simple OpenSSL bindings.
const PfxToPem = require('pfx-to-pem');
const pem = await PfxToPem.toPem({
path: '/path/to/my/cert.pfx',
password: 'myPass'
});Will return an object:
{
"attributes": {
"subject": {
"countryName": "",
"organizationName": "",
"stateOrProvinceName": "",
"localityName": "",
"organizationalUnitName": "",
"commonName": ""
},
"issuer": {
"countryName": "",
"organizationName": "",
"organizationalUnitName": "",
"commonName": ""
},
"serial": "",
"notBefore": "",
"notAfter": "",
"altNames": [],
"ocspList": []
},
"certificate": "",
"key": ""
}