convert hex string to lower before parsing as ASN.1

This commit is contained in:
MikeCAT 2022-11-03 21:43:24 +09:00
parent ed8bd34915
commit 1e83e0e935
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class ParseASN1HexString extends Operation {
*/ */
run(input, args) { run(input, args) {
const [index, truncateLen] = args; const [index, truncateLen] = args;
return r.ASN1HEX.dump(input.replace(/\s/g, ""), { return r.ASN1HEX.dump(input.replace(/\s/g, "").toLowerCase(), {
"ommitLongOctet": truncateLen "ommitLongOctet": truncateLen
}, index); }, index);
} }

View File

@ -59,7 +59,7 @@ class ParseX509Certificate extends Operation {
switch (inputFormat) { switch (inputFormat) {
case "DER Hex": case "DER Hex":
input = input.replace(/\s/g, ""); input = input.replace(/\s/g, "").toLowerCase();
cert.readCertHex(input); cert.readCertHex(input);
break; break;
case "PEM": case "PEM":