You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a key file that starts or ends like this:
Some random text
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
Some other text
Then you'll get an error when the key is parsed:
{ InvalidAsn1Error: Expected 0x2: got 0xac
at newInvalidAsn1Error (/Users/user-name/.nvm/versions/node/v7.10.0/lib/node_modules/asap-cli/node_modules/asn1/lib/ber/errors.js:7:13)
at Reader.readString (/Users/user-name/.nvm/versions/node/v7.10.0/lib/node_modules/asap-cli/node_modules/asn1/lib/ber/reader.js:168:11)
at Object.privateImport (/Users/user-name/.nvm/versions/node/v7.10.0/lib/node_modules/asap-cli/node_modules/node-rsa/src/formats/pkcs1.js:64:16)
at Object.detectAndImport (/Users/user-name/.nvm/versions/node/v7.10.0/lib/node_modules/asap-cli/node_modules/node-rsa/src/formats/formats.js:63:48)
at NodeRSA.module.exports.NodeRSA.importKey (/Users/user-name/.nvm/versions/node/v7.10.0/lib/node_modules/asap-cli/node_modules/node-rsa/src/NodeRSA.js:185:22)
The text was updated successfully, but these errors were encountered:
The pkcs1 import doesn't strip characters outside of the
BEGIN RSA PRIVATE KEY
header:If you have a key file that starts or ends like this:
Then you'll get an error when the key is parsed:
The text was updated successfully, but these errors were encountered: