summaryrefslogtreecommitdiffstats
path: root/crypto/cms/cms_smime.c
AgeCommit message (Collapse)Author
2018-05-29Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6371)
2018-05-08Fix a mem leak in CMSMatt Caswell
The function CMS_RecipientInfo_set0_pkey() is a "set0" and therefore memory management passes to OpenSSL. If the same function is called again then we should ensure that any previous value that was set is freed first before we set it again. Fixes #5052 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6142)
2017-08-08Support CMS decrypt without a certificate for all key typesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4115)
2016-07-25Constify CMS_decrypt_set1_key input bufferFdaSilvaYY
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1300)
2016-05-17Copyright consolidation 09/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-15Make many X509_xxx types opaque.Rich Salz
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>
2016-02-22Remove unused parameters from internal functionsRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
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>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-08-12Err isn't always malloc failure.Dr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-21RT3917: add cleanup on an error pathRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte
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>
2015-05-11Use p==NULL not !p (in if statements, mainly)Rich Salz
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-01free NULL cleanup -- codaRich Salz
After the finale, the "real" final part. :) Do a recursive grep with "-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are an "if NULL" check that can be removed. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-04-30free NULL cleanup 5aRich Salz
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>
2015-03-25free NULL cleanupRich Salz
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>
2015-03-24Move some ASN.1 internals to asn1_int.hDr. Stephen Henson
Move ASN.1 internals used across multiple directories into new internal header file asn1_int.h remove crypto/Makefile hack which allowed other directories to include "asn1_locl.h" Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-05-09Return an error if no recipient type matches.Dr. Stephen Henson
If the key type does not match any CMS recipient type return an error instead of using a random key (MMA mitigation). This does not leak any useful information to an attacker. PR#3348
2014-02-13Add suppot for ASCII with CRLF canonicalisation.Dr. Stephen Henson
2013-12-22Canonicalise input in CMS_verify.Dr. Stephen Henson
If content is detached and not binary mode translate the input to CRLF format. Before this change the input was verified verbatim which lead to a discrepancy between sign and verify.
2013-07-17CMS support for key agreeement recipient info.Dr. Stephen Henson
Add hooks to support key agreement recipient info type (KARI) using algorithm specific code in the relevant public key ASN1 method.
2012-03-12Fix for CMS/PKCS7 MMA. If RSA decryption fails use a random key andDr. Stephen Henson
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)
2010-07-26Add new type ossl_ssize_t instead of ssize_t and move definitions toDr. Stephen Henson
e_os2.h, this should fix WIN32 compilation issues and hopefully avoid conflicts with other headers which may workaround ssize_t in different ways.
2009-11-26Experimental CMS password based recipient Info support.Dr. Stephen Henson
2009-03-25Update from stable branch.Dr. Stephen Henson
2009-03-15Use correct ctx name.Dr. Stephen Henson
2009-03-15Fix from stable branch.Dr. Stephen Henson
2008-11-21Set memory BIOs up properly when stripping text headers from S/MIME messages.Dr. Stephen Henson
2008-08-05Correctly handle errors in CMS I/O code.Dr. Stephen Henson
2008-04-18Make certs argument work in CMS_sign() add test case.Dr. Stephen Henson
PR:1664
2008-04-11Fix prototype for CMS_decrypt(), don't free up detached content.Dr. Stephen Henson
2008-04-11Revert argument swap change... oops CMS_uncompress() was consistent...Dr. Stephen Henson
2008-04-11Make CMS_uncompress() argument order consistent with other functions.Dr. Stephen Henson
2008-04-11Fix for compression and updated CMS_final().Dr. Stephen Henson
2008-04-10Add additional parameter to CMS_final() to handle detached content.Dr. Stephen Henson
2008-04-10Ignore nonsensical flags for signed receipts.Dr. Stephen Henson
2008-04-07Implement CMS_NOCRL.Dr. Stephen Henson
2008-03-28Signed receipt generation code.Dr. Stephen Henson
2008-03-28Support for verification of signed receipts.Dr. Stephen Henson
2008-03-19Add support for KEK decrypt in cms utility.Dr. Stephen Henson
2008-03-18Various tidies/fixes:Dr. Stephen Henson
Make streaming support in cms cleaner. Note errors in various S/MIME functions if CMS_final() fails. Add streaming support for enveloped data.
2008-03-18More support for KEK RecipientInfo.Dr. Stephen Henson
Generalise RecipientInfo and enveloped data handling so applications can add their own key lookup routines as well as using the standard ones.
2008-03-17Preliminary support for enveloped data content type creation.Dr. Stephen Henson
Fix signed data creation so versions are only corrected if structure is being created.
2008-03-15Initial support for enveloped data decrypt. Extent runex.pl to cover theseDr. Stephen Henson
examples. All RFC4134 examples can not be processed.
2008-03-15Check for cipher BIO errors and set key length after parameter decode.Dr. Stephen Henson
2008-03-15Return error if no cipher set for encrypted data type.Dr. Stephen Henson
Update CHANGES.
2008-03-14Reorganise encrypted content info code to avoid duplication and be moreDr. Stephen Henson
consistent with other content types.
2008-03-14Encrypted Data type processing. Add options to cms utility and run section 7Dr. Stephen Henson
tests in RFC4134.
2008-03-12And so it begins...Dr. Stephen Henson
Initial support for CMS. Add zlib compression BIO. Add AES key wrap implementation. Generalize S/MIME MIME code to support CMS and/or PKCS7.