Skip to content

Commit 63e38fe

Browse files
author
Hanno Becker
committed
ASN.1: Add helper macro to compare ASN.1 buffer to OID string
1 parent cba7122 commit 63e38fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/mbedtls/asn1.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@
132132
( ( MBEDTLS_OID_SIZE(oid_str) != (oid_buf)->len ) || \
133133
memcmp( (oid_str), (oid_buf)->p, (oid_buf)->len) != 0 )
134134

135+
#define MBEDTLS_OID_CMP_RAW(oid_str, oid_buf, oid_buf_len) \
136+
( ( MBEDTLS_OID_SIZE(oid_str) != (oid_buf_len) ) || \
137+
memcmp( (oid_str), (oid_buf), (oid_buf_len) ) != 0 )
138+
135139
#ifdef __cplusplus
136140
extern "C" {
137141
#endif

0 commit comments

Comments
 (0)