Update demos, asn.1 bug fix

This commit is contained in:
Zhi Guan
2022-07-25 16:48:45 +08:00
parent 08dd20b70f
commit f49d465b42
15 changed files with 229 additions and 100 deletions

View File

@@ -454,13 +454,13 @@ int asn1_integer_to_der_ex(int tag, const uint8_t *a, size_t alen, uint8_t **out
return -1;
}
if (!a) {
return 0;
}
if (alen <= 0 || alen > INT_MAX) {
error_print();
return -1;
}
if (!a) {
return 0;
}
if (out && *out)
*(*out)++ = tag;