diff --git a/certify-service/pom.xml b/certify-service/pom.xml index c8ed72fc..6955ef97 100644 --- a/certify-service/pom.xml +++ b/certify-service/pom.xml @@ -44,7 +44,7 @@ io.mosip.kernel kernel-keymanager-service - 1.2.1-java21-SNAPSHOT + ${kernel.core.version} lib diff --git a/certify-service/src/main/java/io/mosip/certify/CertifyServiceApplication.java b/certify-service/src/main/java/io/mosip/certify/CertifyServiceApplication.java index f69c7be7..134bc317 100644 --- a/certify-service/src/main/java/io/mosip/certify/CertifyServiceApplication.java +++ b/certify-service/src/main/java/io/mosip/certify/CertifyServiceApplication.java @@ -16,6 +16,9 @@ @SpringBootApplication(scanBasePackages = "io.mosip.certify,"+ "io.mosip.kernel.crypto," + "io.mosip.kernel.keymanager.hsm," + + "io.mosip.kernel.cryptomanager," + + "io.mosip.kernel.keymanagerservice.validator,"+ + "io.mosip.kernel.keymanager,"+ "io.mosip.kernel.cryptomanager.util," + "io.mosip.kernel.keymanagerservice.helper," + "io.mosip.kernel.keymanagerservice.repository," + diff --git a/certify-service/src/main/java/io/mosip/certify/config/AppConfig.java b/certify-service/src/main/java/io/mosip/certify/config/AppConfig.java index 3035c47a..24581a90 100644 --- a/certify-service/src/main/java/io/mosip/certify/config/AppConfig.java +++ b/certify-service/src/main/java/io/mosip/certify/config/AppConfig.java @@ -75,10 +75,14 @@ public void run(ApplicationArguments args) throws Exception { String objectType = "CSR"; KeyPairGenerateRequestDto rootKeyRequest = new KeyPairGenerateRequestDto(); rootKeyRequest.setApplicationId(Constants.ROOT_KEY); + // Set the reference id to empty string, as keymanager is expecting the same for initialization + rootKeyRequest.setReferenceId(org.apache.commons.lang3.StringUtils.EMPTY); keymanagerService.generateMasterKey(objectType, rootKeyRequest); log.info("===================== CERTIFY_SERVICE MASTER KEY CHECK ========================"); KeyPairGenerateRequestDto masterKeyRequest = new KeyPairGenerateRequestDto(); masterKeyRequest.setApplicationId(Constants.CERTIFY_SERVICE_APP_ID); + // Set the reference id to empty string, as keymanager is expecting the same for initialization + masterKeyRequest.setReferenceId(org.apache.commons.lang3.StringUtils.EMPTY); keymanagerService.generateMasterKey(objectType, masterKeyRequest); if(!StringUtils.isEmpty(cacheSecretKeyRefId)) { @@ -93,6 +97,8 @@ public void run(ApplicationArguments args) throws Exception { log.info("===================== CERTIFY_PARTNER MASTER KEY CHECK ========================"); KeyPairGenerateRequestDto partnerMasterKeyRequest = new KeyPairGenerateRequestDto(); partnerMasterKeyRequest.setApplicationId(Constants.CERTIFY_PARTNER_APP_ID); + // Set the reference id to empty string, as keymanager is expecting the same for initialization + partnerMasterKeyRequest.setReferenceId(org.apache.commons.lang3.StringUtils.EMPTY); keymanagerService.generateMasterKey(objectType, partnerMasterKeyRequest); log.info("===================== CERTIFY KEY SETUP COMPLETED ========================"); } diff --git a/pom.xml b/pom.xml index a9f0a15e..77b8ebc5 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ 21 0.6.5 - 1.2.0.1 + 1.3.0-SNAPSHOT 0.5.0 2.5.0 1.7