projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ec5e9a
)
In t_kperf, generate a valid ciphertext when testing decryption
author
Greg Hudson
<ghudson@mit.edu>
Wed, 2 Dec 2009 18:32:03 +0000
(18:32 +0000)
committer
Greg Hudson
<ghudson@mit.edu>
Wed, 2 Dec 2009 18:32:03 +0000
(18:32 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23427
dc483132
-0cff-0310-8789-
dd5450dbe970
src/lib/crypto/crypto_tests/t_kperf.c
patch
|
blob
|
history
diff --git
a/src/lib/crypto/crypto_tests/t_kperf.c
b/src/lib/crypto/crypto_tests/t_kperf.c
index e653996bb172fb4cd5df02015a1fac750267892d..8c36e902f0ac92b09efb60d9ae6cc0475b34af23 100644
(file)
--- a/
src/lib/crypto/crypto_tests/t_kperf.c
+++ b/
src/lib/crypto/crypto_tests/t_kperf.c
@@
-94,6
+94,14
@@
main(int argc, char **argv)
sum.length = cklen;
sum.contents = calloc(1, cklen);
+ /*
+ * Decrypting typically involves copying the output after checking the
+ * hash, so we need to create a valid ciphertext to correctly measure its
+ * performance.
+ */
+ if (op == 'd')
+ krb5_c_encrypt(NULL, &kblock, 0, NULL, &block, &outblock);
+
for (i = 0; i < num_blocks; i++) {
if (intf == 'c') {
if (op == 'e')