summaryrefslogtreecommitdiff
path: root/lib/algorithms
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-08-26 11:37:13 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-08-26 11:37:13 +0200
commit948671e8ab5bbebd22af32d4aa57e792aab63879 (patch)
tree7b87f5af006a2a4eccf8543cfb06c0d0f281a64b /lib/algorithms
parentf7be583b6e236c86f5a642d5b5229d070d8c68f2 (diff)
downloadgnutls-948671e8ab5bbebd22af32d4aa57e792aab63879.tar.gz
gnutls_oid_to_digest(): don't return supported but disabled algorithms
Diffstat (limited to 'lib/algorithms')
-rw-r--r--lib/algorithms/mac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/algorithms/mac.c b/lib/algorithms/mac.c
index 0964b1c6e6..ded8e833d4 100644
--- a/lib/algorithms/mac.c
+++ b/lib/algorithms/mac.c
@@ -288,7 +288,9 @@ gnutls_digest_algorithm_t gnutls_oid_to_digest(const char *oid)
GNUTLS_HASH_LOOP(
if (p->oid && strcmp(oid, p->oid) == 0) {
- ret = (gnutls_digest_algorithm_t) p->id;
+ if (_gnutls_digest_exists((gnutls_digest_algorithm_t)p->id)) {
+ ret = (gnutls_digest_algorithm_t) p->id;
+ }
break;
}
);