]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Clean up some final vistigial remnants of EVP_PKEY_METHOD
authorMatt Caswell <matt@openssl.org>
Fri, 12 Dec 2025 12:01:56 +0000 (12:01 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 18 Dec 2025 10:57:39 +0000 (10:57 +0000)
We retain the opaque type because it is still used by the ENGINE stubs.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/29384)

crypto/dh/dh_backend.c
crypto/dsa/dsa_backend.c
crypto/ec/ec_backend.c
crypto/ec/ecx_backend.c
crypto/evp/keymgmt_meth.c
crypto/ffc/ffc_backend.c
crypto/rsa/rsa_backend.c
include/crypto/evp.h

index 4a3e2b2e423451d792076a2afbac1aa3037a92cc..264389e0b3eddefd4512dbc3b14837cfd365d6a6 100644 (file)
@@ -24,8 +24,8 @@
 
 /*
  * The intention with the "backend" source file is to offer backend functions
- * for legacy backends (EVP_PKEY_ASN1_METHOD and EVP_PKEY_METHOD) and provider
- * implementations alike.
+ * for legacy backends (EVP_PKEY_ASN1_METHOD) and provider implementations
+ * alike.
  */
 
 static int dh_ffc_params_fromdata(DH *dh, const OSSL_PARAM params[])
