From c88b66b45d24af033587f3c5020991460ac58302 Mon Sep 17 00:00:00 2001 From: Bartosz Gardziejewski Date: Wed, 12 Feb 2020 07:49:02 +0100 Subject: Generate openAPI 3.0 specification. Issue-ID: AAF-995 Signed-off-by: Bartosz Gardziejewski Change-Id: I3de5dae9688d89b3bac0d86beff982247667854d --- .../org/onap/aaf/certservice/certification/CsrModelFactory.java | 6 +++--- .../org/onap/aaf/certservice/certification/PemObjectFactory.java | 2 +- certService/src/main/resources/application.properties | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'certService/src/main') diff --git a/certService/src/main/java/org/onap/aaf/certservice/certification/CsrModelFactory.java b/certService/src/main/java/org/onap/aaf/certservice/certification/CsrModelFactory.java index 80858f4d..98daa6eb 100644 --- a/certService/src/main/java/org/onap/aaf/certservice/certification/CsrModelFactory.java +++ b/certService/src/main/java/org/onap/aaf/certservice/certification/CsrModelFactory.java @@ -39,14 +39,14 @@ public class CsrModelFactory { private final PemObjectFactory pemObjectFactory = new PemObjectFactory(); public CsrModel createCsrModel(StringBase64 csr, StringBase64 privateKey) throws CsrDecryptionException { - LOGGER.debug("Decoded CSR: \n{}", csr.asString()); + LOGGER.debug("Decoded CSR: \n{}", csr); try { - PemObject pemObject = pemObjectFactory.createPmObject(csr.asString()); + PemObject pemObject = pemObjectFactory.createPemObject(csr.asString()); PKCS10CertificationRequest decodedCsr = new PKCS10CertificationRequest( pemObject.getContent() ); - PemObject decodedPrivateKey = pemObjectFactory.createPmObject(privateKey.asString()); + PemObject decodedPrivateKey = pemObjectFactory.createPemObject(privateKey.asString()); return new CsrModel(decodedCsr, decodedPrivateKey); } catch (IOException e) { throw new CsrDecryptionException("Incorrect CSR, decryption failed", e); diff --git a/certService/src/main/java/org/onap/aaf/certservice/certification/PemObjectFactory.java b/certService/src/main/java/org/onap/aaf/certservice/certification/PemObjectFactory.java index e3339cc4..08ffc56d 100644 --- a/certService/src/main/java/org/onap/aaf/certservice/certification/PemObjectFactory.java +++ b/certService/src/main/java/org/onap/aaf/certservice/certification/PemObjectFactory.java @@ -31,7 +31,7 @@ import org.onap.aaf.certservice.certification.exceptions.CsrDecryptionException; public class PemObjectFactory { - public PemObject createPmObject(String pem) throws CsrDecryptionException { + public PemObject createPemObject(String pem) throws CsrDecryptionException { try (StringReader stringReader = new StringReader(pem); PemReader pemReader = new PemReader(stringReader)) { diff --git a/certService/src/main/resources/application.properties b/certService/src/main/resources/application.properties index a157ae66..b9ce108a 100644 --- a/certService/src/main/resources/application.properties +++ b/certService/src/main/resources/application.properties @@ -2,3 +2,4 @@ management.endpoints.enabled-by-default=false management.endpoint.health.enabled=true springdoc.swagger-ui.path=/docs +springdoc.show-actuator=true -- cgit 1.2.3-korg