use of com.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse in project java-security-private-ca by googleapis.
the class SnippetsIT method fetchPemCSR.
// Fetch CSR of the given CA.
public static String fetchPemCSR(String pool_Id, String caName) throws IOException {
try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
String caParent = CertificateAuthorityName.of(PROJECT_ID, LOCATION, pool_Id, caName).toString();
FetchCertificateAuthorityCsrResponse response = certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(caParent);
return response.getPemCsr();
}
}
Aggregations