aboutsummaryrefslogtreecommitdiff
path: root/openssl/MacOS
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-02-22 14:43:31 +0100
committermarha <marha@users.sourceforge.net>2015-02-22 14:43:31 +0100
commitc9aad1ae6227c434d480d1d3aa8eae3c3c910c18 (patch)
tree94b917df998c3d547e191b3b9c58bbffc616470e /openssl/MacOS
parentf1c2db43dcf35d2cf4715390bd2391c28e42a8c2 (diff)
downloadvcxsrv-c9aad1ae6227c434d480d1d3aa8eae3c3c910c18.tar.gz
vcxsrv-c9aad1ae6227c434d480d1d3aa8eae3c3c910c18.tar.bz2
vcxsrv-c9aad1ae6227c434d480d1d3aa8eae3c3c910c18.zip
Upgraded to openssl-1.0.2
Diffstat (limited to 'openssl/MacOS')
-rw-r--r--openssl/MacOS/GetHTTPS.src/MacSocket.h107
-rw-r--r--openssl/MacOS/Randomizer.h75
-rw-r--r--openssl/MacOS/_MWERKS_GUSI_prefix.h4
-rw-r--r--openssl/MacOS/_MWERKS_prefix.h4
-rw-r--r--openssl/MacOS/buildinf.h6
-rw-r--r--openssl/MacOS/opensslconf.h140
6 files changed, 173 insertions, 163 deletions
diff --git a/openssl/MacOS/GetHTTPS.src/MacSocket.h b/openssl/MacOS/GetHTTPS.src/MacSocket.h
index ad59dc9e4..155d40d20 100644
--- a/openssl/MacOS/GetHTTPS.src/MacSocket.h
+++ b/openssl/MacOS/GetHTTPS.src/MacSocket.h
@@ -5,97 +5,98 @@
extern "C" {
#endif
-
-
-enum
-{
- kMacSocket_TimeoutErr = -2
+enum {
+ kMacSocket_TimeoutErr = -2
};
+// Since MacSocket does busy waiting, I do a callback while waiting
-// Since MacSocket does busy waiting, I do a callback while waiting
-
-typedef OSErr (*MacSocket_IdleWaitCallback)(void *);
+typedef OSErr(*MacSocket_IdleWaitCallback) (void *);
-
-// Call this before anything else!
+// Call this before anything else!
OSErr MacSocket_Startup(void);
-
-// Call this to cleanup before quitting
+// Call this to cleanup before quitting
OSErr MacSocket_Shutdown(void);
+// Call this to allocate a "socket" (reference number is returned in
+// outSocketNum)
+// Note that inDoThreadSwitching is pretty much irrelevant right now, since I
+// ignore it
+// The inTimeoutTicks parameter is applied during reads/writes of data
+// The inIdleWaitCallback parameter specifies a callback which is called
+// during busy-waiting periods
+// The inUserRefPtr parameter is passed back to the idle-wait callback
-// Call this to allocate a "socket" (reference number is returned in outSocketNum)
-// Note that inDoThreadSwitching is pretty much irrelevant right now, since I ignore it
-// The inTimeoutTicks parameter is applied during reads/writes of data
-// The inIdleWaitCallback parameter specifies a callback which is called during busy-waiting periods
-// The inUserRefPtr parameter is passed back to the idle-wait callback
-
-OSErr MacSocket_socket(int *outSocketNum,const Boolean inDoThreadSwitching,const long inTimeoutTicks,MacSocket_IdleWaitCallback inIdleWaitCallback,void *inUserRefPtr);
-
-
-// Call this to connect to an IP/DNS address
-// Note that inTargetAddressAndPort is in "IP:port" format-- e.g. 10.1.1.1:123
-
-OSErr MacSocket_connect(const int inSocketNum,char *inTargetAddressAndPort);
+OSErr MacSocket_socket(int *outSocketNum, const Boolean inDoThreadSwitching,
+ const long inTimeoutTicks,
+ MacSocket_IdleWaitCallback inIdleWaitCallback,
+ void *inUserRefPtr);
+// Call this to connect to an IP/DNS address
+// Note that inTargetAddressAndPort is in "IP:port" format-- e.g.
+// 10.1.1.1:123
-// Call this to listen on a port
-// Since this a low-performance implementation, I allow a maximum of 1 (one!) incoming request when I listen
+OSErr MacSocket_connect(const int inSocketNum, char *inTargetAddressAndPort);
-OSErr MacSocket_listen(const int inSocketNum,const int inPortNum);
+// Call this to listen on a port
+// Since this a low-performance implementation, I allow a maximum of 1 (one!)
+// incoming request when I listen
+OSErr MacSocket_listen(const int inSocketNum, const int inPortNum);
-// Call this to close a socket
+// Call this to close a socket
OSErr MacSocket_close(const int inSocketNum);
+// Call this to receive data on a socket
+// Most parameters' purpose are obvious-- except maybe "inBlock" which
+// controls whether I wait for data or return immediately
-// Call this to receive data on a socket
-// Most parameters' purpose are obvious-- except maybe "inBlock" which controls whether I wait for data or return immediately
+int MacSocket_recv(const int inSocketNum, void *outBuff, int outBuffLength,
+ const Boolean inBlock);
-int MacSocket_recv(const int inSocketNum,void *outBuff,int outBuffLength,const Boolean inBlock);
+// Call this to send data on a socket
+int MacSocket_send(const int inSocketNum, const void *inBuff,
+ int inBuffLength);
-// Call this to send data on a socket
-
-int MacSocket_send(const int inSocketNum,const void *inBuff,int inBuffLength);
-
-
-// If zero bytes were read in a call to MacSocket_recv(), it may be that the remote end has done a half-close
-// This function will let you check whether that's true or not
+// If zero bytes were read in a call to MacSocket_recv(), it may be that the
+// remote end has done a half-close
+// This function will let you check whether that's true or not
Boolean MacSocket_RemoteEndIsClosing(const int inSocketNum);
-
-// Call this to see if the listen has completed after a call to MacSocket_listen()
+// Call this to see if the listen has completed after a call to
+// MacSocket_listen()
Boolean MacSocket_ListenCompleted(const int inSocketNum);
-
-// These really aren't very useful anymore
+// These really aren't very useful anymore
Boolean MacSocket_LocalEndIsOpen(const int inSocketNum);
Boolean MacSocket_RemoteEndIsOpen(const int inSocketNum);
+// You may wish to change the userRefPtr for a socket callback-- use this to
+// do it
-// You may wish to change the userRefPtr for a socket callback-- use this to do it
-
-void MacSocket_SetUserRefPtr(const int inSocketNum,void *inNewRefPtr);
-
-
-// Call these to get the socket's IP:port descriptor
+void MacSocket_SetUserRefPtr(const int inSocketNum, void *inNewRefPtr);
-void MacSocket_GetLocalIPAndPort(const int inSocketNum,char *outIPAndPort,const int inIPAndPortLength);
-void MacSocket_GetRemoteIPAndPort(const int inSocketNum,char *outIPAndPort,const int inIPAndPortLength);
+// Call these to get the socket's IP:port descriptor
+void MacSocket_GetLocalIPAndPort(const int inSocketNum, char *outIPAndPort,
+ const int inIPAndPortLength);
+void MacSocket_GetRemoteIPAndPort(const int inSocketNum, char *outIPAndPort,
+ const int inIPAndPortLength);
-// Call this to get error info from a socket
+// Call this to get error info from a socket
-void MacSocket_GetSocketErrorInfo(const int inSocketNum,int *outSocketErrCode,char *outSocketErrString,const int inSocketErrStringMaxLength);
+void MacSocket_GetSocketErrorInfo(const int inSocketNum,
+ int *outSocketErrCode,
+ char *outSocketErrString,
+ const int inSocketErrStringMaxLength);
#ifdef __cplusplus
diff --git a/openssl/MacOS/Randomizer.h b/openssl/MacOS/Randomizer.h
index 565537b15..7c8b07626 100644
--- a/openssl/MacOS/Randomizer.h
+++ b/openssl/MacOS/Randomizer.h
@@ -1,43 +1,42 @@
-// Gathers unpredictable system data to be used for generating
-// random bits
+// Gathers unpredictable system data to be used for generating
+// random bits
#include <MacTypes.h>
-class CRandomizer
-{
-public:
- CRandomizer (void);
- void PeriodicAction (void);
-
-private:
-
- // Private calls
-
- void AddTimeSinceMachineStartup (void);
- void AddAbsoluteSystemStartupTime (void);
- void AddAppRunningTime (void);
- void AddStartupVolumeInfo (void);
- void AddFiller (void);
-
- void AddCurrentMouse (void);
- void AddNow (double millisecondUncertainty);
- void AddBytes (void *data, long size, double entropy);
-
- void GetTimeBaseResolution (void);
- unsigned long SysTimer (void);
-
- // System Info
- bool mSupportsLargeVolumes;
- bool mIsPowerPC;
- bool mIs601;
-
- // Time info
- double mTimebaseTicksPerMillisec;
- unsigned long mLastPeriodicTicks;
-
- // Mouse info
- long mSamplePeriod;
- Point mLastMouse;
- long mMouseStill;
+class CRandomizer {
+ public:
+ CRandomizer(void);
+ void PeriodicAction(void);
+
+ private:
+
+ // Private calls
+
+ void AddTimeSinceMachineStartup(void);
+ void AddAbsoluteSystemStartupTime(void);
+ void AddAppRunningTime(void);
+ void AddStartupVolumeInfo(void);
+ void AddFiller(void);
+
+ void AddCurrentMouse(void);
+ void AddNow(double millisecondUncertainty);
+ void AddBytes(void *data, long size, double entropy);
+
+ void GetTimeBaseResolution(void);
+ unsigned long SysTimer(void);
+
+ // System Info
+ bool mSupportsLargeVolumes;
+ bool mIsPowerPC;
+ bool mIs601;
+
+ // Time info
+ double mTimebaseTicksPerMillisec;
+ unsigned long mLastPeriodicTicks;
+
+ // Mouse info
+ long mSamplePeriod;
+ Point mLastMouse;
+ long mMouseStill;
};
diff --git a/openssl/MacOS/_MWERKS_GUSI_prefix.h b/openssl/MacOS/_MWERKS_GUSI_prefix.h
index fe6b5387d..60289203c 100644
--- a/openssl/MacOS/_MWERKS_GUSI_prefix.h
+++ b/openssl/MacOS/_MWERKS_GUSI_prefix.h
@@ -1,9 +1,9 @@
#include <MacHeaders.h>
#define B_ENDIAN
#ifdef __POWERPC__
-#pragma longlong on
+# pragma longlong on
#endif
#if 1
-#define MAC_OS_GUSI_SOURCE
+# define MAC_OS_GUSI_SOURCE
#endif
#define MONOLITH
diff --git a/openssl/MacOS/_MWERKS_prefix.h b/openssl/MacOS/_MWERKS_prefix.h
index 2189da753..eda14e8fe 100644
--- a/openssl/MacOS/_MWERKS_prefix.h
+++ b/openssl/MacOS/_MWERKS_prefix.h
@@ -1,9 +1,9 @@
#include <MacHeaders.h>
#define B_ENDIAN
#ifdef __POWERPC__
-#pragma longlong on
+# pragma longlong on
#endif
#if 0
-#define MAC_OS_GUSI_SOURCE
+# define MAC_OS_GUSI_SOURCE
#endif
#define MONOLITH
diff --git a/openssl/MacOS/buildinf.h b/openssl/MacOS/buildinf.h
index 90875b6e2..2e287c42d 100644
--- a/openssl/MacOS/buildinf.h
+++ b/openssl/MacOS/buildinf.h
@@ -1,5 +1,5 @@
#ifndef MK1MF_BUILD
-# define CFLAGS "-DB_ENDIAN"
-# define PLATFORM "macos"
-# define DATE "Sun Feb 27 19:44:16 MET 2000"
+# define CFLAGS "-DB_ENDIAN"
+# define PLATFORM "macos"
+# define DATE "Sun Feb 27 19:44:16 MET 2000"
#endif
diff --git a/openssl/MacOS/opensslconf.h b/openssl/MacOS/opensslconf.h
index ad557cc06..bace0a1a2 100644
--- a/openssl/MacOS/opensslconf.h
+++ b/openssl/MacOS/opensslconf.h
@@ -1,116 +1,126 @@
/* MacOS/opensslconf.h */
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
-#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
-#define OPENSSLDIR "/usr/local/ssl"
-#endif
+# if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
+# define OPENSSLDIR "/usr/local/ssl"
+# endif
#endif
#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
-#define IDEA_INT unsigned int
+# define IDEA_INT unsigned int
#endif
#if defined(HEADER_MD2_H) && !defined(MD2_INT)
-#define MD2_INT unsigned int
+# define MD2_INT unsigned int
#endif
#if defined(HEADER_RC2_H) && !defined(RC2_INT)
/* I need to put in a mod for the alpha - eay */
-#define RC2_INT unsigned int
+# define RC2_INT unsigned int
#endif
#if defined(HEADER_RC4_H)
-#if !defined(RC4_INT)
-/* using int types make the structure larger but make the code faster
- * on most boxes I have tested - up to %20 faster. */
+# if !defined(RC4_INT)
/*
+ * using int types make the structure larger but make the code faster on most
+ * boxes I have tested - up to %20 faster.
+ */
+/*-
* I don't know what does "most" mean, but declaring "int" is a must on:
* - Intel P6 because partial register stalls are very expensive;
* - elder Alpha because it lacks byte load/store instructions;
*/
-#define RC4_INT unsigned char
-#endif
-#if !defined(RC4_CHUNK)
+# define RC4_INT unsigned char
+# endif
+# if !defined(RC4_CHUNK)
/*
* This enables code handling data aligned at natural CPU word
* boundary. See crypto/rc4/rc4_enc.c for further details.
*/
-#define RC4_CHUNK unsigned long
-#endif
+# define RC4_CHUNK unsigned long
+# endif
#endif
#if defined(HEADER_DES_H) && !defined(DES_LONG)
-/* 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). */
-#ifndef DES_LONG
-#define DES_LONG unsigned long
-#endif
+/*
+ * 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).
+ */
+# ifndef DES_LONG
+# define DES_LONG unsigned long
+# endif
#endif
#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
-#define CONFIG_HEADER_BN_H
-#if __option(longlong)
+# define CONFIG_HEADER_BN_H
+# if __option(longlong)
# define BN_LLONG
-#else
+# else
# undef BN_LLONG
-#endif
+# endif
/* Should we define BN_DIV2W here? */
/* Only one for the following should be defined */
-/* The prime number generation stuff may not work when
- * EIGHT_BIT but I don't care since I've only used this mode
- * for debuging the bignum libraries */
-#undef SIXTY_FOUR_BIT_LONG
-#undef SIXTY_FOUR_BIT
-#define THIRTY_TWO_BIT
-#undef SIXTEEN_BIT
-#undef EIGHT_BIT
+/*
+ * The prime number generation stuff may not work when EIGHT_BIT but I don't
+ * care since I've only used this mode for debuging the bignum libraries
+ */
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# define THIRTY_TWO_BIT
+# undef SIXTEEN_BIT
+# undef EIGHT_BIT
#endif
#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
-#define CONFIG_HEADER_RC4_LOCL_H
-/* if this is defined data[i] is used instead of *data, this is a %20
- * speedup on x86 */
-#undef RC4_INDEX
+# define CONFIG_HEADER_RC4_LOCL_H
+/*
+ * if this is defined data[i] is used instead of *data, this is a %20 speedup
+ * on x86
+ */
+# undef RC4_INDEX
#endif
#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
-#define CONFIG_HEADER_BF_LOCL_H
-#define BF_PTR
-#endif /* HEADER_BF_LOCL_H */
+# define CONFIG_HEADER_BF_LOCL_H
+# define BF_PTR
+#endif /* HEADER_BF_LOCL_H */
#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
-#define CONFIG_HEADER_DES_LOCL_H
-/* the following is tweaked from a config script, that is why it is a
- * protected undef/define */
-#ifndef DES_PTR
-#define DES_PTR
-#endif
+# define CONFIG_HEADER_DES_LOCL_H
+/*
+ * the following is tweaked from a config script, that is why it is a
+ * protected undef/define
+ */
+# ifndef DES_PTR
+# define DES_PTR
+# endif
-/* This helps C compiler generate the correct code for multiple functional
+/*
+ * This helps C compiler generate the correct code for multiple functional
* units. It reduces register dependancies at the expense of 2 more
- * registers */
-#ifndef DES_RISC1
-#define DES_RISC1
-#endif
-
-#ifndef DES_RISC2
-#undef DES_RISC2
-#endif
-
-#if defined(DES_RISC1) && defined(DES_RISC2)
-YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
-#endif
-
-/* Unroll the inner loop, this sometimes helps, sometimes hinders.
- * Very mucy CPU dependant */
-#ifndef DES_UNROLL
-#define DES_UNROLL
-#endif
+ * registers
+ */
+# ifndef DES_RISC1
+# define DES_RISC1
+# endif
-#endif /* HEADER_DES_LOCL_H */
+# ifndef DES_RISC2
+# undef DES_RISC2
+# endif
+# if defined(DES_RISC1) && defined(DES_RISC2)
+YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED ! !!!!
+# endif
+/*
+ * Unroll the inner loop, this sometimes helps, sometimes hinders. Very mucy
+ * CPU dependant
+ */
+# ifndef DES_UNROLL
+# define DES_UNROLL
+# endif
+#endif /* HEADER_DES_LOCL_H */
#ifndef __POWERPC__
-#define MD32_XARRAY
+# define MD32_XARRAY
#endif