Emilia Kasper
c0334c2c92
PKCS#7: avoid NULL pointer dereferences with missing content
...
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-19 12:58:35 +00:00
Matt Caswell
ae5c8664e5
Run util/openssl-format-source -v -c .
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:31:38 +00:00
Dr. Stephen Henson
e97359435e
Fix warnings (From HEAD, original patch by Ben).
2010-06-15 17:25:15 +00:00
Dr. Stephen Henson
6217896145
Improve error detection when streaming S/MIME.
...
Only use streaming when appropriate for detached data in smime utility.
2007-05-10 17:37:15 +00:00
Bodo Möller
a291745eeb
fix function codes for error
2007-04-24 01:06:19 +00:00
Nils Larsch
689f9faba4
fix potential memory leaks
...
PR: 1462
2007-02-03 09:55:42 +00:00
Dr. Stephen Henson
11d8cdc6ad
Experimental streaming PKCS#7 support.
...
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.
2006-12-24 16:22:56 +00:00
Dr. Stephen Henson
0e3453536e
Fix warnings.
2006-05-24 13:29:32 +00:00
Dr. Stephen Henson
3d47929968
Update S/MIME code to use default digest.
2006-05-07 17:22:58 +00:00
Dr. Stephen Henson
a78568b7e9
Replace RSA specific PKCS7_RECIP_INFO set up with an public key algorithm
...
ctrl.
2006-04-27 18:20:34 +00:00
Dr. Stephen Henson
ee5b2a1e51
Code tidy.
2006-04-27 00:42:51 +00:00
Dr. Stephen Henson
e4b21c74fc
New function to extract AlgorithmIdentifier for PKCS7_RECIP_INFO.
2006-04-27 00:29:50 +00:00
Dr. Stephen Henson
4edcb93dca
Don't free up parameter. The public key ASN1 method can do that if it needs
...
to.
2006-04-27 00:20:43 +00:00
Dr. Stephen Henson
492a9e2415
Allow public key ASN1 methods to set PKCS#7 SignerInfo structures.
2006-04-17 17:12:23 +00:00
Dr. Stephen Henson
7bdf8eed69
Typo
2005-04-01 21:56:15 +00:00
Dr. Stephen Henson
a0e7c8eede
Add lots of checks for memory allocation failure, error codes to indicate
...
failure and freeing up memory if a failure occurs.
PR:620
2004-12-05 01:03:15 +00:00
Dr. Stephen Henson
c5a5546389
Add support for digested data PKCS#7 type.
2003-10-11 22:11:45 +00:00
Dr. Stephen Henson
8d9086dfa2
New function to initialize a PKCS7 structure of type other.
2003-10-10 23:40:47 +00:00
Dr. Stephen Henson
0602abf5bd
Initialize digested data type in PKCS7_set_type().
2003-10-10 23:31:53 +00:00
Dr. Stephen Henson
48921e00fc
Really fix PKCS7_set_detached this time...
2002-09-08 16:25:03 +00:00
Dr. Stephen Henson
f804930150
Fix typos in PKCS#12 ASN1 code.
...
Make PKCS7_set_detached work again.
2002-09-07 22:57:49 +00:00
Bodo Möller
5488bb6197
get rid of EVP_PKEY_ECDSA (now we have EVP_PKEY_EC instead)
...
Submitted by: Nils Larsch
2002-08-12 08:47:41 +00:00
Bodo Möller
279fe3b1c5
in SignerInfo, use ecdsa-with-SHA1 OID for ECDSA (not ecPublicKey)
...
Submitted by: Nils Larsch
2002-05-07 15:14:12 +00:00
Bodo Möller
4d94ae00d5
ECDSA support
...
Submitted by: Nils Larsch <nla@trustcenter.de>
2002-02-13 18:21:51 +00:00
Dr. Stephen Henson
1358835050
Change the EVP_somecipher() and EVP_somedigest()
...
functions to return constant EVP_MD and EVP_CIPHER
pointers.
Update docs.
2001-03-09 02:51:02 +00:00
Dr. Stephen Henson
a43cf9fae9
Add debugging info to new ASN1 code to trace memory leaks.
...
Fix PKCS7 and PKCS12 memory leaks.
Initialise encapsulated content type properly.
2001-01-24 18:39:54 +00:00
Dr. Stephen Henson
78d3b819f0
Replace the old ASN1_dup() with ASN1_item_dup() and
...
zap some evil function pointers casts along the way...
2000-12-29 18:23:55 +00:00
Dr. Stephen Henson
9d6b1ce644
Merge from the ASN1 branch of new ASN1 code
...
to main trunk.
Lets see if the makes it to openssl-cvs :-)
2000-12-08 19:09:35 +00:00
Dr. Stephen Henson
4b42658082
Make pkcs8 work again.
...
Make EVP_CIPHER_type() return NID_undef if the cipher has no
ASN1 OID, modify code to handle this.
2000-02-22 18:45:11 +00:00
Dr. Stephen Henson
f45f40ffff
Add OIDs for idea and blowfish. Unfortunately these are in
...
the middle of the OID table so the diff is rather large :-(
1999-12-29 02:59:18 +00:00
Dr. Stephen Henson
55f30198ad
Various S/MIME fixes. Fix for memory leak, recipient list bug
...
and not excluding parameters with DSA keys.
1999-12-14 02:44:27 +00:00
Dr. Stephen Henson
b216664f66
Various S/MIME fixes.
1999-12-11 20:04:06 +00:00
Dr. Stephen Henson
d8223efd04
Fix for crashing INTEGERs, ENUMERATEDs and OBJECT IDENTIFIERs.
...
Also fix a memory leak in PKCS#7 routines.
1999-12-10 13:46:48 +00:00
Dr. Stephen Henson
08e9c1af6c
Replace the macros in asn1.h with function equivalents. Also make UTF8Strings
...
tolerated in certificates.
1999-10-20 01:50:23 +00:00
Dr. Stephen Henson
c6c3450643
Fix PKCS7_ENC_CONTENT_new() to include a sensible default content type and add
...
support for encrypted content type in PKCS7_set_content().
1999-08-17 12:58:01 +00:00
Ben Laurie
8f0edcd142
stack.
1999-06-02 21:13:45 +00:00
Ben Laurie
b05b50e67b
Stack.
1999-06-02 17:11:53 +00:00
Ben Laurie
6d114240b9
stack.
1999-05-31 21:00:25 +00:00
Ben Laurie
426edadf98
Stack.
1999-05-31 20:35:31 +00:00
Dr. Stephen Henson
84fa704c6f
Fix some obvious bugs in the PKCS#7 library handling. It didn't try to
...
find the right RecipientInfo based on the recipient certificate (so would
fail a lot of the time) and fixup cipher structures to correctly (maybe)
modify the AlgorithmIdentifiers. Largely untested at present... this will be
fixed in due course. Well the stuff was broken to begin with so if its broken
now then you haven't lost anything :-)
1999-05-16 00:25:36 +00:00
Dr. Stephen Henson
10243d97fd
Various PKCS#7 related fixes,tidies and comments.
1999-05-11 00:52:46 +00:00
Dr. Stephen Henson
884e8ec615
Various PKCS#7 fixes to properly (maybe!) handle PKCS#7 enveloped data.
...
Containts elements of code by Sebastian Akerman <sak@parallelconsulting.com>
and made a bit less "naughty" by Steve.
1999-05-10 00:47:42 +00:00
Dr. Stephen Henson
c8b4185079
Kill evil casts, fix PKCS#7 and add new X509V3 Function.
1999-05-09 16:39:11 +00:00
Bodo Möller
ec577822f9
Change #include filenames from <foo.h> to <openssl.h>.
...
Submitted by:
Reviewed by:
PR:
1999-04-23 22:13:45 +00:00
Ulf Möller
6b691a5c85
Change functions to ANSI C.
1999-04-19 21:31:43 +00:00
Ben Laurie
f73e07cf42
Add type-safe STACKs and SETs.
1999-04-12 17:23:57 +00:00
Ralf S. Engelschall
dfeab0689f
Import of old SSLeay release: SSLeay 0.9.1b (unreleased)
1998-12-21 11:00:56 +00:00
Ralf S. Engelschall
58964a4922
Import of old SSLeay release: SSLeay 0.9.0b
1998-12-21 10:56:39 +00:00
Ralf S. Engelschall
d02b48c63a
Import of old SSLeay release: SSLeay 0.8.1b
1998-12-21 10:52:47 +00:00