From d398d367c1e2b6fe9534f42769cc6e05cd4ceafe Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 27 Jan 2015 17:38:26 +0000 Subject: [PATCH] Allow a previously yubikey protected database to be saved without the yubikey challenge-response code. --- src/keys/CompositeKey.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/keys/CompositeKey.cpp b/src/keys/CompositeKey.cpp index ed64b8ef4..d2334e3c2 100644 --- a/src/keys/CompositeKey.cpp +++ b/src/keys/CompositeKey.cpp @@ -43,7 +43,9 @@ CompositeKey::~CompositeKey() void CompositeKey::clear() { qDeleteAll(m_keys); + qDeleteAll(m_challengeResponseKeys); m_keys.clear(); + m_challengeResponseKeys.clear(); } bool CompositeKey::isEmpty() const @@ -152,6 +154,7 @@ bool CompositeKey::challenge(const QByteArray& seed, QByteArray& result) const * maintain backwards compatability with regular databases. */ if (m_challengeResponseKeys.length() == 0) { + result.clear(); return true; }