From e20e03c5592f93e280c1fe35fc773d19cd378623 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Wed, 9 Nov 2022 22:23:24 +0100 Subject: [PATCH] Do not reject bnacksig signatures when they predate subkey binding date Fixes #334 SOP verify: force data to be non-openpgp data Update changelog SOP: Unify key/certificate reading code Fix key/password matching in SOPs detached sign command Rework CLI tests update changelog PGPainless 1.3.11 PGPainless 1.3.12-SNAPSHOT Merge branch 'release/1.3' --- .../org/pgpainless/cli/commands/DearmorCmdTest.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pgpainless-cli/src/test/java/org/pgpainless/cli/commands/DearmorCmdTest.java b/pgpainless-cli/src/test/java/org/pgpainless/cli/commands/DearmorCmdTest.java index b8e5532f..8fcf093d 100644 --- a/pgpainless-cli/src/test/java/org/pgpainless/cli/commands/DearmorCmdTest.java +++ b/pgpainless-cli/src/test/java/org/pgpainless/cli/commands/DearmorCmdTest.java @@ -90,13 +90,11 @@ public class DearmorCmdTest extends CLITest { } @Test - public void dearmorGarbageEmitsEmpty() { + public void dearmorGarbageEmitsEmpty() throws IOException { String noArmoredData = "This is not armored."; - System.setIn(new ByteArrayInputStream(noArmoredData.getBytes(StandardCharsets.UTF_8))); - ByteArrayOutputStream out = new ByteArrayOutputStream(); - System.setOut(new PrintStream(out)); - PGPainlessCLI.execute("dearmor"); - + pipeStringToStdin(noArmoredData); + ByteArrayOutputStream out = pipeStdoutToStream(); + assertSuccess(executeCommand("dearmor")); assertTrue(out.toString().isEmpty()); }