tra-analysis/website/functions/node_modules/google-p12-pem
2019-01-06 13:14:45 -06:00
..
build/src push all website files 2019-01-06 13:14:45 -06:00
node_modules push all website files 2019-01-06 13:14:45 -06:00
CHANGELOG.md push all website files 2019-01-06 13:14:45 -06:00
LICENSE push all website files 2019-01-06 13:14:45 -06:00
package.json push all website files 2019-01-06 13:14:45 -06:00
README.md push all website files 2019-01-06 13:14:45 -06:00

Google Cloud Platform logo

google-p12-pem

npm version codecov Known Vulnerabilities

Convert your Google .p12 keys to .pem keys.

Installation

npm install google-p12-pem

Usage

async/await style

const {getPem} = require('google-p12-pem');
async function foo() {
  const pem = await getPem('/path/to/key.p12');
  console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
}

promise style

const {getPem} = require('google-p12-pem');
getPem('/path/to/key.p12')
  .then(pem => {
    console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
  })
  .catch(err => {
    console.error(err); // :(
  });

callback style

const {getPem} = require('google-p12-pem');
getPem('/path/to/key.p12', function(err, pem) {
  console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
});

CLI style

gp12-pem myfile.p12 > output.pem

License

MIT