summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecdh_ossl.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-02-01 18:15:57 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-02-28 22:54:53 +0000
commit6903e2e7e9a47bb350920ae640287cf9f43a22ce (patch)
tree7cbbc665d681b79500d0c60aefdb3d745518896a /crypto/ec/ecdh_ossl.c
parent474d84ec81d6926698d27a2cbbbbe2961ecf6541 (diff)
Extended EC_METHOD customisation support.
Add support for optional overrides of various private key operations in EC_METHOD. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'crypto/ec/ecdh_ossl.c')
-rw-r--r--crypto/ec/ecdh_ossl.c4
1 files changed, 4 insertions, 0 deletions
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);