diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-05-01 02:05:25 +0400 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-05-19 19:50:52 +0400 |
commit | 66024c7cbcbae3a75d0b0426993d8ee5fa5f9dfb (patch) | |
tree | 942b12533fe7f158679c0a2a3692494be849a855 /src/common.h | |
parent | ad5df35a47d56c3d716d7a56eac4aeb611987c11 (diff) |
http: add https support when GnuTLS is available
If it's not available, an error saying so will be returned when trying
to use a https:// URL.
This also unifies a lot of the network code to use git_transport in
many places instead of an socket descriptor.
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index 30757de70..75e6e5867 100644 --- a/src/common.h +++ b/src/common.h @@ -20,6 +20,10 @@ #include <sys/types.h> #include <sys/stat.h> +#ifdef GIT_GNUTLS +# include <gnutls/gnutls.h> +#endif + #ifdef GIT_WIN32 # include <io.h> @@ -65,6 +69,12 @@ void giterr_clear(void); void giterr_set_str(int error_class, const char *string); void giterr_set_regex(const regex_t *regex, int error_code); +#ifdef GIT_GNUTLS +typedef struct gitno_ssl { + gnutls_session_t session; + gnutls_certificate_credentials_t cred; +} gitno_ssl; +#endif #include "util.h" |