-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
Error: PEM_read_bio_PUBKEY in Node 10.10 #521
Comments
I tried Node 10.10 on my system, and I had no trouble. These errors are generally an issue with the version of OpenSSL. Can you provide the version of OpenSSL that Node is using on your system using the following script: 'use strict';
const crypto = require('crypto');
const rawVersion = crypto.constants.OPENSSL_VERSION_NUMBER;
const major = (rawVersion & 0xFF0000000) >>> 28;
const minor = (rawVersion & 0xFF00000) >>> 20;
const fix = (rawVersion & 0xFF000) >>> 12;
const rawPatch = (rawVersion & 0xFF0) >>> 4;
const rawStatus = rawVersion & 0xF;
let status;
if (rawStatus === 0) {
status = 'dev';
}
else if (rawStatus === 0xf) {
status = 'release';
}
else {
status = `beta ${rawStatus}`;
}
const patch = rawPatch === 0 ? '' : String.fromCharCode(rawPatch + 96);
console.log(`OpenSSL ${major}.${minor}.${fix}${patch} ${status} (${rawVersion.toString(16)})`); |
@MitMaro Output is |
@YangYu000 did you manage to solve this or to know what happened? |
@ziluvatar As I think it's a bug of NodeJS, I opened the almost same issue on nodejs/node#22815 and provided more details. |
Awesome @YangYu000 thanks for all details! 👏 Then I'm closing it. |
My code is like
and runs without problem with Node 8 and Node 10.8/10.9 (Ubuntu and Debian, NodeJS offical APT source)
After I upgrade to Node 10.10 today, on
JWT.verify
throwsThe text was updated successfully, but these errors were encountered: