]> www.average.org Git - pam_pcsc_cr.git/blobdiff - tom_crypto.c
wip on crypto
[pam_pcsc_cr.git] / tom_crypto.c
index 97a18e19fafcab5169b3963a7310a1befccd3388..d77433384a34515ca92b1a2aa9369a2ed36af09c 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 #include <tomcrypt.h>
 
 #include "crypto_if.h"
@@ -50,7 +53,6 @@ static unsigned long tom_hmac(void *key, int keylen,
        int index, rc;
        unsigned long ltaglen = *taglen;
 
-       if (keylen != 20) return CRYPT_INVALID_KEYSIZE;
        if ((index = register_hash(&sha1_desc)) == -1)
                return CRYPT_INVALID_HASH;
        rc = hmac_memory(index, key, keylen, pt, tlen, tag, &ltaglen);