diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-02-28 17:48:48 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-03-01 22:04:25 +0000 |
commit | 9ff9bccc41c385ec2aa8ee2123f083b52b56b7b4 (patch) | |
tree | 9bfc6f68485d0c005c32502b35ed1908a07a0781 /crypto/ec/ecdh_ossl.c | |
parent | 77470e989cf3c502ee00eb060b197d0241f33a22 (diff) |
Add default operations to EC_METHOD
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/ec/ecdh_ossl.c')
-rw-r--r-- | crypto/ec/ecdh_ossl.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crypto/ec/ecdh_ossl.c b/crypto/ec/ecdh_ossl.c index 018e2294b9..27615375ba 100644 --- a/crypto/ec/ecdh_ossl.c +++ b/crypto/ec/ecdh_ossl.c @@ -82,9 +82,8 @@ int ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen)) { - if (ecdh->group->meth->ecdh_compute_key == 0) { - ECerr(EC_F_OSSL_ECDH_COMPUTE_KEY, - ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + if (ecdh->group->meth->ecdh_compute_key == NULL) { + ECerr(EC_F_OSSL_ECDH_COMPUTE_KEY, EC_R_CURVE_DOES_NOT_SUPPORT_ECDH); return -1; } @@ -113,8 +112,8 @@ int ecdh_simple_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, unsigned char *buf = NULL; if (outlen > INT_MAX) { - ECerr(EC_F_ECDH_SIMPLE_COMPUTE_KEY, ERR_R_MALLOC_FAILURE); /* sort of, - * anyway */ + /* sort of, anyway */ + ECerr(EC_F_ECDH_SIMPLE_COMPUTE_KEY, ERR_R_MALLOC_FAILURE); return -1; } |