JSPM

opensshpubkey-to-x509-converter

0.0.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q31378F
  • License MIT

Convert an OpenSSH public key into a x.509 public key.

Package Exports

  • opensshpubkey-to-x509-converter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (opensshpubkey-to-x509-converter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.