summaryrefslogtreecommitdiff
path: root/src/netops.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-05-01 01:50:26 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-05-19 17:50:52 +0200
commita6f24a5b3a8dcb9ab7f84679d658e66f374b88d6 (patch)
tree2dae06aab50bf6f5c9e04dd99f96bc4cfbbd0d8d /src/netops.h
parent66024c7cbcbae3a75d0b0426993d8ee5fa5f9dfb (diff)
downloadlibgit2-a6f24a5b3a8dcb9ab7f84679d658e66f374b88d6.tar.gz
https: make it work with OpenSSL as well
Add specific functions that use OpenSSL instead of GnuTLS
Diffstat (limited to 'src/netops.h')
-rw-r--r--src/netops.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/netops.h b/src/netops.h
index 9401ac2a9..8591a8e94 100644
--- a/src/netops.h
+++ b/src/netops.h
@@ -9,16 +9,14 @@
#include "posix.h"
#include "transport.h"
-#ifdef GIT_GNUTLS
-# include <gnutls/gnutls.h>
-#endif
+#include "common.h"
typedef struct gitno_buffer {
char *data;
size_t len;
size_t offset;
GIT_SOCKET fd;
-#ifdef GIT_GNUTLS
+#ifdef GIT_SSL
struct gitno_ssl *ssl;
#endif
} gitno_buffer;
@@ -29,7 +27,7 @@ int gitno_recv(gitno_buffer *buf);
void gitno_consume(gitno_buffer *buf, const char *ptr);
void gitno_consume_n(gitno_buffer *buf, size_t cons);
-GIT_SOCKET gitno_connect(git_transport *t, const char *host, const char *port);
+int gitno_connect(git_transport *t, const char *host, const char *port);
int gitno_send(git_transport *t, const char *msg, size_t len, int flags);
int gitno_close(GIT_SOCKET s);
int gitno_send_chunk_size(int s, size_t len);