diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-08-29 17:18:23 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-09-16 17:01:30 +0200 |
| commit | 17491f6e5660b82cb8163eea58805df6398af16e (patch) | |
| tree | 406aaf1fc53853465fb84452d3c8bb45945694fe /include/git2 | |
| parent | 85acc56262b20567c40a90c0996115060655112c (diff) | |
| download | libgit2-17491f6e5660b82cb8163eea58805df6398af16e.tar.gz | |
transport: always call the certificate check callback
We should let the user decide whether to cancel the connection or not
regardless of whether our checks have decided that the certificate is
fine. We provide our own assessment to the callback to let the user fall
back to our checks if they so desire.
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/types.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/git2/types.h b/include/git2/types.h index b574d2945..51f058867 100644 --- a/include/git2/types.h +++ b/include/git2/types.h @@ -262,9 +262,11 @@ typedef enum git_cert_t git_cert_t; * @param type The type of certificate or host info, SSH or X.509 * @param data The data for the certificate or host info * @param len The size of the certificate or host info + * @param valid Whether the libgit2 checks (OpenSSL or WinHTTP) think + * this certificate is valid * @param payload Payload provided by the caller */ -typedef int (*git_transport_certificate_check_cb)(git_cert_t type, void *data, size_t len, void *payload); +typedef int (*git_transport_certificate_check_cb)(git_cert_t type, void *data, size_t len, int valid, void *payload); /** * Opaque structure representing a submodule. |
