Commit 24e53d2f by Carlos Martín Nieto

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.
parent 70b852ce
...@@ -436,7 +436,7 @@ IF (SECURITY_FOUND) ...@@ -436,7 +436,7 @@ IF (SECURITY_FOUND)
ENDIF () ENDIF ()
IF (OPENSSL_FOUND) IF (OPENSSL_FOUND)
ADD_DEFINITIONS(-DGIT_SSL) ADD_DEFINITIONS(-DGIT_OPENSSL)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES}) SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES})
ENDIF() ENDIF()
......
...@@ -17,7 +17,7 @@ git_mutex git__mwindow_mutex; ...@@ -17,7 +17,7 @@ git_mutex git__mwindow_mutex;
#define MAX_SHUTDOWN_CB 8 #define MAX_SHUTDOWN_CB 8
#ifdef GIT_SSL #ifdef GIT_OPENSSL
# include <openssl/ssl.h> # include <openssl/ssl.h>
SSL_CTX *git__ssl_ctx; SSL_CTX *git__ssl_ctx;
# ifdef GIT_THREADS # ifdef GIT_THREADS
...@@ -57,7 +57,7 @@ static void git__shutdown(void) ...@@ -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) void openssl_locking_function(int mode, int n, const char *file, int line)
{ {
int lock; int lock;
...@@ -89,7 +89,7 @@ static void shutdown_ssl_locking(void) ...@@ -89,7 +89,7 @@ static void shutdown_ssl_locking(void)
static void init_ssl(void) static void init_ssl(void)
{ {
#ifdef GIT_SSL #ifdef GIT_OPENSSL
long ssl_opts = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; long ssl_opts = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
/* Older OpenSSL and MacOS OpenSSL doesn't have this */ /* Older OpenSSL and MacOS OpenSSL doesn't have this */
...@@ -118,7 +118,7 @@ static void init_ssl(void) ...@@ -118,7 +118,7 @@ static void init_ssl(void)
int git_openssl_set_locking(void) int git_openssl_set_locking(void)
{ {
#ifdef GIT_SSL #ifdef GIT_OPENSSL
# ifdef GIT_THREADS # ifdef GIT_THREADS
int num_locks, i; int num_locks, i;
......
...@@ -17,7 +17,7 @@ typedef struct { ...@@ -17,7 +17,7 @@ typedef struct {
char oid_fmt[GIT_OID_HEXSZ+1]; char oid_fmt[GIT_OID_HEXSZ+1];
} git_global_st; } git_global_st;
#ifdef GIT_SSL #ifdef GIT_OPENSSL
# include <openssl/ssl.h> # include <openssl/ssl.h>
extern SSL_CTX *git__ssl_ctx; extern SSL_CTX *git__ssl_ctx;
#endif #endif
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
#include "common.h" #include "common.h"
#include "stream.h" #include "stream.h"
#ifdef GIT_SSL #ifdef GIT_OPENSSL
# include <openssl/ssl.h> # include <openssl/ssl.h>
#endif #endif
typedef struct gitno_ssl { typedef struct gitno_ssl {
#ifdef GIT_SSL #ifdef GIT_OPENSSL
SSL *ssl; SSL *ssl;
#else #else
size_t dummy; size_t dummy;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* a Linking Exception. For full terms see the included COPYING file. * a Linking Exception. For full terms see the included COPYING file.
*/ */
#ifdef GIT_SSL #ifdef GIT_OPENSSL
#include <ctype.h> #include <ctype.h>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* a Linking Exception. For full terms see the included COPYING file. * a Linking Exception. For full terms see the included COPYING file.
*/ */
#ifdef GIT_SSL #ifdef GIT_OPENSSL
# include <openssl/err.h> # include <openssl/err.h>
#endif #endif
...@@ -28,7 +28,7 @@ int git_libgit2_features() ...@@ -28,7 +28,7 @@ int git_libgit2_features()
#ifdef GIT_THREADS #ifdef GIT_THREADS
| GIT_FEATURE_THREADS | GIT_FEATURE_THREADS
#endif #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 | GIT_FEATURE_HTTPS
#endif #endif
#if defined(GIT_SSH) #if defined(GIT_SSH)
...@@ -138,7 +138,7 @@ int git_libgit2_opts(int key, ...) ...@@ -138,7 +138,7 @@ int git_libgit2_opts(int key, ...)
break; break;
case GIT_OPT_SET_SSL_CERT_LOCATIONS: case GIT_OPT_SET_SSL_CERT_LOCATIONS:
#ifdef GIT_SSL #ifdef GIT_OPENSSL
{ {
const char *file = va_arg(ap, const char *); const char *file = va_arg(ap, const char *);
const char *path = va_arg(ap, const char *); const char *path = va_arg(ap, const char *);
......
...@@ -15,7 +15,7 @@ int git_tls_stream_new(git_stream **out, const char *host, const char *port) ...@@ -15,7 +15,7 @@ int git_tls_stream_new(git_stream **out, const char *host, const char *port)
{ {
#ifdef GIT_SECURE_TRANSPORT #ifdef GIT_SECURE_TRANSPORT
return git_stransport_stream_new(out, host, port); return git_stransport_stream_new(out, host, port);
#elif defined(GIT_SSL) #elif defined(GIT_OPENSSL)
return git_openssl_stream_new(out, host, port); return git_openssl_stream_new(out, host, port);
#else #else
GIT_UNUSED(out); GIT_UNUSED(out);
......
...@@ -29,7 +29,7 @@ static transport_definition local_transport_definition = { "file://", git_transp ...@@ -29,7 +29,7 @@ static transport_definition local_transport_definition = { "file://", git_transp
static transport_definition transports[] = { static transport_definition transports[] = {
{ "git://", git_transport_smart, &git_subtransport_definition }, { "git://", git_transport_smart, &git_subtransport_definition },
{ "http://", git_transport_smart, &http_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 }, { "https://", git_transport_smart, &http_subtransport_definition },
#endif #endif
{ "file://", git_transport_local, NULL }, { "file://", git_transport_local, NULL },
......
...@@ -557,7 +557,7 @@ static int http_connect(http_subtransport *t) ...@@ -557,7 +557,7 @@ static int http_connect(http_subtransport *t)
error = git_stream_connect(t->io); 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 && if ((!error || error == GIT_ECERTIFICATE) && t->owner->certificate_check_cb != NULL &&
git_stream_is_encrypted(t->io)) { git_stream_is_encrypted(t->io)) {
git_cert *cert; git_cert *cert;
......
...@@ -17,7 +17,7 @@ void test_core_features__0(void) ...@@ -17,7 +17,7 @@ void test_core_features__0(void)
cl_assert((caps & GIT_FEATURE_THREADS) == 0); cl_assert((caps & GIT_FEATURE_THREADS) == 0);
#endif #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); cl_assert((caps & GIT_FEATURE_HTTPS) != 0);
#else #else
cl_assert((caps & GIT_FEATURE_HTTPS) == 0); cl_assert((caps & GIT_FEATURE_HTTPS) == 0);
......
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