mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-07 17:29:44 +02:00
MergeCertsTest: do not pass unarmored data
This is done to fix external-sop tests, which rely on environment variables, which do not play nicely with binary data
This commit is contained in:
parent
79aece6f04
commit
5a7a8ae901
1 changed files with 0 additions and 19 deletions
|
@ -25,18 +25,15 @@ public class MergeCertsTest extends AbstractSOPTest {
|
|||
@MethodSource("provideInstances")
|
||||
public void testMergeWithItself(SOP sop) throws IOException {
|
||||
byte[] key = sop.generateKey()
|
||||
.noArmor()
|
||||
.userId("Alice <alice@pgpainless.org>")
|
||||
.generate()
|
||||
.getBytes();
|
||||
|
||||
byte[] cert = sop.extractCert()
|
||||
.noArmor()
|
||||
.key(key)
|
||||
.getBytes();
|
||||
|
||||
byte[] merged = sop.mergeCerts()
|
||||
.noArmor()
|
||||
.updates(cert)
|
||||
.baseCertificates(cert)
|
||||
.getBytes();
|
||||
|
@ -69,20 +66,17 @@ public class MergeCertsTest extends AbstractSOPTest {
|
|||
@MethodSource("provideInstances")
|
||||
public void testMergeWithItselfViaBase(SOP sop) throws IOException {
|
||||
byte[] key = sop.generateKey()
|
||||
.noArmor()
|
||||
.userId("Alice <alice@pgpainless.org>")
|
||||
.generate()
|
||||
.getBytes();
|
||||
|
||||
byte[] cert = sop.extractCert()
|
||||
.noArmor()
|
||||
.key(key)
|
||||
.getBytes();
|
||||
|
||||
byte[] certs = ArraysKt.plus(cert, cert);
|
||||
|
||||
byte[] merged = sop.mergeCerts()
|
||||
.noArmor()
|
||||
.updates(cert)
|
||||
.baseCertificates(certs)
|
||||
.getBytes();
|
||||
|
@ -94,23 +88,19 @@ public class MergeCertsTest extends AbstractSOPTest {
|
|||
@MethodSource("provideInstances")
|
||||
public void testApplyBaseToUpdate(SOP sop) throws IOException {
|
||||
byte[] key = sop.generateKey()
|
||||
.noArmor()
|
||||
.userId("Alice <alice@pgpainless.org>")
|
||||
.generate()
|
||||
.getBytes();
|
||||
|
||||
byte[] cert = sop.extractCert()
|
||||
.noArmor()
|
||||
.key(key)
|
||||
.getBytes();
|
||||
|
||||
byte[] update = sop.revokeKey()
|
||||
.noArmor()
|
||||
.keys(key)
|
||||
.getBytes();
|
||||
|
||||
byte[] merged = sop.mergeCerts()
|
||||
.noArmor()
|
||||
.updates(cert)
|
||||
.baseCertificates(update)
|
||||
.getBytes();
|
||||
|
@ -122,23 +112,19 @@ public class MergeCertsTest extends AbstractSOPTest {
|
|||
@MethodSource("provideInstances")
|
||||
public void testApplyUpdateToBase(SOP sop) throws IOException {
|
||||
byte[] key = sop.generateKey()
|
||||
.noArmor()
|
||||
.userId("Alice <alice@pgpainless.org>")
|
||||
.generate()
|
||||
.getBytes();
|
||||
|
||||
byte[] cert = sop.extractCert()
|
||||
.noArmor()
|
||||
.key(key)
|
||||
.getBytes();
|
||||
|
||||
byte[] update = sop.revokeKey()
|
||||
.noArmor()
|
||||
.keys(key)
|
||||
.getBytes();
|
||||
|
||||
byte[] merged = sop.mergeCerts()
|
||||
.noArmor()
|
||||
.updates(update)
|
||||
.baseCertificates(cert)
|
||||
.getBytes();
|
||||
|
@ -150,29 +136,24 @@ public class MergeCertsTest extends AbstractSOPTest {
|
|||
@MethodSource("provideInstances")
|
||||
public void testApplyUpdateToMissingBaseDoesNothing(SOP sop) throws IOException {
|
||||
byte[] aliceKey = sop.generateKey()
|
||||
.noArmor()
|
||||
.userId("Alice <alice@pgpainless.org>")
|
||||
.generate()
|
||||
.getBytes();
|
||||
|
||||
byte[] aliceCert = sop.extractCert()
|
||||
.noArmor()
|
||||
.key(aliceKey)
|
||||
.getBytes();
|
||||
|
||||
byte[] bobKey = sop.generateKey()
|
||||
.noArmor()
|
||||
.userId("Bob <bob@pgpainless.org>")
|
||||
.generate()
|
||||
.getBytes();
|
||||
|
||||
byte[] bobCert = sop.extractCert()
|
||||
.noArmor()
|
||||
.key(bobKey)
|
||||
.getBytes();
|
||||
|
||||
byte[] merged = sop.mergeCerts()
|
||||
.noArmor()
|
||||
.updates(bobCert)
|
||||
.baseCertificates(aliceCert)
|
||||
.getBytes();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue