Update ASN.1

This commit is contained in:
Zhi Guan
2025-12-08 16:50:56 +08:00
parent d69783aaa5
commit 2b67dca44a
3 changed files with 19 additions and 12 deletions

View File

@@ -103,7 +103,8 @@ static int test_asn1_length(void)
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {
int ret;
ret = asn1_length_from_der(&length, &cp, &len);
if (ret != 1 && ret != -2) {
// TLV in test vectors have no Value, asn1_length_from_der will return ASN1_R_TRUNCATED_DATA (-2)
if (ret != 1 && ret != ASN1_R_TRUNCATED_DATA) {
error_print();
return -1;
}