Documentation ¶
Index ¶
- func CaCertKeyPair() ([]byte, []byte, error)
- func CertificateAuthority() (*x509.Certificate, *rsa.PrivateKey, error)
- func ClientTLSConfig(c *config.MonarchClientConfig) (*tls.Config, error)
- func DecryptAES(key []byte, ciphertext string) (string, error)
- func EncryptAES(key []byte, plaintext string) (string, error)
- func NewClientCertificate(cn string) ([]byte, []byte, error)
- func RandomBytes(n int) []byte
- func ServerCertKeyPair() ([]byte, []byte, error)
- func ServerTLSConfig() (*tls.Config, error)
- type CertVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaCertKeyPair ¶
CaCertKeyPair returns pem encoded certificate and key for monarchCA
func CertificateAuthority ¶
func CertificateAuthority() (*x509.Certificate, *rsa.PrivateKey, error)
func ClientTLSConfig ¶
func ClientTLSConfig(c *config.MonarchClientConfig) (*tls.Config, error)
func NewClientCertificate ¶
NewClientCertificate generates a cert-key pair for a newly created operator
func RandomBytes ¶
func ServerCertKeyPair ¶
func ServerTLSConfig ¶
Types ¶
type CertVerifier ¶
type CertVerifier func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error
func PeerCertificateVerifier ¶
func PeerCertificateVerifier(caCertPEM []byte) CertVerifier
Click to show internal directories.
Click to hide internal directories.