summaryrefslogtreecommitdiffstats
path: root/crypto (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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-111-30/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT41897: Add an CRYPTO_secure_actual_sizeRich Salz2016-01-101-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-081-3/+3
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Backwards-compatibility subject to OPENSSL_API_COMPATViktor Dukhovni2016-01-0813-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>
* Only declare stacks in headersDr. Stephen Henson2016-01-0720-38/+52
| | | | | | | Don't define stacks in C source files: it causes warnings about unused functions in some compilers. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Rename DECLARE*STACK_OF to DEFINE*STACK_OFDr. Stephen Henson2016-01-0717-21/+21
| | | | | | | | | | 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>
* Fix declarations and constification for inline stack.Dr. Stephen Henson2016-01-079-13/+10
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove more (rest?) of FIPS build stuff.Rich Salz2016-01-061-89/+0
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* DANE support structures, constructructors and accessorsViktor Dukhovni2016-01-062-0/+25
| | | | | | | | | 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>
* Fix X509_STORE_CTX_cleanup()Viktor Dukhovni2016-01-042-18/+23
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Drop incorrect id == -1 case from X509_check_trustViktor Dukhovni2016-01-031-2/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* X509_verify_cert() cleanupViktor Dukhovni2016-01-032-343/+397
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix a possible memleakRichard Levitte2016-01-021-0/+7
| | | | | | | | If there's a failure allocating md_data, the destination pctx will have a shared pointer with the source EVP_MD_CTX, which will lead to problems when either the source or the destination is freed. Reviewed-by: Stephen Henson <steve@openssl.org>
* Use X509_get0_pubkey where appropriateDr. Stephen Henson2015-12-317-24/+10
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix some missing or faulty header file inclusionsRichard Levitte2015-12-302-2/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Check for missing DSA parameters.Dr. Stephen Henson2015-12-301-1/+3
| | | | | | | | | | | | | If DSA parameters are absent return -1 (for unknown) in DSA_security_bits. If parameters are absent when a certificate is set in an SSL/SSL_CTX structure this will reject the certificate by default. This will cause DSA certificates which omit parameters to be rejected but that is never (?) done in practice. Thanks to Brian 'geeknik' Carpenter for reporting this issue. Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Fix no-engine.Ben Laurie2015-12-292-1/+2
| | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Avoid using a dangling pointer when removing the last itemKurt Roeckx2015-12-231-0/+2
| | | | | | | | | | | | When it's the last item that is removed int_thread_hash == hash and we would still call int_thread_release(&hash) while hash is already freed. So int_thread_release would compare that dangling pointer to NULL which is undefined behaviour. Instead do already what int_thread_release() would do, and make the call do nothing instead. Reviewed-by: Rich Salz <rsalz@openssl.org> RT: #4155, MR: #1519
* Cleanup CRYPTO_{push,pop}_infoRich Salz2015-12-224-42/+13
| | | | | | | | Rename to OPENSSL_mem_debug_{push,pop}. Remove simple calls; keep only calls used in recursive functions. Ensure we always push, to simplify so that we can always pop Reviewed-by: Richard Levitte <levitte@openssl.org>
* Rename *_realloc_clean to *_clear_reallocRich Salz2015-12-224-4/+4
| | | | | | | Just like *_clear_free routines. Previously undocumented, used a half-dozen times within OpenSSL source. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Also change the non-debug versions to use size_tKurt Roeckx2015-12-221-2/+2
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> MR: #1518
* Fix memory leak in DSA redo case.David Benjamin2015-12-221-4/+4
| | | | | | | | | Found by clang scan-build. Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org> RT: #4184, MR: #1496
* bn/asm/bn-c64xplus.asm: update commentary.Andy Polyakov2015-12-221-2/+3
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* sha/asm/sha256-armv4.pl: one of "universal" flags combination didn't compile.Andy Polyakov2015-12-211-9/+4
| | | | | | (and unify table address calculation in ARMv8 code path). Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix URLs mangled by reformatMatt Caswell2015-12-192-2/+2
| | | | | | | Some URLs in the source code ended up getting mangled by indent. This fixes it. Based on a patch supplied by Arnaud Lacombe <al@aerilon.ca> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove the "eay" c-file-style indicatorsRichard Levitte2015-12-1848-48/+48
| | | | | | | Since we don't use the eay style any more, there's no point tryint to tell emacs to use it. Reviewed-by: Matt Caswell <matt@openssl.org>
* Modify the lower level memory allocation routines to take size_tRichard Levitte2015-12-173-17/+17
| | | | | | We've been using int for the size for a long time, it's about time... Reviewed-by: Rich Salz <rsalz@openssl.org>
* mem-cleanup, cont'd.Rich Salz2015-12-172-67/+1
| | | | | | | Remove LEVITTE_DEBUG_MEM. Remove {OPENSSL,CRYPTO}_remalloc. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Rename sec_mem to mem_sec, like other files.Rich Salz2015-12-172-6/+6
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Rename some BUF_xxx to OPENSSL_xxxRich Salz2015-12-1646-283/+215
| | | | | | | | | Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Constify EC_KEY in ECDH_compute_key.Dr. Stephen Henson2015-12-163-6/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* New EC functions.Dr. Stephen Henson2015-12-164-28/+47
| | | | | | | | | | New functions EC_POINT_point2buf and EC_KEY_key2buf which encode a point and allocate a buffer in one call. New function EC_KEY_oct2key() which sets public key in an EC_KEY structure from an encoded point. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix build on SolarisMatt Caswell2015-12-161-0/+4
| | | | | | | | | | | Solaris builds were failing during async compilation because the .o files created from compiling the corresponding .c files held in async/arch were ending up in the top level async directory. Consequently the link fails because it can't find the .o files. Thanks to Richard Levitte for pointing me in the right direction on this. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove GMP engine.Rich Salz2015-12-151-3/+0
| | | | Reviewed-by: Ben Laurie <ben@openssl.org>