aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/cryptlib.c
Commit message (Collapse)AuthorAgeFilesLines
* Add assembly CRYPTO_memcmp.Andy Polyakov2016-05-191-0/+2
| | | | | | GH: #102 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Copyright consolidation 07/10Rich Salz2016-05-171-107/+7
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove obsolete defined(__INTEL__) condition.Andy Polyakov2016-05-021-1/+0
| | | | | | This macro was defined by no-longer-supported __MWERKS__ compiler. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Break out DllMain from crypto/cryptlib.c and use it in shared libs onlyRichard Levitte2016-03-301-49/+0
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* OpenSSLDie --> OPENSSL_dieRich Salz2016-03-081-4/+3
| | | | | | Also removed a bunch of unused define's from e_os.h Reviewed-by: Richard Levitte <levitte@openssl.org>
* Declare DllMain internallyRichard Levitte2016-02-141-0/+1
| | | | | | | | | DllMain is a symbol that needs to be global, but no one needs to know. However, some compilers will warn if there isn't a declaration before the function is defined. Just add a declaration before the function definition. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Rename INIT funtions, deprecate old ones.Rich Salz2016-02-101-1/+1
| | | | | | Man, there were a lot of renamings :) Reviewed-by: Richard Levitte <levitte@openssl.org>
* Provide a thread stop APIMatt Caswell2016-02-091-2/+1
| | | | | | Add the OPENSSL_INIT_thread_stop() function. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Auto init/deinit libcryptoMatt Caswell2016-02-091-1/+3
| | | | | | | This builds on the previous commit to auto initialise/deinitialise libcrypto. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Comment "secure memcmp" implementationDmitry-Me2016-02-011-0/+17
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* GH102: Extra volatile avoids GCC bugRich Salz2016-01-301-1/+3
| | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* GH102: Add volatile to CRYPTO_memcmpRich Salz2016-01-301-3/+3
| | | | | | | Can't hurt and seems to prevent problems from some over-aggressive (LTO?) compilers. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | 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>
* Fix no-stdio buildDavid Woodhouse2015-09-291-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much related/similar work also done by Ivan Nestlerode <ivan.nestlerode@sonos.com> +Replace FILE BIO's with dummy ops that fail. +Include <stdio.h> for sscanf() even with no-stdio (since the declaration is there). We rely on sscanf() to parse the OPENSSL_ia32cap environment variable, since it can be larger than a 'long'. And we don't rely on the availability of strtoull(). +Remove OPENSSL_stderr(); not used. +Make OPENSSL_showfatal() do nothing (currently without stdio there's nothing we can do). +Remove file-based functionality from ssl/. The function prototypes were already gone, but not the functions themselves. +Remove unviable conf functionality via SYS_UEFI +Add fallback definition of BUFSIZ. +Remove functions taking FILE * from header files. +Add missing DECLARE_PEM_write_fp_const +Disable X509_LOOKUP_hash_dir(). X509_LOOKUP_file() was already compiled out, so remove its prototype. +Use OPENSSL_showfatal() in CRYPTO_destroy_dynlockid(). +Eliminate SRP_VBASE_init() and supporting functions. Users will need to build the verifier manually instead. +Eliminate compiler warning for unused do_pk8pkey_fp(). +Disable TEST_ENG_OPENSSL_PKEY. +Disable GOST engine as is uses [f]printf all over the place. +Eliminate compiler warning for unused send_fp_chars(). Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix pedantic warnings in mingw builds.Andy Polyakov2015-09-291-8/+4
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT3823: Improve the robustness of event loggingGunnar Kudrjavets2015-09-211-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of minor fixes here: 1) Handle the case when RegisterEventSource() fails (which it may for various reasons) and do the work of logging the event only if it succeeds. 2) Handle the case when ReportEvent() fails and do our best in debug builds to at least attempt somehow indicate that something has gone wrong. The typical situation would be someone running tools like DbMon, DBWin32, DebugView or just having the debugger attached. The intent is to make sure that at least some data will be captured so that we can save hours and days of debugging time. 3) Minor fix to change the MessageBox() flag to MB_ICONERROR. Though the value of MB_ICONERROR is the same value as MB_ICONSTOP, the intent is better conveyed by using MB_ICONERROR. Testing performed: 1) Clean compilation for debug-VC-WIN32 and VC-WIN32. 2) Good test results (nmake -f ms\ntdll.mak test) for debug-VC-WIN32 and VC-WIN32. 3) Stepped through relevant changes using WinDBG and exercised the impacted code paths. Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Matt Caswell <matt@openssl.org>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-141-1/+1
| | | | | | | | | | | | | 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>
* use unit64_t for CPUID and timestamp codeDr. Stephen Henson2015-05-141-5/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* more OSSL_NELEM casesDr. Stephen Henson2015-05-041-2/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3820: Don't call GetDesktopWindow()Gilles Khouzam2015-05-021-2/+0
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* OPENSSL_NO_XXX cleanup: OPENSSL_NO_BUF_FREELISTSRich Salz2015-01-271-3/+0
| | | | | | | | Remove OPENSSL_NO_BUF_FREELISTS. This was turned on by default, so the work here is removing the 'maintain our own freelist' code. Also removed a minor old Windows-multibyte/widechar conversion flag. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-244/+311
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* crypto/cryptlib.c: make it indent-friendly.Andy Polyakov2015-01-221-2/+4
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3548: Remove unsupported platformsRich Salz2015-01-121-1/+1
| | | | | | | This last one for this ticket. Removes WIN16. So long, MS_CALLBACK and MS_FAR. We won't miss you. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove OPENSSL_FIPSCANISTER code.Dr. Stephen Henson2014-12-081-2/+0
| | | | | | | OPENSSL_FIPSCANISTER is only set if the fips module is being built (as opposed to being used). Since the fips module wont be built in master this is redundant. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Avoid Windows 8 Getversion deprecated errors.Dr. Stephen Henson2014-02-251-1/+1
| | | | | | | | | | | 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.
* cryptlib.c: fix typo in OPENSSL_showfatal.Andy Polyakov2013-04-041-1/+1
|
* Add and use a constant-time memcmp.Ben Laurie2013-02-061-0/+13
| | | | | | | | This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cherry picked from commit 2ee798880a246d648ecddadc5b91367bee4a5d98)
* Improve WINCE support.Andy Polyakov2013-01-191-0/+2
| | | | Submitted by: Pierre Delaage
* cryptlib.c: fix logical error.Andy Polyakov2012-12-011-4/+7
|
* cryptlib.c: revert typo.Andy Polyakov2012-11-171-1/+1
|
* Extend OPENSSL_ia32cap_P with extra word to accomodate AVX2 capability.Andy Polyakov2012-11-171-6/+14
|
* Version skew reduction: trivia (I hope).Ben Laurie2012-06-031-1/+1
|
* cryptlib.c: sscanf warning.Andy Polyakov2012-01-151-1/+1
|
* cryptlib.c: make even non-Windows builds "strtoull-agnostic".Andy Polyakov2012-01-141-1/+1
|
* cryptlib.c, etc.: fix linker warnings in 64-bit Darwin build.Andy Polyakov2011-11-121-1/+3
|
* cryptlib.c: remove stdio dependency in Windows fipscanister.lib.Andy Polyakov2011-10-231-1/+7
|
* cryptlib.c: OPENSSL_ia32cap environment variable to interpret ~ as cpuid mask.Andy Polyakov2011-07-231-3/+6
|
* PR: 2470Dr. Stephen Henson2011-06-221-3/+0
| | | | | | | Submitted by: Corinna Vinschen <vinschen@redhat.com> Reviewed by: steve Don't call ERR_remove_state from DllMain.
* Add FIPS support to the WIN32 build system.Dr. Stephen Henson2011-02-031-0/+2
|
* Move locking and thread ID functions into new files lock.c and thr_id.c,Dr. Stephen Henson2011-01-271-536/+0
| | | | redirect locking to minimal FIPS_lock() function where required.
* PR: 2376Dr. Stephen Henson2010-11-191-9/+11
| | | | | | | Submitted by: Guenter <lists@gknw.net> Reviewed by: steve Cleanup alloca use, fix Win32 target for OpenWatcom.
* cryptlib.c: allow application to override OPENSSL_isservice.Andy Polyakov2010-03-291-0/+12
| | | | PR: 2194
* Submitted by: Julia Lawall <julia@diku.dk>Dr. Stephen Henson2009-09-131-1/+1
| | | | | | The functions ENGINE_ctrl(), OPENSSL_isservice(), EVP_PKEY_sign(), CMS_get1_RecipientRequest() and RAND_bytes() can return <=0 on error fix so the return code is checked correctly.
* Update from 1.0.0-stableDr. Stephen Henson2009-07-271-5/+5
|
* cryptlib.c: refine logic in OpenSSLDie (addenum to commit#18118).Andy Polyakov2009-05-041-2/+4
|
* Avoid double dialogs in OpenSSLDie on Windows.Andy Polyakov2009-05-031-0/+7
|
* cryptlib.c: eliminate dependency on _strtoui64, older Windows CRT don't have it.Andy Polyakov2009-05-021-1/+4
|
* Make the NULL definition of OPENSSL_ia32cap_loc() compatible with theRichard Levitte2009-04-291-1/+1
| | | | declaration in crypto.h.
* Expand OPENSS_ia32cap to 64 bits.Andy Polyakov2009-04-261-6/+16
|