pfx-to-pem

    1.0.2 • Public • Published

    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": {
            "version": 2,
            "subject": {
                "countryName": "",
                "organizationName": "",
                "stateOrProvinceName": "",
                "localityName": "",
                "organizationalUnitName": "",
                "commonName": ""
            },
            "issuer": {
                "countryName": "",
                "organizationName": "",
                "organizationalUnitName": "",
                "commonName": ""
            },
            "serial": "",
            "notBefore": "",
            "notAfter": "",
            "signatureAlgorithm": "",
            "fingerPrint": "",
            "altNames": [],
            "extensions": {
                "subjectAlternativeName": "",
                "basicConstraints": "",
                "authorityKeyIdentifier": "",
                "keyUsage": "",
                "certificatePolicies": "",
                "cRLDistributionPoints": "",
                "extendedKeyUsage": "",
                "authorityInformationAccess": ""
            }
        },
        "certificate": "",
        "key": ""
    }

    Install

    npm i pfx-to-pem

    DownloadsWeekly Downloads

    284

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    20.5 kB

    Total Files

    15

    Last publish

    Collaborators

    • odelijairo