node-openssl-cert icon indicating copy to clipboard operation
node-openssl-cert copied to clipboard

Getting the public key

Open wottpal opened this issue 4 years ago • 2 comments

Hey, I'm trying to generate a keypair (private/public) with your library but didn't get it to work unfortunately :(

I generate a private key like

    openssl.generateRSAPrivateKey({}, function(err, key, cmd) {
      ...
    });

But how can I pass that private key now to a command like openssl rsa -in private.pem -outform PEM -pubout -out public.pem to get the public key (and not as file but as string).

Thank you so much for your help in advance!

Dennis

wottpal avatar May 05 '20 11:05 wottpal

I would happily implement it by myself but could you give me just a hint how to do that @lspiehler. Didn’t get it to work yet :(

wottpal avatar May 08 '20 08:05 wottpal

This appears to be answered in #5

hardillb avatar Sep 26 '21 20:09 hardillb