aboutsummaryrefslogtreecommitdiff
path: root/src/lib/crypto/crypto_tests/t_hmac.c
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-10-19 20:04:21 +0000
committerGreg Hudson <ghudson@mit.edu>2009-10-19 20:04:21 +0000
commite6b93b7dd43bb765900b2db71641479b597844da (patch)
tree2b6da09e37da6ca699a8cb43c87e8a4218132254 /src/lib/crypto/crypto_tests/t_hmac.c
parent04a5d19e61bedbb1da4db52334c00f7a54a9d5a8 (diff)
downloadkrb5-e6b93b7dd43bb765900b2db71641479b597844da.zip
krb5-e6b93b7dd43bb765900b2db71641479b597844da.tar.gz
krb5-e6b93b7dd43bb765900b2db71641479b597844da.tar.bz2
Implement new APIs to allow improved crypto performance
Merge branches/enc-perf to trunk. Adds the krb5_key opaque type, the krb5_k_* APIs to use them, and caching of derived keys when krb5_k_* functions are used. Updates the krb5 auth context and GSS id-rec to use krb5_keys. ticket: 6576 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22944 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/crypto_tests/t_hmac.c')
-rw-r--r--src/lib/crypto/crypto_tests/t_hmac.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/crypto/crypto_tests/t_hmac.c b/src/lib/crypto/crypto_tests/t_hmac.c
index bf629c3..30830d6 100644
--- a/src/lib/crypto/crypto_tests/t_hmac.c
+++ b/src/lib/crypto/crypto_tests/t_hmac.c
@@ -98,6 +98,7 @@ static krb5_error_code hmac1(const struct krb5_hash_provider *h,
char tmp[40];
size_t blocksize, hashsize;
krb5_error_code err;
+ krb5_key k;
printk(" test key", key);
blocksize = h->blocksize;
@@ -120,7 +121,9 @@ static krb5_error_code hmac1(const struct krb5_hash_provider *h,
printk(" pre-hashed key", key);
}
printd(" hmac input", in);
- err = krb5_hmac(h, key, 1, in, out);
+ krb5_k_create_key(NULL, key, &k);
+ err = krb5_hmac(h, k, 1, in, out);
+ krb5_k_free_key(NULL, k);
if (err == 0)
printd(" hmac output", out);
return err;