summaryrefslogtreecommitdiffstats
path: root/crypto/crypto.h
AgeCommit message (Collapse)Author
2013-01-28Add and use a constant-time memcmp.Ben Laurie
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.
2012-06-08Reduce version skew.Ben Laurie
2011-06-01Prohibit low level cipher APIs in FIPS mode.Dr. Stephen Henson
Not complete: ciphers with assembly language key setup are not covered yet.
2011-06-01Prohibit use of low level digest APIs in FIPS mode.Dr. Stephen Henson
2011-05-26The first of many changes to make OpenSSL 1.0.1 FIPS capable.Dr. Stephen Henson
Add static build support to openssl utility. Add new "fips" option to Configure. Make use of installed fipsld and fips_standalone_sha1 Initialise FIPS error callbacks, locking and DRBG. Doesn't do anything much yet: no crypto is redirected to the FIPS module. Doesn't completely build either but the openssl utility can enter FIPS mode: which doesn't do anything much either.
2011-05-19Implement FIPS_mode and FIPS_mode_setDr. Stephen Henson
2010-01-26OPENSSL_isservice is now defined on all platforms not just WIN32Dr. Stephen Henson
2010-01-26export OPENSSL_isservice and make updateDr. Stephen Henson
2008-11-12Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe
knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
2008-11-01size_tification.Ben Laurie
2008-10-26Add JPAKE.Ben Laurie
2008-10-14Add missing lock definitions...Dr. Stephen Henson
2008-08-06Remove the dual-callback scheme for numeric and pointer thread IDs,Geoff Thorpe
deprecate the original (numeric-only) scheme, and replace with the CRYPTO_THREADID object. This hides the platform-specifics and should reduce the possibility for programming errors (where failing to explicitly check both thread ID forms could create subtle, platform-specific bugs). Thanks to Bodo, for invaluable review and feedback.
2008-07-03Revert my earlier CRYPTO_THREADID commit, I will commit a reworkedGeoff Thorpe
version some time soon.
2008-06-04More type-checking.Ben Laurie
2008-05-19Change use of CRYPTO_THREADID so that we always use both the ulong andBodo Möller
ptr members. (So if the id_callback is bogus, we still have &errno.)
2008-03-28There was a need to support thread ID types that couldn't be reliably castGeoff Thorpe
to 'unsigned long' (ie. odd platforms/compilers), so a pointer-typed version was added but it required portable code to check *both* modes to determine equality. This commit maintains the availability of both thread ID types, but deprecates the type-specific accessor APIs that invoke the callbacks - instead a single type-independent API is used. This simplifies software that calls into this interface, and should also make it less error-prone - as forgetting to call and compare *both* thread ID accessors could have led to hard-to-debug/infrequent bugs (that might only affect certain platforms or thread implementations). As the CHANGES note says, there were corresponding deprecations and replacements in the thread-related functions for BN_BLINDING and ERR too.
2006-06-23New functions CRYPTO_set_idptr_callback(),Bodo Möller
CRYPTO_get_idptr_callback(), CRYPTO_thread_idptr() for a 'void *' type thread ID, since the 'unsigned long' type of the existing thread ID does not always work well.
2005-05-08Eliminate "statement with no effect" warning when OPENSSL_assert macroAndy Polyakov
is used with constant assertion.
2005-04-12Replace overwritten lines before error codes.Dr. Stephen Henson
2005-04-12Rebuild error codes.Dr. Stephen Henson
2004-08-29OPENSSL_ia32cap final touches. Note that OPENSSL_ia32cap is no longer aAndy Polyakov
symbol, but a macro expanded as (*(OPENSSL_ia32cap_loc())). The latter is the only one to be exported to application.
2004-05-17Reduce dependencies on crypto.h by moving the opaque definition ofGeoff Thorpe
CRYPTO_EX_DATA and the new/free/dup callback prototypes to ossl_typ.h.
2003-10-06Setting the ex_data index is unsafe in a threaded environment, soRichard Levitte
let's wrap it with a lock.
2003-05-01Define the OPENSSL_ITEM structure.Richard Levitte
2003-03-20Make sure we get the definition of OPENSSL_NO_FP_API.Richard Levitte
2003-02-12new lock for EC_PRE_COMP structuresBodo Möller
Submitted by: Nils Larsch
2002-12-08Implement a stateful variant if the ZLIB compression method. The oldRichard Levitte
stateless variant is kept, but isn't used anywhere.
2002-12-03Windows CE updates, contributed by Steven Reddie <smr@essemer.com.au>Richard Levitte
2002-11-27Add OPENSSL_cleanse() to help cleanse memory and avoid certain compilerRichard Levitte
and linker optimizations. PR: 343
2002-11-15WinCE patchesRichard Levitte
2002-11-13Merge from 0.9.7-stable.Richard Levitte
2002-11-13Security fixes brought forward from 0.9.7.Ben Laurie
2002-10-28clean up new code for NIST primesBodo Möller
create new lock CRYPTO_LOCK_BN to avoid race condition
2002-09-23really fix race conditionBodo Möller
PR: 262
2002-08-09Add ECDH support.Bodo Möller
Additional changes: - use EC_GROUP_get_degree() in apps/req.c - add ECDSA and ECDH to apps/speed.c - adds support for EC curves over binary fields to ECDSA - new function EC_KEY_up_ref() in crypto/ec/ec_key.c - reorganize crypto/ecdsa/ecdsatest.c - add engine support for ECDH - fix a few bugs in ECDSA engine support Submitted by: Douglas Stebila <douglas.stebila@sun.com>
2002-02-13new locksBodo Möller
2001-09-10Fix apps/openssl.c and ssl/ssltest.c so that they useBodo Möller
CRYPTO_set_mem_debug_options() instead of CRYPTO_dbg_set_options(), which is the default implementation of the former and should usually not be directly used by applications (at least if we assume that the options accepted by the default implementation will also be meaningful to any other implementations). Also fix apps/openssl.c and ssl/ssltest such that environment variable setting 'OPENSSL_DEBUG_MEMORY=off' actively disables the compiled-in library defaults (i.e. such that CRYPTO_MDEBUG is ignored in this case).
2001-09-06Totally get rid of CRYPTO_LOCK_ERR_HASH.Bodo Möller
In err.c, flags int_error_hash_set and int_thread_hash_set appear superfluous since we can just as well initialize int_error_hash and int_thread_hash to NULL. Change some of the err.c formatting to conform with the rest of OpenSSL.
2001-09-04delete redundant ERR_load_CRYPTO_strings() prototypeBodo Möller
2001-09-01First step in fixing "ex_data" support. Warning: big commit log ...Geoff Thorpe
Currently, this change merely addresses where ex_data indexes are stored and managed, and thus fixes the thread-safety issues that existed at that level. "Class" code (eg. RSA, DSA, etc) no longer store their own STACKS and per-class index counters - all such data is stored inside ex_data.c. So rather than passing both STACK+counter to index-management ex_data functions, a 'class_index' is instead passed to indicate the class (eg. CRYPTO_EX_INDEX_RSA). New classes can be dynamically registered on-the-fly and this is also thread-safe inside ex_data.c (though whether the caller manages the return value in a thread-safe way is not addressed). This does not change the "get/set" functions on individual "ex_data" structures, and so thread-safety at that level isn't (yet) assured. Likewise, the method of getting and storing per-class indexes has not changed, so locking may still be required at the "caller" end but is nonetheless thread-safe inside "ex_data"'s internal implementation. Typically this occurs when code implements a new method of some kind and stores its own per-class index in a global variable without locking the setting and usage of that variable. If the code in question is likely to be used in multiple threads, locking the setting and use of that index is still up to the code in question. Possible fixes to this are being sketched, but definitely require more major changes to the API itself than this change undertakes. The underlying implementation in ex_data.c has also been modularised so that alternative "ex_data" implementations (that control all access to state) can be plugged in. Eg. a loaded module can have its implementation set to that of the application loaded it - the result being that thread-safety and consistency of "ex_data" classes and indexes can be maintained in the same place rather than the loaded module using its own copy of ex_data support code and state. Due to the centralisation of "state" with this change, cleanup of all "ex_data" state can now be performed properly. Previously all allocation of ex_data state was guaranteed to leak - and MemCheck_off() had been used to avoid it flagging up the memory debugging. A new function has been added to perfrom all this cleanup, CRYPTO_cleanup_all_ex_data(). The "openssl" command(s) have been changed to use this cleanup, as have the relevant test programs. External application code may want to do so too - failure to cleanup will not induce more memory leaking than was the case before, but the memory debugging is not tricked into hiding it any more so it may "appear" where it previously did not.
2001-07-25md_rand.c thread safetyBodo Möller
2001-05-06Add a general user interface API. This is designed to replace thingsRichard Levitte
like des_read_password and friends (backward compatibility functions using this new API are provided). The purpose is to remove prompting functions from the DES code section as well as provide for prompting through dialog boxes in a window system and the like.
2001-02-22One indirection level too little compared to theRichard Levitte
pre-CRYPTO_MEM_LEAK_CB time.
2001-02-19Make all configuration macros available for application by makingRichard Levitte
sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
2001-02-14New function OPENSSL_issetugid(). Needs more work.Ulf Möller
2001-01-10Add SSLEAY_DIR argument code for SSLeay_version.Bodo Möller
Add '-d' option for 'openssl version' (included in '-a').
2001-01-10Change prototypes for new CRYPTO_..._mem_ex_functions functions soBodo Möller
that they match the function definitions (namely, remove file/line parameters from free_func).
2001-01-10As response to a user request to be able to use external memoryRichard Levitte
handling routines that need file name and line number information, I've added a call level to our memory handling routines to allow that kind of hooking.
2001-01-09Get rid of the function pointer casting in the debugging memory code dueGeoff Thorpe
to LHASH usage. NB: The callback type used as been suctioned off into crypto.h as CRYPTO_MEM_LEAK_CB to improve clarity.