summaryrefslogtreecommitdiffstats
path: root/ssl/t1_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-01-21 11:09:58 +0000
committerMatt Caswell <matt@openssl.org>2015-01-22 09:26:44 +0000
commit65a6a1ff452ab7d72becfe9322d1e4bdc1786c44 (patch)
treecc9f668f3f13c56edcec6630fc123649cea14979 /ssl/t1_lib.c
parentfbdbb28ac6f5ffecdb6299e57828699b0f3e702f (diff)
indent has problems with comments that are on the right hand side of a line.
Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Conflicts: crypto/bn/bn.h crypto/ec/ec_lcl.h crypto/rsa/rsa.h demos/engines/ibmca/hw_ibmca.c ssl/ssl.h ssl/ssl3.h Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r--ssl/t1_lib.c41
1 files changed, 34 insertions, 7 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index 8b8c9cd71f..fb49b13321 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -2281,8 +2281,11 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char
return 0;
}
- if (s->s3->client_opaque_prf_input != NULL) /* shouldn't really happen */
+ if (s->s3->client_opaque_prf_input != NULL)
+ {
+ /* shouldn't really happen */
OPENSSL_free(s->s3->client_opaque_prf_input);
+ }
/* dummy byte just to get non-NULL */
if (s->s3->client_opaque_prf_input_len == 0)
@@ -2740,12 +2743,20 @@ static int ssl_scan_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char
return 0;
}
- if (s->s3->server_opaque_prf_input != NULL) /* shouldn't really happen */
+ if (s->s3->server_opaque_prf_input != NULL)
+ {
+ /* shouldn't really happen */
OPENSSL_free(s->s3->server_opaque_prf_input);
+ }
if (s->s3->server_opaque_prf_input_len == 0)
- s->s3->server_opaque_prf_input = OPENSSL_malloc(1); /* dummy byte just to get non-NULL */
+ {
+ /* dummy byte just to get non-NULL */
+ s->s3->server_opaque_prf_input = OPENSSL_malloc(1);
+ }
else
+ {
s->s3->server_opaque_prf_input = BUF_memdup(sdata, s->s3->server_opaque_prf_input_len);
+ }
if (s->s3->server_opaque_prf_input == NULL)
{
@@ -2958,13 +2969,21 @@ int ssl_prepare_clienthello_tlsext(SSL *s)
if (s->tlsext_opaque_prf_input != NULL)
{
- if (s->s3->client_opaque_prf_input != NULL) /* shouldn't really happen */
+ if (s->s3->client_opaque_prf_input != NULL)
+ {
+ /* shouldn't really happen */
OPENSSL_free(s->s3->client_opaque_prf_input);
+ }
if (s->tlsext_opaque_prf_input_len == 0)
- s->s3->client_opaque_prf_input = OPENSSL_malloc(1); /* dummy byte just to get non-NULL */
+ {
+ /* dummy byte just to get non-NULL */
+ s->s3->client_opaque_prf_input = OPENSSL_malloc(1);
+ }
else
+ {
s->s3->client_opaque_prf_input = BUF_memdup(s->tlsext_opaque_prf_input, s->tlsext_opaque_prf_input_len);
+ }
if (s->s3->client_opaque_prf_input == NULL)
{
SSLerr(SSL_F_SSL_PREPARE_CLIENTHELLO_TLSEXT,ERR_R_MALLOC_FAILURE);
@@ -3026,8 +3045,11 @@ static int ssl_check_clienthello_tlsext_early(SSL *s)
}
}
- if (s->s3->server_opaque_prf_input != NULL) /* shouldn't really happen */
+ if (s->s3->server_opaque_prf_input != NULL)
+ {
+ /* shouldn't really happen */
OPENSSL_free(s->s3->server_opaque_prf_input);
+ }
s->s3->server_opaque_prf_input = NULL;
if (s->tlsext_opaque_prf_input != NULL)
@@ -3039,9 +3061,14 @@ static int ssl_check_clienthello_tlsext_early(SSL *s)
* of the same length as the client opaque PRF input! */
if (s->tlsext_opaque_prf_input_len == 0)
- s->s3->server_opaque_prf_input = OPENSSL_malloc(1); /* dummy byte just to get non-NULL */
+ {
+ /* dummy byte just to get non-NULL */
+ s->s3->server_opaque_prf_input = OPENSSL_malloc(1);
+ }
else
+ {
s->s3->server_opaque_prf_input = BUF_memdup(s->tlsext_opaque_prf_input, s->tlsext_opaque_prf_input_len);
+ }
if (s->s3->server_opaque_prf_input == NULL)
{
ret = SSL_TLSEXT_ERR_ALERT_FATAL;