summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/crypto/crypto_tests/t_kperf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/crypto/crypto_tests/t_kperf.c b/src/lib/crypto/crypto_tests/t_kperf.c
index e653996bb..8c36e902f 100644
--- 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')