summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp.h
diff options
context:
space:
mode:
authortb <>2024-03-02 10:04:40 +0000
committertb <>2024-03-02 10:04:40 +0000
commitdd0f795db17e3461ba7c60f8116c3ead2cc485b9 (patch)
tree2abf257b03be6f8145317d295d64d224dc93fbee /src/lib/libcrypto/evp/evp.h
parent10d41204e8ddb50a380449ffe06fcbff6b901565 (diff)
downloadopenbsd-dd0f795db17e3461ba7c60f8116c3ead2cc485b9.tar.gz
openbsd-dd0f795db17e3461ba7c60f8116c3ead2cc485b9.tar.bz2
openbsd-dd0f795db17e3461ba7c60f8116c3ead2cc485b9.zip
Remove EVP_PKEY_meth_*() API
After ameth, the second bit of custom EVP_PKEY API removal. ok jsing
Diffstat (limited to 'src/lib/libcrypto/evp/evp.h')
-rw-r--r--src/lib/libcrypto/evp/evp.h77
1 files changed, 1 insertions, 76 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index 90e29bd0d8..eba3ab3869 100644
--- a/src/lib/libcrypto/evp/evp.h
+++ b/src/lib/libcrypto/evp/evp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp.h,v 1.126 2024/03/02 10:03:13 tb Exp $ */ 1/* $OpenBSD: evp.h,v 1.127 2024/03/02 10:04:40 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 *
@@ -1004,14 +1004,6 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey);
1004 */ 1004 */
1005#define EVP_PKEY_FLAG_SIGCTX_CUSTOM 4 1005#define EVP_PKEY_FLAG_SIGCTX_CUSTOM 4
1006 1006
1007const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
1008EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
1009void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
1010 const EVP_PKEY_METHOD *meth);
1011void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
1012void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
1013int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
1014
1015EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); 1007EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
1016EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e); 1008EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
1017EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx); 1009EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
@@ -1074,73 +1066,6 @@ EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
1074 1066
1075int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx); 1067int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
1076 1068
1077void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
1078 int (*init)(EVP_PKEY_CTX *ctx));
1079
1080void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
1081 int (*copy)(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src));
1082
1083void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
1084 void (*cleanup)(EVP_PKEY_CTX *ctx));
1085
1086void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
1087 int (*paramgen_init)(EVP_PKEY_CTX *ctx),
1088 int (*paramgen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
1089
1090void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
1091 int (*keygen_init)(EVP_PKEY_CTX *ctx),
1092 int (*keygen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
1093
1094void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
1095 int (*sign_init)(EVP_PKEY_CTX *ctx),
1096 int (*sign)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
1097 const unsigned char *tbs, size_t tbslen));
1098
1099void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
1100 int (*verify_init)(EVP_PKEY_CTX *ctx),
1101 int (*verify)(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen,
1102 const unsigned char *tbs, size_t tbslen));
1103
1104void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
1105 int (*verify_recover_init)(EVP_PKEY_CTX *ctx),
1106 int (*verify_recover)(EVP_PKEY_CTX *ctx, unsigned char *sig,
1107 size_t *siglen, const unsigned char *tbs, size_t tbslen));
1108
1109void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
1110 int (*signctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx),
1111 int (*signctx)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
1112 EVP_MD_CTX *mctx));
1113
1114void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
1115 int (*verifyctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx),
1116 int (*verifyctx)(EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen,
1117 EVP_MD_CTX *mctx));
1118
1119void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
1120 int (*encrypt_init)(EVP_PKEY_CTX *ctx),
1121 int (*encryptfn)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
1122 const unsigned char *in, size_t inlen));
1123
1124void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
1125 int (*decrypt_init)(EVP_PKEY_CTX *ctx),
1126 int (*decrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
1127 const unsigned char *in, size_t inlen));
1128
1129void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
1130 int (*derive_init)(EVP_PKEY_CTX *ctx),
1131 int (*derive)(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen));
1132
1133void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
1134 int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2),
1135 int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value));
1136
1137void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth,
1138 int (*check)(EVP_PKEY *pkey));
1139void EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth,
1140 int (*public_check)(EVP_PKEY *pkey));
1141void EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth,
1142 int (*param_check)(EVP_PKEY *pkey));
1143
1144/* Authenticated Encryption with Additional Data. 1069/* Authenticated Encryption with Additional Data.
1145 * 1070 *
1146 * AEAD couples confidentiality and integrity in a single primtive. AEAD 1071 * AEAD couples confidentiality and integrity in a single primtive. AEAD