diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-08-26 11:37:13 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-08-26 11:37:13 +0200 |
commit | 948671e8ab5bbebd22af32d4aa57e792aab63879 (patch) | |
tree | 7b87f5af006a2a4eccf8543cfb06c0d0f281a64b /lib | |
parent | f7be583b6e236c86f5a642d5b5229d070d8c68f2 (diff) | |
download | gnutls-948671e8ab5bbebd22af32d4aa57e792aab63879.tar.gz |
gnutls_oid_to_digest(): don't return supported but disabled algorithms
Diffstat (limited to 'lib')
-rw-r--r-- | lib/algorithms/mac.c | 4 |
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; } ); |