Skip to content

Commit 5fd73eb

Browse files
author
Hanno Becker
committed
ASN.1: Add helper macro to compare ASN.1 buffer to OID string
1 parent e95c66c commit 5fd73eb

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
@@ -131,6 +131,10 @@
131131
( ( MBEDTLS_OID_SIZE(oid_str) != (oid_buf)->len ) || \
132132
memcmp( (oid_str), (oid_buf)->p, (oid_buf)->len) != 0 )
133133

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

0 commit comments

Comments
 (0)