summaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_win.c
AgeCommit message (Collapse)Author
2016-06-27Fix one more instance of incorrect OPENSSL_API_COMPAT valueMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-03Added define for STATUS_SUCCESSMat
Use STATUS_SUCCESS instead of 0. Renamed USE_BCRYPT to RAND_WINDOWS_USE_BCRYPT to avoid possible collisions with other defines. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1142)
2016-06-03Adds casts for 64-bitMat
Adds missing casts for 64-bit. Removed zero initialization of hProvider. hProvider is an "out" parameter of CryptAcquireContextW. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1142)
2016-06-03Define USE_BCRYPTMat
Define USE_BCRYPT Removed _WIN32_WINNT define Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1142)
2016-06-03Use BCryptGenRandom on Windows 7 or higherMat
When openssl is compiled with MSVC and _WIN32_WINNT>=0x0601 (Windows 7), BCryptGenRandom is used instead of the legacy CryptoAPI. This change brings the following benefits: - Removes dependency on CryptoAPI (legacy API) respectively advapi32.dll - CryptoAPI Cryptographic Service Providers (rsa full) are not dynamically loaded. - Allows Universal Windows Platform (UWP) apps to use openssl (CryptGenRandom is not available for Windows store apps) Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1142)
2016-05-29add removed functions back as deprecatedJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29get rid of unnecessary includeJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29remove RAND_screen and friendsJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29cherry pick pr-512 changesJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29OR flags with CRYPT_SILENT to really make sure no UI pops upJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29fix endif commentJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29remove all WINCE ifdefsJoey Yandle
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-29- remove insane heap walk and kernel loading code; clean up style and ↵Joey Yandle
calling conventions Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1079)
2016-05-17Copyright consolidation 09/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-05GH601: Various spelling fixes.FdaSilvaYY
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-09-29Fix -Wshadow warnings in mingw builds.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte
There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-02-06Live code cleanup: remove #if 1 stuffRich Salz
For code bracketed by "#if 1" then remove the alternate "#else .. #endif" lines. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-01-29Dead code removal: #if 0 bio, comp, randRich Salz
The start of removing dead code. A remaining #if 0 in bss_conn.c needs more thought. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22indent has problems with comments that are on the right hand side of a line.Matt Caswell
Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-13Avoid deprecation problems in Visual Studio 13Matt Caswell
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-01-06Further comment amendments to preserve formatting prior to source reformatMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-08remove OPENSSL_FIPSAPIDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-09-18RT2301: GetDIBits, not GetBitmapBits in rand_winJake Goulding
GetDIBits has been around since Windows2000 and BitBitmapBits is an old Win16 compatibility function that is much slower. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-02-25Avoid Windows 8 Getversion deprecated errors.Dr. Stephen Henson
Windows 8 SDKs complain that GetVersion() is deprecated. We only use GetVersion like this: (GetVersion() < 0x80000000) which checks if the Windows version is NT based. Use a macro check_winnt() which uses GetVersion() on older SDK versions and true otherwise.
2011-02-03Add FIPS support to the WIN32 build system.Dr. Stephen Henson
2010-03-22rand_win.c: fix logical bug in readscreen.Andy Polyakov
2010-02-17PR: 2100Dr. Stephen Henson
Submitted by: James Baker <jbaker@tableausoftware.com> et al. Workaround for slow Heap32Next on some versions of Windows.
2010-01-19rand_win.c: fix time limit logic.Andy Polyakov
2010-01-19rand_win.c: handle GetTickCount wrap-around.Andy Polyakov
2009-09-20Don't use __try+__except unless on VC++Dr. Stephen Henson
2009-07-24Update from 0.9.8-stable.Dr. Stephen Henson
2005-10-13Broaden compatibility amount Win32 headers even further [some don't haveAndy Polyakov
SIZE_T].
2005-09-22Broaden compatibility among Windows SDK versions. Elder versions don't haveAndy Polyakov
ULONG_PTR, so we replace it with equally wide SIZE_T.
2005-08-07Final(?) WinCE update.Andy Polyakov
2005-08-03WCE update, mostly typos.Andy Polyakov
2005-08-02Abstain from GUI calls in rand_win.c in NT service context.Andy Polyakov
2005-08-02Eliminate bogus #if WCEPLATFORM!=MS_HPC_PRO [which by the way unconditionallyAndy Polyakov
invalidated the whole clause] and replace it with #if _WIN32_WCE>=210.
2005-05-21Move _WIN32_WINNT definition from command line to e_os.h. The change isAndy Polyakov
inspired by VC6 failure report. In addition abstain from taking screen snapshots when running in NT service context.
2005-04-19Various Win32 and other fixes for warnings and compilation errors.Dr. Stephen Henson
Fix Win32 build system to use 'Makefile' instead of 'Makefile.ssl'.
2005-03-24undo Cygwin changeUlf Möller
2005-03-19Use Windows randomness code on CygwinUlf Möller
2004-07-21Make rand_win.c UNICODE savvy.Andy Polyakov
2004-01-04Update URILutz Jänicke
Submitted by: Gertjan van Oosten <gertjan@West.NL> PR: #804
2003-08-07Correct two problems, found by Martin Kochanski <cardbox@easynet.co.uk>:Richard Levitte
1. CreateToolhelp32Snapshot returns INVALID_HANDLE_VALUE, not NULL, on error. 2. On Windows CE, a snapshot handle is closed with CloseToolhelp32Snapshot, not CloseHandle.
2002-12-03Windows CE updates, contributed by Steven Reddie <smr@essemer.com.au>Richard Levitte
2002-11-15WinCE patchesRichard Levitte