openssl/crypto/dsa
Dr. Stephen Henson 684400ce19 Fix various certificate fingerprint issues.
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>
2015-01-05 14:35:19 +00:00
..
dsa.h Change all instances of OPENSSL_NO_DEPRECATED to OPENSSL_USE_DEPRECATED 2014-12-18 19:57:14 +00:00
dsa_ameth.c mark all block comments that need format preserving so that 2014-12-30 22:10:26 +00:00
dsa_asn1.c Fix various certificate fingerprint issues. 2015-01-05 14:35:19 +00:00
dsa_depr.c Implement internally opaque bn access from dsa 2014-12-08 21:40:41 +00:00
dsa_err.c Make `safe' (EC)DSA nonces the default. 2013-07-15 12:57:48 +01:00
dsa_gen.c remove OPENSSL_FIPSAPI 2014-12-08 13:25:38 +00:00
dsa_key.c Implement internally opaque bn access from dsa 2014-12-08 21:40:41 +00:00
dsa_lib.c Add functions returning security bits. 2014-03-28 14:49:04 +00:00
dsa_locl.h Add support for canonical generation of DSA parameter g. 2011-08-26 14:51:49 +00:00
dsa_ossl.c mark all block comments that need format preserving so that 2014-12-30 22:10:26 +00:00
dsa_pmeth.c Implement internally opaque bn access from dsa 2014-12-08 21:40:41 +00:00
dsa_prn.c Update obsolete email address... 2008-11-05 18:39:08 +00:00
dsa_sign.c remove OPENSSL_FIPSAPI 2014-12-08 13:25:38 +00:00
dsa_vrf.c Move DSA_sign, DSA_verify to dsa_asn1.c and include separate versions of 2011-01-25 16:55:15 +00:00
dsagen.c Adjust the parameter lists in some not commonly used files. 2003-01-01 23:41:46 +00:00
dsatest.c Remove redundant OPENSSL_NO_DEPRECATED suppression 2014-12-18 19:57:05 +00:00
fips186a.txt misspellings fixes by https://github.com/vlajos/misspell_fixer 2013-09-05 21:39:42 +01:00
Makefile Remove fipscanister build functionality from makefiles. 2014-12-08 13:23:45 +00:00