Thanks to visit codestin.com
Credit goes to github.com

Skip to content

odelijairo/pfx-to-pem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pfx-to-pem

NPM pfx-to-pem package

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": ""
}

About

Convert .pfx to .pem files (key, cert or both) with simple OpenSSL bindings

Resources

License

Stars

Watchers

Forks

Packages

No packages published