Hi
I've a issue with a PEM certificate:
My code:
const fs = require('fs');
const { Certificate, PrivateKey } = require('@fidm/x509');
const ed25519Cert = Certificate.fromPEM(fs.readFileSync('../data/device_cert.pem'));
Exception:
/test/node_modules/@fidm/asn1/build/asn1.js:751
throw err;
^
Error: ASN.1 object validate failure for authorityKeyIdentifier.value: error tag BOOLEAN
at ASN1.validate (/test/node_modules/@fidm/asn1/build/asn1.js:934:20)
at ASN1.validate (/test/node_modules/@fidm/asn1/build/asn1.js:943:43)
at Function.parseDERWithTemplate (/test/node_modules/@fidm/asn1/build/asn1.js:748:25)
at decodeExtAuthorityKeyIdentifier (/test/node_modules/@fidm/x509/build/x509.js:652:34)
at certificateExtensionFromAsn1 (/test/node_modules/@fidm/x509/build/x509.js:502:13)
at certificateExtensionsFromAsn1 (/test/node_modules/@fidm/x509/build/x509.js:456:22)
at new Certificate (/test/node_modules/@fidm/x509/build/x509.js:310:31)
at Function.fromPEMs (/test/node_modules/@fidm/x509/build/x509.js:252:24)
at Function.fromPEM (/test/node_modules/@fidm/x509/build/x509.js:264:28)
at Object. (/test/test.js:5:33)
My certificate is a standard certificate generated with openssl and other tools are able to parse and open.
Can you support me?
Alessandro
Hi
I've a issue with a PEM certificate:
My code:
const fs = require('fs');
const { Certificate, PrivateKey } = require('@fidm/x509');
const ed25519Cert = Certificate.fromPEM(fs.readFileSync('../data/device_cert.pem'));
Exception:
/test/node_modules/@fidm/asn1/build/asn1.js:751
throw err;
^
Error: ASN.1 object validate failure for authorityKeyIdentifier.value: error tag BOOLEAN
at ASN1.validate (/test/node_modules/@fidm/asn1/build/asn1.js:934:20)
at ASN1.validate (/test/node_modules/@fidm/asn1/build/asn1.js:943:43)
at Function.parseDERWithTemplate (/test/node_modules/@fidm/asn1/build/asn1.js:748:25)
at decodeExtAuthorityKeyIdentifier (/test/node_modules/@fidm/x509/build/x509.js:652:34)
at certificateExtensionFromAsn1 (/test/node_modules/@fidm/x509/build/x509.js:502:13)
at certificateExtensionsFromAsn1 (/test/node_modules/@fidm/x509/build/x509.js:456:22)
at new Certificate (/test/node_modules/@fidm/x509/build/x509.js:310:31)
at Function.fromPEMs (/test/node_modules/@fidm/x509/build/x509.js:252:24)
at Function.fromPEM (/test/node_modules/@fidm/x509/build/x509.js:264:28)
at Object. (/test/test.js:5:33)
My certificate is a standard certificate generated with openssl and other tools are able to parse and open.
Can you support me?
Alessandro