diff options
author | Etienne Samson <samson.etienne@gmail.com> | 2018-03-29 22:13:56 +0200 |
---|---|---|
committer | Etienne Samson <samson.etienne@gmail.com> | 2018-04-11 21:02:43 +0200 |
commit | ca3b2234dc7f1bd0d0f81488d3e29980b47a85b4 (patch) | |
tree | 62bf2f0c9f264ea471d33f4e099ec883a7605d0b /src/settings.c | |
parent | 0eca42304a10c9ad6170a38a440dfab8e354d38d (diff) | |
download | libgit2-ca3b2234dc7f1bd0d0f81488d3e29980b47a85b4.tar.gz |
mbedtls: initial support
Diffstat (limited to 'src/settings.c')
-rw-r--r-- | src/settings.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c index 2a52ffbf6..13ae6d489 100644 --- a/src/settings.c +++ b/src/settings.c @@ -11,6 +11,10 @@ # include <openssl/err.h> #endif +#ifdef GIT_MBEDTLS +# include <mbedtls/error.h> +#endif + #include <git2.h> #include "sysdir.h" #include "cache.h" @@ -20,6 +24,7 @@ #include "refs.h" #include "transports/smart.h" #include "streams/openssl.h" +#include "streams/mbedtls.h" void git_libgit2_version(int *major, int *minor, int *rev) { @@ -175,6 +180,12 @@ int git_libgit2_opts(int key, ...) const char *path = va_arg(ap, const char *); error = git_openssl__set_cert_location(file, path); } +#elif defined(GIT_MBEDTLS) + { + const char *file = va_arg(ap, const char *); + const char *path = va_arg(ap, const char *); + error = git_mbedtls__set_cert_location(file, path); + } #else giterr_set(GITERR_SSL, "TLS backend doesn't support certificate locations"); error = -1; |