[openssl-commits] [openssl] master update
Matt Caswell
matt at openssl.org
Thu Jun 23 16:15:19 UTC 2016
The branch master has been updated
via 51a3b763c31afcf294af73d32f7451c9dee7cd76 (commit)
via 65ea288d47bd3ec8c787108d7e56d8f5ff43281f (commit)
from 70a56b914772e6b21cda2a5742817ae4bb7290f1 (commit)
- Log -----------------------------------------------------------------
commit 51a3b763c31afcf294af73d32f7451c9dee7cd76
Author: huangqinjin <huangqinjin at gmail.com>
Date: Thu Jun 23 23:51:08 2016 +0800
Make x25519_compute_key() return a boolean
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
commit 65ea288d47bd3ec8c787108d7e56d8f5ff43281f
Author: huangqinjin <huangqinjin at gmail.com>
Date: Fri Jun 17 20:55:15 2016 +0800
Make ossl_ecdh_compute_key() return a boolean
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/ec/ec_25519.c | 4 ++--
crypto/ec/ecdh_ossl.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/crypto/ec/ec_25519.c b/crypto/ec/ec_25519.c
index 4a9e3c9..035a415 100644
--- a/crypto/ec/ec_25519.c
+++ b/crypto/ec/ec_25519.c
@@ -253,9 +253,9 @@ static int x25519_compute_key(unsigned char **psec, size_t *pseclen,
const EC_POINT *pub_key, const EC_KEY *ecdh)
{
unsigned char *key;
- int ret = -1;
+ int ret = 0;
if (ecdh->custom_data == NULL)
- return -1;
+ return 0;
key = OPENSSL_malloc(EC_X25519_KEYLEN);
if (key == NULL)
return 0;
diff --git a/crypto/ec/ecdh_ossl.c b/crypto/ec/ecdh_ossl.c
index 715465c..caf65de 100644
--- a/crypto/ec/ecdh_ossl.c
+++ b/crypto/ec/ecdh_ossl.c
@@ -38,7 +38,7 @@ int ossl_ecdh_compute_key(unsigned char **psec, size_t *pseclen,
{
if (ecdh->group->meth->ecdh_compute_key == NULL) {
ECerr(EC_F_OSSL_ECDH_COMPUTE_KEY, EC_R_CURVE_DOES_NOT_SUPPORT_ECDH);
- return -1;
+ return 0;
}
return ecdh->group->meth->ecdh_compute_key(psec, pseclen, pub_key, ecdh);
More information about the openssl-commits
mailing list