diff options
| author | beck <> | 2022-11-14 17:48:50 +0000 |
|---|---|---|
| committer | beck <> | 2022-11-14 17:48:50 +0000 |
| commit | 86ef9af254717a5620d93d1ebe06ab2ad9597496 (patch) | |
| tree | c42f727f8848b4a56e738422f26e8b44150174e4 /src/lib/libcrypto/x509/x509_cmp.c | |
| parent | ee06865d71aaa04ea842bc01f03382ca41128858 (diff) | |
| download | openbsd-86ef9af254717a5620d93d1ebe06ab2ad9597496.tar.gz openbsd-86ef9af254717a5620d93d1ebe06ab2ad9597496.tar.bz2 openbsd-86ef9af254717a5620d93d1ebe06ab2ad9597496.zip | |
Hide public symbols in libcrypto/x509 .c files
ok tb@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_cmp.c')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_cmp.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_cmp.c b/src/lib/libcrypto/x509/x509_cmp.c index 4fd8d78fc3..542ae76c17 100644 --- a/src/lib/libcrypto/x509/x509_cmp.c +++ b/src/lib/libcrypto/x509/x509_cmp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_cmp.c,v 1.39 2022/02/24 22:05:06 beck Exp $ */ | 1 | /* $OpenBSD: x509_cmp.c,v 1.40 2022/11/14 17:48:50 beck 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 | * |
| @@ -84,6 +84,7 @@ X509_issuer_and_serial_cmp(const X509 *a, const X509 *b) | |||
| 84 | return (i); | 84 | return (i); |
| 85 | return (X509_NAME_cmp(ai->issuer, bi->issuer)); | 85 | return (X509_NAME_cmp(ai->issuer, bi->issuer)); |
| 86 | } | 86 | } |
| 87 | LCRYPTO_ALIAS(X509_issuer_and_serial_cmp) | ||
| 87 | 88 | ||
| 88 | #ifndef OPENSSL_NO_MD5 | 89 | #ifndef OPENSSL_NO_MD5 |
| 89 | unsigned long | 90 | unsigned long |
| @@ -119,6 +120,7 @@ err: | |||
| 119 | free(f); | 120 | free(f); |
| 120 | return (ret); | 121 | return (ret); |
| 121 | } | 122 | } |
| 123 | LCRYPTO_ALIAS(X509_issuer_and_serial_hash) | ||
| 122 | #endif | 124 | #endif |
| 123 | 125 | ||
| 124 | int | 126 | int |
| @@ -126,18 +128,21 @@ X509_issuer_name_cmp(const X509 *a, const X509 *b) | |||
| 126 | { | 128 | { |
| 127 | return (X509_NAME_cmp(a->cert_info->issuer, b->cert_info->issuer)); | 129 | return (X509_NAME_cmp(a->cert_info->issuer, b->cert_info->issuer)); |
| 128 | } | 130 | } |
| 131 | LCRYPTO_ALIAS(X509_issuer_name_cmp) | ||
| 129 | 132 | ||
| 130 | int | 133 | int |
| 131 | X509_subject_name_cmp(const X509 *a, const X509 *b) | 134 | X509_subject_name_cmp(const X509 *a, const X509 *b) |
| 132 | { | 135 | { |
| 133 | return (X509_NAME_cmp(a->cert_info->subject, b->cert_info->subject)); | 136 | return (X509_NAME_cmp(a->cert_info->subject, b->cert_info->subject)); |
| 134 | } | 137 | } |
| 138 | LCRYPTO_ALIAS(X509_subject_name_cmp) | ||
| 135 | 139 | ||
| 136 | int | 140 | int |
| 137 | X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b) | 141 | X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b) |
| 138 | { | 142 | { |
| 139 | return (X509_NAME_cmp(a->crl->issuer, b->crl->issuer)); | 143 | return (X509_NAME_cmp(a->crl->issuer, b->crl->issuer)); |
| 140 | } | 144 | } |
| 145 | LCRYPTO_ALIAS(X509_CRL_cmp) | ||
| 141 | 146 | ||
| 142 | #ifndef OPENSSL_NO_SHA | 147 | #ifndef OPENSSL_NO_SHA |
| 143 | int | 148 | int |
| @@ -145,6 +150,7 @@ X509_CRL_match(const X509_CRL *a, const X509_CRL *b) | |||
| 145 | { | 150 | { |
| 146 | return memcmp(a->hash, b->hash, X509_CRL_HASH_LEN); | 151 | return memcmp(a->hash, b->hash, X509_CRL_HASH_LEN); |
| 147 | } | 152 | } |
| 153 | LCRYPTO_ALIAS(X509_CRL_match) | ||
| 148 | #endif | 154 | #endif |
| 149 | 155 | ||
| 150 | X509_NAME * | 156 | X509_NAME * |
| @@ -152,12 +158,14 @@ X509_get_issuer_name(const X509 *a) | |||
| 152 | { | 158 | { |
| 153 | return (a->cert_info->issuer); | 159 | return (a->cert_info->issuer); |
| 154 | } | 160 | } |
| 161 | LCRYPTO_ALIAS(X509_get_issuer_name) | ||
| 155 | 162 | ||
| 156 | unsigned long | 163 | unsigned long |
| 157 | X509_issuer_name_hash(X509 *x) | 164 | X509_issuer_name_hash(X509 *x) |
| 158 | { | 165 | { |
| 159 | return (X509_NAME_hash(x->cert_info->issuer)); | 166 | return (X509_NAME_hash(x->cert_info->issuer)); |
| 160 | } | 167 | } |
| 168 | LCRYPTO_ALIAS(X509_issuer_name_hash) | ||
| 161 | 169 | ||
| 162 | #ifndef OPENSSL_NO_MD5 | 170 | #ifndef OPENSSL_NO_MD5 |
| 163 | unsigned long | 171 | unsigned long |
| @@ -165,6 +173,7 @@ X509_issuer_name_hash_old(X509 *x) | |||
| 165 | { | 173 | { |
| 166 | return (X509_NAME_hash_old(x->cert_info->issuer)); | 174 | return (X509_NAME_hash_old(x->cert_info->issuer)); |
| 167 | } | 175 | } |
| 176 | LCRYPTO_ALIAS(X509_issuer_name_hash_old) | ||
| 168 | #endif | 177 | #endif |
| 169 | 178 | ||
| 170 | X509_NAME * | 179 | X509_NAME * |
| @@ -172,24 +181,28 @@ X509_get_subject_name(const X509 *a) | |||
| 172 | { | 181 | { |
| 173 | return (a->cert_info->subject); | 182 | return (a->cert_info->subject); |
| 174 | } | 183 | } |
| 184 | LCRYPTO_ALIAS(X509_get_subject_name) | ||
| 175 | 185 | ||
| 176 | ASN1_INTEGER * | 186 | ASN1_INTEGER * |
| 177 | X509_get_serialNumber(X509 *a) | 187 | X509_get_serialNumber(X509 *a) |
| 178 | { | 188 | { |
| 179 | return (a->cert_info->serialNumber); | 189 | return (a->cert_info->serialNumber); |
| 180 | } | 190 | } |
| 191 | LCRYPTO_ALIAS(X509_get_serialNumber) | ||
| 181 | 192 | ||
| 182 | const ASN1_INTEGER * | 193 | const ASN1_INTEGER * |
| 183 | X509_get0_serialNumber(const X509 *a) | 194 | X509_get0_serialNumber(const X509 *a) |
| 184 | { | 195 | { |
| 185 | return (a->cert_info->serialNumber); | 196 | return (a->cert_info->serialNumber); |
| 186 | } | 197 | } |
| 198 | LCRYPTO_ALIAS(X509_get0_serialNumber) | ||
| 187 | 199 | ||
| 188 | unsigned long | 200 | unsigned long |
| 189 | X509_subject_name_hash(X509 *x) | 201 | X509_subject_name_hash(X509 *x) |
| 190 | { | 202 | { |
| 191 | return (X509_NAME_hash(x->cert_info->subject)); | 203 | return (X509_NAME_hash(x->cert_info->subject)); |
| 192 | } | 204 | } |
| 205 | LCRYPTO_ALIAS(X509_subject_name_hash) | ||
| 193 | 206 | ||
| 194 | #ifndef OPENSSL_NO_MD5 | 207 | #ifndef OPENSSL_NO_MD5 |
| 195 | unsigned long | 208 | unsigned long |
| @@ -197,6 +210,7 @@ X509_subject_name_hash_old(X509 *x) | |||
| 197 | { | 210 | { |
| 198 | return (X509_NAME_hash_old(x->cert_info->subject)); | 211 | return (X509_NAME_hash_old(x->cert_info->subject)); |
| 199 | } | 212 | } |
| 213 | LCRYPTO_ALIAS(X509_subject_name_hash_old) | ||
| 200 | #endif | 214 | #endif |
| 201 | 215 | ||
| 202 | #ifndef OPENSSL_NO_SHA | 216 | #ifndef OPENSSL_NO_SHA |
| @@ -218,6 +232,7 @@ X509_cmp(const X509 *a, const X509 *b) | |||
| 218 | 232 | ||
| 219 | return memcmp(a->hash, b->hash, X509_CERT_HASH_LEN); | 233 | return memcmp(a->hash, b->hash, X509_CERT_HASH_LEN); |
| 220 | } | 234 | } |
| 235 | LCRYPTO_ALIAS(X509_cmp) | ||
| 221 | #endif | 236 | #endif |
| 222 | 237 | ||
| 223 | int | 238 | int |
| @@ -241,6 +256,7 @@ X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b) | |||
| 241 | return ret; | 256 | return ret; |
| 242 | return memcmp(a->canon_enc, b->canon_enc, a->canon_enclen); | 257 | return memcmp(a->canon_enc, b->canon_enc, a->canon_enclen); |
| 243 | } | 258 | } |
| 259 | LCRYPTO_ALIAS(X509_NAME_cmp) | ||
| 244 | 260 | ||
| 245 | unsigned long | 261 | unsigned long |
| 246 | X509_NAME_hash(X509_NAME *x) | 262 | X509_NAME_hash(X509_NAME *x) |
| @@ -259,6 +275,7 @@ X509_NAME_hash(X509_NAME *x) | |||
| 259 | 0xffffffffL; | 275 | 0xffffffffL; |
| 260 | return (ret); | 276 | return (ret); |
| 261 | } | 277 | } |
| 278 | LCRYPTO_ALIAS(X509_NAME_hash) | ||
| 262 | 279 | ||
| 263 | 280 | ||
| 264 | #ifndef OPENSSL_NO_MD5 | 281 | #ifndef OPENSSL_NO_MD5 |
| @@ -287,6 +304,7 @@ X509_NAME_hash_old(X509_NAME *x) | |||
| 287 | 304 | ||
| 288 | return (ret); | 305 | return (ret); |
| 289 | } | 306 | } |
| 307 | LCRYPTO_ALIAS(X509_NAME_hash_old) | ||
| 290 | #endif | 308 | #endif |
| 291 | 309 | ||
| 292 | /* Search a stack of X509 for a match */ | 310 | /* Search a stack of X509 for a match */ |
| @@ -312,6 +330,7 @@ X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name, | |||
| 312 | } | 330 | } |
| 313 | return (NULL); | 331 | return (NULL); |
| 314 | } | 332 | } |
| 333 | LCRYPTO_ALIAS(X509_find_by_issuer_and_serial) | ||
| 315 | 334 | ||
| 316 | X509 * | 335 | X509 * |
| 317 | X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name) | 336 | X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name) |
| @@ -326,6 +345,7 @@ X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name) | |||
| 326 | } | 345 | } |
| 327 | return (NULL); | 346 | return (NULL); |
| 328 | } | 347 | } |
| 348 | LCRYPTO_ALIAS(X509_find_by_subject) | ||
| 329 | 349 | ||
| 330 | EVP_PKEY * | 350 | EVP_PKEY * |
| 331 | X509_get_pubkey(X509 *x) | 351 | X509_get_pubkey(X509 *x) |
| @@ -334,6 +354,7 @@ X509_get_pubkey(X509 *x) | |||
| 334 | return (NULL); | 354 | return (NULL); |
| 335 | return (X509_PUBKEY_get(x->cert_info->key)); | 355 | return (X509_PUBKEY_get(x->cert_info->key)); |
| 336 | } | 356 | } |
| 357 | LCRYPTO_ALIAS(X509_get_pubkey) | ||
| 337 | 358 | ||
| 338 | EVP_PKEY * | 359 | EVP_PKEY * |
| 339 | X509_get0_pubkey(const X509 *x) | 360 | X509_get0_pubkey(const X509 *x) |
| @@ -342,6 +363,7 @@ X509_get0_pubkey(const X509 *x) | |||
| 342 | return (NULL); | 363 | return (NULL); |
| 343 | return (X509_PUBKEY_get0(x->cert_info->key)); | 364 | return (X509_PUBKEY_get0(x->cert_info->key)); |
| 344 | } | 365 | } |
| 366 | LCRYPTO_ALIAS(X509_get0_pubkey) | ||
| 345 | 367 | ||
| 346 | ASN1_BIT_STRING * | 368 | ASN1_BIT_STRING * |
| 347 | X509_get0_pubkey_bitstr(const X509 *x) | 369 | X509_get0_pubkey_bitstr(const X509 *x) |
| @@ -350,6 +372,7 @@ X509_get0_pubkey_bitstr(const X509 *x) | |||
| 350 | return NULL; | 372 | return NULL; |
| 351 | return x->cert_info->key->public_key; | 373 | return x->cert_info->key->public_key; |
| 352 | } | 374 | } |
| 375 | LCRYPTO_ALIAS(X509_get0_pubkey_bitstr) | ||
| 353 | 376 | ||
| 354 | int | 377 | int |
| 355 | X509_check_private_key(const X509 *x, const EVP_PKEY *k) | 378 | X509_check_private_key(const X509 *x, const EVP_PKEY *k) |
| @@ -380,6 +403,7 @@ X509_check_private_key(const X509 *x, const EVP_PKEY *k) | |||
| 380 | return 1; | 403 | return 1; |
| 381 | return 0; | 404 | return 0; |
| 382 | } | 405 | } |
| 406 | LCRYPTO_ALIAS(X509_check_private_key) | ||
| 383 | 407 | ||
| 384 | /* | 408 | /* |
| 385 | * Not strictly speaking an "up_ref" as a STACK doesn't have a reference | 409 | * Not strictly speaking an "up_ref" as a STACK doesn't have a reference |
| @@ -398,3 +422,4 @@ X509_chain_up_ref(STACK_OF(X509) *chain) | |||
| 398 | 422 | ||
| 399 | return ret; | 423 | return ret; |
| 400 | } | 424 | } |
| 425 | LCRYPTO_ALIAS(X509_chain_up_ref) | ||
