]> git.proxmox.com Git - libgit2.git/commitdiff
transport: rename encrypt to use_ssl
authorCarlos Martín Nieto <carlos@cmartin.tk>
Thu, 26 Jul 2012 23:09:06 +0000 (01:09 +0200)
committerCarlos Martín Nieto <carlos@cmartin.tk>
Mon, 30 Jul 2012 18:28:16 +0000 (20:28 +0200)
SSL isn't the only way that a transport can be encrypted. The new name
will make it easier to merge the SSH support.

src/netops.c
src/transport.h
src/transports/http.c

index 303dfe88da30da91b6374eefac56c4cdf34b44b0..72c1757f2694c5a1b5c70c3dc3bc0cdb596b96b2 100644 (file)
@@ -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
 
index bb0b04117f9019d8be18436e82fe305febe5bd18..c4306165c649b715e4465b9f24d8284c5abc4b81 100644 (file)
@@ -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
index c29ed9a8c420b882cd75572b0cff36c2cec0272c..85fec413afc0f01573036864a12e8bd2d122654a 100644 (file)
@@ -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;