Skip to content

Commit

Permalink
- opmsg: dont generate Kex keys in null crypto/signing case
Browse files Browse the repository at this point in the history
  • Loading branch information
stealth committed May 25, 2017
1 parent 6833287 commit feb5317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/opmsg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ int do_encrypt(const string &dst_id, const string &s, int may_append)

// Add new (EC)DH keys for upcoming Kex in future
vector<string> newdh;
for (int i = 0; src_p->can_kex_gen() && i < config::new_dh_keys; ++i) {
for (int i = 0; config::calgo != "null" && src_p->can_kex_gen() && i < config::new_dh_keys; ++i) {
vector<PKEYbox *> vpbox = src_p->gen_kex_key(config::khash, dst_p->get_id());
if (vpbox.size() > 0) {
newdh.push_back(vpbox[0]->hex);
Expand Down

0 comments on commit feb5317

Please sign in to comment.