transport: rename encrypt to use_ssl SSL isn't the only way that a transport can be encrypted. The new name will make it easier to merge the SSH support.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
diff --git a/src/netops.c b/src/netops.c
index 303dfe8..72c1757 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -114,7 +114,7 @@ void gitno_buffer_setup_callback(git_transport *t, gitno_buffer *buf, char *data
void gitno_buffer_setup(git_transport *t, gitno_buffer *buf, char *data, unsigned int len)
{
#ifdef GIT_SSL
- if (t->encrypt) {
+ if (t->use_ssl) {
gitno_buffer_setup_callback(t, buf, data, len, gitno__recv_ssl, NULL);
buf->ssl = &t->ssl;
} else
@@ -151,7 +151,7 @@ int gitno_ssl_teardown(git_transport *t)
int ret;
#endif
- if (!t->encrypt)
+ if (!t->use_ssl)
return 0;
#ifdef GIT_SSL
@@ -419,7 +419,7 @@ int gitno_connect(git_transport *t, const char *host, const char *port)
t->socket = s;
p_freeaddrinfo(info);
- if (t->encrypt && ssl_setup(t, host) < 0)
+ if (t->use_ssl && ssl_setup(t, host) < 0)
return -1;
return 0;
@@ -449,7 +449,7 @@ int gitno_send(git_transport *t, const char *msg, size_t len, int flags)
size_t off = 0;
#ifdef GIT_SSL
- if (t->encrypt)
+ if (t->use_ssl)
return send_ssl(&t->ssl, msg, len);
#endif
diff --git a/src/transport.h b/src/transport.h
index bb0b041..c430616 100644
--- a/src/transport.h
+++ b/src/transport.h
@@ -73,7 +73,7 @@ struct git_transport {
int direction : 1, /* 0 fetch, 1 push */
connected : 1,
check_cert: 1,
- encrypt : 1,
+ use_ssl : 1,
own_logic: 1, /* transitional */
rpc: 1; /* git-speak for the HTTP transport */
#ifdef GIT_SSL
diff --git a/src/transports/http.c b/src/transports/http.c
index c29ed9a..85fec41 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -450,7 +450,7 @@ int git_transport_https(git_transport **out)
if (git_transport_http((git_transport **)&t) < 0)
return -1;
- t->parent.encrypt = 1;
+ t->parent.use_ssl = 1;
t->parent.check_cert = 1;
*out = (git_transport *) t;