Documentation ¶
Index ¶
- func CreateCertManager(datadir string, letsencryptDomain ...string) (*autocert.Manager, error)
- func Decrypt(encryptedMsg []byte, peerPublicKey wgtypes.Key, privateKey wgtypes.Key) ([]byte, error)
- func DecryptMessage(remotePubKey wgtypes.Key, ourPrivateKey wgtypes.Key, encryptedMessage []byte, ...) error
- func Encrypt(msg []byte, peerPublicKey wgtypes.Key, privateKey wgtypes.Key) ([]byte, error)
- func EncryptMessage(remotePubKey wgtypes.Key, ourPrivateKey wgtypes.Key, message pb.Message) ([]byte, error)
- func LoadTLSConfig(certFile, keyFile string) (*tls.Config, error)
- type Route53TLS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCertManager ¶
CreateCertManager wraps common logic of generating Let's encrypt certificate.
func Decrypt ¶
func Decrypt(encryptedMsg []byte, peerPublicKey wgtypes.Key, privateKey wgtypes.Key) ([]byte, error)
Decrypt decrypts a message that has been encrypted by the remote peer using Wireguard private key and remote peer's public key.
func DecryptMessage ¶
func DecryptMessage(remotePubKey wgtypes.Key, ourPrivateKey wgtypes.Key, encryptedMessage []byte, message pb.Message) error
DecryptMessage decrypts an encrypted message into given protobuf Message
func Encrypt ¶
Encrypt encrypts a message using local Wireguard private key and remote peer's public key.
Types ¶
type Route53TLS ¶ added in v0.29.0
Route53TLS by default, loads the AWS configuration from the environment. env variables: AWS_REGION, AWS_PROFILE, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
func (*Route53TLS) GetCertificate ¶ added in v0.29.0
func (r *Route53TLS) GetCertificate() (*tls.Config, error)
Click to show internal directories.
Click to hide internal directories.