diff options
author | tb <> | 2024-08-31 10:25:38 +0000 |
---|---|---|
committer | tb <> | 2024-08-31 10:25:38 +0000 |
commit | dfe0db320ed7b242f95c66b5d0cb7525257a6882 (patch) | |
tree | 25c9f27a907b66043fdde3e70d610ed8b539167e /src/lib | |
parent | df13e5b090fdd7526e1f2c4242ff8deb5a98c783 (diff) | |
download | openbsd-dfe0db320ed7b242f95c66b5d0cb7525257a6882.tar.gz openbsd-dfe0db320ed7b242f95c66b5d0cb7525257a6882.tar.bz2 openbsd-dfe0db320ed7b242f95c66b5d0cb7525257a6882.zip |
Remove EVP_PKEY.*attr* API
I ranted enough about this recently. PKCS#12. Microsoft. 'nuff said.
ok beck jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/Symbols.list | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp_pkey.c | 82 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/x509.h | 11 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 20 |
4 files changed, 3 insertions, 119 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 801e87e3d7..89cfae2f2a 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
@@ -1209,10 +1209,6 @@ EVP_PKEY_CTX_set0_keygen_info | |||
1209 | EVP_PKEY_CTX_set_app_data | 1209 | EVP_PKEY_CTX_set_app_data |
1210 | EVP_PKEY_CTX_set_cb | 1210 | EVP_PKEY_CTX_set_cb |
1211 | EVP_PKEY_CTX_set_data | 1211 | EVP_PKEY_CTX_set_data |
1212 | EVP_PKEY_add1_attr | ||
1213 | EVP_PKEY_add1_attr_by_NID | ||
1214 | EVP_PKEY_add1_attr_by_OBJ | ||
1215 | EVP_PKEY_add1_attr_by_txt | ||
1216 | EVP_PKEY_asn1_find | 1212 | EVP_PKEY_asn1_find |
1217 | EVP_PKEY_asn1_find_str | 1213 | EVP_PKEY_asn1_find_str |
1218 | EVP_PKEY_asn1_get0 | 1214 | EVP_PKEY_asn1_get0 |
@@ -1227,7 +1223,6 @@ EVP_PKEY_copy_parameters | |||
1227 | EVP_PKEY_decrypt | 1223 | EVP_PKEY_decrypt |
1228 | EVP_PKEY_decrypt_init | 1224 | EVP_PKEY_decrypt_init |
1229 | EVP_PKEY_decrypt_old | 1225 | EVP_PKEY_decrypt_old |
1230 | EVP_PKEY_delete_attr | ||
1231 | EVP_PKEY_derive | 1226 | EVP_PKEY_derive |
1232 | EVP_PKEY_derive_init | 1227 | EVP_PKEY_derive_init |
1233 | EVP_PKEY_derive_set_peer | 1228 | EVP_PKEY_derive_set_peer |
@@ -1246,10 +1241,6 @@ EVP_PKEY_get1_DH | |||
1246 | EVP_PKEY_get1_DSA | 1241 | EVP_PKEY_get1_DSA |
1247 | EVP_PKEY_get1_EC_KEY | 1242 | EVP_PKEY_get1_EC_KEY |
1248 | EVP_PKEY_get1_RSA | 1243 | EVP_PKEY_get1_RSA |
1249 | EVP_PKEY_get_attr | ||
1250 | EVP_PKEY_get_attr_by_NID | ||
1251 | EVP_PKEY_get_attr_by_OBJ | ||
1252 | EVP_PKEY_get_attr_count | ||
1253 | EVP_PKEY_get_default_digest_nid | 1244 | EVP_PKEY_get_default_digest_nid |
1254 | EVP_PKEY_get_raw_private_key | 1245 | EVP_PKEY_get_raw_private_key |
1255 | EVP_PKEY_get_raw_public_key | 1246 | EVP_PKEY_get_raw_public_key |
diff --git a/src/lib/libcrypto/evp/evp_pkey.c b/src/lib/libcrypto/evp/evp_pkey.c index dcbd51f08d..5bec811060 100644 --- a/src/lib/libcrypto/evp/evp_pkey.c +++ b/src/lib/libcrypto/evp/evp_pkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_pkey.c,v 1.31 2024/08/22 12:21:07 tb Exp $ */ | 1 | /* $OpenBSD: evp_pkey.c,v 1.32 2024/08/31 10:25:38 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -140,83 +140,3 @@ error: | |||
140 | return NULL; | 140 | return NULL; |
141 | } | 141 | } |
142 | LCRYPTO_ALIAS(EVP_PKEY2PKCS8); | 142 | LCRYPTO_ALIAS(EVP_PKEY2PKCS8); |
143 | |||
144 | /* | ||
145 | * XXX - delete all the garbage below in the next bump. | ||
146 | */ | ||
147 | |||
148 | int | ||
149 | EVP_PKEY_add1_attr_by_NID(EVP_PKEY *pkey, int nid, int type, | ||
150 | const unsigned char *bytes, int len) | ||
151 | { | ||
152 | EVPerror(ERR_R_DISABLED); | ||
153 | return 0; | ||
154 | } | ||
155 | LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_NID); | ||
156 | |||
157 | int | ||
158 | EVP_PKEY_get_attr_count(const EVP_PKEY *key) | ||
159 | { | ||
160 | EVPerror(ERR_R_DISABLED); | ||
161 | return 0; | ||
162 | } | ||
163 | LCRYPTO_ALIAS(EVP_PKEY_get_attr_count); | ||
164 | |||
165 | int | ||
166 | EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos) | ||
167 | { | ||
168 | EVPerror(ERR_R_DISABLED); | ||
169 | return -1; | ||
170 | } | ||
171 | LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_NID); | ||
172 | |||
173 | int | ||
174 | EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, | ||
175 | int lastpos) | ||
176 | { | ||
177 | EVPerror(ERR_R_DISABLED); | ||
178 | return -1; | ||
179 | } | ||
180 | LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_OBJ); | ||
181 | |||
182 | X509_ATTRIBUTE * | ||
183 | EVP_PKEY_get_attr(const EVP_PKEY *key, int loc) | ||
184 | { | ||
185 | EVPerror(ERR_R_DISABLED); | ||
186 | return NULL; | ||
187 | } | ||
188 | LCRYPTO_ALIAS(EVP_PKEY_get_attr); | ||
189 | |||
190 | X509_ATTRIBUTE * | ||
191 | EVP_PKEY_delete_attr(EVP_PKEY *key, int loc) | ||
192 | { | ||
193 | EVPerror(ERR_R_DISABLED); | ||
194 | return NULL; | ||
195 | } | ||
196 | LCRYPTO_ALIAS(EVP_PKEY_delete_attr); | ||
197 | |||
198 | int | ||
199 | EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr) | ||
200 | { | ||
201 | EVPerror(ERR_R_DISABLED); | ||
202 | return 0; | ||
203 | } | ||
204 | LCRYPTO_ALIAS(EVP_PKEY_add1_attr); | ||
205 | |||
206 | int | ||
207 | EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type, | ||
208 | const unsigned char *bytes, int len) | ||
209 | { | ||
210 | EVPerror(ERR_R_DISABLED); | ||
211 | return 0; | ||
212 | } | ||
213 | LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_OBJ); | ||
214 | |||
215 | int | ||
216 | EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type, | ||
217 | const unsigned char *bytes, int len) | ||
218 | { | ||
219 | EVPerror(ERR_R_DISABLED); | ||
220 | return 0; | ||
221 | } | ||
222 | LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_txt); | ||
diff --git a/src/lib/libcrypto/hidden/openssl/x509.h b/src/lib/libcrypto/hidden/openssl/x509.h index 41045af3ba..e25250d469 100644 --- a/src/lib/libcrypto/hidden/openssl/x509.h +++ b/src/lib/libcrypto/hidden/openssl/x509.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.h,v 1.12 2024/08/31 10:16:52 tb Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.13 2024/08/31 10:25:38 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2022 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2022 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -440,15 +440,6 @@ LCRYPTO_USED(X509_ocspid_print); | |||
440 | LCRYPTO_USED(X509_CRL_print); | 440 | LCRYPTO_USED(X509_CRL_print); |
441 | LCRYPTO_USED(X509_REQ_print_ex); | 441 | LCRYPTO_USED(X509_REQ_print_ex); |
442 | LCRYPTO_USED(X509_REQ_print); | 442 | LCRYPTO_USED(X509_REQ_print); |
443 | LCRYPTO_UNUSED(EVP_PKEY_get_attr_count); | ||
444 | LCRYPTO_UNUSED(EVP_PKEY_get_attr_by_NID); | ||
445 | LCRYPTO_UNUSED(EVP_PKEY_get_attr_by_OBJ); | ||
446 | LCRYPTO_UNUSED(EVP_PKEY_get_attr); | ||
447 | LCRYPTO_UNUSED(EVP_PKEY_delete_attr); | ||
448 | LCRYPTO_UNUSED(EVP_PKEY_add1_attr); | ||
449 | LCRYPTO_UNUSED(EVP_PKEY_add1_attr_by_OBJ); | ||
450 | LCRYPTO_UNUSED(EVP_PKEY_add1_attr_by_NID); | ||
451 | LCRYPTO_UNUSED(EVP_PKEY_add1_attr_by_txt); | ||
452 | LCRYPTO_USED(PKCS8_PRIV_KEY_INFO_new); | 443 | LCRYPTO_USED(PKCS8_PRIV_KEY_INFO_new); |
453 | LCRYPTO_USED(PKCS8_PRIV_KEY_INFO_free); | 444 | LCRYPTO_USED(PKCS8_PRIV_KEY_INFO_free); |
454 | LCRYPTO_USED(d2i_PKCS8_PRIV_KEY_INFO); | 445 | LCRYPTO_USED(d2i_PKCS8_PRIV_KEY_INFO); |
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index bcae39aa52..ad3bb0f0f2 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.h,v 1.116 2024/08/31 10:16:52 tb Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.117 2024/08/31 10:25:38 tb 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 | * |
@@ -940,24 +940,6 @@ int X509_ATTRIBUTE_count(const X509_ATTRIBUTE *attr); | |||
940 | ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); | 940 | ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); |
941 | ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); | 941 | ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); |
942 | 942 | ||
943 | int EVP_PKEY_get_attr_count(const EVP_PKEY *key); | ||
944 | int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, | ||
945 | int lastpos); | ||
946 | int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, | ||
947 | int lastpos); | ||
948 | X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc); | ||
949 | X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc); | ||
950 | int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr); | ||
951 | int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, | ||
952 | const ASN1_OBJECT *obj, int type, | ||
953 | const unsigned char *bytes, int len); | ||
954 | int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, | ||
955 | int nid, int type, | ||
956 | const unsigned char *bytes, int len); | ||
957 | int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, | ||
958 | const char *attrname, int type, | ||
959 | const unsigned char *bytes, int len); | ||
960 | |||
961 | int X509_verify_cert(X509_STORE_CTX *ctx); | 943 | int X509_verify_cert(X509_STORE_CTX *ctx); |
962 | 944 | ||
963 | /* lookup a cert from a X509 STACK */ | 945 | /* lookup a cert from a X509 STACK */ |