summaryrefslogtreecommitdiffstats
path: root/crypto/cms
AgeCommit message (Collapse)Author
2016-10-19Fix no-desRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1748)
2016-06-27Change usage of RAND_pseudo_bytes to RAND_bytesMatt Caswell
RAND_pseudo_bytes() allows random data to be returned even in low entropy conditions. Sometimes this is ok. Many times it is not. For the avoidance of any doubt, replace existing usage of RAND_pseudo_bytes() with RAND_bytes(). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-12RT3053: Check for NULL before dereferencingPhillip Hellewell
Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 6b3602882e089aaca18828a72d9f4072e6a20252)
2016-05-06Only set CMS parameter when encryptingDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 708cf5ded249f871fcd5e3de27d9281b1f37ae71)
2016-05-05Always try to set ASN.1 parameters for CMS.Dr. Stephen Henson
Try to set the ASN.1 parameters for CMS encryption even if the IV length is zero as the underlying cipher should still set the type. This will correctly result in errors if an attempt is made to use an unsupported cipher type. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 3fd60dc42288591737a35a90368d72dbd00fdef8) Conflicts: crypto/cms/cms_enc.c
2015-11-09Fix missing malloc return value checksMatt Caswell
During work on a larger change in master a number of locations were identified where return value checks were missing. This backports the relevant fixes. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-15RT4044: Remove .cvsignore files.Rich Salz
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-12Fix memory leak if setup fails.Dr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 891eac4604b5f05413e59602fae1f11136f4719a) Conflicts: crypto/cms/cms_enc.c
2015-08-12Err isn't always malloc failure.Dr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit a187e08d856690b5c1da3184d0ff560d572f893b) Conflicts: crypto/cms/cms_smime.c
2015-06-21RT3917: add cleanup on an error pathRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 7fba8407cc72e09dbd8d768100617286b0740b03)
2015-06-11Fix infinite loop in CMSDr. Stephen Henson
Fix loop in do_free_upto if cmsbio is NULL: this will happen when attempting to verify and a digest is not recognised. Reported by Johannes Bauer. CVE-2015-1792 Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-23Fix the update target and remove duplicate file updatesRichard Levitte
We had updates of certain header files in both Makefile.org and the Makefile in the directory the header file lived in. This is error prone and also sometimes generates slightly different results (usually just a comment that differs) depending on which way the update was done. This removes the file update targets from the top level Makefile, adds an update: target in all Makefiles and has it depend on the depend: or local_depend: targets, whichever is appropriate, so we don't get a double run through the whole file tree. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 0f539dc1a2f45580435c39dada44dd276e79cb88) Conflicts: Makefile.org apps/Makefile test/Makefile
2015-04-16Code style: space after 'if'Viktor Dukhovni
Reviewed-by: Matt Caswell <gitlab@openssl.org>
2015-04-10Fix ECDH key identifier support.Dr. Stephen Henson
PR#3789 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 7a317fa07cf3d9952c574e7d214d371798fee42a)
2015-03-25Fix RAND_(pseudo_)?_bytes returnsMatt Caswell
Ensure all calls to RAND_bytes and RAND_pseudo_bytes have their return value checked correctly Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-05Unchecked malloc fixesMatt Caswell
Miscellaneous unchecked malloc fixes. Also fixed some mem leaks on error paths as I spotted them along the way. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 918bb8652969fd53f0c390c1cd909265ed502c7e) Conflicts: crypto/bio/bss_dgram.c
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-07-10Don't clean up uninitialised EVP_CIPHER_CTX on error (CID 483259).Ben Laurie
(cherry picked from commit c1d1b0114e9d370c30649e46182393dbfc00e20c)
2014-05-29Set version number correctly.Dr. Stephen Henson
PR#3249 (cherry picked from commit 8909bf20269035d295743fca559207ef2eb84eb3)
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 (cherry picked from commit bd43b4cf778a53ffa5d77510ecd408a009dc00d2)
2014-05-06Set Enveloped data version to 2 if ktri version not zero.Dr. Stephen Henson
(cherry picked from commit 546b1b438468e629eea4e836190b1bb056e39286)
2014-02-15Remove duplicate statement.Dr. Stephen Henson
(cherry picked from commit 5a7652c3e585e970e5b778074c92e617e48fde38)
2013-12-01make updateDr. Stephen Henson
2013-11-09Add CMS_SignerInfo_get0_signature function.Dr. Stephen Henson
Add function to retrieve the signature from a CMS_SignerInfo structure: applications can then read or modify it. (cherry picked from commit e8df6cec4c09b9a94c4c07abcf0402d31ec82cc1)
2013-10-01Add KDF for DH.Dr. Stephen Henson
Add X9.42 DH KDF. Move sharedinfo generation code to CMS library as the same structure is used by DH and ECDH. Move ASN1_OBJECT typedef to ossl_typ.h so it can be picked up by dh headers without the need to use ASN1. (cherry picked from commit dc1ce3bc64845d16314af1f11acf5384e4ae9b34)
2013-10-01CMS 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. (cherry picked from commit 17c2764d2e6fc5a010ad3c12662068689ed2ad17)
2013-10-01Set CMS EnvelopedData version correctly.Dr. Stephen Henson
(cherry picked from commit ff7b6ce9db329eb48775bb81e0ecbbd2a9b23c1c)
2013-10-01Initialise CMS signature buffer length properly.Dr. Stephen Henson
(cherry picked from commit e0f7cfda68881da6829ea39430e1a5c28ed05ece)
2013-10-01CMS public key parameter support.Dr. Stephen Henson
Add support for customisation of CMS handling of signed and enveloped data from custom public key parameters. This will provide support for RSA-PSS and RSA-OAEP but could also be applied to other algorithms. (cherry picked from commit e365352d6a6368039392fed14a328f8c0bf955c3)
2013-02-26Add function CMS_RecipientInfo_encryptDr. Stephen Henson
Add CMS_RecipientInfo_encrypt: this function encrypts an existing content encryption key to match the key in the RecipientInfo structure: this is useful if a new recpient is added to and existing enveloped data structure. Add documentation. (cherry picked from commit e1f1d28f34cc5cfc87772e0d8331e00137a4a213)
2013-01-23Don't include comp.h in cmd_cd.c if OPENSSL_NO_COMP setDr. Stephen Henson
2012-06-03Reduce version skew: trivia (I hope).Ben Laurie
2012-05-10Reported by: Solar Designer of OpenwallDr. Stephen Henson
Make sure tkeylen is initialised properly when encrypting CMS messages.
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)
2011-10-19"make update"Bodo Möller
2011-10-10Backport ossl_ssize_t type from HEAD.Dr. Stephen Henson
2011-10-09Backport of password based CMS support from HEAD.Dr. Stephen Henson
2011-09-16make dependDr. Stephen Henson
2011-09-16Improved error checking for DRBG calls.Dr. Stephen Henson
New functionality to allow default DRBG type to be set during compilation or during runtime.
2011-06-03Backport libcrypto audit: check return values of EVP functions insteadDr. Stephen Henson
of assuming they will always suceed.
2010-06-01Fix CVE-2010-1633 and CVE-2010-0742.Dr. Stephen Henson
2010-02-02tolerate broken CMS/PKCS7 implementations using signature OID instead of digestDr. Stephen Henson
2009-09-30PR: 2058Dr. Stephen Henson
Submitted by: Julia Lawall <julia@diku.dk> Approved by: steve@openssl.org Correct EVP_DigestVerifyFinal error handling.
2009-09-13Submitted by: Julia Lawall <julia@diku.dk>Dr. Stephen Henson
The functions ENGINE_ctrl(), OPENSSL_isservice(), EVP_PKEY_sign(), CMS_get1_RecipientRequest() and RAND_bytes() can return <=0 on error fix so the return code is checked correctly.
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-05-02New function CMS_add1_crl().Dr. Stephen Henson