diff --git a/admin/kernel-syncdata-service/src/main/java/io/mosip/kernel/syncdata/service/helper/ClientSettingsHelper.java b/admin/kernel-syncdata-service/src/main/java/io/mosip/kernel/syncdata/service/helper/ClientSettingsHelper.java index 464b4ea1ec8..441da4d7304 100644 --- a/admin/kernel-syncdata-service/src/main/java/io/mosip/kernel/syncdata/service/helper/ClientSettingsHelper.java +++ b/admin/kernel-syncdata-service/src/main/java/io/mosip/kernel/syncdata/service/helper/ClientSettingsHelper.java @@ -250,7 +250,7 @@ private SyncDataBaseDto getEncryptedSyncDataBaseDto(Class clazz, RegistrationCen return null; } - public List getConfiguredScriptUrlDetail(String publicKey) { + public List getConfiguredScriptUrlDetail(RegistrationCenterMachineDto regCenterMachineDto) { List list = new ArrayList<>(); scriptNames.forEach(fileName -> { Map urlDetail = buildUrlDetailMap(fileName); @@ -258,7 +258,8 @@ public List getConfiguredScriptUrlDetail(String publicKey) { TpmCryptoRequestDto tpmCryptoRequestDto = new TpmCryptoRequestDto(); tpmCryptoRequestDto .setValue(CryptoUtil.encodeToURLSafeBase64(mapper.getObjectAsJsonString(urlDetail).getBytes())); - tpmCryptoRequestDto.setPublicKey(publicKey); + tpmCryptoRequestDto.setPublicKey(regCenterMachineDto.getPublicKey()); + tpmCryptoRequestDto.setClientType(regCenterMachineDto.getClientType()); TpmCryptoResponseDto tpmCryptoResponseDto = clientCryptoManagerService.csEncrypt(tpmCryptoRequestDto); list.add(new SyncDataBaseDto(fileName, "script", tpmCryptoResponseDto.getValue())); } catch (Exception e) { diff --git a/admin/kernel-syncdata-service/src/main/java/io/mosip/kernel/syncdata/service/impl/SyncMasterDataServiceImpl.java b/admin/kernel-syncdata-service/src/main/java/io/mosip/kernel/syncdata/service/impl/SyncMasterDataServiceImpl.java index edbcf7364b6..7115eb15c94 100644 --- a/admin/kernel-syncdata-service/src/main/java/io/mosip/kernel/syncdata/service/impl/SyncMasterDataServiceImpl.java +++ b/admin/kernel-syncdata-service/src/main/java/io/mosip/kernel/syncdata/service/impl/SyncMasterDataServiceImpl.java @@ -245,7 +245,7 @@ public SyncDataResponseDto syncClientSettingsV2(String regCenterId, String keyIn } List list = clientSettingsHelper.retrieveData(futureMap, regCenterMachineDto, true); - list.addAll(clientSettingsHelper.getConfiguredScriptUrlDetail(regCenterMachineDto.getPublicKey())); + list.addAll(clientSettingsHelper.getConfiguredScriptUrlDetail(regCenterMachineDto)); response.setDataToSync(list); return response; }