Skip to content

Forge parsed a cert without error. But ZCertificate reported the error that the modulus is not a positive number #1146

Description

@Jennifer-first

Forge , OpenSSL and GnuTLS parsed a cert without error. But ZCertificate reported the error that the modulus is not a positive number.The actual result is that Forge ,OpenSSL and GnuTLS have no errors when parsing the certificate,But ZCertificate reported the error "level=error msg="could not parse certificate: x509: RSA modulus is not a positive number".

To Reproduce:

const forge = require('node-forge');
const fs = require('fs');
const filePath = process.argv[2]; 
const certPem = fs.readFileSync(filePath, 'utf8');
const cert = forge.pki.certificateFromPem(certPem);
console.dir(cert, { depth: null, colors: true });

Expected behavior:
Same result as ZCertificate

cert.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions