From cc2c2d079d79deea8a1abf0736d7c25cd473495d Mon Sep 17 00:00:00 2001 From: gusrb406 Date: Fri, 2 Aug 2019 16:53:11 +0900 Subject: [PATCH] ASN.1 parser's sequence tag is wrong - Sequense is encoded with tag byte of 0x30. - https://docs.microsoft.com/en-us/windows/win32/seccertenroll/about-sequence --- src/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 5cd47441..8f07969e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1276,7 +1276,7 @@ static BOOL get_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, cons BOOL is_sequence, is_universal_tag; while (pos < buf_len) { - is_sequence = buf[pos] & 0x20; + is_sequence = buf[pos] & 0x30; is_universal_tag = ((buf[pos] & 0xC0) == 0x00); tag = buf[pos++] & 0x1F; if (tag == 0x1F) {