mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2024-11-19 05:52:04 +01:00
decrypt: Do not throw NoSignature exception when verifications is empty
This commit is contained in:
parent
51d9c29837
commit
e5e64003f3
1 changed files with 4 additions and 7 deletions
|
@ -85,13 +85,10 @@ class DecryptCmd : AbstractSopCmd() {
|
|||
@Throws(IOException::class)
|
||||
private fun writeVerifyOut(result: DecryptionResult) {
|
||||
verifyOut?.let {
|
||||
if (result.verifications.isEmpty()) {
|
||||
val errorMsg = getMsg("sop.error.runtime.no_verifiable_signature_found")
|
||||
throw NoSignature(errorMsg)
|
||||
}
|
||||
|
||||
getOutput(verifyOut).use { out ->
|
||||
PrintWriter(out).use { pw -> result.verifications.forEach { pw.println(it) } }
|
||||
getOutput(it).use { out ->
|
||||
PrintWriter(out).use { pw ->
|
||||
result.verifications.forEach { verification -> pw.println(verification) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue