Closed bestbeforetoday closed 1 year ago
Thank you for your report. I'll check.
In my current implementation, "extn" value will not be parsed. https://github.com/kjur/jsrsasign/blob/8625124366ef2f6a4adc438f38d31a482c3456e3/src/x509-1.1.js#L3026-L3028
I'll update to support ASN.1 structure represented by JSON in "extn" by using ASN1HEX.parse in the future version: https://kjur.github.io/jsrsasign/api/symbols/ASN1HEX.html#.parse
BTW, '7b226174747273223a7b226563657274223a2264656661756c74222c2268662e41666669' is not a proper ASN.1 hexadecimal string. This will not be parsed even though I'll support such function as above.
BTW, '7b226174747273223a7b226563657274223a2264656661756c74222c2268662e41666669' is not a proper ASN.1 hexadecimal string. This will not be parsed even though I'll support such function as above.
You are absolutely correct! The reason it is not a proper hexadecimal string appears to be that jsrsasign failed to parse the certificate correctly. If you decode the certificate with another tool you can see the expected output. For example in the Raw output section of this decoder:
http://www.sslchecker.com/certdecoder?su=ec5113d4f04beffc8789852b4632a7e6
I see you have closed the issue but I don't see any associated pull request or commit in jsrsasign. Has this issue been resolved and, if so, where can I pick up the fix?
Your private extension is not proper extension value since extnValue is not encapsulated OCTET STRING. That's why no need to any fix.
When using jsrsasign@10.6.1 to parse an X.509 certificate and extract a custom extension attribute as follows, the attribute value appears to be truncated:
The value of
extension
returned by the call tocert.findExt()
in this case is:The value is expected to be the following JSON string:
Converting the hex
extn
value above to a string gives the following truncated result: