aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--checks/pk.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/checks/pk.cpp b/checks/pk.cpp
index ab6fab665..a353f7ca7 100644
--- a/checks/pk.cpp
+++ b/checks/pk.cpp
@@ -543,12 +543,19 @@ u32bit validate_dlies(const std::string& algo,
if(options.size() != 3)
throw Exception("DLIES needs three options: " + opt_str);
- KDF* kdf = get_kdf(options[0]);
MessageAuthenticationCode* mac = get_mac(options[1]);
u32bit mac_key_len = to_u32bit(options[2]);
- PK_Decryptor* d = new DLIES_Decryptor(to, kdf, mac, mac_key_len);
- DLIES_Encryptor* e = new DLIES_Encryptor(from, kdf, mac, mac_key_len);
+ PK_Decryptor* d =
+ new DLIES_Decryptor(to,
+ get_kdf(options[0]),
+ mac->clone(), mac_key_len);
+
+ DLIES_Encryptor* e =
+ new DLIES_Encryptor(from,
+ get_kdf(options[0]),
+ mac, mac_key_len);
+
e->set_other_key(to.public_value());
std::string empty = "";