Per X.697 (section 25.3), a JER-encoded OCTET STRING must be a JSON string with continuous hexadecimal digits.
To be a valid JSON string, the output also cannot have line breaks.
This PR fixes both of these issues.
Consider the definition TEST,
TEST ::= SEQUENCE {
i1 INTEGER,
os OCTET STRING,
i2 INTEGER
}
With i1=1, os={1,2,...,32}, and i2=2, this currently encodes to,
Per X.697 (section 25.3), a JER-encoded OCTET STRING must be a JSON string with continuous hexadecimal digits. To be a valid JSON string, the output also cannot have line breaks. This PR fixes both of these issues.
Consider the definition TEST,
With
i1=1
,os={1,2,...,32}
, andi2=2
, this currently encodes to,With this PR the above becomes,