We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I receive an error "no importer for key" when try to add private key to keystore.
var privkey = fs.readFileSync('/certs/key.pem'); var jose = require('node-jose'); var keystore = jose.JWK.createKeyStore(); keystore.add(privkey, 'pem') .then(function (key) { joseprivkey = key; }, function (err) { console.error('Failed to create JWE key: ', err); });
forge.asn1.validate errors: [ECPrivateKey] Expected type "16", got "3" [ECPrivateKey] Expected tag class "0", got "64"
type: SEQUENCE, got BITSTRING tag class: UNIVERSAL, got APPLICATION
certificate:
-----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-256-CBC,DA07AA34F2B9374D582546854D8362F5 XXX -----END RSA PRIVATE KEY-----
The text was updated successfully, but these errors were encountered:
This method does not supported encrypted private keys. You would need to first decrypt it via other means and then pass the decrypted PEM to add().
add()
Sorry, something went wrong.
That means that the private key should be without passphrase?
That is correct
No branches or pull requests
I receive an error "no importer for key" when try to add private key to keystore.
forge.asn1.validate errors:
[ECPrivateKey] Expected type "16", got "3"
[ECPrivateKey] Expected tag class "0", got "64"
type: SEQUENCE, got BITSTRING
tag class: UNIVERSAL, got APPLICATION
certificate:
The text was updated successfully, but these errors were encountered: