aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pkcs7/pk7_doit.c
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace cleanup in cryptoFdaSilvaYY2016-06-291-1/+1
| | | | | | Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1264)
* Add some missing return value checksMatt Caswell2016-06-131-1/+2
| | | | | | Some misc return value checks Reviewed-by: Rich Salz <rsalz@openssl.org>
* Copyright consolidation 04/10Rich Salz2016-05-171-54/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Free memory on error in PKCS7_dataFinal()Matt Caswell2016-04-281-0/+1
| | | | | | | The PKCS7_dataFinal() function allocates a memory buffer but then fails to free it on an error condition. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Use X509_get0_pubkey where appropriateDr. Stephen Henson2015-12-311-4/+2
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy)Richard Levitte2015-12-071-7/+7
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adjust all accesses to EVP_MD_CTX to use accessor functions.Richard Levitte2015-12-071-22/+36
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Continue standardising malloc style for libcryptoMatt Caswell2015-11-091-7/+9
| | | | | | | Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Remove useless codeAlessandro Ghedini2015-10-231-1/+0
| | | | | | | RT#4081 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Avoid direct X509 structure accessDr. Stephen Henson2015-09-061-3/+3
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* PKCS#7: Fix NULL dereference with missing EncryptedContent.Emilia Kasper2015-06-111-1/+15
| | | | | | CVE-2015-1790 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-141-1/+1
| | | | | | | | | | | | | There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
* Use p==NULL not !p (in if statements, mainly)Rich Salz2015-05-111-4/+3
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* free null cleanup finaleRich Salz2015-05-011-5/+3
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free cleanup almost the finaleRich Salz2015-04-301-33/+15
| | | | | | | | | | Add OPENSSL_clear_free which merges cleanse and free. (Names was picked to be similar to BN_clear_free, etc.) Removed OPENSSL_freeFunc macro. Fixed the small simple ones that are left: CRYPTO_free CRYPTO_free_locked OPENSSL_free_locked Reviewed-by: Richard Levitte <levitte@openssl.org>
* free NULL cleanup 5aRich Salz2015-04-301-4/+2
| | | | | | | | | Don't check for NULL before calling a free routine. This gets X509_.*free: x509_name_ex_free X509_policy_tree_free X509_VERIFY_PARAM_free X509_STORE_free X509_STORE_CTX_free X509_PKEY_free X509_OBJECT_free_contents X509_LOOKUP_free X509_INFO_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free NULL cleanupRich Salz2015-03-281-8/+5
| | | | | | | | | EVP_.*free; this gets: EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* free NULL cleanupRich Salz2015-03-251-19/+10
| | | | | | | This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free BIO_free BIO_free_all BIO_vfree Reviewed-by: Matt Caswell <matt@openssl.org>
* RAND_bytes updatesMatt Caswell2015-03-251-1/+1
| | | | | | | Ensure RAND_bytes return value is checked correctly, and that we no longer use RAND_pseudo_bytes. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove old ASN.1 code.Dr. Stephen Henson2015-03-231-6/+6
| | | | | | | | | Remove old M_ASN1_ macros and replace any occurences with the corresponding function. Remove d2i_ASN1_bytes, d2i_ASN1_SET, i2d_ASN1_SET: no longer used internally. Reviewed-by: Rich Salz <rsalz@openssl.org>
* PKCS#7: avoid NULL pointer dereferences with missing contentEmilia Kasper2015-03-191-14/+73
| | | | | | | | | | | | | | | | | | | In PKCS#7, the ASN.1 content component is optional. This typically applies to inner content (detached signatures), however we must also handle unexpected missing outer content correctly. This patch only addresses functions reachable from parsing, decryption and verification, and functions otherwise associated with reading potentially untrusted data. Correcting all low-level API calls requires further work. CVE-2015-0289 Thanks to Michal Zalewski (Google) for reporting this issue. Reviewed-by: Steve Henson <steve@openssl.org>
* Make X509_ATTRIBUTE opaque.Dr. Stephen Henson2015-03-161-17/+5
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Dead code removal: #if 0 asn1, pkcs7Rich Salz2015-01-301-35/+0
| | | | | | | Keep one #if 0 but rename the symbol to be more descriptive of what it's doing (you can disable support for old broken Netscape software). Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-1176/+1092
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fixed NULL pointer dereference in PKCS7_dataDecode reported by David Ramos ↵Matt Caswell2014-05-071-0/+5
| | | | in PR#3339
* Fix double frees.Ben Laurie2014-04-221-0/+1
|
* misspellings fixes by https://github.com/vlajos/misspell_fixerVeres Lajos2013-09-051-1/+1
|
* Submitted by: Markus Friedl <mfriedl@gmail.com>Dr. Stephen Henson2012-03-221-2/+14
| | | | Fix memory leaks in 'goto err' cases.
* Fix for CMS/PKCS7 MMA. If RSA decryption fails use a random key andDr. Stephen Henson2012-03-121-18/+47
| | | | | | | | continue with symmetric decryption process to avoid leaking timing information to an attacker. Thanks to Ivan Nestlerode <inestlerode@us.ibm.com> for discovering this issue. (CVE-2012-0884)
* Fix warnings.Ben Laurie2010-06-121-3/+0
|
* Audit libcrypto for unchecked return values: fix all cases enounteredDr. Stephen Henson2009-09-231-7/+17
|
* If you're going to check for negative, use an signed integer! Coverity ID 122.Ben Laurie2007-04-051-1/+2
|
* check return value of ASN1_item_i2d(), Coverity ID 55Nils Larsch2007-04-041-0/+6
|
* Handle bad content type. Coverity ID 99.Ben Laurie2007-04-041-0/+3
|
* fix potential memory leaksNils Larsch2007-02-031-8/+39
| | | | PR: 1462
* Add bit I missed from PKCS#7 streaming encoder.Dr. Stephen Henson2006-12-241-10/+28
|
* Make things static that should be. Declare stuff in headers that should be.Ben Laurie2006-08-281-2/+2
| | | | Fix warnings.
* Use correct pointer types for various functions.Dr. Stephen Henson2006-07-201-1/+1
|
* Allow digests to supply S/MIME micalg values from a ctrl.Dr. Stephen Henson2006-07-101-8/+22
| | | | | Send ctrls to EVP_PKEY_METHOD during signing of PKCS7 structure so customisation is possible.
* Fix warnings.Dr. Stephen Henson2006-05-241-2/+2
|
* Add -resign and -md options to smime command to support resigning anDr. Stephen Henson2006-05-181-1/+0
| | | | existing structure and using alternative digest for signing.
* More S/MIME tidy. Place some common attribute operations in utilityDr. Stephen Henson2006-05-181-79/+102
| | | | functions.
* Remove old digest type hacks for non RSA keys.Dr. Stephen Henson2006-05-181-17/+0
|
* Update PKCS#7 decrypt routines to use new API.Dr. Stephen Henson2006-05-081-34/+76
|
* Update PKCS#7 enveloped data to new API.Dr. Stephen Henson2006-05-081-38/+61
|
* Remove dss1 hack from S/MIME code.Dr. Stephen Henson2006-04-191-0/+2
|
* Initial functions for main EVP_PKEY_METHOD operations.Dr. Stephen Henson2006-04-071-3/+3
| | | | No method implementations yet.
* Allow PKCS7_decrypt() to work if no cert supplied.Dr. Stephen Henson2005-08-041-17/+57
|
* Fix more error codes.Bodo Möller2005-05-111-12/+12
| | | | | (Also improve util/ck_errf.pl script, and occasionally fix source code formatting.)