decrypt --verify-with: Do not throw NoSignature if verifications is empty

This commit is contained in:
Paul Schaub 2023-11-22 17:18:10 +01:00
parent 239c7ac853
commit 39ccac8623
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -115,11 +115,6 @@ public class DecryptCmd extends AbstractSopCmd {
private void writeVerifyOut(DecryptionResult result) throws IOException { private void writeVerifyOut(DecryptionResult result) throws IOException {
if (verifyOut != null) { if (verifyOut != null) {
if (result.getVerifications().isEmpty()) {
String errorMsg = getMsg("sop.error.runtime.no_verifiable_signature_found");
throw new SOPGPException.NoSignature(errorMsg);
}
try (OutputStream fileOut = getOutput(verifyOut)) { try (OutputStream fileOut = getOutput(verifyOut)) {
PrintWriter writer = new PrintWriter(fileOut); PrintWriter writer = new PrintWriter(fileOut);
for (Verification verification : result.getVerifications()) { for (Verification verification : result.getVerifications()) {