summaryrefslogtreecommitdiffstats
path: root/crypto/x509
AgeCommit message (Collapse)Author
2015-01-05Constify ASN1_TYPE_cmp add X509_ALGOR_cmp.Dr. Stephen Henson
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 4c52816d35681c0533c25fdd3abb4b7c6962302d)
2015-01-05Fix various certificate fingerprint issues.Dr. Stephen Henson
By using non-DER or invalid encodings outside the signed portion of a certificate the fingerprint can be changed without breaking the signature. Although no details of the signed portion of the certificate can be changed this can cause problems with some applications: e.g. those using the certificate fingerprint for blacklists. 1. Reject signatures with non zero unused bits. If the BIT STRING containing the signature has non zero unused bits reject the signature. All current signature algorithms require zero unused bits. 2. Check certificate algorithm consistency. Check the AlgorithmIdentifier inside TBS matches the one in the certificate signature. NB: this will result in signature failure errors for some broken certificates. 3. Check DSA/ECDSA signatures use DER. Reencode DSA/ECDSA signatures and compare with the original received signature. Return an error if there is a mismatch. This will reject various cases including garbage after signature (thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS program for discovering this case) and use of BER or invalid ASN.1 INTEGERs (negative or with leading zeroes). CVE-2014-8275 Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 684400ce192dac51df3d3e92b61830a6ef90be3e)
2014-12-12Fix use of NULL memory pointer in X509_VERIFY_PARAM_new in the event of aMatt Caswell
malloc failure. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2014-02-24x509/by_dir.c: fix run-away pointer (and potential SEGV)Andy Polyakov
when adding duplicates in add_cert_dir. PR: 3261 Reported by: Marian Done (cherry picked from commit 758954e0d8232d370ed72b7f86640e40443e1778)
2014-01-09Fix bug in X509_V_FLAG_IGNORE_CRITICAL CRL handling.Dr. Stephen Henson
(cherry picked from commit 8f4077ca69076cebaca51b7b666db1ed49e46b9e)
2014-01-06make updateDr. Stephen Henson
2013-12-08make updateDr. Stephen Henson
2013-08-06Fix verify loop with CRL checking.Dr. Stephen Henson
PR #3090 Reported by: Franck Youssef <fry@open.ch> If no new reason codes are obtained after checking a CRL exit with an error to avoid repeatedly checking the same CRL. This will only happen if verify errors such as invalid CRL scope are overridden in a callback. (cherry picked from commit 4b26645c1a71cf9ce489e4f79fc836760b670ffe)
2013-05-03Reencode with X509_CRL_ctx_sign too.Dr. Stephen Henson
(cherry picked from commit 96940f4f2d0300c033379a87db0ff19e598c6264)
2013-05-02Reencode certificates in X509_sign_ctx.Dr. Stephen Henson
Reencode certificates in X509_sign_ctx as well as X509_sign. This was causing a problem in the x509 application when it modified an existing certificate. (cherry picked from commit c6d8adb8a45186617e0a8e2c09469bd164b92b31)
2012-12-06Fix two bugs which affect delta CRL handling:Dr. Stephen Henson
Use -1 to check all extensions in CRLs. Always set flag for freshest CRL.
2012-06-08Reduce version skew.Ben Laurie
2012-04-16Minor compatibility fixes [from HEAD].Andy Polyakov
PR: 2790 Submitted by: Alexei Khlebnikov
2011-10-09Backport PSS signature support from HEAD.Dr. Stephen Henson
2011-10-09Backport of password based CMS support from HEAD.Dr. Stephen Henson
2011-10-06? crypto/aes/aes-armv4.SDr. Stephen Henson
? crypto/aes/aesni-sha1-x86_64.s ? crypto/aes/aesni-x86_64.s ? crypto/aes/foo.pl ? crypto/aes/vpaes-x86_64.s ? crypto/bn/.bn_lib.c.swp ? crypto/bn/armv4-gf2m.S ? crypto/bn/diffs ? crypto/bn/modexp512-x86_64.s ? crypto/bn/x86_64-gf2m.s ? crypto/bn/x86_64-mont5.s ? crypto/ec/bc.txt ? crypto/ec/diffs ? crypto/modes/a.out ? crypto/modes/diffs ? crypto/modes/ghash-armv4.S ? crypto/modes/ghash-x86_64.s ? crypto/modes/op.h ? crypto/modes/tst.c ? crypto/modes/x.h ? crypto/objects/.obj_xref.txt.swp ? crypto/rand/diffs ? crypto/sha/sha-512 ? crypto/sha/sha1-armv4-large.S ? crypto/sha/sha256-armv4.S ? crypto/sha/sha512-armv4.S Index: crypto/objects/obj_xref.c =================================================================== RCS file: /v/openssl/cvs/openssl/crypto/objects/obj_xref.c,v retrieving revision 1.9 diff -u -r1.9 obj_xref.c --- crypto/objects/obj_xref.c 5 Nov 2008 18:38:58 -0000 1.9 +++ crypto/objects/obj_xref.c 6 Oct 2011 20:30:21 -0000 @@ -110,8 +110,10 @@ #endif if (rv == NULL) return 0; - *pdig_nid = rv->hash_id; - *ppkey_nid = rv->pkey_id; + if (pdig_nid) + *pdig_nid = rv->hash_id; + if (ppkey_nid) + *ppkey_nid = rv->pkey_id; return 1; } @@ -144,7 +146,8 @@ #endif if (rv == NULL) return 0; - *psignid = (*rv)->sign_id; + if (psignid) + *psignid = (*rv)->sign_id; return 1; } Index: crypto/x509/x509type.c =================================================================== RCS file: /v/openssl/cvs/openssl/crypto/x509/x509type.c,v retrieving revision 1.10 diff -u -r1.10 x509type.c --- crypto/x509/x509type.c 26 Oct 2007 12:06:33 -0000 1.10 +++ crypto/x509/x509type.c 6 Oct 2011 20:36:04 -0000 @@ -100,20 +100,26 @@ break; } - i=X509_get_signature_type(x); - switch (i) + i=OBJ_obj2nid(x->sig_alg->algorithm); + if (i && OBJ_find_sigid_algs(i, NULL, &i)) { - case EVP_PKEY_RSA: - ret|=EVP_PKS_RSA; - break; - case EVP_PKEY_DSA: - ret|=EVP_PKS_DSA; - break; - case EVP_PKEY_EC: - ret|=EVP_PKS_EC; - break; - default: - break; + + switch (i) + { + case NID_rsaEncryption: + case NID_rsa: + ret|=EVP_PKS_RSA; + break; + case NID_dsa: + case NID_dsa_2: + ret|=EVP_PKS_DSA; + break; + case NID_X9_62_id_ecPublicKey: + ret|=EVP_PKS_EC; + break; + default: + break; + } } if (EVP_PKEY_size(pk) <= 1024/8)/* /8 because it's 1024 bits we look
2011-09-23PR: 2606Dr. Stephen Henson
Submitted by: Christoph Viethen <cv@kawo2.rwth-aachen.de> Reviewed by: steve Handle timezones correctly in UTCTime.
2011-09-06Initialise X509_STORE_CTX properly so CRLs with nextUpdate date in the pastDr. Stephen Henson
produce an error (CVE-2011-3207)
2011-06-22allow MD5 use for computing old format hash linksDr. Stephen Henson
2011-06-09Fix warnings.Ben Laurie
2011-06-03Backport libcrypto audit: check return values of EVP functions insteadDr. Stephen Henson
of assuming they will always suceed.
2011-06-03New function X509_ALGOR_set_md() to set X509_ALGOR ↵Dr. Stephen Henson
(DigestAlgorithmIdentifier) from a digest algorithm (backport from HEAD).
2010-11-02Submitted by: Jonathan Dixon <joth@chromium.org>Dr. Stephen Henson
Reviewed by: steve If store is NULL set flags correctly.
2010-10-03Add call to ENGINE_register_all_complete() to ENGINE_load_builtin_engines(),Dr. Stephen Henson
this means that some implementations will be used automatically, e.g. aesni, we do this for cryptodev anyway. Setup cpuid in ENGINE_load_builtin_engines() too as some ENGINEs use it.
2010-02-19Fix X509_STORE lockingBodo Möller
2010-01-22Tolerate PKCS#8 DSA format with negative private key.Dr. Stephen Henson
2010-01-12PR: 2136Dr. Stephen Henson
Submitted by: Willy Weisz <weisz@vcpc.univie.ac.at> Add options to output hash using older algorithm compatible with OpenSSL versions before 1.0.0
2009-12-09PR: 2124Dr. Stephen Henson
Submitted by: Jan Pechanec <Jan.Pechanec@Sun.COM> Check for memory allocation failures.
2009-11-17PR: 2103Dr. Stephen Henson
Submitted by: Rob Austein <sra@hactrn.net> Approved by: steve@openssl.org Initialise atm.flags to 0.
2009-10-31Add missing functions to allow access to newer X509_STORE_CTX statusDr. Stephen Henson
information. Add more informative message to verify callback to indicate when CRL path validation is taking place.
2009-10-23If not checking all certificates don't attempt to find a CRLDr. Stephen Henson
for the leaf certificate of a CRL path.
2009-10-22Need to check <= 0 here.Dr. Stephen Henson
2009-10-18Add new function X509_STORE_set_verify_cb and use it in appsDr. Stephen Henson
2009-09-04Oops, s can be NULLDr. Stephen Henson
2009-09-02PR: 2013Dr. Stephen Henson
Submitted by: steve@openssl.org Include a flag ASN1_STRING_FLAG_MSTRING when a multi string type is created. This makes it possible to tell if the underlying type is UTCTime, GeneralizedTime or Time when the structure is reused and X509_time_adj_ex() can handle each case in an appropriate manner. Add error checking to CRL generation in ca utility when nextUpdate is being set.
2009-06-30Inherit parameters properly in SSL contexts: any parameters set shouldDr. Stephen Henson
replace those in the current list.
2009-06-26Allow checking of self-signed certifictes if a flag is set.Dr. Stephen Henson
2009-06-15Update from 0.9.8-stable.Dr. Stephen Henson
2009-05-30Ensure canonical encodings of X509_NAME structures are valid.Dr. Stephen Henson
2009-04-15PR: 1899Dr. Stephen Henson
Submitted by: Ger Hobbelt <ger@hobbelt.com> Approved by: steve@openssl.org Check for <= 0 when verifying CRL issuers.
2009-04-03Update from 0.9.8-stable.Dr. Stephen Henson
2009-03-15Fix from stable branch.Dr. Stephen Henson
2009-02-16PR: 1778Dr. Stephen Henson
Increase default verify depth to 100.
2009-02-16PR: 1843Dr. Stephen Henson
Use correct array size for SHA1 hash.
2009-01-15Update certificate hash line format to handle canonical formatDr. Stephen Henson
and avoid MD5 dependency.
2008-12-22This _WIN32-specific patch makes it possible to "wrap" OpenSSL in anotherAndy Polyakov
.DLL, in particular static build. The issue has been discussed in RT#1230 and later on openssl-dev, and mutually exclusive approaches were suggested. This completes compromise solution suggested in RT#1230. PR: 1230
2008-11-12Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe
knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
2008-11-05Update obsolete email address...Dr. Stephen Henson
2008-11-01More size_tification.Ben Laurie
2008-10-22Create function of the form OBJ_bsearch_xxx() in bsearch typesafe macrosDr. Stephen Henson
with the appropriate parameters which calls OBJ_bsearch(). A compiler will typically inline this. This avoids the need for cmp_xxx variables and fixes unchecked const issues with CHECKED_PTR_OF()