diff options
| author | jsing <> | 2014-11-02 14:45:05 +0000 |
|---|---|---|
| committer | jsing <> | 2014-11-02 14:45:05 +0000 |
| commit | 44fdefc6525622fe6d745eb387fa3266f9028afb (patch) | |
| tree | d9142429aca61b41c92ba09dd825948905416233 /src/lib/libtls/tls.h | |
| parent | 4b5b1f9d30def9cb46fc251452c167712a74d45a (diff) | |
| download | openbsd-44fdefc6525622fe6d745eb387fa3266f9028afb.tar.gz openbsd-44fdefc6525622fe6d745eb387fa3266f9028afb.tar.bz2 openbsd-44fdefc6525622fe6d745eb387fa3266f9028afb.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 '')
| -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 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 | ||
| 67 | int tls_accept_socket(struct tls *ctx, struct tls **cctx, int socket); | 67 | int tls_accept_socket(struct tls *ctx, struct tls **cctx, int socket); |
| 68 | int tls_connect(struct tls *ctx, const char *host, const char *port); | 68 | int tls_connect(struct tls *ctx, const char *host, const char *port); |
| 69 | int tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, | ||
| 70 | const char *hostname); | ||
| 69 | int tls_connect_socket(struct tls *ctx, int s, const char *hostname); | 71 | int tls_connect_socket(struct tls *ctx, int s, const char *hostname); |
| 70 | int tls_read(struct tls *ctx, void *buf, size_t buflen, size_t *outlen); | 72 | int tls_read(struct tls *ctx, void *buf, size_t buflen, size_t *outlen); |
| 71 | int tls_write(struct tls *ctx, const void *buf, size_t buflen, size_t *outlen); | 73 | int tls_write(struct tls *ctx, const void *buf, size_t buflen, size_t *outlen); |
