Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveSecurityContext ¶
func SaveSecurityContext(ctx *StoredSecurityContext, path string) error
SaveSecurityContext saves the context as JSON to the specified path.
Types ¶
type StoredSecurityContext ¶
type StoredSecurityContext struct {
PrivateKey string `json:"privateKey"`
Certificate string `json:"certificate"`
CertificateHash string `json:"certificateHash"`
}
StoredSecurityContext holds PEM-encoded cert/key for config/server and a fingerprint for discovery. Matches Dart model.
func GenerateSecurityContext ¶
func GenerateSecurityContext(alias string) (*StoredSecurityContext, error)
GenerateSecurityContext creates a new security context with keys and a self-signed certificate.
func LoadSecurityContext ¶
func LoadSecurityContext(path string) (*StoredSecurityContext, error)
LoadSecurityContext loads the context from JSON from the specified path.
Click to show internal directories.
Click to hide internal directories.