libgit2: Verbose output error

This commit is contained in:
Alexey Pavlov
2015-12-23 15:23:26 +03:00
parent 2ac0b05a91
commit 86c2847182
2 changed files with 20 additions and 4 deletions

View File

@@ -0,0 +1,14 @@
diff --git a/src/openssl_stream.c b/src/openssl_stream.c
index 54dd761..1e2edee 100644
--- a/src/openssl_stream.c
+++ b/src/openssl_stream.c
@@ -446,7 +446,8 @@ int git_openssl_stream_new(git_stream **out, const char *host, const char *port)
st->ssl = SSL_new(git__ssl_ctx);
if (st->ssl == NULL) {
- giterr_set(GITERR_SSL, "failed to create ssl object");
+ giterr_set(GITERR_SSL, "failed to create ssl object: %s",
+ ERR_error_string(ERR_get_error(), NULL));
return -1;
}