summaryrefslogtreecommitdiffstats
path: root/crypto
AgeCommit message (Collapse)Author
2016-01-13Call single parent free_comp routine.Rich Salz
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-13Fix double-free bugs in EC group precomputation stateViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-13Fix nistp512 typos, should be nistp521Viktor Dukhovni
Note, this now compiles, but fails tests, so further remediation is required. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-13Add missing #ifdef's to fix build breakRich Salz
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-13Add CRYPTO_EX_DATA; remove EC_EXTRA_DATARich Salz
Add CRYPTO_EX_DATA add EndC_KEY_[gs]et_method, From Roumen Petrov. Had to add various exdata calls to init/copy/free the exdata. Had to remove const from some EC functions because exdata isn't const-correct. :( Also remove EC_EXTRA_DATA and use a union to hold the possible pre-computed values and an enum to tell which value is in the union. (Rich Salz) Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-13Fix DES_LONG breakageViktor Dukhovni
For some strange reason opensslconf.h was only defining DES_LONG when included via des.h, but that's exceedingly fragile (as a result of include guards the include via des.h might not actually process the content again). Ripped out the nesting constraint, now always define OSSL_DES_LONG if not already defined. Note, this could just be DES_LONG, but trying to avoid exposing DES_LONG in places where it has never been seen before, so it is up to des.h to actually define DES_LONG as OSSL_DES_LONG. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-13After EVP_CIPHER turned opaque, e_rc5.c needs to include evp_int.hRichard Levitte
We missed this one because rc5 is disabled by default. Notified by The Doctor <doctor@doctor.nl2k.ab.ca> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Move Makefiles to Makefile.inRich Salz
Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12Remove unused internal macrosRichard Levitte
The M_EVP_* macros related to EVP_CIPHER / EVP_CIPHER_CTX are not public, and are unused. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12make updateRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt all EVP_CIPHER users for it becoming opaqueRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12EVP_CIPHER_CTX_new_cipher_data was a temporary measure, not needed any moreRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt all engines that need it to opaque EVP_CIPHERRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt builtin cipher implementations to opaque EVP_CIPHERRichard Levitte
They all stop including evp_locl.h, so we also take care of their adaptation to opaque EVP_CIPHER_CTX, as was promised in an earlier commit. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt the internal EVP routines to opaque EVP_CIPHERRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Make EVP_CIPHER opaque and add creator/destructor/accessor/writer functionsRichard Levitte
We follow the method used for EVP_MD. Also, move all the internal EVP_CIPHER building macros from evp_locl.h to evp_int.h. This will benefit our builtin EVP_CIPHERs. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Remove EVP_CIPHER_CTX_flags, it's only confusingRichard Levitte
EVP_CIPHER_CTX_flags was returning the flags of its associated EVP_CIPHER. However, EVP_CIPHER_CTX has flags of its own, so this function is quite confusing and therefore error prone. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt all EVP_CIPHER_CTX users for it becoming opaqueRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt cipher implementations to opaque EVP_CIPHER_CTXRichard Levitte
Note: there's a larger number of implementations in crypto/evp/ that aren't affected because they include evp_locl.h. They will be handled in a separate commit. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt the internal EVP routines to opaque EVP_CIPHER_CTXRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Add accessors and writers for EVP_CIPHER_CTXRichard Levitte
New functions: - EVP_CIPHER_CTX_encrypting() - EVP_CIPHER_CTX_iv() - EVP_CIPHER_CTX_iv_noconst() - EVP_CIPHER_CTX_original_iv() - EVP_CIPHER_CTX_buf_noconst() - EVP_CIPHER_CTX_num() - EVP_CIPHER_CTX_set_num() - EVP_CIPHER_CTX_cipher_data() - EVP_CIPHER_CTX_new_cipher_data() Note that the accessors / writers for iv, buf and num may go away, as those rather belong in the implementation's own structure (cipher_data) when the implementation would affect them (that would be the case when they are flagged EVP_CIPH_CUSTOM_IV or EVP_CIPH_FLAG_CUSTOM_CIPHER). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Make EVP_CIPHER_CTX opaque and renew the creator / destructor functionsRichard Levitte
Following the method used for EVP_MD_CTX and HMAC_CTX, EVP_CIPHER_CTX_init and EVP_CIPHER_CTX_cleanup are joined together into one function, EVP_CIPHER_CTX_reset, with EVP_CIPHER_CTX_init kept as an alias. EVP_CIPHER_CTX_cleanup fills no purpose of its own any more and is therefore removed. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Function pop_info() returned a dangling pointerPascal Cuoq
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Use ossl_inline and DEFINE_LHASH_OFDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Add lh_doall_arg inliningDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Add lh_doall inliningDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Add lh_new() inliningDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Inline LHASH_OFDr. Stephen Henson
Make LHASH_OF use static inline functions. Add new lh_get_down_load and lh_set_down_load functions and their typesafe inline equivalents. Make lh_error a function instead of a macro. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Add memory leak return value.Dr. Stephen Henson
Make CRYPTO_mem_leaks() and CRYPTO_mem_leaks_fp() return a status value. Update documentation. Don't abort() if there are leaks. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-11Enable/disable crypto-mdebug just like other featuresViktor Dukhovni
Also always abort() on leak failure. Reviewed-by: Stephen Henson <steve@openssl.org>
2016-01-10Regenerate SSL record/statem error stringsViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-09RT41897: Add an CRYPTO_secure_actual_sizeRich Salz
This is already documented, I just forgot to include the code :) Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-08Fix no CRYPTO_MDEBUG build (windows)Rich Salz
In order for mkdep to find #ifdef'd functions, they must be wrapped (in the header file) with #ifndef OPENSSL_NO_... So do that for various CRYPTO_mem_debug... things. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-08Update comment as bn_dup_expand is goneViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-07Fix some typos in commentsViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Backwards-compatibility subject to OPENSSL_API_COMPATViktor Dukhovni
Provide backwards-compatiblity for functions, macros and include files if OPENSSL_API_COMPAT is either not defined or defined less than the version number of the release in which the feature was deprecated. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-08Remove all remaining traces if PEM_SealRichard Levitte
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-07Fix build-break; 'make update'Rich Salz
Commit bbd86bf5424a611cb6b77a3a17fc522931c4dcb8 broke certain builds. Commit 0674427f71ca050e3c61a7ec9dc71b208c3b39f5 missing 'make update' Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07mem functions cleanupRich Salz
Only two macros CRYPTO_MDEBUG and CRYPTO_MDEBUG_ABORT to control this. If CRYPTO_MDEBUG is not set, #ifdef out the whole debug machinery. (Thanks to Jakob Bohm for the suggestion!) Make the "change wrapper functions" be the only paradigm. Wrote documentation! Format the 'set func' functions so their paramlists are legible. Format some multi-line comments. Remove ability to get/set the "memory debug" functions at runtme. Remove MemCheck_* and CRYPTO_malloc_debug_init macros. Add CRYPTO_mem_debug(int flag) function. Add test/memleaktest. Rename CRYPTO_malloc_init to OPENSSL_malloc_init; remove needless calls. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Remove crypto/pem/pem_seal.cRichard Levitte
It's functionality appears unused. If we're wrong, we will revert. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-07DANE support for X509_verify_cert()Viktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07use more descriptive name DEFINE_STACK_OF_CONSTDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Only declare stacks in headersDr. Stephen Henson
Don't define stacks in C source files: it causes warnings about unused functions in some compilers. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Rename DECLARE*STACK_OF to DEFINE*STACK_OFDr. Stephen Henson
Applications wishing to include their own stacks now just need to include DEFINE_STACK_OF(foo) in a header file. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Fix declarations and constification for inline stack.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-06Remove more (rest?) of FIPS build stuff.Rich Salz
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-05DANE support structures, constructructors and accessorsViktor Dukhovni
Also tweak some of the code in demos/bio, to enable interactive testing of BIO_s_accept's use of SSL_dup. Changed the sconnect client to authenticate the server, which now exercises the new SSL_set1_host() function. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-03Fix X509_STORE_CTX_cleanup()Viktor Dukhovni
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-03Drop incorrect id == -1 case from X509_check_trustViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-03X509_verify_cert() cleanupViktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>