diff options
author | 2015-09-29 10:17:04 +0000 | |
---|---|---|
committer | 2015-09-29 10:17:04 +0000 | |
commit | 810e306d0a66712b68fbd101fbc7d75dfd5b42bb (patch) | |
tree | 566ae849973eb07ff578402ab8ad9f4dae2a46fe /lib | |
parent | add sizes to some of the simpler free calls (diff) | |
download | wireguard-openbsd-810e306d0a66712b68fbd101fbc7d75dfd5b42bb.tar.xz wireguard-openbsd-810e306d0a66712b68fbd101fbc7d75dfd5b42bb.zip |
clean some ugly intendation warts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libtls/tls.c | 4 | ||||
-rw-r--r-- | lib/libtls/tls_client.c | 7 | ||||
-rw-r--r-- | lib/libtls/tls_config.c | 4 | ||||
-rw-r--r-- | lib/libtls/tls_server.c | 6 | ||||
-rw-r--r-- | lib/libtls/tls_verify.c | 12 |
5 files changed, 21 insertions, 12 deletions
diff --git a/lib/libtls/tls.c b/lib/libtls/tls.c index ac9262a4fcb..f8412717544 100644 --- a/lib/libtls/tls.c +++ b/lib/libtls/tls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls.c,v 1.32 2015/09/14 16:16:38 jsing Exp $ */ +/* $OpenBSD: tls.c,v 1.33 2015/09/29 10:17:04 deraadt Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -285,7 +285,7 @@ tls_configure_ssl_verify(struct tls *ctx, int verify) goto err; } } else if (SSL_CTX_load_verify_locations(ctx->ssl_ctx, - ctx->config->ca_file, ctx->config->ca_path) != 1) { + ctx->config->ca_file, ctx->config->ca_path) != 1) { tls_set_errorx(ctx, "ssl verify setup failure"); goto err; } diff --git a/lib/libtls/tls_client.c b/lib/libtls/tls_client.c index 047831e59f8..cea01d17fec 100644 --- a/lib/libtls/tls_client.c +++ b/lib/libtls/tls_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_client.c,v 1.28 2015/09/12 19:54:31 jsing Exp $ */ +/* $OpenBSD: tls_client.c,v 1.29 2015/09/29 10:17:04 deraadt Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -166,7 +166,10 @@ int tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, const char *servername) { - union { struct in_addr ip4; struct in6_addr ip6; } addrbuf; + union { + struct in_addr ip4; + struct in6_addr ip6; + } addrbuf; int rv = -1; if ((ctx->flags & TLS_CLIENT) == 0) { diff --git a/lib/libtls/tls_config.c b/lib/libtls/tls_config.c index d5beb38f3ef..5ab2379628a 100644 --- a/lib/libtls/tls_config.c +++ b/lib/libtls/tls_config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_config.c,v 1.13 2015/09/14 16:16:38 jsing Exp $ */ +/* $OpenBSD: tls_config.c,v 1.14 2015/09/29 10:17:04 deraadt Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -79,7 +79,7 @@ tls_config_new(void) tls_config_set_protocols(config, TLS_PROTOCOLS_DEFAULT); tls_config_set_verify_depth(config, 6); - + tls_config_prefer_ciphers_server(config); tls_config_verify(config); diff --git a/lib/libtls/tls_server.c b/lib/libtls/tls_server.c index 1baf717c900..ad98cf3d7e8 100644 --- a/lib/libtls/tls_server.c +++ b/lib/libtls/tls_server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_server.c,v 1.17 2015/09/12 19:54:31 jsing Exp $ */ +/* $OpenBSD: tls_server.c,v 1.18 2015/09/29 10:17:04 deraadt Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -91,7 +91,7 @@ tls_configure_server(struct tls *ctx) if (ctx->config->ciphers_server == 1) SSL_CTX_set_options(ctx->ssl_ctx, - SSL_OP_CIPHER_SERVER_PREFERENCE); + SSL_OP_CIPHER_SERVER_PREFERENCE); /* * Set session ID context to a random value. We don't support @@ -120,7 +120,7 @@ int tls_accept_fds(struct tls *ctx, struct tls **cctx, int fd_read, int fd_write) { struct tls *conn_ctx = NULL; - + if ((ctx->flags & TLS_SERVER) == 0) { tls_set_errorx(ctx, "not a server context"); goto err; diff --git a/lib/libtls/tls_verify.c b/lib/libtls/tls_verify.c index 9a0f97eadaf..2b0ac653be5 100644 --- a/lib/libtls/tls_verify.c +++ b/lib/libtls/tls_verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_verify.c,v 1.13 2015/09/11 13:12:29 beck Exp $ */ +/* $OpenBSD: tls_verify.c,v 1.14 2015/09/29 10:17:04 deraadt Exp $ */ /* * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> * @@ -88,7 +88,10 @@ static int tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name) { STACK_OF(GENERAL_NAME) *altname_stack = NULL; - union { struct in_addr ip4; struct in6_addr ip6; } addrbuf; + union { + struct in_addr ip4; + struct in6_addr ip6; + } addrbuf; int addrlen, type; int count, i; int rv = -1; @@ -201,7 +204,10 @@ tls_check_common_name(struct tls *ctx, X509 *cert, const char *name) char *common_name = NULL; int common_name_len; int rv = -1; - union { struct in_addr ip4; struct in6_addr ip6; } addrbuf; + union { + struct in_addr ip4; + struct in6_addr ip6; + } addrbuf; subject_name = X509_get_subject_name(cert); if (subject_name == NULL) |