diff options
| author | jsing <> | 2015-02-11 07:01:10 +0000 |
|---|---|---|
| committer | jsing <> | 2015-02-11 07:01:10 +0000 |
| commit | d641e8f3aa538ca2210627d0cd491ad424b56353 (patch) | |
| tree | c6f7f9e067233df00a99495d7e346482bb70b61e /src/lib/libtls/tls.h | |
| parent | 18dcc969364b2ee37a91a47c36b37a6fb023fb98 (diff) | |
| download | openbsd-d641e8f3aa538ca2210627d0cd491ad424b56353.tar.gz openbsd-d641e8f3aa538ca2210627d0cd491ad424b56353.tar.bz2 openbsd-d641e8f3aa538ca2210627d0cd491ad424b56353.zip | |
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@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libtls/tls.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
| 1 | /* $OpenBSD: tls.h,v 1.6 2015/02/11 06:46:33 jsing Exp $ */ | 1 | /* $OpenBSD: tls.h,v 1.7 2015/02/11 07:01:10 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -71,6 +71,8 @@ int tls_accept_socket(struct tls *ctx, struct tls **cctx, int socket); | |||
| 71 | int tls_connect(struct tls *ctx, const char *host, const char *port); | 71 | int tls_connect(struct tls *ctx, const char *host, const char *port); |
| 72 | int tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, | 72 | int tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, |
| 73 | const char *servername); | 73 | const char *servername); |
| 74 | int tls_connect_servername(struct tls *ctx, const char *host, const char *port, | ||
| 75 | const char *servername); | ||
| 74 | int tls_connect_socket(struct tls *ctx, int s, const char *servername); | 76 | int tls_connect_socket(struct tls *ctx, int s, const char *servername); |
| 75 | int tls_read(struct tls *ctx, void *buf, size_t buflen, size_t *outlen); | 77 | int tls_read(struct tls *ctx, void *buf, size_t buflen, size_t *outlen); |
| 76 | int tls_write(struct tls *ctx, const void *buf, size_t buflen, size_t *outlen); | 78 | int tls_write(struct tls *ctx, const void *buf, size_t buflen, size_t *outlen); |
