Commit 0048372a by Carlos Martín Nieto

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.
parent 3e3228b6
......@@ -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
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment