0.0.6 • Published 10 years ago
opensshpubkey-to-x509-converter v0.0.6
opensshpubkey-to-x509-converter
Convert an OpenSSH public key into a x.509 public key.
Usage
const fs = require('fs');
const ospkToX509 = require('opensshpubkey-to-x509-converter');
const openSSHPubKey = fs.readFileSync('path/to/id_rsa.pub')
const x509 = ospkToX509(openSSHPubKey, 'rsa'); // or dsa
console.log(x509);
Starting from the private key, using openssl
,
openssl rsa -in path/to/id_rsa -pubout
the output is the same.