diff options
author | tb <> | 2023-02-16 08:38:17 +0000 |
---|---|---|
committer | tb <> | 2023-02-16 08:38:17 +0000 |
commit | b1fbdd21532891fac5b0f128e57331894bd69d84 (patch) | |
tree | 689defafde66dbfa38a7854af566bd9a05f191b7 /src/lib/libcrypto/x509/x509_conf.c | |
parent | ee0f647faa09f91cb79b628dcb818adaa381af90 (diff) | |
download | openbsd-b1fbdd21532891fac5b0f128e57331894bd69d84.tar.gz openbsd-b1fbdd21532891fac5b0f128e57331894bd69d84.tar.bz2 openbsd-b1fbdd21532891fac5b0f128e57331894bd69d84.zip |
libressl *_namespace.h: adjust *_ALIAS() to require a semicolon
LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon.
This does not conform to style(9), breaks editors and ctags and
(most importantly) my workflow. Fix this by neutering them with
asm("") so that -Wpedantic doesn't complain. There's precedent
in libc's namespace.h
fix suggested by & ok jsing
Diffstat (limited to 'src/lib/libcrypto/x509/x509_conf.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_conf.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/lib/libcrypto/x509/x509_conf.c b/src/lib/libcrypto/x509/x509_conf.c index 2b3274d04d..189bf64405 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.4 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: x509_conf.c,v 1.5 2023/02/16 08:38:17 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 | */ |
@@ -104,7 +104,7 @@ X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, const char *name, | |||
104 | } | 104 | } |
105 | return ret; | 105 | return ret; |
106 | } | 106 | } |
107 | LCRYPTO_ALIAS(X509V3_EXT_nconf) | 107 | LCRYPTO_ALIAS(X509V3_EXT_nconf); |
108 | 108 | ||
109 | /* CONF *conf: Config file */ | 109 | /* CONF *conf: Config file */ |
110 | /* char *value: Value */ | 110 | /* char *value: Value */ |
@@ -121,7 +121,7 @@ X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, | |||
121 | value, crit, ext_type, ctx); | 121 | value, crit, ext_type, ctx); |
122 | return do_ext_nconf(conf, ctx, ext_nid, crit, value); | 122 | return do_ext_nconf(conf, ctx, ext_nid, crit, value); |
123 | } | 123 | } |
124 | LCRYPTO_ALIAS(X509V3_EXT_nconf_nid) | 124 | LCRYPTO_ALIAS(X509V3_EXT_nconf_nid); |
125 | 125 | ||
126 | /* CONF *conf: Config file */ | 126 | /* CONF *conf: Config file */ |
127 | /* char *value: Value */ | 127 | /* char *value: Value */ |
@@ -240,7 +240,7 @@ X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc) | |||
240 | } | 240 | } |
241 | return do_ext_i2d(method, ext_nid, crit, ext_struc); | 241 | return do_ext_i2d(method, ext_nid, crit, ext_struc); |
242 | } | 242 | } |
243 | LCRYPTO_ALIAS(X509V3_EXT_i2d) | 243 | LCRYPTO_ALIAS(X509V3_EXT_i2d); |
244 | 244 | ||
245 | /* Check the extension string for critical flag */ | 245 | /* Check the extension string for critical flag */ |
246 | static int | 246 | static int |
@@ -367,7 +367,7 @@ X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section, | |||
367 | } | 367 | } |
368 | return 1; | 368 | return 1; |
369 | } | 369 | } |
370 | LCRYPTO_ALIAS(X509V3_EXT_add_nconf_sk) | 370 | LCRYPTO_ALIAS(X509V3_EXT_add_nconf_sk); |
371 | 371 | ||
372 | /* Convenience functions to add extensions to a certificate, CRL and request */ | 372 | /* Convenience functions to add extensions to a certificate, CRL and request */ |
373 | 373 | ||
@@ -381,7 +381,7 @@ X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section, | |||
381 | sk = &cert->cert_info->extensions; | 381 | sk = &cert->cert_info->extensions; |
382 | return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk); | 382 | return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk); |
383 | } | 383 | } |
384 | LCRYPTO_ALIAS(X509V3_EXT_add_nconf) | 384 | LCRYPTO_ALIAS(X509V3_EXT_add_nconf); |
385 | 385 | ||
386 | /* Same as above but for a CRL */ | 386 | /* Same as above but for a CRL */ |
387 | 387 | ||
@@ -395,7 +395,7 @@ X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section, | |||
395 | sk = &crl->crl->extensions; | 395 | sk = &crl->crl->extensions; |
396 | return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk); | 396 | return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk); |
397 | } | 397 | } |
398 | LCRYPTO_ALIAS(X509V3_EXT_CRL_add_nconf) | 398 | LCRYPTO_ALIAS(X509V3_EXT_CRL_add_nconf); |
399 | 399 | ||
400 | /* Add extensions to certificate request */ | 400 | /* Add extensions to certificate request */ |
401 | 401 | ||
@@ -415,7 +415,7 @@ X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section, | |||
415 | sk_X509_EXTENSION_pop_free(extlist, X509_EXTENSION_free); | 415 | sk_X509_EXTENSION_pop_free(extlist, X509_EXTENSION_free); |
416 | return i; | 416 | return i; |
417 | } | 417 | } |
418 | LCRYPTO_ALIAS(X509V3_EXT_REQ_add_nconf) | 418 | LCRYPTO_ALIAS(X509V3_EXT_REQ_add_nconf); |
419 | 419 | ||
420 | /* Config database functions */ | 420 | /* Config database functions */ |
421 | 421 | ||
@@ -428,7 +428,7 @@ X509V3_get_string(X509V3_CTX *ctx, const char *name, const char *section) | |||
428 | } | 428 | } |
429 | return ctx->db_meth->get_string(ctx->db, name, section); | 429 | return ctx->db_meth->get_string(ctx->db, name, section); |
430 | } | 430 | } |
431 | LCRYPTO_ALIAS(X509V3_get_string) | 431 | LCRYPTO_ALIAS(X509V3_get_string); |
432 | 432 | ||
433 | STACK_OF(CONF_VALUE) * | 433 | STACK_OF(CONF_VALUE) * |
434 | X509V3_get_section(X509V3_CTX *ctx, const char *section) | 434 | X509V3_get_section(X509V3_CTX *ctx, const char *section) |
@@ -439,7 +439,7 @@ X509V3_get_section(X509V3_CTX *ctx, const char *section) | |||
439 | } | 439 | } |
440 | return ctx->db_meth->get_section(ctx->db, section); | 440 | return ctx->db_meth->get_section(ctx->db, section); |
441 | } | 441 | } |
442 | LCRYPTO_ALIAS(X509V3_get_section) | 442 | LCRYPTO_ALIAS(X509V3_get_section); |
443 | 443 | ||
444 | void | 444 | void |
445 | X509V3_string_free(X509V3_CTX *ctx, char *str) | 445 | X509V3_string_free(X509V3_CTX *ctx, char *str) |
@@ -449,7 +449,7 @@ X509V3_string_free(X509V3_CTX *ctx, char *str) | |||
449 | if (ctx->db_meth->free_string) | 449 | if (ctx->db_meth->free_string) |
450 | ctx->db_meth->free_string(ctx->db, str); | 450 | ctx->db_meth->free_string(ctx->db, str); |
451 | } | 451 | } |
452 | LCRYPTO_ALIAS(X509V3_string_free) | 452 | LCRYPTO_ALIAS(X509V3_string_free); |
453 | 453 | ||
454 | void | 454 | void |
455 | X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section) | 455 | X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section) |
@@ -459,7 +459,7 @@ X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section) | |||
459 | if (ctx->db_meth->free_section) | 459 | if (ctx->db_meth->free_section) |
460 | ctx->db_meth->free_section(ctx->db, section); | 460 | ctx->db_meth->free_section(ctx->db, section); |
461 | } | 461 | } |
462 | LCRYPTO_ALIAS(X509V3_section_free) | 462 | LCRYPTO_ALIAS(X509V3_section_free); |
463 | 463 | ||
464 | static char * | 464 | static char * |
465 | nconf_get_string(void *db, const char *section, const char *value) | 465 | nconf_get_string(void *db, const char *section, const char *value) |
@@ -486,7 +486,7 @@ X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf) | |||
486 | ctx->db_meth = &nconf_method; | 486 | ctx->db_meth = &nconf_method; |
487 | ctx->db = conf; | 487 | ctx->db = conf; |
488 | } | 488 | } |
489 | LCRYPTO_ALIAS(X509V3_set_nconf) | 489 | LCRYPTO_ALIAS(X509V3_set_nconf); |
490 | 490 | ||
491 | void | 491 | void |
492 | X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req, | 492 | X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req, |
@@ -498,7 +498,7 @@ X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req, | |||
498 | ctx->subject_req = req; | 498 | ctx->subject_req = req; |
499 | ctx->flags = flags; | 499 | ctx->flags = flags; |
500 | } | 500 | } |
501 | LCRYPTO_ALIAS(X509V3_set_ctx) | 501 | LCRYPTO_ALIAS(X509V3_set_ctx); |
502 | 502 | ||
503 | /* Old conf compatibility functions */ | 503 | /* Old conf compatibility functions */ |
504 | 504 | ||
@@ -511,7 +511,7 @@ X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, const char *name, | |||
511 | CONF_set_nconf(&ctmp, conf); | 511 | CONF_set_nconf(&ctmp, conf); |
512 | return X509V3_EXT_nconf(&ctmp, ctx, name, value); | 512 | return X509V3_EXT_nconf(&ctmp, ctx, name, value); |
513 | } | 513 | } |
514 | LCRYPTO_ALIAS(X509V3_EXT_conf) | 514 | LCRYPTO_ALIAS(X509V3_EXT_conf); |
515 | 515 | ||
516 | /* LHASH *conf: Config file */ | 516 | /* LHASH *conf: Config file */ |
517 | /* char *value: Value */ | 517 | /* char *value: Value */ |
@@ -524,7 +524,7 @@ X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, int ext_nid, | |||
524 | CONF_set_nconf(&ctmp, conf); | 524 | CONF_set_nconf(&ctmp, conf); |
525 | return X509V3_EXT_nconf_nid(&ctmp, ctx, ext_nid, value); | 525 | return X509V3_EXT_nconf_nid(&ctmp, ctx, ext_nid, value); |
526 | } | 526 | } |
527 | LCRYPTO_ALIAS(X509V3_EXT_conf_nid) | 527 | LCRYPTO_ALIAS(X509V3_EXT_conf_nid); |
528 | 528 | ||
529 | static char * | 529 | static char * |
530 | conf_lhash_get_string(void *db, const char *section, const char *value) | 530 | conf_lhash_get_string(void *db, const char *section, const char *value) |
@@ -551,7 +551,7 @@ X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash) | |||
551 | ctx->db_meth = &conf_lhash_method; | 551 | ctx->db_meth = &conf_lhash_method; |
552 | ctx->db = lhash; | 552 | ctx->db = lhash; |
553 | } | 553 | } |
554 | LCRYPTO_ALIAS(X509V3_set_conf_lhash) | 554 | LCRYPTO_ALIAS(X509V3_set_conf_lhash); |
555 | 555 | ||
556 | int | 556 | int |
557 | X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | 557 | X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, |
@@ -562,7 +562,7 @@ X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | |||
562 | CONF_set_nconf(&ctmp, conf); | 562 | CONF_set_nconf(&ctmp, conf); |
563 | return X509V3_EXT_add_nconf(&ctmp, ctx, section, cert); | 563 | return X509V3_EXT_add_nconf(&ctmp, ctx, section, cert); |
564 | } | 564 | } |
565 | LCRYPTO_ALIAS(X509V3_EXT_add_conf) | 565 | LCRYPTO_ALIAS(X509V3_EXT_add_conf); |
566 | 566 | ||
567 | /* Same as above but for a CRL */ | 567 | /* Same as above but for a CRL */ |
568 | 568 | ||
@@ -575,7 +575,7 @@ X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | |||
575 | CONF_set_nconf(&ctmp, conf); | 575 | CONF_set_nconf(&ctmp, conf); |
576 | return X509V3_EXT_CRL_add_nconf(&ctmp, ctx, section, crl); | 576 | return X509V3_EXT_CRL_add_nconf(&ctmp, ctx, section, crl); |
577 | } | 577 | } |
578 | LCRYPTO_ALIAS(X509V3_EXT_CRL_add_conf) | 578 | LCRYPTO_ALIAS(X509V3_EXT_CRL_add_conf); |
579 | 579 | ||
580 | /* Add extensions to certificate request */ | 580 | /* Add extensions to certificate request */ |
581 | 581 | ||
@@ -588,4 +588,4 @@ X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | |||
588 | CONF_set_nconf(&ctmp, conf); | 588 | CONF_set_nconf(&ctmp, conf); |
589 | return X509V3_EXT_REQ_add_nconf(&ctmp, ctx, section, req); | 589 | return X509V3_EXT_REQ_add_nconf(&ctmp, ctx, section, req); |
590 | } | 590 | } |
591 | LCRYPTO_ALIAS(X509V3_EXT_REQ_add_conf) | 591 | LCRYPTO_ALIAS(X509V3_EXT_REQ_add_conf); |