Various style fixes following review feedback
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2341)
This commit is contained in:
parent
b0bfd14085
commit
2248dbebee
3 changed files with 11 additions and 11 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue