feat: pki and ssh setup for instance proxy

This commit is contained in:
Sheen Capadngan
2025-08-26 03:02:34 +08:00
parent b3002d784e
commit cc34b92d56
15 changed files with 703 additions and 3 deletions
@@ -52,6 +52,9 @@ export const constructPemChainFromCerts = (certificates: x509.X509Certificate[])
.join("\n")
.trim();
export const prependCertToPemChain = (cert: x509.X509Certificate, pemChain: string) =>
`${cert.toString("pem")}\n${pemChain}`;
export const splitPemChain = (pemText: string) => {
const re2Pattern = new RE2("-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----", "g");