summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_conf.c
diff options
context:
space:
mode:
authorbeck <>2022-11-14 17:48:50 +0000
committerbeck <>2022-11-14 17:48:50 +0000
commit109899f1b36632f5f1c469c4f562df69585eb21e (patch)
treec42f727f8848b4a56e738422f26e8b44150174e4 /src/lib/libcrypto/x509/x509_conf.c
parentfd2db7678bc81cd8abe106c7bd1c724c8b01888d (diff)
downloadopenbsd-109899f1b36632f5f1c469c4f562df69585eb21e.tar.gz
openbsd-109899f1b36632f5f1c469c4f562df69585eb21e.tar.bz2
openbsd-109899f1b36632f5f1c469c4f562df69585eb21e.zip
Hide public symbols in libcrypto/x509 .c files
ok tb@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_conf.c')
-rw-r--r--src/lib/libcrypto/x509/x509_conf.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_conf.c b/src/lib/libcrypto/x509/x509_conf.c
index cd703fc156..def1441f3f 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.2 2021/11/01 20:53:08 tb Exp $ */ 1/* $OpenBSD: x509_conf.c,v 1.3 2022/11/14 17:48:50 beck 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 */
@@ -104,6 +104,7 @@ X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, const char *name,
104 } 104 }
105 return ret; 105 return ret;
106} 106}
107LCRYPTO_ALIAS(X509V3_EXT_nconf)
107 108
108/* CONF *conf: Config file */ 109/* CONF *conf: Config file */
109/* char *value: Value */ 110/* char *value: Value */
@@ -120,6 +121,7 @@ X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid,
120 value, crit, ext_type, ctx); 121 value, crit, ext_type, ctx);
121 return do_ext_nconf(conf, ctx, ext_nid, crit, value); 122 return do_ext_nconf(conf, ctx, ext_nid, crit, value);
122} 123}
124LCRYPTO_ALIAS(X509V3_EXT_nconf_nid)
123 125
124/* CONF *conf: Config file */ 126/* CONF *conf: Config file */
125/* char *value: Value */ 127/* char *value: Value */
@@ -238,6 +240,7 @@ X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc)
238 } 240 }
239 return do_ext_i2d(method, ext_nid, crit, ext_struc); 241 return do_ext_i2d(method, ext_nid, crit, ext_struc);
240} 242}
243LCRYPTO_ALIAS(X509V3_EXT_i2d)
241 244
242/* Check the extension string for critical flag */ 245/* Check the extension string for critical flag */
243static int 246static int
@@ -364,6 +367,7 @@ X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section,
364 } 367 }
365 return 1; 368 return 1;
366} 369}
370LCRYPTO_ALIAS(X509V3_EXT_add_nconf_sk)
367 371
368/* Convenience functions to add extensions to a certificate, CRL and request */ 372/* Convenience functions to add extensions to a certificate, CRL and request */
369 373
@@ -377,6 +381,7 @@ X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
377 sk = &cert->cert_info->extensions; 381 sk = &cert->cert_info->extensions;
378 return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk); 382 return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk);
379} 383}
384LCRYPTO_ALIAS(X509V3_EXT_add_nconf)
380 385
381/* Same as above but for a CRL */ 386/* Same as above but for a CRL */
382 387
@@ -390,6 +395,7 @@ X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
390 sk = &crl->crl->extensions; 395 sk = &crl->crl->extensions;
391 return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk); 396 return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk);
392} 397}
398LCRYPTO_ALIAS(X509V3_EXT_CRL_add_nconf)
393 399
394/* Add extensions to certificate request */ 400/* Add extensions to certificate request */
395 401
@@ -409,6 +415,7 @@ X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
409 sk_X509_EXTENSION_pop_free(extlist, X509_EXTENSION_free); 415 sk_X509_EXTENSION_pop_free(extlist, X509_EXTENSION_free);
410 return i; 416 return i;
411} 417}
418LCRYPTO_ALIAS(X509V3_EXT_REQ_add_nconf)
412 419
413/* Config database functions */ 420/* Config database functions */
414 421
@@ -421,6 +428,7 @@ X509V3_get_string(X509V3_CTX *ctx, const char *name, const char *section)
421 } 428 }
422 return ctx->db_meth->get_string(ctx->db, name, section); 429 return ctx->db_meth->get_string(ctx->db, name, section);
423} 430}
431LCRYPTO_ALIAS(X509V3_get_string)
424 432
425STACK_OF(CONF_VALUE) * 433STACK_OF(CONF_VALUE) *
426X509V3_get_section(X509V3_CTX *ctx, const char *section) 434X509V3_get_section(X509V3_CTX *ctx, const char *section)
@@ -431,6 +439,7 @@ X509V3_get_section(X509V3_CTX *ctx, const char *section)
431 } 439 }
432 return ctx->db_meth->get_section(ctx->db, section); 440 return ctx->db_meth->get_section(ctx->db, section);
433} 441}
442LCRYPTO_ALIAS(X509V3_get_section)
434 443
435void 444void
436X509V3_string_free(X509V3_CTX *ctx, char *str) 445X509V3_string_free(X509V3_CTX *ctx, char *str)
@@ -440,6 +449,7 @@ X509V3_string_free(X509V3_CTX *ctx, char *str)
440 if (ctx->db_meth->free_string) 449 if (ctx->db_meth->free_string)
441 ctx->db_meth->free_string(ctx->db, str); 450 ctx->db_meth->free_string(ctx->db, str);
442} 451}
452LCRYPTO_ALIAS(X509V3_string_free)
443 453
444void 454void
445X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section) 455X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section)
@@ -449,6 +459,7 @@ X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section)
449 if (ctx->db_meth->free_section) 459 if (ctx->db_meth->free_section)
450 ctx->db_meth->free_section(ctx->db, section); 460 ctx->db_meth->free_section(ctx->db, section);
451} 461}
462LCRYPTO_ALIAS(X509V3_section_free)
452 463
453static char * 464static char *
454nconf_get_string(void *db, const char *section, const char *value) 465nconf_get_string(void *db, const char *section, const char *value)
@@ -475,6 +486,7 @@ X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf)
475 ctx->db_meth = &nconf_method; 486 ctx->db_meth = &nconf_method;
476 ctx->db = conf; 487 ctx->db = conf;
477} 488}
489LCRYPTO_ALIAS(X509V3_set_nconf)
478 490
479void 491void
480X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req, 492X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req,
@@ -486,6 +498,7 @@ X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req,
486 ctx->subject_req = req; 498 ctx->subject_req = req;
487 ctx->flags = flags; 499 ctx->flags = flags;
488} 500}
501LCRYPTO_ALIAS(X509V3_set_ctx)
489 502
490/* Old conf compatibility functions */ 503/* Old conf compatibility functions */
491 504
@@ -498,6 +511,7 @@ X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, const char *name,
498 CONF_set_nconf(&ctmp, conf); 511 CONF_set_nconf(&ctmp, conf);
499 return X509V3_EXT_nconf(&ctmp, ctx, name, value); 512 return X509V3_EXT_nconf(&ctmp, ctx, name, value);
500} 513}
514LCRYPTO_ALIAS(X509V3_EXT_conf)
501 515
502/* LHASH *conf: Config file */ 516/* LHASH *conf: Config file */
503/* char *value: Value */ 517/* char *value: Value */
@@ -510,6 +524,7 @@ X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, int ext_nid,
510 CONF_set_nconf(&ctmp, conf); 524 CONF_set_nconf(&ctmp, conf);
511 return X509V3_EXT_nconf_nid(&ctmp, ctx, ext_nid, value); 525 return X509V3_EXT_nconf_nid(&ctmp, ctx, ext_nid, value);
512} 526}
527LCRYPTO_ALIAS(X509V3_EXT_conf_nid)
513 528
514static char * 529static char *
515conf_lhash_get_string(void *db, const char *section, const char *value) 530conf_lhash_get_string(void *db, const char *section, const char *value)
@@ -536,6 +551,7 @@ X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash)
536 ctx->db_meth = &conf_lhash_method; 551 ctx->db_meth = &conf_lhash_method;
537 ctx->db = lhash; 552 ctx->db = lhash;
538} 553}
554LCRYPTO_ALIAS(X509V3_set_conf_lhash)
539 555
540int 556int
541X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, 557X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
@@ -546,6 +562,7 @@ X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
546 CONF_set_nconf(&ctmp, conf); 562 CONF_set_nconf(&ctmp, conf);
547 return X509V3_EXT_add_nconf(&ctmp, ctx, section, cert); 563 return X509V3_EXT_add_nconf(&ctmp, ctx, section, cert);
548} 564}
565LCRYPTO_ALIAS(X509V3_EXT_add_conf)
549 566
550/* Same as above but for a CRL */ 567/* Same as above but for a CRL */
551 568
@@ -558,6 +575,7 @@ X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
558 CONF_set_nconf(&ctmp, conf); 575 CONF_set_nconf(&ctmp, conf);
559 return X509V3_EXT_CRL_add_nconf(&ctmp, ctx, section, crl); 576 return X509V3_EXT_CRL_add_nconf(&ctmp, ctx, section, crl);
560} 577}
578LCRYPTO_ALIAS(X509V3_EXT_CRL_add_conf)
561 579
562/* Add extensions to certificate request */ 580/* Add extensions to certificate request */
563 581
@@ -570,3 +588,4 @@ X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
570 CONF_set_nconf(&ctmp, conf); 588 CONF_set_nconf(&ctmp, conf);
571 return X509V3_EXT_REQ_add_nconf(&ctmp, ctx, section, req); 589 return X509V3_EXT_REQ_add_nconf(&ctmp, ctx, section, req);
572} 590}
591LCRYPTO_ALIAS(X509V3_EXT_REQ_add_conf)