Skip to content

Commit

Permalink
Merge pull request #150 from Chia-Network/chiacacrtandkey
Browse files Browse the repository at this point in the history
Add function to return the public CA cert and key for chia
  • Loading branch information
Starttoaster authored Sep 12, 2024
2 parents 1ba7210 + 0ba83b5 commit bf342f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/tls/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf342f4

Please sign in to comment.