diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/hidden/openssl/x509v3.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_conf.c | 27 |
2 files changed, 3 insertions, 28 deletions
diff --git a/src/lib/libcrypto/hidden/openssl/x509v3.h b/src/lib/libcrypto/hidden/openssl/x509v3.h index c2293d8ea0..f0db675e48 100644 --- a/src/lib/libcrypto/hidden/openssl/x509v3.h +++ b/src/lib/libcrypto/hidden/openssl/x509v3.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509v3.h,v 1.10 2024/08/28 08:33:06 tb Exp $ */ | 1 | /* $OpenBSD: x509v3.h,v 1.11 2024/08/28 08:43:55 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2022 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2022 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -146,7 +146,7 @@ LCRYPTO_USED(X509V3_add_value_bool_nf); | |||
| 146 | LCRYPTO_USED(X509V3_get_value_bool); | 146 | LCRYPTO_USED(X509V3_get_value_bool); |
| 147 | LCRYPTO_USED(X509V3_get_value_int); | 147 | LCRYPTO_USED(X509V3_get_value_int); |
| 148 | LCRYPTO_USED(X509V3_set_nconf); | 148 | LCRYPTO_USED(X509V3_set_nconf); |
| 149 | LCRYPTO_USED(X509V3_set_conf_lhash); | 149 | LCRYPTO_UNUSED(X509V3_set_conf_lhash); |
| 150 | LCRYPTO_USED(X509V3_get_string); | 150 | LCRYPTO_USED(X509V3_get_string); |
| 151 | LCRYPTO_USED(X509V3_get_section); | 151 | LCRYPTO_USED(X509V3_get_section); |
| 152 | LCRYPTO_USED(X509V3_string_free); | 152 | LCRYPTO_USED(X509V3_string_free); |
diff --git a/src/lib/libcrypto/x509/x509_conf.c b/src/lib/libcrypto/x509/x509_conf.c index b6e5cd147a..5e6f1d6262 100644 --- a/src/lib/libcrypto/x509/x509_conf.c +++ b/src/lib/libcrypto/x509/x509_conf.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_conf.c,v 1.19 2024/08/28 08:33:06 tb Exp $ */ | 1 | /* $OpenBSD: x509_conf.c,v 1.20 2024/08/28 08:43:55 tb 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 | */ |
| @@ -74,10 +74,6 @@ static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int nid, | |||
| 74 | int crit, const char *value); | 74 | int crit, const char *value); |
| 75 | static X509_EXTENSION *v3_generic_extension(const char *ext, const char *value, | 75 | static X509_EXTENSION *v3_generic_extension(const char *ext, const char *value, |
| 76 | int crit, int type, X509V3_CTX *ctx); | 76 | int crit, int type, X509V3_CTX *ctx); |
| 77 | static char *conf_lhash_get_string(void *db, const char *section, | ||
| 78 | const char *value); | ||
| 79 | static STACK_OF(CONF_VALUE) *conf_lhash_get_section(void *db, | ||
| 80 | const char *section); | ||
| 81 | static X509_EXTENSION *do_ext_i2d(const X509V3_EXT_METHOD *method, int nid, | 77 | static X509_EXTENSION *do_ext_i2d(const X509V3_EXT_METHOD *method, int nid, |
| 82 | int crit, void *ext_struct); | 78 | int crit, void *ext_struct); |
| 83 | static unsigned char *generic_asn1(const char *value, X509V3_CTX *ctx, | 79 | static unsigned char *generic_asn1(const char *value, X509V3_CTX *ctx, |
| @@ -531,30 +527,9 @@ X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, int nid, | |||
| 531 | } | 527 | } |
| 532 | LCRYPTO_ALIAS(X509V3_EXT_conf_nid); | 528 | LCRYPTO_ALIAS(X509V3_EXT_conf_nid); |
| 533 | 529 | ||
| 534 | static char * | ||
| 535 | conf_lhash_get_string(void *db, const char *section, const char *value) | ||
| 536 | { | ||
| 537 | return CONF_get_string(db, section, value); | ||
| 538 | } | ||
| 539 | |||
| 540 | static STACK_OF(CONF_VALUE) * | ||
| 541 | conf_lhash_get_section(void *db, const char *section) | ||
| 542 | { | ||
| 543 | return CONF_get_section(db, section); | ||
| 544 | } | ||
| 545 | |||
| 546 | static X509V3_CONF_METHOD conf_lhash_method = { | ||
| 547 | conf_lhash_get_string, | ||
| 548 | conf_lhash_get_section, | ||
| 549 | NULL, | ||
| 550 | NULL | ||
| 551 | }; | ||
| 552 | |||
| 553 | void | 530 | void |
| 554 | X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash) | 531 | X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash) |
| 555 | { | 532 | { |
| 556 | ctx->db_meth = &conf_lhash_method; | ||
| 557 | ctx->db = lhash; | ||
| 558 | } | 533 | } |
| 559 | LCRYPTO_ALIAS(X509V3_set_conf_lhash); | 534 | LCRYPTO_ALIAS(X509V3_set_conf_lhash); |
| 560 | 535 | ||
