aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
Commit message (Collapse)AuthorAgeFilesLines
* Empty SNI names are not validViktor Dukhovni2016-01-161-2/+2
| | | | | | | While empty inputs to SSL_set1_host() clear the reference identifier list. Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT4247: Fix EVP_CIPHER_CTX opaque on sparcRich Salz2016-01-152-3/+3
| | | | | | Via Rainer Jung Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Add lookup_certs for a trusted stack.Dr. Stephen Henson2016-01-151-0/+21
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* NGX-2040 - fix wildcard match on punycode/IDNA DNS namesZi Lin2016-01-151-1/+2
| | | | | | | | - bugfix: should not treat '--' as invalid domain substring. - '-' should not be the first letter of a domain Signed-off-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Cosmetic polish for last-resort depth 0 checkViktor Dukhovni2016-01-141-5/+5
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix last-resort depth 0 check when the chain has multiple certificatesViktor Dukhovni2016-01-141-4/+9
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add a no-egd option to disable EGD-related codeBenjamin Kaduk2016-01-142-43/+51
| | | | | | | | The entropy-gathering daemon is used only on a small number of machines. Provide a configure knob so that EGD support can be disabled by default but re-enabled on those systems that do need it. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Always initialize X509_STORE_CTX get_crl pointerViktor Dukhovni2016-01-141-0/+2
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Call single parent free_comp routine.Rich Salz2016-01-137-12/+10
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix double-free bugs in EC group precomputation stateViktor Dukhovni2016-01-134-0/+4
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix nistp512 typos, should be nistp521Viktor Dukhovni2016-01-132-3/+3
| | | | | | | Note, this now compiles, but fails tests, so further remediation is required. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Add missing #ifdef's to fix build breakRich Salz2016-01-131-0/+4
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Add CRYPTO_EX_DATA; remove EC_EXTRA_DATARich Salz2016-01-139-551/+227
| | | | | | | | | | | | 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>
* Fix DES_LONG breakageViktor Dukhovni2016-01-132-8/+3
| | | | | | | | | | | | | | | 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>
* After EVP_CIPHER turned opaque, e_rc5.c needs to include evp_int.hRichard Levitte2016-01-131-0/+1
| | | | | | | | 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>
* Move Makefiles to Makefile.inRich Salz2016-01-1297-9257/+2836
| | | | | | | | | | 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>
* Remove unused internal macrosRichard Levitte2016-01-121-1/+1
| | | | | | | The M_EVP_* macros related to EVP_CIPHER / EVP_CIPHER_CTX are not public, and are unused. Reviewed-by: Rich Salz <rsalz@openssl.org>
* make updateRichard Levitte2016-01-1224-2661/+3168
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt all EVP_CIPHER users for it becoming opaqueRichard Levitte2016-01-122-8/+10
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* EVP_CIPHER_CTX_new_cipher_data was a temporary measure, not needed any moreRichard Levitte2016-01-121-7/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt all engines that need it to opaque EVP_CIPHERRichard Levitte2016-01-121-34/+72
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt builtin cipher implementations to opaque EVP_CIPHERRichard Levitte2016-01-1215-301/+454
| | | | | | | | 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>
* Adapt the internal EVP routines to opaque EVP_CIPHERRichard Levitte2016-01-122-3/+4
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Make EVP_CIPHER opaque and add creator/destructor/accessor/writer functionsRichard Levitte2016-01-125-206/+444
| | | | | | | | 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>
* Remove EVP_CIPHER_CTX_flags, it's only confusingRichard Levitte2016-01-122-6/+1
| | | | | | | | 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>
* Adapt all EVP_CIPHER_CTX users for it becoming opaqueRichard Levitte2016-01-1214-119/+140
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adapt cipher implementations to opaque EVP_CIPHER_CTXRichard Levitte2016-01-126-32/+48
| | | | | | | | 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>
* Adapt the internal EVP routines to opaque EVP_CIPHER_CTXRichard Levitte2016-01-121-4/+3
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add accessors and writers for EVP_CIPHER_CTXRichard Levitte2016-01-121-0/+47
| | | | | | | | | | | | | | | | | | | | | 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>
* Make EVP_CIPHER_CTX opaque and renew the creator / destructor functionsRichard Levitte2016-01-122-36/+48
| | | | | | | | | | | 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>
* Function pop_info() returned a dangling pointerPascal Cuoq2016-01-111-9/+11
| | | | | Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Use ossl_inline and DEFINE_LHASH_OFDr. Stephen Henson2016-01-114-6/+6
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_doall_arg inliningDr. Stephen Henson2016-01-115-33/+25
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_doall inliningDr. Stephen Henson2016-01-114-16/+6
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add lh_new() inliningDr. Stephen Henson2016-01-116-60/+18
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Inline LHASH_OFDr. Stephen Henson2016-01-1114-35/+55
| | | | | | | | | | | 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>
* Add memory leak return value.Dr. Stephen Henson2016-01-111-7/+9
| | | | | | | 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>
* Enable/disable crypto-mdebug just like other featuresViktor Dukhovni2016-01-113-16/+16
| | | | | | Also always abort() on leak failure. Reviewed-by: Stephen Henson <steve@openssl.org>
* Regenerate SSL record/statem error stringsViktor Dukhovni2016-01-101-30/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT41897: Add an CRYPTO_secure_actual_sizeRich Salz2016-01-091-0/+13
| | | | | | This is already documented, I just forgot to include the code :) Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix no CRYPTO_MDEBUG build (windows)Rich Salz2016-01-081-2/+2
| | | | | | | | | 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>
* Update comment as bn_dup_expand is goneViktor Dukhovni2016-01-081-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix some typos in commentsViktor Dukhovni2016-01-071-3/+3
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Backwards-compatibility subject to OPENSSL_API_COMPATViktor Dukhovni2016-01-0713-28/+65
| | | | | | | | | 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>
* Remove all remaining traces if PEM_SealRichard Levitte2016-01-081-2/+0
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix build-break; 'make update'Rich Salz2016-01-071-15/+0
| | | | | | | Commit bbd86bf5424a611cb6b77a3a17fc522931c4dcb8 broke certain builds. Commit 0674427f71ca050e3c61a7ec9dc71b208c3b39f5 missing 'make update' Reviewed-by: Richard Levitte <levitte@openssl.org>
* mem functions cleanupRich Salz2016-01-0713-474/+272
| | | | | | | | | | | | | | | | | 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>
* Remove crypto/pem/pem_seal.cRichard Levitte2016-01-072-196/+2
| | | | | | It's functionality appears unused. If we're wrong, we will revert. Reviewed-by: Rich Salz <rsalz@openssl.org>
* DANE support for X509_verify_cert()Viktor Dukhovni2016-01-072-9/+401
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* use more descriptive name DEFINE_STACK_OF_CONSTDr. Stephen Henson2016-01-072-2/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>