summaryrefslogtreecommitdiff
path: root/lib/ext_signature.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext_signature.c')
-rw-r--r--lib/ext_signature.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ext_signature.c b/lib/ext_signature.c
index 48eb5358e3..e8d8560d39 100644
--- a/lib/ext_signature.c
+++ b/lib/ext_signature.c
@@ -127,7 +127,7 @@ int
_gnutls_sign_algorithm_parse_data (gnutls_session_t session,
const opaque * data, size_t data_size)
{
- int sig, i;
+ int sig, i, hash;
sig_ext_st *priv;
extension_priv_data_t epriv;
@@ -150,6 +150,10 @@ _gnutls_sign_algorithm_parse_data (gnutls_session_t session,
_gnutls_debug_log ("EXT[SIGA]: rcvd signature algo (%d.%d) %s\n", aid.hash_algorithm,
aid.sign_algorithm, gnutls_sign_get_name(sig));
+ hash = _gnutls_sign_get_hash_algorithm(sig);
+ if (hash != GNUTLS_DIG_SHA1 && hash != GNUTLS_DIG_SHA256)
+ continue;
+
if (sig != GNUTLS_SIGN_UNKNOWN)
{
priv->sign_algorithms[priv->sign_algorithms_size++] = sig;