diff options
author | jsing <> | 2017-01-21 04:44:43 +0000 |
---|---|---|
committer | jsing <> | 2017-01-21 04:44:43 +0000 |
commit | cf9904a4b13d79f0e11e7db5209260a381b4a83f (patch) | |
tree | 59d52ecb3cef99a21130ed575a0a20c9b6536385 /src | |
parent | 4a0bade454554867032b09f31d540604366200d5 (diff) | |
download | openbsd-cf9904a4b13d79f0e11e7db5209260a381b4a83f.tar.gz openbsd-cf9904a4b13d79f0e11e7db5209260a381b4a83f.tar.bz2 openbsd-cf9904a4b13d79f0e11e7db5209260a381b4a83f.zip |
Expand DECLARE_OBJ_BSEARCH_CMP_FN and IMPLEMENT_OBJ_BSEARCH_CMP_FN macros.
No change to generated assembly excluding line numbers.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/evp/evp_pbe.c | 22 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/pmeth_lib.c | 24 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 62 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_xref.c | 42 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_lib.c | 24 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_purp.c | 22 |
6 files changed, 168 insertions, 28 deletions
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c index 0787e2dc94..c7f0c7749a 100644 --- a/src/lib/libcrypto/evp/evp_pbe.c +++ b/src/lib/libcrypto/evp/evp_pbe.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_pbe.c,v 1.23 2015/02/08 22:20:18 miod Exp $ */ | 1 | /* $OpenBSD: evp_pbe.c,v 1.24 2017/01/21 04:38:23 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 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -169,7 +169,9 @@ EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, | |||
169 | return 1; | 169 | return 1; |
170 | } | 170 | } |
171 | 171 | ||
172 | DECLARE_OBJ_BSEARCH_CMP_FN(EVP_PBE_CTL, EVP_PBE_CTL, pbe2); | 172 | static int pbe2_cmp_BSEARCH_CMP_FN(const void *, const void *); |
173 | static int pbe2_cmp(EVP_PBE_CTL const *, EVP_PBE_CTL const *); | ||
174 | static EVP_PBE_CTL *OBJ_bsearch_pbe2(EVP_PBE_CTL *key, EVP_PBE_CTL const *base, int num); | ||
173 | 175 | ||
174 | static int | 176 | static int |
175 | pbe2_cmp(const EVP_PBE_CTL *pbe1, const EVP_PBE_CTL *pbe2) | 177 | pbe2_cmp(const EVP_PBE_CTL *pbe1, const EVP_PBE_CTL *pbe2) |
@@ -182,7 +184,21 @@ pbe2_cmp(const EVP_PBE_CTL *pbe1, const EVP_PBE_CTL *pbe2) | |||
182 | return pbe1->pbe_nid - pbe2->pbe_nid; | 184 | return pbe1->pbe_nid - pbe2->pbe_nid; |
183 | } | 185 | } |
184 | 186 | ||
185 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(EVP_PBE_CTL, EVP_PBE_CTL, pbe2); | 187 | |
188 | static int | ||
189 | pbe2_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | ||
190 | { | ||
191 | EVP_PBE_CTL const *a = a_; | ||
192 | EVP_PBE_CTL const *b = b_; | ||
193 | return pbe2_cmp(a, b); | ||
194 | } | ||
195 | |||
196 | static EVP_PBE_CTL * | ||
197 | OBJ_bsearch_pbe2(EVP_PBE_CTL *key, EVP_PBE_CTL const *base, int num) | ||
198 | { | ||
199 | return (EVP_PBE_CTL *)OBJ_bsearch_(key, base, num, sizeof(EVP_PBE_CTL), | ||
200 | pbe2_cmp_BSEARCH_CMP_FN); | ||
201 | } | ||
186 | 202 | ||
187 | static int | 203 | static int |
188 | pbe_cmp(const EVP_PBE_CTL * const *a, const EVP_PBE_CTL * const *b) | 204 | pbe_cmp(const EVP_PBE_CTL * const *a, const EVP_PBE_CTL * const *b) |
diff --git a/src/lib/libcrypto/evp/pmeth_lib.c b/src/lib/libcrypto/evp/pmeth_lib.c index c93fa99cc6..1d64edcbeb 100644 --- a/src/lib/libcrypto/evp/pmeth_lib.c +++ b/src/lib/libcrypto/evp/pmeth_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pmeth_lib.c,v 1.11 2015/02/11 03:19:37 doug Exp $ */ | 1 | /* $OpenBSD: pmeth_lib.c,v 1.12 2017/01/21 04:38:23 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 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -103,8 +103,9 @@ static const EVP_PKEY_METHOD *standard_methods[] = { | |||
103 | &cmac_pkey_meth, | 103 | &cmac_pkey_meth, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | DECLARE_OBJ_BSEARCH_CMP_FN(const EVP_PKEY_METHOD *, const EVP_PKEY_METHOD *, | 106 | static int pmeth_cmp_BSEARCH_CMP_FN(const void *, const void *); |
107 | pmeth); | 107 | static int pmeth_cmp(const EVP_PKEY_METHOD * const *, const EVP_PKEY_METHOD * const *); |
108 | static const EVP_PKEY_METHOD * *OBJ_bsearch_pmeth(const EVP_PKEY_METHOD * *key, const EVP_PKEY_METHOD * const *base, int num); | ||
108 | 109 | ||
109 | static int | 110 | static int |
110 | pmeth_cmp(const EVP_PKEY_METHOD * const *a, const EVP_PKEY_METHOD * const *b) | 111 | pmeth_cmp(const EVP_PKEY_METHOD * const *a, const EVP_PKEY_METHOD * const *b) |
@@ -112,8 +113,21 @@ pmeth_cmp(const EVP_PKEY_METHOD * const *a, const EVP_PKEY_METHOD * const *b) | |||
112 | return ((*a)->pkey_id - (*b)->pkey_id); | 113 | return ((*a)->pkey_id - (*b)->pkey_id); |
113 | } | 114 | } |
114 | 115 | ||
115 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const EVP_PKEY_METHOD *, const EVP_PKEY_METHOD *, | 116 | |
116 | pmeth); | 117 | static int |
118 | pmeth_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | ||
119 | { | ||
120 | const EVP_PKEY_METHOD * const *a = a_; | ||
121 | const EVP_PKEY_METHOD * const *b = b_; | ||
122 | return pmeth_cmp(a, b); | ||
123 | } | ||
124 | |||
125 | static const EVP_PKEY_METHOD * * | ||
126 | OBJ_bsearch_pmeth(const EVP_PKEY_METHOD * *key, const EVP_PKEY_METHOD * const *base, int num) | ||
127 | { | ||
128 | return (const EVP_PKEY_METHOD * *)OBJ_bsearch_(key, base, num, sizeof(const EVP_PKEY_METHOD *), | ||
129 | pmeth_cmp_BSEARCH_CMP_FN); | ||
130 | } | ||
117 | 131 | ||
118 | const EVP_PKEY_METHOD * | 132 | const EVP_PKEY_METHOD * |
119 | EVP_PKEY_meth_find(int type) | 133 | EVP_PKEY_meth_find(int type) |
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index 1d6207072d..e1dacc0d39 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/lib/libcrypto/objects/obj_dat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: obj_dat.c,v 1.37 2016/12/22 16:57:38 inoguchi Exp $ */ | 1 | /* $OpenBSD: obj_dat.c,v 1.38 2017/01/21 04:44:43 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -72,9 +72,15 @@ | |||
72 | /* obj_dat.h is generated from objects.h by obj_dat.pl */ | 72 | /* obj_dat.h is generated from objects.h by obj_dat.pl */ |
73 | #include "obj_dat.h" | 73 | #include "obj_dat.h" |
74 | 74 | ||
75 | DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn); | 75 | static int sn_cmp_BSEARCH_CMP_FN(const void *, const void *); |
76 | DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, ln); | 76 | static int sn_cmp(const ASN1_OBJECT * const *, unsigned int const *); |
77 | DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, obj); | 77 | static unsigned int *OBJ_bsearch_sn(const ASN1_OBJECT * *key, unsigned int const *base, int num); |
78 | static int ln_cmp_BSEARCH_CMP_FN(const void *, const void *); | ||
79 | static int ln_cmp(const ASN1_OBJECT * const *, unsigned int const *); | ||
80 | static unsigned int *OBJ_bsearch_ln(const ASN1_OBJECT * *key, unsigned int const *base, int num); | ||
81 | static int obj_cmp_BSEARCH_CMP_FN(const void *, const void *); | ||
82 | static int obj_cmp(const ASN1_OBJECT * const *, unsigned int const *); | ||
83 | static unsigned int *OBJ_bsearch_obj(const ASN1_OBJECT * *key, unsigned int const *base, int num); | ||
78 | 84 | ||
79 | #define ADDED_DATA 0 | 85 | #define ADDED_DATA 0 |
80 | #define ADDED_SNAME 1 | 86 | #define ADDED_SNAME 1 |
@@ -95,14 +101,42 @@ static int sn_cmp(const ASN1_OBJECT * const *a, const unsigned int *b) | |||
95 | return (strcmp((*a)->sn, nid_objs[*b].sn)); | 101 | return (strcmp((*a)->sn, nid_objs[*b].sn)); |
96 | } | 102 | } |
97 | 103 | ||
98 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn); | 104 | |
105 | static int | ||
106 | sn_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | ||
107 | { | ||
108 | const ASN1_OBJECT * const *a = a_; | ||
109 | unsigned int const *b = b_; | ||
110 | return sn_cmp(a, b); | ||
111 | } | ||
112 | |||
113 | static unsigned int * | ||
114 | OBJ_bsearch_sn(const ASN1_OBJECT * *key, unsigned int const *base, int num) | ||
115 | { | ||
116 | return (unsigned int *)OBJ_bsearch_(key, base, num, sizeof(unsigned int), | ||
117 | sn_cmp_BSEARCH_CMP_FN); | ||
118 | } | ||
99 | 119 | ||
100 | static int ln_cmp(const ASN1_OBJECT * const *a, const unsigned int *b) | 120 | static int ln_cmp(const ASN1_OBJECT * const *a, const unsigned int *b) |
101 | { | 121 | { |
102 | return (strcmp((*a)->ln, nid_objs[*b].ln)); | 122 | return (strcmp((*a)->ln, nid_objs[*b].ln)); |
103 | } | 123 | } |
104 | 124 | ||
105 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, ln); | 125 | |
126 | static int | ||
127 | ln_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | ||
128 | { | ||
129 | const ASN1_OBJECT * const *a = a_; | ||
130 | unsigned int const *b = b_; | ||
131 | return ln_cmp(a, b); | ||
132 | } | ||
133 | |||
134 | static unsigned int * | ||
135 | OBJ_bsearch_ln(const ASN1_OBJECT * *key, unsigned int const *base, int num) | ||
136 | { | ||
137 | return (unsigned int *)OBJ_bsearch_(key, base, num, sizeof(unsigned int), | ||
138 | ln_cmp_BSEARCH_CMP_FN); | ||
139 | } | ||
106 | 140 | ||
107 | static unsigned long | 141 | static unsigned long |
108 | added_obj_hash(const ADDED_OBJ *ca) | 142 | added_obj_hash(const ADDED_OBJ *ca) |
@@ -400,7 +434,21 @@ obj_cmp(const ASN1_OBJECT * const *ap, const unsigned int *bp) | |||
400 | return (memcmp(a->data, b->data, a->length)); | 434 | return (memcmp(a->data, b->data, a->length)); |
401 | } | 435 | } |
402 | 436 | ||
403 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, obj); | 437 | |
438 | static int | ||
439 | obj_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | ||
440 | { | ||
441 | const ASN1_OBJECT * const *a = a_; | ||
442 | unsigned int const *b = b_; | ||
443 | return obj_cmp(a, b); | ||
444 | } | ||
445 | |||
446 | static unsigned int * | ||
447 | OBJ_bsearch_obj(const ASN1_OBJECT * *key, unsigned int const *base, int num) | ||
448 | { | ||
449 | return (unsigned int *)OBJ_bsearch_(key, base, num, sizeof(unsigned int), | ||
450 | obj_cmp_BSEARCH_CMP_FN); | ||
451 | } | ||
404 | 452 | ||
405 | int | 453 | int |
406 | OBJ_obj2nid(const ASN1_OBJECT *a) | 454 | OBJ_obj2nid(const ASN1_OBJECT *a) |
diff --git a/src/lib/libcrypto/objects/obj_xref.c b/src/lib/libcrypto/objects/obj_xref.c index 94dd6293dd..3e8730d1c6 100644 --- a/src/lib/libcrypto/objects/obj_xref.c +++ b/src/lib/libcrypto/objects/obj_xref.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: obj_xref.c,v 1.7 2014/06/12 15:49:30 deraadt Exp $ */ | 1 | /* $OpenBSD: obj_xref.c,v 1.8 2017/01/21 04:44:43 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 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -68,8 +68,24 @@ sig_cmp(const nid_triple *a, const nid_triple *b) | |||
68 | return a->sign_id - b->sign_id; | 68 | return a->sign_id - b->sign_id; |
69 | } | 69 | } |
70 | 70 | ||
71 | DECLARE_OBJ_BSEARCH_CMP_FN(nid_triple, nid_triple, sig); | 71 | static int sig_cmp_BSEARCH_CMP_FN(const void *, const void *); |
72 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(nid_triple, nid_triple, sig); | 72 | static int sig_cmp(nid_triple const *, nid_triple const *); |
73 | static nid_triple *OBJ_bsearch_sig(nid_triple *key, nid_triple const *base, int num); | ||
74 | |||
75 | static int | ||
76 | sig_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | ||
77 | { | ||
78 | nid_triple const *a = a_; | ||
79 | nid_triple const *b = b_; | ||
80 | return sig_cmp(a, b); | ||
81 | } | ||
82 | |||
83 | static nid_triple * | ||
84 | OBJ_bsearch_sig(nid_triple *key, nid_triple const *base, int num) | ||
85 | { | ||
86 | return (nid_triple *)OBJ_bsearch_(key, base, num, sizeof(nid_triple), | ||
87 | sig_cmp_BSEARCH_CMP_FN); | ||
88 | } | ||
73 | 89 | ||
74 | static int | 90 | static int |
75 | sig_sk_cmp(const nid_triple * const *a, const nid_triple * const *b) | 91 | sig_sk_cmp(const nid_triple * const *a, const nid_triple * const *b) |
@@ -77,7 +93,9 @@ sig_sk_cmp(const nid_triple * const *a, const nid_triple * const *b) | |||
77 | return (*a)->sign_id - (*b)->sign_id; | 93 | return (*a)->sign_id - (*b)->sign_id; |
78 | } | 94 | } |
79 | 95 | ||
80 | DECLARE_OBJ_BSEARCH_CMP_FN(const nid_triple *, const nid_triple *, sigx); | 96 | static int sigx_cmp_BSEARCH_CMP_FN(const void *, const void *); |
97 | static int sigx_cmp(const nid_triple * const *, const nid_triple * const *); | ||
98 | static const nid_triple * *OBJ_bsearch_sigx(const nid_triple * *key, const nid_triple * const *base, int num); | ||
81 | 99 | ||
82 | static int | 100 | static int |
83 | sigx_cmp(const nid_triple * const *a, const nid_triple * const *b) | 101 | sigx_cmp(const nid_triple * const *a, const nid_triple * const *b) |
@@ -90,7 +108,21 @@ sigx_cmp(const nid_triple * const *a, const nid_triple * const *b) | |||
90 | return (*a)->pkey_id - (*b)->pkey_id; | 108 | return (*a)->pkey_id - (*b)->pkey_id; |
91 | } | 109 | } |
92 | 110 | ||
93 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const nid_triple *, const nid_triple *, sigx); | 111 | |
112 | static int | ||
113 | sigx_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | ||
114 | { | ||
115 | const nid_triple * const *a = a_; | ||
116 | const nid_triple * const *b = b_; | ||
117 | return sigx_cmp(a, b); | ||
118 | } | ||
119 | |||
120 | static const nid_triple * * | ||
121 | OBJ_bsearch_sigx(const nid_triple * *key, const nid_triple * const *base, int num) | ||
122 | { | ||
123 | return (const nid_triple * *)OBJ_bsearch_(key, base, num, sizeof(const nid_triple *), | ||
124 | sigx_cmp_BSEARCH_CMP_FN); | ||
125 | } | ||
94 | 126 | ||
95 | int | 127 | int |
96 | OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid) | 128 | OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid) |
diff --git a/src/lib/libcrypto/x509v3/v3_lib.c b/src/lib/libcrypto/x509v3/v3_lib.c index 2e92747d43..946ef1d54e 100644 --- a/src/lib/libcrypto/x509v3/v3_lib.c +++ b/src/lib/libcrypto/x509v3/v3_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_lib.c,v 1.15 2016/12/30 15:54:49 jsing Exp $ */ | 1 | /* $OpenBSD: v3_lib.c,v 1.16 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 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -91,10 +91,24 @@ ext_cmp(const X509V3_EXT_METHOD * const *a, const X509V3_EXT_METHOD * const *b) | |||
91 | return ((*a)->ext_nid - (*b)->ext_nid); | 91 | return ((*a)->ext_nid - (*b)->ext_nid); |
92 | } | 92 | } |
93 | 93 | ||
94 | DECLARE_OBJ_BSEARCH_CMP_FN(const X509V3_EXT_METHOD *, | 94 | static int ext_cmp_BSEARCH_CMP_FN(const void *, const void *); |
95 | const X509V3_EXT_METHOD *, ext); | 95 | static int ext_cmp(const X509V3_EXT_METHOD * const *, const X509V3_EXT_METHOD * const *); |
96 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const X509V3_EXT_METHOD *, | 96 | static const X509V3_EXT_METHOD * *OBJ_bsearch_ext(const X509V3_EXT_METHOD * *key, const X509V3_EXT_METHOD * const *base, int num); |
97 | const X509V3_EXT_METHOD *, ext); | 97 | |
98 | static int | ||
99 | ext_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | ||
100 | { | ||
101 | const X509V3_EXT_METHOD * const *a = a_; | ||
102 | const X509V3_EXT_METHOD * const *b = b_; | ||
103 | return ext_cmp(a, b); | ||
104 | } | ||
105 | |||
106 | static const X509V3_EXT_METHOD * * | ||
107 | OBJ_bsearch_ext(const X509V3_EXT_METHOD * *key, const X509V3_EXT_METHOD * const *base, int num) | ||
108 | { | ||
109 | return (const X509V3_EXT_METHOD * *)OBJ_bsearch_(key, base, num, sizeof(const X509V3_EXT_METHOD *), | ||
110 | ext_cmp_BSEARCH_CMP_FN); | ||
111 | } | ||
98 | 112 | ||
99 | const X509V3_EXT_METHOD * | 113 | const X509V3_EXT_METHOD * |
100 | X509V3_EXT_get_nid(int nid) | 114 | X509V3_EXT_get_nid(int nid) |
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) |