Documentation
¶
Overview ¶
Package cert provides methods for TLS certification
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCertificate ¶
GenerateCertificate Self Signed certificate using given CN, returns x509 cert and priv key in PEM format
func GetGrpcCredential ¶
func GetGrpcCredential(ctx context.Context) (credentials.TransportCredentials, error)
GetGrpcCredential gets the gRPC credentials from Secret data in kubernetes cluster
- If the secret data that carries the TLS certification information exists in the cluster, just use it.
- If no secret is found, create and save it in cluster, and use it for gRPC.
func GetTLSCertificate ¶
func GetTLSCertificate(cert, priv []byte) (tls.Certificate, error)
GetTLSCertificate from pub and priv key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.