From 0ba83b5bd868006d57b2c813da148429cd07b020 Mon Sep 17 00:00:00 2001 From: Starttoaster Date: Wed, 11 Sep 2024 21:48:18 -0700 Subject: [PATCH] Add function to return the public CA cert and key for chia --- pkg/tls/tls.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/tls/tls.go b/pkg/tls/tls.go index 3545f96..d939532 100644 --- a/pkg/tls/tls.go +++ b/pkg/tls/tls.go @@ -116,6 +116,11 @@ func GenerateAllCerts(outDir string, privateCACert *x509.Certificate, privateCAK return nil } +// GetChiaCACertAndKey returns the cert and key bytes for chia_ca.crt and chia_ca.key +func GetChiaCACertAndKey() ([]byte, []byte) { + return chiaCACrtBytes, chiaCAKeyBytes +} + // CertMatchesPrivateKey tests to make the sure cert and private key match func CertMatchesPrivateKey(cert *x509.Certificate, privateKey *rsa.PrivateKey) bool { publicKey := &privateKey.PublicKey