File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 89
89
#define MBEDTLS_ASN1_CONSTRUCTED 0x20
90
90
#define MBEDTLS_ASN1_CONTEXT_SPECIFIC 0x80
91
91
92
+ /* Slightly smaller way to check if tag is a string tag
93
+ * compared to canonical implementation. */
94
+ #define MBEDTLS_ASN1_IS_STRING_TAG ( tag ) \
95
+ ( ( tag ) < 32u && ( \
96
+ ( ( 1u << ( tag ) ) & ( ( 1u << MBEDTLS_ASN1_BMP_STRING ) | \
97
+ ( 1u << MBEDTLS_ASN1_UTF8_STRING ) | \
98
+ ( 1u << MBEDTLS_ASN1_T61_STRING ) | \
99
+ ( 1u << MBEDTLS_ASN1_IA5_STRING ) | \
100
+ ( 1u << MBEDTLS_ASN1_UNIVERSAL_STRING ) | \
101
+ ( 1u << MBEDTLS_ASN1_PRINTABLE_STRING ) | \
102
+ ( 1u << MBEDTLS_ASN1_BIT_STRING ) ) ) != 0 ) )
103
+
92
104
/*
93
105
* Bit masks for each of the components of an ASN.1 tag as specified in
94
106
* ITU X.690 (08/2015), section 8.1 "General rules for encoding",
You can’t perform that action at this time.
0 commit comments