aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pkcs7/pk7_smime.c
Commit message (Collapse)AuthorAgeFilesLines
* Copyright consolidation 04/10Rich Salz2016-05-171-54/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix PKCS7 memory leakMatt Caswell2016-04-181-0/+1
| | | | | | | | | Commit f0e0fd51f was a bit over-zealous in removing a call to X509_STORE_CTX_cleanup(). The call in question was in a loop and was required to cleanup resources used on each iteration of the loop. Removing this resulted in a memory leak. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Make many X509_xxx types opaque.Rich Salz2016-04-151-8/+11
| | | | | | | | | Make X509_OBJECT, X509_STORE_CTX, X509_STORE, X509_LOOKUP, and X509_LOOKUP_METHOD opaque. Remove unused X509_CERT_FILE_CTX Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Add PKCS7_NO_DUAL_CONTENT flagRich Salz2016-02-231-4/+12
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@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>
* Add GOST12 cms/smime capabilitiesMatt Caswell2015-09-301-0/+2
| | | | | | | | | Add additional NID references in the CMS/SMIME capabilities code to cater for GOST12. Patch supplied by Dmitry Belyavsky <beldmit@gmail.com> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove warning about use of uninitialised variableRichard Levitte2015-09-061-2/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT3955: Reduce some stack usageRich Salz2015-09-051-20/+34
| | | | | | Use malloc/free instead of big onstack buffers. Reviewed-by: Tim Hudson <tjh@openssl.org>
* GH354: Memory leak fixesAlessandro Ghedini2015-08-281-20/+6
| | | | | | | | | | | | Fix more potential leaks in X509_verify_cert() Fix memory leak in ClientHello test Fix memory leak in gost2814789 test Fix potential memory leak in PKCS7_verify() Fix potential memory leaks in X509_add1_reject_object() Refactor to use "goto err" in cleanup. Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Emilia Käsper <emilia@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-11/+11
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* free NULL cleanup 5aRich Salz2015-04-301-2/+1
| | | | | | | | | 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>
* Dead code removal: #if 0 asn1, pkcs7Rich Salz2015-01-301-4/+5
| | | | | | | 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-497/+477
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* check return value of BIO_write in PKCS7_decryptDr. Stephen Henson2012-03-081-1/+5
|
* Detect symmetric crypto errors in PKCS7_decrypt.Dr. Stephen Henson2012-02-271-2/+17
| | | | Thanks to Ivan Nestlerode <inestlerode@us.ibm.com> for reporting this bug.
* Fix from stable branch.Dr. Stephen Henson2009-03-151-2/+1
|
* Set memory BIOs up properly when stripping text headers from S/MIME messages.Dr. Stephen Henson2008-11-211-0/+1
|
* Update obsolete email address...Dr. Stephen Henson2008-11-051-1/+1
|
* Fix warnings.Dr. Stephen Henson2007-08-121-1/+1
|
* Don't finalize signerinfo if reuse and partial both set.Dr. Stephen Henson2007-04-131-1/+2
|
* remove dead codeNils Larsch2007-02-261-7/+0
|
* fix potential memory leaksNils Larsch2007-02-031-5/+13
| | | | PR: 1462
* Experimental streaming PKCS#7 support.Dr. Stephen Henson2006-12-241-0/+3
| | | | | | | | | | | | I thought it was about time I dusted this off. This stuff had been sitting on my hard drive for *ages* (2003 in fact). Hasn't been tested well and may not work properly. Nothing uses it at present which is just as well. Think of this as a traditional Christmas present which looks far more impressive in the adverts and on the box, some of the bits are missing and falls to bits if you play with it too much.
* Set detached flag in PKCS7 structure earlier to avoid eating up memory.Dr. Stephen Henson2006-07-091-2/+3
| | | | PR: 1071
* Add AES and GOST S/MIME capabilities if algorithms are supported.Dr. Stephen Henson2006-06-061-1/+13
|
* Flush p7bio when all data has been copied.Dr. Stephen Henson2006-05-261-0/+2
|
* Fix warnings.Dr. Stephen Henson2006-05-241-1/+1
|
* Add -resign and -md options to smime command to support resigning anDr. Stephen Henson2006-05-181-0/+45
| | | | existing structure and using alternative digest for signing.
* More S/MIME tidy. Place some common attribute operations in utilityDr. Stephen Henson2006-05-181-5/+4
| | | | functions.
* Tidy up of S/MIME code and add new functions which will make is easierDr. Stephen Henson2006-05-171-79/+124
| | | | to create S/MIME signed data with multiple signers.
* Update S/MIME code to use default digest.Dr. Stephen Henson2006-05-071-1/+1
|
* Allow PKCS7_decrypt() to work if no cert supplied.Dr. Stephen Henson2005-08-041-1/+1
|
* fix potential memory leakNils Larsch2005-05-191-1/+6
| | | | Submitted by: Goetz Babin-Ebell
* fix memory leak (BIO_free_all needs pointer to first BIO)Bodo Möller2005-05-171-4/+2
| | | | PR: 1070
* Fix possible memory leak.Dr. Stephen Henson2005-02-141-5/+6
|
* PKCS7_verify() performance optimization. When the content is large and aDr. Stephen Henson2005-01-141-4/+33
| | | | | | memory BIO (for example from SMIME_read_PKCS7 and detached data) avoid lots of slow memory copies from the memory BIO by saving the content in a temporary read only memory BIO.
* Allow CRLs to be passed into X509_STORE_CTX. This is useful when theDr. Stephen Henson2004-03-271-0/+2
| | | | | | verified structure can contain its own CRLs (such as PKCS#7 signedData). Tidy up some of the verify code.
* Fix indefinite length encoding so EOC correctly updatesDr. Stephen Henson2003-02-251-1/+1
| | | | | | | | the buffer pointer. Rename PKCS7_PARTSIGN to PKCS7_STREAM. Guess what that's for :-)
* Single pass processing to cleartext S/MIME signing.Dr. Stephen Henson2003-02-151-10/+12
|
* Make the necessary changes to work with the recent "ex_data" overhaul.Geoff Thorpe2001-09-011-3/+12
| | | | | | | | | | | See the commit log message for that for more information. NB: X509_STORE_CTX's use of "ex_data" support was actually misimplemented (initialisation by "memset" won't/can't/doesn't work). This fixes that but requires that X509_STORE_CTX_init() be able to handle errors - so its prototype has been changed to return 'int' rather than 'void'. All uses of that function throughout the source code have been tracked down and adjusted.
* Change the EVP_somecipher() and EVP_somedigest()Dr. Stephen Henson2001-03-091-1/+1
| | | | | | | functions to return constant EVP_MD and EVP_CIPHER pointers. Update docs.
* Stop PKCS7_verify() core dumping with unknown publicDr. Stephen Henson2001-02-241-8/+5
| | | | | key algorithms and leaking if the signature verify fails.
* Make all configuration macros available for application by makingRichard Levitte2001-02-191-4/+4
| | | | | | | | | | | | sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
* Work around for Netscape PKCS#7 signedData bug.Dr. Stephen Henson2000-09-181-0/+5
|
* Use sk_*_new_null() instead of sk_*_new(NULL), since that takes careRichard Levitte2000-09-171-2/+2
| | | | | of complaints from the compiler about data pointers and function pointers not being compatible with each other.
* Ugh, BIO_find_type() cannot be passed a NULL.Dr. Stephen Henson2000-09-071-3/+3
| | | | | | | Fix doc example, and fix BIO_find_type(). Fix PKCS7_verify(). It was using 'i' for both the loop variable and the verify return value.
* Keep a not of original encoding in certificate requests.Dr. Stephen Henson2000-09-051-0/+3
| | | | Add new option to PKCS7_sign to exclude S/MIME capabilities.
* Typesafe Thought Police part 4.Ben Laurie2000-05-161-4/+4
|
* Get rid of more non-ANSI declarations.Ulf Möller2000-05-151-1/+1
|