misc: addressed comments

This commit is contained in:
Sheen Capadngan
2025-02-20 01:46:50 +08:00
parent f0e6bcef9b
commit d6c1b8e30c
13 changed files with 41 additions and 32 deletions
@@ -40,3 +40,9 @@ export const isCertChainValid = async (certificates: x509.X509Certificate[]) =>
// chain.build() implicitly verifies the chain
return chainItems.length === certificates.length;
};
export const constructPemChainFromCerts = (certificates: x509.X509Certificate[]) =>
certificates
.map((cert) => cert.toString("pem"))
.join("\n")
.trim();
-2
View File
@@ -104,7 +104,6 @@ export const kmskeyDALFactory = (db: TDbClient) => {
.join(TableName.InternalKms, `${TableName.KmsKey}.id`, `${TableName.InternalKms}.kmsKeyId`)
.select(selectAllTableCols(TableName.KmsKey))
.select(
db.ref("encryptedKey").withSchema(TableName.InternalKms).as("internalKmsEncryptedKey"),
db.ref("encryptionAlgorithm").withSchema(TableName.InternalKms).as("internalKmsEncryptionAlgorithm"),
db.ref("version").withSchema(TableName.InternalKms).as("internalKmsVersion")
);
@@ -112,7 +111,6 @@ export const kmskeyDALFactory = (db: TDbClient) => {
return result.map((entry) => ({
...KmsKeysSchema.parse(entry),
isActive: !entry.isDisabled,
encryptedKey: entry.internalKmsEncryptedKey,
algorithm: entry.internalKmsEncryptionAlgorithm,
version: entry.internalKmsVersion
}));