mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
fix: 覆盖所有tag值
This commit is contained in:
@@ -59,13 +59,15 @@ static void print_octets(const uint8_t *o, size_t olen)
|
|||||||
|
|
||||||
static int test_asn1_tag(void)
|
static int test_asn1_tag(void)
|
||||||
{
|
{
|
||||||
int i;
|
int tag;
|
||||||
format_print(stderr, 0, 0, "Tags:\n");
|
format_print(stderr, 0, 0, "Testing all tag values from 0 to 255:\n");
|
||||||
for (i = 1; i <= 13; i++) {
|
for (tag = 0; tag <= 255; tag++) {
|
||||||
format_print(stderr, 0, 4, "%s (0x%02x)\n", asn1_tag_name(i), i);
|
const char *name = asn1_tag_name(tag);
|
||||||
|
if (name) {
|
||||||
|
format_print(stderr, 0, 4, "%s (0x%02x)\n", name, tag);
|
||||||
|
} else {
|
||||||
|
format_print(stderr, 0, 4, "Unknown Tag (0x%02x)\n", tag);
|
||||||
}
|
}
|
||||||
for (i = 18; i <= 30; i++) {
|
|
||||||
format_print(stderr, 0, 4, "%s (0x%02x)\n", asn1_tag_name(i), i);
|
|
||||||
}
|
}
|
||||||
printf("%s() ok\n", __FUNCTION__);
|
printf("%s() ok\n", __FUNCTION__);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user