diff options
Diffstat (limited to 'include/crypto/evp.h')
-rw-r--r-- | include/crypto/evp.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h index b0e82f6c81..0ed9a02396 100644 --- a/include/crypto/evp.h +++ b/include/crypto/evp.h @@ -705,6 +705,9 @@ struct evp_pkey_st { ((ctx)->operation == EVP_PKEY_OP_PARAMGEN \ || (ctx)->operation == EVP_PKEY_OP_KEYGEN) +#define EVP_PKEY_CTX_IS_FROMDATA_OP(ctx) \ + ((ctx)->operation == EVP_PKEY_OP_FROMDATA) + #define EVP_PKEY_CTX_IS_KEM_OP(ctx) \ ((ctx)->operation == EVP_PKEY_OP_ENCAPSULATE \ || (ctx)->operation == EVP_PKEY_OP_DECAPSULATE) @@ -869,4 +872,18 @@ EVP_PKEY *evp_privatekey_from_binary(int keytype, EVP_PKEY **a, # define EVP_PKEY_STATE_PROVIDER 2 int evp_pkey_ctx_state(const EVP_PKEY_CTX *ctx); +/* These two must ONLY be called for provider side operations */ +int evp_pkey_ctx_ctrl_to_param(EVP_PKEY_CTX *ctx, + int keytype, int optype, + int cmd, int p1, void *p2); +int evp_pkey_ctx_ctrl_str_to_param(EVP_PKEY_CTX *ctx, + const char *name, const char *value); + +/* These two must ONLY be called for legacy operations */ +int evp_pkey_ctx_set_params_to_ctrl(EVP_PKEY_CTX *ctx, OSSL_PARAM *params); +int evp_pkey_ctx_get_params_to_ctrl(EVP_PKEY_CTX *ctx, OSSL_PARAM *params); + +/* This must ONLY be called for legacy EVP_PKEYs */ +int evp_pkey_get_params_to_ctrl(const EVP_PKEY *pkey, OSSL_PARAM *params); + #endif /* OSSL_CRYPTO_EVP_H */ |