Open microshine opened 6 months ago
Reason is here:
function checkPrintable(s) {
let i, v;
for (i = 0; i < s.length; ++i) {
v = s.charCodeAt(i);
if (v < 32 && v != 9 && v != 10 && v != 13) // [\t\r\n] are (kinda) printable
throw new Error('Unprintable character at index ' + i + ' (code ' + s.str.charCodeAt(i) + ')');
}
}
The "missing" values are interpreted as printable, because they are respectively "\t\t\t\t", "\t\t\t\n", and "\t\t\t\r" and are thus printed as string (which produces nothing visible).
Issue Description:
When decoding a certificate on https://lapo.it/asn1js, the values for some IP addresses in the
subjectAltName
field are not displayed correctly. The output shows that the value consists of, for example, 4 bytes, but the hexadecimal representation is missing.Steps to Reproduce:
subjectAltName
field in the decoded output.Expected Behavior:
The
subjectAltName
field should display the full hexadecimal representation of IP addresses.Actual Behavior:
The
subjectAltName
field indicates that some IP address values consist of 4 bytes, but the hexadecimal representation is not shown.Certificate Data:
ASN.1 Decoded Output Snippet: