diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2017-09-24 03:26:26 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2017-09-26 13:00:26 +0100 |
commit | 34e5292c578321b80d8e474db4be6d90519d8f33 (patch) | |
tree | 16395af6bc9970ac4d97354a663ba783ea8a5a77 /ssl/statem/extensions_srvr.c | |
parent | 4a1b42801997f3083211a24592d1a691a0747250 (diff) |
Rename tls1_get_curvelist.
Rename tls1_get_curvelist to tls1_get_grouplist, change to void as
it can never fail and remove unnecessary return value checks. Clean
up the code.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/=4412)
Diffstat (limited to 'ssl/statem/extensions_srvr.c')
-rw-r--r-- | ssl/statem/extensions_srvr.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/ssl/statem/extensions_srvr.c b/ssl/statem/extensions_srvr.c index ebae44899a..3be9754b2a 100644 --- a/ssl/statem/extensions_srvr.c +++ b/ssl/statem/extensions_srvr.c @@ -520,18 +520,9 @@ int tls_parse_ctos_key_share(SSL *s, PACKET *pkt, unsigned int context, X509 *x, } /* Get our list of supported curves */ - if (!tls1_get_curvelist(s, 0, &srvrcurves, &srvr_num_curves)) { - *al = SSL_AD_INTERNAL_ERROR; - SSLerr(SSL_F_TLS_PARSE_CTOS_KEY_SHARE, ERR_R_INTERNAL_ERROR); - return 0; - } - + tls1_get_grouplist(s, 0, &srvrcurves, &srvr_num_curves); /* Get the clients list of supported curves. */ - if (!tls1_get_curvelist(s, 1, &clntcurves, &clnt_num_curves)) { - *al = SSL_AD_INTERNAL_ERROR; - SSLerr(SSL_F_TLS_PARSE_CTOS_KEY_SHARE, ERR_R_INTERNAL_ERROR); - return 0; - } + tls1_get_grouplist(s, 1, &clntcurves, &clnt_num_curves); if (clnt_num_curves == 0) { /* * This can only happen if the supported_groups extension was not sent, @@ -894,7 +885,8 @@ EXT_RETURN tls_construct_stoc_supported_groups(SSL *s, WPACKET *pkt, return EXT_RETURN_NOT_SENT; /* Get our list of supported groups */ - if (!tls1_get_curvelist(s, 0, &groups, &numgroups) || numgroups == 0) { + tls1_get_grouplist(s, 0, &groups, &numgroups); + if (numgroups == 0) { SSLerr(SSL_F_TLS_CONSTRUCT_STOC_SUPPORTED_GROUPS, ERR_R_INTERNAL_ERROR); return EXT_RETURN_FAIL; } |