cert

package
v4.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package cert provides methods for TLS certification

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCertificate

func GenerateCertificate(ctx context.Context, cn string, dnsName string) ([]byte, []byte, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL