diff options
| author | beck <> | 2023-07-08 08:26:26 +0000 |
|---|---|---|
| committer | beck <> | 2023-07-08 08:26:26 +0000 |
| commit | cf9b236f0893157746f8b944e4f6cc8d8a6aca26 (patch) | |
| tree | fcfb051a056f2d002add550f13e8e12390dedcd6 /src/lib/libcrypto/cms | |
| parent | b73d110b33338f5dd55f8edf8a6c9a557c4c5d06 (diff) | |
| download | openbsd-cf9b236f0893157746f8b944e4f6cc8d8a6aca26.tar.gz openbsd-cf9b236f0893157746f8b944e4f6cc8d8a6aca26.tar.bz2 openbsd-cf9b236f0893157746f8b944e4f6cc8d8a6aca26.zip | |
Hide symbols in cms, comp, conf, and buffer
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/cms')
| -rw-r--r-- | src/lib/libcrypto/cms/cms_asn1.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_att.c | 22 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_enc.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_env.c | 17 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_err.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_ess.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_io.c | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_kari.c | 11 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_lib.c | 22 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_pwri.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_sd.c | 20 | ||||
| -rw-r--r-- | src/lib/libcrypto/cms/cms_smime.c | 20 |
12 files changed, 129 insertions, 12 deletions
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); | ||
