der test: also run der_length_utf8_string()
This commit is contained in:
parent
3ecdd29847
commit
e6b1c7101e
@ -1305,7 +1305,8 @@ tmp_time.off_hh);
|
|||||||
/* encode it */
|
/* encode it */
|
||||||
x = sizeof(utf8_buf);
|
x = sizeof(utf8_buf);
|
||||||
DO(der_encode_utf8_string(utf8_1, sizeof(utf8_1) / sizeof(utf8_1[0]), utf8_buf, &x));
|
DO(der_encode_utf8_string(utf8_1, sizeof(utf8_1) / sizeof(utf8_1[0]), utf8_buf, &x));
|
||||||
if (x != sizeof(utf8_1_der) || memcmp(utf8_buf, utf8_1_der, x)) {
|
DO(der_length_utf8_string(utf8_1, sizeof(utf8_1) / sizeof(utf8_1[0]), &y));
|
||||||
|
if (x != sizeof(utf8_1_der) || memcmp(utf8_buf, utf8_1_der, x) || x != y) {
|
||||||
fprintf(stderr, "DER UTF8_1 encoded to %lu bytes\n", x);
|
fprintf(stderr, "DER UTF8_1 encoded to %lu bytes\n", x);
|
||||||
for (y = 0; y < x; y++) fprintf(stderr, "%02x ", (unsigned)utf8_buf[y]); fprintf(stderr, "\n");
|
for (y = 0; y < x; y++) fprintf(stderr, "%02x ", (unsigned)utf8_buf[y]); fprintf(stderr, "\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user