[OOM-CERT-SERVICE] Add Certification Request functionality
[oom/platform/cert-service.git] / certService / src / main / java / org / onap / oom / certservice / cmpv2client / api / CmpClient.java
index 5ded305..88c73c0 100644 (file)
@@ -88,4 +88,17 @@ public interface CmpClient {
    */
   Cmpv2CertificationModel updateCertificate(CsrModel csrModel, Cmpv2Server cmpv2Server,
       CertificateUpdateModel certificateUpdateModel) throws CmpClientException;
+
+  /**
+   * Requests for an additional External Root CA Certificate to be created for the passed keyPair wrapped
+   * in a CSRMeta with common details. Basic Authentication using IAK/RV, Verification of the signature
+   * (proof-of-possession) on the request is performed and an Exception thrown if verification fails
+   * or issue encountered in fetching certificate from CA.
+   *
+   * @param csrModel  Certificate Signing Request Model. Must not be {@code null}.
+   * @param cmpv2Server    CMPv2 server. Must not be {@code null}.
+   * @return model for certification containing certificate chain and trusted certificates
+   * @throws CmpClientException if client error occurs.
+   */
+  Cmpv2CertificationModel certificationRequest(CsrModel csrModel, Cmpv2Server cmpv2Server) throws CmpClientException;
 }