use of org.apache.qpid.test.utils.tls.AlternativeName in project qpid-broker-j by apache.
the class SNITest method setUp.
@Before
public void setUp() throws Exception {
final Instant yesterday = Instant.now().minus(1, ChronoUnit.DAYS);
final Instant inOneHour = Instant.now().plus(1, ChronoUnit.HOURS);
_fooValid = TlsResourceBuilder.createSelfSigned("CN=foo", yesterday, yesterday.plus(365, ChronoUnit.DAYS));
_fooInvalid = TlsResourceBuilder.createSelfSigned("CN=foo", inOneHour, inOneHour.plus(365, ChronoUnit.DAYS));
_barInvalid = TlsResourceBuilder.createSelfSigned("CN=Qpid", inOneHour, inOneHour.plus(365, ChronoUnit.DAYS), new AlternativeName(AltNameType.DNS_NAME, "bar"));
_keyStoreFile = TLS_RESOURCE.createKeyStore(new PrivateKeyEntry("foovalid", _fooValid.getPrivateKey(), _fooValid.getCertificate()), new PrivateKeyEntry("fooinvalid", _fooInvalid.getPrivateKey(), _fooInvalid.getCertificate()), new PrivateKeyEntry("barinvalid", _barInvalid.getPrivateKey(), _barInvalid.getCertificate())).toFile();
}
Aggregations