diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2015-04-16 01:50:03 -0400 |
---|---|---|
committer | Viktor Dukhovni <openssl-users@dukhovni.org> | 2015-04-16 13:44:59 -0400 |
commit | 61986d32f37cbaeaed08bd955ff27d35b72ea29a (patch) | |
tree | a93f68aa58dd5dea6550887b9f44796d92a5b183 /ssl | |
parent | b65558328a9fcda5cef38857f9cc033c15ec1c32 (diff) |
Code style: space after 'if'
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/bio_ssl.c | 4 | ||||
-rw-r--r-- | ssl/d1_both.c | 2 | ||||
-rw-r--r-- | ssl/d1_clnt.c | 2 | ||||
-rw-r--r-- | ssl/d1_lib.c | 6 | ||||
-rw-r--r-- | ssl/d1_srvr.c | 2 | ||||
-rw-r--r-- | ssl/record/rec_layer_d1.c | 2 | ||||
-rw-r--r-- | ssl/record/rec_layer_s3.c | 8 | ||||
-rw-r--r-- | ssl/record/ssl3_buffer.c | 2 | ||||
-rw-r--r-- | ssl/s23_clnt.c | 4 | ||||
-rw-r--r-- | ssl/s23_srvr.c | 6 | ||||
-rw-r--r-- | ssl/s3_both.c | 4 | ||||
-rw-r--r-- | ssl/s3_clnt.c | 10 | ||||
-rw-r--r-- | ssl/s3_enc.c | 6 | ||||
-rw-r--r-- | ssl/s3_lib.c | 2 | ||||
-rw-r--r-- | ssl/s3_srvr.c | 26 | ||||
-rw-r--r-- | ssl/ssl_ciph.c | 2 | ||||
-rw-r--r-- | ssl/ssl_lib.c | 14 | ||||
-rw-r--r-- | ssl/ssl_rsa.c | 2 | ||||
-rw-r--r-- | ssl/ssl_sess.c | 4 | ||||
-rw-r--r-- | ssl/ssl_txt.c | 2 | ||||
-rw-r--r-- | ssl/t1_enc.c | 4 | ||||
-rw-r--r-- | ssl/t1_lib.c | 2 |
22 files changed, 58 insertions, 58 deletions
diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c index 7cf941d15b..473b3ff519 100644 --- a/ssl/bio_ssl.c +++ b/ssl/bio_ssl.c @@ -292,7 +292,7 @@ static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr) else if (ssl->handshake_func == ssl->method->ssl_accept) SSL_set_accept_state(ssl); - if(!SSL_clear(ssl)) { + if (!SSL_clear(ssl)) { ret = 0; break; } @@ -555,7 +555,7 @@ int BIO_ssl_copy_session_id(BIO *t, BIO *f) if ((((BIO_SSL *)t->ptr)->ssl == NULL) || (((BIO_SSL *)f->ptr)->ssl == NULL)) return (0); - if(!SSL_copy_session_id(((BIO_SSL *)t->ptr)->ssl, ((BIO_SSL *)f->ptr)->ssl)) + if (!SSL_copy_session_id(((BIO_SSL *)t->ptr)->ssl, ((BIO_SSL *)f->ptr)->ssl)) return 0; return (1); } diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 094b337bea..c3552e9276 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -989,7 +989,7 @@ int dtls1_send_change_cipher_spec(SSL *s, int a, int b) s->d1->handshake_write_seq, 0, 0); /* buffer the message to handle re-xmits */ - if(!dtls1_buffer_message(s, 1)) { + if (!dtls1_buffer_message(s, 1)) { SSLerr(SSL_F_DTLS1_SEND_CHANGE_CIPHER_SPEC, ERR_R_INTERNAL_ERROR); return -1; } diff --git a/ssl/d1_clnt.c b/ssl/d1_clnt.c index c5831cd2eb..0f4373ee7e 100644 --- a/ssl/d1_clnt.c +++ b/ssl/d1_clnt.c @@ -182,7 +182,7 @@ int dtls1_connect(SSL *s) s->in_handshake++; if (!SSL_in_init(s) || SSL_in_before(s)) { - if(!SSL_clear(s)) + if (!SSL_clear(s)) return -1; } diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index eac271d27b..a1d203223c 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -124,7 +124,7 @@ int dtls1_new(SSL *s) { DTLS1_STATE *d1; - if(!DTLS_RECORD_LAYER_new(&s->rlayer)) { + if (!DTLS_RECORD_LAYER_new(&s->rlayer)) { return 0; } @@ -502,7 +502,7 @@ int dtls1_listen(SSL *s, struct sockaddr *client) int ret; /* Ensure there is no state left over from a previous invocation */ - if(!SSL_clear(s)) + if (!SSL_clear(s)) return -1; SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE); @@ -524,7 +524,7 @@ static int dtls1_set_handshake_header(SSL *s, int htype, unsigned long len) s->init_off = 0; /* Buffer the message to handle re-xmits */ - if(!dtls1_buffer_message(s, 0)) + if (!dtls1_buffer_message(s, 0)) return 0; return 1; diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index 5ddfeac4c2..663f118103 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -185,7 +185,7 @@ int dtls1_accept(SSL *s) /* init things to blank */ s->in_handshake++; if (!SSL_in_init(s) || SSL_in_before(s)) { - if(!SSL_clear(s)) + if (!SSL_clear(s)) return -1; } diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c index c58af7f36a..3183bcf79c 100644 --- a/ssl/record/rec_layer_d1.c +++ b/ssl/record/rec_layer_d1.c @@ -638,7 +638,7 @@ int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) #ifndef OPENSSL_NO_HEARTBEATS else if (SSL3_RECORD_get_type(rr) == TLS1_RT_HEARTBEAT) { /* We allow a 0 return */ - if(dtls1_process_heartbeat(s, SSL3_RECORD_get_data(rr), + if (dtls1_process_heartbeat(s, SSL3_RECORD_get_data(rr), SSL3_RECORD_get_length(rr)) < 0) { return -1; } diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index 0ec1d2ca4c..b7d43f3543 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -170,7 +170,7 @@ void RECORD_LAYER_clear(RECORD_LAYER *rl) rl->s = s; rl->d = d; - if(d) + if (d) DTLS_RECORD_LAYER_clear(rl); } @@ -196,7 +196,7 @@ int RECORD_LAYER_write_pending(RECORD_LAYER *rl) int RECORD_LAYER_set_data(RECORD_LAYER *rl, const unsigned char *buf, int len) { rl->packet_length = len; - if(len != 0) { + if (len != 0) { rl->rstate = SSL_ST_READ_HEADER; if (!SSL3_BUFFER_is_initialised(&rl->rbuf)) if (!ssl3_setup_read_buffer(rl->s)) @@ -531,7 +531,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) packlen *= 4; wb->buf = OPENSSL_malloc(packlen); - if(!wb->buf) { + if (!wb->buf) { SSLerr(SSL_F_SSL3_WRITE_BYTES, ERR_R_MALLOC_FAILURE); return -1; } @@ -1130,7 +1130,7 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) #ifndef OPENSSL_NO_HEARTBEATS else if (SSL3_RECORD_get_type(rr)== TLS1_RT_HEARTBEAT) { /* We can ignore 0 return values */ - if(tls1_process_heartbeat(s, SSL3_RECORD_get_data(rr), + if (tls1_process_heartbeat(s, SSL3_RECORD_get_data(rr), SSL3_RECORD_get_length(rr)) < 0) { return -1; } diff --git a/ssl/record/ssl3_buffer.c b/ssl/record/ssl3_buffer.c index 79a7636e07..732420e27b 100644 --- a/ssl/record/ssl3_buffer.c +++ b/ssl/record/ssl3_buffer.c @@ -114,7 +114,7 @@ void SSL3_BUFFER_set_data(SSL3_BUFFER *b, const unsigned char *d, int n) { - if(d != NULL) + if (d != NULL) memcpy(b->buf, d, n); b->left = n; b->offset = 0; diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index 76ad876ec4..4196eac2a9 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -158,7 +158,7 @@ int ssl23_connect(SSL *s) s->in_handshake++; if (!SSL_in_init(s) || SSL_in_before(s)) { - if(!SSL_clear(s)) + if (!SSL_clear(s)) return -1; } @@ -573,7 +573,7 @@ static int ssl23_get_server_hello(SSL *s) /* * put the 7 bytes we have read into the input buffer for SSLv3 */ - if(!RECORD_LAYER_set_data(&s->rlayer, buf, n)) + if (!RECORD_LAYER_set_data(&s->rlayer, buf, n)) goto err; s->handshake_func = s->method->ssl_connect; diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index 7287022d23..50d634e265 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -157,7 +157,7 @@ int ssl23_accept(SSL *s) s->in_handshake++; if (!SSL_in_init(s) || SSL_in_before(s)) { - if(!SSL_clear(s)) + if (!SSL_clear(s)) return -1; } @@ -561,10 +561,10 @@ int ssl23_get_client_hello(SSL *s) /* * put the 'n' bytes we have read into the input buffer for SSLv3 */ - if(!RECORD_LAYER_set_data(&s->rlayer, buf, n)) + if (!RECORD_LAYER_set_data(&s->rlayer, buf, n)) goto err; } else { - if(!RECORD_LAYER_set_data(&s->rlayer, NULL, 0)) + if (!RECORD_LAYER_set_data(&s->rlayer, NULL, 0)) goto err; } s->handshake_func = s->method->ssl_accept; diff --git a/ssl/s3_both.c b/ssl/s3_both.c index ed6ae128d5..d0cb763b8d 100644 --- a/ssl/s3_both.c +++ b/ssl/s3_both.c @@ -187,7 +187,7 @@ int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) s->s3->previous_server_finished_len = i; } - if(!ssl_set_handshake_header(s, SSL3_MT_FINISHED, l)) { + if (!ssl_set_handshake_header(s, SSL3_MT_FINISHED, l)) { SSLerr(SSL_F_SSL3_SEND_FINISHED, ERR_R_INTERNAL_ERROR); return -1; } @@ -328,7 +328,7 @@ unsigned long ssl3_output_cert_chain(SSL *s, CERT_PKEY *cpk) l2n3(l, p); l += 3; - if(!ssl_set_handshake_header(s, SSL3_MT_CERTIFICATE, l)) { + if (!ssl_set_handshake_header(s, SSL3_MT_CERTIFICATE, l)) { SSLerr(SSL_F_SSL3_OUTPUT_CERT_CHAIN, ERR_R_INTERNAL_ERROR); return 0; } diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 404f7f9f8f..697a3b4f6a 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -198,7 +198,7 @@ int ssl3_connect(SSL *s) s->in_handshake++; if (!SSL_in_init(s) || SSL_in_before(s)) { - if(!SSL_clear(s)) + if (!SSL_clear(s)) return -1; } @@ -843,7 +843,7 @@ int ssl3_client_hello(SSL *s) #endif l = p - d; - if(!ssl_set_handshake_header(s, SSL3_MT_CLIENT_HELLO, l)) { + if (!ssl_set_handshake_header(s, SSL3_MT_CLIENT_HELLO, l)) { ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_HANDSHAKE_FAILURE); SSLerr(SSL_F_SSL3_CLIENT_HELLO, ERR_R_INTERNAL_ERROR); goto err; @@ -2991,7 +2991,7 @@ int ssl3_send_client_key_exchange(SSL *s) goto err; } - if(!ssl_set_handshake_header(s, SSL3_MT_CLIENT_KEY_EXCHANGE, n)) { + if (!ssl_set_handshake_header(s, SSL3_MT_CLIENT_KEY_EXCHANGE, n)) { ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_HANDSHAKE_FAILURE); SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto err; @@ -3044,7 +3044,7 @@ int ssl3_send_client_key_exchange(SSL *s) OPENSSL_cleanse(pms, pmslen); OPENSSL_free(pms); s->cert->pms = NULL; - if(s->session->master_key_length < 0) { + if (s->session->master_key_length < 0) { ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR); SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto err; @@ -3194,7 +3194,7 @@ int ssl3_send_client_verify(SSL *s) SSLerr(SSL_F_SSL3_SEND_CLIENT_VERIFY, ERR_R_INTERNAL_ERROR); goto err; } - if(!ssl_set_handshake_header(s, SSL3_MT_CERTIFICATE_VERIFY, n)) { + if (!ssl_set_handshake_header(s, SSL3_MT_CERTIFICATE_VERIFY, n)) { SSLerr(SSL_F_SSL3_SEND_CLIENT_VERIFY, ERR_R_INTERNAL_ERROR); goto err; } diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 1db2f77cd4..8fc5bc4a8a 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -253,7 +253,7 @@ int ssl3_change_cipher_state(SSL *s, int which) EVP_CIPHER_CTX_init(s->enc_read_ctx); dd = s->enc_read_ctx; - if(!ssl_replace_hash(&s->read_hash, m)) { + if (!ssl_replace_hash(&s->read_hash, m)) { SSLerr(SSL_F_SSL3_CHANGE_CIPHER_STATE, ERR_R_INTERNAL_ERROR); goto err2; } @@ -270,7 +270,7 @@ int ssl3_change_cipher_state(SSL *s, int which) SSL_R_COMPRESSION_LIBRARY_ERROR); goto err2; } - if(!RECORD_LAYER_setup_comp_buffer(&s->rlayer)) + if (!RECORD_LAYER_setup_comp_buffer(&s->rlayer)) goto err; } #endif @@ -288,7 +288,7 @@ int ssl3_change_cipher_state(SSL *s, int which) */ EVP_CIPHER_CTX_init(s->enc_write_ctx); dd = s->enc_write_ctx; - if(!ssl_replace_hash(&s->write_hash, m)) { + if (!ssl_replace_hash(&s->write_hash, m)) { SSLerr(SSL_F_SSL3_CHANGE_CIPHER_STATE, ERR_R_INTERNAL_ERROR); goto err2; } diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index a7dbbf688d..7bb3a9257f 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -3104,7 +3104,7 @@ int ssl3_new(SSL *s) s->s3 = s3; #ifndef OPENSSL_NO_SRP - if(!SSL_SRP_CTX_init(s)) + if (!SSL_SRP_CTX_init(s)) goto err; #endif s->method->ssl_clear(s); diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 7376fe61ec..223a76428e 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -227,7 +227,7 @@ int ssl3_accept(SSL *s) /* init things to blank */ s->in_handshake++; if (!SSL_in_init(s) || SSL_in_before(s)) { - if(!SSL_clear(s)) + if (!SSL_clear(s)) return -1; } @@ -882,7 +882,7 @@ int ssl3_send_hello_request(SSL *s) { if (s->state == SSL3_ST_SW_HELLO_REQ_A) { - if(!ssl_set_handshake_header(s, SSL3_MT_HELLO_REQUEST, 0)) { + if (!ssl_set_handshake_header(s, SSL3_MT_HELLO_REQUEST, 0)) { SSLerr(SSL_F_SSL3_SEND_HELLO_REQUEST, ERR_R_INTERNAL_ERROR); return -1; } @@ -1541,7 +1541,7 @@ int ssl3_send_server_hello(SSL *s) #endif /* do the header */ l = (p - d); - if(!ssl_set_handshake_header(s, SSL3_MT_SERVER_HELLO, l)) { + if (!ssl_set_handshake_header(s, SSL3_MT_SERVER_HELLO, l)) { SSLerr(SSL_F_SSL3_SEND_SERVER_HELLO, ERR_R_INTERNAL_ERROR); return -1; } @@ -1556,7 +1556,7 @@ int ssl3_send_server_done(SSL *s) { if (s->state == SSL3_ST_SW_SRVR_DONE_A) { - if(!ssl_set_handshake_header(s, SSL3_MT_SERVER_DONE, 0)) { + if (!ssl_set_handshake_header(s, SSL3_MT_SERVER_DONE, 0)) { SSLerr(SSL_F_SSL3_SEND_SERVER_DONE, ERR_R_INTERNAL_ERROR); return -1; } @@ -2006,7 +2006,7 @@ int ssl3_send_server_key_exchange(SSL *s) } } - if(!ssl_set_handshake_header(s, SSL3_MT_SERVER_KEY_EXCHANGE, n)) { + if (!ssl_set_handshake_header(s, SSL3_MT_SERVER_KEY_EXCHANGE, n)) { al = SSL_AD_HANDSHAKE_FAILURE; SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto f_err; @@ -2088,7 +2088,7 @@ int ssl3_send_certificate_request(SSL *s) p = ssl_handshake_start(s) + off; s2n(nl, p); - if(!ssl_set_handshake_header(s, SSL3_MT_CERTIFICATE_REQUEST, n)) { + if (!ssl_set_handshake_header(s, SSL3_MT_CERTIFICATE_REQUEST, n)) { SSLerr(SSL_F_SSL3_SEND_CERTIFICATE_REQUEST, ERR_R_INTERNAL_ERROR); return -1; } @@ -2278,7 +2278,7 @@ int ssl3_get_client_key_exchange(SSL *s) sizeof (rand_premaster_secret)); OPENSSL_cleanse(p, sizeof(rand_premaster_secret)); - if(s->session->master_key_length < 0) { + if (s->session->master_key_length < 0) { al = SSL_AD_INTERNAL_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto f_err; @@ -2375,7 +2375,7 @@ int ssl3_get_client_key_exchange(SSL *s) session->master_key, p, i); OPENSSL_cleanse(p, i); - if(s->session->master_key_length < 0) { + if (s->session->master_key_length < 0) { al = SSL_AD_INTERNAL_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto f_err; @@ -2545,7 +2545,7 @@ int ssl3_get_client_key_exchange(SSL *s) s-> session->master_key, pms, outl); - if(s->session->master_key_length < 0) { + if (s->session->master_key_length < 0) { al = SSL_INTERNAL_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto f_err; @@ -2698,7 +2698,7 @@ int ssl3_get_client_key_exchange(SSL *s) p, i); OPENSSL_cleanse(p, i); - if(s->session->master_key_length < 0) { + if (s->session->master_key_length < 0) { al = SSL_AD_INTERNAL_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto f_err; @@ -2787,7 +2787,7 @@ int ssl3_get_client_key_exchange(SSL *s) session->master_key, psk_or_pre_ms, pre_ms_len); - if(s->session->master_key_length < 0) { + if (s->session->master_key_length < 0) { al = SSL_AD_INTERNAL_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto psk_err; @@ -2893,7 +2893,7 @@ int ssl3_get_client_key_exchange(SSL *s) s-> session->master_key, premaster_secret, 32); - if(s->session->master_key_length < 0) { + if (s->session->master_key_length < 0) { al = SSL_AD_INTERNAL_ERROR; SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto f_err; @@ -3469,7 +3469,7 @@ int ssl3_send_newsession_ticket(SSL *s) /* Skip ticket lifetime hint */ p = ssl_handshake_start(s) + 4; s2n(len - 6, p); - if(!ssl_set_handshake_header(s, SSL3_MT_NEWSESSION_TICKET, len)) + if (!ssl_set_handshake_header(s, SSL3_MT_NEWSESSION_TICKET, len)) goto err; s->state = SSL3_ST_SW_SESSION_TICKET_B; OPENSSL_free(senc); diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 0f6758bb52..cd86fcc3e1 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -533,7 +533,7 @@ int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc, *comp = NULL; } /* If were only interested in comp then return success */ - if((enc == NULL) && (md == NULL)) + if ((enc == NULL) && (md == NULL)) return 1; } diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 42ee3a918c..35a3c9d7b8 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -381,7 +381,7 @@ SSL *SSL_new(SSL_CTX *ctx) s->references = 1; s->server = (ctx->method->ssl_accept == ssl_undefined_function) ? 0 : 1; - if(!SSL_clear(s)) + if (!SSL_clear(s)) goto err; CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data); @@ -884,7 +884,7 @@ STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s) int SSL_copy_session_id(SSL *t, const SSL *f) { /* Do we need to to SSL locking? */ - if(!SSL_set_session(t, SSL_get_session(f))) { + if (!SSL_set_session(t, SSL_get_session(f))) { return 0; } @@ -900,7 +900,7 @@ int SSL_copy_session_id(SSL *t, const SSL *f) CRYPTO_add(&f->cert->references, 1, CRYPTO_LOCK_SSL_CERT); ssl_cert_free(t->cert); t->cert = f->cert; - if(!SSL_set_session_id_context(t, f->sid_ctx, f->sid_ctx_length)) { + if (!SSL_set_session_id_context(t, f->sid_ctx, f->sid_ctx_length)) { return 0; } @@ -1920,7 +1920,7 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth) if (ret->cert_store == NULL) goto err; - if(!ssl_create_cipher_list(ret->method, + if (!ssl_create_cipher_list(ret->method, &ret->cipher_list, &ret->cipher_list_by_id, SSL_DEFAULT_CIPHER_LIST, ret->cert) || sk_SSL_CIPHER_num(ret->cipher_list) <= 0) { @@ -1976,7 +1976,7 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth) ret->psk_server_callback = NULL; #endif #ifndef OPENSSL_NO_SRP - if(!SSL_CTX_SRP_CTX_init(ret)) + if (!SSL_CTX_SRP_CTX_init(ret)) goto err; #endif #ifndef OPENSSL_NO_ENGINE @@ -2756,7 +2756,7 @@ SSL *SSL_dup(SSL *s) if (s->session != NULL) { /* This copies session-id, SSL_METHOD, sid_ctx, and 'cert' */ - if(!SSL_copy_session_id(ret, s)) + if (!SSL_copy_session_id(ret, s)) goto err; } else { /* @@ -2777,7 +2777,7 @@ SSL *SSL_dup(SSL *s) goto err; } - if(!SSL_set_session_id_context(ret, s->sid_ctx, s->sid_ctx_length)) + if (!SSL_set_session_id_context(ret, s->sid_ctx, s->sid_ctx_length)) goto err; } diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c index 90fe8c8af9..b5d457a9eb 100644 --- a/ssl/ssl_rsa.c +++ b/ssl/ssl_rsa.c @@ -687,7 +687,7 @@ int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file) int r; unsigned long err; - if(!SSL_CTX_clear_chain_certs(ctx)) { + if (!SSL_CTX_clear_chain_certs(ctx)) { ret = 0; goto end; } diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 3d0f95090d..483c7787a2 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -518,7 +518,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len, * The following should not return 1, otherwise, things are * very strange */ - if(SSL_CTX_add_session(s->session_ctx, ret)) + if (SSL_CTX_add_session(s->session_ctx, ret)) goto err; } } @@ -861,7 +861,7 @@ void SSL_SESSION_get0_ticket(const SSL_SESSION *s, unsigned char **tick, size_t *len) { *len = s->tlsext_ticklen; - if(tick != NULL) + if (tick != NULL) *tick = s->tlsext_tick; } diff --git a/ssl/ssl_txt.c b/ssl/ssl_txt.c index ccdf8ec257..9277d2ca58 100644 --- a/ssl/ssl_txt.c +++ b/ssl/ssl_txt.c @@ -214,7 +214,7 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) if (x->compress_meth != 0) { SSL_COMP *comp = NULL; - if(!ssl_cipher_get_evp(x, NULL, NULL, NULL, NULL, &comp, 0)) + if (!ssl_cipher_get_evp(x, NULL, NULL, NULL, NULL, &comp, 0)) goto err; if (comp == NULL) { if (BIO_printf(bp, "\n Compression: %d", x->compress_meth) <= diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 19b79e9b51..6e926d4bf7 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -260,7 +260,7 @@ static int tls1_PRF(long digest_mask, if ((m << TLS1_PRF_DGST_SHIFT) & digest_mask) count++; } - if(!count) { + if (!count) { /* Should never happen */ SSLerr(SSL_F_TLS1_PRF, ERR_R_INTERNAL_ERROR); goto err; @@ -801,7 +801,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, * exchange and before certificate verify) */ s->s3->flags |= TLS1_FLAGS_KEEP_HANDSHAKE; - if(!ssl3_digest_cached_records(s)) + if (!ssl3_digest_cached_records(s)) return -1; } hashlen = ssl_handshake_hash(s, hash, sizeof(hash)); diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index aef0ef6659..985c357563 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1606,7 +1606,7 @@ unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *buf, int el; /* Returns 0 on success!! */ - if(ssl_add_serverhello_use_srtp_ext(s, 0, &el, 0)) { + if (ssl_add_serverhello_use_srtp_ext(s, 0, &el, 0)) { SSLerr(SSL_F_SSL_ADD_SERVERHELLO_TLSEXT, ERR_R_INTERNAL_ERROR); return NULL; } |