Re-add alert variables removed during rebase
Whitespace fixes (cherry picked from commit e9add063b50e8a460d5636055156d2760c2fe29f) Conflicts: ssl/s3_clnt.c
This commit is contained in:
parent
19a28a8aa3
commit
7612511b3b
@ -299,6 +299,7 @@ static int ssl23_client_hello(SSL *s)
|
||||
unsigned long l;
|
||||
int ssl2_compat;
|
||||
int version = 0, version_major, version_minor;
|
||||
int al = 0;
|
||||
#ifndef OPENSSL_NO_COMP
|
||||
int j;
|
||||
SSL_COMP *comp;
|
||||
|
@ -689,6 +689,7 @@ int ssl3_client_hello(SSL *s)
|
||||
unsigned char *p,*d;
|
||||
int i;
|
||||
unsigned long l;
|
||||
int al = 0;
|
||||
#ifndef OPENSSL_NO_COMP
|
||||
int j;
|
||||
SSL_COMP *comp;
|
||||
@ -3652,7 +3653,7 @@ int tls1_send_client_supplemental_data(SSL *s, int *skip)
|
||||
SSLerr(SSL_F_TLS1_SEND_CLIENT_SUPPLEMENTAL_DATA,ERR_R_BUF_LIB);
|
||||
return 0;
|
||||
}
|
||||
//if first entry, write handshake message type
|
||||
/* if first entry, write handshake message type */
|
||||
if (length == 0)
|
||||
{
|
||||
if (!BUF_MEM_grow_clean(s->init_buf, 4))
|
||||
@ -3662,9 +3663,12 @@ int tls1_send_client_supplemental_data(SSL *s, int *skip)
|
||||
}
|
||||
p = (unsigned char *)s->init_buf->data;
|
||||
*(p++) = SSL3_MT_SUPPLEMENTAL_DATA;
|
||||
//update message length when all callbacks complete
|
||||
/* update message length when all
|
||||
* callbacks complete */
|
||||
size_loc = p;
|
||||
//skip over handshake length field (3 bytes) and supp_data length field (3 bytes)
|
||||
/* skip over handshake length field (3
|
||||
* bytes) and supp_data length field
|
||||
* (3 bytes) */
|
||||
p += 3 + 3;
|
||||
length += 1 +3 +3;
|
||||
}
|
||||
@ -3698,10 +3702,10 @@ int tls1_send_client_supplemental_data(SSL *s, int *skip)
|
||||
s->init_off = 0;
|
||||
return 1;
|
||||
|
||||
f_err:
|
||||
f_err:
|
||||
ssl3_send_alert(s,SSL3_AL_FATAL,al);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int tls1_get_server_supplemental_data(SSL *s)
|
||||
{
|
||||
@ -3742,9 +3746,11 @@ int tls1_get_server_supplemental_data(SSL *s)
|
||||
//if there is a callback for this supp data type, send it
|
||||
for (i=0; i < s->ctx->cli_supp_data_records_count; i++)
|
||||
{
|
||||
if (s->ctx->cli_supp_data_records[i].supp_data_type == supp_data_entry_type && s->ctx->cli_supp_data_records[i].fn1)
|
||||
if (s->ctx->cli_supp_data_records[i].supp_data_type == supp_data_entry_type &&
|
||||
s->ctx->cli_supp_data_records[i].fn1)
|
||||
{
|
||||
cb_retval = s->ctx->cli_supp_data_records[i].fn1(s, supp_data_entry_type, p, supp_data_entry_len, &al, s->ctx->cli_supp_data_records[i].arg);
|
||||
cb_retval = s->ctx->cli_supp_data_records[i].fn1(s, supp_data_entry_type, p,
|
||||
supp_data_entry_len, &al, s->ctx->cli_supp_data_records[i].arg);
|
||||
if (cb_retval == 0)
|
||||
{
|
||||
SSLerr(SSL_F_TLS1_GET_SERVER_SUPPLEMENTAL_DATA, ERR_R_SSL_LIB);
|
||||
@ -3755,7 +3761,7 @@ int tls1_get_server_supplemental_data(SSL *s)
|
||||
p+=supp_data_entry_len;
|
||||
}
|
||||
return 1;
|
||||
f_err:
|
||||
f_err:
|
||||
ssl3_send_alert(s,SSL3_AL_FATAL,al);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1500,7 +1500,8 @@ int ssl3_send_server_hello(SSL *s)
|
||||
{
|
||||
unsigned char *buf;
|
||||
unsigned char *p,*d;
|
||||
int i,sl,al;
|
||||
int i,sl;
|
||||
int al = 0;
|
||||
unsigned long l;
|
||||
|
||||
if (s->state == SSL3_ST_SW_SRVR_HELLO_A)
|
||||
|
Loading…
x
Reference in New Issue
Block a user