diff options
author | Ben Laurie <ben@links.org> | 2013-08-01 15:17:23 +0100 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2013-08-01 15:17:23 +0100 |
commit | 6381b3cbcd8e8626f3fdfcfd54ed5a1a980847dd (patch) | |
tree | 9ca335ecc32e22bfc49e5dc74fb0a07f0461a8e7 | |
parent | a66d5a4a77bc086c9eff36a096e9e74d8bca8be5 (diff) | |
download | openssl-new-6381b3cbcd8e8626f3fdfcfd54ed5a1a980847dd.tar.gz |
More cleanup.
-rw-r--r-- | apps/s_cb.c | 6 | ||||
-rw-r--r-- | apps/s_client.c | 17 | ||||
-rw-r--r-- | apps/s_server.c | 6 | ||||
-rw-r--r-- | ssl/s3_clnt.c | 12 | ||||
-rw-r--r-- | ssl/ssl.h | 10 | ||||
-rw-r--r-- | ssl/ssl_lib.c | 4 | ||||
-rw-r--r-- | ssl/ssltest.c | 2 |
7 files changed, 25 insertions, 32 deletions
diff --git a/apps/s_cb.c b/apps/s_cb.c index 3b7e0717a7..f28fa318d4 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -875,12 +875,12 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void * case 16: str_details1 = ", ClientKeyExchange"; break; - case 23: - str_details1 = ", SupplementalData"; - break; case 20: str_details1 = ", Finished"; break; + case 23: + str_details1 = ", SupplementalData"; + break; } } } diff --git a/apps/s_client.c b/apps/s_client.c index ba91972b9a..a17917c9cb 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -2423,18 +2423,12 @@ static int authz_tlsext_cb(SSL *s, unsigned short ext_type, void *arg) { if (TLSEXT_TYPE_server_authz == ext_type) - { - server_provided_server_authz = (memchr(in, - TLSEXT_AUTHZDATAFORMAT_dtcp, - inlen) != NULL); - } + server_provided_server_authz + = (memchr(in, TLSEXT_AUTHZDATAFORMAT_dtcp, inlen) != NULL); if (TLSEXT_TYPE_client_authz == ext_type) - { - server_provided_client_authz = (memchr(in, - TLSEXT_AUTHZDATAFORMAT_dtcp, - inlen) != NULL); - } + server_provided_client_authz + = (memchr(in, TLSEXT_AUTHZDATAFORMAT_dtcp, inlen) != NULL); return 1; } @@ -2476,7 +2470,8 @@ static int auth_suppdata_generate_cb(SSL *s, unsigned short supp_data_type, unsigned char *result; if (c_auth && server_provided_client_authz && server_provided_server_authz) { - if (!c_auth_require_reneg || (c_auth_require_reneg && SSL_num_renegotiations(s))) + if (!c_auth_require_reneg + || (c_auth_require_reneg && SSL_num_renegotiations(s))) { result = OPENSSL_malloc(10); memcpy(result, "5432154321", 10); diff --git a/apps/s_server.c b/apps/s_server.c index 4e159b3246..99a1fdb69d 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -1056,7 +1056,7 @@ int MAIN(int argc, char *argv[]) EVP_PKEY *s_key = NULL, *s_dkey = NULL; int no_cache = 0, ext_cache = 0; int rev = 0, naccept = -1; - int c_no_resumption_on_reneg = 0; + int c_no_resumption_on_reneg = 0; #ifndef OPENSSL_NO_TLSEXT EVP_PKEY *s_key2 = NULL; X509 *s_cert2 = NULL; @@ -3563,16 +3563,12 @@ static int authz_tlsext_cb(SSL *s, unsigned short ext_type, void *arg) { if (TLSEXT_TYPE_server_authz == ext_type) - { client_provided_server_authz = memchr(in, TLSEXT_AUTHZDATAFORMAT_dtcp, inlen) != NULL; - } if (TLSEXT_TYPE_client_authz == ext_type) - { client_provided_client_authz = memchr(in, TLSEXT_AUTHZDATAFORMAT_dtcp, inlen) != NULL; - } return 1; } diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index cec2250270..3c2fefe81e 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -3564,9 +3564,11 @@ int ssl3_check_finished(SSL *s) { int ok; long n; -/* Read the message to see if it is supplemental data, regardless if there is a session ticket - this function is called when we really expect a Certificate - message, so permit appropriate message length */ + + /* Read the message to see if it is supplemental data, + * regardless if there is a session ticket this function is + * called when we really expect a Certificate message, so + * permit appropriate message length */ n=s->method->ssl_get_message(s, SSL3_ST_CR_CERT_A, SSL3_ST_CR_CERT_B, @@ -3725,7 +3727,7 @@ int tls1_get_server_supplemental_data(SSL *s) goto f_err; } n2l3(p, supp_data_len); - while (p<d+supp_data_len) + while (p < d+supp_data_len) { n2s(p, supp_data_entry_type); n2s(p, supp_data_entry_len); @@ -3742,7 +3744,7 @@ int tls1_get_server_supplemental_data(SSL *s) } } } - p+=supp_data_entry_len; + p += supp_data_entry_len; } return 1; f_err: @@ -1189,11 +1189,11 @@ struct ssl_ctx_st custom_srv_ext_record *custom_srv_ext_records; size_t custom_srv_ext_records_count; - /* Arrays containing the callbacks for Supplemental Data. */ - cli_supp_data_record *cli_supp_data_records; - size_t cli_supp_data_records_count; - srv_supp_data_record *srv_supp_data_records; - size_t srv_supp_data_records_count; + /* Arrays containing the callbacks for Supplemental Data. */ + cli_supp_data_record *cli_supp_data_records; + size_t cli_supp_data_records_count; + srv_supp_data_record *srv_supp_data_records; + size_t srv_supp_data_records_count; }; #endif diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 65ad9b8071..a4e9174528 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1853,7 +1853,7 @@ int SSL_CTX_set_cli_supp_data(SSL_CTX *ctx, return 0; ctx->cli_supp_data_records = OPENSSL_realloc(ctx->cli_supp_data_records, - (ctx->cli_supp_data_records_count+1) * sizeof(cli_supp_data_record)); + (ctx->cli_supp_data_records_count+1) * sizeof(cli_supp_data_record)); if (!ctx->cli_supp_data_records) { ctx->cli_supp_data_records_count = 0; @@ -1882,7 +1882,7 @@ int SSL_CTX_set_srv_supp_data(SSL_CTX *ctx, return 0; ctx->srv_supp_data_records = OPENSSL_realloc(ctx->srv_supp_data_records, - (ctx->srv_supp_data_records_count+1) * sizeof(srv_supp_data_record)); + (ctx->srv_supp_data_records_count+1) * sizeof(srv_supp_data_record)); if (!ctx->srv_supp_data_records) { ctx->srv_supp_data_records_count = 0; diff --git a/ssl/ssltest.c b/ssl/ssltest.c index a461eb805c..3c232115f2 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -521,7 +521,7 @@ int custom_ext = 0; /* This set based on extension callbacks */ int custom_ext_error = 0; -/*Not IETF assigned supplemental data types*/ +/* Not IETF assigned supplemental data types */ #define CUSTOM_SUPP_DATA_TYPE_0 100 #define CUSTOM_SUPP_DATA_TYPE_1 101 #define CUSTOM_SUPP_DATA_TYPE_2 102 |