summaryrefslogtreecommitdiffstats
path: root/crypto/cms (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-149-9/+9
| | | | | | | | | | | | | 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-1/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* free NULL cleanup -- codaRich Salz2015-05-017-33/+14
| | | | | | | | 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>
* free null cleanup finaleRich Salz2015-05-015-13/+9
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free cleanup almost the finaleRich Salz2015-04-305-33/+11
| | | | | | | | | | 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-304-12/+6
| | | | | | | | | 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 cleanup 8Rich Salz2015-04-304-20/+10
| | | | | | | | | | Do not check for NULL before calling a free routine. This addresses: ASN1_BIT_STRING_free ASN1_GENERALIZEDTIME_free ASN1_INTEGER_free ASN1_OBJECT_free ASN1_OCTET_STRING_free ASN1_PCTX_free ASN1_SCTX_free ASN1_STRING_clear_free ASN1_STRING_free ASN1_TYPE_free ASN1_UTCTIME_free M_ASN1_free_of Reviewed-by: Richard Levitte <levitte@openssl.org>
* Code style: space after 'if'Viktor Dukhovni2015-04-161-1/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix ECDH key identifier support.Dr. Stephen Henson2015-04-101-0/+4
| | | | | | PR#3789 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevantRichard Levitte2015-03-311-17/+1
| | | | | | | | | | | | With no more symlinks, there's no need for those variables, or the links target. This also goes for all install: and uninstall: targets that do nothing but copy $(EXHEADER) files, since that's now taken care of by the top Makefile. Also, removed METHTEST from test/Makefile. It looks like an old test that's forgotten... Reviewed-by: Rich Salz <rsalz@openssl.org>
* Stop symlinking, move files to intended directoryRichard Levitte2015-03-311-556/+0
| | | | | | | | | | | | | Rather than making include/openssl/foo.h a symlink to crypto/foo/foo.h, this change moves the file to include/openssl/foo.h once and for all. Likewise, move crypto/foo/footest.c to test/footest.c, instead of symlinking it there. Originally-by: Geoff Thorpe <geoff@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove duplicate code.Dr. Stephen Henson2015-03-301-7/+3
| | | | | | | Update code to use ASN1_TYPE_pack_sequence and ASN1_TYPE_unpack_sequence instead of performing the same operation manually. Reviewed-by: Rich Salz <rsalz@openssl.org>
* free NULL cleanupRich Salz2015-03-284-27/+14
| | | | | | | | | 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-253-9/+5
| | | | | | | 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-253-6/+6
| | | | | | | Ensure RAND_bytes return value is checked correctly, and that we no longer use RAND_pseudo_bytes. Reviewed-by: Richard Levitte <levitte@openssl.org>
* make dependDr. Stephen Henson2015-03-241-7/+7
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Move some ASN.1 internals to asn1_int.hDr. Stephen Henson2015-03-245-5/+5
| | | | | | | | 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>
* Unchecked malloc fixesMatt Caswell2015-03-051-0/+2
| | | | | | | 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>
* clang on Linux x86_64 complains about unreachable code.Richard Levitte2015-01-291-2/+0
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-2216-5736/+5397
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* make updateMatt Caswell2014-12-121-45/+45
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Include <openssl/foo.h> instead of "foo.h"Geoff Thorpe2014-12-084-4/+4
| | | | | | | | | | | | Exported headers shouldn't be included as "foo.h" by code from the same module, it should only do so for module-internal headers. This is because the symlinking of exported headers (from include/openssl/foo.h to crypto/foo/foo.h) is being removed, and the exported headers are being moved to the include/openssl/ directory instead. Change-Id: I4c1d80849544713308ddc6999a549848afc25f94 Signed-off-by: Geoff Thorpe <geoff@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove fipscanister build functionality from makefiles.Dr. Stephen Henson2014-12-081-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Remove all .cvsignore filesRich Salz2014-11-291-4/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* cms_SignerInfo_content_sign: free sig on failure pathJonas Maebe2014-08-151-0/+3
| | | | | Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Don't clean up uninitialised EVP_CIPHER_CTX on error (CID 483259).Ben Laurie2014-07-101-1/+2
|
* Set version number correctly.Dr. Stephen Henson2014-05-291-2/+2
| | | | PR#3249
* Return an error if no recipient type matches.Dr. Stephen Henson2014-05-091-2/+3
| | | | | | | | 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
* Set Enveloped data version to 2 if ktri version not zero.Dr. Stephen Henson2014-05-061-1/+1
|
* make dependDr. Stephen Henson2014-02-191-13/+32
|
* Remove duplicate statement.Dr. Stephen Henson2014-02-151-2/+0
|
* Add suppot for ASCII with CRLF canonicalisation.Dr. Stephen Henson2014-02-132-0/+9
|
* Canonicalise input in CMS_verify.Dr. Stephen Henson2013-12-221-21/+73
| | | | | | 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.
* Add CMS_SignerInfo_get0_signature function.Dr. Stephen Henson2013-11-092-0/+6
| | | | | Add function to retrieve the signature from a CMS_SignerInfo structure: applications can then read or modify it.
* Add KDF for DH.Dr. Stephen Henson2013-08-052-0/+46
| | | | | | | | 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.
* CMS support for key agreeement recipient info.Dr. Stephen Henson2013-07-1710-93/+801
| | | | | Add hooks to support key agreement recipient info type (KARI) using algorithm specific code in the relevant public key ASN1 method.
* Set CMS EnvelopedData version correctly.Dr. Stephen Henson2013-07-171-0/+73
|
* Initialise CMS signature buffer length properly.Dr. Stephen Henson2013-07-021-1/+2
|
* CMS public key parameter support.Dr. Stephen Henson2013-06-216-75/+212
| | | | | | | | 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.
* Add function CMS_RecipientInfo_encryptDr. Stephen Henson2013-02-263-24/+28
| | | | | | | | 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.
* Don't include comp.h in cmd_cd.c if OPENSSL_NO_COMP setDr. Stephen Henson2013-01-231-0/+2
|
* Fix warning.Ben Laurie2012-05-101-1/+1
|
* Reported by: Solar Designer of OpenwallDr. Stephen Henson2012-05-101-2/+2
| | | | Make sure tkeylen is initialised properly when encrypting CMS messages.
* Fix for CMS/PKCS7 MMA. If RSA decryption fails use a random key andDr. Stephen Henson2012-03-125-20/+92
| | | | | | | | 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 some warnings caused by __owur. Temporarily (I hope) remove the moreBen Laurie2011-11-141-9/+11
| | | | aspirational __owur annotations.
* Change AR to ARX to allow exclusion of fips object modulesDr. Stephen Henson2011-01-261-1/+1
|
* Add new type ossl_ssize_t instead of ssize_t and move definitions toDr. Stephen Henson2010-07-263-6/+9
| | | | | e_os2.h, this should fix WIN32 compilation issues and hopefully avoid conflicts with other headers which may workaround ssize_t in different ways.
* add CVE-2010-0742 and CVS-2010-1633 fixesDr. Stephen Henson2010-06-011-2/+2
|
* update cms code to use X509_ALGOR_set_md instead of internal functionDr. Stephen Henson2010-03-114-19/+3
|
* tolerate broken CMS/PKCS7 implementations using signature OID instead of digestDr. Stephen Henson2010-02-021-1/+5
|