diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-24 23:33:46 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-24 23:33:46 +0200 |
| commit | e1f434f8643f26d48ee8de21d715069de76b14e1 (patch) | |
| tree | f92e4580127930303c98a49d5651b9e2cd8a8b4c /include/git2 | |
| parent | 9d5efab89f3e8579e1641c1d5c726a2dcdb8c014 (diff) | |
| parent | 58ca8c7e1ff820b9deecbb1bbd34ad7408f47da9 (diff) | |
| download | libgit2-e1f434f8643f26d48ee8de21d715069de76b14e1.tar.gz | |
Merge pull request #3183 from libgit2/cmn/curl-stream
Implement a cURL stream
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/sys/stream.h | 2 | ||||
| -rw-r--r-- | include/git2/types.h | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/git2/sys/stream.h b/include/git2/sys/stream.h index c22179fab..55a714bbb 100644 --- a/include/git2/sys/stream.h +++ b/include/git2/sys/stream.h @@ -29,8 +29,10 @@ typedef struct git_stream { int version; int encrypted; + int proxy_support; int (*connect)(struct git_stream *); int (*certificate)(git_cert **, struct git_stream *); + int (*set_proxy)(struct git_stream *, const char *proxy_url); ssize_t (*read)(struct git_stream *, void *, size_t); ssize_t (*write)(struct git_stream *, const char *, size_t, int); int (*close)(struct git_stream *); diff --git a/include/git2/types.h b/include/git2/types.h index d1e7cd92c..c97e5ba61 100644 --- a/include/git2/types.h +++ b/include/git2/types.h @@ -284,6 +284,11 @@ typedef int (*git_transport_message_cb)(const char *str, int len, void *payload) * Type of host certificate structure that is passed to the check callback */ typedef enum git_cert_t { + /** + * No information about the certificate is available. This may + * happen when using curl. + */ + GIT_CERT_NONE, /** * The `data` argument to the callback will be a pointer to * the DER-encoded data. @@ -294,6 +299,13 @@ typedef enum git_cert_t { * `git_cert_hostkey` structure. */ GIT_CERT_HOSTKEY_LIBSSH2, + /** + * The `data` argument to the callback will be a pointer to a + * `git_strarray` with `name:content` strings containing + * information about the certificate. This is used when using + * curl. + */ + GIT_CERT_STRARRAY, } git_cert_t; /** |
