mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-03 06:17:02 +00:00
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.
This commit is contained in:
parent
70b852cee2
commit
24e53d2fba
@ -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()
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -5,7 +5,7 @@
|
||||
* a Linking Exception. For full terms see the included COPYING file.
|
||||
*/
|
||||
|
||||
#ifdef GIT_SSL
|
||||
#ifdef GIT_OPENSSL
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
|
@ -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 *);
|
||||
|
@ -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);
|
||||
|
@ -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 },
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user