openssl: Sync with pristine upstream 1.0.2h

Our necessary custom changes will be reapplied in later commits for clarity,
and saved as patches for future updates.
This commit is contained in:
Rémi Verschelde 2017-05-27 15:35:40 +02:00
parent 022541d917
commit cb0f771aaa
6 changed files with 11 additions and 106 deletions

View File

@ -64,11 +64,7 @@
#if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && \ #if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && \
!defined(OPENSSL_SYSNAME_WIN32) && !defined(OPENSSL_SYSNAME_WINCE) && \ !defined(OPENSSL_SYSNAME_WIN32) && !defined(OPENSSL_SYSNAME_WINCE) && \
!defined(NETWARE_CLIB) !defined(NETWARE_CLIB)
#ifdef _WIN32 # include <strings.h>
#include <string.h>
#else
#include <strings.h>
#endif
#endif #endif
int OPENSSL_strncasecmp(const char *str1, const char *str2, size_t n) int OPENSSL_strncasecmp(const char *str1, const char *str2, size_t n)

View File

@ -118,10 +118,8 @@
# ifndef _WIN32_WINNT # ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400 # define _WIN32_WINNT 0x0400
# endif # endif
#ifndef UWP_ENABLED
# include <wincrypt.h> # include <wincrypt.h>
# include <tlhelp32.h> # include <tlhelp32.h>
#endif
/* /*
* Limit the time spent walking through the heap, processes, threads and * Limit the time spent walking through the heap, processes, threads and
@ -163,7 +161,7 @@ typedef struct tagCURSORINFO {
# define CURSOR_SHOWING 0x00000001 # define CURSOR_SHOWING 0x00000001
# endif /* CURSOR_SHOWING */ # endif /* CURSOR_SHOWING */
# if !defined(OPENSSL_SYS_WINCE) && !defined(UWP_ENABLED) # if !defined(OPENSSL_SYS_WINCE)
typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR, typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR,
DWORD, DWORD); DWORD, DWORD);
typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *); typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *);
@ -198,7 +196,6 @@ typedef NET_API_STATUS(NET_API_FUNCTION *NETFREE) (LPBYTE);
# endif /* 1 */ # endif /* 1 */
# endif /* !OPENSSL_SYS_WINCE */ # endif /* !OPENSSL_SYS_WINCE */
#if !defined(UWP_ENABLED)
int RAND_poll(void) int RAND_poll(void)
{ {
MEMORYSTATUS m; MEMORYSTATUS m;
@ -583,8 +580,6 @@ int RAND_poll(void)
return (1); return (1);
} }
#endif // UWP_ENABLED
int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam) int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
{ {
double add_entropy = 0; double add_entropy = 0;
@ -687,7 +682,7 @@ static void readtimer(void)
static void readscreen(void) static void readscreen(void)
{ {
# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(UWP_ENABLED) # if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN)
HDC hScrDC; /* screen DC */ HDC hScrDC; /* screen DC */
HBITMAP hBitmap; /* handle for our bitmap */ HBITMAP hBitmap; /* handle for our bitmap */
BITMAP bm; /* bitmap properties */ BITMAP bm; /* bitmap properties */

View File

@ -69,9 +69,6 @@
# ifdef OPENSSL_SYS_WIN32 # ifdef OPENSSL_SYS_WIN32
/* Needed for struct timeval */ /* Needed for struct timeval */
# include <winsock.h> # include <winsock.h>
#ifdef X509_NAME
#undef X509_NAME
#endif
# elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_) # elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_)
# include <sys/timeval.h> # include <sys/timeval.h>
# else # else
@ -81,9 +78,6 @@
# include <sys/time.h> # include <sys/time.h>
# endif # endif
# endif # endif
#ifdef UWP_ENABLED
#include <winsock2.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -107,18 +107,11 @@ typedef struct MD5state_st {
# ifdef OPENSSL_FIPS # ifdef OPENSSL_FIPS
int private_MD5_Init(MD5_CTX *c); int private_MD5_Init(MD5_CTX *c);
# endif # endif
int MD5_Init(MD5_CTX *c);
//#define MD5_Init _SSL_MD5_Init int MD5_Update(MD5_CTX *c, const void *data, size_t len);
#define MD5_Final _SSL_MD5_Final int MD5_Final(unsigned char *md, MD5_CTX *c);
#define MD5_Update _SSL_MD5_Update
#define MD5_Transform _SSL_MD5_Transform
#define MD5_Init private_MD5_Init
int _SSL_MD5_Init(MD5_CTX *c);
int _SSL_MD5_Update(MD5_CTX *c, const void *data, size_t len);
int _SSL_MD5_Final(unsigned char *md, MD5_CTX *c);
unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md);
void _SSL_MD5_Transform(MD5_CTX *c, const unsigned char *b); void MD5_Transform(MD5_CTX *c, const unsigned char *b);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -1,34 +1,9 @@
/* opensslconf.h */ /* opensslconf.h */
/* WARNING: Generated automatically from opensslconf.h.in by Configure. */ /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
//sorry godot needs a single file for multiple builds
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
// Check windows
#ifdef USE_64BITS
//weirder platforms that don't use GCC, LLVM or MSVC must define this
# define OPENSSL_USE_64_BITS
#elif _WIN32 || _WIN64
# if _WIN64
# define OPENSSL_USE_64_BITS
# endif
// Check GCC
#elif __GNUC__
# if __x86_64__ || __ppc64__
# define OPENSSL_USE_64_BITS
# endif
#endif
#ifndef OPENSSL_USE_64_BITS
//wqerw
#endif
/* OpenSSL was configured with the following options: */ /* OpenSSL was configured with the following options: */
#ifndef OPENSSL_DOING_MAKEDEPEND #ifndef OPENSSL_DOING_MAKEDEPEND
@ -78,9 +53,6 @@ extern "C" {
#endif /* OPENSSL_DOING_MAKEDEPEND */ #endif /* OPENSSL_DOING_MAKEDEPEND */
#ifndef OPENSSL_THREADS
# define OPENSSL_THREADS
#endif
#ifndef OPENSSL_NO_DYNAMIC_ENGINE #ifndef OPENSSL_NO_DYNAMIC_ENGINE
# define OPENSSL_NO_DYNAMIC_ENGINE # define OPENSSL_NO_DYNAMIC_ENGINE
#endif #endif
@ -134,8 +106,6 @@ extern "C" {
# endif # endif
#endif #endif
//#define OPENSSL_CPUID_OBJ
/* crypto/opensslconf.h.in */ /* crypto/opensslconf.h.in */
/* Generate 80386 code? */ /* Generate 80386 code? */
@ -175,19 +145,14 @@ extern "C" {
* - Intel P6 because partial register stalls are very expensive; * - Intel P6 because partial register stalls are very expensive;
* - elder Alpha because it lacks byte load/store instructions; * - elder Alpha because it lacks byte load/store instructions;
*/ */
#ifdef OPENSSL_USE_64_BITS
#define RC4_INT unsigned int #define RC4_INT unsigned int
#else
#define RC4_INT unsigned char
#endif
#endif #endif
#if !defined(RC4_CHUNK) #if !defined(RC4_CHUNK)
/* /*
* This enables code handling data aligned at natural CPU word * This enables code handling data aligned at natural CPU word
* boundary. See crypto/rc4/rc4_enc.c for further details. * boundary. See crypto/rc4/rc4_enc.c for further details.
*/ */
#define RC4_CHUNK unsigned long #undef RC4_CHUNK
#endif #endif
#endif #endif
@ -195,42 +160,20 @@ extern "C" {
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
* %20 speed up (longs are 8 bytes, int's are 4). */ * %20 speed up (longs are 8 bytes, int's are 4). */
#ifndef DES_LONG #ifndef DES_LONG
#define DES_LONG unsigned int #define DES_LONG unsigned long
#endif #endif
#endif #endif
#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
#define CONFIG_HEADER_BN_H #define CONFIG_HEADER_BN_H
#ifdef OPENSSL_USE_64_BITS
#undef BN_LLONG #undef BN_LLONG
#else
#define BN_LLONG
#endif
/* Should we define BN_DIV2W here? */ /* Should we define BN_DIV2W here? */
/* Only one for the following should be defined */ /* Only one for the following should be defined */
#ifdef OPENSSL_USE_64_BITS
# ifdef _WIN32
# undef SIXTY_FOUR_BIT_LONG
# define SIXTY_FOUR_BIT
# else
# define SIXTY_FOUR_BIT_LONG
# undef SIXTY_FOUR_BIT
# endif
#undef THIRTY_TWO_BIT
#else
#undef SIXTY_FOUR_BIT_LONG #undef SIXTY_FOUR_BIT_LONG
#undef SIXTY_FOUR_BIT #undef SIXTY_FOUR_BIT
#define THIRTY_TWO_BIT #define THIRTY_TWO_BIT
#endif
#endif #endif
#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
@ -272,7 +215,7 @@ extern "C" {
/* Unroll the inner loop, this sometimes helps, sometimes hinders. /* Unroll the inner loop, this sometimes helps, sometimes hinders.
* Very mucy CPU dependant */ * Very mucy CPU dependant */
#ifndef DES_UNROLL #ifndef DES_UNROLL
#define DES_UNROLL #undef DES_UNROLL
#endif #endif
/* These default values were supplied by /* These default values were supplied by

View File

@ -64,23 +64,7 @@
# include <openssl/e_os2.h> # include <openssl/e_os2.h>
# if defined(OPENSSL_SYS_WINDOWS) # if defined(OPENSSL_SYS_WINDOWS)
#define WIN32_LEAN_AND_MEAN # include <windows.h>
#include <windows.h>
#ifdef OCSP_RESPONSE
#undef OCSP_RESPONSE
#endif
#ifdef OCSP_REQUEST
#undef OCSP_REQUEST
#endif
#ifdef X509_NAME
#undef X509_NAME
#undef X509_NAME
#undef X509_EXTENSIONS
#undef X509_CERT_PAIR
#undef PKCS7_ISSUER_AND_SERIAL
#endif
# endif # endif
#ifdef __cplusplus #ifdef __cplusplus