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
node version:10.15.3
steps to reproduce:
-----BEGIN CERTIFICATE----- MIICKjCCAdGgAwIBAgIRAMGjl2AnD3bzdpQOcPOZ944wCgYIKoZIzj0EAwIwczEL MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjAwNjEyMDY0ODAwWhcNMzAwNjEwMDY0ODAw WjBsMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN U2FuIEZyYW5jaXNjbzEPMA0GA1UECxMGY2xpZW50MR8wHQYDVQQDDBZVc2VyMUBv cmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExkNePVH3 8oQj1J2uBWU8e1E6GuvxKy3+yutI0+d2UVrMYkfu23Z+hvKiqmXI+DX1VUTmuaF9 2du+kflKIS+Z0qNNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYD VR0jBCQwIoAgMofBUJnNe9UyITG0/au3jfNeJ4+g377clNphXQOvfIwwCgYIKoZI zj0EAwIDRwAwRAIgfzDtKejEx21PP/Vx2NPmaAVnAqPY30xMKAKCNVvYaSoCIAvT 1rwBNvde855LUwMGtx3mBXx13gGrCl5dXxCXZHxG -----END CERTIFICATE-----
const cp = require('child_process'); const fs = require('fs'); const { Certificate } = require('@fidm/x509'); const filePath = 'cert.pem'; const cert = Certificate.fromPEM(fs.readFileSync(filePath)); console.log(`serial=${cert.serialNumber}`); cp.spawn('openssl', [ 'x509', '-in', `${filePath}`, '-serial', "-noout" ], { stdio: "inherit" });
node test.js
serial=00c1a39760270f76f376940e70f399f78e serial=C1A39760270F76F376940E70F399F78E
The text was updated successfully, but these errors were encountered:
No branches or pull requests
node version:10.15.3
steps to reproduce:
The text was updated successfully, but these errors were encountered: