diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_purp.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_purp.c | 22 |
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 | ||
328 | DECLARE_OBJ_BSEARCH_CMP_FN(int, int, nid); | 328 | static int nid_cmp_BSEARCH_CMP_FN(const void *, const void *); |
329 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(int, int, nid); | 329 | static int nid_cmp(int const *, int const *); |
330 | static int *OBJ_bsearch_nid(int *key, int const *base, int num); | ||
331 | |||
332 | static int | ||
333 | nid_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 | |||
340 | static int * | ||
341 | OBJ_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 | ||
331 | int | 347 | int |
332 | X509_supported_extension(X509_EXTENSION *ex) | 348 | X509_supported_extension(X509_EXTENSION *ex) |