1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-25 12:27:58 +01:00

Move PGPDSL to pgpainless-wot testFixtures

This commit is contained in:
Paul Schaub 2023-07-09 13:22:11 +02:00
parent b12fc5e4d2
commit b6cd1ff13c
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 5 additions and 5 deletions

View file

@ -1,9 +1,8 @@
package org.pgpainless.wot package org.pgpainless.wot
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
import org.pgpainless.wot.dsl.PGPDSL
import org.pgpainless.wot.testfixtures.AdHocVectors import org.pgpainless.wot.testfixtures.AdHocVectors
import kotlin.test.assertEquals
import kotlin.test.assertTrue
class AdHocTest: PGPDSL { class AdHocTest: PGPDSL {

View file

@ -1,21 +1,22 @@
package org.pgpainless.wot package org.pgpainless.wot.dsl
import org.bouncycastle.openpgp.PGPPublicKeyRing import org.bouncycastle.openpgp.PGPPublicKeyRing
import org.bouncycastle.openpgp.PGPSignature import org.bouncycastle.openpgp.PGPSignature
import org.pgpainless.algorithm.RevocationStateType import org.pgpainless.algorithm.RevocationStateType
import org.pgpainless.key.OpenPgpFingerprint import org.pgpainless.key.OpenPgpFingerprint
import org.pgpainless.key.info.KeyRingInfo import org.pgpainless.key.info.KeyRingInfo
import org.pgpainless.wot.WebOfTrust
import org.pgpainless.wot.network.Node import org.pgpainless.wot.network.Node
import org.pgpainless.wot.network.Fingerprint import org.pgpainless.wot.network.Fingerprint
import org.pgpainless.wot.network.RevocationState import org.pgpainless.wot.network.RevocationState
interface PGPDSL { interface PGPDSL {
fun CertSynopsis(certificate: PGPPublicKeyRing): Node { fun Node(certificate: PGPPublicKeyRing): Node {
return Node(Fingerprint(certificate), ) return Node(Fingerprint(certificate), )
} }
fun CertSynopsis(validatedCert: KeyRingInfo): Node { fun Node(validatedCert: KeyRingInfo): Node {
return Node( return Node(
Fingerprint(validatedCert.fingerprint), Fingerprint(validatedCert.fingerprint),
validatedCert.primaryKeyExpirationDate, validatedCert.primaryKeyExpirationDate,