Skip to content

Commit

Permalink
Simplify public key creation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincennis authored and davidlehn committed Jan 31, 2019
1 parent c999f78 commit 0c17d9a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rsa.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,10 +909,9 @@ pki.rsa.generateKeyPair = function(bits, e, options, callback) {
if (err) {
return callback(err);
}
var privateKey = pki.privateKeyFromPem(priv);
callback(null, {
privateKey: privateKey,
publicKey: pki.setRsaPublicKey(privateKey.n, privateKey.e)
privateKey: pki.privateKeyFromPem(priv),
publicKey: pki.publicKeyFromPem(pub)
});
});
}
Expand Down

0 comments on commit 0c17d9a

Please sign in to comment.