summaryrefslogtreecommitdiff
path: root/src/streams/openssl.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-10-25 08:49:01 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2018-11-28 15:46:57 +0000
commit43b592ac84dbd3d649022ff9503f00ecc83d5278 (patch)
treeaeb52e3f745cf99eb5d7807073dab1d3d7a07709 /src/streams/openssl.h
parent6ba3e6affc73b84f6cd2cadf476c0e0c5e58e404 (diff)
downloadlibgit2-43b592ac84dbd3d649022ff9503f00ecc83d5278.tar.gz
tls: introduce a wrap function
Introduce `git_tls_stream_wrap` which will take an existing `stream` with an already connected socket and begin speaking TLS on top of it. This is useful if you've built a connection to a proxy server and you wish to begin CONNECT over it to tunnel a TLS connection. Also update the pluggable TLS stream layer so that it can accept a registration structure that provides an `init` and `wrap` function, instead of a single initialization function.
Diffstat (limited to 'src/streams/openssl.h')
-rw-r--r--src/streams/openssl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/streams/openssl.h b/src/streams/openssl.h
index 496d7efbf..7296b7a08 100644
--- a/src/streams/openssl.h
+++ b/src/streams/openssl.h
@@ -14,6 +14,7 @@
extern int git_openssl_stream_global_init(void);
extern int git_openssl_stream_new(git_stream **out, const char *host, const char *port);
+extern int git_openssl_stream_wrap(git_stream **out, git_stream *in, const char *host);
extern int git_openssl__set_cert_location(const char *file, const char *path);