summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_purp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_purp.c')
-rw-r--r--src/lib/libcrypto/x509v3/v3_purp.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_purp.c b/src/lib/libcrypto/x509v3/v3_purp.c
index a091a7f425..d8ab679304 100644
--- a/src/lib/libcrypto/x509v3/v3_purp.c
+++ b/src/lib/libcrypto/x509v3/v3_purp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_purp.c,v 1.27 2016/11/08 20:01:06 miod Exp $ */ 1/* $OpenBSD: v3_purp.c,v 1.28 2017/01/21 04:42:16 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -325,8 +325,24 @@ nid_cmp(const int *a, const int *b)
325 return *a - *b; 325 return *a - *b;
326} 326}
327 327
328DECLARE_OBJ_BSEARCH_CMP_FN(int, int, nid); 328static int nid_cmp_BSEARCH_CMP_FN(const void *, const void *);
329IMPLEMENT_OBJ_BSEARCH_CMP_FN(int, int, nid); 329static int nid_cmp(int const *, int const *);
330static int *OBJ_bsearch_nid(int *key, int const *base, int num);
331
332static int
333nid_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_)
334{
335 int const *a = a_;
336 int const *b = b_;
337 return nid_cmp(a, b);
338}
339
340static int *
341OBJ_bsearch_nid(int *key, int const *base, int num)
342{
343 return (int *)OBJ_bsearch_(key, base, num, sizeof(int),
344 nid_cmp_BSEARCH_CMP_FN);
345}
330 346
331int 347int
332X509_supported_extension(X509_EXTENSION *ex) 348X509_supported_extension(X509_EXTENSION *ex)