Package org.shredzone.acme4j.util
Class CertificateUtilsTest
java.lang.Object
org.shredzone.acme4j.util.CertificateUtilsTest
Unit tests for
CertificateUtils
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Test ifCertificateUtils.createTestCertificate(PKCS10CertificationRequest, Instant, Instant, X509Certificate, PrivateKey)
generates a valid certificate.void
Test ifCertificateUtils.createTestIntermediateCertificate(String, Instant, Instant, PublicKey, X509Certificate, PrivateKey)
generates a valid intermediate certificate.void
Test ifCertificateUtils.createTestRootCertificate(String, Instant, Instant, KeyPair)
generates a valid root certificate.void
Test ifCertificateUtils.createTlsAlpn01Certificate(KeyPair, Identifier, byte[])
with domain name creates a good certificate.void
Test ifCertificateUtils.createTlsAlpn01Certificate(KeyPair, Identifier, byte[])
with IP creates a good certificate.void
Test that constructor is private.void
Test ifCertificateUtils.readCSR(InputStream)
reads an identical CSR.
-
Constructor Details
-
CertificateUtilsTest
public CertificateUtilsTest()
-
-
Method Details
-
testReadCSR
Test ifCertificateUtils.readCSR(InputStream)
reads an identical CSR.- Throws:
IOException
-
testPrivateConstructor
Test that constructor is private.- Throws:
Exception
-
testCreateTlsAlpn01Certificate
Test ifCertificateUtils.createTlsAlpn01Certificate(KeyPair, Identifier, byte[])
with domain name creates a good certificate.- Throws:
Exception
-
testCreateTlsAlpn01CertificateWithIp
@Test public void testCreateTlsAlpn01CertificateWithIp() throws IOException, CertificateParsingExceptionTest ifCertificateUtils.createTlsAlpn01Certificate(KeyPair, Identifier, byte[])
with IP creates a good certificate. -
testCreateTestRootCertificate
Test ifCertificateUtils.createTestRootCertificate(String, Instant, Instant, KeyPair)
generates a valid root certificate.- Throws:
Exception
-
testCreateTestIntermediateCertificate
Test ifCertificateUtils.createTestIntermediateCertificate(String, Instant, Instant, PublicKey, X509Certificate, PrivateKey)
generates a valid intermediate certificate.- Throws:
Exception
-
testCreateTestCertificate
Test ifCertificateUtils.createTestCertificate(PKCS10CertificationRequest, Instant, Instant, X509Certificate, PrivateKey)
generates a valid certificate.- Throws:
Exception
-