summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/asn1/asn1_gen.c4
-rw-r--r--src/lib/libcrypto/x509/x509_alt.c4
-rw-r--r--src/lib/libcrypto/x509/x509_conf.c4
-rw-r--r--src/lib/libcrypto/x509/x509_cpols.c6
-rw-r--r--src/lib/libcrypto/x509/x509_crld.c8
-rw-r--r--src/lib/libcrypto/x509/x509_local.h4
6 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_gen.c b/src/lib/libcrypto/asn1/asn1_gen.c
index f74cf9ae74..d9da305ef7 100644
--- a/src/lib/libcrypto/asn1/asn1_gen.c
+++ b/src/lib/libcrypto/asn1/asn1_gen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_gen.c,v 1.25 2025/03/06 07:17:45 tb Exp $ */ 1/* $OpenBSD: asn1_gen.c,v 1.26 2025/03/06 07:20:01 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 2002. 3 * project 2002.
4 */ 4 */
@@ -448,7 +448,7 @@ asn1_multi(int utype, const char *section, X509V3_CTX *cnf)
448 if (section) { 448 if (section) {
449 if (!cnf) 449 if (!cnf)
450 goto bad; 450 goto bad;
451 sect = X509V3_get_section(cnf, (char *)section); 451 sect = X509V3_get0_section(cnf, (char *)section);
452 if (!sect) 452 if (!sect)
453 goto bad; 453 goto bad;
454 for (i = 0; i < sk_CONF_VALUE_num(sect); i++) { 454 for (i = 0; i < sk_CONF_VALUE_num(sect); i++) {
diff --git a/src/lib/libcrypto/x509/x509_alt.c b/src/lib/libcrypto/x509/x509_alt.c
index e19a49ca86..34734a55bd 100644
--- a/src/lib/libcrypto/x509/x509_alt.c
+++ b/src/lib/libcrypto/x509/x509_alt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_alt.c,v 1.18 2025/03/06 07:17:45 tb Exp $ */ 1/* $OpenBSD: x509_alt.c,v 1.19 2025/03/06 07:20:01 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. 3 * project.
4 */ 4 */
@@ -782,7 +782,7 @@ do_dirname(GENERAL_NAME *gen, const char *value, X509V3_CTX *ctx)
782 782
783 if (!(nm = X509_NAME_new())) 783 if (!(nm = X509_NAME_new()))
784 return 0; 784 return 0;
785 sk = X509V3_get_section(ctx, value); 785 sk = X509V3_get0_section(ctx, value);
786 if (!sk) { 786 if (!sk) {
787 X509V3error(X509V3_R_SECTION_NOT_FOUND); 787 X509V3error(X509V3_R_SECTION_NOT_FOUND);
788 ERR_asprintf_error_data("section=%s", value); 788 ERR_asprintf_error_data("section=%s", value);
diff --git a/src/lib/libcrypto/x509/x509_conf.c b/src/lib/libcrypto/x509/x509_conf.c
index 1047540a88..e5b18c2f77 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.28 2025/03/06 07:17:45 tb Exp $ */ 1/* $OpenBSD: x509_conf.c,v 1.29 2025/03/06 07:20:01 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 */
@@ -405,7 +405,7 @@ X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
405LCRYPTO_ALIAS(X509V3_EXT_REQ_add_nconf); 405LCRYPTO_ALIAS(X509V3_EXT_REQ_add_nconf);
406 406
407STACK_OF(CONF_VALUE) * 407STACK_OF(CONF_VALUE) *
408X509V3_get_section(X509V3_CTX *ctx, const char *section) 408X509V3_get0_section(X509V3_CTX *ctx, const char *section)
409{ 409{
410 if (ctx->db == NULL) { 410 if (ctx->db == NULL) {
411 X509V3error(X509V3_R_OPERATION_NOT_DEFINED); 411 X509V3error(X509V3_R_OPERATION_NOT_DEFINED);
diff --git a/src/lib/libcrypto/x509/x509_cpols.c b/src/lib/libcrypto/x509/x509_cpols.c
index a8aa9a3eb6..6bae2a0482 100644
--- a/src/lib/libcrypto/x509/x509_cpols.c
+++ b/src/lib/libcrypto/x509/x509_cpols.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_cpols.c,v 1.14 2025/03/06 07:17:45 tb Exp $ */ 1/* $OpenBSD: x509_cpols.c,v 1.15 2025/03/06 07:20:01 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 */
@@ -461,7 +461,7 @@ r2i_certpol(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *value)
461 continue; 461 continue;
462 } else if (*pstr == '@') { 462 } else if (*pstr == '@') {
463 STACK_OF(CONF_VALUE) *polsect; 463 STACK_OF(CONF_VALUE) *polsect;
464 polsect = X509V3_get_section(ctx, pstr + 1); 464 polsect = X509V3_get0_section(ctx, pstr + 1);
465 if (!polsect) { 465 if (!polsect) {
466 X509V3error(X509V3_R_INVALID_SECTION); 466 X509V3error(X509V3_R_INVALID_SECTION);
467 X509V3_conf_err(cnf); 467 X509V3_conf_err(cnf);
@@ -543,7 +543,7 @@ policy_section(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *polstrs, int ia5org)
543 X509V3_conf_err(cnf); 543 X509V3_conf_err(cnf);
544 goto err; 544 goto err;
545 } 545 }
546 unot = X509V3_get_section(ctx, cnf->value + 1); 546 unot = X509V3_get0_section(ctx, cnf->value + 1);
547 if (unot == NULL) { 547 if (unot == NULL) {
548 X509V3error(X509V3_R_INVALID_SECTION); 548 X509V3error(X509V3_R_INVALID_SECTION);
549 X509V3_conf_err(cnf); 549 X509V3_conf_err(cnf);
diff --git a/src/lib/libcrypto/x509/x509_crld.c b/src/lib/libcrypto/x509/x509_crld.c
index 1510576e83..81f2010df5 100644
--- a/src/lib/libcrypto/x509/x509_crld.c
+++ b/src/lib/libcrypto/x509/x509_crld.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_crld.c,v 1.8 2025/03/06 07:17:45 tb Exp $ */ 1/* $OpenBSD: x509_crld.c,v 1.9 2025/03/06 07:20:01 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 */
@@ -125,7 +125,7 @@ gnames_from_sectname(X509V3_CTX *ctx, char *sect)
125 STACK_OF(GENERAL_NAME) *gens; 125 STACK_OF(GENERAL_NAME) *gens;
126 126
127 if (*sect == '@') 127 if (*sect == '@')
128 gnsect = X509V3_get_section(ctx, sect + 1); 128 gnsect = X509V3_get0_section(ctx, sect + 1);
129 else 129 else
130 gnsect = X509V3_parse_list(sect); 130 gnsect = X509V3_parse_list(sect);
131 if (!gnsect) { 131 if (!gnsect) {
@@ -155,7 +155,7 @@ set_dist_point_name(DIST_POINT_NAME **pdp, X509V3_CTX *ctx, CONF_VALUE *cnf)
155 nm = X509_NAME_new(); 155 nm = X509_NAME_new();
156 if (!nm) 156 if (!nm)
157 return -1; 157 return -1;
158 dnsect = X509V3_get_section(ctx, cnf->value); 158 dnsect = X509V3_get0_section(ctx, cnf->value);
159 if (!dnsect) { 159 if (!dnsect) {
160 X509V3error(X509V3_R_SECTION_NOT_FOUND); 160 X509V3error(X509V3_R_SECTION_NOT_FOUND);
161 X509_NAME_free(nm); 161 X509_NAME_free(nm);
@@ -330,7 +330,7 @@ v2i_crld(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
330 cnf = sk_CONF_VALUE_value(nval, i); 330 cnf = sk_CONF_VALUE_value(nval, i);
331 if (!cnf->value) { 331 if (!cnf->value) {
332 STACK_OF(CONF_VALUE) *dpsect; 332 STACK_OF(CONF_VALUE) *dpsect;
333 dpsect = X509V3_get_section(ctx, cnf->name); 333 dpsect = X509V3_get0_section(ctx, cnf->name);
334 if (!dpsect) 334 if (!dpsect)
335 goto err; 335 goto err;
336 point = crldp_from_section(ctx, dpsect); 336 point = crldp_from_section(ctx, dpsect);
diff --git a/src/lib/libcrypto/x509/x509_local.h b/src/lib/libcrypto/x509/x509_local.h
index f055bb3446..796a2ee718 100644
--- a/src/lib/libcrypto/x509/x509_local.h
+++ b/src/lib/libcrypto/x509/x509_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_local.h,v 1.37 2025/03/06 07:17:45 tb Exp $ */ 1/* $OpenBSD: x509_local.h,v 1.38 2025/03/06 07:20:01 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 2013. 3 * project 2013.
4 */ 4 */
@@ -453,7 +453,7 @@ int X509V3_add_value_int(const char *name, const ASN1_INTEGER *aint,
453int X509V3_get_value_bool(const CONF_VALUE *value, int *asn1_bool); 453int X509V3_get_value_bool(const CONF_VALUE *value, int *asn1_bool);
454int X509V3_get_value_int(const CONF_VALUE *value, ASN1_INTEGER **aint); 454int X509V3_get_value_int(const CONF_VALUE *value, ASN1_INTEGER **aint);
455 455
456STACK_OF(CONF_VALUE) *X509V3_get_section(X509V3_CTX *ctx, const char *section); 456STACK_OF(CONF_VALUE) *X509V3_get0_section(X509V3_CTX *ctx, const char *section);
457 457
458const X509V3_EXT_METHOD *x509v3_ext_method_authority_key_identifier(void); 458const X509V3_EXT_METHOD *x509v3_ext_method_authority_key_identifier(void);
459const X509V3_EXT_METHOD *x509v3_ext_method_basic_constraints(void); 459const X509V3_EXT_METHOD *x509v3_ext_method_basic_constraints(void);