x509_key all tests passed

This commit is contained in:
Zhi Guan
2026-02-05 20:26:40 +08:00
parent e0f5ed85e3
commit 8eb0d3b572
24 changed files with 1906 additions and 1254 deletions

View File

@@ -298,8 +298,13 @@ int asn1_header_to_der(int tag, size_t dlen, uint8_t **out, size_t *outlen);
#define asn1_explicit_header_to_der(i,dlen,out,outlen) asn1_header_to_der(ASN1_TAG_EXPLICIT(i),dlen,out,outlen)
#if 0 // TODO: why nonempty ?
#define asn1_explicit_to_der(i,d,dlen,out,outlen) asn1_nonempty_type_to_der(ASN1_TAG_EXPLICIT(i),d,dlen,out,outlen)
#define asn1_explicit_from_der(i,d,dlen,in,inlen) asn1_nonempty_type_from_der(ASN1_TAG_EXPLICIT(i),d,dlen,in,inlen)
#else
#define asn1_explicit_to_der(i,d,dlen,out,outlen) asn1_type_to_der(ASN1_TAG_EXPLICIT(i),d,dlen,out,outlen)
#define asn1_explicit_from_der(i,d,dlen,in,inlen) asn1_type_from_der(ASN1_TAG_EXPLICIT(i),d,dlen,in,inlen)
#endif
// d,dlen is the V (of TLV) of SEQUENCE OF, SET OF
int asn1_types_get_count(const uint8_t *d, size_t dlen, int tag, size_t *cnt);