From 6bd72a273e2c9c1ced98e6b1e560b76543891bb5 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 21 Jan 2015 21:22:49 +0000 Subject: Tweaks for comments due to indent's inability to handle them Reviewed-by: Tim Hudson --- ssl/s2_clnt.c | 28 +++++++++++++++++++++++----- ssl/s2_lib.c | 5 ++++- ssl/s2_srvr.c | 25 ++++++++++++++++++++----- ssl/s3_srvr.c | 3 ++- 4 files changed, 49 insertions(+), 12 deletions(-) (limited to 'ssl') diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c index 03b6cf9673..923d317e7c 100644 --- a/ssl/s2_clnt.c +++ b/ssl/s2_clnt.c @@ -388,7 +388,10 @@ static int get_server_hello(SSL *s) i = ssl2_read(s,(char *)&(buf[s->init_num]),j); if (i != j) return(ssl2_part_read(s,SSL_F_GET_SERVER_HELLO,i)); if (s->msg_callback) - s->msg_callback(0, s->version, 0, buf, (size_t)len, s, s->msg_callback_arg); /* SERVER-HELLO */ + { + /* SERVER-HELLO */ + s->msg_callback(0, s->version, 0, buf, (size_t)len, s, s->msg_callback_arg); + } /* things are looking good */ @@ -767,7 +770,10 @@ static int client_certificate(SSL *s) return(ssl2_part_read(s,SSL_F_CLIENT_CERTIFICATE,i)); s->init_num += i; if (s->msg_callback) - s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); /* REQUEST-CERTIFICATE */ + { + /* REQUEST-CERTIFICATE */ + s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); + } /* type=buf[0]; */ /* type eq x509 */ @@ -936,7 +942,10 @@ static int get_server_verify(SSL *s) if (i < n) return(ssl2_part_read(s,SSL_F_GET_SERVER_VERIFY,i)); if (s->msg_callback) - s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* SERVER-VERIFY */ + { + /* SERVER-VERIFY */ + s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); + } p += 1; if (CRYPTO_memcmp(p,s->s2->challenge,s->s2->challenge_length) != 0) @@ -990,11 +999,20 @@ static int get_server_finished(SSL *s) len = 1 + SSL2_SSL_SESSION_ID_LENGTH; n = len - s->init_num; i = ssl2_read(s,(char *)&(buf[s->init_num]), n); - if (i < n) /* XXX could be shorter than SSL2_SSL_SESSION_ID_LENGTH, that's the maximum */ + if (i < n) + { + /* + * XXX could be shorter than SSL2_SSL_SESSION_ID_LENGTH, + * that's the maximum + */ return(ssl2_part_read(s,SSL_F_GET_SERVER_FINISHED,i)); + } s->init_num += i; if (s->msg_callback) - s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); /* SERVER-FINISHED */ + { + /* SERVER-FINISHED */ + s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); + } if (!s->hit) /* new session */ { diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c index c63be3052b..a82ad999f8 100644 --- a/ssl/s2_lib.c +++ b/ssl/s2_lib.c @@ -540,7 +540,10 @@ void ssl2_write_error(SSL *s) if (s->error == 0) if (s->msg_callback) - s->msg_callback(1, s->version, 0, buf, 3, s, s->msg_callback_arg); /* ERROR */ + { + /* ERROR */ + s->msg_callback(1, s->version, 0, buf, 3, s, s->msg_callback_arg); + } } } diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index 73a54dc157..0779c74e47 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -442,7 +442,10 @@ static int get_client_master_key(SSL *s) i = ssl2_read(s,(char *)&(p[s->init_num]),n); if (i != n) return(ssl2_part_read(s,SSL_F_GET_CLIENT_MASTER_KEY,i)); if (s->msg_callback) - s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); /* CLIENT-MASTER-KEY */ + { + /* CLIENT-MASTER-KEY */ + s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); + } p += 10; memcpy(s->session->key_arg,&(p[s->s2->tmp.clear+s->s2->tmp.enc]), @@ -591,7 +594,10 @@ static int get_client_hello(SSL *s) i = ssl2_read(s,(char *)&(p[s->init_num]),n); if (i != n) return(ssl2_part_read(s,SSL_F_GET_CLIENT_HELLO,i)); if (s->msg_callback) - s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); /* CLIENT-HELLO */ + { + /* CLIENT-HELLO */ + s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); + } p += 9; /* get session-id before cipher stuff so we can get out session @@ -864,7 +870,10 @@ static int get_client_finished(SSL *s) return(ssl2_part_read(s,SSL_F_GET_CLIENT_FINISHED,i)); } if (s->msg_callback) - s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* CLIENT-FINISHED */ + { + /* CLIENT-FINISHED */ + s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); + } p += 1; if (memcmp(p,s->s2->conn_id,s->s2->conn_id_length) != 0) { @@ -987,7 +996,10 @@ static int request_certificate(SSL *s) } if (s->msg_callback) - s->msg_callback(0, s->version, 0, p, 3, s, s->msg_callback_arg); /* ERROR */ + { + /* ERROR */ + s->msg_callback(0, s->version, 0, p, 3, s, s->msg_callback_arg); + } /* this is the one place where we can recover from an SSL 2.0 error */ @@ -1042,7 +1054,10 @@ static int request_certificate(SSL *s) goto end; } if (s->msg_callback) - s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* CLIENT-CERTIFICATE */ + { + /* CLIENT-CERTIFICATE */ + s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); + } p += 6; cp = p; diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index ab46fa04c3..e9e3ff8849 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -1167,7 +1167,8 @@ int ssl3_get_client_hello(SSL *s) else if (s->hit) comp = NULL; else if (!(s->options & SSL_OP_NO_COMPRESSION) && s->ctx->comp_methods) - { /* See if we have a match */ + { + /* See if we have a match */ int m,nn,o,v,done=0; nn=sk_SSL_COMP_num(s->ctx->comp_methods); -- cgit v1.2.3