Documentation ¶
Index ¶
Constants ¶
View Source
const ( PemBlockTypeCertificate PemBlockType = "CERTIFICATE" PemBlockTypeCsr = "CERTIFICATE REQUEST" PemBlockTypePrivateKey = "PRIVATE KEY" PemBlockTypeRSAPrivateKey = "RSA PRIVATE KEY" PemBlockTypePublicKey = "PUBLIC KEY" )
Variables ¶
View Source
var ErrStorageDir = errors.New("storage directory is empty")
Functions ¶
This section is empty.
Types ¶
type PemBlockType ¶
type PemBlockType string
type Sign ¶
type Sign struct { Cert *x509.Certificate CertPem []byte PrivateKey crypto.PrivateKey PrivateKeyPem []byte }
func GenerateSign ¶
func GenerateSign(opts ...SignGenOption) (*Sign, error)
func (*Sign) GrpcClientCredentials ¶
func (s *Sign) GrpcClientCredentials() (credentials.TransportCredentials, error)
func (*Sign) GrpcServerCredentials ¶
func (s *Sign) GrpcServerCredentials() (credentials.TransportCredentials, error)
type SignGenOption ¶
type SignGenOption func(opts *SignGenOptions) error
func WithCA ¶
func WithCA() SignGenOption
func WithDNSNames ¶
func WithDNSNames(dnsNames ...string) SignGenOption
func WithIPAddresses ¶
func WithIPAddresses(ips ...net.IP) SignGenOption
func WithLocalIPAddresses ¶
func WithLocalIPAddresses() SignGenOption
func WithParentSign ¶
func WithParentSign(sign *Sign) SignGenOption
func WithRsaSigner ¶
func WithRsaSigner(bits int) SignGenOption
type SignGenOptions ¶
type SignGenOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.