public void testClearSigned() throws Exception { createTestFile(clearSignedPublicKey, "pub.bpg"); checkClearSignedVerify(nlOnlySignedMessage); checkClearSignedVerify(crOnlySignedMessage); checkClearSignedVerify(crNlSignedMessage); checkClearSignedVerify(crNlSignedMessageTrailingWhiteSpace); ClearSignedFileProcessor.main(new String[] { "-v", "test.txt.asc", "pub.bpg" }); RSAKeyPairGenerator.main(new String[] { "test", "password" }); checkClearSigned(crOnlyMessage); checkClearSigned(nlOnlyMessage); checkClearSigned(crNlMessage); checkClearSigned(crNlMessageTrailingWhiteSpace); }
public void testClearSignedBogusInput() throws Exception { createTestFile(clearSignedPublicKey, "test.txt"); ClearSignedFileProcessor.main(new String[] { "-s", "test.txt", "secret.bpg", "password" }); }
private void checkClearSignedVerify(String message) throws Exception { createTestData(message, "test.txt.asc"); ClearSignedFileProcessor.main(new String[] { "-v", "test.txt.asc", "pub.bpg" }); }
private void checkClearSigned(String message) throws Exception { createTestData(message, "test.txt"); ClearSignedFileProcessor.main(new String[] { "-s", "test.txt", "secret.bpg", "password" }); ClearSignedFileProcessor.main(new String[] { "-v", "test.txt.asc", "pub.bpg" }); }