https: rename constants for consistency

Rename constants like `GIT_OPENSSL` to (eg) `GIT_HTTPS_OPENSSL` to be
nice and hierarchical and match things like our `GIT_SHA1` constants.
This commit is contained in:
Edward Thomson
2023-08-16 23:06:20 +01:00
parent f1346cc2a3
commit 75cd761e09
19 changed files with 114 additions and 114 deletions

View File

@@ -43,7 +43,7 @@ if(USE_HTTPS)
message(FATAL_ERROR "Cannot use SecureTransport backend, SSLCreateContext not supported")
endif()
set(GIT_SECURE_TRANSPORT 1)
set(GIT_HTTPS_SECURETRANSPORT 1)
list(APPEND LIBGIT2_SYSTEM_INCLUDES ${SECURITY_INCLUDE_DIR})
list(APPEND LIBGIT2_SYSTEM_LIBS ${COREFOUNDATION_LDFLAGS} ${SECURITY_LDFLAGS})
list(APPEND LIBGIT2_PC_LIBS ${COREFOUNDATION_LDFLAGS} ${SECURITY_LDFLAGS})
@@ -52,7 +52,7 @@ if(USE_HTTPS)
message(FATAL_ERROR "Asked for OpenSSL TLS backend, but it wasn't found")
endif()
set(GIT_OPENSSL 1)
set(GIT_HTTPS_OPENSSL 1)
list(APPEND LIBGIT2_SYSTEM_INCLUDES ${OPENSSL_INCLUDE_DIR})
list(APPEND LIBGIT2_SYSTEM_LIBS ${OPENSSL_LIBRARIES})
list(APPEND LIBGIT2_PC_LIBS ${OPENSSL_LDFLAGS})
@@ -99,7 +99,7 @@ if(USE_HTTPS)
add_definitions(-DGIT_DEFAULT_CERT_LOCATION="${CERT_LOCATION}")
endif()
set(GIT_MBEDTLS 1)
set(GIT_HTTPS_MBEDTLS 1)
list(APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR})
list(APPEND LIBGIT2_SYSTEM_LIBS ${MBEDTLS_LIBRARIES})
# mbedTLS has no pkgconfig file, hence we can't require it
@@ -107,7 +107,7 @@ if(USE_HTTPS)
# For now, pass its link flags as our own
list(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
elseif(USE_HTTPS STREQUAL "Schannel")
set(GIT_SCHANNEL 1)
set(GIT_HTTPS_SCHANNEL 1)
list(APPEND LIBGIT2_SYSTEM_LIBS "rpcrt4" "crypt32" "ole32" "secur32")
list(APPEND LIBGIT2_PC_LIBS "-lrpcrt4" "-lcrypt32" "-lole32" "-lsecur32")
@@ -128,8 +128,8 @@ if(USE_HTTPS)
list(APPEND LIBGIT2_SYSTEM_LIBS "rpcrt4" "crypt32" "ole32" "secur32")
list(APPEND LIBGIT2_PC_LIBS "-lrpcrt4" "-lcrypt32" "-lole32" "-lsecur32")
elseif(USE_HTTPS STREQUAL "OpenSSL-Dynamic")
set(GIT_OPENSSL 1)
set(GIT_OPENSSL_DYNAMIC 1)
set(GIT_HTTPS_OPENSSL 1)
set(GIT_HTTPS_OPENSSL_DYNAMIC 1)
list(APPEND LIBGIT2_SYSTEM_LIBS dl)
else()
message(FATAL_ERROR "Asked for backend ${USE_HTTPS} but it wasn't found")

View File

@@ -35,7 +35,7 @@ endif()
if(APPLE)
# The old Secure Transport API has been deprecated in macOS 10.15.
set_source_files_properties(streams/stransport.c PROPERTIES COMPILE_FLAGS -Wno-deprecated)
set_source_files_properties(streams/securetransport.c PROPERTIES COMPILE_FLAGS -Wno-deprecated)
endif()
ide_split_sources(libgit2)

View File

@@ -7,7 +7,7 @@
#include "streams/mbedtls.h"
#ifdef GIT_MBEDTLS
#ifdef GIT_HTTPS_MBEDTLS
#include <ctype.h>

View File

@@ -13,7 +13,7 @@
extern int git_mbedtls_stream_global_init(void);
#ifdef GIT_MBEDTLS
#ifdef GIT_HTTPS_MBEDTLS
extern int git_mbedtls__set_cert_location(const char *file, const char *path);
extern int git_mbedtls_stream_new(git_stream **out, const char *host, const char *port);

View File

@@ -9,7 +9,7 @@
#include "streams/openssl_legacy.h"
#include "streams/openssl_dynamic.h"
#ifdef GIT_OPENSSL
#ifdef GIT_HTTPS_OPENSSL
#include <ctype.h>
@@ -29,7 +29,7 @@
# include <netinet/in.h>
#endif
#ifndef GIT_OPENSSL_DYNAMIC
#ifndef GIT_HTTPS_OPENSSL_DYNAMIC
# include <openssl/ssl.h>
# include <openssl/err.h>
# include <openssl/x509v3.h>
@@ -62,7 +62,7 @@ static void shutdown_ssl(void)
}
#ifdef VALGRIND
# if !defined(GIT_OPENSSL_LEGACY) && !defined(GIT_OPENSSL_DYNAMIC)
# if !defined(GIT_HTTPS_OPENSSL_LEGACY) && !defined(GIT_HTTPS_OPENSSL_DYNAMIC)
static void *git_openssl_malloc(size_t bytes, const char *file, int line)
{
@@ -84,7 +84,7 @@ static void git_openssl_free(void *mem, const char *file, int line)
GIT_UNUSED(line);
git__free(mem);
}
# else /* !GIT_OPENSSL_LEGACY && !GIT_OPENSSL_DYNAMIC */
# else /* !GIT_HTTPS_OPENSSL_LEGACY && !GIT_HTTPS_OPENSSL_DYNAMIC */
static void *git_openssl_malloc(size_t bytes)
{
return git__calloc(1, bytes);
@@ -99,7 +99,7 @@ static void git_openssl_free(void *mem)
{
git__free(mem);
}
# endif /* !GIT_OPENSSL_LEGACY && !GIT_OPENSSL_DYNAMIC */
# endif /* !GIT_HTTPS_OPENSSL_LEGACY && !GIT_HTTPS_OPENSSL_DYNAMIC */
#endif /* VALGRIND */
static int openssl_init(void)
@@ -176,7 +176,7 @@ bool openssl_initialized;
int git_openssl_stream_global_init(void)
{
#ifndef GIT_OPENSSL_DYNAMIC
#ifndef GIT_HTTPS_OPENSSL_DYNAMIC
return openssl_init();
#else
if (git_mutex_init(&openssl_mutex) != 0)
@@ -188,7 +188,7 @@ int git_openssl_stream_global_init(void)
static int openssl_ensure_initialized(void)
{
#ifdef GIT_OPENSSL_DYNAMIC
#ifdef GIT_HTTPS_OPENSSL_DYNAMIC
int error = 0;
if (git_mutex_lock(&openssl_mutex) != 0)
@@ -209,7 +209,7 @@ static int openssl_ensure_initialized(void)
#endif
}
#if !defined(GIT_OPENSSL_LEGACY) && !defined(GIT_OPENSSL_DYNAMIC)
#if !defined(GIT_HTTPS_OPENSSL_LEGACY) && !defined(GIT_HTTPS_OPENSSL_DYNAMIC)
int git_openssl_set_locking(void)
{
# ifdef GIT_THREADS

View File

@@ -15,14 +15,14 @@
extern int git_openssl_stream_global_init(void);
#if defined(GIT_OPENSSL) && !defined(GIT_OPENSSL_DYNAMIC)
#if defined(GIT_HTTPS_OPENSSL) && !defined(GIT_HTTPS_OPENSSL_DYNAMIC)
# include <openssl/ssl.h>
# include <openssl/err.h>
# include <openssl/x509v3.h>
# include <openssl/bio.h>
# endif
#ifdef GIT_OPENSSL
#ifdef GIT_HTTPS_OPENSSL
extern int git_openssl__set_cert_location(const char *file, const char *path);
extern int git_openssl_stream_new(git_stream **out, const char *host, const char *port);
extern int git_openssl_stream_wrap(git_stream **out, git_stream *in, const char *host);

View File

@@ -8,7 +8,7 @@
#include "streams/openssl.h"
#include "streams/openssl_dynamic.h"
#if defined(GIT_OPENSSL) && defined(GIT_OPENSSL_DYNAMIC)
#if defined(GIT_HTTPS_OPENSSL) && defined(GIT_HTTPS_OPENSSL_DYNAMIC)
#include "runtime.h"
@@ -310,4 +310,4 @@ void GENERAL_NAMES_free(GENERAL_NAME *sk)
sk_free(sk);
}
#endif /* GIT_OPENSSL && GIT_OPENSSL_DYNAMIC */
#endif /* GIT_HTTPS_OPENSSL && GIT_HTTPS_OPENSSL_DYNAMIC */

View File

@@ -149,7 +149,7 @@
#ifndef INCLUDE_streams_openssl_dynamic_h__
#define INCLUDE_streams_openssl_dynamic_h__
#ifdef GIT_OPENSSL_DYNAMIC
#ifdef GIT_HTTPS_OPENSSL_DYNAMIC
# define BIO_CTRL_FLUSH 11
@@ -343,6 +343,6 @@ extern void GENERAL_NAMES_free(GENERAL_NAME *sk);
extern int git_openssl_stream_dynamic_init(void);
#endif /* GIT_OPENSSL_DYNAMIC */
#endif /* GIT_HTTPS_OPENSSL_DYNAMIC */
#endif

View File

@@ -11,14 +11,14 @@
#include "runtime.h"
#include "git2/sys/openssl.h"
#if defined(GIT_OPENSSL) && !defined(GIT_OPENSSL_DYNAMIC)
#if defined(GIT_HTTPS_OPENSSL) && !defined(GIT_HTTPS_OPENSSL_DYNAMIC)
# include <openssl/ssl.h>
# include <openssl/err.h>
# include <openssl/x509v3.h>
# include <openssl/bio.h>
#endif
#if defined(GIT_OPENSSL_LEGACY) || defined(GIT_OPENSSL_DYNAMIC)
#if defined(GIT_HTTPS_OPENSSL_LEGACY) || defined(GIT_HTTPS_OPENSSL_DYNAMIC)
/*
* OpenSSL 1.1 made BIO opaque so we have to use functions to interact with it
@@ -173,7 +173,7 @@ int git_openssl_set_locking(void)
return -1;
#endif
#ifdef GIT_OPENSSL_DYNAMIC
#ifdef GIT_HTTPS_OPENSSL_DYNAMIC
/*
* This function is required on legacy versions of OpenSSL; when building
* with dynamically-loaded OpenSSL, we detect whether we loaded it or not.
@@ -200,4 +200,4 @@ int git_openssl_set_locking(void)
}
#endif /* GIT_THREADS */
#endif /* GIT_OPENSSL_LEGACY || GIT_OPENSSL_DYNAMIC */
#endif /* GIT_HTTPS_OPENSSL_LEGACY || GIT_HTTPS_OPENSSL_DYNAMIC */

View File

@@ -9,7 +9,7 @@
#include "streams/openssl_dynamic.h"
#if defined(GIT_OPENSSL) && !defined(GIT_OPENSSL_DYNAMIC)
#if defined(GIT_HTTPS_OPENSSL) && !defined(GIT_HTTPS_OPENSSL_DYNAMIC)
# include <openssl/ssl.h>
# include <openssl/err.h>
# include <openssl/x509v3.h>
@@ -17,11 +17,11 @@
# if (defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L) || \
(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
# define GIT_OPENSSL_LEGACY
# define GIT_HTTPS_OPENSSL_LEGACY
# endif
#endif
#if defined(GIT_OPENSSL_LEGACY) && !defined(GIT_OPENSSL_DYNAMIC)
#if defined(GIT_HTTPS_OPENSSL_LEGACY) && !defined(GIT_HTTPS_OPENSSL_DYNAMIC)
# define OPENSSL_init_ssl OPENSSL_init_ssl__legacy
# define BIO_meth_new BIO_meth_new__legacy
# define BIO_meth_free BIO_meth_free__legacy
@@ -39,7 +39,7 @@
# define ASN1_STRING_get0_data ASN1_STRING_get0_data__legacy
#endif
#if defined(GIT_OPENSSL_LEGACY) || defined(GIT_OPENSSL_DYNAMIC)
#if defined(GIT_HTTPS_OPENSSL_LEGACY) || defined(GIT_HTTPS_OPENSSL_DYNAMIC)
extern int OPENSSL_init_ssl__legacy(uint64_t opts, const void *settings);
extern BIO_METHOD *BIO_meth_new__legacy(int type, const char *name);

View File

@@ -13,7 +13,7 @@
#include "streams/tls.h"
#include "streams/mbedtls.h"
#include "streams/openssl.h"
#include "streams/stransport.h"
#include "streams/securetransport.h"
struct stream_registry {
git_rwlock lock;

View File

@@ -7,7 +7,7 @@
#include "streams/schannel.h"
#ifdef GIT_SCHANNEL
#ifdef GIT_HTTPS_SCHANNEL
#define SECURITY_WIN32

View File

@@ -11,7 +11,7 @@
#include "git2/sys/stream.h"
#ifdef GIT_SCHANNEL
#ifdef GIT_HTTPS_SCHANNEL
extern int git_schannel_stream_new(
git_stream **out,

View File

@@ -5,9 +5,9 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
#include "streams/stransport.h"
#include "streams/securetransport.h"
#ifdef GIT_SECURE_TRANSPORT
#ifdef GIT_HTTPS_SECURETRANSPORT
#include <CoreFoundation/CoreFoundation.h>
#include <Security/SecureTransport.h>
@@ -17,7 +17,7 @@
#include "streams/socket.h"
static int stransport_error(OSStatus ret)
static int securetransport_error(OSStatus ret)
{
CFStringRef message;
@@ -48,11 +48,11 @@ typedef struct {
SSLContextRef ctx;
CFDataRef der_data;
git_cert_x509 cert_info;
} stransport_stream;
} securetransport_stream;
static int stransport_connect(git_stream *stream)
static int securetransport_connect(git_stream *stream)
{
stransport_stream *st = (stransport_stream *) stream;
securetransport_stream *st = (securetransport_stream *) stream;
int error;
SecTrustRef trust = NULL;
SecTrustResultType sec_res;
@@ -98,18 +98,18 @@ on_error:
if (trust)
CFRelease(trust);
return stransport_error(ret);
return securetransport_error(ret);
}
static int stransport_certificate(git_cert **out, git_stream *stream)
static int securetransport_certificate(git_cert **out, git_stream *stream)
{
stransport_stream *st = (stransport_stream *) stream;
securetransport_stream *st = (securetransport_stream *) stream;
SecTrustRef trust = NULL;
SecCertificateRef sec_cert;
OSStatus ret;
if ((ret = SSLCopyPeerTrust(st->ctx, &trust)) != noErr)
return stransport_error(ret);
return securetransport_error(ret);
sec_cert = SecTrustGetCertificateAtIndex(trust, 0);
st->der_data = SecCertificateCopyData(sec_cert);
@@ -128,11 +128,11 @@ static int stransport_certificate(git_cert **out, git_stream *stream)
return 0;
}
static int stransport_set_proxy(
static int securetransport_set_proxy(
git_stream *stream,
const git_proxy_options *proxy_opts)
{
stransport_stream *st = (stransport_stream *) stream;
securetransport_stream *st = (securetransport_stream *) stream;
return git_stream_set_proxy(st->io, proxy_opts);
}
@@ -151,7 +151,7 @@ static int stransport_set_proxy(
*/
static OSStatus write_cb(SSLConnectionRef conn, const void *data, size_t *len)
{
stransport_stream *st = (stransport_stream *)conn;
securetransport_stream *st = (securetransport_stream *)conn;
git_stream *io = st->io;
OSStatus ret;
@@ -169,9 +169,9 @@ static OSStatus write_cb(SSLConnectionRef conn, const void *data, size_t *len)
return noErr;
}
static ssize_t stransport_write(git_stream *stream, const char *data, size_t len, int flags)
static ssize_t securetransport_write(git_stream *stream, const char *data, size_t len, int flags)
{
stransport_stream *st = (stransport_stream *) stream;
securetransport_stream *st = (securetransport_stream *) stream;
size_t data_len, processed;
OSStatus ret;
@@ -182,7 +182,7 @@ static ssize_t stransport_write(git_stream *stream, const char *data, size_t len
if (st->error == GIT_TIMEOUT)
return GIT_TIMEOUT;
return stransport_error(ret);
return securetransport_error(ret);
}
GIT_ASSERT(processed < SSIZE_MAX);
@@ -200,7 +200,7 @@ static ssize_t stransport_write(git_stream *stream, const char *data, size_t len
*/
static OSStatus read_cb(SSLConnectionRef conn, void *data, size_t *len)
{
stransport_stream *st = (stransport_stream *)conn;
securetransport_stream *st = (securetransport_stream *)conn;
git_stream *io = st->io;
OSStatus error = noErr;
size_t off = 0;
@@ -229,9 +229,9 @@ static OSStatus read_cb(SSLConnectionRef conn, void *data, size_t *len)
return error;
}
static ssize_t stransport_read(git_stream *stream, void *data, size_t len)
static ssize_t securetransport_read(git_stream *stream, void *data, size_t len)
{
stransport_stream *st = (stransport_stream *)stream;
securetransport_stream *st = (securetransport_stream *)stream;
size_t processed;
OSStatus ret;
@@ -239,27 +239,27 @@ static ssize_t stransport_read(git_stream *stream, void *data, size_t len)
if (st->error == GIT_TIMEOUT)
return GIT_TIMEOUT;
return stransport_error(ret);
return securetransport_error(ret);
}
return processed;
}
static int stransport_close(git_stream *stream)
static int securetransport_close(git_stream *stream)
{
stransport_stream *st = (stransport_stream *) stream;
securetransport_stream *st = (securetransport_stream *) stream;
OSStatus ret;
ret = SSLClose(st->ctx);
if (ret != noErr && ret != errSSLClosedGraceful)
return stransport_error(ret);
return securetransport_error(ret);
return st->owned ? git_stream_close(st->io) : 0;
}
static void stransport_free(git_stream *stream)
static void securetransport_free(git_stream *stream)
{
stransport_stream *st = (stransport_stream *) stream;
securetransport_stream *st = (securetransport_stream *) stream;
if (st->owned)
git_stream_free(st->io);
@@ -270,20 +270,20 @@ static void stransport_free(git_stream *stream)
git__free(st);
}
static int stransport_wrap(
static int securetransport_wrap(
git_stream **out,
git_stream *in,
const char *host,
int owned)
{
stransport_stream *st;
securetransport_stream *st;
OSStatus ret;
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(in);
GIT_ASSERT_ARG(host);
st = git__calloc(1, sizeof(stransport_stream));
st = git__calloc(1, sizeof(securetransport_stream));
GIT_ERROR_CHECK_ALLOC(st);
st->io = in;
@@ -304,33 +304,33 @@ static int stransport_wrap(
(ret = SSLSetPeerDomainName(st->ctx, host, strlen(host))) != noErr) {
CFRelease(st->ctx);
git__free(st);
return stransport_error(ret);
return securetransport_error(ret);
}
st->parent.version = GIT_STREAM_VERSION;
st->parent.encrypted = 1;
st->parent.proxy_support = git_stream_supports_proxy(st->io);
st->parent.connect = stransport_connect;
st->parent.certificate = stransport_certificate;
st->parent.set_proxy = stransport_set_proxy;
st->parent.read = stransport_read;
st->parent.write = stransport_write;
st->parent.close = stransport_close;
st->parent.free = stransport_free;
st->parent.connect = securetransport_connect;
st->parent.certificate = securetransport_certificate;
st->parent.set_proxy = securetransport_set_proxy;
st->parent.read = securetransport_read;
st->parent.write = securetransport_write;
st->parent.close = securetransport_close;
st->parent.free = securetransport_free;
*out = (git_stream *) st;
return 0;
}
int git_stransport_stream_wrap(
int git_securetransport_stream_wrap(
git_stream **out,
git_stream *in,
const char *host)
{
return stransport_wrap(out, in, host, 0);
return securetransport_wrap(out, in, host, 0);
}
int git_stransport_stream_new(git_stream **out, const char *host, const char *port)
int git_securetransport_stream_new(git_stream **out, const char *host, const char *port)
{
git_stream *stream = NULL;
int error;
@@ -341,7 +341,7 @@ int git_stransport_stream_new(git_stream **out, const char *host, const char *po
error = git_socket_stream_new(&stream, host, port);
if (!error)
error = stransport_wrap(out, stream, host, 1);
error = securetransport_wrap(out, stream, host, 1);
if (error < 0 && stream) {
git_stream_close(stream);

View File

@@ -0,0 +1,21 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_streams_securetransport_h__
#define INCLUDE_streams_securetransport_h__
#include "common.h"
#include "git2/sys/stream.h"
#ifdef GIT_HTTPS_SECURETRANSPORT
extern int git_securetransport_stream_new(git_stream **out, const char *host, const char *port);
extern int git_securetransport_stream_wrap(git_stream **out, git_stream *in, const char *host);
#endif
#endif

View File

@@ -1,21 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_streams_stransport_h__
#define INCLUDE_streams_stransport_h__
#include "common.h"
#include "git2/sys/stream.h"
#ifdef GIT_SECURE_TRANSPORT
extern int git_stransport_stream_new(git_stream **out, const char *host, const char *port);
extern int git_stransport_stream_wrap(git_stream **out, git_stream *in, const char *host);
#endif
#endif

View File

@@ -12,7 +12,7 @@
#include "streams/tls.h"
#include "streams/mbedtls.h"
#include "streams/openssl.h"
#include "streams/stransport.h"
#include "streams/securetransport.h"
#include "streams/schannel.h"
int git_tls_stream_new(git_stream **out, const char *host, const char *port)
@@ -28,13 +28,13 @@ int git_tls_stream_new(git_stream **out, const char *host, const char *port)
if ((error = git_stream_registry_lookup(&custom, GIT_STREAM_TLS)) == 0) {
init = custom.init;
} else if (error == GIT_ENOTFOUND) {
#ifdef GIT_SECURE_TRANSPORT
init = git_stransport_stream_new;
#elif defined(GIT_OPENSSL)
#if defined(GIT_HTTPS_SECURETRANSPORT)
init = git_securetransport_stream_new;
#elif defined(GIT_HTTPS_OPENSSL)
init = git_openssl_stream_new;
#elif defined(GIT_MBEDTLS)
#elif defined(GIT_HTTPS_MBEDTLS)
init = git_mbedtls_stream_new;
#elif defined(GIT_SCHANNEL)
#elif defined(GIT_HTTPS_SCHANNEL)
init = git_schannel_stream_new;
#endif
} else {
@@ -60,13 +60,13 @@ int git_tls_stream_wrap(git_stream **out, git_stream *in, const char *host)
if (git_stream_registry_lookup(&custom, GIT_STREAM_TLS) == 0) {
wrap = custom.wrap;
} else {
#ifdef GIT_SECURE_TRANSPORT
wrap = git_stransport_stream_wrap;
#elif defined(GIT_OPENSSL)
#if defined(GIT_HTTPS_SECURETRANSPORT)
wrap = git_securetransport_stream_wrap;
#elif defined(GIT_HTTPS_OPENSSL)
wrap = git_openssl_stream_wrap;
#elif defined(GIT_MBEDTLS)
#elif defined(GIT_HTTPS_MBEDTLS)
wrap = git_mbedtls_stream_wrap;
#elif defined(GIT_SCHANNEL)
#elif defined(GIT_HTTPS_SCHANNEL)
wrap = git_schannel_stream_wrap;
#endif
}

View File

@@ -15,11 +15,11 @@
#if defined(GIT_NTLM) || defined(GIT_WIN32)
#if defined(GIT_OPENSSL)
#if defined(GIT_HTTPS_OPENSSL)
# define CRYPT_OPENSSL
#elif defined(GIT_MBEDTLS)
#elif defined(GIT_HTTPS_MBEDTLS)
# define CRYPT_MBEDTLS
#elif defined(GIT_SECURE_TRANSPORT)
#elif defined(GIT_HTTPS_STRANSPORT)
# define CRYPT_COMMONCRYPTO
#endif

View File

@@ -38,11 +38,11 @@
#cmakedefine GIT_WINHTTP 1
#cmakedefine GIT_HTTPS 1
#cmakedefine GIT_OPENSSL 1
#cmakedefine GIT_OPENSSL_DYNAMIC 1
#cmakedefine GIT_SECURE_TRANSPORT 1
#cmakedefine GIT_MBEDTLS 1
#cmakedefine GIT_SCHANNEL 1
#cmakedefine GIT_HTTPS_OPENSSL 1
#cmakedefine GIT_HTTPS_OPENSSL_DYNAMIC 1
#cmakedefine GIT_HTTPS_SECURETRANSPORT 1
#cmakedefine GIT_HTTPS_MBEDTLS 1
#cmakedefine GIT_HTTPS_SCHANNEL 1
#cmakedefine GIT_SHA1_COLLISIONDETECT 1
#cmakedefine GIT_SHA1_WIN32 1