From: huangqinjin Date: Thu, 23 Jun 2016 15:51:08 +0000 (+0800) Subject: Make x25519_compute_key() return a boolean X-Git-Tag: OpenSSL_1_1_0-pre6~355 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=51a3b763c31afcf294af73d32f7451c9dee7cd76 Make x25519_compute_key() return a boolean Reviewed-by: Rich Salz Reviewed-by: Matt Caswell --- diff --git a/crypto/ec/ec_25519.c b/crypto/ec/ec_25519.c index 4a9e3c9ff0..035a415347 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;