提交 0485d540 编写于 作者: F FdaSilvaYY 提交者: Rich Salz

Whitespace cleanup in ssl folder

Reviewed-by: NAndy Polyakov <appro@openssl.org>
Reviewed-by: NKurt Roeckx <kurt@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1264)
上级 02e112a8
...@@ -82,7 +82,7 @@ int dtls1_new(SSL *s) ...@@ -82,7 +82,7 @@ int dtls1_new(SSL *s)
if (!DTLS_RECORD_LAYER_new(&s->rlayer)) { if (!DTLS_RECORD_LAYER_new(&s->rlayer)) {
return 0; return 0;
} }
if (!ssl3_new(s)) if (!ssl3_new(s))
return (0); return (0);
if ((d1 = OPENSSL_zalloc(sizeof(*d1))) == NULL) { if ((d1 = OPENSSL_zalloc(sizeof(*d1))) == NULL) {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#define USE_SOCKETS #define USE_SOCKETS
#include "ssl_locl.h" #include "ssl_locl.h"
int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, int len) int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, int len)
{ {
int i; int i;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl) int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl)
{ {
DTLS_RECORD_LAYER *d; DTLS_RECORD_LAYER *d;
if ((d = OPENSSL_malloc(sizeof(*d))) == NULL) if ((d = OPENSSL_malloc(sizeof(*d))) == NULL)
return (0); return (0);
...@@ -62,7 +62,7 @@ void DTLS_RECORD_LAYER_clear(RECORD_LAYER *rl) ...@@ -62,7 +62,7 @@ void DTLS_RECORD_LAYER_clear(RECORD_LAYER *rl)
pqueue *buffered_app_data; pqueue *buffered_app_data;
d = rl->d; d = rl->d;
while ((item = pqueue_pop(d->unprocessed_rcds.q)) != NULL) { while ((item = pqueue_pop(d->unprocessed_rcds.q)) != NULL) {
rdata = (DTLS1_RECORD_DATA *)item->data; rdata = (DTLS1_RECORD_DATA *)item->data;
OPENSSL_free(rdata->rbuf.buf); OPENSSL_free(rdata->rbuf.buf);
......
...@@ -68,7 +68,7 @@ void RECORD_LAYER_clear(RECORD_LAYER *rl) ...@@ -68,7 +68,7 @@ void RECORD_LAYER_clear(RECORD_LAYER *rl)
RECORD_LAYER_reset_read_sequence(rl); RECORD_LAYER_reset_read_sequence(rl);
RECORD_LAYER_reset_write_sequence(rl); RECORD_LAYER_reset_write_sequence(rl);
if (rl->d) if (rl->d)
DTLS_RECORD_LAYER_clear(rl); DTLS_RECORD_LAYER_clear(rl);
} }
......
...@@ -198,7 +198,7 @@ typedef struct record_layer_st { ...@@ -198,7 +198,7 @@ typedef struct record_layer_st {
unsigned char read_sequence[SEQ_NUM_SIZE]; unsigned char read_sequence[SEQ_NUM_SIZE];
unsigned char write_sequence[SEQ_NUM_SIZE]; unsigned char write_sequence[SEQ_NUM_SIZE];
DTLS_RECORD_LAYER *d; DTLS_RECORD_LAYER *d;
} RECORD_LAYER; } RECORD_LAYER;
......
...@@ -39,7 +39,7 @@ int ssl3_setup_read_buffer(SSL *s) ...@@ -39,7 +39,7 @@ int ssl3_setup_read_buffer(SSL *s)
unsigned char *p; unsigned char *p;
size_t len, align = 0, headerlen; size_t len, align = 0, headerlen;
SSL3_BUFFER *b; SSL3_BUFFER *b;
b = RECORD_LAYER_get_rbuf(&s->rlayer); b = RECORD_LAYER_get_rbuf(&s->rlayer);
if (SSL_IS_DTLS(s)) if (SSL_IS_DTLS(s))
......
...@@ -60,7 +60,7 @@ static int ssl_module_init(CONF_IMODULE *md, const CONF *cnf) ...@@ -60,7 +60,7 @@ static int ssl_module_init(CONF_IMODULE *md, const CONF *cnf)
STACK_OF(CONF_VALUE) *cmd_lists; STACK_OF(CONF_VALUE) *cmd_lists;
ssl_conf_section = CONF_imodule_get_value(md); ssl_conf_section = CONF_imodule_get_value(md);
cmd_lists = NCONF_get_section(cnf, ssl_conf_section); cmd_lists = NCONF_get_section(cnf, ssl_conf_section);
if (sk_CONF_VALUE_num(cmd_lists) <= 0){ if (sk_CONF_VALUE_num(cmd_lists) <= 0) {
if (cmd_lists == NULL) if (cmd_lists == NULL)
SSLerr(SSL_F_SSL_MODULE_INIT, SSL_R_SSL_SECTION_NOT_FOUND); SSLerr(SSL_F_SSL_MODULE_INIT, SSL_R_SSL_SECTION_NOT_FOUND);
else else
...@@ -174,7 +174,7 @@ static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name) ...@@ -174,7 +174,7 @@ static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name)
if (rv <= 0) { if (rv <= 0) {
if (rv == -2) if (rv == -2)
SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_UNKNOWN_COMMAND); SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_UNKNOWN_COMMAND);
else else
SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_BAD_VALUE); SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_BAD_VALUE);
ERR_add_error_data(6, "section=", name, ", cmd=", cmd->cmd, ERR_add_error_data(6, "section=", name, ", cmd=", cmd->cmd,
", arg=", cmd->arg); ", arg=", cmd->arg);
......
...@@ -974,7 +974,7 @@ int ssl_choose_client_version(SSL *s, int version) ...@@ -974,7 +974,7 @@ int ssl_choose_client_version(SSL *s, int version)
* or FIPS_mode() constraints and any floor imposed by the security level here, * or FIPS_mode() constraints and any floor imposed by the security level here,
* so we don't advertise the wrong protocol version to only reject the outcome later. * so we don't advertise the wrong protocol version to only reject the outcome later.
* *
* Computing the right floor matters. If, e.g., TLS 1.0 and 1.2 are enabled, * Computing the right floor matters. If, e.g., TLS 1.0 and 1.2 are enabled,
* TLS 1.1 is disabled, but the security level, Suite-B and/or MinProtocol * TLS 1.1 is disabled, but the security level, Suite-B and/or MinProtocol
* only allow TLS 1.2, we want to advertise TLS1.2, *not* TLS1. * only allow TLS 1.2, we want to advertise TLS1.2, *not* TLS1.
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册