diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-09-06 22:02:15 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-09-06 22:02:38 +0200 |
commit | a92443718f19ffc36fbe55d85a4785130a4b33c7 (patch) | |
tree | 79850bdf3cd559d389b2908d17e0e21bdb893b20 /libtomcrypt/hashes/crypt_hash_is_valid.c | |
parent | e6177630198eb1eea2def0374fae1196da0e40ec (diff) | |
download | cryptodev-linux-a92443718f19ffc36fbe55d85a4785130a4b33c7.tar.gz cryptodev-linux-a92443718f19ffc36fbe55d85a4785130a4b33c7.tar.xz cryptodev-linux-a92443718f19ffc36fbe55d85a4785130a4b33c7.zip |
Algorithm to OID discovery moved to a single place.
Diffstat (limited to 'libtomcrypt/hashes/crypt_hash_is_valid.c')
-rw-r--r-- | libtomcrypt/hashes/crypt_hash_is_valid.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libtomcrypt/hashes/crypt_hash_is_valid.c b/libtomcrypt/hashes/crypt_hash_is_valid.c index 59320a3..4912eb2 100644 --- a/libtomcrypt/hashes/crypt_hash_is_valid.c +++ b/libtomcrypt/hashes/crypt_hash_is_valid.c @@ -9,6 +9,7 @@ * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ #include "tomcrypt.h" +#include <ncr-int.h> /** @file crypt_hash_is_valid.c @@ -22,7 +23,9 @@ */ int hash_is_valid(const struct algo_properties_st *hash) { - return CRYPT_OK; + if (hash->can_digest == 0) return CRYPT_INVALID_ARG; + + return CRYPT_OK; } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_hash_is_valid.c,v $ */ |