diff options
author | Scott Deboy <sdeboy@secondstryke.com> | 2014-02-04 13:08:43 -0800 |
---|---|---|
committer | Scott Deboy <sdeboy@secondstryke.com> | 2014-02-08 16:19:01 -0800 |
commit | 7612511b3b54e5d729caa9897a1cfb5beb224266 (patch) | |
tree | c6d09d8a19b67c47918085fc9b5cc0778d5a26cd /ssl/t1_lib.c | |
parent | 19a28a8aa3df6680545bcc4496110aed4a112bc5 (diff) |
Re-add alert variables removed during rebase
Whitespace fixes
(cherry picked from commit e9add063b50e8a460d5636055156d2760c2fe29f)
Conflicts:
ssl/s3_clnt.c
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r-- | ssl/t1_lib.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index f3f6f82184..019685709b 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1466,8 +1466,8 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha { int cb_retval = 0; cb_retval = record->fn1(s, record->ext_type, - &out, &outlen, al, - record->arg); + &out, &outlen, al, + record->arg); if (cb_retval == 0) return NULL; /* error */ if (cb_retval == -1) @@ -1523,8 +1523,8 @@ unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned cha { int extdatalen=0; unsigned char *ret = p; - size_t i; - custom_srv_ext_record *record; + size_t i; + custom_srv_ext_record *record; #ifndef OPENSSL_NO_NEXTPROTONEG int next_proto_neg_seen; #endif @@ -1708,29 +1708,29 @@ unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned cha } #endif - 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; - unsigned short outlen = 0; - int cb_retval = 0; - - /* NULL callback or -1 omits extension */ - if (!record->fn2) - break; - cb_retval = record->fn2(s, record->ext_type, - &out, &outlen, al, - record->arg); - if (cb_retval == 0) - return NULL; /* error */ - if (cb_retval == -1) - break; /* skip this extension */ - if (limit < ret + 4 + outlen) - return NULL; - s2n(record->ext_type, ret); - s2n(outlen, ret); - memcpy(ret, out, outlen); - ret += outlen; + record = &s->ctx->custom_srv_ext_records[i]; + const unsigned char *out = NULL; + unsigned short outlen = 0; + int cb_retval = 0; + + /* NULL callback or -1 omits extension */ + if (!record->fn2) + break; + cb_retval = record->fn2(s, record->ext_type, + &out, &outlen, al, + record->arg); + if (cb_retval == 0) + return NULL; /* error */ + if (cb_retval == -1) + break; /* skip this extension */ + if (limit < ret + 4 + outlen) + return NULL; + s2n(record->ext_type, ret); + s2n(outlen, ret); + memcpy(ret, out, outlen); + ret += outlen; } if (s->s3->alpn_selected) @@ -1924,12 +1924,12 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char #endif /* Clear observed custom extensions */ - s->s3->serverinfo_client_tlsext_custom_types_count = 0; - if (s->s3->serverinfo_client_tlsext_custom_types != NULL) + s->s3->serverinfo_client_tlsext_custom_types_count = 0; + if (s->s3->serverinfo_client_tlsext_custom_types != NULL) { - OPENSSL_free(s->s3->serverinfo_client_tlsext_custom_types); - s->s3->serverinfo_client_tlsext_custom_types = NULL; - } + OPENSSL_free(s->s3->serverinfo_client_tlsext_custom_types); + s->s3->serverinfo_client_tlsext_custom_types = NULL; + } if (s->s3->alpn_selected) { |