index e4c1c7bb01ec969315f2ab23cfe95f4b63371648..aca659c82fee92a5359d1fc3496c152fdc9f1795 100644 (file)
@@ -22,9 +22,9 @@
 #include "dsa_local.h"
 
 /*
- * The intention with the "backend" source file is to offer backend support
- * for legacy backends (EVP_PKEY_ASN1_METHOD and EVP_PKEY_METHOD) and provider
- * implementations alike.
+ * The intention with the "backend" source file is to offer backend functions
+ * for legacy backends (EVP_PKEY_ASN1_METHOD) and provider implementations
+ * alike.
  */
 
 int ossl_dsa_key_fromdata(DSA *dsa, const OSSL_PARAM params[],
index b100af0c60f80add3b9e408e5597189814106f98..52cb86832382464f4998c79724f32bd7d4198fe2 100644 (file)
@@ -351,9 +351,9 @@ err:
 }
 
 /*
- * The intention with the "backend" source file is to offer backend support
- * for legacy backends (EVP_PKEY_ASN1_METHOD and EVP_PKEY_METHOD) and provider
- * implementations alike.
+ * The intention with the "backend" source file is to offer backend functions
+ * for legacy backends (EVP_PKEY_ASN1_METHOD) and provider implementations
+ * alike.
  */
 int ossl_ec_set_ecdh_cofactor_mode(EC_KEY *ec, int mode)
 {
index 40daf30e1aaf3a798d1e44653d1320067d57a838..710ad31a66788f44e2abc979488152a668c75a0e 100644 (file)
@@ -20,9 +20,9 @@
 #include "ecx_backend.h"
 
 /*
- * The intention with the "backend" source file is to offer backend support
- * for legacy backends (EVP_PKEY_ASN1_METHOD and EVP_PKEY_METHOD) and provider
- * implementations alike.
+ * The intention with the "backend" source file is to offer backend functions
+ * for legacy backends (EVP_PKEY_ASN1_METHOD) and provider implementations
+ * alike.
  */
 
 int ossl_ecx_public_from_private(ECX_KEY *key)
index 465e669a7127b54f37cca753cdbbd3685a13c07f..b57e817e51000a60a07b38062698252bc2592af4 100644 (file)
@@ -401,8 +401,8 @@ int evp_keymgmt_gen_set_template(const EVP_KEYMGMT *keymgmt, void *genctx,
     /*
      * It's arguable if we actually should return success in this case, as
      * it allows the caller to set a template key, which is then ignored.
-     * However, this is how the legacy methods (EVP_PKEY_METHOD) operate,
-     * so we do this in the interest of backward compatibility.
+     * However, this is how the legacy methods used to operate, so we do this in
+     * the interest of backward compatibility.
      */
     if (keymgmt->gen_set_template == NULL)
         return 1;
index fa3182bc80a78afc3682ea1f7398498615ee855b..cc54d38b0b60e35dc83910395fc445fc2f3b2432 100644 (file)
@@ -12,9 +12,9 @@
 #include "internal/sizes.h"
 
 /*
- * The intention with the "backend" source file is to offer backend support
- * for legacy backends (EVP_PKEY_ASN1_METHOD and EVP_PKEY_METHOD) and provider
- * implementations alike.
+ * The intention with the "backend" source file is to offer backend functions
+ * for legacy backends (EVP_PKEY_ASN1_METHOD) and provider implementations
+ * alike.
  */
 
 int ossl_ffc_params_fromdata(FFC_PARAMS *ffc, const OSSL_PARAM params[])
index 8ed857414dceb806eef40eac5bf31be71cc56110..119ed3f66046ee4d1bf0ec02160efb282e9a35ab 100644 (file)
@@ -28,9 +28,9 @@
 #include "rsa_local.h"
 
 /*
- * The intention with the "backend" source file is to offer backend support
- * for legacy backends (EVP_PKEY_ASN1_METHOD and EVP_PKEY_METHOD) and provider
- * implementations alike.
+ * The intention with the "backend" source file is to offer backend functions
+ * for legacy backends (EVP_PKEY_ASN1_METHOD) and provider implementations
+ * alike.
  */
 
 DEFINE_STACK_OF(BIGNUM)
index 1141ca994ee30b0ccf00c8bd9527fdc5bc6b0e43..43f5068f0776bb4171027576b7c72a8f24d57b3b 100644 (file)
@@ -136,70 +136,8 @@ struct evp_pkey_ctx_st {
 
 #define EVP_PKEY_FLAG_DYNAMIC 1
 
-struct evp_pkey_method_st {
-    int pkey_id;
-    int flags;
-    int (*init)(EVP_PKEY_CTX *ctx);
-    int (*copy)(EVP_PKEY_CTX *dst, const EVP_PKEY_CTX *src);
-    void (*cleanup)(EVP_PKEY_CTX *ctx);
-    int (*paramgen_init)(EVP_PKEY_CTX *ctx);
-    int (*paramgen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey);
-    int (*keygen_init)(EVP_PKEY_CTX *ctx);
-    int (*keygen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey);
-    int (*sign_init)(EVP_PKEY_CTX *ctx);
-    int (*sign)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
-        const unsigned char *tbs, size_t tbslen);
-    int (*verify_init)(EVP_PKEY_CTX *ctx);
-    int (*verify)(EVP_PKEY_CTX *ctx,
-        const unsigned char *sig, size_t siglen,
-        const unsigned char *tbs, size_t tbslen);
-    int (*verify_recover_init)(EVP_PKEY_CTX *ctx);
-    int (*verify_recover)(EVP_PKEY_CTX *ctx,
-        unsigned char *rout, size_t *routlen,
-        const unsigned char *sig, size_t siglen);
-    int (*signctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx);
-    int (*signctx)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
-        EVP_MD_CTX *mctx);
-    int (*verifyctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx);
-    int (*verifyctx)(EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen,
-        EVP_MD_CTX *mctx);
-    int (*encrypt_init)(EVP_PKEY_CTX *ctx);
-    int (*encrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
-        const unsigned char *in, size_t inlen);
-    int (*decrypt_init)(EVP_PKEY_CTX *ctx);
-    int (*decrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
-        const unsigned char *in, size_t inlen);
-    int (*derive_init)(EVP_PKEY_CTX *ctx);
-    int (*derive)(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
-    int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2);
-    int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value);
-    int (*digestsign)(EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen,
-        const unsigned char *tbs, size_t tbslen);
-    int (*digestverify)(EVP_MD_CTX *ctx, const unsigned char *sig,
-        size_t siglen, const unsigned char *tbs,
-        size_t tbslen);
-    int (*check)(EVP_PKEY *pkey);
-    int (*public_check)(EVP_PKEY *pkey);
-    int (*param_check)(EVP_PKEY *pkey);
-
-    int (*digest_custom)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx);
-} /* EVP_PKEY_METHOD */;
-
-DEFINE_STACK_OF_CONST(EVP_PKEY_METHOD)
-
 void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx);
 
-const EVP_PKEY_METHOD *ossl_dh_pkey_method(void);
-const EVP_PKEY_METHOD *ossl_dhx_pkey_method(void);
-const EVP_PKEY_METHOD *ossl_dsa_pkey_method(void);
-const EVP_PKEY_METHOD *ossl_ec_pkey_method(void);
-const EVP_PKEY_METHOD *ossl_ecx25519_pkey_method(void);
-const EVP_PKEY_METHOD *ossl_ecx448_pkey_method(void);
-const EVP_PKEY_METHOD *ossl_ed25519_pkey_method(void);
-const EVP_PKEY_METHOD *ossl_ed448_pkey_method(void);
-const EVP_PKEY_METHOD *ossl_rsa_pkey_method(void);
-const EVP_PKEY_METHOD *ossl_rsa_pss_pkey_method(void);
-
 struct evp_mac_st {
     OSSL_PROVIDER *prov;
     int name_id;