Fix whitespace, new-style comments.

This commit is contained in:
Ben Laurie 2014-02-04 23:16:46 +00:00
parent e9add063b5
commit 0a6028757a
8 changed files with 153 additions and 150 deletions

View File

@ -3755,7 +3755,8 @@ int tls1_get_server_supplemental_data(SSL *s)
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);
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);
@ -3766,7 +3767,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;
}

View File

@ -3725,8 +3725,7 @@ int tls1_send_server_supplemental_data(SSL *s, int *skip)
if (!record->fn1)
continue;
cb_retval = record->fn1(s, record->supp_data_type,
&out, &outlen, &al,
record->arg);
&out, &outlen, &al, record->arg);
if (cb_retval == -1)
continue; /* skip this supp data entry */
if (cb_retval == 0)

View File

@ -849,12 +849,14 @@ static int serverinfo_srv_first_cb(SSL *s, unsigned short ext_type,
void *arg)
{
size_t i = 0;
if (inlen != 0)
{
*al = SSL_AD_DECODE_ERROR;
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++)
{
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)
{
//extension not sent by client...don't send extension
/* extension not sent by client...don't send extension */
return -1;
}

View File

@ -648,7 +648,7 @@ static int custom_ext_3_cli_second_cb(SSL *s, unsigned short ext_type,
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,
const unsigned char *in,
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 */
}
//'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,
const unsigned char **out,
unsigned short *outlen, int *al, void *arg)

View File

@ -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++)
{
record = &s->ctx->custom_srv_ext_records[i];
const unsigned char *out = NULL;
unsigned short outlen = 0;
int cb_retval = 0;
record = &s->ctx->custom_srv_ext_records[i];
/* NULL callback or -1 omits extension */
if (!record->fn2)
break;