impl

package
v0.0.0-...-9f7d4ad Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCA

func NewCA(baseDir, name string, signType int) (generator.CAGenerator, error)

NewCA 根据类型生成CA生成器

Types

type EcdsaCA

type EcdsaCA struct {
	Name     string
	Signer   crypto.Signer
	SignCert *x509.Certificate
}

EcdsaCA ecdsa CA结构

func (*EcdsaCA) GenerateLocalUser

func (ca *EcdsaCA) GenerateLocalUser(baseDir, name string) error

GenerateLocalUser 生成本地用户

func (*EcdsaCA) SignCertificate

func (ca *EcdsaCA) SignCertificate(baseDir, name string, sans []string, pub interface{}) (*x509.Certificate, error)

SignCertificate 证书签名

type SM2CA

type SM2CA struct {
	Name     string
	Signer   crypto.Signer
	SignCert *sm2.Certificate
	Sm2Key   csp.Key
}

SM2CA SM2 CA结构

func (*SM2CA) GenerateLocalUser

func (ca *SM2CA) GenerateLocalUser(baseDir, name string) error

GenerateLocalUser 生成本地用户

func (*SM2CA) SignCertificate

func (ca *SM2CA) SignCertificate(baseDir, name string, sans []string, pub interface{}) (*x509.Certificate, error)

SignCertificate 证书签名

Jump to

Keyboard shortcuts

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