diff options
author | jsing <> | 2016-08-15 14:04:23 +0000 |
---|---|---|
committer | jsing <> | 2016-08-15 14:04:23 +0000 |
commit | b625f466ed086e94acecb66a8ddd3309cb0e3006 (patch) | |
tree | 0f8db1f8992ad067c26b92b7063f1d0e0e260bb8 /src/lib/libtls/tls_internal.h | |
parent | 27106e2b77c6e7da64be6b4849b458e997106b07 (diff) | |
download | openbsd-b625f466ed086e94acecb66a8ddd3309cb0e3006.tar.gz openbsd-b625f466ed086e94acecb66a8ddd3309cb0e3006.tar.bz2 openbsd-b625f466ed086e94acecb66a8ddd3309cb0e3006.zip |
Explicitly pass in an SSL_CTX * to the functions that operate on one,
instead of assuming that they should use the one associated with the TLS
context. This allows these functions to be used with the additional
SSL contexts that are needed to support server-side SNI.
Also rename tls_configure_keypair() to tls_configure_ssl_keypair(), so that
these functions have a common prefix.
ok reyk@
Diffstat (limited to 'src/lib/libtls/tls_internal.h')
-rw-r--r-- | src/lib/libtls/tls_internal.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libtls/tls_internal.h b/src/lib/libtls/tls_internal.h index fa972bbadf..f266996a4c 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.36 2016/08/13 13:05:51 jsing Exp $ */ | 1 | /* $OpenBSD: tls_internal.h,v 1.37 2016/08/15 14:04:23 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> |
@@ -112,11 +112,12 @@ struct tls *tls_new(void); | |||
112 | struct tls *tls_server_conn(struct tls *ctx); | 112 | struct tls *tls_server_conn(struct tls *ctx); |
113 | 113 | ||
114 | int tls_check_name(struct tls *ctx, X509 *cert, const char *servername); | 114 | int tls_check_name(struct tls *ctx, X509 *cert, const char *servername); |
115 | int tls_configure_keypair(struct tls *ctx, SSL_CTX *ssl_ctx, | ||
116 | struct tls_keypair *keypair, int required); | ||
117 | int tls_configure_server(struct tls *ctx); | 115 | int tls_configure_server(struct tls *ctx); |
118 | int tls_configure_ssl(struct tls *ctx); | 116 | |
119 | int tls_configure_ssl_verify(struct tls *ctx, int verify); | 117 | int tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx); |
118 | int tls_configure_ssl_keypair(struct tls *ctx, SSL_CTX *ssl_ctx, | ||
119 | struct tls_keypair *keypair, int required); | ||
120 | int tls_configure_ssl_verify(struct tls *ctx, SSL_CTX *ssl_ctx, int verify); | ||
120 | 121 | ||
121 | int tls_handshake_client(struct tls *ctx); | 122 | int tls_handshake_client(struct tls *ctx); |
122 | int tls_handshake_server(struct tls *ctx); | 123 | int tls_handshake_server(struct tls *ctx); |