summaryrefslogtreecommitdiff
path: root/lib/gnutls_pubkey.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-06-03 14:09:45 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-06-03 14:09:45 +0200
commit16ee4a4a79cd998982e8248fcabaea1d8a5e201e (patch)
tree66e96dd4b0dfdf9222a15e25dc15c8c067c53691 /lib/gnutls_pubkey.c
parent75b493132239e824d671f4b09d1dfd0f7ca6a8b1 (diff)
downloadgnutls-16ee4a4a79cd998982e8248fcabaea1d8a5e201e.tar.gz
Truncation of ECDSA and DSA signatures moved to _wrap_nettle_pk_sign()
and _wrap_nettle_pk_verify().
Diffstat (limited to 'lib/gnutls_pubkey.c')
-rw-r--r--lib/gnutls_pubkey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gnutls_pubkey.c b/lib/gnutls_pubkey.c
index 4400e6fe43..5dddae2b1c 100644
--- a/lib/gnutls_pubkey.c
+++ b/lib/gnutls_pubkey.c
@@ -1219,10 +1219,10 @@ int hash_algo;
}
else if (pubkey->pk_algorithm == GNUTLS_PK_ECC)
{
- hash_algo = _gnutls_dsa_q_to_hash (pubkey->pk_algorithm, &pubkey->params, &hash_size);
-
if (_gnutls_version_has_selectable_sighash (ver) && sign != GNUTLS_SIGN_UNKNOWN)
{
+ hash_algo = _gnutls_dsa_q_to_hash (pubkey->pk_algorithm, &pubkey->params, &hash_size);
+
if (_gnutls_hash_get_algo_len(_gnutls_sign_get_hash_algorithm(sign)) != hash_size)
return GNUTLS_E_UNWANTED_ALGORITHM;
}