error message outputs hash size differences
authorAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 12 Sep 2007 08:02:41 +0000 (08:02 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 12 Sep 2007 08:02:41 +0000 (08:02 -0000)
src/libstrongswan/crypto/rsa/rsa_public_key.c

index 5069632..a1b2a91 100644 (file)
@@ -206,7 +206,7 @@ static status_t verify_emsa_pkcs1_signature(const private_rsa_public_key_t *this
                chunk_t object;
                u_int level;
                int objectID = 0;
-               hash_algorithm_t hash_algorithm;
+               hash_algorithm_t hash_algorithm = HASH_UNKNOWN;
 
                asn1_init(&ctx, em, 0, FALSE, FALSE);
 
@@ -246,7 +246,8 @@ static status_t verify_emsa_pkcs1_signature(const private_rsa_public_key_t *this
 
                                                if (object.len != hasher->get_hash_size(hasher))
                                                {
-                                                       DBG1("wrong hash size in signature");
+                                                       DBG1("hash size in signature is %u bytes instead of %u bytes",
+                                                                object.len, hasher->get_hash_size(hasher));
                                                        hasher->destroy(hasher);
                                                        goto end;
                                                }