# # # patch "key_store.cc" # from [d3ba874f95eaeee966f57e37205c67718e20bc76] # to [6ea38c00f7da18dd8136f0a4080b2fb7a8cbedba] # ============================================================ --- key_store.cc d3ba874f95eaeee966f57e37205c67718e20bc76 +++ key_store.cc 6ea38c00f7da18dd8136f0a4080b2fb7a8cbedba @@ -560,8 +560,7 @@ key_store_state::decrypt_private_key(key get_passphrase(phrase, name, id, false, false); } - int cycles = 1; - + int cycles = 0; for (;;) try { @@ -575,14 +574,14 @@ key_store_state::decrypt_private_key(key } catch (Botan::Exception & e) { + cycles++; L(FL("decrypt_private_key: failure %d to load encrypted key: %s") % cycles % e.what()); - E(cycles <= 3 && !non_interactive, origin::no_fault, + E(cycles < 3 && !non_interactive, origin::no_fault, F("failed to decrypt old private RSA key, probably incorrect " "passphrase or missing 'get_passphrase' lua hook")); get_passphrase(phrase, name, id, false, false); - cycles++; continue; } }