openssl/crypto/ecdsa
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
..
ecdsa.h Change all instances of OPENSSL_NO_DEPRECATED to OPENSSL_USE_DEPRECATED 2014-12-18 19:57:14 +00:00
ecdsatest.c RT2492: Remove extra NULL check. 2014-08-18 17:41:24 -04:00
ecs_asn1.c hide the definition of ECDSA_METHOD and ECDSA_DATA (and mutatis mutandis 2005-04-29 15:56:06 +00:00
ecs_err.c Add functions to set ECDSA_METHOD structure. 2013-09-18 01:22:50 +01:00
ecs_lib.c Accessor functions for app_data in ECDSA_METHOD 2014-07-01 12:01:51 +01:00
ecs_locl.h Accessor functions for app_data in ECDSA_METHOD 2014-07-01 12:01:51 +01:00
ecs_ossl.c remove OPENSSL_FIPSAPI 2014-12-08 13:25:38 +00:00
ecs_sign.c Make `safe' (EC)DSA nonces the default. 2013-07-15 12:57:48 +01:00
ecs_vrf.c Fix various certificate fingerprint issues. 2015-01-05 14:35:19 +00:00
Makefile Remove fipscanister build functionality from makefiles. 2014-12-08 13:23:45 +00:00