Version
v22.22.2
Platform
Linux liu-VirtualBox 6.8.0-111-generic #111~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 14 17:13:45 UTC x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
const fs = require('fs');
const { X509Certificate } = require('crypto');
const certPath = process.argv[2];
const cert = new X509Certificate(fs.readFileSync(certPath));
console.dir(cert, { depth: null });
How often does it reproduce? Is there a required condition?
A certificate is required.
What is the expected behavior? Why is that the expected behavior?
Node.js, Forge, OpenSSL, and Gnutls all accepted this certificate. Gnutls considered it a bug, while OpenSSL fixed it, resulting in the rejection of negative modulo values.
What do you see instead?
node parse_cert.js cert.pem
X509Certificate {
[Symbol(kInternalState)]: SafeMap(0) {},
[Symbol(kHandle)]: X509Certificate {}
}
Additional information
cert.zip
Version
v22.22.2
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
A certificate is required.
What is the expected behavior? Why is that the expected behavior?
Node.js, Forge, OpenSSL, and Gnutls all accepted this certificate. Gnutls considered it a bug, while OpenSSL fixed it, resulting in the rejection of negative modulo values.
What do you see instead?
node parse_cert.js cert.pem
X509Certificate {
[Symbol(kInternalState)]: SafeMap(0) {},
[Symbol(kHandle)]: X509Certificate {}
}
Additional information
cert.zip