Bug#13706621 : UNIFY THE YASSL VERSIONS THAT WE USE BY BACKPORTING 5.1
AND 5.5 YASSL FIXES. Took the 5.5 yassl directory and moved it to the 5.1 tree, while preserving the makefiles.
This commit is contained in:
parent
350e916881
commit
0aca1f58fa
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ssl.h defines openssl compatibility layer
|
/* ssl.h defines openssl compatibility layer
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* yaSSL implementation header defines all strucutres from the SSL.v3
|
/* yaSSL implementation header defines all strucutres from the SSL.v3
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2005-2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
Use is subject to license terms.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -12,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -34,9 +34,8 @@
|
|||||||
#include "openssl/ssl.h" // ASN1_STRING and DH
|
#include "openssl/ssl.h" // ASN1_STRING and DH
|
||||||
|
|
||||||
// Check if _POSIX_THREADS should be forced
|
// Check if _POSIX_THREADS should be forced
|
||||||
#if !defined(_POSIX_THREADS) && (defined(__NETWARE__) || defined(__hpux))
|
#if !defined(_POSIX_THREADS) && defined(__hpux)
|
||||||
// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
|
// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
|
||||||
// Netware supports pthreads but does not announce it
|
|
||||||
#define _POSIX_THREADS
|
#define _POSIX_THREADS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* yaSSL types header defines all constants, enums, and typedefs
|
/* yaSSL types header defines all constants, enums, and typedefs
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* The crypto wrapper source implements the policies for the cipher
|
/* The crypto wrapper source implements the policies for the cipher
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (C) 2000-2007 MySQL AB
|
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -37,7 +37,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
#if defined(__sun) || defined(__SCO_VERSION__) || defined(__NETWARE__)
|
#if defined(__sun) || defined(__SCO_VERSION__)
|
||||||
#include <sys/filio.h>
|
#include <sys/filio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* SSL source implements all openssl compatibility API functions
|
/* SSL source implements all openssl compatibility API functions
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* yaSSL source implements all SSL.v3 secification structures.
|
/* yaSSL source implements all SSL.v3 secification structures.
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* asn.hpp provides ASN1 BER, PublicKey, and x509v3 decoding
|
/* asn.hpp provides ASN1 BER, PublicKey, and x509v3 decoding
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* blowfish.hpp defines Blowfish
|
/* blowfish.hpp defines Blowfish
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (C) 2000-2007 MySQL AB
|
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -125,7 +125,7 @@ void CleanUp();
|
|||||||
|
|
||||||
|
|
||||||
// no gas on these systems ?, disable for now
|
// no gas on these systems ?, disable for now
|
||||||
#if defined(__sun__) || defined (__QNX__) || defined (__APPLE__)
|
#if defined(__sun__) || defined (__APPLE__)
|
||||||
#define TAOCRYPT_DISABLE_X86ASM
|
#define TAOCRYPT_DISABLE_X86ASM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* modes.hpp provides ECB and CBC modes for block cipher encryption/decryption
|
/* modes.hpp provides ECB and CBC modes for block cipher encryption/decryption
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* runtime.hpp provides C++ runtime support functions when building a pure C
|
/* runtime.hpp provides C++ runtime support functions when building a pure C
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* C++ based on Wei Dai's aes.cpp from CryptoPP */
|
/* C++ based on Wei Dai's aes.cpp from CryptoPP */
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* based on Wei Dai's algebra.cpp from CryptoPP */
|
/* based on Wei Dai's algebra.cpp from CryptoPP */
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* asn.cpp implements ASN1 BER, PublicKey, and x509v3 decoding
|
/* asn.cpp implements ASN1 BER, PublicKey, and x509v3 decoding
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* C++ code based on Wei Dai's blowfish.cpp from CryptoPP */
|
/* C++ code based on Wei Dai's blowfish.cpp from CryptoPP */
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* coding.cpp implements hex and base64 encoding/decoing
|
/* coding.cpp implements hex and base64 encoding/decoing
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* based on Wei Dai's misc.cpp from CryptoPP */
|
/* based on Wei Dai's misc.cpp from CryptoPP */
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2005-2007 MySQL AB, 2009 Sun Microsystems, Inc.
|
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
Use is subject to license terms.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -12,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -92,67 +92,6 @@ void OS_Seed::GenerateSeed(byte* output, word32 sz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#elif defined(__NETWARE__)
|
|
||||||
|
|
||||||
/* The OS_Seed implementation for Netware */
|
|
||||||
|
|
||||||
#include <nks/thread.h>
|
|
||||||
#include <nks/plat.h>
|
|
||||||
|
|
||||||
// Loop on high resulution Read Time Stamp Counter
|
|
||||||
static void NetwareSeed(byte* output, word32 sz)
|
|
||||||
{
|
|
||||||
word32 tscResult;
|
|
||||||
|
|
||||||
for (word32 i = 0; i < sz; i += sizeof(tscResult)) {
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
asm volatile("rdtsc" : "=A" (tscResult));
|
|
||||||
#else
|
|
||||||
#ifdef __MWERKS__
|
|
||||||
asm {
|
|
||||||
#else
|
|
||||||
__asm {
|
|
||||||
#endif
|
|
||||||
rdtsc
|
|
||||||
mov tscResult, eax
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
memcpy(output, &tscResult, sizeof(tscResult));
|
|
||||||
output += sizeof(tscResult);
|
|
||||||
|
|
||||||
NXThreadYield(); // induce more variance
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
OS_Seed::OS_Seed()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
OS_Seed::~OS_Seed()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void OS_Seed::GenerateSeed(byte* output, word32 sz)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
Try to use NXSeedRandom as it will generate a strong
|
|
||||||
seed using the onboard 82802 chip
|
|
||||||
|
|
||||||
As it's not always supported, fallback to default
|
|
||||||
implementation if an error is returned
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (NXSeedRandom(sz, output) != 0)
|
|
||||||
{
|
|
||||||
NetwareSeed(output, sz);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* The default OS_Seed implementation */
|
/* The default OS_Seed implementation */
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; see the file COPYING. If not, write to the
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* C++ based on Wei Dai's twofish.cpp from CryptoPP */
|
/* C++ based on Wei Dai's twofish.cpp from CryptoPP */
|
||||||
|
@ -50,8 +50,7 @@
|
|||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
|
||||||
#if !defined(_SOCKLEN_T) && \
|
#if !defined(_SOCKLEN_T) && (defined(_WIN32) || defined(__APPLE__))
|
||||||
(defined(_WIN32) || defined(__NETWARE__) || defined(__APPLE__))
|
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -60,18 +59,14 @@
|
|||||||
#if defined(__hpux)
|
#if defined(__hpux)
|
||||||
// HPUX uses int* for third parameter to accept
|
// HPUX uses int* for third parameter to accept
|
||||||
typedef int* ACCEPT_THIRD_T;
|
typedef int* ACCEPT_THIRD_T;
|
||||||
#elif defined(__NETWARE__)
|
|
||||||
// NetWare uses size_t* for third parameter to accept
|
|
||||||
typedef size_t* ACCEPT_THIRD_T;
|
|
||||||
#else
|
#else
|
||||||
typedef socklen_t* ACCEPT_THIRD_T;
|
typedef socklen_t* ACCEPT_THIRD_T;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Check if _POSIX_THREADS should be forced
|
// Check if _POSIX_THREADS should be forced
|
||||||
#if !defined(_POSIX_THREADS) && (defined(__NETWARE__) || defined(__hpux))
|
#if !defined(_POSIX_THREADS) && defined(__hpux)
|
||||||
// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
|
// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
|
||||||
// Netware supports pthreads but does not announce it
|
|
||||||
#define _POSIX_THREADS
|
#define _POSIX_THREADS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user