aboutsummaryrefslogtreecommitdiff
path: root/src/test/model/pki/crl/CertificateListTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/model/pki/crl/CertificateListTest.java')
-rw-r--r--src/test/model/pki/crl/CertificateListTest.java22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/test/model/pki/crl/CertificateListTest.java b/src/test/model/pki/crl/CertificateListTest.java
index 0f4f06c..c117c16 100644
--- a/src/test/model/pki/crl/CertificateListTest.java
+++ b/src/test/model/pki/crl/CertificateListTest.java
@@ -5,17 +5,13 @@ import model.asn1.ASN1Object;
import model.asn1.BitString;
import model.asn1.Null;
import model.asn1.ObjectIdentifier;
-import model.asn1.exceptions.ParseException;
-import model.asn1.parsing.BytesReader;
import model.pki.AlgorithmIdentifier;
-import model.pki.cert.Certificate;
-import model.pki.cert.TbsCertificate;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static model.TestConstants.combine;
-import static model.TestConstants.mutate;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
public class CertificateListTest {
private CertificateList crl;
@@ -27,7 +23,7 @@ public class CertificateListTest {
new AlgorithmIdentifier(ASN1Object.TAG_SEQUENCE, null,
new ObjectIdentifier(ObjectIdentifier.TAG, null, ObjectIdentifier.OID_RSA_ENCRYPTION),
new Null(Null.TAG, null)),
- new BitString(BitString.TAG, null, 0, new Byte[]{ 1, 2, 3 }));
+ new BitString(BitString.TAG, null, 0, new Byte[]{1, 2, 3}));
}
@Test
@@ -35,18 +31,18 @@ public class CertificateListTest {
assertEquals(2, crl.getCrl().getRevokedCertificates().length);
assertArrayEquals(ObjectIdentifier.OID_RSA_ENCRYPTION,
crl.getSignatureAlgorithm().getType().getInts());
- assertArrayEquals(new Byte[]{ 1, 2, 3 },
+ assertArrayEquals(new Byte[]{1, 2, 3},
crl.getSignature().getConvertedVal());
}
@Test
void testEncode() {
assertArrayEquals(combine((byte) 0x30,
- TestConstants.CRL_CONTENT_1_DER,
- new AlgorithmIdentifier(ASN1Object.TAG_SEQUENCE, null,
- new ObjectIdentifier(ObjectIdentifier.TAG, null, ObjectIdentifier.OID_RSA_ENCRYPTION),
- new Null(Null.TAG, null)).encodeDER(),
- new BitString(BitString.TAG, null, 0, new Byte[]{ 1, 2, 3 }).encodeDER()),
+ TestConstants.CRL_CONTENT_1_DER,
+ new AlgorithmIdentifier(ASN1Object.TAG_SEQUENCE, null,
+ new ObjectIdentifier(ObjectIdentifier.TAG, null, ObjectIdentifier.OID_RSA_ENCRYPTION),
+ new Null(Null.TAG, null)).encodeDER(),
+ new BitString(BitString.TAG, null, 0, new Byte[]{1, 2, 3}).encodeDER()),
crl.encodeDER());
}
}