Rename GIT_SSL to GIT_OPENSSL This is what it's meant all along, but now we actually have multiple implementations, it's clearer to use the name of the library.
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c14303..5c8bf7a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -436,7 +436,7 @@ IF (SECURITY_FOUND)
ENDIF ()
IF (OPENSSL_FOUND)
- ADD_DEFINITIONS(-DGIT_SSL)
+ ADD_DEFINITIONS(-DGIT_OPENSSL)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES})
ENDIF()
diff --git a/src/global.c b/src/global.c
index f267fbd..9f1a0bf 100644
--- a/src/global.c
+++ b/src/global.c
@@ -17,7 +17,7 @@ git_mutex git__mwindow_mutex;
#define MAX_SHUTDOWN_CB 8
-#ifdef GIT_SSL
+#ifdef GIT_OPENSSL
# include <openssl/ssl.h>
SSL_CTX *git__ssl_ctx;
# ifdef GIT_THREADS
@@ -57,7 +57,7 @@ static void git__shutdown(void)
}
}
-#if defined(GIT_THREADS) && defined(GIT_SSL)
+#if defined(GIT_THREADS) && defined(GIT_OPENSSL)
void openssl_locking_function(int mode, int n, const char *file, int line)
{
int lock;
@@ -89,7 +89,7 @@ static void shutdown_ssl_locking(void)
static void init_ssl(void)
{
-#ifdef GIT_SSL
+#ifdef GIT_OPENSSL
long ssl_opts = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
/* Older OpenSSL and MacOS OpenSSL doesn't have this */
@@ -118,7 +118,7 @@ static void init_ssl(void)
int git_openssl_set_locking(void)
{
-#ifdef GIT_SSL
+#ifdef GIT_OPENSSL
# ifdef GIT_THREADS
int num_locks, i;
diff --git a/src/global.h b/src/global.h
index f56bec4..fdad6ba 100644
--- a/src/global.h
+++ b/src/global.h
@@ -17,7 +17,7 @@ typedef struct {
char oid_fmt[GIT_OID_HEXSZ+1];
} git_global_st;
-#ifdef GIT_SSL
+#ifdef GIT_OPENSSL
# include <openssl/ssl.h>
extern SSL_CTX *git__ssl_ctx;
#endif
diff --git a/src/netops.h b/src/netops.h
index d5f0ca3..b7170a0 100644
--- a/src/netops.h
+++ b/src/netops.h
@@ -11,12 +11,12 @@
#include "common.h"
#include "stream.h"
-#ifdef GIT_SSL
+#ifdef GIT_OPENSSL
# include <openssl/ssl.h>
#endif
typedef struct gitno_ssl {
-#ifdef GIT_SSL
+#ifdef GIT_OPENSSL
SSL *ssl;
#else
size_t dummy;
diff --git a/src/openssl_stream.c b/src/openssl_stream.c
index 8d79a9d..2ebfac7 100644
--- a/src/openssl_stream.c
+++ b/src/openssl_stream.c
@@ -5,7 +5,7 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifdef GIT_SSL
+#ifdef GIT_OPENSSL
#include <ctype.h>
diff --git a/src/settings.c b/src/settings.c
index 77a5f2e..2097ca3 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -5,7 +5,7 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifdef GIT_SSL
+#ifdef GIT_OPENSSL
# include <openssl/err.h>
#endif
@@ -28,7 +28,7 @@ int git_libgit2_features()
#ifdef GIT_THREADS
| GIT_FEATURE_THREADS
#endif
-#if defined(GIT_SSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
+#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
| GIT_FEATURE_HTTPS
#endif
#if defined(GIT_SSH)
@@ -138,7 +138,7 @@ int git_libgit2_opts(int key, ...)
break;
case GIT_OPT_SET_SSL_CERT_LOCATIONS:
-#ifdef GIT_SSL
+#ifdef GIT_OPENSSL
{
const char *file = va_arg(ap, const char *);
const char *path = va_arg(ap, const char *);
diff --git a/src/tls_stream.c b/src/tls_stream.c
index d44709a..39a8ce3 100644
--- a/src/tls_stream.c
+++ b/src/tls_stream.c
@@ -15,7 +15,7 @@ int git_tls_stream_new(git_stream **out, const char *host, const char *port)
{
#ifdef GIT_SECURE_TRANSPORT
return git_stransport_stream_new(out, host, port);
-#elif defined(GIT_SSL)
+#elif defined(GIT_OPENSSL)
return git_openssl_stream_new(out, host, port);
#else
GIT_UNUSED(out);
diff --git a/src/transport.c b/src/transport.c
index 6266fdd..5c65c7c 100644
--- a/src/transport.c
+++ b/src/transport.c
@@ -29,7 +29,7 @@ static transport_definition local_transport_definition = { "file://", git_transp
static transport_definition transports[] = {
{ "git://", git_transport_smart, &git_subtransport_definition },
{ "http://", git_transport_smart, &http_subtransport_definition },
-#if defined(GIT_SSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
+#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
{ "https://", git_transport_smart, &http_subtransport_definition },
#endif
{ "file://", git_transport_local, NULL },
diff --git a/src/transports/http.c b/src/transports/http.c
index bad7e25..89cbd17 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -557,7 +557,7 @@ static int http_connect(http_subtransport *t)
error = git_stream_connect(t->io);
-#if defined(GIT_SSL) || defined(GIT_SECURE_TRANSPORT)
+#if defined(GIT_OPENSSL) || defined(GIT_SECURE_TRANSPORT)
if ((!error || error == GIT_ECERTIFICATE) && t->owner->certificate_check_cb != NULL &&
git_stream_is_encrypted(t->io)) {
git_cert *cert;
diff --git a/tests/core/features.c b/tests/core/features.c
index e6d0e0f..5eeb05e 100644
--- a/tests/core/features.c
+++ b/tests/core/features.c
@@ -17,7 +17,7 @@ void test_core_features__0(void)
cl_assert((caps & GIT_FEATURE_THREADS) == 0);
#endif
-#if defined(GIT_SSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
+#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
cl_assert((caps & GIT_FEATURE_HTTPS) != 0);
#else
cl_assert((caps & GIT_FEATURE_HTTPS) == 0);