diff --git a/pgpainless-cli/src/test/java/org/pgpainless/cli/commands/RoundTripInlineSignInlineVerifyCmdTest.java b/pgpainless-cli/src/test/java/org/pgpainless/cli/commands/RoundTripInlineSignInlineVerifyCmdTest.java index c80019d1..3d7980b0 100644 --- a/pgpainless-cli/src/test/java/org/pgpainless/cli/commands/RoundTripInlineSignInlineVerifyCmdTest.java +++ b/pgpainless-cli/src/test/java/org/pgpainless/cli/commands/RoundTripInlineSignInlineVerifyCmdTest.java @@ -134,7 +134,7 @@ public class RoundTripInlineSignInlineVerifyCmdTest extends CLITest { pipeStringToStdin(MESSAGE); ByteArrayOutputStream ciphertextOut = pipeStdoutToStream(); assertSuccess(executeCommand("inline-sign", - "--as", "cleartextsigned", + "--as", "clearsigned", key.getAbsolutePath(), "--with-key-password", password.getAbsolutePath())); @@ -154,7 +154,7 @@ public class RoundTripInlineSignInlineVerifyCmdTest extends CLITest { pipeStringToStdin(MESSAGE); ByteArrayOutputStream ciphertextOut = pipeStdoutToStream(); assertSuccess(executeCommand("inline-sign", - "--as", "cleartextsigned", + "--as", "clearsigned", key.getAbsolutePath(), "--with-key-password", password.getAbsolutePath())); @@ -212,7 +212,7 @@ public class RoundTripInlineSignInlineVerifyCmdTest extends CLITest { pipeStringToStdin(MESSAGE); ByteArrayOutputStream ciphertextOut = pipeStdoutToStream(); assertSuccess(executeCommand("inline-sign", - "--as", "cleartextsigned", + "--as", "clearsigned", key.getAbsolutePath(), "--with-key-password", password.getAbsolutePath())); diff --git a/pgpainless-sop/src/main/java/org/pgpainless/sop/InlineSignImpl.java b/pgpainless-sop/src/main/java/org/pgpainless/sop/InlineSignImpl.java index c0bd29f4..d0cfbfcd 100644 --- a/pgpainless-sop/src/main/java/org/pgpainless/sop/InlineSignImpl.java +++ b/pgpainless-sop/src/main/java/org/pgpainless/sop/InlineSignImpl.java @@ -32,7 +32,7 @@ import sop.operation.InlineSign; public class InlineSignImpl implements InlineSign { private boolean armor = true; - private InlineSignAs mode = InlineSignAs.Binary; + private InlineSignAs mode = InlineSignAs.binary; private final SigningOptions signingOptions = new SigningOptions(); private final MatchMakingSecretKeyRingProtector protector = new MatchMakingSecretKeyRingProtector(); private final List signingKeys = new ArrayList<>(); @@ -74,7 +74,7 @@ public class InlineSignImpl implements InlineSign { public Ready data(InputStream data) throws SOPGPException.KeyIsProtected, IOException, SOPGPException.ExpectedText { for (PGPSecretKeyRing key : signingKeys) { try { - if (mode == InlineSignAs.CleartextSigned) { + if (mode == InlineSignAs.clearsigned) { signingOptions.addDetachedSignature(protector, key); } else { signingOptions.addInlineSignature(protector, key, modeToSigType(mode)); @@ -87,7 +87,7 @@ public class InlineSignImpl implements InlineSign { } ProducerOptions producerOptions = ProducerOptions.sign(signingOptions); - if (mode == InlineSignAs.CleartextSigned) { + if (mode == InlineSignAs.clearsigned) { producerOptions.setCleartextSigned(); producerOptions.setAsciiArmor(true); } else { @@ -119,7 +119,7 @@ public class InlineSignImpl implements InlineSign { } private static DocumentSignatureType modeToSigType(InlineSignAs mode) { - return mode == InlineSignAs.Binary ? DocumentSignatureType.BINARY_DOCUMENT + return mode == InlineSignAs.binary ? DocumentSignatureType.BINARY_DOCUMENT : DocumentSignatureType.CANONICAL_TEXT_DOCUMENT; } } diff --git a/pgpainless-sop/src/test/java/org/pgpainless/sop/InlineDetachTest.java b/pgpainless-sop/src/test/java/org/pgpainless/sop/InlineDetachTest.java index b4bfe815..1054babb 100644 --- a/pgpainless-sop/src/test/java/org/pgpainless/sop/InlineDetachTest.java +++ b/pgpainless-sop/src/test/java/org/pgpainless/sop/InlineDetachTest.java @@ -63,7 +63,7 @@ public class InlineDetachTest { byte[] cleartextSigned = sop.inlineSign() .key(key) .withKeyPassword("sw0rdf1sh") - .mode(InlineSignAs.CleartextSigned) + .mode(InlineSignAs.clearsigned) .data(data).getBytes(); // actually detach the message diff --git a/pgpainless-sop/src/test/java/org/pgpainless/sop/InlineSignVerifyRoundtripTest.java b/pgpainless-sop/src/test/java/org/pgpainless/sop/InlineSignVerifyRoundtripTest.java index ee892501..b24b729c 100644 --- a/pgpainless-sop/src/test/java/org/pgpainless/sop/InlineSignVerifyRoundtripTest.java +++ b/pgpainless-sop/src/test/java/org/pgpainless/sop/InlineSignVerifyRoundtripTest.java @@ -36,7 +36,7 @@ public class InlineSignVerifyRoundtripTest { byte[] inlineSigned = sop.inlineSign() .key(key) .withKeyPassword("sw0rdf1sh") - .mode(InlineSignAs.CleartextSigned) + .mode(InlineSignAs.clearsigned) .data(message).getBytes(); ByteArrayAndResult> result = sop.inlineVerify() diff --git a/version.gradle b/version.gradle index a6e0a54f..ee8e64fb 100644 --- a/version.gradle +++ b/version.gradle @@ -16,6 +16,6 @@ allprojects { logbackVersion = '1.2.11' mockitoVersion = '4.5.1' slf4jVersion = '1.7.36' - sopJavaVersion = '4.0.3' + sopJavaVersion = '4.0.5' } }