From 6903e2e7e9a47bb350920ae640287cf9f43a22ce Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 1 Feb 2016 18:15:57 +0000 Subject: Extended EC_METHOD customisation support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for optional overrides of various private key operations in EC_METHOD. Reviewed-by: Rich Salz Reviewed-by: Emilia Käsper --- crypto/ec/ecdh_ossl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crypto/ec/ecdh_ossl.c') diff --git a/crypto/ec/ecdh_ossl.c b/crypto/ec/ecdh_ossl.c index 15a179fbc6..fadc007e14 100644 --- a/crypto/ec/ecdh_ossl.c +++ b/crypto/ec/ecdh_ossl.c @@ -103,6 +103,10 @@ int ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, return -1; } + if (ecdh->group->meth->ecdh_compute_key != 0) + return ecdh->group->meth->ecdh_compute_key(out, outlen, pub_key, ecdh, + KDF); + if ((ctx = BN_CTX_new()) == NULL) goto err; BN_CTX_start(ctx); -- cgit v1.2.3