From 53b67cf53ae755b09e315a3bd30e87b66c4ea769 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 11 Feb 2015 07:01:10 +0000 Subject: Provide a tls_connect_servername() function that has the same behaviour as tls_connect(), however allows the name to use for verification to be explicitly provided, rather than being inferred from the host value. Requested by reyk@ ok reyk@ tedu@ --- src/lib/libtls/tls.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/libtls/tls.h') diff --git a/src/lib/libtls/tls.h b/src/lib/libtls/tls.h index c266832c80..0a6f8d7258 100644 --- a/src/lib/libtls/tls.h +++ b/src/lib/libtls/tls.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tls.h,v 1.6 2015/02/11 06:46:33 jsing Exp $ */ +/* $OpenBSD: tls.h,v 1.7 2015/02/11 07:01:10 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -71,6 +71,8 @@ int tls_accept_socket(struct tls *ctx, struct tls **cctx, int socket); int tls_connect(struct tls *ctx, const char *host, const char *port); int tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, const char *servername); +int tls_connect_servername(struct tls *ctx, const char *host, const char *port, + const char *servername); int tls_connect_socket(struct tls *ctx, int s, const char *servername); int tls_read(struct tls *ctx, void *buf, size_t buflen, size_t *outlen); int tls_write(struct tls *ctx, const void *buf, size_t buflen, size_t *outlen); -- cgit v1.2.3-55-g6feb