diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libtls/tls.c | 4 | ||||
| -rw-r--r-- | src/lib/libtls/tls_client.c | 7 | ||||
| -rw-r--r-- | src/lib/libtls/tls_config.c | 4 | ||||
| -rw-r--r-- | src/lib/libtls/tls_server.c | 6 | ||||
| -rw-r--r-- | src/lib/libtls/tls_verify.c | 12 |
5 files changed, 21 insertions, 12 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c index ac9262a4fc..f841271754 100644 --- a/src/lib/libtls/tls.c +++ b/src/lib/libtls/tls.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls.c,v 1.32 2015/09/14 16:16:38 jsing Exp $ */ | 1 | /* $OpenBSD: tls.c,v 1.33 2015/09/29 10:17:04 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -285,7 +285,7 @@ tls_configure_ssl_verify(struct tls *ctx, int verify) | |||
| 285 | goto err; | 285 | goto err; |
| 286 | } | 286 | } |
| 287 | } else if (SSL_CTX_load_verify_locations(ctx->ssl_ctx, | 287 | } else if (SSL_CTX_load_verify_locations(ctx->ssl_ctx, |
| 288 | ctx->config->ca_file, ctx->config->ca_path) != 1) { | 288 | ctx->config->ca_file, ctx->config->ca_path) != 1) { |
| 289 | tls_set_errorx(ctx, "ssl verify setup failure"); | 289 | tls_set_errorx(ctx, "ssl verify setup failure"); |
| 290 | goto err; | 290 | goto err; |
| 291 | } | 291 | } |
diff --git a/src/lib/libtls/tls_client.c b/src/lib/libtls/tls_client.c index 047831e59f..cea01d17fe 100644 --- a/src/lib/libtls/tls_client.c +++ b/src/lib/libtls/tls_client.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_client.c,v 1.28 2015/09/12 19:54:31 jsing Exp $ */ | 1 | /* $OpenBSD: tls_client.c,v 1.29 2015/09/29 10:17:04 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -166,7 +166,10 @@ int | |||
| 166 | tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, | 166 | tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, |
| 167 | const char *servername) | 167 | const char *servername) |
| 168 | { | 168 | { |
| 169 | union { struct in_addr ip4; struct in6_addr ip6; } addrbuf; | 169 | union { |
| 170 | struct in_addr ip4; | ||
| 171 | struct in6_addr ip6; | ||
| 172 | } addrbuf; | ||
| 170 | int rv = -1; | 173 | int rv = -1; |
| 171 | 174 | ||
| 172 | if ((ctx->flags & TLS_CLIENT) == 0) { | 175 | if ((ctx->flags & TLS_CLIENT) == 0) { |
diff --git a/src/lib/libtls/tls_config.c b/src/lib/libtls/tls_config.c index d5beb38f3e..5ab2379628 100644 --- a/src/lib/libtls/tls_config.c +++ b/src/lib/libtls/tls_config.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_config.c,v 1.13 2015/09/14 16:16:38 jsing Exp $ */ | 1 | /* $OpenBSD: tls_config.c,v 1.14 2015/09/29 10:17:04 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -79,7 +79,7 @@ tls_config_new(void) | |||
| 79 | 79 | ||
| 80 | tls_config_set_protocols(config, TLS_PROTOCOLS_DEFAULT); | 80 | tls_config_set_protocols(config, TLS_PROTOCOLS_DEFAULT); |
| 81 | tls_config_set_verify_depth(config, 6); | 81 | tls_config_set_verify_depth(config, 6); |
| 82 | 82 | ||
| 83 | tls_config_prefer_ciphers_server(config); | 83 | tls_config_prefer_ciphers_server(config); |
| 84 | 84 | ||
| 85 | tls_config_verify(config); | 85 | tls_config_verify(config); |
diff --git a/src/lib/libtls/tls_server.c b/src/lib/libtls/tls_server.c index 1baf717c90..ad98cf3d7e 100644 --- a/src/lib/libtls/tls_server.c +++ b/src/lib/libtls/tls_server.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_server.c,v 1.17 2015/09/12 19:54:31 jsing Exp $ */ | 1 | /* $OpenBSD: tls_server.c,v 1.18 2015/09/29 10:17:04 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -91,7 +91,7 @@ tls_configure_server(struct tls *ctx) | |||
| 91 | 91 | ||
| 92 | if (ctx->config->ciphers_server == 1) | 92 | if (ctx->config->ciphers_server == 1) |
| 93 | SSL_CTX_set_options(ctx->ssl_ctx, | 93 | SSL_CTX_set_options(ctx->ssl_ctx, |
| 94 | SSL_OP_CIPHER_SERVER_PREFERENCE); | 94 | SSL_OP_CIPHER_SERVER_PREFERENCE); |
| 95 | 95 | ||
| 96 | /* | 96 | /* |
| 97 | * Set session ID context to a random value. We don't support | 97 | * Set session ID context to a random value. We don't support |
| @@ -120,7 +120,7 @@ int | |||
| 120 | tls_accept_fds(struct tls *ctx, struct tls **cctx, int fd_read, int fd_write) | 120 | tls_accept_fds(struct tls *ctx, struct tls **cctx, int fd_read, int fd_write) |
| 121 | { | 121 | { |
| 122 | struct tls *conn_ctx = NULL; | 122 | struct tls *conn_ctx = NULL; |
| 123 | 123 | ||
| 124 | if ((ctx->flags & TLS_SERVER) == 0) { | 124 | if ((ctx->flags & TLS_SERVER) == 0) { |
| 125 | tls_set_errorx(ctx, "not a server context"); | 125 | tls_set_errorx(ctx, "not a server context"); |
| 126 | goto err; | 126 | goto err; |
diff --git a/src/lib/libtls/tls_verify.c b/src/lib/libtls/tls_verify.c index 9a0f97eada..2b0ac653be 100644 --- a/src/lib/libtls/tls_verify.c +++ b/src/lib/libtls/tls_verify.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_verify.c,v 1.13 2015/09/11 13:12:29 beck Exp $ */ | 1 | /* $OpenBSD: tls_verify.c,v 1.14 2015/09/29 10:17:04 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> | 3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> |
| 4 | * | 4 | * |
| @@ -88,7 +88,10 @@ static int | |||
| 88 | tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name) | 88 | tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name) |
| 89 | { | 89 | { |
| 90 | STACK_OF(GENERAL_NAME) *altname_stack = NULL; | 90 | STACK_OF(GENERAL_NAME) *altname_stack = NULL; |
| 91 | union { struct in_addr ip4; struct in6_addr ip6; } addrbuf; | 91 | union { |
| 92 | struct in_addr ip4; | ||
| 93 | struct in6_addr ip6; | ||
| 94 | } addrbuf; | ||
| 92 | int addrlen, type; | 95 | int addrlen, type; |
| 93 | int count, i; | 96 | int count, i; |
| 94 | int rv = -1; | 97 | int rv = -1; |
| @@ -201,7 +204,10 @@ tls_check_common_name(struct tls *ctx, X509 *cert, const char *name) | |||
| 201 | char *common_name = NULL; | 204 | char *common_name = NULL; |
| 202 | int common_name_len; | 205 | int common_name_len; |
| 203 | int rv = -1; | 206 | int rv = -1; |
| 204 | union { struct in_addr ip4; struct in6_addr ip6; } addrbuf; | 207 | union { |
| 208 | struct in_addr ip4; | ||
| 209 | struct in6_addr ip6; | ||
| 210 | } addrbuf; | ||
| 205 | 211 | ||
| 206 | subject_name = X509_get_subject_name(cert); | 212 | subject_name = X509_get_subject_name(cert); |
| 207 | if (subject_name == NULL) | 213 | if (subject_name == NULL) |
