summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-07-04 12:45:43 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-09-16 17:01:30 +0200
commit9b9405865e15da3a0a6ee0a67b59b36c5a973a8c (patch)
treeab758a8c8b5ff4ecb6d5e2d91926c0ca397d56f8 /include/git2/remote.h
parentd99c8ca1783cfd04869e88f8707c036fc6053a05 (diff)
downloadlibgit2-9b9405865e15da3a0a6ee0a67b59b36c5a973a8c.tar.gz
Provide a callback for certificate validation
If the certificate validation fails (or always in the case of ssh), let the user decide whether to allow the connection. The data structure passed to the user is the native certificate information from the underlying implementation, namely OpenSSL or WinHTTP.
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index c0717fa31..723147590 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -459,6 +459,14 @@ struct git_remote_callbacks {
git_cred_acquire_cb credentials;
/**
+ * If cert verification fails, this will be called to let the
+ * user make the final decision of whether to allow the
+ * connection to proceed. Returns 1 to allow the connection, 0
+ * to disallow it or a negative value to indicate an error.
+ */
+ git_transport_certificate_check_cb certificate_check;
+
+ /**
* During the download of new data, this will be regularly
* called with the current count of progress done by the
* indexer.