diff options
author | Matt Caswell <matt@openssl.org> | 2017-05-18 10:05:02 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-05-18 10:05:02 +0100 |
commit | d8028b202bfe337200a0cc89b80983ea1838cb30 (patch) | |
tree | 52320521d751538bae8854eef90d188c0a629e22 | |
parent | a74341f9f9277959beb08063bfd41e30bdee6ed0 (diff) |
Fix EXT_RETURN usage for add_key_share()
add_key_share() is a helper function used during key_share extension
construction. It is expected to be a simple boolean success/fail return.
It shouldn't be using the new EXT_RETURN type but it was partially converted
anyway. This changes it back.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3488)
-rw-r--r-- | ssl/statem/extensions_clnt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ssl/statem/extensions_clnt.c b/ssl/statem/extensions_clnt.c index f2626a35b3..bbe94d0020 100644 --- a/ssl/statem/extensions_clnt.c +++ b/ssl/statem/extensions_clnt.c @@ -544,7 +544,7 @@ static int add_key_share(SSL *s, WPACKET *pkt, unsigned int curve_id) assert(s->hello_retry_request); if (!s->hello_retry_request) { SSLerr(SSL_F_ADD_KEY_SHARE, ERR_R_INTERNAL_ERROR); - return EXT_RETURN_FAIL; + return 0; } /* * Could happen if we got an HRR that wasn't requesting a new key_share @@ -554,7 +554,7 @@ static int add_key_share(SSL *s, WPACKET *pkt, unsigned int curve_id) key_share_key = ssl_generate_pkey_curve(curve_id); if (key_share_key == NULL) { SSLerr(SSL_F_ADD_KEY_SHARE, ERR_R_EVP_LIB); - return EXT_RETURN_FAIL; + return 0; } } @@ -582,12 +582,12 @@ static int add_key_share(SSL *s, WPACKET *pkt, unsigned int curve_id) s->s3->group_id = curve_id; OPENSSL_free(encoded_point); - return EXT_RETURN_SENT; + return 1; err: if (s->s3->tmp.pkey == NULL) EVP_PKEY_free(key_share_key); OPENSSL_free(encoded_point); - return EXT_RETURN_FAIL; + return 0; } #endif |