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();