summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls.h
diff options
context:
space:
mode:
authorjsing <>2014-11-02 14:45:05 +0000
committerjsing <>2014-11-02 14:45:05 +0000
commitae4a0ba982e7f6609f71539c65c23a5bdfdf446d (patch)
treed9142429aca61b41c92ba09dd825948905416233 /src/lib/libtls/tls.h
parent2ac1fcf6771c75502e194a147db7f1f45d5e41c7 (diff)
downloadopenbsd-ae4a0ba982e7f6609f71539c65c23a5bdfdf446d.tar.gz
openbsd-ae4a0ba982e7f6609f71539c65c23a5bdfdf446d.tar.bz2
openbsd-ae4a0ba982e7f6609f71539c65c23a5bdfdf446d.zip
Add a tls_connect_fds() function that allows a secure connection to be
established using a pair of existing file descriptors. Based on a diff/request from Jan Klemkow. Rides previous libtls rename/library bump. Discussed with tedu@.
Diffstat (limited to 'src/lib/libtls/tls.h')
-rw-r--r--src/lib/libtls/tls.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.h b/src/lib/libtls/tls.h
index 0fa776e584..21e1d74b35 100644
--- a/src/lib/libtls/tls.h
+++ b/src/lib/libtls/tls.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.h,v 1.1 2014/10/31 13:46:17 jsing Exp $ */ 1/* $OpenBSD: tls.h,v 1.2 2014/11/02 14:45:05 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -66,6 +66,8 @@ void tls_free(struct tls *ctx);
66 66
67int tls_accept_socket(struct tls *ctx, struct tls **cctx, int socket); 67int tls_accept_socket(struct tls *ctx, struct tls **cctx, int socket);
68int tls_connect(struct tls *ctx, const char *host, const char *port); 68int tls_connect(struct tls *ctx, const char *host, const char *port);
69int tls_connect_fds(struct tls *ctx, int fd_read, int fd_write,
70 const char *hostname);
69int tls_connect_socket(struct tls *ctx, int s, const char *hostname); 71int tls_connect_socket(struct tls *ctx, int s, const char *hostname);
70int tls_read(struct tls *ctx, void *buf, size_t buflen, size_t *outlen); 72int tls_read(struct tls *ctx, void *buf, size_t buflen, size_t *outlen);
71int tls_write(struct tls *ctx, const void *buf, size_t buflen, size_t *outlen); 73int tls_write(struct tls *ctx, const void *buf, size_t buflen, size_t *outlen);