diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-05-26 21:17:08 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-05-26 21:17:08 +0200 |
| commit | 250b95b24b1a079be5825f862e42f4b99a4c3587 (patch) | |
| tree | 5bad1f93ac395a37eaa81edc3e7e58399154e332 /src/netops.c | |
| parent | 441df990b4e68459eb98c10445478d0fece30b83 (diff) | |
| download | libgit2-250b95b24b1a079be5825f862e42f4b99a4c3587.tar.gz | |
ssl: allow skipping the server certificate check
Sometimes it's useful not to perform the check. Allow it to be
configurable.
Diffstat (limited to 'src/netops.c')
| -rw-r--r-- | src/netops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netops.c b/src/netops.c index bd76d3022..706e0924e 100644 --- a/src/netops.c +++ b/src/netops.c @@ -358,7 +358,7 @@ static int ssl_setup(git_transport *t, const char *host) if ((ret = SSL_connect(t->ssl.ssl)) <= 0) return ssl_set_error(&t->ssl, ret); - if (verify_server_cert(t, host) < 0) + if (t->check_cert && verify_server_cert(t, host) < 0) return -1; return 0; |
