mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-30 18:59:10 +00:00
1.4 KiB
1.4 KiB
google-p12-pem
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