Fix whitespace, new-style comments.
This commit is contained in:
parent
e9add063b5
commit
0a6028757a
@ -3755,7 +3755,8 @@ int tls1_get_server_supplemental_data(SSL *s)
|
|||||||
s->ctx->cli_supp_data_records[i].fn1)
|
s->ctx->cli_supp_data_records[i].fn1)
|
||||||
{
|
{
|
||||||
cb_retval = s->ctx->cli_supp_data_records[i].fn1(s, supp_data_entry_type, p,
|
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);
|
supp_data_entry_len, &al,
|
||||||
|
s->ctx->cli_supp_data_records[i].arg);
|
||||||
if (cb_retval == 0)
|
if (cb_retval == 0)
|
||||||
{
|
{
|
||||||
SSLerr(SSL_F_TLS1_GET_SERVER_SUPPLEMENTAL_DATA, ERR_R_SSL_LIB);
|
SSLerr(SSL_F_TLS1_GET_SERVER_SUPPLEMENTAL_DATA, ERR_R_SSL_LIB);
|
||||||
|
@ -3725,8 +3725,7 @@ int tls1_send_server_supplemental_data(SSL *s, int *skip)
|
|||||||
if (!record->fn1)
|
if (!record->fn1)
|
||||||
continue;
|
continue;
|
||||||
cb_retval = record->fn1(s, record->supp_data_type,
|
cb_retval = record->fn1(s, record->supp_data_type,
|
||||||
&out, &outlen, &al,
|
&out, &outlen, &al, record->arg);
|
||||||
record->arg);
|
|
||||||
if (cb_retval == -1)
|
if (cb_retval == -1)
|
||||||
continue; /* skip this supp data entry */
|
continue; /* skip this supp data entry */
|
||||||
if (cb_retval == 0)
|
if (cb_retval == 0)
|
||||||
|
@ -849,12 +849,14 @@ static int serverinfo_srv_first_cb(SSL *s, unsigned short ext_type,
|
|||||||
void *arg)
|
void *arg)
|
||||||
{
|
{
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
|
|
||||||
if (inlen != 0)
|
if (inlen != 0)
|
||||||
{
|
{
|
||||||
*al = SSL_AD_DECODE_ERROR;
|
*al = SSL_AD_DECODE_ERROR;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//if already in list, error out
|
|
||||||
|
/* if already in list, error out */
|
||||||
for (i = 0; i < s->s3->serverinfo_client_tlsext_custom_types_count; i++)
|
for (i = 0; i < s->s3->serverinfo_client_tlsext_custom_types_count; i++)
|
||||||
{
|
{
|
||||||
if (s->s3->serverinfo_client_tlsext_custom_types[i] == ext_type)
|
if (s->s3->serverinfo_client_tlsext_custom_types[i] == ext_type)
|
||||||
@ -898,7 +900,7 @@ static int serverinfo_srv_second_cb(SSL *s, unsigned short ext_type,
|
|||||||
}
|
}
|
||||||
if (!match)
|
if (!match)
|
||||||
{
|
{
|
||||||
//extension not sent by client...don't send extension
|
/* extension not sent by client...don't send extension */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,7 +648,7 @@ static int custom_ext_3_cli_second_cb(SSL *s, unsigned short ext_type,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//custom_ext_0_cli_first_cb returns -1 - the server won't receive a callback for this extension
|
/* custom_ext_0_cli_first_cb returns -1 - the server won't receive a callback for this extension */
|
||||||
static int custom_ext_0_srv_first_cb(SSL *s, unsigned short ext_type,
|
static int custom_ext_0_srv_first_cb(SSL *s, unsigned short ext_type,
|
||||||
const unsigned char *in,
|
const unsigned char *in,
|
||||||
unsigned short inlen, int *al,
|
unsigned short inlen, int *al,
|
||||||
@ -658,7 +658,7 @@ static int custom_ext_0_srv_first_cb(SSL *s, unsigned short ext_type,
|
|||||||
return 0; /* Shouldn't be called */
|
return 0; /* Shouldn't be called */
|
||||||
}
|
}
|
||||||
|
|
||||||
//'generate' callbacks are always called, even if the 'receive' callback isn't called
|
/* 'generate' callbacks are always called, even if the 'receive' callback isn't called */
|
||||||
static int custom_ext_0_srv_second_cb(SSL *s, unsigned short ext_type,
|
static int custom_ext_0_srv_second_cb(SSL *s, unsigned short ext_type,
|
||||||
const unsigned char **out,
|
const unsigned char **out,
|
||||||
unsigned short *outlen, int *al, void *arg)
|
unsigned short *outlen, int *al, void *arg)
|
||||||
|
@ -1700,11 +1700,12 @@ unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned cha
|
|||||||
|
|
||||||
for (i = 0; i < s->ctx->custom_srv_ext_records_count; i++)
|
for (i = 0; i < s->ctx->custom_srv_ext_records_count; i++)
|
||||||
{
|
{
|
||||||
record = &s->ctx->custom_srv_ext_records[i];
|
|
||||||
const unsigned char *out = NULL;
|
const unsigned char *out = NULL;
|
||||||
unsigned short outlen = 0;
|
unsigned short outlen = 0;
|
||||||
int cb_retval = 0;
|
int cb_retval = 0;
|
||||||
|
|
||||||
|
record = &s->ctx->custom_srv_ext_records[i];
|
||||||
|
|
||||||
/* NULL callback or -1 omits extension */
|
/* NULL callback or -1 omits extension */
|
||||||
if (!record->fn2)
|
if (!record->fn2)
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user