smaller fixes

This commit is contained in:
Daniel Hougaard
2025-10-21 20:48:47 +04:00
parent c8a00e7e3f
commit 0f925cfaad
4 changed files with 19 additions and 5 deletions
+2 -2
View File
@@ -1083,8 +1083,8 @@ export const kmsServiceFactory = ({
const isHsmActive = hsmStatus.isHsmConfigured;
logger.info("KMS: Generating new ROOT Key");
const newRootKey = crypto.randomBytes(32);
logger.info(`KMS: Generating new ROOT Key with ${isHsmActive ? "HSM" : "software"} encryption`);
const newRootKey = isHsmActive ? await hsmService.randomBytes(32) : crypto.randomBytes(32);
const encryptionStrategy = isHsmActive ? RootKeyEncryptionStrategy.HSM : RootKeyEncryptionStrategy.Software;