mirror of
https://github.com/shred/acme4j.git
synced 2025-12-16 11:24:01 +08:00
Test value changes
These are genuine functionality changes, and may represent unexpected impact. Having two CNs doesn't seem right, but that case is tested so I'm leaving that here for discussion's sake. The other test case doesn't have a CN anymore, as expected
This commit is contained in:
committed by
Richard Körber
parent
beb1d53dc0
commit
278f9bd57b
@@ -189,7 +189,7 @@ public class CSRBuilderTest {
|
||||
builder.addValue("CN", "firstcn.example.com");
|
||||
assertThat(builder.toString()).isEqualTo("C=DE,E=contact@example.com,CN=firstcn.example.com,DNS=firstcn.example.com");
|
||||
builder.addValue("CN", "scnd.example.com");
|
||||
assertThat(builder.toString()).isEqualTo("C=DE,E=contact@example.com,CN=firstcn.example.com,DNS=firstcn.example.com,DNS=scnd.example.com");
|
||||
assertThat(builder.toString()).isEqualTo("C=DE,E=contact@example.com,CN=firstcn.example.com,CN=scnd.example.com,DNS=firstcn.example.com,DNS=scnd.example.com");
|
||||
|
||||
builder = new CSRBuilder();
|
||||
builder.addValue(BCStyle.C, "DE");
|
||||
@@ -199,7 +199,7 @@ public class CSRBuilderTest {
|
||||
builder.addValue(BCStyle.CN, "firstcn.example.com");
|
||||
assertThat(builder.toString()).isEqualTo("C=DE,E=contact@example.com,CN=firstcn.example.com,DNS=firstcn.example.com");
|
||||
builder.addValue(BCStyle.CN, "scnd.example.com");
|
||||
assertThat(builder.toString()).isEqualTo("C=DE,E=contact@example.com,CN=firstcn.example.com,DNS=firstcn.example.com,DNS=scnd.example.com");
|
||||
assertThat(builder.toString()).isEqualTo("C=DE,E=contact@example.com,CN=firstcn.example.com,CN=scnd.example.com,DNS=firstcn.example.com,DNS=scnd.example.com");
|
||||
}
|
||||
|
||||
private CSRBuilder createBuilderWithValues() throws UnknownHostException {
|
||||
|
||||
@@ -228,7 +228,7 @@ public class CertificateUtilsTest {
|
||||
notAfter, rootCert, rootKeypair.getPrivate());
|
||||
|
||||
assertThat(cert.getIssuerX500Principal().getName()).isEqualTo(rootSubject);
|
||||
assertThat(cert.getSubjectX500Principal().getName()).isEqualTo("CN=example.org");
|
||||
assertThat(cert.getSubjectX500Principal().getName()).isEqualTo("");
|
||||
assertThat(getSANs(cert)).contains("example.org", "www.example.org");
|
||||
assertThat(getIpSANs(cert)).contains(InetAddress.getByName("192.168.0.1"));
|
||||
assertThat(cert.getNotBefore().toInstant()).isEqualTo(notBefore);
|
||||
|
||||
Reference in New Issue
Block a user