mirror of
https://codeberg.org/PGPainless/wkd-java.git
synced 2025-09-08 18:59:40 +02:00
Add test for missing cert
This commit is contained in:
parent
21bdd04d80
commit
f1505083c4
4 changed files with 43 additions and 17 deletions
|
@ -5,6 +5,15 @@
|
|||
package pgp.wkd.test_suite;
|
||||
|
||||
|
||||
import org.bouncycastle.openpgp.PGPException;
|
||||
import org.bouncycastle.openpgp.PGPPublicKey;
|
||||
import org.bouncycastle.openpgp.PGPPublicKeyRing;
|
||||
import org.bouncycastle.openpgp.PGPSecretKeyRing;
|
||||
import org.bouncycastle.openpgp.PGPSignature;
|
||||
import org.pgpainless.PGPainless;
|
||||
import org.pgpainless.key.protection.SecretKeyRingProtector;
|
||||
import pgp.wkd.discovery.DiscoveryMethod;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -18,15 +27,6 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bouncycastle.openpgp.PGPException;
|
||||
import org.bouncycastle.openpgp.PGPPublicKey;
|
||||
import org.bouncycastle.openpgp.PGPPublicKeyRing;
|
||||
import org.bouncycastle.openpgp.PGPSecretKeyRing;
|
||||
import org.bouncycastle.openpgp.PGPSignature;
|
||||
import org.pgpainless.PGPainless;
|
||||
import org.pgpainless.key.protection.SecretKeyRingProtector;
|
||||
import pgp.wkd.discovery.DiscoveryMethod;
|
||||
|
||||
public class TestSuiteGenerator {
|
||||
|
||||
|
||||
|
@ -49,6 +49,7 @@ public class TestSuiteGenerator {
|
|||
tests.addAll(test_baseCaseMultiUserIds(dirs));
|
||||
tests.add(test_secretKeyMaterial(dirs));
|
||||
tests.add(test_randomBytes(dirs));
|
||||
tests.add(test_missingCertificate(dirs));
|
||||
|
||||
return new TestSuite("0.1", tests);
|
||||
}
|
||||
|
@ -230,6 +231,13 @@ public class TestSuiteGenerator {
|
|||
return TestCase.fail("Random Bytes", description, lookupMail, directoryStructure);
|
||||
}
|
||||
|
||||
private TestCase test_missingCertificate(WkdDirectoryStructure dirs) {
|
||||
String lookupMail = "missing-cert@" + domain;
|
||||
String title = "Missing certificate";
|
||||
String description = "There is no certificate for the lookup mail address '" + lookupMail + "'.";
|
||||
return TestCase.fail(title, description, lookupMail, dirs);
|
||||
}
|
||||
|
||||
// INTERNAL METHODS
|
||||
|
||||
private WkdDirectoryStructure directoryStructureForMethod(File directory, DiscoveryMethod method) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue