summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls_internal.h
diff options
context:
space:
mode:
authorjsing <>2016-08-15 14:04:23 +0000
committerjsing <>2016-08-15 14:04:23 +0000
commitb625f466ed086e94acecb66a8ddd3309cb0e3006 (patch)
tree0f8db1f8992ad067c26b92b7063f1d0e0e260bb8 /src/lib/libtls/tls_internal.h
parent27106e2b77c6e7da64be6b4849b458e997106b07 (diff)
downloadopenbsd-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.h11
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);
112struct tls *tls_server_conn(struct tls *ctx); 112struct tls *tls_server_conn(struct tls *ctx);
113 113
114int tls_check_name(struct tls *ctx, X509 *cert, const char *servername); 114int tls_check_name(struct tls *ctx, X509 *cert, const char *servername);
115int tls_configure_keypair(struct tls *ctx, SSL_CTX *ssl_ctx,
116 struct tls_keypair *keypair, int required);
117int tls_configure_server(struct tls *ctx); 115int tls_configure_server(struct tls *ctx);
118int tls_configure_ssl(struct tls *ctx); 116
119int tls_configure_ssl_verify(struct tls *ctx, int verify); 117int tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx);
118int tls_configure_ssl_keypair(struct tls *ctx, SSL_CTX *ssl_ctx,
119 struct tls_keypair *keypair, int required);
120int tls_configure_ssl_verify(struct tls *ctx, SSL_CTX *ssl_ctx, int verify);
120 121
121int tls_handshake_client(struct tls *ctx); 122int tls_handshake_client(struct tls *ctx);
122int tls_handshake_server(struct tls *ctx); 123int tls_handshake_server(struct tls *ctx);