use of com.beanit.asn1bean.compiler.pkix1explicit88.Certificate in project java-security-private-ca by googleapis.
the class SnippetsIT method testCreateCertificate.
@Test
public void testCreateCertificate() throws IOException {
// Check if the certificate created during setup is successful.
try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
CertificateName certificateName = CertificateName.of(PROJECT_ID, LOCATION, CA_POOL_ID, CERTIFICATE_NAME);
Certificate certificate = certificateAuthorityServiceClient.getCertificate(certificateName);
assertThat(certificate.getName()).contains(CERTIFICATE_NAME);
}
}
use of com.beanit.asn1bean.compiler.pkix1explicit88.Certificate in project java-security-private-ca by googleapis.
the class SnippetsIT method testCreateCertificateWithCSR.
@Test
public void testCreateCertificateWithCSR() throws IOException {
try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
Certificate response = certificateAuthorityServiceClient.getCertificate(CertificateName.of(PROJECT_ID, LOCATION, CA_POOL_ID, CSR_CERTIFICATE_NAME).toString());
Assert.assertTrue(response.hasCreateTime());
}
}
Aggregations