aboutsummaryrefslogtreecommitdiff
path: root/crypto/pkcs7
AgeCommit message (Collapse)AuthorFilesLines
2016-02-23Add PKCS7_NO_DUAL_CONTENT flagRich Salz1-4/+12
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-02-20Always build library object files with shared library cflagsRichard Levitte1-1/+1
This takes us away from the idea that we know exactly how our static libraries are going to get used. Instead, we make them available to build shareable things with, be it other shared libraries or DSOs. On the other hand, we also have greater control of when the shared library cflags. They will never be used with object files meant got binaries, such as apps/openssl or test/test*. With unified, we take this a bit further and prepare for having to deal with extra cflags specifically to be used with DSOs (dynamic engines), libraries and binaries (applications). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18Remove all special make depend flags, as well as OPENSSL_DOING_MAKEDEPENDRichard Levitte1-1/+1
All those flags existed because we had all the dependencies versioned in the repository, and wanted to have it be consistent, no matter what the local configuration was. Now that the dependencies are gone from the versioned Makefile.ins, it makes much more sense to use the exact same flags as when compiling the object files. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-06Enhance and clear the support of linker flagsRichard Levitte1-1/+1
Some time ago, we had a ex_libs configuration setting that could be divided into lflags and ex_libs. These got divided in two settings, lflags and ex_libs, and the former was interpreted to be general linking flags. Unfortunately, that conclusion wasn't entirely accurate. Most of those linking were meant to end up in a very precise position on the linking command line, just before the spec of libraries the linking depends on. Back to the drawing board, we're diving things further, now having lflags, which are linking flags that aren't depending on command line position, plib_lflags, which are linking flags that should show up just before the spec of libraries to depend on, and finally ex_libs, which is the spec of extra libraries to depend on. Also, documentation is changed in Configurations/README. This was previously forgotten. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-01unified build scheme: add build.info filesRichard Levitte1-0/+4
Now that we have the foundation for the "unified" build scheme in place, we add build.info files. They have been generated from the Makefiles in the same directories. Things that are platform specific will appear in later commits. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-01-29Templatize util/domdRich Salz1-2/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-29Configure et al: split up the lflags configuration item into twoRichard Levitte1-1/+1
The lflags configuration had a weird syntax with a % as separator. If it was present, whatever came before ended up as PEX_LIBS in Makefile (usually, this is LDFLAGS), while whatever came after ended up as EX_LIBS. This change splits that item into lflags and ex_libs, making their use more explicit. Also, PEX_LIBS in all the Makefiles are renamed to LDFLAGS. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz10-10/+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>
2016-01-20Remove update tagsRich Salz1-2/+0
Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20make EVP_PKEY opaqueDr. Stephen Henson1-1/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17Remove some old makefile targetsRich Salz1-12/+0
Remove lint, tags, dclean, tests. This is prep for a new makedepend scheme. This is temporary pending unified makefile, and might help it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12Move Makefiles to Makefile.inRich Salz2-176/+68
Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12make updateRichard Levitte1-67/+80
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-31Use X509_get0_pubkey where appropriateDr. Stephen Henson2-8/+3
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-09make updateDr. Stephen Henson1-9/+3
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-07Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy)Richard Levitte1-7/+7
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-07Adjust all accesses to EVP_MD_CTX to use accessor functions.Richard Levitte1-22/+36
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell2-8/+10
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-05Rebuild error source files.Dr. Stephen Henson1-19/+13
Rebuild error source files: the new mkerr.pl functionality will now pick up and translate static function names properly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-23Remove useless codeAlessandro Ghedini1-1/+0
RT#4081 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-30Add GOST12 cms/smime capabilitiesMatt Caswell1-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>
2015-09-06Remove warning about use of uninitialised variableRichard Levitte1-2/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-06Avoid direct X509 structure accessDr. Stephen Henson1-3/+3
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-05RT3955: Reduce some stack usageRich Salz1-20/+34
Use malloc/free instead of big onstack buffers. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-31Add X509_up_ref function.Dr. Stephen Henson1-2/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-31Add X509_CRL_up_ref functionDr. Stephen Henson1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-28GH354: Memory leak fixesAlessandro Ghedini1-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>
2015-06-11PKCS#7: Fix NULL dereference with missing EncryptedContent.Emilia Kasper1-1/+15
CVE-2015-1790 Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-22Fix the update target and remove duplicate file updatesRichard Levitte1-0/+2
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>
2015-05-14make dependRichard Levitte1-5/+8
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte7-7/+7
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 Salz4-24/+24
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-01free null cleanup finaleRich Salz1-5/+3
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-30free cleanup almost the finaleRich Salz1-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>
2015-04-30free NULL cleanup 5aRich Salz2-6/+3
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-04-11free NULL cleanup 9Rich Salz1-10/+5
Ongoing work to skip NULL check before calling free routine. This gets: ecp_nistz256_pre_comp_free nistp224_pre_comp_free nistp256_pre_comp_free nistp521_pre_comp_free PKCS7_free PKCS7_RECIP_INFO_free PKCS7_SIGNER_INFO_free sk_PKCS7_pop_free PKCS8_PRIV_KEY_INFO_free PKCS12_free PKCS12_SAFEBAG_free PKCS12_free sk_PKCS12_SAFEBAG_pop_free SSL_CONF_CTX_free SSL_CTX_free SSL_SESSION_free SSL_free ssl_cert_free ssl_sess_cert_free Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-03-31Remove EXHEADER, TEST, APPS, links:, install: and uninstall: where relevantRichard Levitte1-18/+2
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>
2015-03-31Stop symlinking, move files to intended directoryRichard Levitte1-480/+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>
2015-03-28free NULL cleanupRich Salz2-10/+6
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>
2015-03-25free NULL cleanupRich Salz1-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>
2015-03-25RAND_bytes updatesMatt Caswell1-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>
2015-03-24make dependDr. Stephen Henson1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-24Move some ASN.1 internals to asn1_int.hDr. Stephen Henson1-1/+1
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-03-23Remove old ASN.1 code.Dr. Stephen Henson2-13/+13
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>
2015-03-19PKCS#7: avoid NULL pointer dereferences with missing contentEmilia Kasper2-14/+76
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>
2015-03-16Make X509_ATTRIBUTE opaque.Dr. Stephen Henson1-17/+5
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-12Remove obsolete declarations.Dr. Stephen Henson1-4/+0
Remove DECLARE_ASN1_SET_OF and DECLARE_PKCS12_STACK_OF these haven't been used internally in OpenSSL for some time. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-01-30Dead code removal: #if 0 asn1, pkcs7Rich Salz2-39/+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>
2015-01-23ifdef cleanup part 3: OPENSSL_SYSNAMERich Salz1-1/+1
Rename OPENSSL_SYSNAME_xxx to OPENSSL_SYS_xxx Remove MS_STATIC; it's a relic from platforms <32 bits. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell11-2901/+2781
Reviewed-by: Tim Hudson <tjh@openssl.org>