summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-10-30 18:03:07 +0100
committerRichard Levitte <levitte@openssl.org>2019-11-05 22:20:06 +0100
commitc0e0984f125ee30820520829c4c112b1e166f871 (patch)
treefbc23f98d35454a4b83bd08b11dea17acd0e8460 /include
parent677c4a012a7e72b5f2dd239639034f01fad850bf (diff)
EVP: Make the KEYEXCH implementation leaner
Because the algorithm to use is decided already when creating an EVP_PKEY_CTX regardless of how it was created, it turns out that it's unnecessary to provide the KEYEXCH method explicitly, and rather always have it be fetched implicitly. This means fewer changes for applications that want to use new key exchange algorithms / implementations. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10305)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/evp.h3
-rw-r--r--include/openssl/evp.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h
index 32ae121eea..dfbcf149de 100644
--- a/include/crypto/evp.h
+++ b/include/crypto/evp.h
@@ -29,6 +29,9 @@ struct evp_pkey_ctx_st {
const char *algorithm;
const char *propquery;
+ /* cached key manager */
+ EVP_KEYMGMT *keymgmt;
+
union {
struct {
EVP_KEYEXCH *exchange;
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index baa1ce8c6c..5de6f8b08e 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -1550,7 +1550,6 @@ int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
unsigned char *out, size_t *outlen,
const unsigned char *in, size_t inlen);
-int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, EVP_KEYEXCH *exchange);
int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);