diff options
author | jsing <> | 2017-04-10 17:11:13 +0000 |
---|---|---|
committer | jsing <> | 2017-04-10 17:11:13 +0000 |
commit | 1fb5784eee903ab9b8621581b6128aaccf2d3120 (patch) | |
tree | 2ba4db6e1d15d0e16b83f40c86378539156871c3 /src/lib/libtls/tls_internal.h | |
parent | a887f273016c6b1a211de9fd477d86b2b8c26792 (diff) | |
download | openbsd-1fb5784eee903ab9b8621581b6128aaccf2d3120.tar.gz openbsd-1fb5784eee903ab9b8621581b6128aaccf2d3120.tar.bz2 openbsd-1fb5784eee903ab9b8621581b6128aaccf2d3120.zip |
Rework name verification code so that a match is indicated via an argument,
rather than return codes. More strictly follow RFC 6125, in particular only
check the CN if there are no SAN identifiers present in the certificate
(per section 6.4.4).
Previous behaviour questioned by Daniel Stenberg <daniel at haxx dot se>.
ok beck@ jca@
Diffstat (limited to 'src/lib/libtls/tls_internal.h')
-rw-r--r-- | src/lib/libtls/tls_internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libtls/tls_internal.h b/src/lib/libtls/tls_internal.h index 7bbc14ca86..bd23249e57 100644 --- a/src/lib/libtls/tls_internal.h +++ b/src/lib/libtls/tls_internal.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_internal.h,v 1.56 2017/04/07 08:48:30 jsing Exp $ */ | 1 | /* $OpenBSD: tls_internal.h,v 1.57 2017/04/10 17:11:13 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> | 3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> |
4 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
@@ -186,7 +186,8 @@ void tls_sni_ctx_free(struct tls_sni_ctx *sni_ctx); | |||
186 | struct tls *tls_new(void); | 186 | struct tls *tls_new(void); |
187 | struct tls *tls_server_conn(struct tls *ctx); | 187 | struct tls *tls_server_conn(struct tls *ctx); |
188 | 188 | ||
189 | int tls_check_name(struct tls *ctx, X509 *cert, const char *servername); | 189 | int tls_check_name(struct tls *ctx, X509 *cert, const char *servername, |
190 | int *match); | ||
190 | int tls_configure_server(struct tls *ctx); | 191 | int tls_configure_server(struct tls *ctx); |
191 | 192 | ||
192 | int tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx); | 193 | int tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx); |