summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/cryptlib.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Recent discussions about abort() potentially leaving key material inderaadt2019-01-261-5/+8
| | | | | | | | core files (which can depend upon various file layouts) have resonated with my hate for this function outside a purely debugging context. I also dislike how the report goes to stderr which may get lost or ignored. Increase the noise (with syslog_r) and use _exit(1) to gaurantee termination. ok jsing
* Store and return the locking callbacks, restoring previous behaviour.jsing2018-11-241-6/+12
| | | | | | | | | | | The previous code meant that a caller could set the locking callback, after which CRYPTO_get_locking_callback() would return non-NULL. Some existing code depends on this behaviour, specifically to identify if lock handling has been configured. As such, always returning NULL from CRYPTO_get_locking_callback() can result in unexpected application behaviour. ok bcook@
* Add back a few missing compatibility stubsbcook2018-11-111-1/+36
| | | | ok beck@
* Add automatic threading initialization for libcrypto.bcook2018-11-111-415/+54
| | | | | | | | | | | | | | This implements automatic thread support initialization in libcrypto. This does not remove any functions from the ABI, but does turn them into no-ops. Stub implementations of pthread_mutex_(init|lock|unlock) are provided for ramdisks. This does not implement the new OpenSSL 1.1 thread API internally, keeping the original CRYTPO_lock / CRYPTO_add_lock functions for library locking. For -portable, crypto_lock.c can be reimplemented with OS-specific primitives as needed. ok beck@, tb@, looks sane guenther@
* Stop calling OPENSSL_init() internally, since it is a no-op. Also placejsing2017-04-291-2/+1
| | | | | | it under #ifndef LIBRESSL_INTERNAL. ok beck@
* Send the function codes from the error functions to the bit bucket,beck2017-01-291-11/+7
| | | | | | as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
* Replace all uses of magic numbers when operating on OPENSSL_ia32_P[] bymiod2016-11-041-22/+5
| | | | | | | | | | | | | | | meaningful constants in a private header file, so that reviewers can actually get a chance to figure out what the code is attempting to do without knowing all cpuid bits. While there, turn it from an array of two 32-bit ints into a properly aligned 64-bit int. Use of OPENSSL_ia32_P is now restricted to the assembler parts. C code will now always use OPENSSL_cpu_caps() and check for the proper bits in the whole 64-bit word it returns. i386 tests and ok jsing@
* Remove I386_ONLY define. It was only used to prefer amiod2016-11-041-2/+2
| | | | | | | faster-on-genuine-80386-but-slower-on-80486-onwards innstruction sequence in the SHA512 code, and had not been enabled in years, if at all. ok tom@ bcook@
* Since a major bump of libcrypto is coming, remove OPENSSL_ia32cap andmiod2015-09-131-13/+1
| | | | | OPENSSL_ia32cap_loc; nothing in ports uses them besides embedded copies of OpenSSL. This opens the `all hell gets loose' window.
* Add a new interface, OPENSSL_cpu_caps(), to return the currently runningmiod2015-09-131-1/+13
| | | | | | | | | | | | | cpu's specific hardware capabilities users of libcrypto might be interested in, as an integer value. This deprecates the existing OPENSSL_ia32cap() macro and the OPENSSL_ia32cap_loc() function (which returns the pointer so that you can mess with stuff you shouldn't mess with). Interpreting the value returned by OPENSSL_cpu_caps() is, of course, machine-dependent. Minor version bump for libcrypto. ok beck@ jsing@
* Fix pointer to unsigned long conversion.doug2015-06-271-3/+5
| | | | | | | bcook@ notes that this check really only impacted 64-bit Windows. Also, changed the check to be unsigned for consistency. ok bcook@
* Assume that the size of a pointer will not change at runtime.bcook2015-01-221-28/+15
| | | | | | | Change the runtime check for whether a long is smaller than a pointer to a compile-time check. Replace the silly hash for LLP64 platforms. ok tedu@
* Kill a bunch more BUF_strdup's - these are converted to have a check forbeck2014-07-221-2/+2
| | | | | NULL before an intrinsic strdup. ok miod@
* Only import cryptlib.h in the four source files that actually need it.jsing2014-07-111-2/+5
| | | | | | | | Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
* Explicitly include <openssl/opensslconf.h> in every file that referencesjsing2014-07-101-1/+3
| | | | | | | | | an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers.
* OPENSSL_stderr() is unused so nuke it. OPENSSL_showfatal() is only used byjsing2014-07-101-9/+2
| | | | | | OpenSSLDie(), which is in the same file, so just make it static. ok miod@
* Nuke OPENSSL_NONPIC_relocated since nothing uses it.jsing2014-07-101-2/+1
| | | | ok miod@
* Stop including standard headers via cryptlib.h - pull in the headers thatjsing2014-07-101-1/+4
| | | | | | are needed in the source files that actually require them. ok beck@ miod@
* Remove the OPENSSL_*cap getenv's. A program should not be able toderaadt2014-06-201-11/+3
| | | | | change the behaviour of the library in such a complicated fashion. ok miod
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* annoying whitespacederaadt2014-05-311-3/+3
|
* remove OPENSSL_isservice. not used internally, no sane posix software willtedu2014-05-251-6/+0
| | | | | call it, and windows service software can figure this out on its own. ok beck miod
* modernize malloc callderaadt2014-04-211-1/+1
|
* More KNF.jsing2014-04-201-50/+62
|
* kill REF_PRINT/REF_CHECK debugging framework noone would usederaadt2014-04-171-6/+0
| | | | ok miod
* some KNF cleanup following the scriptderaadt2014-04-171-25/+21
|
* Change library to use intrinsic memory allocation functions instead ofbeck2014-04-171-5/+5
| | | | | | | | OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
* Remove non-posix support. Why is OPENSSL_isservice even here?tedu2014-04-161-229/+0
| | | | | Is this a crypto library or a generic platform abstraction library? "A hack to make Visual C++ 5.0 work correctly" ... time to upgrade.
* First pass at applying KNF to the OpenSSL code, which almost makes itjsing2014-04-151-407/+435
| | | | | readable. This pass is whitespace only and can readily be verified using tr and md5.
* Remove some stuff that isn't needed.beck2014-04-131-7/+7
| | | | ok miod@ deraadt@
* Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.miod2014-04-131-2/+16
|
* resolve conflictsdjm2012-10-131-6/+34
|
* openssl-1.0.0e: resolve conflictsdjm2011-11-031-10/+11
|
* resolve conflicts, fix local changesdjm2010-10-011-78/+430
|
* resolve conflictsdjm2009-01-091-282/+69
|
* resolve conflictsdjm2008-09-061-106/+120
|
* resolve conflictsdjm2006-06-271-53/+165
|
* resolve conflictsdjm2005-04-291-6/+124
|
* merge 0.9.7b with local changes; crank majors for libssl/libcryptomarkus2003-05-121-10/+30
|
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-7/+12
|
* merge openssl 0.9.6b-enginebeck2001-08-011-6/+4
| | | | | Note that this is a maintenence release, API's appear *not* to have changed. As such, I have only increased the minor number on these libraries
* openssl-engine-0.9.6 mergebeck2000-12-151-6/+195
|
* OpenSSL 0.9.5 mergebeck2000-03-191-2/+4
| | | | | | *warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2 if you are using the ssl26 packages for ssh and other things to work you will need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
* OpenSSL 0.9.4 mergebeck1999-09-291-46/+39
|
* Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD buildryker1998-10-051-0/+307
functionality for shared libs. Note that routines such as sslv2_init and friends that use RSA will not work due to lack of RSA in this library. Needs documentation and help from ports for easy upgrade to full functionality where legally possible.