diff options
| author | 2015-09-29 13:10:53 +0000 | |
|---|---|---|
| committer | 2015-09-29 13:10:53 +0000 | |
| commit | fc5c813d12eafcf3fd0e29516a5c8cd3438177ef (patch) | |
| tree | fe6078fa80450db9b636768d639a48a32fad7ac9 /lib/libtls/tls_verify.c | |
| parent | make the bpf filters a bpf_program instead of an array of bpf_insn. (diff) | |
| download | wireguard-openbsd-fc5c813d12eafcf3fd0e29516a5c8cd3438177ef.tar.xz wireguard-openbsd-fc5c813d12eafcf3fd0e29516a5c8cd3438177ef.zip | |
Instead of declaring a union in multiple places, move it to tls_internal.h.
ok deraadt@
Diffstat (limited to 'lib/libtls/tls_verify.c')
| -rw-r--r-- | lib/libtls/tls_verify.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/libtls/tls_verify.c b/lib/libtls/tls_verify.c index 2b0ac653be5..eec72bade8c 100644 --- a/lib/libtls/tls_verify.c +++ b/lib/libtls/tls_verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_verify.c,v 1.14 2015/09/29 10:17:04 deraadt Exp $ */ +/* $OpenBSD: tls_verify.c,v 1.15 2015/09/29 13:10:53 jsing Exp $ */ /* * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> * @@ -88,10 +88,7 @@ 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 tls_addr addrbuf; int addrlen, type; int count, i; int rv = -1; @@ -202,12 +199,9 @@ tls_check_common_name(struct tls *ctx, X509 *cert, const char *name) { X509_NAME *subject_name; char *common_name = NULL; + union tls_addr addrbuf; int common_name_len; int rv = -1; - union { - struct in_addr ip4; - struct in6_addr ip6; - } addrbuf; subject_name = X509_get_subject_name(cert); if (subject_name == NULL) |
