Added tests and readme

This commit is contained in:
2026-05-12 06:20:51 +00:00
parent 7e85bb0fcc
commit 139c224a31
23 changed files with 1449 additions and 97 deletions
-6
View File
@@ -88,12 +88,6 @@ func LoadCertPEM() ([]byte, error) {
return os.ReadFile(config.CertFilePath())
}
// LoadPublicKeyPEM reads the public-key PEM (exchanged out of band
// during invite / join).
func LoadPublicKeyPEM() ([]byte, error) {
return os.ReadFile(config.PublicKeyPath())
}
func writePEM(path, blockType string, der []byte, perm os.FileMode) error {
encoded := pem.EncodeToMemory(&pem.Block{Type: blockType, Bytes: der})
return config.AtomicWrite(path, encoded, perm)