From: tb Date: Sat, 31 Aug 2024 10:25:38 +0000 (+0000) Subject: Remove EVP_PKEY.*attr* API X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5aed398425729f97c6f909acec1c9324fce0a76d;p=openbsd Remove EVP_PKEY.*attr* API I ranted enough about this recently. PKCS#12. Microsoft. 'nuff said. ok beck jsing --- diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index 801e87e3d7c..89cfae2f2a1 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -1209,10 +1209,6 @@ EVP_PKEY_CTX_set0_keygen_info EVP_PKEY_CTX_set_app_data EVP_PKEY_CTX_set_cb EVP_PKEY_CTX_set_data -EVP_PKEY_add1_attr -EVP_PKEY_add1_attr_by_NID -EVP_PKEY_add1_attr_by_OBJ -EVP_PKEY_add1_attr_by_txt EVP_PKEY_asn1_find EVP_PKEY_asn1_find_str EVP_PKEY_asn1_get0 @@ -1227,7 +1223,6 @@ EVP_PKEY_copy_parameters EVP_PKEY_decrypt EVP_PKEY_decrypt_init EVP_PKEY_decrypt_old -EVP_PKEY_delete_attr EVP_PKEY_derive EVP_PKEY_derive_init EVP_PKEY_derive_set_peer @@ -1246,10 +1241,6 @@ EVP_PKEY_get1_DH EVP_PKEY_get1_DSA EVP_PKEY_get1_EC_KEY EVP_PKEY_get1_RSA -EVP_PKEY_get_attr -EVP_PKEY_get_attr_by_NID -EVP_PKEY_get_attr_by_OBJ -EVP_PKEY_get_attr_count EVP_PKEY_get_default_digest_nid EVP_PKEY_get_raw_private_key EVP_PKEY_get_raw_public_key diff --git a/lib/libcrypto/evp/evp_pkey.c b/lib/libcrypto/evp/evp_pkey.c index dcbd51f08de..5bec811060f 100644 --- a/lib/libcrypto/evp/evp_pkey.c +++ b/lib/libcrypto/evp/evp_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_pkey.c,v 1.31 2024/08/22 12:21:07 tb Exp $ */ +/* $OpenBSD: evp_pkey.c,v 1.32 2024/08/31 10:25:38 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -140,83 +140,3 @@ error: return NULL; } LCRYPTO_ALIAS(EVP_PKEY2PKCS8); - -/* - * XXX - delete all the garbage below in the next bump. - */ - -int -EVP_PKEY_add1_attr_by_NID(EVP_PKEY *pkey, int nid, int type, - const unsigned char *bytes, int len) -{ - EVPerror(ERR_R_DISABLED); - return 0; -} -LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_NID); - -int -EVP_PKEY_get_attr_count(const EVP_PKEY *key) -{ - EVPerror(ERR_R_DISABLED); - return 0; -} -LCRYPTO_ALIAS(EVP_PKEY_get_attr_count); - -int -EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos) -{ - EVPerror(ERR_R_DISABLED); - return -1; -} -LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_NID); - -int -EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, - int lastpos) -{ - EVPerror(ERR_R_DISABLED); - return -1; -} -LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_OBJ); - -X509_ATTRIBUTE * -EVP_PKEY_get_attr(const EVP_PKEY *key, int loc) -{ - EVPerror(ERR_R_DISABLED); - return NULL; -} -LCRYPTO_ALIAS(EVP_PKEY_get_attr); - -X509_ATTRIBUTE * -EVP_PKEY_delete_attr(EVP_PKEY *key, int loc) -{ - EVPerror(ERR_R_DISABLED); - return NULL; -} -LCRYPTO_ALIAS(EVP_PKEY_delete_attr); - -int -EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr) -{ - EVPerror(ERR_R_DISABLED); - return 0; -} -LCRYPTO_ALIAS(EVP_PKEY_add1_attr); - -int -EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type, - const unsigned char *bytes, int len) -{ - EVPerror(ERR_R_DISABLED); - return 0; -} -LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_OBJ); - -int -EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type, - const unsigned char *bytes, int len) -{ - EVPerror(ERR_R_DISABLED); - return 0; -} -LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_txt); diff --git a/lib/libcrypto/hidden/openssl/x509.h b/lib/libcrypto/hidden/openssl/x509.h index 41045af3ba2..e25250d469a 100644 --- a/lib/libcrypto/hidden/openssl/x509.h +++ b/lib/libcrypto/hidden/openssl/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.12 2024/08/31 10:16:52 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.13 2024/08/31 10:25:38 tb Exp $ */ /* * Copyright (c) 2022 Bob Beck * @@ -440,15 +440,6 @@ LCRYPTO_USED(X509_ocspid_print); LCRYPTO_USED(X509_CRL_print); LCRYPTO_USED(X509_REQ_print_ex); LCRYPTO_USED(X509_REQ_print); -LCRYPTO_UNUSED(EVP_PKEY_get_attr_count); -LCRYPTO_UNUSED(EVP_PKEY_get_attr_by_NID); -LCRYPTO_UNUSED(EVP_PKEY_get_attr_by_OBJ); -LCRYPTO_UNUSED(EVP_PKEY_get_attr); -LCRYPTO_UNUSED(EVP_PKEY_delete_attr); -LCRYPTO_UNUSED(EVP_PKEY_add1_attr); -LCRYPTO_UNUSED(EVP_PKEY_add1_attr_by_OBJ); -LCRYPTO_UNUSED(EVP_PKEY_add1_attr_by_NID); -LCRYPTO_UNUSED(EVP_PKEY_add1_attr_by_txt); LCRYPTO_USED(PKCS8_PRIV_KEY_INFO_new); LCRYPTO_USED(PKCS8_PRIV_KEY_INFO_free); LCRYPTO_USED(d2i_PKCS8_PRIV_KEY_INFO); diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index bcae39aa52e..ad3bb0f0f29 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.116 2024/08/31 10:16:52 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.117 2024/08/31 10:25:38 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -940,24 +940,6 @@ int X509_ATTRIBUTE_count(const X509_ATTRIBUTE *attr); ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); -int EVP_PKEY_get_attr_count(const EVP_PKEY *key); -int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, - int lastpos); -int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, - int lastpos); -X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc); -X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc); -int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr); -int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, - const ASN1_OBJECT *obj, int type, - const unsigned char *bytes, int len); -int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, - int nid, int type, - const unsigned char *bytes, int len); -int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, - const char *attrname, int type, - const unsigned char *bytes, int len); - int X509_verify_cert(X509_STORE_CTX *ctx); /* lookup a cert from a X509 STACK */