diff options
author | Matt Caswell <matt@openssl.org> | 2014-11-18 16:54:07 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-12-16 14:17:12 +0000 |
commit | a38ae11c48761ab468296e8960210f041b93dfde (patch) | |
tree | 3e1f68b65be6ec5c19343335a25a7c466fd4a1e9 /crypto/ec | |
parent | 4ca0e95b92811f7dac9fff213350c248619a135c (diff) |
Add OPENSSL_NO_ECDH guards
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit af6e2d51bfeabbae827030d4c9d58a8f7477c4a0)
Diffstat (limited to 'crypto/ec')
-rw-r--r-- | crypto/ec/ec_pmeth.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c index e66e690827..aea1d5b1e7 100644 --- a/crypto/ec/ec_pmeth.c +++ b/crypto/ec/ec_pmeth.c @@ -213,6 +213,7 @@ static int pkey_ec_verify(EVP_PKEY_CTX *ctx, return ret; } +#ifndef OPENSSL_NO_ECDH static int pkey_ec_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen) { int ret; @@ -288,6 +289,7 @@ static int pkey_ec_kdf_derive(EVP_PKEY_CTX *ctx, } return rv; } +#endif static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) { @@ -316,6 +318,7 @@ static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) EC_GROUP_set_asn1_flag(dctx->gen_group, p1); return 1; +#ifndef OPENSSL_NO_ECDH case EVP_PKEY_CTRL_EC_ECDH_COFACTOR: if (p1 == -2) { @@ -357,6 +360,7 @@ static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) dctx->co_key = NULL; } return 1; +#endif case EVP_PKEY_CTRL_EC_KDF_TYPE: if (p1 == -2) @@ -556,7 +560,11 @@ const EVP_PKEY_METHOD ec_pkey_meth = 0,0, 0, +#ifndef OPENSSL_NO_ECDH pkey_ec_kdf_derive, +#else + 0, +#endif pkey_ec_ctrl, pkey_ec_ctrl_str |