diff options
| author | beck <> | 2023-07-05 21:23:37 +0000 |
|---|---|---|
| committer | beck <> | 2023-07-05 21:23:37 +0000 |
| commit | 0da1913b3c721e1a62fd66bc43547b4e910cbc34 (patch) | |
| tree | 3cafd04134ea26f8b5da5e120671d9a01bff9156 /src/lib/libcrypto/asn1/x_crl.c | |
| parent | 78a308af2f74ee5b41c0815ab21ef9d01c1fcdd9 (diff) | |
| download | openbsd-0da1913b3c721e1a62fd66bc43547b4e910cbc34.tar.gz openbsd-0da1913b3c721e1a62fd66bc43547b4e910cbc34.tar.bz2 openbsd-0da1913b3c721e1a62fd66bc43547b4e910cbc34.zip | |
Hide symbols in asn1 and bio
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/asn1/x_crl.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/x_crl.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/x_crl.c b/src/lib/libcrypto/asn1/x_crl.c index f637bddd36..74e07da3b5 100644 --- a/src/lib/libcrypto/asn1/x_crl.c +++ b/src/lib/libcrypto/asn1/x_crl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x_crl.c,v 1.39 2022/12/26 16:00:36 tb Exp $ */ | 1 | /* $OpenBSD: x_crl.c,v 1.40 2023/07/05 21:23:37 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 | * |
| @@ -442,30 +442,35 @@ d2i_X509_REVOKED(X509_REVOKED **a, const unsigned char **in, long len) | |||
| 442 | return (X509_REVOKED *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 442 | return (X509_REVOKED *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
| 443 | &X509_REVOKED_it); | 443 | &X509_REVOKED_it); |
| 444 | } | 444 | } |
| 445 | LCRYPTO_ALIAS(d2i_X509_REVOKED); | ||
| 445 | 446 | ||
| 446 | int | 447 | int |
| 447 | i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **out) | 448 | i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **out) |
| 448 | { | 449 | { |
| 449 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_REVOKED_it); | 450 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_REVOKED_it); |
| 450 | } | 451 | } |
| 452 | LCRYPTO_ALIAS(i2d_X509_REVOKED); | ||
| 451 | 453 | ||
| 452 | X509_REVOKED * | 454 | X509_REVOKED * |
| 453 | X509_REVOKED_new(void) | 455 | X509_REVOKED_new(void) |
| 454 | { | 456 | { |
| 455 | return (X509_REVOKED *)ASN1_item_new(&X509_REVOKED_it); | 457 | return (X509_REVOKED *)ASN1_item_new(&X509_REVOKED_it); |
| 456 | } | 458 | } |
| 459 | LCRYPTO_ALIAS(X509_REVOKED_new); | ||
| 457 | 460 | ||
| 458 | void | 461 | void |
| 459 | X509_REVOKED_free(X509_REVOKED *a) | 462 | X509_REVOKED_free(X509_REVOKED *a) |
| 460 | { | 463 | { |
| 461 | ASN1_item_free((ASN1_VALUE *)a, &X509_REVOKED_it); | 464 | ASN1_item_free((ASN1_VALUE *)a, &X509_REVOKED_it); |
| 462 | } | 465 | } |
| 466 | LCRYPTO_ALIAS(X509_REVOKED_free); | ||
| 463 | 467 | ||
| 464 | X509_REVOKED * | 468 | X509_REVOKED * |
| 465 | X509_REVOKED_dup(X509_REVOKED *a) | 469 | X509_REVOKED_dup(X509_REVOKED *a) |
| 466 | { | 470 | { |
| 467 | return ASN1_item_dup(&X509_REVOKED_it, a); | 471 | return ASN1_item_dup(&X509_REVOKED_it, a); |
| 468 | } | 472 | } |
| 473 | LCRYPTO_ALIAS(X509_REVOKED_dup); | ||
| 469 | 474 | ||
| 470 | X509_CRL_INFO * | 475 | X509_CRL_INFO * |
| 471 | d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len) | 476 | d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len) |
| @@ -473,24 +478,28 @@ d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len) | |||
| 473 | return (X509_CRL_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 478 | return (X509_CRL_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
| 474 | &X509_CRL_INFO_it); | 479 | &X509_CRL_INFO_it); |
| 475 | } | 480 | } |
| 481 | LCRYPTO_ALIAS(d2i_X509_CRL_INFO); | ||
| 476 | 482 | ||
| 477 | int | 483 | int |
| 478 | i2d_X509_CRL_INFO(X509_CRL_INFO *a, unsigned char **out) | 484 | i2d_X509_CRL_INFO(X509_CRL_INFO *a, unsigned char **out) |
| 479 | { | 485 | { |
| 480 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_CRL_INFO_it); | 486 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_CRL_INFO_it); |
| 481 | } | 487 | } |
| 488 | LCRYPTO_ALIAS(i2d_X509_CRL_INFO); | ||
| 482 | 489 | ||
| 483 | X509_CRL_INFO * | 490 | X509_CRL_INFO * |
| 484 | X509_CRL_INFO_new(void) | 491 | X509_CRL_INFO_new(void) |
| 485 | { | 492 | { |
| 486 | return (X509_CRL_INFO *)ASN1_item_new(&X509_CRL_INFO_it); | 493 | return (X509_CRL_INFO *)ASN1_item_new(&X509_CRL_INFO_it); |
| 487 | } | 494 | } |
| 495 | LCRYPTO_ALIAS(X509_CRL_INFO_new); | ||
| 488 | 496 | ||
| 489 | void | 497 | void |
| 490 | X509_CRL_INFO_free(X509_CRL_INFO *a) | 498 | X509_CRL_INFO_free(X509_CRL_INFO *a) |
| 491 | { | 499 | { |
| 492 | ASN1_item_free((ASN1_VALUE *)a, &X509_CRL_INFO_it); | 500 | ASN1_item_free((ASN1_VALUE *)a, &X509_CRL_INFO_it); |
| 493 | } | 501 | } |
| 502 | LCRYPTO_ALIAS(X509_CRL_INFO_free); | ||
| 494 | 503 | ||
| 495 | X509_CRL * | 504 | X509_CRL * |
| 496 | d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len) | 505 | d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len) |
| @@ -498,30 +507,35 @@ d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len) | |||
| 498 | return (X509_CRL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 507 | return (X509_CRL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
| 499 | &X509_CRL_it); | 508 | &X509_CRL_it); |
| 500 | } | 509 | } |
| 510 | LCRYPTO_ALIAS(d2i_X509_CRL); | ||
| 501 | 511 | ||
| 502 | int | 512 | int |
| 503 | i2d_X509_CRL(X509_CRL *a, unsigned char **out) | 513 | i2d_X509_CRL(X509_CRL *a, unsigned char **out) |
| 504 | { | 514 | { |
| 505 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_CRL_it); | 515 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_CRL_it); |
| 506 | } | 516 | } |
| 517 | LCRYPTO_ALIAS(i2d_X509_CRL); | ||
| 507 | 518 | ||
| 508 | X509_CRL * | 519 | X509_CRL * |
| 509 | X509_CRL_new(void) | 520 | X509_CRL_new(void) |
| 510 | { | 521 | { |
| 511 | return (X509_CRL *)ASN1_item_new(&X509_CRL_it); | 522 | return (X509_CRL *)ASN1_item_new(&X509_CRL_it); |
| 512 | } | 523 | } |
| 524 | LCRYPTO_ALIAS(X509_CRL_new); | ||
| 513 | 525 | ||
| 514 | void | 526 | void |
| 515 | X509_CRL_free(X509_CRL *a) | 527 | X509_CRL_free(X509_CRL *a) |
| 516 | { | 528 | { |
| 517 | ASN1_item_free((ASN1_VALUE *)a, &X509_CRL_it); | 529 | ASN1_item_free((ASN1_VALUE *)a, &X509_CRL_it); |
| 518 | } | 530 | } |
| 531 | LCRYPTO_ALIAS(X509_CRL_free); | ||
| 519 | 532 | ||
| 520 | X509_CRL * | 533 | X509_CRL * |
| 521 | X509_CRL_dup(X509_CRL *x) | 534 | X509_CRL_dup(X509_CRL *x) |
| 522 | { | 535 | { |
| 523 | return ASN1_item_dup(&X509_CRL_it, x); | 536 | return ASN1_item_dup(&X509_CRL_it, x); |
| 524 | } | 537 | } |
| 538 | LCRYPTO_ALIAS(X509_CRL_dup); | ||
| 525 | 539 | ||
| 526 | static int | 540 | static int |
| 527 | X509_REVOKED_cmp(const X509_REVOKED * const *a, const X509_REVOKED * const *b) | 541 | X509_REVOKED_cmp(const X509_REVOKED * const *a, const X509_REVOKED * const *b) |
| @@ -544,6 +558,7 @@ X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) | |||
| 544 | inf->enc.modified = 1; | 558 | inf->enc.modified = 1; |
| 545 | return 1; | 559 | return 1; |
| 546 | } | 560 | } |
| 561 | LCRYPTO_ALIAS(X509_CRL_add0_revoked); | ||
| 547 | 562 | ||
| 548 | int | 563 | int |
| 549 | X509_CRL_verify(X509_CRL *crl, EVP_PKEY *r) | 564 | X509_CRL_verify(X509_CRL *crl, EVP_PKEY *r) |
| @@ -552,6 +567,7 @@ X509_CRL_verify(X509_CRL *crl, EVP_PKEY *r) | |||
| 552 | return crl->meth->crl_verify(crl, r); | 567 | return crl->meth->crl_verify(crl, r); |
| 553 | return 0; | 568 | return 0; |
| 554 | } | 569 | } |
| 570 | LCRYPTO_ALIAS(X509_CRL_verify); | ||
| 555 | 571 | ||
| 556 | int | 572 | int |
| 557 | X509_CRL_get0_by_serial(X509_CRL *crl, X509_REVOKED **ret, | 573 | X509_CRL_get0_by_serial(X509_CRL *crl, X509_REVOKED **ret, |
| @@ -561,6 +577,7 @@ X509_CRL_get0_by_serial(X509_CRL *crl, X509_REVOKED **ret, | |||
| 561 | return crl->meth->crl_lookup(crl, ret, serial, NULL); | 577 | return crl->meth->crl_lookup(crl, ret, serial, NULL); |
| 562 | return 0; | 578 | return 0; |
| 563 | } | 579 | } |
| 580 | LCRYPTO_ALIAS(X509_CRL_get0_by_serial); | ||
| 564 | 581 | ||
| 565 | int | 582 | int |
| 566 | X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x) | 583 | X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x) |
| @@ -570,6 +587,7 @@ X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x) | |||
| 570 | X509_get_serialNumber(x), X509_get_issuer_name(x)); | 587 | X509_get_serialNumber(x), X509_get_issuer_name(x)); |
| 571 | return 0; | 588 | return 0; |
| 572 | } | 589 | } |
| 590 | LCRYPTO_ALIAS(X509_CRL_get0_by_cert); | ||
| 573 | 591 | ||
| 574 | static int | 592 | static int |
| 575 | def_crl_verify(X509_CRL *crl, EVP_PKEY *r) | 593 | def_crl_verify(X509_CRL *crl, EVP_PKEY *r) |
| @@ -648,6 +666,7 @@ X509_CRL_set_default_method(const X509_CRL_METHOD *meth) | |||
| 648 | else | 666 | else |
| 649 | default_crl_method = meth; | 667 | default_crl_method = meth; |
| 650 | } | 668 | } |
| 669 | LCRYPTO_ALIAS(X509_CRL_set_default_method); | ||
| 651 | 670 | ||
| 652 | X509_CRL_METHOD * | 671 | X509_CRL_METHOD * |
| 653 | X509_CRL_METHOD_new(int (*crl_init)(X509_CRL *crl), | 672 | X509_CRL_METHOD_new(int (*crl_init)(X509_CRL *crl), |
| @@ -669,6 +688,7 @@ X509_CRL_METHOD_new(int (*crl_init)(X509_CRL *crl), | |||
| 669 | 688 | ||
| 670 | return m; | 689 | return m; |
| 671 | } | 690 | } |
| 691 | LCRYPTO_ALIAS(X509_CRL_METHOD_new); | ||
| 672 | 692 | ||
| 673 | void | 693 | void |
| 674 | X509_CRL_METHOD_free(X509_CRL_METHOD *m) | 694 | X509_CRL_METHOD_free(X509_CRL_METHOD *m) |
| @@ -679,72 +699,84 @@ X509_CRL_METHOD_free(X509_CRL_METHOD *m) | |||
| 679 | return; | 699 | return; |
| 680 | free(m); | 700 | free(m); |
| 681 | } | 701 | } |
| 702 | LCRYPTO_ALIAS(X509_CRL_METHOD_free); | ||
| 682 | 703 | ||
| 683 | void | 704 | void |
| 684 | X509_CRL_set_meth_data(X509_CRL *crl, void *dat) | 705 | X509_CRL_set_meth_data(X509_CRL *crl, void *dat) |
| 685 | { | 706 | { |
| 686 | crl->meth_data = dat; | 707 | crl->meth_data = dat; |
| 687 | } | 708 | } |
| 709 | LCRYPTO_ALIAS(X509_CRL_set_meth_data); | ||
| 688 | 710 | ||
| 689 | void * | 711 | void * |
| 690 | X509_CRL_get_meth_data(X509_CRL *crl) | 712 | X509_CRL_get_meth_data(X509_CRL *crl) |
| 691 | { | 713 | { |
| 692 | return crl->meth_data; | 714 | return crl->meth_data; |
| 693 | } | 715 | } |
| 716 | LCRYPTO_ALIAS(X509_CRL_get_meth_data); | ||
| 694 | 717 | ||
| 695 | int | 718 | int |
| 696 | X509_CRL_get_signature_nid(const X509_CRL *crl) | 719 | X509_CRL_get_signature_nid(const X509_CRL *crl) |
| 697 | { | 720 | { |
| 698 | return OBJ_obj2nid(crl->sig_alg->algorithm); | 721 | return OBJ_obj2nid(crl->sig_alg->algorithm); |
| 699 | } | 722 | } |
| 723 | LCRYPTO_ALIAS(X509_CRL_get_signature_nid); | ||
| 700 | 724 | ||
| 701 | const STACK_OF(X509_EXTENSION) * | 725 | const STACK_OF(X509_EXTENSION) * |
| 702 | X509_CRL_get0_extensions(const X509_CRL *crl) | 726 | X509_CRL_get0_extensions(const X509_CRL *crl) |
| 703 | { | 727 | { |
| 704 | return crl->crl->extensions; | 728 | return crl->crl->extensions; |
| 705 | } | 729 | } |
| 730 | LCRYPTO_ALIAS(X509_CRL_get0_extensions); | ||
| 706 | 731 | ||
| 707 | long | 732 | long |
| 708 | X509_CRL_get_version(const X509_CRL *crl) | 733 | X509_CRL_get_version(const X509_CRL *crl) |
| 709 | { | 734 | { |
| 710 | return ASN1_INTEGER_get(crl->crl->version); | 735 | return ASN1_INTEGER_get(crl->crl->version); |
| 711 | } | 736 | } |
| 737 | LCRYPTO_ALIAS(X509_CRL_get_version); | ||
| 712 | 738 | ||
| 713 | const ASN1_TIME * | 739 | const ASN1_TIME * |
| 714 | X509_CRL_get0_lastUpdate(const X509_CRL *crl) | 740 | X509_CRL_get0_lastUpdate(const X509_CRL *crl) |
| 715 | { | 741 | { |
| 716 | return crl->crl->lastUpdate; | 742 | return crl->crl->lastUpdate; |
| 717 | } | 743 | } |
| 744 | LCRYPTO_ALIAS(X509_CRL_get0_lastUpdate); | ||
| 718 | 745 | ||
| 719 | ASN1_TIME * | 746 | ASN1_TIME * |
| 720 | X509_CRL_get_lastUpdate(X509_CRL *crl) | 747 | X509_CRL_get_lastUpdate(X509_CRL *crl) |
| 721 | { | 748 | { |
| 722 | return crl->crl->lastUpdate; | 749 | return crl->crl->lastUpdate; |
| 723 | } | 750 | } |
| 751 | LCRYPTO_ALIAS(X509_CRL_get_lastUpdate); | ||
| 724 | 752 | ||
| 725 | const ASN1_TIME * | 753 | const ASN1_TIME * |
| 726 | X509_CRL_get0_nextUpdate(const X509_CRL *crl) | 754 | X509_CRL_get0_nextUpdate(const X509_CRL *crl) |
| 727 | { | 755 | { |
| 728 | return crl->crl->nextUpdate; | 756 | return crl->crl->nextUpdate; |
| 729 | } | 757 | } |
| 758 | LCRYPTO_ALIAS(X509_CRL_get0_nextUpdate); | ||
| 730 | 759 | ||
| 731 | ASN1_TIME * | 760 | ASN1_TIME * |
| 732 | X509_CRL_get_nextUpdate(X509_CRL *crl) | 761 | X509_CRL_get_nextUpdate(X509_CRL *crl) |
| 733 | { | 762 | { |
| 734 | return crl->crl->nextUpdate; | 763 | return crl->crl->nextUpdate; |
| 735 | } | 764 | } |
| 765 | LCRYPTO_ALIAS(X509_CRL_get_nextUpdate); | ||
| 736 | 766 | ||
| 737 | X509_NAME * | 767 | X509_NAME * |
| 738 | X509_CRL_get_issuer(const X509_CRL *crl) | 768 | X509_CRL_get_issuer(const X509_CRL *crl) |
| 739 | { | 769 | { |
| 740 | return crl->crl->issuer; | 770 | return crl->crl->issuer; |
| 741 | } | 771 | } |
| 772 | LCRYPTO_ALIAS(X509_CRL_get_issuer); | ||
| 742 | 773 | ||
| 743 | STACK_OF(X509_REVOKED) * | 774 | STACK_OF(X509_REVOKED) * |
| 744 | X509_CRL_get_REVOKED(X509_CRL *crl) | 775 | X509_CRL_get_REVOKED(X509_CRL *crl) |
| 745 | { | 776 | { |
| 746 | return crl->crl->revoked; | 777 | return crl->crl->revoked; |
| 747 | } | 778 | } |
| 779 | LCRYPTO_ALIAS(X509_CRL_get_REVOKED); | ||
| 748 | 780 | ||
| 749 | void | 781 | void |
| 750 | X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, | 782 | X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, |
| @@ -755,9 +787,11 @@ X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, | |||
| 755 | if (palg != NULL) | 787 | if (palg != NULL) |
| 756 | *palg = crl->sig_alg; | 788 | *palg = crl->sig_alg; |
| 757 | } | 789 | } |
| 790 | LCRYPTO_ALIAS(X509_CRL_get0_signature); | ||
| 758 | 791 | ||
| 759 | const X509_ALGOR * | 792 | const X509_ALGOR * |
| 760 | X509_CRL_get0_tbs_sigalg(const X509_CRL *crl) | 793 | X509_CRL_get0_tbs_sigalg(const X509_CRL *crl) |
| 761 | { | 794 | { |
| 762 | return crl->crl->sig_alg; | 795 | return crl->crl->sig_alg; |
| 763 | } | 796 | } |
| 797 | LCRYPTO_ALIAS(X509_CRL_get0_tbs_sigalg); | ||
