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