Follow-up on #1687 Don't ask for password on invalid keystores
This commit is contained in:
parent
db70f066ba
commit
948d15ea95
|
@ -596,7 +596,10 @@ proc importKeystoresFromDir*(rng: var BrHmacDrbgContext,
|
|||
else:
|
||||
error "Imported keystore holds invalid key", file, err = privKey.error
|
||||
break
|
||||
of InvalidKeystore, InvalidPassword:
|
||||
of InvalidKeystore:
|
||||
warn "Invalid keystore", file
|
||||
break
|
||||
of InvalidPassword:
|
||||
if firstDecryptionAttempt:
|
||||
try:
|
||||
const msg = "Please enter the password for decrypting '$1' " &
|
||||
|
|
|
@ -279,9 +279,6 @@ suiteReport "KeyStorage testing suite":
|
|||
check decryptKeystore(JsonString "{}",
|
||||
KeystorePass.init "").isErr
|
||||
|
||||
check decryptKeystore(JsonString "{}",
|
||||
KeystorePass.init "").isErr
|
||||
|
||||
template checkVariant(remove): untyped =
|
||||
check decryptKeystore(JsonString pbkdf2Vector.replace(remove, "1234"),
|
||||
KeystorePass.init password).isErr
|
||||
|
|
Loading…
Reference in New Issue