diff options
Diffstat (limited to 'src')
24 files changed, 546 insertions, 19 deletions
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index 6c25ed87cf..617fc06b13 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
| @@ -1876,3 +1876,140 @@ _libre_CTLOG_STORE_free | |||
| 1876 | _libre_CTLOG_STORE_get0_log_by_id | 1876 | _libre_CTLOG_STORE_get0_log_by_id |
| 1877 | _libre_CTLOG_STORE_load_file | 1877 | _libre_CTLOG_STORE_load_file |
| 1878 | _libre_CTLOG_STORE_load_default_file | 1878 | _libre_CTLOG_STORE_load_default_file |
| 1879 | _libre__CONF_new_section | ||
| 1880 | _libre__CONF_get_section | ||
| 1881 | _libre__CONF_get_section_values | ||
| 1882 | _libre__CONF_add_string | ||
| 1883 | _libre__CONF_get_string | ||
| 1884 | _libre__CONF_new_data | ||
| 1885 | _libre__CONF_free_data | ||
| 1886 | _libre_COMP_CTX_new | ||
| 1887 | _libre_COMP_CTX_free | ||
| 1888 | _libre_COMP_compress_block | ||
| 1889 | _libre_COMP_expand_block | ||
| 1890 | _libre_COMP_rle | ||
| 1891 | _libre_COMP_zlib | ||
| 1892 | _libre_COMP_zlib_cleanup | ||
| 1893 | _libre_ERR_load_COMP_strings | ||
| 1894 | _libre_CMS_ContentInfo_new | ||
| 1895 | _libre_CMS_ContentInfo_free | ||
| 1896 | _libre_d2i_CMS_ContentInfo | ||
| 1897 | _libre_i2d_CMS_ContentInfo | ||
| 1898 | _libre_CMS_ReceiptRequest_new | ||
| 1899 | _libre_CMS_ReceiptRequest_free | ||
| 1900 | _libre_d2i_CMS_ReceiptRequest | ||
| 1901 | _libre_i2d_CMS_ReceiptRequest | ||
| 1902 | _libre_CMS_ContentInfo_print_ctx | ||
| 1903 | _libre_CMS_get0_type | ||
| 1904 | _libre_CMS_dataInit | ||
| 1905 | _libre_CMS_dataFinal | ||
| 1906 | _libre_CMS_is_detached | ||
| 1907 | _libre_CMS_set_detached | ||
| 1908 | _libre_CMS_stream | ||
| 1909 | _libre_d2i_CMS_bio | ||
| 1910 | _libre_i2d_CMS_bio | ||
| 1911 | _libre_BIO_new_CMS | ||
| 1912 | _libre_i2d_CMS_bio_stream | ||
| 1913 | _libre_PEM_write_bio_CMS_stream | ||
| 1914 | _libre_SMIME_read_CMS | ||
| 1915 | _libre_SMIME_write_CMS | ||
| 1916 | _libre_CMS_final | ||
| 1917 | _libre_CMS_sign | ||
| 1918 | _libre_CMS_sign_receipt | ||
| 1919 | _libre_CMS_data | ||
| 1920 | _libre_CMS_data_create | ||
| 1921 | _libre_CMS_digest_verify | ||
| 1922 | _libre_CMS_digest_create | ||
| 1923 | _libre_CMS_EncryptedData_decrypt | ||
| 1924 | _libre_CMS_EncryptedData_encrypt | ||
| 1925 | _libre_CMS_EncryptedData_set1_key | ||
| 1926 | _libre_CMS_verify | ||
| 1927 | _libre_CMS_verify_receipt | ||
| 1928 | _libre_CMS_get0_signers | ||
| 1929 | _libre_CMS_encrypt | ||
| 1930 | _libre_CMS_decrypt | ||
| 1931 | _libre_CMS_decrypt_set1_pkey | ||
| 1932 | _libre_CMS_decrypt_set1_key | ||
| 1933 | _libre_CMS_decrypt_set1_password | ||
| 1934 | _libre_CMS_get0_RecipientInfos | ||
| 1935 | _libre_CMS_RecipientInfo_type | ||
| 1936 | _libre_CMS_RecipientInfo_get0_pkey_ctx | ||
| 1937 | _libre_CMS_EnvelopedData_create | ||
| 1938 | _libre_CMS_add1_recipient_cert | ||
| 1939 | _libre_CMS_RecipientInfo_set0_pkey | ||
| 1940 | _libre_CMS_RecipientInfo_ktri_cert_cmp | ||
| 1941 | _libre_CMS_RecipientInfo_ktri_get0_algs | ||
| 1942 | _libre_CMS_RecipientInfo_ktri_get0_signer_id | ||
| 1943 | _libre_CMS_add0_recipient_key | ||
| 1944 | _libre_CMS_RecipientInfo_kekri_get0_id | ||
| 1945 | _libre_CMS_RecipientInfo_set0_key | ||
| 1946 | _libre_CMS_RecipientInfo_kekri_id_cmp | ||
| 1947 | _libre_CMS_RecipientInfo_set0_password | ||
| 1948 | _libre_CMS_add0_recipient_password | ||
| 1949 | _libre_CMS_RecipientInfo_decrypt | ||
| 1950 | _libre_CMS_RecipientInfo_encrypt | ||
| 1951 | _libre_CMS_uncompress | ||
| 1952 | _libre_CMS_compress | ||
| 1953 | _libre_CMS_set1_eContentType | ||
| 1954 | _libre_CMS_get0_eContentType | ||
| 1955 | _libre_CMS_add0_CertificateChoices | ||
| 1956 | _libre_CMS_add0_cert | ||
| 1957 | _libre_CMS_add1_cert | ||
| 1958 | _libre_CMS_get1_certs | ||
| 1959 | _libre_CMS_add0_RevocationInfoChoice | ||
| 1960 | _libre_CMS_add0_crl | ||
| 1961 | _libre_CMS_add1_crl | ||
| 1962 | _libre_CMS_get1_crls | ||
| 1963 | _libre_CMS_SignedData_init | ||
| 1964 | _libre_CMS_add1_signer | ||
| 1965 | _libre_CMS_SignerInfo_get0_pkey_ctx | ||
| 1966 | _libre_CMS_SignerInfo_get0_md_ctx | ||
| 1967 | _libre_CMS_get0_SignerInfos | ||
| 1968 | _libre_CMS_SignerInfo_set1_signer_cert | ||
| 1969 | _libre_CMS_SignerInfo_get0_signer_id | ||
| 1970 | _libre_CMS_SignerInfo_cert_cmp | ||
| 1971 | _libre_CMS_set1_signers_certs | ||
| 1972 | _libre_CMS_SignerInfo_get0_algs | ||
| 1973 | _libre_CMS_SignerInfo_get0_signature | ||
| 1974 | _libre_CMS_SignerInfo_sign | ||
| 1975 | _libre_CMS_SignerInfo_verify | ||
| 1976 | _libre_CMS_SignerInfo_verify_content | ||
| 1977 | _libre_CMS_add_smimecap | ||
| 1978 | _libre_CMS_add_simple_smimecap | ||
| 1979 | _libre_CMS_add_standard_smimecap | ||
| 1980 | _libre_CMS_signed_get_attr_count | ||
| 1981 | _libre_CMS_signed_get_attr_by_NID | ||
| 1982 | _libre_CMS_signed_get_attr_by_OBJ | ||
| 1983 | _libre_CMS_signed_get_attr | ||
| 1984 | _libre_CMS_signed_delete_attr | ||
| 1985 | _libre_CMS_signed_add1_attr | ||
| 1986 | _libre_CMS_signed_add1_attr_by_OBJ | ||
| 1987 | _libre_CMS_signed_add1_attr_by_NID | ||
| 1988 | _libre_CMS_signed_add1_attr_by_txt | ||
| 1989 | _libre_CMS_signed_get0_data_by_OBJ | ||
| 1990 | _libre_CMS_unsigned_get_attr_count | ||
| 1991 | _libre_CMS_unsigned_get_attr_by_NID | ||
| 1992 | _libre_CMS_unsigned_get_attr_by_OBJ | ||
| 1993 | _libre_CMS_unsigned_get_attr | ||
| 1994 | _libre_CMS_unsigned_delete_attr | ||
| 1995 | _libre_CMS_unsigned_add1_attr | ||
| 1996 | _libre_CMS_unsigned_add1_attr_by_OBJ | ||
| 1997 | _libre_CMS_unsigned_add1_attr_by_NID | ||
| 1998 | _libre_CMS_unsigned_add1_attr_by_txt | ||
| 1999 | _libre_CMS_unsigned_get0_data_by_OBJ | ||
| 2000 | _libre_CMS_RecipientInfo_kari_get0_alg | ||
| 2001 | _libre_CMS_RecipientInfo_kari_get0_reks | ||
| 2002 | _libre_CMS_RecipientInfo_kari_get0_orig_id | ||
| 2003 | _libre_CMS_RecipientInfo_kari_orig_id_cmp | ||
| 2004 | _libre_CMS_RecipientEncryptedKey_get0_id | ||
| 2005 | _libre_CMS_RecipientEncryptedKey_cert_cmp | ||
| 2006 | _libre_CMS_RecipientInfo_kari_set0_pkey | ||
| 2007 | _libre_CMS_RecipientInfo_kari_get0_ctx | ||
| 2008 | _libre_CMS_RecipientInfo_kari_decrypt | ||
| 2009 | _libre_CMS_SharedInfo_encode | ||
| 2010 | _libre_ERR_load_CMS_strings | ||
| 2011 | _libre_BUF_MEM_new | ||
| 2012 | _libre_BUF_MEM_free | ||
| 2013 | _libre_BUF_MEM_grow | ||
| 2014 | _libre_BUF_MEM_grow_clean | ||
| 2015 | _libre_ERR_load_BUF_strings | ||
diff --git a/src/lib/libcrypto/buffer/buf_err.c b/src/lib/libcrypto/buffer/buf_err.c index 4dc1dca790..3b045cf589 100644 --- a/src/lib/libcrypto/buffer/buf_err.c +++ b/src/lib/libcrypto/buffer/buf_err.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: buf_err.c,v 1.12 2022/07/12 14:42:48 kn Exp $ */ | 1 | /* $OpenBSD: buf_err.c,v 1.13 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -86,3 +86,4 @@ ERR_load_BUF_strings(void) | |||
| 86 | } | 86 | } |
| 87 | #endif | 87 | #endif |
| 88 | } | 88 | } |
| 89 | LCRYPTO_ALIAS(ERR_load_BUF_strings); | ||
diff --git a/src/lib/libcrypto/buffer/buffer.c b/src/lib/libcrypto/buffer/buffer.c index f4e84c4478..51ce90ff80 100644 --- a/src/lib/libcrypto/buffer/buffer.c +++ b/src/lib/libcrypto/buffer/buffer.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: buffer.c,v 1.27 2017/05/02 03:59:44 deraadt Exp $ */ | 1 | /* $OpenBSD: buffer.c,v 1.28 2023/07/08 08:26:26 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 | * |
| @@ -82,6 +82,7 @@ BUF_MEM_new(void) | |||
| 82 | 82 | ||
| 83 | return (ret); | 83 | return (ret); |
| 84 | } | 84 | } |
| 85 | LCRYPTO_ALIAS(BUF_MEM_new); | ||
| 85 | 86 | ||
| 86 | void | 87 | void |
| 87 | BUF_MEM_free(BUF_MEM *a) | 88 | BUF_MEM_free(BUF_MEM *a) |
| @@ -92,12 +93,14 @@ BUF_MEM_free(BUF_MEM *a) | |||
| 92 | freezero(a->data, a->max); | 93 | freezero(a->data, a->max); |
| 93 | free(a); | 94 | free(a); |
| 94 | } | 95 | } |
| 96 | LCRYPTO_ALIAS(BUF_MEM_free); | ||
| 95 | 97 | ||
| 96 | int | 98 | int |
| 97 | BUF_MEM_grow(BUF_MEM *str, size_t len) | 99 | BUF_MEM_grow(BUF_MEM *str, size_t len) |
| 98 | { | 100 | { |
| 99 | return BUF_MEM_grow_clean(str, len); | 101 | return BUF_MEM_grow_clean(str, len); |
| 100 | } | 102 | } |
| 103 | LCRYPTO_ALIAS(BUF_MEM_grow); | ||
| 101 | 104 | ||
| 102 | int | 105 | int |
| 103 | BUF_MEM_grow_clean(BUF_MEM *str, size_t len) | 106 | BUF_MEM_grow_clean(BUF_MEM *str, size_t len) |
| @@ -128,6 +131,7 @@ BUF_MEM_grow_clean(BUF_MEM *str, size_t len) | |||
| 128 | 131 | ||
| 129 | return (len); | 132 | return (len); |
| 130 | } | 133 | } |
| 134 | LCRYPTO_ALIAS(BUF_MEM_grow_clean); | ||
| 131 | 135 | ||
| 132 | void | 136 | void |
| 133 | BUF_reverse(unsigned char *out, const unsigned char *in, size_t size) | 137 | BUF_reverse(unsigned char *out, const unsigned char *in, size_t size) |
diff --git a/src/lib/libcrypto/cms/cms_asn1.c b/src/lib/libcrypto/cms/cms_asn1.c index 7948a3c39e..531b8c587d 100644 --- a/src/lib/libcrypto/cms/cms_asn1.c +++ b/src/lib/libcrypto/cms/cms_asn1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_asn1.c,v 1.22 2023/05/23 06:55:31 tb Exp $ */ | 1 | /* $OpenBSD: cms_asn1.c,v 1.23 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -1619,3 +1619,4 @@ CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg, | |||
| 1619 | 1619 | ||
| 1620 | return ASN1_item_i2d(intsi.a, pder, &CMS_SharedInfo_it); | 1620 | return ASN1_item_i2d(intsi.a, pder, &CMS_SharedInfo_it); |
| 1621 | } | 1621 | } |
| 1622 | LCRYPTO_ALIAS(CMS_SharedInfo_encode); | ||
diff --git a/src/lib/libcrypto/cms/cms_att.c b/src/lib/libcrypto/cms/cms_att.c index 0fb077f7d9..62362ad3f9 100644 --- a/src/lib/libcrypto/cms/cms_att.c +++ b/src/lib/libcrypto/cms/cms_att.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_att.c,v 1.10 2022/11/26 16:08:51 tb Exp $ */ | 1 | /* $OpenBSD: cms_att.c,v 1.11 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -66,12 +66,14 @@ CMS_signed_get_attr_count(const CMS_SignerInfo *si) | |||
| 66 | { | 66 | { |
| 67 | return X509at_get_attr_count(si->signedAttrs); | 67 | return X509at_get_attr_count(si->signedAttrs); |
| 68 | } | 68 | } |
| 69 | LCRYPTO_ALIAS(CMS_signed_get_attr_count); | ||
| 69 | 70 | ||
| 70 | int | 71 | int |
| 71 | CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos) | 72 | CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos) |
| 72 | { | 73 | { |
| 73 | return X509at_get_attr_by_NID(si->signedAttrs, nid, lastpos); | 74 | return X509at_get_attr_by_NID(si->signedAttrs, nid, lastpos); |
| 74 | } | 75 | } |
| 76 | LCRYPTO_ALIAS(CMS_signed_get_attr_by_NID); | ||
| 75 | 77 | ||
| 76 | int | 78 | int |
| 77 | CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, | 79 | CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, |
| @@ -79,18 +81,21 @@ CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, | |||
| 79 | { | 81 | { |
| 80 | return X509at_get_attr_by_OBJ(si->signedAttrs, obj, lastpos); | 82 | return X509at_get_attr_by_OBJ(si->signedAttrs, obj, lastpos); |
| 81 | } | 83 | } |
| 84 | LCRYPTO_ALIAS(CMS_signed_get_attr_by_OBJ); | ||
| 82 | 85 | ||
| 83 | X509_ATTRIBUTE * | 86 | X509_ATTRIBUTE * |
| 84 | CMS_signed_get_attr(const CMS_SignerInfo *si, int loc) | 87 | CMS_signed_get_attr(const CMS_SignerInfo *si, int loc) |
| 85 | { | 88 | { |
| 86 | return X509at_get_attr(si->signedAttrs, loc); | 89 | return X509at_get_attr(si->signedAttrs, loc); |
| 87 | } | 90 | } |
| 91 | LCRYPTO_ALIAS(CMS_signed_get_attr); | ||
| 88 | 92 | ||
| 89 | X509_ATTRIBUTE * | 93 | X509_ATTRIBUTE * |
| 90 | CMS_signed_delete_attr(CMS_SignerInfo *si, int loc) | 94 | CMS_signed_delete_attr(CMS_SignerInfo *si, int loc) |
| 91 | { | 95 | { |
| 92 | return X509at_delete_attr(si->signedAttrs, loc); | 96 | return X509at_delete_attr(si->signedAttrs, loc); |
| 93 | } | 97 | } |
| 98 | LCRYPTO_ALIAS(CMS_signed_delete_attr); | ||
| 94 | 99 | ||
| 95 | int | 100 | int |
| 96 | CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr) | 101 | CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr) |
| @@ -99,6 +104,7 @@ CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr) | |||
| 99 | return 1; | 104 | return 1; |
| 100 | return 0; | 105 | return 0; |
| 101 | } | 106 | } |
| 107 | LCRYPTO_ALIAS(CMS_signed_add1_attr); | ||
| 102 | 108 | ||
| 103 | int | 109 | int |
| 104 | CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, int type, | 110 | CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, int type, |
| @@ -108,6 +114,7 @@ CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, int type | |||
| 108 | return 1; | 114 | return 1; |
| 109 | return 0; | 115 | return 0; |
| 110 | } | 116 | } |
| 117 | LCRYPTO_ALIAS(CMS_signed_add1_attr_by_OBJ); | ||
| 111 | 118 | ||
| 112 | int | 119 | int |
| 113 | CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, | 120 | CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, |
| @@ -117,6 +124,7 @@ CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, | |||
| 117 | return 1; | 124 | return 1; |
| 118 | return 0; | 125 | return 0; |
| 119 | } | 126 | } |
| 127 | LCRYPTO_ALIAS(CMS_signed_add1_attr_by_NID); | ||
| 120 | 128 | ||
| 121 | int | 129 | int |
| 122 | CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, int type, | 130 | CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, int type, |
| @@ -126,6 +134,7 @@ CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, int type, | |||
| 126 | return 1; | 134 | return 1; |
| 127 | return 0; | 135 | return 0; |
| 128 | } | 136 | } |
| 137 | LCRYPTO_ALIAS(CMS_signed_add1_attr_by_txt); | ||
| 129 | 138 | ||
| 130 | void * | 139 | void * |
| 131 | CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid, | 140 | CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid, |
| @@ -133,18 +142,21 @@ CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid, | |||
| 133 | { | 142 | { |
| 134 | return X509at_get0_data_by_OBJ(si->signedAttrs, oid, lastpos, type); | 143 | return X509at_get0_data_by_OBJ(si->signedAttrs, oid, lastpos, type); |
| 135 | } | 144 | } |
| 145 | LCRYPTO_ALIAS(CMS_signed_get0_data_by_OBJ); | ||
| 136 | 146 | ||
| 137 | int | 147 | int |
| 138 | CMS_unsigned_get_attr_count(const CMS_SignerInfo *si) | 148 | CMS_unsigned_get_attr_count(const CMS_SignerInfo *si) |
| 139 | { | 149 | { |
| 140 | return X509at_get_attr_count(si->unsignedAttrs); | 150 | return X509at_get_attr_count(si->unsignedAttrs); |
| 141 | } | 151 | } |
| 152 | LCRYPTO_ALIAS(CMS_unsigned_get_attr_count); | ||
| 142 | 153 | ||
| 143 | int | 154 | int |
| 144 | CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos) | 155 | CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos) |
| 145 | { | 156 | { |
| 146 | return X509at_get_attr_by_NID(si->unsignedAttrs, nid, lastpos); | 157 | return X509at_get_attr_by_NID(si->unsignedAttrs, nid, lastpos); |
| 147 | } | 158 | } |
| 159 | LCRYPTO_ALIAS(CMS_unsigned_get_attr_by_NID); | ||
| 148 | 160 | ||
| 149 | int | 161 | int |
| 150 | CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, | 162 | CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, |
| @@ -152,18 +164,21 @@ CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, | |||
| 152 | { | 164 | { |
| 153 | return X509at_get_attr_by_OBJ(si->unsignedAttrs, obj, lastpos); | 165 | return X509at_get_attr_by_OBJ(si->unsignedAttrs, obj, lastpos); |
| 154 | } | 166 | } |
| 167 | LCRYPTO_ALIAS(CMS_unsigned_get_attr_by_OBJ); | ||
| 155 | 168 | ||
| 156 | X509_ATTRIBUTE * | 169 | X509_ATTRIBUTE * |
| 157 | CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc) | 170 | CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc) |
| 158 | { | 171 | { |
| 159 | return X509at_get_attr(si->unsignedAttrs, loc); | 172 | return X509at_get_attr(si->unsignedAttrs, loc); |
| 160 | } | 173 | } |
| 174 | LCRYPTO_ALIAS(CMS_unsigned_get_attr); | ||
| 161 | 175 | ||
| 162 | X509_ATTRIBUTE * | 176 | X509_ATTRIBUTE * |
| 163 | CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc) | 177 | CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc) |
| 164 | { | 178 | { |
| 165 | return X509at_delete_attr(si->unsignedAttrs, loc); | 179 | return X509at_delete_attr(si->unsignedAttrs, loc); |
| 166 | } | 180 | } |
| 181 | LCRYPTO_ALIAS(CMS_unsigned_delete_attr); | ||
| 167 | 182 | ||
| 168 | int | 183 | int |
| 169 | CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr) | 184 | CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr) |
| @@ -172,6 +187,7 @@ CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr) | |||
| 172 | return 1; | 187 | return 1; |
| 173 | return 0; | 188 | return 0; |
| 174 | } | 189 | } |
| 190 | LCRYPTO_ALIAS(CMS_unsigned_add1_attr); | ||
| 175 | 191 | ||
| 176 | int | 192 | int |
| 177 | CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, | 193 | CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, |
| @@ -181,6 +197,7 @@ CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, | |||
| 181 | return 1; | 197 | return 1; |
| 182 | return 0; | 198 | return 0; |
| 183 | } | 199 | } |
| 200 | LCRYPTO_ALIAS(CMS_unsigned_add1_attr_by_OBJ); | ||
| 184 | 201 | ||
| 185 | int | 202 | int |
| 186 | CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, | 203 | CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, |
| @@ -190,6 +207,7 @@ CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, | |||
| 190 | return 1; | 207 | return 1; |
| 191 | return 0; | 208 | return 0; |
| 192 | } | 209 | } |
| 210 | LCRYPTO_ALIAS(CMS_unsigned_add1_attr_by_NID); | ||
| 193 | 211 | ||
| 194 | int | 212 | int |
| 195 | CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, | 213 | CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, |
| @@ -200,6 +218,7 @@ CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, | |||
| 200 | return 1; | 218 | return 1; |
| 201 | return 0; | 219 | return 0; |
| 202 | } | 220 | } |
| 221 | LCRYPTO_ALIAS(CMS_unsigned_add1_attr_by_txt); | ||
| 203 | 222 | ||
| 204 | void * | 223 | void * |
| 205 | CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, int lastpos, | 224 | CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, int lastpos, |
| @@ -207,5 +226,6 @@ CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, int lastpos, | |||
| 207 | { | 226 | { |
| 208 | return X509at_get0_data_by_OBJ(si->unsignedAttrs, oid, lastpos, type); | 227 | return X509at_get0_data_by_OBJ(si->unsignedAttrs, oid, lastpos, type); |
| 209 | } | 228 | } |
| 229 | LCRYPTO_ALIAS(CMS_unsigned_get0_data_by_OBJ); | ||
| 210 | 230 | ||
| 211 | /* Specific attribute cases */ | 231 | /* Specific attribute cases */ |
diff --git a/src/lib/libcrypto/cms/cms_enc.c b/src/lib/libcrypto/cms/cms_enc.c index 06dffcbed4..547f9ff743 100644 --- a/src/lib/libcrypto/cms/cms_enc.c +++ b/src/lib/libcrypto/cms/cms_enc.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_enc.c,v 1.22 2022/11/26 16:08:51 tb Exp $ */ | 1 | /* $OpenBSD: cms_enc.c,v 1.23 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -249,6 +249,7 @@ CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, | |||
| 249 | 249 | ||
| 250 | return cms_EncryptedContent_init(ec, ciph, key, keylen); | 250 | return cms_EncryptedContent_init(ec, ciph, key, keylen); |
| 251 | } | 251 | } |
| 252 | LCRYPTO_ALIAS(CMS_EncryptedData_set1_key); | ||
| 252 | 253 | ||
| 253 | BIO * | 254 | BIO * |
| 254 | cms_EncryptedData_init_bio(CMS_ContentInfo *cms) | 255 | cms_EncryptedData_init_bio(CMS_ContentInfo *cms) |
diff --git a/src/lib/libcrypto/cms/cms_env.c b/src/lib/libcrypto/cms/cms_env.c index 1d534e3da5..7bb8f613a8 100644 --- a/src/lib/libcrypto/cms/cms_env.c +++ b/src/lib/libcrypto/cms/cms_env.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_env.c,v 1.25 2022/11/26 16:08:51 tb Exp $ */ | 1 | /* $OpenBSD: cms_env.c,v 1.26 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -139,12 +139,14 @@ CMS_get0_RecipientInfos(CMS_ContentInfo *cms) | |||
| 139 | 139 | ||
| 140 | return env->recipientInfos; | 140 | return env->recipientInfos; |
| 141 | } | 141 | } |
| 142 | LCRYPTO_ALIAS(CMS_get0_RecipientInfos); | ||
| 142 | 143 | ||
| 143 | int | 144 | int |
| 144 | CMS_RecipientInfo_type(CMS_RecipientInfo *ri) | 145 | CMS_RecipientInfo_type(CMS_RecipientInfo *ri) |
| 145 | { | 146 | { |
| 146 | return ri->type; | 147 | return ri->type; |
| 147 | } | 148 | } |
| 149 | LCRYPTO_ALIAS(CMS_RecipientInfo_type); | ||
| 148 | 150 | ||
| 149 | EVP_PKEY_CTX * | 151 | EVP_PKEY_CTX * |
| 150 | CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri) | 152 | CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri) |
| @@ -156,6 +158,7 @@ CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri) | |||
| 156 | 158 | ||
| 157 | return NULL; | 159 | return NULL; |
| 158 | } | 160 | } |
| 161 | LCRYPTO_ALIAS(CMS_RecipientInfo_get0_pkey_ctx); | ||
| 159 | 162 | ||
| 160 | CMS_ContentInfo * | 163 | CMS_ContentInfo * |
| 161 | CMS_EnvelopedData_create(const EVP_CIPHER *cipher) | 164 | CMS_EnvelopedData_create(const EVP_CIPHER *cipher) |
| @@ -180,6 +183,7 @@ CMS_EnvelopedData_create(const EVP_CIPHER *cipher) | |||
| 180 | CMSerror(ERR_R_MALLOC_FAILURE); | 183 | CMSerror(ERR_R_MALLOC_FAILURE); |
| 181 | return NULL; | 184 | return NULL; |
| 182 | } | 185 | } |
| 186 | LCRYPTO_ALIAS(CMS_EnvelopedData_create); | ||
| 183 | 187 | ||
| 184 | /* Key Transport Recipient Info (KTRI) routines */ | 188 | /* Key Transport Recipient Info (KTRI) routines */ |
| 185 | 189 | ||
| @@ -288,6 +292,7 @@ CMS_add1_recipient_cert(CMS_ContentInfo *cms, X509 *recip, unsigned int flags) | |||
| 288 | ASN1_item_free((ASN1_VALUE *)ri, &CMS_RecipientInfo_it); | 292 | ASN1_item_free((ASN1_VALUE *)ri, &CMS_RecipientInfo_it); |
| 289 | return NULL; | 293 | return NULL; |
| 290 | } | 294 | } |
| 295 | LCRYPTO_ALIAS(CMS_add1_recipient_cert); | ||
| 291 | 296 | ||
| 292 | int | 297 | int |
| 293 | CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri, EVP_PKEY **pk, | 298 | CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri, EVP_PKEY **pk, |
| @@ -311,6 +316,7 @@ CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri, EVP_PKEY **pk, | |||
| 311 | 316 | ||
| 312 | return 1; | 317 | return 1; |
| 313 | } | 318 | } |
| 319 | LCRYPTO_ALIAS(CMS_RecipientInfo_ktri_get0_algs); | ||
| 314 | 320 | ||
| 315 | int | 321 | int |
| 316 | CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, | 322 | CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, |
| @@ -326,6 +332,7 @@ CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, | |||
| 326 | 332 | ||
| 327 | return cms_SignerIdentifier_get0_signer_id(ktri->rid, keyid, issuer, sno); | 333 | return cms_SignerIdentifier_get0_signer_id(ktri->rid, keyid, issuer, sno); |
| 328 | } | 334 | } |
| 335 | LCRYPTO_ALIAS(CMS_RecipientInfo_ktri_get0_signer_id); | ||
| 329 | 336 | ||
| 330 | int | 337 | int |
| 331 | CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert) | 338 | CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert) |
| @@ -337,6 +344,7 @@ CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert) | |||
| 337 | 344 | ||
| 338 | return cms_SignerIdentifier_cert_cmp(ri->d.ktri->rid, cert); | 345 | return cms_SignerIdentifier_cert_cmp(ri->d.ktri->rid, cert); |
| 339 | } | 346 | } |
| 347 | LCRYPTO_ALIAS(CMS_RecipientInfo_ktri_cert_cmp); | ||
| 340 | 348 | ||
| 341 | int | 349 | int |
| 342 | CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey) | 350 | CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey) |
| @@ -350,6 +358,7 @@ CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey) | |||
| 350 | 358 | ||
| 351 | return 1; | 359 | return 1; |
| 352 | } | 360 | } |
| 361 | LCRYPTO_ALIAS(CMS_RecipientInfo_set0_pkey); | ||
| 353 | 362 | ||
| 354 | /* Encrypt content key in key transport recipient info */ | 363 | /* Encrypt content key in key transport recipient info */ |
| 355 | 364 | ||
| @@ -522,6 +531,7 @@ CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri, const unsigned char *id, | |||
| 522 | 531 | ||
| 523 | return ASN1_OCTET_STRING_cmp(&tmp_os, kekri->kekid->keyIdentifier); | 532 | return ASN1_OCTET_STRING_cmp(&tmp_os, kekri->kekid->keyIdentifier); |
| 524 | } | 533 | } |
| 534 | LCRYPTO_ALIAS(CMS_RecipientInfo_kekri_id_cmp); | ||
| 525 | 535 | ||
| 526 | /* For now hard code AES key wrap info */ | 536 | /* For now hard code AES key wrap info */ |
| 527 | 537 | ||
| @@ -639,6 +649,7 @@ CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid, unsigned char *key, | |||
| 639 | ASN1_item_free((ASN1_VALUE *)ri, &CMS_RecipientInfo_it); | 649 | ASN1_item_free((ASN1_VALUE *)ri, &CMS_RecipientInfo_it); |
| 640 | return NULL; | 650 | return NULL; |
| 641 | } | 651 | } |
| 652 | LCRYPTO_ALIAS(CMS_add0_recipient_key); | ||
| 642 | 653 | ||
| 643 | int | 654 | int |
| 644 | CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, X509_ALGOR **palg, | 655 | CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, X509_ALGOR **palg, |
| @@ -673,6 +684,7 @@ CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, X509_ALGOR **palg, | |||
| 673 | 684 | ||
| 674 | return 1; | 685 | return 1; |
| 675 | } | 686 | } |
| 687 | LCRYPTO_ALIAS(CMS_RecipientInfo_kekri_get0_id); | ||
| 676 | 688 | ||
| 677 | int | 689 | int |
| 678 | CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, unsigned char *key, | 690 | CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, unsigned char *key, |
| @@ -690,6 +702,7 @@ CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, unsigned char *key, | |||
| 690 | kekri->keylen = keylen; | 702 | kekri->keylen = keylen; |
| 691 | return 1; | 703 | return 1; |
| 692 | } | 704 | } |
| 705 | LCRYPTO_ALIAS(CMS_RecipientInfo_set0_key); | ||
| 693 | 706 | ||
| 694 | /* Encrypt content key in KEK recipient info */ | 707 | /* Encrypt content key in KEK recipient info */ |
| 695 | 708 | ||
| @@ -825,6 +838,7 @@ CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri) | |||
| 825 | return 0; | 838 | return 0; |
| 826 | } | 839 | } |
| 827 | } | 840 | } |
| 841 | LCRYPTO_ALIAS(CMS_RecipientInfo_decrypt); | ||
| 828 | 842 | ||
| 829 | int | 843 | int |
| 830 | CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri) | 844 | CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri) |
| @@ -847,6 +861,7 @@ CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri) | |||
| 847 | return 0; | 861 | return 0; |
| 848 | } | 862 | } |
| 849 | } | 863 | } |
| 864 | LCRYPTO_ALIAS(CMS_RecipientInfo_encrypt); | ||
| 850 | 865 | ||
| 851 | /* Check structures and fixup version numbers (if necessary) */ | 866 | /* Check structures and fixup version numbers (if necessary) */ |
| 852 | 867 | ||
diff --git a/src/lib/libcrypto/cms/cms_err.c b/src/lib/libcrypto/cms/cms_err.c index 07869ff986..5758a26db5 100644 --- a/src/lib/libcrypto/cms/cms_err.c +++ b/src/lib/libcrypto/cms/cms_err.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_err.c,v 1.13 2022/07/12 14:42:48 kn Exp $ */ | 1 | /* $OpenBSD: cms_err.c,v 1.14 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. | 3 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. |
| 4 | * | 4 | * |
| @@ -161,3 +161,4 @@ ERR_load_CMS_strings(void) | |||
| 161 | #endif | 161 | #endif |
| 162 | return 1; | 162 | return 1; |
| 163 | } | 163 | } |
| 164 | LCRYPTO_ALIAS(ERR_load_CMS_strings); | ||
diff --git a/src/lib/libcrypto/cms/cms_ess.c b/src/lib/libcrypto/cms/cms_ess.c index 88ea6e96f6..b9a4cd8afb 100644 --- a/src/lib/libcrypto/cms/cms_ess.c +++ b/src/lib/libcrypto/cms/cms_ess.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_ess.c,v 1.22 2022/11/26 16:08:51 tb Exp $ */ | 1 | /* $OpenBSD: cms_ess.c,v 1.23 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -70,24 +70,28 @@ d2i_CMS_ReceiptRequest(CMS_ReceiptRequest **a, const unsigned char **in, long le | |||
| 70 | return (CMS_ReceiptRequest *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 70 | return (CMS_ReceiptRequest *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
| 71 | &CMS_ReceiptRequest_it); | 71 | &CMS_ReceiptRequest_it); |
| 72 | } | 72 | } |
| 73 | LCRYPTO_ALIAS(d2i_CMS_ReceiptRequest); | ||
| 73 | 74 | ||
| 74 | int | 75 | int |
| 75 | i2d_CMS_ReceiptRequest(CMS_ReceiptRequest *a, unsigned char **out) | 76 | i2d_CMS_ReceiptRequest(CMS_ReceiptRequest *a, unsigned char **out) |
| 76 | { | 77 | { |
| 77 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &CMS_ReceiptRequest_it); | 78 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &CMS_ReceiptRequest_it); |
| 78 | } | 79 | } |
| 80 | LCRYPTO_ALIAS(i2d_CMS_ReceiptRequest); | ||
| 79 | 81 | ||
| 80 | CMS_ReceiptRequest * | 82 | CMS_ReceiptRequest * |
| 81 | CMS_ReceiptRequest_new(void) | 83 | CMS_ReceiptRequest_new(void) |
| 82 | { | 84 | { |
| 83 | return (CMS_ReceiptRequest *)ASN1_item_new(&CMS_ReceiptRequest_it); | 85 | return (CMS_ReceiptRequest *)ASN1_item_new(&CMS_ReceiptRequest_it); |
| 84 | } | 86 | } |
| 87 | LCRYPTO_ALIAS(CMS_ReceiptRequest_new); | ||
| 85 | 88 | ||
| 86 | void | 89 | void |
| 87 | CMS_ReceiptRequest_free(CMS_ReceiptRequest *a) | 90 | CMS_ReceiptRequest_free(CMS_ReceiptRequest *a) |
| 88 | { | 91 | { |
| 89 | ASN1_item_free((ASN1_VALUE *)a, &CMS_ReceiptRequest_it); | 92 | ASN1_item_free((ASN1_VALUE *)a, &CMS_ReceiptRequest_it); |
| 90 | } | 93 | } |
| 94 | LCRYPTO_ALIAS(CMS_ReceiptRequest_free); | ||
| 91 | 95 | ||
| 92 | /* ESS services: for now just Signed Receipt related */ | 96 | /* ESS services: for now just Signed Receipt related */ |
| 93 | 97 | ||
diff --git a/src/lib/libcrypto/cms/cms_io.c b/src/lib/libcrypto/cms/cms_io.c index 38e76e0c2e..ceb4ce8ecb 100644 --- a/src/lib/libcrypto/cms/cms_io.c +++ b/src/lib/libcrypto/cms/cms_io.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_io.c,v 1.19 2023/04/26 14:23:18 tb Exp $ */ | 1 | /* $OpenBSD: cms_io.c,v 1.20 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -82,18 +82,21 @@ CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms) | |||
| 82 | 82 | ||
| 83 | return 1; | 83 | return 1; |
| 84 | } | 84 | } |
| 85 | LCRYPTO_ALIAS(CMS_stream); | ||
| 85 | 86 | ||
| 86 | CMS_ContentInfo * | 87 | CMS_ContentInfo * |
| 87 | d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms) | 88 | d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms) |
| 88 | { | 89 | { |
| 89 | return ASN1_item_d2i_bio(&CMS_ContentInfo_it, bp, cms); | 90 | return ASN1_item_d2i_bio(&CMS_ContentInfo_it, bp, cms); |
| 90 | } | 91 | } |
| 92 | LCRYPTO_ALIAS(d2i_CMS_bio); | ||
| 91 | 93 | ||
| 92 | int | 94 | int |
| 93 | i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms) | 95 | i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms) |
| 94 | { | 96 | { |
| 95 | return ASN1_item_i2d_bio(&CMS_ContentInfo_it, bp, cms); | 97 | return ASN1_item_i2d_bio(&CMS_ContentInfo_it, bp, cms); |
| 96 | } | 98 | } |
| 99 | LCRYPTO_ALIAS(i2d_CMS_bio); | ||
| 97 | 100 | ||
| 98 | 101 | ||
| 99 | CMS_ContentInfo * | 102 | CMS_ContentInfo * |
| @@ -129,6 +132,7 @@ BIO_new_CMS(BIO *out, CMS_ContentInfo *cms) | |||
| 129 | { | 132 | { |
| 130 | return BIO_new_NDEF(out, (ASN1_VALUE *)cms, &CMS_ContentInfo_it); | 133 | return BIO_new_NDEF(out, (ASN1_VALUE *)cms, &CMS_ContentInfo_it); |
| 131 | } | 134 | } |
| 135 | LCRYPTO_ALIAS(BIO_new_CMS); | ||
| 132 | 136 | ||
| 133 | /* CMS wrappers round generalised stream and MIME routines */ | 137 | /* CMS wrappers round generalised stream and MIME routines */ |
| 134 | 138 | ||
| @@ -138,6 +142,7 @@ i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags) | |||
| 138 | return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags, | 142 | return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags, |
| 139 | &CMS_ContentInfo_it); | 143 | &CMS_ContentInfo_it); |
| 140 | } | 144 | } |
| 145 | LCRYPTO_ALIAS(i2d_CMS_bio_stream); | ||
| 141 | 146 | ||
| 142 | int | 147 | int |
| 143 | PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags) | 148 | PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags) |
| @@ -145,6 +150,7 @@ PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags) | |||
| 145 | return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *)cms, in, flags, | 150 | return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *)cms, in, flags, |
| 146 | "CMS", &CMS_ContentInfo_it); | 151 | "CMS", &CMS_ContentInfo_it); |
| 147 | } | 152 | } |
| 153 | LCRYPTO_ALIAS(PEM_write_bio_CMS_stream); | ||
| 148 | 154 | ||
| 149 | int | 155 | int |
| 150 | SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags) | 156 | SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags) |
| @@ -159,6 +165,7 @@ SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags) | |||
| 159 | return SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags, ctype_nid, | 165 | return SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags, ctype_nid, |
| 160 | econt_nid, mdalgs, &CMS_ContentInfo_it); | 166 | econt_nid, mdalgs, &CMS_ContentInfo_it); |
| 161 | } | 167 | } |
| 168 | LCRYPTO_ALIAS(SMIME_write_CMS); | ||
| 162 | 169 | ||
| 163 | CMS_ContentInfo * | 170 | CMS_ContentInfo * |
| 164 | SMIME_read_CMS(BIO *bio, BIO **bcont) | 171 | SMIME_read_CMS(BIO *bio, BIO **bcont) |
| @@ -166,3 +173,4 @@ SMIME_read_CMS(BIO *bio, BIO **bcont) | |||
| 166 | return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, | 173 | return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, |
| 167 | &CMS_ContentInfo_it); | 174 | &CMS_ContentInfo_it); |
| 168 | } | 175 | } |
| 176 | LCRYPTO_ALIAS(SMIME_read_CMS); | ||
diff --git a/src/lib/libcrypto/cms/cms_kari.c b/src/lib/libcrypto/cms/cms_kari.c index 0294007791..8ed54e7578 100644 --- a/src/lib/libcrypto/cms/cms_kari.c +++ b/src/lib/libcrypto/cms/cms_kari.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_kari.c,v 1.14 2022/11/26 16:08:51 tb Exp $ */ | 1 | /* $OpenBSD: cms_kari.c,v 1.15 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -81,6 +81,7 @@ CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri, X509_ALGOR **palg, | |||
| 81 | 81 | ||
| 82 | return 1; | 82 | return 1; |
| 83 | } | 83 | } |
| 84 | LCRYPTO_ALIAS(CMS_RecipientInfo_kari_get0_alg); | ||
| 84 | 85 | ||
| 85 | /* Retrieve recipient encrypted keys from a kari */ | 86 | /* Retrieve recipient encrypted keys from a kari */ |
| 86 | 87 | ||
| @@ -93,6 +94,7 @@ CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri) | |||
| 93 | } | 94 | } |
| 94 | return ri->d.kari->recipientEncryptedKeys; | 95 | return ri->d.kari->recipientEncryptedKeys; |
| 95 | } | 96 | } |
| 97 | LCRYPTO_ALIAS(CMS_RecipientInfo_kari_get0_reks); | ||
| 96 | 98 | ||
| 97 | int | 99 | int |
| 98 | CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri, X509_ALGOR **pubalg, | 100 | CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri, X509_ALGOR **pubalg, |
| @@ -134,6 +136,7 @@ CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri, X509_ALGOR **pubalg, | |||
| 134 | 136 | ||
| 135 | return 1; | 137 | return 1; |
| 136 | } | 138 | } |
| 139 | LCRYPTO_ALIAS(CMS_RecipientInfo_kari_get0_orig_id); | ||
| 137 | 140 | ||
| 138 | int | 141 | int |
| 139 | CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert) | 142 | CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert) |
| @@ -152,6 +155,7 @@ CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert) | |||
| 152 | 155 | ||
| 153 | return -1; | 156 | return -1; |
| 154 | } | 157 | } |
| 158 | LCRYPTO_ALIAS(CMS_RecipientInfo_kari_orig_id_cmp); | ||
| 155 | 159 | ||
| 156 | int | 160 | int |
| 157 | CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek, | 161 | CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek, |
| @@ -187,6 +191,7 @@ CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek, | |||
| 187 | 191 | ||
| 188 | return 1; | 192 | return 1; |
| 189 | } | 193 | } |
| 194 | LCRYPTO_ALIAS(CMS_RecipientEncryptedKey_get0_id); | ||
| 190 | 195 | ||
| 191 | int | 196 | int |
| 192 | CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek, X509 *cert) | 197 | CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek, X509 *cert) |
| @@ -200,6 +205,7 @@ CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek, X509 *cert) | |||
| 200 | else | 205 | else |
| 201 | return -1; | 206 | return -1; |
| 202 | } | 207 | } |
| 208 | LCRYPTO_ALIAS(CMS_RecipientEncryptedKey_cert_cmp); | ||
| 203 | 209 | ||
| 204 | int | 210 | int |
| 205 | CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk) | 211 | CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk) |
| @@ -221,6 +227,7 @@ CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk) | |||
| 221 | EVP_PKEY_CTX_free(pctx); | 227 | EVP_PKEY_CTX_free(pctx); |
| 222 | return 0; | 228 | return 0; |
| 223 | } | 229 | } |
| 230 | LCRYPTO_ALIAS(CMS_RecipientInfo_kari_set0_pkey); | ||
| 224 | 231 | ||
| 225 | EVP_CIPHER_CTX * | 232 | EVP_CIPHER_CTX * |
| 226 | CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri) | 233 | CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri) |
| @@ -229,6 +236,7 @@ CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri) | |||
| 229 | return ri->d.kari->ctx; | 236 | return ri->d.kari->ctx; |
| 230 | return NULL; | 237 | return NULL; |
| 231 | } | 238 | } |
| 239 | LCRYPTO_ALIAS(CMS_RecipientInfo_kari_get0_ctx); | ||
| 232 | 240 | ||
| 233 | /* | 241 | /* |
| 234 | * Derive KEK and decrypt/encrypt with it to produce either the original CEK | 242 | * Derive KEK and decrypt/encrypt with it to produce either the original CEK |
| @@ -309,6 +317,7 @@ CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, | |||
| 309 | 317 | ||
| 310 | return rv; | 318 | return rv; |
| 311 | } | 319 | } |
| 320 | LCRYPTO_ALIAS(CMS_RecipientInfo_kari_decrypt); | ||
| 312 | 321 | ||
| 313 | /* Create ephemeral key and initialise context based on it */ | 322 | /* Create ephemeral key and initialise context based on it */ |
| 314 | static int | 323 | static int |
diff --git a/src/lib/libcrypto/cms/cms_lib.c b/src/lib/libcrypto/cms/cms_lib.c index f8d950de03..fa62e61e96 100644 --- a/src/lib/libcrypto/cms/cms_lib.c +++ b/src/lib/libcrypto/cms/cms_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_lib.c,v 1.17 2023/06/11 05:35:43 tb Exp $ */ | 1 | /* $OpenBSD: cms_lib.c,v 1.18 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -69,24 +69,28 @@ d2i_CMS_ContentInfo(CMS_ContentInfo **a, const unsigned char **in, long len) | |||
| 69 | return (CMS_ContentInfo *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 69 | return (CMS_ContentInfo *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
| 70 | &CMS_ContentInfo_it); | 70 | &CMS_ContentInfo_it); |
| 71 | } | 71 | } |
| 72 | LCRYPTO_ALIAS(d2i_CMS_ContentInfo); | ||
| 72 | 73 | ||
| 73 | int | 74 | int |
| 74 | i2d_CMS_ContentInfo(CMS_ContentInfo *a, unsigned char **out) | 75 | i2d_CMS_ContentInfo(CMS_ContentInfo *a, unsigned char **out) |
| 75 | { | 76 | { |
| 76 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &CMS_ContentInfo_it); | 77 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &CMS_ContentInfo_it); |
| 77 | } | 78 | } |
| 79 | LCRYPTO_ALIAS(i2d_CMS_ContentInfo); | ||
| 78 | 80 | ||
| 79 | CMS_ContentInfo * | 81 | CMS_ContentInfo * |
| 80 | CMS_ContentInfo_new(void) | 82 | CMS_ContentInfo_new(void) |
| 81 | { | 83 | { |
| 82 | return (CMS_ContentInfo *)ASN1_item_new(&CMS_ContentInfo_it); | 84 | return (CMS_ContentInfo *)ASN1_item_new(&CMS_ContentInfo_it); |
| 83 | } | 85 | } |
| 86 | LCRYPTO_ALIAS(CMS_ContentInfo_new); | ||
| 84 | 87 | ||
| 85 | void | 88 | void |
| 86 | CMS_ContentInfo_free(CMS_ContentInfo *a) | 89 | CMS_ContentInfo_free(CMS_ContentInfo *a) |
| 87 | { | 90 | { |
| 88 | ASN1_item_free((ASN1_VALUE *)a, &CMS_ContentInfo_it); | 91 | ASN1_item_free((ASN1_VALUE *)a, &CMS_ContentInfo_it); |
| 89 | } | 92 | } |
| 93 | LCRYPTO_ALIAS(CMS_ContentInfo_free); | ||
| 90 | 94 | ||
| 91 | int | 95 | int |
| 92 | CMS_ContentInfo_print_ctx(BIO *out, CMS_ContentInfo *x, int indent, const ASN1_PCTX *pctx) | 96 | CMS_ContentInfo_print_ctx(BIO *out, CMS_ContentInfo *x, int indent, const ASN1_PCTX *pctx) |
| @@ -94,12 +98,14 @@ CMS_ContentInfo_print_ctx(BIO *out, CMS_ContentInfo *x, int indent, const ASN1_P | |||
| 94 | return ASN1_item_print(out, (ASN1_VALUE *)x, indent, | 98 | return ASN1_item_print(out, (ASN1_VALUE *)x, indent, |
| 95 | &CMS_ContentInfo_it, pctx); | 99 | &CMS_ContentInfo_it, pctx); |
| 96 | } | 100 | } |
| 101 | LCRYPTO_ALIAS(CMS_ContentInfo_print_ctx); | ||
| 97 | 102 | ||
| 98 | const ASN1_OBJECT * | 103 | const ASN1_OBJECT * |
| 99 | CMS_get0_type(const CMS_ContentInfo *cms) | 104 | CMS_get0_type(const CMS_ContentInfo *cms) |
| 100 | { | 105 | { |
| 101 | return cms->contentType; | 106 | return cms->contentType; |
| 102 | } | 107 | } |
| 108 | LCRYPTO_ALIAS(CMS_get0_type); | ||
| 103 | 109 | ||
| 104 | CMS_ContentInfo * | 110 | CMS_ContentInfo * |
| 105 | cms_Data_create(void) | 111 | cms_Data_create(void) |
| @@ -182,6 +188,7 @@ CMS_dataInit(CMS_ContentInfo *cms, BIO *icont) | |||
| 182 | 188 | ||
| 183 | return NULL; | 189 | return NULL; |
| 184 | } | 190 | } |
| 191 | LCRYPTO_ALIAS(CMS_dataInit); | ||
| 185 | 192 | ||
| 186 | int | 193 | int |
| 187 | CMS_dataFinal(CMS_ContentInfo *cms, BIO *cmsbio) | 194 | CMS_dataFinal(CMS_ContentInfo *cms, BIO *cmsbio) |
| @@ -228,6 +235,7 @@ CMS_dataFinal(CMS_ContentInfo *cms, BIO *cmsbio) | |||
| 228 | return 0; | 235 | return 0; |
| 229 | } | 236 | } |
| 230 | } | 237 | } |
| 238 | LCRYPTO_ALIAS(CMS_dataFinal); | ||
| 231 | 239 | ||
| 232 | /* | 240 | /* |
| 233 | * Return an OCTET STRING pointer to content. This allows it to be accessed | 241 | * Return an OCTET STRING pointer to content. This allows it to be accessed |
| @@ -311,6 +319,7 @@ CMS_get0_eContentType(CMS_ContentInfo *cms) | |||
| 311 | 319 | ||
| 312 | return NULL; | 320 | return NULL; |
| 313 | } | 321 | } |
| 322 | LCRYPTO_ALIAS(CMS_get0_eContentType); | ||
| 314 | 323 | ||
| 315 | int | 324 | int |
| 316 | CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid) | 325 | CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid) |
| @@ -330,6 +339,7 @@ CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid) | |||
| 330 | 339 | ||
| 331 | return 1; | 340 | return 1; |
| 332 | } | 341 | } |
| 342 | LCRYPTO_ALIAS(CMS_set1_eContentType); | ||
| 333 | 343 | ||
| 334 | int | 344 | int |
| 335 | CMS_is_detached(CMS_ContentInfo *cms) | 345 | CMS_is_detached(CMS_ContentInfo *cms) |
| @@ -344,6 +354,7 @@ CMS_is_detached(CMS_ContentInfo *cms) | |||
| 344 | 354 | ||
| 345 | return 1; | 355 | return 1; |
| 346 | } | 356 | } |
| 357 | LCRYPTO_ALIAS(CMS_is_detached); | ||
| 347 | 358 | ||
| 348 | int | 359 | int |
| 349 | CMS_set_detached(CMS_ContentInfo *cms, int detached) | 360 | CMS_set_detached(CMS_ContentInfo *cms, int detached) |
| @@ -371,6 +382,7 @@ CMS_set_detached(CMS_ContentInfo *cms, int detached) | |||
| 371 | 382 | ||
| 372 | return 0; | 383 | return 0; |
| 373 | } | 384 | } |
| 385 | LCRYPTO_ALIAS(CMS_set_detached); | ||
| 374 | 386 | ||
| 375 | /* Create a digest BIO from an X509_ALGOR structure */ | 387 | /* Create a digest BIO from an X509_ALGOR structure */ |
| 376 | 388 | ||
| @@ -471,6 +483,7 @@ CMS_add0_CertificateChoices(CMS_ContentInfo *cms) | |||
| 471 | 483 | ||
| 472 | return cch; | 484 | return cch; |
| 473 | } | 485 | } |
| 486 | LCRYPTO_ALIAS(CMS_add0_CertificateChoices); | ||
| 474 | 487 | ||
| 475 | int | 488 | int |
| 476 | CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert) | 489 | CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert) |
| @@ -499,6 +512,7 @@ CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert) | |||
| 499 | 512 | ||
| 500 | return 1; | 513 | return 1; |
| 501 | } | 514 | } |
| 515 | LCRYPTO_ALIAS(CMS_add0_cert); | ||
| 502 | 516 | ||
| 503 | int | 517 | int |
| 504 | CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert) | 518 | CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert) |
| @@ -511,6 +525,7 @@ CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert) | |||
| 511 | 525 | ||
| 512 | return r; | 526 | return r; |
| 513 | } | 527 | } |
| 528 | LCRYPTO_ALIAS(CMS_add1_cert); | ||
| 514 | 529 | ||
| 515 | static STACK_OF(CMS_RevocationInfoChoice) ** | 530 | static STACK_OF(CMS_RevocationInfoChoice) ** |
| 516 | cms_get0_revocation_choices(CMS_ContentInfo *cms) | 531 | cms_get0_revocation_choices(CMS_ContentInfo *cms) |
| @@ -553,6 +568,7 @@ CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms) | |||
| 553 | 568 | ||
| 554 | return rch; | 569 | return rch; |
| 555 | } | 570 | } |
| 571 | LCRYPTO_ALIAS(CMS_add0_RevocationInfoChoice); | ||
| 556 | 572 | ||
| 557 | int | 573 | int |
| 558 | CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl) | 574 | CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl) |
| @@ -567,6 +583,7 @@ CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl) | |||
| 567 | 583 | ||
| 568 | return 1; | 584 | return 1; |
| 569 | } | 585 | } |
| 586 | LCRYPTO_ALIAS(CMS_add0_crl); | ||
| 570 | 587 | ||
| 571 | int | 588 | int |
| 572 | CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl) | 589 | CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl) |
| @@ -579,6 +596,7 @@ CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl) | |||
| 579 | 596 | ||
| 580 | return r; | 597 | return r; |
| 581 | } | 598 | } |
| 599 | LCRYPTO_ALIAS(CMS_add1_crl); | ||
| 582 | 600 | ||
| 583 | STACK_OF(X509) * | 601 | STACK_OF(X509) * |
| 584 | CMS_get1_certs(CMS_ContentInfo *cms) | 602 | CMS_get1_certs(CMS_ContentInfo *cms) |
| @@ -608,6 +626,7 @@ CMS_get1_certs(CMS_ContentInfo *cms) | |||
| 608 | } | 626 | } |
| 609 | return certs; | 627 | return certs; |
| 610 | } | 628 | } |
| 629 | LCRYPTO_ALIAS(CMS_get1_certs); | ||
| 611 | 630 | ||
| 612 | STACK_OF(X509_CRL) * | 631 | STACK_OF(X509_CRL) * |
| 613 | CMS_get1_crls(CMS_ContentInfo *cms) | 632 | CMS_get1_crls(CMS_ContentInfo *cms) |
| @@ -637,6 +656,7 @@ CMS_get1_crls(CMS_ContentInfo *cms) | |||
| 637 | } | 656 | } |
| 638 | return crls; | 657 | return crls; |
| 639 | } | 658 | } |
| 659 | LCRYPTO_ALIAS(CMS_get1_crls); | ||
| 640 | 660 | ||
| 641 | static const ASN1_OCTET_STRING * | 661 | static const ASN1_OCTET_STRING * |
| 642 | cms_X509_get0_subject_key_id(X509 *x) | 662 | cms_X509_get0_subject_key_id(X509 *x) |
diff --git a/src/lib/libcrypto/cms/cms_pwri.c b/src/lib/libcrypto/cms/cms_pwri.c index 3348b60fdc..9ea7cfdcb0 100644 --- a/src/lib/libcrypto/cms/cms_pwri.c +++ b/src/lib/libcrypto/cms/cms_pwri.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_pwri.c,v 1.28 2022/11/26 16:08:51 tb Exp $ */ | 1 | /* $OpenBSD: cms_pwri.c,v 1.29 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -84,6 +84,7 @@ CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri, unsigned char *pass, | |||
| 84 | 84 | ||
| 85 | return 1; | 85 | return 1; |
| 86 | } | 86 | } |
| 87 | LCRYPTO_ALIAS(CMS_RecipientInfo_set0_password); | ||
| 87 | 88 | ||
| 88 | CMS_RecipientInfo * | 89 | CMS_RecipientInfo * |
| 89 | CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid, | 90 | CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid, |
| @@ -213,6 +214,7 @@ CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid, | |||
| 213 | 214 | ||
| 214 | return NULL; | 215 | return NULL; |
| 215 | } | 216 | } |
| 217 | LCRYPTO_ALIAS(CMS_add0_recipient_password); | ||
| 216 | 218 | ||
| 217 | /* | 219 | /* |
| 218 | * This is an implementation of the key wrapping mechanism in RFC3211, at | 220 | * This is an implementation of the key wrapping mechanism in RFC3211, at |
diff --git a/src/lib/libcrypto/cms/cms_sd.c b/src/lib/libcrypto/cms/cms_sd.c index 8df78fe3e5..89ba5bf01f 100644 --- a/src/lib/libcrypto/cms/cms_sd.c +++ b/src/lib/libcrypto/cms/cms_sd.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_sd.c,v 1.25 2022/11/26 16:08:51 tb Exp $ */ | 1 | /* $OpenBSD: cms_sd.c,v 1.26 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -107,6 +107,7 @@ CMS_SignedData_init(CMS_ContentInfo *cms) | |||
| 107 | else | 107 | else |
| 108 | return 0; | 108 | return 0; |
| 109 | } | 109 | } |
| 110 | LCRYPTO_ALIAS(CMS_SignedData_init); | ||
| 110 | 111 | ||
| 111 | /* Check structures and fixup version numbers (if necessary) */ | 112 | /* Check structures and fixup version numbers (if necessary) */ |
| 112 | 113 | ||
| @@ -424,6 +425,7 @@ CMS_add1_signer(CMS_ContentInfo *cms, X509 *signer, EVP_PKEY *pk, | |||
| 424 | 425 | ||
| 425 | return NULL; | 426 | return NULL; |
| 426 | } | 427 | } |
| 428 | LCRYPTO_ALIAS(CMS_add1_signer); | ||
| 427 | 429 | ||
| 428 | static int | 430 | static int |
| 429 | cms_add1_signingTime(CMS_SignerInfo *si, ASN1_TIME *t) | 431 | cms_add1_signingTime(CMS_SignerInfo *si, ASN1_TIME *t) |
| @@ -459,12 +461,14 @@ CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si) | |||
| 459 | { | 461 | { |
| 460 | return si->pctx; | 462 | return si->pctx; |
| 461 | } | 463 | } |
| 464 | LCRYPTO_ALIAS(CMS_SignerInfo_get0_pkey_ctx); | ||
| 462 | 465 | ||
| 463 | EVP_MD_CTX * | 466 | EVP_MD_CTX * |
| 464 | CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si) | 467 | CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si) |
| 465 | { | 468 | { |
| 466 | return si->mctx; | 469 | return si->mctx; |
| 467 | } | 470 | } |
| 471 | LCRYPTO_ALIAS(CMS_SignerInfo_get0_md_ctx); | ||
| 468 | 472 | ||
| 469 | STACK_OF(CMS_SignerInfo) * | 473 | STACK_OF(CMS_SignerInfo) * |
| 470 | CMS_get0_SignerInfos(CMS_ContentInfo *cms) | 474 | CMS_get0_SignerInfos(CMS_ContentInfo *cms) |
| @@ -477,6 +481,7 @@ CMS_get0_SignerInfos(CMS_ContentInfo *cms) | |||
| 477 | 481 | ||
| 478 | return sd->signerInfos; | 482 | return sd->signerInfos; |
| 479 | } | 483 | } |
| 484 | LCRYPTO_ALIAS(CMS_get0_SignerInfos); | ||
| 480 | 485 | ||
| 481 | STACK_OF(X509) * | 486 | STACK_OF(X509) * |
| 482 | CMS_get0_signers(CMS_ContentInfo *cms) | 487 | CMS_get0_signers(CMS_ContentInfo *cms) |
| @@ -504,6 +509,7 @@ CMS_get0_signers(CMS_ContentInfo *cms) | |||
| 504 | 509 | ||
| 505 | return signers; | 510 | return signers; |
| 506 | } | 511 | } |
| 512 | LCRYPTO_ALIAS(CMS_get0_signers); | ||
| 507 | 513 | ||
| 508 | void | 514 | void |
| 509 | CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer) | 515 | CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer) |
| @@ -516,6 +522,7 @@ CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer) | |||
| 516 | X509_free(si->signer); | 522 | X509_free(si->signer); |
| 517 | si->signer = signer; | 523 | si->signer = signer; |
| 518 | } | 524 | } |
| 525 | LCRYPTO_ALIAS(CMS_SignerInfo_set1_signer_cert); | ||
| 519 | 526 | ||
| 520 | int | 527 | int |
| 521 | CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid, | 528 | CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid, |
| @@ -523,12 +530,14 @@ CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid, | |||
| 523 | { | 530 | { |
| 524 | return cms_SignerIdentifier_get0_signer_id(si->sid, keyid, issuer, sno); | 531 | return cms_SignerIdentifier_get0_signer_id(si->sid, keyid, issuer, sno); |
| 525 | } | 532 | } |
| 533 | LCRYPTO_ALIAS(CMS_SignerInfo_get0_signer_id); | ||
| 526 | 534 | ||
| 527 | int | 535 | int |
| 528 | CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert) | 536 | CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert) |
| 529 | { | 537 | { |
| 530 | return cms_SignerIdentifier_cert_cmp(si->sid, cert); | 538 | return cms_SignerIdentifier_cert_cmp(si->sid, cert); |
| 531 | } | 539 | } |
| 540 | LCRYPTO_ALIAS(CMS_SignerInfo_cert_cmp); | ||
| 532 | 541 | ||
| 533 | int | 542 | int |
| 534 | CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *scerts, | 543 | CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *scerts, |
| @@ -577,6 +586,7 @@ CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *scerts, | |||
| 577 | } | 586 | } |
| 578 | return ret; | 587 | return ret; |
| 579 | } | 588 | } |
| 589 | LCRYPTO_ALIAS(CMS_set1_signers_certs); | ||
| 580 | 590 | ||
| 581 | void | 591 | void |
| 582 | CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, X509 **signer, | 592 | CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, X509 **signer, |
| @@ -591,12 +601,14 @@ X509_ALGOR **pdig, X509_ALGOR **psig) | |||
| 591 | if (psig) | 601 | if (psig) |
| 592 | *psig = si->signatureAlgorithm; | 602 | *psig = si->signatureAlgorithm; |
| 593 | } | 603 | } |
| 604 | LCRYPTO_ALIAS(CMS_SignerInfo_get0_algs); | ||
| 594 | 605 | ||
| 595 | ASN1_OCTET_STRING * | 606 | ASN1_OCTET_STRING * |
| 596 | CMS_SignerInfo_get0_signature(CMS_SignerInfo *si) | 607 | CMS_SignerInfo_get0_signature(CMS_SignerInfo *si) |
| 597 | { | 608 | { |
| 598 | return si->signature; | 609 | return si->signature; |
| 599 | } | 610 | } |
| 611 | LCRYPTO_ALIAS(CMS_SignerInfo_get0_signature); | ||
| 600 | 612 | ||
| 601 | static int | 613 | static int |
| 602 | cms_SignerInfo_content_sign(CMS_ContentInfo *cms, CMS_SignerInfo *si, BIO *chain) | 614 | cms_SignerInfo_content_sign(CMS_ContentInfo *cms, CMS_SignerInfo *si, BIO *chain) |
| @@ -773,6 +785,7 @@ CMS_SignerInfo_sign(CMS_SignerInfo *si) | |||
| 773 | 785 | ||
| 774 | return 0; | 786 | return 0; |
| 775 | } | 787 | } |
| 788 | LCRYPTO_ALIAS(CMS_SignerInfo_sign); | ||
| 776 | 789 | ||
| 777 | int | 790 | int |
| 778 | CMS_SignerInfo_verify(CMS_SignerInfo *si) | 791 | CMS_SignerInfo_verify(CMS_SignerInfo *si) |
| @@ -822,6 +835,7 @@ CMS_SignerInfo_verify(CMS_SignerInfo *si) | |||
| 822 | 835 | ||
| 823 | return r; | 836 | return r; |
| 824 | } | 837 | } |
| 838 | LCRYPTO_ALIAS(CMS_SignerInfo_verify); | ||
| 825 | 839 | ||
| 826 | /* Create a chain of digest BIOs from a CMS ContentInfo */ | 840 | /* Create a chain of digest BIOs from a CMS ContentInfo */ |
| 827 | 841 | ||
| @@ -931,6 +945,7 @@ CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain) | |||
| 931 | 945 | ||
| 932 | return r; | 946 | return r; |
| 933 | } | 947 | } |
| 948 | LCRYPTO_ALIAS(CMS_SignerInfo_verify_content); | ||
| 934 | 949 | ||
| 935 | int | 950 | int |
| 936 | CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs) | 951 | CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs) |
| @@ -947,6 +962,7 @@ CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs) | |||
| 947 | 962 | ||
| 948 | return r; | 963 | return r; |
| 949 | } | 964 | } |
| 965 | LCRYPTO_ALIAS(CMS_add_smimecap); | ||
| 950 | 966 | ||
| 951 | int | 967 | int |
| 952 | CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs, int algnid, int keysize) | 968 | CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs, int algnid, int keysize) |
| @@ -979,6 +995,7 @@ CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs, int algnid, int keysize) | |||
| 979 | 995 | ||
| 980 | return 1; | 996 | return 1; |
| 981 | } | 997 | } |
| 998 | LCRYPTO_ALIAS(CMS_add_simple_smimecap); | ||
| 982 | 999 | ||
| 983 | /* Check to see if a cipher exists and if so add S/MIME capabilities */ | 1000 | /* Check to see if a cipher exists and if so add S/MIME capabilities */ |
| 984 | 1001 | ||
| @@ -1015,3 +1032,4 @@ CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap) | |||
| 1015 | 1032 | ||
| 1016 | return 1; | 1033 | return 1; |
| 1017 | } | 1034 | } |
| 1035 | LCRYPTO_ALIAS(CMS_add_standard_smimecap); | ||
diff --git a/src/lib/libcrypto/cms/cms_smime.c b/src/lib/libcrypto/cms/cms_smime.c index e9001d0f01..b2930017fd 100644 --- a/src/lib/libcrypto/cms/cms_smime.c +++ b/src/lib/libcrypto/cms/cms_smime.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cms_smime.c,v 1.26 2023/06/11 05:35:43 tb Exp $ */ | 1 | /* $OpenBSD: cms_smime.c,v 1.27 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -170,6 +170,7 @@ CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags) | |||
| 170 | 170 | ||
| 171 | return r; | 171 | return r; |
| 172 | } | 172 | } |
| 173 | LCRYPTO_ALIAS(CMS_data); | ||
| 173 | 174 | ||
| 174 | CMS_ContentInfo * | 175 | CMS_ContentInfo * |
| 175 | CMS_data_create(BIO *in, unsigned int flags) | 176 | CMS_data_create(BIO *in, unsigned int flags) |
| @@ -187,6 +188,7 @@ CMS_data_create(BIO *in, unsigned int flags) | |||
| 187 | 188 | ||
| 188 | return NULL; | 189 | return NULL; |
| 189 | } | 190 | } |
| 191 | LCRYPTO_ALIAS(CMS_data_create); | ||
| 190 | 192 | ||
| 191 | int | 193 | int |
| 192 | CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags) | 194 | CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags) |
| @@ -212,6 +214,7 @@ CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags | |||
| 212 | 214 | ||
| 213 | return r; | 215 | return r; |
| 214 | } | 216 | } |
| 217 | LCRYPTO_ALIAS(CMS_digest_verify); | ||
| 215 | 218 | ||
| 216 | CMS_ContentInfo * | 219 | CMS_ContentInfo * |
| 217 | CMS_digest_create(BIO *in, const EVP_MD *md, unsigned int flags) | 220 | CMS_digest_create(BIO *in, const EVP_MD *md, unsigned int flags) |
| @@ -234,6 +237,7 @@ CMS_digest_create(BIO *in, const EVP_MD *md, unsigned int flags) | |||
| 234 | 237 | ||
| 235 | return NULL; | 238 | return NULL; |
| 236 | } | 239 | } |
| 240 | LCRYPTO_ALIAS(CMS_digest_create); | ||
| 237 | 241 | ||
| 238 | int | 242 | int |
| 239 | CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, const unsigned char *key, | 243 | CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, const unsigned char *key, |
| @@ -260,6 +264,7 @@ CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, const unsigned char *key, | |||
| 260 | 264 | ||
| 261 | return r; | 265 | return r; |
| 262 | } | 266 | } |
| 267 | LCRYPTO_ALIAS(CMS_EncryptedData_decrypt); | ||
| 263 | 268 | ||
| 264 | CMS_ContentInfo * | 269 | CMS_ContentInfo * |
| 265 | CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, | 270 | CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, |
| @@ -288,6 +293,7 @@ CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, | |||
| 288 | 293 | ||
| 289 | return NULL; | 294 | return NULL; |
| 290 | } | 295 | } |
| 296 | LCRYPTO_ALIAS(CMS_EncryptedData_encrypt); | ||
| 291 | 297 | ||
| 292 | static int | 298 | static int |
| 293 | cms_signerinfo_verify_cert(CMS_SignerInfo *si, X509_STORE *store, | 299 | cms_signerinfo_verify_cert(CMS_SignerInfo *si, X509_STORE *store, |
| @@ -485,6 +491,7 @@ CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, X509_STORE *store, | |||
| 485 | 491 | ||
| 486 | return ret; | 492 | return ret; |
| 487 | } | 493 | } |
| 494 | LCRYPTO_ALIAS(CMS_verify); | ||
| 488 | 495 | ||
| 489 | int | 496 | int |
| 490 | CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms, | 497 | CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms, |
| @@ -499,6 +506,7 @@ CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms, | |||
| 499 | 506 | ||
| 500 | return cms_Receipt_verify(rcms, ocms); | 507 | return cms_Receipt_verify(rcms, ocms); |
| 501 | } | 508 | } |
| 509 | LCRYPTO_ALIAS(CMS_verify_receipt); | ||
| 502 | 510 | ||
| 503 | CMS_ContentInfo * | 511 | CMS_ContentInfo * |
| 504 | CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, | 512 | CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, |
| @@ -542,6 +550,7 @@ CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, | |||
| 542 | 550 | ||
| 543 | return NULL; | 551 | return NULL; |
| 544 | } | 552 | } |
| 553 | LCRYPTO_ALIAS(CMS_sign); | ||
| 545 | 554 | ||
| 546 | CMS_ContentInfo * | 555 | CMS_ContentInfo * |
| 547 | CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert, EVP_PKEY *pkey, | 556 | CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert, EVP_PKEY *pkey, |
| @@ -609,6 +618,7 @@ CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert, EVP_PKEY *pkey, | |||
| 609 | 618 | ||
| 610 | return NULL; | 619 | return NULL; |
| 611 | } | 620 | } |
| 621 | LCRYPTO_ALIAS(CMS_sign_receipt); | ||
| 612 | 622 | ||
| 613 | CMS_ContentInfo * | 623 | CMS_ContentInfo * |
| 614 | CMS_encrypt(STACK_OF(X509) *certs, BIO *data, const EVP_CIPHER *cipher, | 624 | CMS_encrypt(STACK_OF(X509) *certs, BIO *data, const EVP_CIPHER *cipher, |
| @@ -645,6 +655,7 @@ CMS_encrypt(STACK_OF(X509) *certs, BIO *data, const EVP_CIPHER *cipher, | |||
| 645 | 655 | ||
| 646 | return NULL; | 656 | return NULL; |
| 647 | } | 657 | } |
| 658 | LCRYPTO_ALIAS(CMS_encrypt); | ||
| 648 | 659 | ||
| 649 | static int | 660 | static int |
| 650 | cms_kari_set1_pkey(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, EVP_PKEY *pk, | 661 | cms_kari_set1_pkey(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, EVP_PKEY *pk, |
| @@ -743,6 +754,7 @@ CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert) | |||
| 743 | 754 | ||
| 744 | return 0; | 755 | return 0; |
| 745 | } | 756 | } |
| 757 | LCRYPTO_ALIAS(CMS_decrypt_set1_pkey); | ||
| 746 | 758 | ||
| 747 | int | 759 | int |
| 748 | CMS_decrypt_set1_key(CMS_ContentInfo *cms, unsigned char *key, size_t keylen, | 760 | CMS_decrypt_set1_key(CMS_ContentInfo *cms, unsigned char *key, size_t keylen, |
| @@ -780,6 +792,7 @@ CMS_decrypt_set1_key(CMS_ContentInfo *cms, unsigned char *key, size_t keylen, | |||
| 780 | 792 | ||
| 781 | return 0; | 793 | return 0; |
| 782 | } | 794 | } |
| 795 | LCRYPTO_ALIAS(CMS_decrypt_set1_key); | ||
| 783 | 796 | ||
| 784 | int | 797 | int |
| 785 | CMS_decrypt_set1_password(CMS_ContentInfo *cms, unsigned char *pass, | 798 | CMS_decrypt_set1_password(CMS_ContentInfo *cms, unsigned char *pass, |
| @@ -805,6 +818,7 @@ CMS_decrypt_set1_password(CMS_ContentInfo *cms, unsigned char *pass, | |||
| 805 | 818 | ||
| 806 | return 0; | 819 | return 0; |
| 807 | } | 820 | } |
| 821 | LCRYPTO_ALIAS(CMS_decrypt_set1_password); | ||
| 808 | 822 | ||
| 809 | int | 823 | int |
| 810 | CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert, BIO *dcont, | 824 | CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert, BIO *dcont, |
| @@ -839,6 +853,7 @@ CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert, BIO *dcont, | |||
| 839 | 853 | ||
| 840 | return r; | 854 | return r; |
| 841 | } | 855 | } |
| 856 | LCRYPTO_ALIAS(CMS_decrypt); | ||
| 842 | 857 | ||
| 843 | int | 858 | int |
| 844 | CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags) | 859 | CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags) |
| @@ -867,6 +882,7 @@ CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags) | |||
| 867 | 882 | ||
| 868 | return ret; | 883 | return ret; |
| 869 | } | 884 | } |
| 885 | LCRYPTO_ALIAS(CMS_final); | ||
| 870 | 886 | ||
| 871 | int | 887 | int |
| 872 | CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags) | 888 | CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags) |
| @@ -874,6 +890,7 @@ CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags) | |||
| 874 | CMSerror(CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM); | 890 | CMSerror(CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM); |
| 875 | return 0; | 891 | return 0; |
| 876 | } | 892 | } |
| 893 | LCRYPTO_ALIAS(CMS_uncompress); | ||
| 877 | 894 | ||
| 878 | CMS_ContentInfo * | 895 | CMS_ContentInfo * |
| 879 | CMS_compress(BIO *in, int comp_nid, unsigned int flags) | 896 | CMS_compress(BIO *in, int comp_nid, unsigned int flags) |
| @@ -881,3 +898,4 @@ CMS_compress(BIO *in, int comp_nid, unsigned int flags) | |||
| 881 | CMSerror(CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM); | 898 | CMSerror(CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM); |
| 882 | return NULL; | 899 | return NULL; |
| 883 | } | 900 | } |
| 901 | LCRYPTO_ALIAS(CMS_compress); | ||
diff --git a/src/lib/libcrypto/comp/c_rle.c b/src/lib/libcrypto/comp/c_rle.c index c2c279dc04..7907dd83cd 100644 --- a/src/lib/libcrypto/comp/c_rle.c +++ b/src/lib/libcrypto/comp/c_rle.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: c_rle.c,v 1.11 2022/12/24 07:12:09 tb Exp $ */ | 1 | /* $OpenBSD: c_rle.c,v 1.12 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * --------------------------------------------------------------------------- | 3 | * --------------------------------------------------------------------------- |
| 4 | * Patches to this file were contributed by | 4 | * Patches to this file were contributed by |
| @@ -138,6 +138,7 @@ COMP_rle(void) | |||
| 138 | { | 138 | { |
| 139 | return (&rle_method); | 139 | return (&rle_method); |
| 140 | } | 140 | } |
| 141 | LCRYPTO_ALIAS(COMP_rle); | ||
| 141 | 142 | ||
| 142 | static int | 143 | static int |
| 143 | rle_compress_block(COMP_CTX *ctx, unsigned char *out, unsigned int olen, | 144 | rle_compress_block(COMP_CTX *ctx, unsigned char *out, unsigned int olen, |
diff --git a/src/lib/libcrypto/comp/c_zlib.c b/src/lib/libcrypto/comp/c_zlib.c index ec98b26f5c..087e2f4c61 100644 --- a/src/lib/libcrypto/comp/c_zlib.c +++ b/src/lib/libcrypto/comp/c_zlib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: c_zlib.c,v 1.27 2023/06/11 05:35:43 tb Exp $ */ | 1 | /* $OpenBSD: c_zlib.c,v 1.28 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * --------------------------------------------------------------------------- | 3 | * --------------------------------------------------------------------------- |
| 4 | * Major patches to this file were contributed by | 4 | * Major patches to this file were contributed by |
| @@ -137,8 +137,10 @@ COMP_zlib(void) | |||
| 137 | { | 137 | { |
| 138 | return &zlib_method_nozlib; | 138 | return &zlib_method_nozlib; |
| 139 | } | 139 | } |
| 140 | LCRYPTO_ALIAS(COMP_zlib); | ||
| 140 | 141 | ||
| 141 | void | 142 | void |
| 142 | COMP_zlib_cleanup(void) | 143 | COMP_zlib_cleanup(void) |
| 143 | { | 144 | { |
| 144 | } | 145 | } |
| 146 | LCRYPTO_ALIAS(COMP_zlib_cleanup); | ||
diff --git a/src/lib/libcrypto/comp/comp_err.c b/src/lib/libcrypto/comp/comp_err.c index 5ec5039f80..49c476c023 100644 --- a/src/lib/libcrypto/comp/comp_err.c +++ b/src/lib/libcrypto/comp/comp_err.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: comp_err.c,v 1.13 2022/12/23 23:23:02 schwarze Exp $ */ | 1 | /* $OpenBSD: comp_err.c,v 1.14 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * This file was written by Dr. Stephen Henson <steve@openssl.org>. | 3 | * This file was written by Dr. Stephen Henson <steve@openssl.org>. |
| 4 | * Copyright (c) 1999, 2005, 2008 The OpenSSL Project. All rights reserved. | 4 | * Copyright (c) 1999, 2005, 2008 The OpenSSL Project. All rights reserved. |
| @@ -92,3 +92,4 @@ ERR_load_COMP_strings(void) | |||
| 92 | } | 92 | } |
| 93 | #endif | 93 | #endif |
| 94 | } | 94 | } |
| 95 | LCRYPTO_ALIAS(ERR_load_COMP_strings); | ||
diff --git a/src/lib/libcrypto/comp/comp_lib.c b/src/lib/libcrypto/comp/comp_lib.c index 5cb2335bf5..f26edc0002 100644 --- a/src/lib/libcrypto/comp/comp_lib.c +++ b/src/lib/libcrypto/comp/comp_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: comp_lib.c,v 1.11 2022/12/24 07:12:09 tb Exp $ */ | 1 | /* $OpenBSD: comp_lib.c,v 1.12 2023/07/08 08:26:26 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * --------------------------------------------------------------------------- | 3 | * --------------------------------------------------------------------------- |
| 4 | * Patches to this file were contributed by | 4 | * Patches to this file were contributed by |
| @@ -136,6 +136,7 @@ COMP_CTX_new(COMP_METHOD *meth) | |||
| 136 | } | 136 | } |
| 137 | return (ret); | 137 | return (ret); |
| 138 | } | 138 | } |
| 139 | LCRYPTO_ALIAS(COMP_CTX_new); | ||
| 139 | 140 | ||
| 140 | void | 141 | void |
| 141 | COMP_CTX_free(COMP_CTX *ctx) | 142 | COMP_CTX_free(COMP_CTX *ctx) |
| @@ -148,6 +149,7 @@ COMP_CTX_free(COMP_CTX *ctx) | |||
| 148 | 149 | ||
| 149 | free(ctx); | 150 | free(ctx); |
| 150 | } | 151 | } |
| 152 | LCRYPTO_ALIAS(COMP_CTX_free); | ||
| 151 | 153 | ||
| 152 | int | 154 | int |
| 153 | COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, | 155 | COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, |
| @@ -165,6 +167,7 @@ COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, | |||
| 165 | } | 167 | } |
| 166 | return (ret); | 168 | return (ret); |
| 167 | } | 169 | } |
| 170 | LCRYPTO_ALIAS(COMP_compress_block); | ||
| 168 | 171 | ||
| 169 | int | 172 | int |
| 170 | COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, | 173 | COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, |
| @@ -182,3 +185,4 @@ COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, | |||
| 182 | } | 185 | } |
| 183 | return (ret); | 186 | return (ret); |
| 184 | } | 187 | } |
| 188 | LCRYPTO_ALIAS(COMP_expand_block); | ||
diff --git a/src/lib/libcrypto/conf/conf_api.c b/src/lib/libcrypto/conf/conf_api.c index f296e6a962..6fe071e12c 100644 --- a/src/lib/libcrypto/conf/conf_api.c +++ b/src/lib/libcrypto/conf/conf_api.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: conf_api.c,v 1.15 2015/04/11 16:03:21 deraadt Exp $ */ | 1 | /* $OpenBSD: conf_api.c,v 1.16 2023/07/08 08:26:26 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 | * |
| @@ -89,6 +89,7 @@ _CONF_get_section(const CONF *conf, const char *section) | |||
| 89 | v = lh_CONF_VALUE_retrieve(conf->data, &vv); | 89 | v = lh_CONF_VALUE_retrieve(conf->data, &vv); |
| 90 | return (v); | 90 | return (v); |
| 91 | } | 91 | } |
| 92 | LCRYPTO_ALIAS(_CONF_get_section); | ||
| 92 | 93 | ||
| 93 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ | 94 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ |
| 94 | STACK_OF(CONF_VALUE) * | 95 | STACK_OF(CONF_VALUE) * |
| @@ -102,6 +103,7 @@ _CONF_get_section_values(const CONF *conf, const char *section) | |||
| 102 | else | 103 | else |
| 103 | return (NULL); | 104 | return (NULL); |
| 104 | } | 105 | } |
| 106 | LCRYPTO_ALIAS(_CONF_get_section_values); | ||
| 105 | 107 | ||
| 106 | int | 108 | int |
| 107 | _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value) | 109 | _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value) |
| @@ -125,6 +127,7 @@ _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value) | |||
| 125 | } | 127 | } |
| 126 | return 1; | 128 | return 1; |
| 127 | } | 129 | } |
| 130 | LCRYPTO_ALIAS(_CONF_add_string); | ||
| 128 | 131 | ||
| 129 | char * | 132 | char * |
| 130 | _CONF_get_string(const CONF *conf, const char *section, const char *name) | 133 | _CONF_get_string(const CONF *conf, const char *section, const char *name) |
| @@ -151,6 +154,7 @@ _CONF_get_string(const CONF *conf, const char *section, const char *name) | |||
| 151 | } else | 154 | } else |
| 152 | return (NULL); | 155 | return (NULL); |
| 153 | } | 156 | } |
| 157 | LCRYPTO_ALIAS(_CONF_get_string); | ||
| 154 | 158 | ||
| 155 | static unsigned long | 159 | static unsigned long |
| 156 | conf_value_hash(const CONF_VALUE *v) | 160 | conf_value_hash(const CONF_VALUE *v) |
| @@ -193,6 +197,7 @@ _CONF_new_data(CONF *conf) | |||
| 193 | } | 197 | } |
| 194 | return 1; | 198 | return 1; |
| 195 | } | 199 | } |
| 200 | LCRYPTO_ALIAS(_CONF_new_data); | ||
| 196 | 201 | ||
| 197 | void | 202 | void |
| 198 | _CONF_free_data(CONF *conf) | 203 | _CONF_free_data(CONF *conf) |
| @@ -213,6 +218,7 @@ _CONF_free_data(CONF *conf) | |||
| 213 | lh_CONF_VALUE_doall(conf->data, LHASH_DOALL_FN(value_free_stack)); | 218 | lh_CONF_VALUE_doall(conf->data, LHASH_DOALL_FN(value_free_stack)); |
| 214 | lh_CONF_VALUE_free(conf->data); | 219 | lh_CONF_VALUE_free(conf->data); |
| 215 | } | 220 | } |
| 221 | LCRYPTO_ALIAS(_CONF_free_data); | ||
| 216 | 222 | ||
| 217 | static void | 223 | static void |
| 218 | value_free_hash_doall_arg(CONF_VALUE *a, LHASH_OF(CONF_VALUE) *conf) | 224 | value_free_hash_doall_arg(CONF_VALUE *a, LHASH_OF(CONF_VALUE) *conf) |
| @@ -277,3 +283,4 @@ err: | |||
| 277 | } | 283 | } |
| 278 | return (v); | 284 | return (v); |
| 279 | } | 285 | } |
| 286 | LCRYPTO_ALIAS(_CONF_new_section); | ||
diff --git a/src/lib/libcrypto/hidden/openssl/buffer.h b/src/lib/libcrypto/hidden/openssl/buffer.h new file mode 100644 index 0000000000..8dd86277f6 --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/buffer.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* $OpenBSD: buffer.h,v 1.1 2023/07/08 08:26:26 beck Exp $ */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> | ||
| 4 | * | ||
| 5 | * Permission to use, copy, modify, and distribute this software for any | ||
| 6 | * purpose with or without fee is hereby granted, provided that the above | ||
| 7 | * copyright notice and this permission notice appear in all copies. | ||
| 8 | * | ||
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef _LIBCRYPTO_BUFFER_H | ||
| 19 | #define _LIBCRYPTO_BUFFER_H | ||
| 20 | |||
| 21 | #ifndef _MSC_VER | ||
| 22 | #include_next <openssl/buffer.h> | ||
| 23 | #else | ||
| 24 | #include "../include/openssl/buffer.h" | ||
| 25 | #endif | ||
| 26 | #include "crypto_namespace.h" | ||
| 27 | |||
| 28 | LCRYPTO_USED(BUF_MEM_new); | ||
| 29 | LCRYPTO_USED(BUF_MEM_free); | ||
| 30 | LCRYPTO_USED(BUF_MEM_grow); | ||
| 31 | LCRYPTO_USED(BUF_MEM_grow_clean); | ||
| 32 | LCRYPTO_USED(ERR_load_BUF_strings); | ||
| 33 | |||
| 34 | #endif /* _LIBCRYPTO_BUFFER_H */ | ||
diff --git a/src/lib/libcrypto/hidden/openssl/cms.h b/src/lib/libcrypto/hidden/openssl/cms.h new file mode 100644 index 0000000000..c777e857d8 --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/cms.h | |||
| @@ -0,0 +1,146 @@ | |||
| 1 | /* $OpenBSD: cms.h,v 1.1 2023/07/08 08:26:26 beck Exp $ */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> | ||
| 4 | * | ||
| 5 | * Permission to use, copy, modify, and distribute this software for any | ||
| 6 | * purpose with or without fee is hereby granted, provided that the above | ||
| 7 | * copyright notice and this permission notice appear in all copies. | ||
| 8 | * | ||
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef _LIBCRYPTO_CMS_H | ||
| 19 | #define _LIBCRYPTO_CMS_H | ||
| 20 | |||
| 21 | #ifndef _MSC_VER | ||
| 22 | #include_next <openssl/cms.h> | ||
| 23 | #else | ||
| 24 | #include "../include/openssl/cms.h" | ||
| 25 | #endif | ||
| 26 | #include "crypto_namespace.h" | ||
| 27 | |||
| 28 | LCRYPTO_USED(CMS_ContentInfo_new); | ||
| 29 | LCRYPTO_USED(CMS_ContentInfo_free); | ||
| 30 | LCRYPTO_USED(d2i_CMS_ContentInfo); | ||
| 31 | LCRYPTO_USED(i2d_CMS_ContentInfo); | ||
| 32 | LCRYPTO_USED(CMS_ReceiptRequest_new); | ||
| 33 | LCRYPTO_USED(CMS_ReceiptRequest_free); | ||
| 34 | LCRYPTO_USED(d2i_CMS_ReceiptRequest); | ||
| 35 | LCRYPTO_USED(i2d_CMS_ReceiptRequest); | ||
| 36 | LCRYPTO_USED(CMS_ContentInfo_print_ctx); | ||
| 37 | LCRYPTO_USED(CMS_get0_type); | ||
| 38 | LCRYPTO_USED(CMS_dataInit); | ||
| 39 | LCRYPTO_USED(CMS_dataFinal); | ||
| 40 | LCRYPTO_USED(CMS_is_detached); | ||
| 41 | LCRYPTO_USED(CMS_set_detached); | ||
| 42 | LCRYPTO_USED(CMS_stream); | ||
| 43 | LCRYPTO_USED(d2i_CMS_bio); | ||
| 44 | LCRYPTO_USED(i2d_CMS_bio); | ||
| 45 | LCRYPTO_USED(BIO_new_CMS); | ||
| 46 | LCRYPTO_USED(i2d_CMS_bio_stream); | ||
| 47 | LCRYPTO_USED(PEM_write_bio_CMS_stream); | ||
| 48 | LCRYPTO_USED(SMIME_read_CMS); | ||
| 49 | LCRYPTO_USED(SMIME_write_CMS); | ||
| 50 | LCRYPTO_USED(CMS_final); | ||
| 51 | LCRYPTO_USED(CMS_sign); | ||
| 52 | LCRYPTO_USED(CMS_sign_receipt); | ||
| 53 | LCRYPTO_USED(CMS_data); | ||
| 54 | LCRYPTO_USED(CMS_data_create); | ||
| 55 | LCRYPTO_USED(CMS_digest_verify); | ||
| 56 | LCRYPTO_USED(CMS_digest_create); | ||
| 57 | LCRYPTO_USED(CMS_EncryptedData_decrypt); | ||
| 58 | LCRYPTO_USED(CMS_EncryptedData_encrypt); | ||
| 59 | LCRYPTO_USED(CMS_EncryptedData_set1_key); | ||
| 60 | LCRYPTO_USED(CMS_verify); | ||
| 61 | LCRYPTO_USED(CMS_verify_receipt); | ||
| 62 | LCRYPTO_USED(CMS_get0_signers); | ||
| 63 | LCRYPTO_USED(CMS_encrypt); | ||
| 64 | LCRYPTO_USED(CMS_decrypt); | ||
| 65 | LCRYPTO_USED(CMS_decrypt_set1_pkey); | ||
| 66 | LCRYPTO_USED(CMS_decrypt_set1_key); | ||
| 67 | LCRYPTO_USED(CMS_decrypt_set1_password); | ||
| 68 | LCRYPTO_USED(CMS_get0_RecipientInfos); | ||
| 69 | LCRYPTO_USED(CMS_RecipientInfo_type); | ||
| 70 | LCRYPTO_USED(CMS_RecipientInfo_get0_pkey_ctx); | ||
| 71 | LCRYPTO_USED(CMS_EnvelopedData_create); | ||
| 72 | LCRYPTO_USED(CMS_add1_recipient_cert); | ||
| 73 | LCRYPTO_USED(CMS_RecipientInfo_set0_pkey); | ||
| 74 | LCRYPTO_USED(CMS_RecipientInfo_ktri_cert_cmp); | ||
| 75 | LCRYPTO_USED(CMS_RecipientInfo_ktri_get0_algs); | ||
| 76 | LCRYPTO_USED(CMS_RecipientInfo_ktri_get0_signer_id); | ||
| 77 | LCRYPTO_USED(CMS_add0_recipient_key); | ||
| 78 | LCRYPTO_USED(CMS_RecipientInfo_kekri_get0_id); | ||
| 79 | LCRYPTO_USED(CMS_RecipientInfo_set0_key); | ||
| 80 | LCRYPTO_USED(CMS_RecipientInfo_kekri_id_cmp); | ||
| 81 | LCRYPTO_USED(CMS_RecipientInfo_set0_password); | ||
| 82 | LCRYPTO_USED(CMS_add0_recipient_password); | ||
| 83 | LCRYPTO_USED(CMS_RecipientInfo_decrypt); | ||
| 84 | LCRYPTO_USED(CMS_RecipientInfo_encrypt); | ||
| 85 | LCRYPTO_USED(CMS_uncompress); | ||
| 86 | LCRYPTO_USED(CMS_compress); | ||
| 87 | LCRYPTO_USED(CMS_set1_eContentType); | ||
| 88 | LCRYPTO_USED(CMS_get0_eContentType); | ||
| 89 | LCRYPTO_USED(CMS_add0_CertificateChoices); | ||
| 90 | LCRYPTO_USED(CMS_add0_cert); | ||
| 91 | LCRYPTO_USED(CMS_add1_cert); | ||
| 92 | LCRYPTO_USED(CMS_get1_certs); | ||
| 93 | LCRYPTO_USED(CMS_add0_RevocationInfoChoice); | ||
| 94 | LCRYPTO_USED(CMS_add0_crl); | ||
| 95 | LCRYPTO_USED(CMS_add1_crl); | ||
| 96 | LCRYPTO_USED(CMS_get1_crls); | ||
| 97 | LCRYPTO_USED(CMS_SignedData_init); | ||
| 98 | LCRYPTO_USED(CMS_add1_signer); | ||
| 99 | LCRYPTO_USED(CMS_SignerInfo_get0_pkey_ctx); | ||
| 100 | LCRYPTO_USED(CMS_SignerInfo_get0_md_ctx); | ||
| 101 | LCRYPTO_USED(CMS_get0_SignerInfos); | ||
| 102 | LCRYPTO_USED(CMS_SignerInfo_set1_signer_cert); | ||
| 103 | LCRYPTO_USED(CMS_SignerInfo_get0_signer_id); | ||
| 104 | LCRYPTO_USED(CMS_SignerInfo_cert_cmp); | ||
| 105 | LCRYPTO_USED(CMS_set1_signers_certs); | ||
| 106 | LCRYPTO_USED(CMS_SignerInfo_get0_algs); | ||
| 107 | LCRYPTO_USED(CMS_SignerInfo_get0_signature); | ||
| 108 | LCRYPTO_USED(CMS_SignerInfo_sign); | ||
| 109 | LCRYPTO_USED(CMS_SignerInfo_verify); | ||
| 110 | LCRYPTO_USED(CMS_SignerInfo_verify_content); | ||
| 111 | LCRYPTO_USED(CMS_add_smimecap); | ||
| 112 | LCRYPTO_USED(CMS_add_simple_smimecap); | ||
| 113 | LCRYPTO_USED(CMS_add_standard_smimecap); | ||
| 114 | LCRYPTO_USED(CMS_signed_get_attr_count); | ||
| 115 | LCRYPTO_USED(CMS_signed_get_attr_by_NID); | ||
| 116 | LCRYPTO_USED(CMS_signed_get_attr_by_OBJ); | ||
| 117 | LCRYPTO_USED(CMS_signed_get_attr); | ||
| 118 | LCRYPTO_USED(CMS_signed_delete_attr); | ||
| 119 | LCRYPTO_USED(CMS_signed_add1_attr); | ||
| 120 | LCRYPTO_USED(CMS_signed_add1_attr_by_OBJ); | ||
| 121 | LCRYPTO_USED(CMS_signed_add1_attr_by_NID); | ||
| 122 | LCRYPTO_USED(CMS_signed_add1_attr_by_txt); | ||
| 123 | LCRYPTO_USED(CMS_signed_get0_data_by_OBJ); | ||
| 124 | LCRYPTO_USED(CMS_unsigned_get_attr_count); | ||
| 125 | LCRYPTO_USED(CMS_unsigned_get_attr_by_NID); | ||
| 126 | LCRYPTO_USED(CMS_unsigned_get_attr_by_OBJ); | ||
| 127 | LCRYPTO_USED(CMS_unsigned_get_attr); | ||
| 128 | LCRYPTO_USED(CMS_unsigned_delete_attr); | ||
| 129 | LCRYPTO_USED(CMS_unsigned_add1_attr); | ||
| 130 | LCRYPTO_USED(CMS_unsigned_add1_attr_by_OBJ); | ||
| 131 | LCRYPTO_USED(CMS_unsigned_add1_attr_by_NID); | ||
| 132 | LCRYPTO_USED(CMS_unsigned_add1_attr_by_txt); | ||
| 133 | LCRYPTO_USED(CMS_unsigned_get0_data_by_OBJ); | ||
| 134 | LCRYPTO_USED(CMS_RecipientInfo_kari_get0_alg); | ||
| 135 | LCRYPTO_USED(CMS_RecipientInfo_kari_get0_reks); | ||
| 136 | LCRYPTO_USED(CMS_RecipientInfo_kari_get0_orig_id); | ||
| 137 | LCRYPTO_USED(CMS_RecipientInfo_kari_orig_id_cmp); | ||
| 138 | LCRYPTO_USED(CMS_RecipientEncryptedKey_get0_id); | ||
| 139 | LCRYPTO_USED(CMS_RecipientEncryptedKey_cert_cmp); | ||
| 140 | LCRYPTO_USED(CMS_RecipientInfo_kari_set0_pkey); | ||
| 141 | LCRYPTO_USED(CMS_RecipientInfo_kari_get0_ctx); | ||
| 142 | LCRYPTO_USED(CMS_RecipientInfo_kari_decrypt); | ||
| 143 | LCRYPTO_USED(CMS_SharedInfo_encode); | ||
| 144 | LCRYPTO_USED(ERR_load_CMS_strings); | ||
| 145 | |||
| 146 | #endif /* _LIBCRYPTO_CMS_H */ | ||
diff --git a/src/lib/libcrypto/hidden/openssl/comp.h b/src/lib/libcrypto/hidden/openssl/comp.h new file mode 100644 index 0000000000..fc97324eac --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/comp.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* $OpenBSD: comp.h,v 1.1 2023/07/08 08:26:26 beck Exp $ */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> | ||
| 4 | * | ||
| 5 | * Permission to use, copy, modify, and distribute this software for any | ||
| 6 | * purpose with or without fee is hereby granted, provided that the above | ||
| 7 | * copyright notice and this permission notice appear in all copies. | ||
| 8 | * | ||
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef _LIBCRYPTO_COMP_H | ||
| 19 | #define _LIBCRYPTO_COMP_H | ||
| 20 | |||
| 21 | #ifndef _MSC_VER | ||
| 22 | #include_next <openssl/comp.h> | ||
| 23 | #else | ||
| 24 | #include "../include/openssl/comp.h" | ||
| 25 | #endif | ||
| 26 | #include "crypto_namespace.h" | ||
| 27 | |||
| 28 | LCRYPTO_USED(COMP_CTX_new); | ||
| 29 | LCRYPTO_USED(COMP_CTX_free); | ||
| 30 | LCRYPTO_USED(COMP_compress_block); | ||
| 31 | LCRYPTO_USED(COMP_expand_block); | ||
| 32 | LCRYPTO_USED(COMP_rle); | ||
| 33 | LCRYPTO_USED(COMP_zlib); | ||
| 34 | LCRYPTO_USED(COMP_zlib_cleanup); | ||
| 35 | LCRYPTO_USED(ERR_load_COMP_strings); | ||
| 36 | |||
| 37 | #endif /* _LIBCRYPTO_COMP_H */ | ||
diff --git a/src/lib/libcrypto/hidden/openssl/conf_api.h b/src/lib/libcrypto/hidden/openssl/conf_api.h new file mode 100644 index 0000000000..5ff8956616 --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/conf_api.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* $OpenBSD: conf_api.h,v 1.1 2023/07/08 08:26:26 beck Exp $ */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> | ||
| 4 | * | ||
| 5 | * Permission to use, copy, modify, and distribute this software for any | ||
| 6 | * purpose with or without fee is hereby granted, provided that the above | ||
| 7 | * copyright notice and this permission notice appear in all copies. | ||
| 8 | * | ||
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef _LIBCRYPTO_CONF_API_H | ||
| 19 | #define _LIBCRYPTO_CONF_API_H | ||
| 20 | |||
| 21 | #ifndef _MSC_VER | ||
| 22 | #include_next <openssl/conf_api.h> | ||
| 23 | #else | ||
| 24 | #include "../include/openssl/conf_api.h" | ||
| 25 | #endif | ||
| 26 | #include "crypto_namespace.h" | ||
| 27 | |||
| 28 | LCRYPTO_USED(_CONF_new_section); | ||
| 29 | LCRYPTO_USED(_CONF_get_section); | ||
| 30 | LCRYPTO_USED(_CONF_get_section_values); | ||
| 31 | LCRYPTO_USED(_CONF_add_string); | ||
| 32 | LCRYPTO_USED(_CONF_get_string); | ||
| 33 | LCRYPTO_USED(_CONF_new_data); | ||
| 34 | LCRYPTO_USED(_CONF_free_data); | ||
| 35 | |||
| 36 | #endif /* _LIBCRYPTO_CONF_API_H */ | ||
