aboutsummaryrefslogtreecommitdiff
path: root/crypto
AgeCommit message (Collapse)AuthorFilesLines
2016-01-10Regenerate SSL record/statem error stringsViktor Dukhovni1-30/+0
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-09RT41897: Add an CRYPTO_secure_actual_sizeRich Salz1-0/+13
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 Salz1-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>
2016-01-08Update comment as bn_dup_expand is goneViktor Dukhovni1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-07Fix some typos in commentsViktor Dukhovni1-3/+3
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Backwards-compatibility subject to OPENSSL_API_COMPATViktor Dukhovni13-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>
2016-01-08Remove all remaining traces if PEM_SealRichard Levitte1-2/+0
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-07Fix build-break; 'make update'Rich Salz1-15/+0
Commit bbd86bf5424a611cb6b77a3a17fc522931c4dcb8 broke certain builds. Commit 0674427f71ca050e3c61a7ec9dc71b208c3b39f5 missing 'make update' Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07mem functions cleanupRich Salz13-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>
2016-01-07Remove crypto/pem/pem_seal.cRichard Levitte2-196/+2
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 Dukhovni2-9/+401
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07use more descriptive name DEFINE_STACK_OF_CONSTDr. Stephen Henson2-2/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Only declare stacks in headersDr. Stephen Henson20-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>
2016-01-07Rename DECLARE*STACK_OF to DEFINE*STACK_OFDr. Stephen Henson17-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>
2016-01-07Fix declarations and constification for inline stack.Dr. Stephen Henson9-13/+10
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-06Remove more (rest?) of FIPS build stuff.Rich Salz1-89/+0
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-05DANE support structures, constructructors and accessorsViktor Dukhovni2-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>
2016-01-03Fix X509_STORE_CTX_cleanup()Viktor Dukhovni2-18/+23
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-03Drop incorrect id == -1 case from X509_check_trustViktor Dukhovni1-2/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-03X509_verify_cert() cleanupViktor Dukhovni2-343/+397
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-02Fix a possible memleakRichard Levitte1-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>
2015-12-31Use X509_get0_pubkey where appropriateDr. Stephen Henson7-24/+10
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-30Fix some missing or faulty header file inclusionsRichard Levitte2-2/+2
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-30Check for missing DSA parameters.Dr. Stephen Henson1-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>
2015-12-29Fix no-engine.Ben Laurie2-1/+2
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-12-23Avoid using a dangling pointer when removing the last itemKurt Roeckx1-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
2015-12-22Cleanup CRYPTO_{push,pop}_infoRich Salz4-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>
2015-12-22Rename *_realloc_clean to *_clear_reallocRich Salz4-4/+4
Just like *_clear_free routines. Previously undocumented, used a half-dozen times within OpenSSL source. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-22Also change the non-debug versions to use size_tKurt Roeckx1-2/+2
Reviewed-by: Richard Levitte <levitte@openssl.org> MR: #1518
2015-12-22Fix memory leak in DSA redo case.David Benjamin1-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
2015-12-22bn/asm/bn-c64xplus.asm: update commentary.Andy Polyakov1-2/+3
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-21sha/asm/sha256-armv4.pl: one of "universal" flags combination didn't compile.Andy Polyakov1-9/+4
(and unify table address calculation in ARMv8 code path). Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-19Fix URLs mangled by reformatMatt Caswell2-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>
2015-12-18Remove the "eay" c-file-style indicatorsRichard Levitte48-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>
2015-12-17Modify the lower level memory allocation routines to take size_tRichard Levitte3-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>
2015-12-16mem-cleanup, cont'd.Rich Salz2-67/+1
Remove LEVITTE_DEBUG_MEM. Remove {OPENSSL,CRYPTO}_remalloc. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-16Rename sec_mem to mem_sec, like other files.Rich Salz2-6/+6
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-16Rename some BUF_xxx to OPENSSL_xxxRich Salz46-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>
2015-12-16Constify EC_KEY in ECDH_compute_key.Dr. Stephen Henson3-6/+6
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16New EC functions.Dr. Stephen Henson4-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>
2015-12-15Fix build on SolarisMatt Caswell1-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>
2015-12-15Remove GMP engine.Rich Salz1-3/+0
Reviewed-by: Ben Laurie <ben@openssl.org>
2015-12-14make updateDr. Stephen Henson1-6/+6
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-14New function X509_get0_pubkeyDr. Stephen Henson5-33/+32
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-14Add EVP_PKEY_get0_* functions.Dr. Stephen Henson2-17/+50
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-14Extend EVP_PKEY_copy_parameters()Dr. Stephen Henson4-1/+20
Make EVP_PKEY_copy_parameters() work if the destination has no type (e.g. if obtained from EVP_PKEY_new()) or the underlying key is NULL. This is useful where we want to copy the parameters from an existing key to a new key. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-14Fix a ** 0 mod 1 = 0 for real this time.Emilia Kasper1-8/+31
Commit 2b0180c37fa6ffc48ee40caa831ca398b828e680 attempted to do this but only hit one of many BN_mod_exp codepaths. Fix remaining variants and add a test for each method. Thanks to Hanno Boeck for reporting this issue. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-12-14crpyto/ppccpuid.pl: add FPU probe and fix OPENSSL_rdtsc.Andy Polyakov1-0/+19
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-12-14crypto/ppccap.c: add SIGILL-free processor capability detection code.Andy Polyakov2-21/+119
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-12-13x86_64 assembly pack: tune clang version detection even further.Andy Polyakov13-13/+13
RT#4171 Reviewed-by: Kurt Roeckx <kurt@openssl.org>