diff options
author | Nicola Tuveri <nic.tuv@gmail.com> | 2019-12-15 00:20:53 +0200 |
---|---|---|
committer | Nicola Tuveri <nic.tuv@gmail.com> | 2020-02-18 19:11:10 +0200 |
commit | 4fe54d674f14e7964f982285d1aeb86698a33c3c (patch) | |
tree | 22b2e7ef133ef38ba551719538d68422f2d0b500 /include/crypto/evp.h | |
parent | cf6404b14198b96a882affe917bb337e2626136c (diff) |
[PROV][KMGMT][KEXCH][EC] Implement EC keymgtm and ECDH
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10631)
Diffstat (limited to 'include/crypto/evp.h')
-rw-r--r-- | include/crypto/evp.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h index 65889ae812..0f5e86b28e 100644 --- a/include/crypto/evp.h +++ b/include/crypto/evp.h @@ -594,6 +594,9 @@ void evp_keymgmt_freedata(const EVP_KEYMGMT *keymgmt, void *keyddata); int evp_keymgmt_get_params(const EVP_KEYMGMT *keymgmt, void *keydata, OSSL_PARAM params[]); const OSSL_PARAM *evp_keymgmt_gettable_params(const EVP_KEYMGMT *keymgmt); +int evp_keymgmt_set_params(const EVP_KEYMGMT *keymgmt, + void *keydata, const OSSL_PARAM params[]); +const OSSL_PARAM *evp_keymgmt_settable_params(const EVP_KEYMGMT *keymgmt); int evp_keymgmt_has(const EVP_KEYMGMT *keymgmt, void *keyddata, int selection); @@ -627,3 +630,19 @@ void evp_encode_ctx_set_flags(EVP_ENCODE_CTX *ctx, unsigned int flags); const EVP_CIPHER *evp_get_cipherbyname_ex(OPENSSL_CTX *libctx, const char *name); const EVP_MD *evp_get_digestbyname_ex(OPENSSL_CTX *libctx, const char *name); +#ifndef FIPS_MODE +/* + * Internal helpers for stricter EVP_PKEY_CTX_{set,get}_params(). + * + * Return 1 on success, 0 or negative for errors. + * + * In particular they return -2 if any of the params is not supported. + * + * They are not available in FIPS_MODE as they depend on + * - EVP_PKEY_CTX_{get,set}_params() + * - EVP_PKEY_CTX_{gettable,settable}_params() + * + */ +int evp_pkey_ctx_set_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params); +int evp_pkey_ctx_get_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params); +#endif /* !defined(FIPS_MODE) */ |