aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.b322
-rw-r--r--lib/Makefile.m324
-rw-r--r--lib/Makefile.vc62
-rw-r--r--lib/config-amigaos.h3
-rw-r--r--lib/config-dos.h5
-rw-r--r--lib/config-mac.h3
-rw-r--r--lib/config-symbian.h6
-rw-r--r--lib/config-tpf.h4
-rw-r--r--lib/config-vxworks.h3
-rw-r--r--lib/config-win32.h2
-rw-r--r--lib/curl_config.h.cmake3
-rw-r--r--lib/curl_des.c4
-rw-r--r--lib/curl_des.h4
-rw-r--r--lib/curl_ntlm_core.c10
-rw-r--r--lib/curl_ntlm_core.h4
-rw-r--r--lib/curl_setup.h4
-rw-r--r--lib/getinfo.c4
-rw-r--r--lib/hostcheck.c6
-rw-r--r--lib/http.c4
-rw-r--r--lib/md5.c9
-rw-r--r--lib/urldata.h34
-rw-r--r--lib/vtls/openssl.c68
-rw-r--r--lib/vtls/openssl.h4
23 files changed, 70 insertions, 122 deletions
diff --git a/lib/Makefile.b32 b/lib/Makefile.b32
index b9531fdf4..056570575 100644
--- a/lib/Makefile.b32
+++ b/lib/Makefile.b32
@@ -74,7 +74,7 @@ LINKLIB = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
# SSL support is enabled setting WITH_SSL=1
!ifdef WITH_SSL
-DEFINES = $(DEFINES) -DUSE_SSLEAY
+DEFINES = $(DEFINES) -DUSE_OPENSSL
INCDIRS = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
!endif
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 92bdb1f0d..7653e0d8a 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -215,13 +215,13 @@ ifdef SSL
endif
endif
INCLUDES += -I"$(OPENSSL_INCLUDE)"
- CFLAGS += -DUSE_SSLEAY -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H \
+ CFLAGS += -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H \
-DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 \
-DCURL_WANTS_CA_BUNDLE_ENV
DLL_LIBS += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
ifdef SRP
ifeq "$(wildcard $(OPENSSL_INCLUDE)/openssl/srp.h)" "$(OPENSSL_INCLUDE)/openssl/srp.h"
- CFLAGS += -DHAVE_SSLEAY_SRP -DUSE_TLS_SRP
+ CFLAGS += -DHAVE_OPENSSL_SRP -DUSE_TLS_SRP
endif
endif
endif
diff --git a/lib/Makefile.vc6 b/lib/Makefile.vc6
index f97b73a7d..04d4c67ce 100644
--- a/lib/Makefile.vc6
+++ b/lib/Makefile.vc6
@@ -105,7 +105,7 @@ WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"
CCNODBG = cl.exe /O2 /DNDEBUG
CCDEBUG = cl.exe /Od /Gm /Zi /D_DEBUG /GZ
-CFLAGSSSL = /DUSE_SSLEAY /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
+CFLAGSSSL = /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
CFLAGSWINSSL = /DUSE_SCHANNEL
CFLAGSSSH2 = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include"
CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
diff --git a/lib/config-amigaos.h b/lib/config-amigaos.h
index 76d887755..04b18b744 100644
--- a/lib/config-amigaos.h
+++ b/lib/config-amigaos.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -93,7 +93,6 @@
#define USE_MANUAL 1
#define USE_OPENSSL 1
-#define USE_SSLEAY 1
#define CURL_DISABLE_LDAP 1
#define OS "AmigaOS"
diff --git a/lib/config-dos.h b/lib/config-dos.h
index e094082b8..288bd1db3 100644
--- a/lib/config-dos.h
+++ b/lib/config-dos.h
@@ -132,12 +132,11 @@
#define HAVE_LIBZ 1
#endif
-/* USE_SSLEAY on cmd-line */
-#ifdef USE_SSLEAY
+/* USE_OPENSSL on cmd-line */
+#ifdef USE_OPENSSL
#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
#define HAVE_OPENSSL_ENGINE_H 1
#define OPENSSL_NO_KRB5 1
- #define USE_OPENSSL 1
#endif
/* to disable LDAP */
diff --git a/lib/config-mac.h b/lib/config-mac.h
index d89c38515..ee7a6590c 100644
--- a/lib/config-mac.h
+++ b/lib/config-mac.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -70,7 +70,6 @@
#define HAVE_SIG_ATOMIC_T 1
#ifdef MACOS_SSL_SUPPORT
-# define USE_SSLEAY 1
# define USE_OPENSSL 1
#endif
diff --git a/lib/config-symbian.h b/lib/config-symbian.h
index 581762850..a40e3d8e0 100644
--- a/lib/config-symbian.h
+++ b/lib/config-symbian.h
@@ -808,10 +808,4 @@
#define HAVE_ZLIB_H 1
#endif
-/* Enable appropriate definitions only when OpenSSL support is enabled */
-#ifdef USE_SSLEAY
-/* if OpenSSL is in use */
-#define USE_OPENSSL
-#endif
-
#endif /* HEADER_CURL_CONFIG_SYMBIAN_H */
diff --git a/lib/config-tpf.h b/lib/config-tpf.h
index 6ff701a9f..d6b8cc2f2 100644
--- a/lib/config-tpf.h
+++ b/lib/config-tpf.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -646,7 +646,7 @@
/* #undef USE_OPENSSL */
/* if SSL is enabled */
-/* #undef USE_SSLEAY */
+/* #undef USE_OPENSSL */
/* to enable SSPI support */
/* #undef USE_WINDOWS_SSPI */
diff --git a/lib/config-vxworks.h b/lib/config-vxworks.h
index 515f7d48c..d889efcd8 100644
--- a/lib/config-vxworks.h
+++ b/lib/config-vxworks.h
@@ -883,9 +883,6 @@
/* if OpenSSL is in use */
#define USE_OPENSSL 1
-/* if SSL is enabled */
-#define USE_SSLEAY 1
-
/* Define to 1 if you are building a Windows target without large file
support. */
/* #undef USE_WIN32_LARGE_FILES */
diff --git a/lib/config-win32.h b/lib/config-win32.h
index 8b543d5ca..e9a371212 100644
--- a/lib/config-win32.h
+++ b/lib/config-win32.h
@@ -701,7 +701,7 @@ Vista
#endif
/* Define to use the Windows crypto library. */
-#if !defined(USE_SSLEAY) && !defined(USE_NSS)
+#if !defined(USE_OPENSSL) && !defined(USE_NSS)
#define USE_WIN32_CRYPTO
#endif
diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake
index 619e101ca..5376aa7e1 100644
--- a/lib/curl_config.h.cmake
+++ b/lib/curl_config.h.cmake
@@ -909,9 +909,6 @@
/* if OpenSSL is in use */
#cmakedefine USE_OPENSSL 1
-/* if SSL is enabled */
-#cmakedefine USE_SSLEAY 1
-
/* if Unix domain sockets are enabled */
#cmakedefine USE_UNIX_SOCKETS
diff --git a/lib/curl_des.c b/lib/curl_des.c
index ba6249635..42c1df956 100644
--- a/lib/curl_des.c
+++ b/lib/curl_des.c
@@ -22,7 +22,7 @@
#include "curl_setup.h"
-#if defined(USE_NTLM) && (!defined(USE_SSLEAY) || defined(HAVE_BORINGSSL))
+#if defined(USE_NTLM) && (!defined(USE_OPENSSL) || defined(HAVE_BORINGSSL))
#include "curl_des.h"
@@ -60,4 +60,4 @@ void Curl_des_set_odd_parity(unsigned char *bytes, size_t len)
}
}
-#endif /* USE_NTLM && (!USE_SSLEAY || HAVE_BORINGSSL) */
+#endif /* USE_NTLM && (!USE_OPENSSL || HAVE_BORINGSSL) */
diff --git a/lib/curl_des.h b/lib/curl_des.h
index 11a2eca91..b855db4c1 100644
--- a/lib/curl_des.h
+++ b/lib/curl_des.h
@@ -24,11 +24,11 @@
#include "curl_setup.h"
-#if defined(USE_NTLM) && (!defined(USE_SSLEAY) || defined(HAVE_BORINGSSL))
+#if defined(USE_NTLM) && (!defined(USE_OPENSSL) || defined(HAVE_BORINGSSL))
/* Applies odd parity to the given byte array */
void Curl_des_set_odd_parity(unsigned char *bytes, size_t length);
-#endif /* USE_NTLM && (!USE_SSLEAY || HAVE_BORINGSSL) */
+#endif /* USE_NTLM && (!USE_OPENSSL || HAVE_BORINGSSL) */
#endif /* HEADER_CURL_DES_H */
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
index dc84fa8d0..5b88fc5a0 100644
--- a/lib/curl_ntlm_core.c
+++ b/lib/curl_ntlm_core.c
@@ -33,7 +33,7 @@
#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
# ifdef USE_OPENSSL
# include <openssl/des.h>
@@ -132,7 +132,7 @@ static void extend_key_56_to_64(const unsigned char *key_56, char *key)
key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF);
}
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
/*
* Turns a 56 bit key into the 64 bit, odd parity key and sets the key. The
* key schedule ks is also set.
@@ -366,7 +366,7 @@ void Curl_ntlm_core_lm_resp(const unsigned char *keys,
const unsigned char *plaintext,
unsigned char *results)
{
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
DES_key_schedule ks;
setup_des_key(keys, DESKEY(ks));
@@ -441,7 +441,7 @@ CURLcode Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data,
{
/* Create LanManager hashed password. */
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
DES_key_schedule ks;
setup_des_key(pw, DESKEY(ks));
@@ -532,7 +532,7 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *data,
{
/* Create NT hashed password. */
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
MD4_CTX MD4pw;
MD4_Init(&MD4pw);
MD4_Update(&MD4pw, pw, 2 * len);
diff --git a/lib/curl_ntlm_core.h b/lib/curl_ntlm_core.h
index c1689666c..3a763592a 100644
--- a/lib/curl_ntlm_core.h
+++ b/lib/curl_ntlm_core.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -28,7 +28,7 @@
#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
# if !defined(OPENSSL_VERSION_NUMBER) && \
!defined(HEADER_SSL_H) && !defined(HEADER_MD5_H)
# error "curl_ntlm_core.h shall not be included before OpenSSL headers."
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index c049ef9d2..9c7cc07eb 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -604,7 +604,7 @@ int netware_init(void);
#define LIBIDN_REQUIRED_VERSION "0.4.1"
-#if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || \
+#if defined(USE_GNUTLS) || defined(USE_OPENSSL) || defined(USE_NSS) || \
defined(USE_POLARSSL) || defined(USE_AXTLS) || \
defined(USE_CYASSL) || defined(USE_SCHANNEL) || \
defined(USE_DARWINSSL) || defined(USE_GSKIT)
@@ -625,7 +625,7 @@ int netware_init(void);
/* Single point where USE_NTLM definition might be defined */
#if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH)
-#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || \
+#if defined(USE_OPENSSL) || defined(USE_WINDOWS_SSPI) || \
defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) || \
defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO)
diff --git a/lib/getinfo.c b/lib/getinfo.c
index 0ffdd74a0..8395ee934 100644
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -306,7 +306,7 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info,
break; /* no SSL session found */
/* Return the TLS session information from the relevant backend */
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
internals = conn->ssl[sockindex].ctx;
#endif
#ifdef USE_GNUTLS
diff --git a/lib/hostcheck.c b/lib/hostcheck.c
index 21af8fa1c..62a26e4f2 100644
--- a/lib/hostcheck.c
+++ b/lib/hostcheck.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -22,7 +22,7 @@
#include "curl_setup.h"
-#if defined(USE_SSLEAY) || defined(USE_AXTLS) || defined(USE_GSKIT)
+#if defined(USE_OPENSSL) || defined(USE_AXTLS) || defined(USE_GSKIT)
/* these backends use functions from this file */
#ifdef HAVE_NETINET_IN_H
@@ -144,4 +144,4 @@ int Curl_cert_hostcheck(const char *match_pattern, const char *hostname)
return res;
}
-#endif /* SSLEAY or AXTLS or GSKIT */
+#endif /* OPENSSL or AXTLS or GSKIT */
diff --git a/lib/http.c b/lib/http.c
index 8f9b32ba7..e673a069b 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1434,7 +1434,7 @@ static CURLcode https_connecting(struct connectdata *conn, bool *done)
}
#endif
-#if defined(USE_SSLEAY) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
+#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
defined(USE_DARWINSSL) || defined(USE_POLARSSL) || defined(USE_NSS)
/* This function is for OpenSSL, GnuTLS, darwinssl, schannel and polarssl only.
It should be made to query the generic SSL layer instead. */
@@ -1473,7 +1473,7 @@ static int https_getsock(struct connectdata *conn,
return GETSOCK_BLANK;
}
#endif /* USE_SSL */
-#endif /* USE_SSLEAY || USE_GNUTLS || USE_SCHANNEL */
+#endif /* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL */
/*
* Curl_http_done() gets called from Curl_done() after a single HTTP request
diff --git a/lib/md5.c b/lib/md5.c
index 8ac1f6bc2..7df66f524 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -81,14 +81,9 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx)
gcry_md_close(*ctx);
}
-#elif defined(USE_SSLEAY)
+#elif defined(USE_OPENSSL)
/* When OpenSSL is available we use the MD5-function from OpenSSL */
-
-# ifdef USE_OPENSSL
-# include <openssl/md5.h>
-# else
-# include <md5.h>
-# endif
+#include <openssl/md5.h>
#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
(__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
diff --git a/lib/urldata.h b/lib/urldata.h
index 50a745f11..29ceb9df3 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -82,38 +82,16 @@
#include "cookie.h"
#include "formdata.h"
-#ifdef USE_SSLEAY
#ifdef USE_OPENSSL
-#include <openssl/rsa.h>
-#include <openssl/crypto.h>
-#include <openssl/x509.h>
-#include <openssl/pem.h>
#include <openssl/ssl.h>
-#include <openssl/err.h>
#ifdef HAVE_OPENSSL_ENGINE_H
#include <openssl/engine.h>
#endif
-#ifdef HAVE_OPENSSL_PKCS12_H
-#include <openssl/pkcs12.h>
-#endif
-#else /* SSLeay-style includes */
-#include <rsa.h>
-#include <crypto.h>
-#include <x509.h>
-#include <pem.h>
-#include <ssl.h>
-#include <err.h>
-#ifdef HAVE_OPENSSL_ENGINE_H
-#include <engine.h>
-#endif
-#ifdef HAVE_OPENSSL_PKCS12_H
-#include <pkcs12.h>
-#endif
#endif /* USE_OPENSSL */
+
#ifdef USE_GNUTLS
#error Configuration error; cannot use GnuTLS *and* OpenSSL.
#endif
-#endif /* USE_SSLEAY */
#ifdef USE_GNUTLS
#include <gnutls/gnutls.h>
@@ -291,13 +269,13 @@ struct ssl_connect_data {
#ifdef USE_NGHTTP2
bool asked_for_h2;
#endif
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
/* these ones requires specific SSL-types */
SSL_CTX* ctx;
SSL* handle;
X509* server_cert;
ssl_connect_state connecting_state;
-#endif /* USE_SSLEAY */
+#endif /* USE_OPENSSL */
#ifdef USE_GNUTLS
gnutls_session_t session;
gnutls_certificate_credentials_t cred;
@@ -1294,9 +1272,9 @@ struct UrlState {
void *resolver; /* resolver state, if it is used in the URL state -
ares_channel f.e. */
-#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
+#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H)
ENGINE *engine;
-#endif /* USE_SSLEAY */
+#endif /* USE_OPENSSL */
struct timeval expiretime; /* set this with Curl_expire() only */
struct Curl_tree timenode; /* for the splay stuff */
struct curl_llist *timeoutlist; /* list of pending timeouts */
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index b6e30144a..731ecc508 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -32,6 +32,8 @@
#include "curl_setup.h"
+#ifdef USE_OPENSSL
+
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
@@ -51,9 +53,7 @@
#include "hostcheck.h"
#include "curl_printf.h"
-#ifdef USE_SSLEAY
-
-#ifdef USE_OPENSSL
+#include <openssl/ssl.h>
#include <openssl/rand.h>
#include <openssl/x509v3.h>
#include <openssl/dsa.h>
@@ -62,14 +62,15 @@
#include <openssl/md5.h>
#include <openssl/conf.h>
#include <openssl/bn.h>
+#include <openssl/rsa.h>
+
+#ifdef HAVE_OPENSSL_PKCS12_H
+#include <openssl/pkcs12.h>
+#endif
+
#ifndef HAVE_BORINGSSL
#include <openssl/ocsp.h>
#endif
-#else
-#include <rand.h>
-#include <x509v3.h>
-#include <md5.h>
-#endif
#include "warnless.h"
#include "curl_memory.h"
@@ -82,10 +83,6 @@
#error "OPENSSL_VERSION_NUMBER not defined"
#endif
-#if !defined(SSLEAY_VERSION_NUMBER)
-#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
-#endif
-
#if OPENSSL_VERSION_NUMBER >= 0x0090581fL
#define HAVE_SSL_GET1_SESSION 1
#else
@@ -113,7 +110,7 @@
/* OpenSSL has PKCS 12 support, BoringSSL does not */
#define HAVE_PKCS12_SUPPORT
#else
-/* OpenSSL/SSLEay does not have PKCS12 support */
+/* OpenSSL does not have PKCS12 support */
#undef HAVE_PKCS12_SUPPORT
#endif
@@ -741,9 +738,6 @@ static char *SSL_strerror(unsigned long error, char *buf, size_t size)
return buf;
}
-#endif /* USE_SSLEAY */
-
-#ifdef USE_SSLEAY
/**
* Global SSL init
*
@@ -785,10 +779,6 @@ int Curl_ossl_init(void)
return 1;
}
-#endif /* USE_SSLEAY */
-
-#ifdef USE_SSLEAY
-
/* Global cleanup */
void Curl_ossl_cleanup(void)
{
@@ -843,7 +833,7 @@ int Curl_ossl_check_cxn(struct connectdata *conn)
*/
CURLcode Curl_ossl_set_engine(struct SessionHandle *data, const char *engine)
{
-#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
+#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H)
ENGINE *e;
#if OPENSSL_VERSION_NUMBER >= 0x00909000L
@@ -911,7 +901,7 @@ CURLcode Curl_ossl_set_engine_default(struct SessionHandle *data)
struct curl_slist *Curl_ossl_engines_list(struct SessionHandle *data)
{
struct curl_slist *list = NULL;
-#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
+#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H)
struct curl_slist *beg;
ENGINE *e;
@@ -1447,7 +1437,7 @@ end:
}
#endif
-#endif /* USE_SSLEAY */
+#endif /* USE_OPENSSL */
/* The SSL_CTRL_SET_MSG_CALLBACK doesn't exist in ancient OpenSSL versions
and thus this cannot be done there. */
@@ -1592,7 +1582,7 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
}
#endif
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
/* ====================================================== */
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
@@ -3109,7 +3099,7 @@ size_t Curl_ossl_version(char *buffer, size_t size)
return snprintf(buffer, size, "BoringSSL");
#else /* OPENSSL_IS_BORINGSSL */
-#if(SSLEAY_VERSION_NUMBER >= 0x905000)
+#if(OPENSSL_VERSION_NUMBER >= 0x905000)
{
char sub[3];
unsigned long ssleay_value;
@@ -3148,31 +3138,31 @@ size_t Curl_ossl_version(char *buffer, size_t size)
sub);
}
-#else /* SSLEAY_VERSION_NUMBER is less than 0.9.5 */
+#else /* OPENSSL_VERSION_NUMBER is less than 0.9.5 */
-#if(SSLEAY_VERSION_NUMBER >= 0x900000)
+#if(OPENSSL_VERSION_NUMBER >= 0x900000)
return snprintf(buffer, size, "OpenSSL/%lx.%lx.%lx",
- (SSLEAY_VERSION_NUMBER>>28)&0xff,
- (SSLEAY_VERSION_NUMBER>>20)&0xff,
- (SSLEAY_VERSION_NUMBER>>12)&0xf);
+ (OPENSSL_VERSION_NUMBER>>28)&0xff,
+ (OPENSSL_VERSION_NUMBER>>20)&0xff,
+ (OPENSSL_VERSION_NUMBER>>12)&0xf);
-#else /* (SSLEAY_VERSION_NUMBER >= 0x900000) */
+#else /* (OPENSSL_VERSION_NUMBER >= 0x900000) */
{
char sub[2];
sub[1]='\0';
- if(SSLEAY_VERSION_NUMBER&0x0f) {
- sub[0]=(SSLEAY_VERSION_NUMBER&0x0f) + 'a' -1;
+ if(OPENSSL_VERSION_NUMBER&0x0f) {
+ sub[0]=(OPENSSL_VERSION_NUMBER&0x0f) + 'a' -1;
}
else
sub[0]='\0';
return snprintf(buffer, size, "SSL/%x.%x.%x%s",
- (SSLEAY_VERSION_NUMBER>>12)&0xff,
- (SSLEAY_VERSION_NUMBER>>8)&0xf,
- (SSLEAY_VERSION_NUMBER>>4)&0xf, sub);
+ (OPENSSL_VERSION_NUMBER>>12)&0xff,
+ (OPENSSL_VERSION_NUMBER>>8)&0xf,
+ (OPENSSL_VERSION_NUMBER>>4)&0xf, sub);
}
-#endif /* (SSLEAY_VERSION_NUMBER >= 0x900000) */
-#endif /* SSLEAY_VERSION_NUMBER is less than 0.9.5 */
+#endif /* (OPENSSL_VERSION_NUMBER >= 0x900000) */
+#endif /* OPENSSL_VERSION_NUMBER is less than 0.9.5 */
#endif /* OPENSSL_IS_BORINGSSL */
#endif /* YASSL_VERSION */
@@ -3210,4 +3200,4 @@ bool Curl_ossl_cert_status_request(void)
return FALSE;
#endif
}
-#endif /* USE_SSLEAY */
+#endif /* USE_OPENSSL */
diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h
index 39103295c..03c473863 100644
--- a/lib/vtls/openssl.h
+++ b/lib/vtls/openssl.h
@@ -24,7 +24,7 @@
#include "curl_setup.h"
-#ifdef USE_SSLEAY
+#ifdef USE_OPENSSL
/*
* This header should only be needed to get included by vtls.c and openssl.c
*/
@@ -108,5 +108,5 @@ bool Curl_ossl_cert_status_request(void);
#define DEFAULT_CIPHER_SELECTION "ALL!EXPORT!EXPORT40!EXPORT56!aNULL!LOW!RC4"
-#endif /* USE_SSLEAY */
+#endif /* USE_OPENSSL */
#endif /* HEADER_CURL_SSLUSE_H */