Skip to content

Commit

Permalink
Allow LF,CF,FF,Space in JER JSON Hex OCTET STRING
Browse files Browse the repository at this point in the history
  • Loading branch information
mouse07410 committed Aug 8, 2024
1 parent 8168ad4 commit b798215
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 2 additions & 6 deletions skeletons/OCTET_STRING_jer.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,8 @@ static ssize_t OCTET_STRING__convert_hexadecimal(void *sptr, const void *chunk_b
for(; p < pend; p++) {
int ch = *(const unsigned char *)p;
switch(ch) {
/* don't allow tab
case 0x09:
*/
case 0x20: /* allow space */
/* allow LF, FF, CR */
case 0x0a: case 0x0c: case 0x0d:
/* allow LF, FF, CR, space */
case 0x0a: case 0x0c: case 0x0d: case 0x20:
continue;
case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/
case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/
Expand Down
3 changes: 2 additions & 1 deletion tests/tests-skeletons/check-OCTET_STRING.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ main() {
check_jer(HEX, "\"", 0);
check_jer(HEX, "", 0);
check_jer(HEX, "\"6869\"", "hi");
check_jer(HEX, "\"68 69\"", 0);
//check_jer(HEX, "\"68 69\"", 0); /* we want to allow space */
check_jer(HEX, "\"68 69\"", "hi");

check_jer(UTF8, "\"\"", "");
check_jer(UTF8, "\"", 0);
Expand Down

0 comments on commit b798215

Please sign in to comment.