aboutsummaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-02-06 16:47:29 +0000
committerMatt Caswell <matt@openssl.org>2017-02-14 13:14:25 +0000
commit2248dbebeeedd77f08d67e3dcd9031f6c1f0894f (patch)
tree7a1f771aefb6c2fed060615749a984407b2e6f61 /ssl
parentb0bfd1408506b399081186aa2a15cd60ed001595 (diff)
downloadopenssl-2248dbebeeedd77f08d67e3dcd9031f6c1f0894f.tar.gz
Various style fixes following review feedback
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2341)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/statem/extensions.c2
-rw-r--r--ssl/statem/extensions_clnt.c12
-rw-r--r--ssl/statem/statem_clnt.c8
3 files changed, 11 insertions, 11 deletions
diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c
index 563eb57699..8d08b0cf4c 100644
--- a/ssl/statem/extensions.c
+++ b/ssl/statem/extensions.c
@@ -1020,7 +1020,7 @@ static int final_key_share(SSL *s, unsigned int context, int sent, int *al)
size_t num_curves, clnt_num_curves, i;
unsigned int group_id;
- /* Check a shared group exists */
+ /* Check if a shared group exists */
/* Get the clients list of supported groups. */
if (!tls1_get_curvelist(s, 1, &clntcurves, &clnt_num_curves)) {
diff --git a/ssl/statem/extensions_clnt.c b/ssl/statem/extensions_clnt.c
index 2516ab9562..01a80a0755 100644
--- a/ssl/statem/extensions_clnt.c
+++ b/ssl/statem/extensions_clnt.c
@@ -531,8 +531,8 @@ int tls_construct_ctos_psk_kex_modes(SSL *s, WPACKET *pkt, unsigned int context,
#ifndef OPENSSL_NO_TLS1_3
static int add_key_share(SSL *s, WPACKET *pkt, unsigned int curve_id)
{
- unsigned char *encodedPoint = NULL;
- EVP_PKEY *key_share_key = NULL;
+ unsigned char *encoded_point;
+ EVP_PKEY *key_share_key;
size_t encodedlen;
key_share_key = ssl_generate_pkey_curve(curve_id);
@@ -543,7 +543,7 @@ static int add_key_share(SSL *s, WPACKET *pkt, unsigned int curve_id)
/* Encode the public key. */
encodedlen = EVP_PKEY_get1_tls_encodedpoint(key_share_key,
- &encodedPoint);
+ &encoded_point);
if (encodedlen == 0) {
SSLerr(SSL_F_ADD_KEY_SHARE, ERR_R_EC_LIB);
EVP_PKEY_free(key_share_key);
@@ -552,10 +552,10 @@ static int add_key_share(SSL *s, WPACKET *pkt, unsigned int curve_id)
/* Create KeyShareEntry */
if (!WPACKET_put_bytes_u16(pkt, curve_id)
- || !WPACKET_sub_memcpy_u16(pkt, encodedPoint, encodedlen)) {
+ || !WPACKET_sub_memcpy_u16(pkt, encoded_point, encodedlen)) {
SSLerr(SSL_F_ADD_KEY_SHARE, ERR_R_INTERNAL_ERROR);
EVP_PKEY_free(key_share_key);
- OPENSSL_free(encodedPoint);
+ OPENSSL_free(encoded_point);
return 0;
}
@@ -566,7 +566,7 @@ static int add_key_share(SSL *s, WPACKET *pkt, unsigned int curve_id)
*/
s->s3->tmp.pkey = key_share_key;
s->s3->group_id = curve_id;
- OPENSSL_free(encodedPoint);
+ OPENSSL_free(encoded_point);
return 1;
}
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index 5860a2307d..152600ba45 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -1466,7 +1466,7 @@ MSG_PROCESS_RETURN tls_process_server_hello(SSL *s, PACKET *pkt)
static MSG_PROCESS_RETURN tls_process_hello_retry_request(SSL *s, PACKET *pkt)
{
unsigned int sversion;
- int protverr;
+ int errorcode;
RAW_EXTENSION *extensions = NULL;
int al;
PACKET extpkt;
@@ -1480,10 +1480,10 @@ static MSG_PROCESS_RETURN tls_process_hello_retry_request(SSL *s, PACKET *pkt)
s->hello_retry_request = 1;
/* This will fail if it doesn't choose TLSv1.3+ */
- protverr = ssl_choose_client_version(s, sversion);
- if (protverr != 0) {
+ errorcode = ssl_choose_client_version(s, sversion);
+ if (errorcode != 0) {
al = SSL_AD_PROTOCOL_VERSION;
- SSLerr(SSL_F_TLS_PROCESS_HELLO_RETRY_REQUEST, protverr);
+ SSLerr(SSL_F_TLS_PROCESS_HELLO_RETRY_REQUEST, errorcode);
goto f_err;
}