mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 04:42:06 +01:00
Fix checkstyle
This commit is contained in:
parent
87e6b044d9
commit
b0eb32d550
1 changed files with 14 additions and 2 deletions
|
@ -100,7 +100,9 @@ public class CanonicalizedDataEncryptionTest {
|
||||||
public static void readKeys() throws IOException {
|
public static void readKeys() throws IOException {
|
||||||
secretKeys = PGPainless.readKeyRing().secretKeyRing(KEY);
|
secretKeys = PGPainless.readKeyRing().secretKeyRing(KEY);
|
||||||
publicKeys = PGPainless.extractCertificate(secretKeys);
|
publicKeys = PGPainless.extractCertificate(secretKeys);
|
||||||
|
// CHECKSTYLE:OFF
|
||||||
System.out.println(PGPainless.asciiArmor(secretKeys));
|
System.out.println(PGPainless.asciiArmor(secretKeys));
|
||||||
|
// CHECKSTYLE:ON
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -109,8 +111,10 @@ public class CanonicalizedDataEncryptionTest {
|
||||||
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
||||||
|
|
||||||
if (!metadata.isVerified()) {
|
if (!metadata.isVerified()) {
|
||||||
|
// CHECKSTYLE:OFF
|
||||||
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
||||||
System.out.println(msg);
|
System.out.println(msg);
|
||||||
|
// CHECKSTYLE:ON
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,8 +125,10 @@ public class CanonicalizedDataEncryptionTest {
|
||||||
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
||||||
|
|
||||||
if (!metadata.isVerified()) {
|
if (!metadata.isVerified()) {
|
||||||
|
// CHECKSTYLE:OFF
|
||||||
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
||||||
System.out.println(msg);
|
System.out.println(msg);
|
||||||
|
// CHECKSTYLE:ON
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,21 +140,24 @@ public class CanonicalizedDataEncryptionTest {
|
||||||
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
||||||
|
|
||||||
if (!metadata.isVerified()) {
|
if (!metadata.isVerified()) {
|
||||||
|
// CHECKSTYLE:OFF
|
||||||
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
||||||
System.out.println(msg);
|
System.out.println(msg);
|
||||||
|
// CHECKSTYLE:ON
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void textDataTextSig() throws PGPException, IOException {
|
public void textDataTextSig() throws PGPException, IOException {
|
||||||
System.out.println("SignatureType: Text, LiteralData: Text");
|
|
||||||
String msg = encryptAndSign(message, DocumentSignatureType.CANONICAL_TEXT_DOCUMENT, StreamEncoding.TEXT);
|
String msg = encryptAndSign(message, DocumentSignatureType.CANONICAL_TEXT_DOCUMENT, StreamEncoding.TEXT);
|
||||||
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
||||||
|
|
||||||
if (!metadata.isVerified()) {
|
if (!metadata.isVerified()) {
|
||||||
|
// CHECKSTYLE:OFF
|
||||||
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
||||||
System.out.println(msg);
|
System.out.println(msg);
|
||||||
|
// CHECKSTYLE:ON
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,13 +165,14 @@ public class CanonicalizedDataEncryptionTest {
|
||||||
@Test
|
@Test
|
||||||
@Disabled("Fails")
|
@Disabled("Fails")
|
||||||
public void utf8DataBinarySig() throws PGPException, IOException {
|
public void utf8DataBinarySig() throws PGPException, IOException {
|
||||||
System.out.println("SignatureType: Binary, LiteralData: UTF8");
|
|
||||||
String msg = encryptAndSign(message, DocumentSignatureType.BINARY_DOCUMENT, StreamEncoding.UTF8);
|
String msg = encryptAndSign(message, DocumentSignatureType.BINARY_DOCUMENT, StreamEncoding.UTF8);
|
||||||
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
||||||
|
|
||||||
if (!metadata.isVerified()) {
|
if (!metadata.isVerified()) {
|
||||||
|
// CHECKSTYLE:OFF
|
||||||
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
||||||
System.out.println(msg);
|
System.out.println(msg);
|
||||||
|
// CHECKSTYLE:ON
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,8 +183,10 @@ public class CanonicalizedDataEncryptionTest {
|
||||||
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
OpenPgpMetadata metadata = decryptAndVerify(msg);
|
||||||
|
|
||||||
if (!metadata.isVerified()) {
|
if (!metadata.isVerified()) {
|
||||||
|
// CHECKSTYLE:OFF
|
||||||
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
System.out.println("Not verified. Session-Key: " + metadata.getSessionKey());
|
||||||
System.out.println(msg);
|
System.out.println(msg);
|
||||||
|
// CHECKSTYLE:ON
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue