mitx509

package
v0.0.0-...-119215d Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	X509Version = 1.0
	CertPath    = "cert"
	RootCrtName = "tnb_root.crt"
	RootKeyName = "tnb_root.key"
)

Variables

This section is empty.

Functions

func CreatePersonCERT

func CreatePersonCERT(RootCa *x509.Certificate, RootKey *rsa.PrivateKey, info CertInfo) error

func CreateRootCERT

func CreateRootCERT(info CertInfo) error

rootCert only for M.I.T

func FileExists

func FileExists(name string) bool

func Parse

func Parse(crtPath, keyPath string) (rootcertificate *x509.Certificate, rootPrivateKey *rsa.PrivateKey, err error)

func ParseCrt

func ParseCrt(path string) (*x509.Certificate, error)

func ParseCrtString

func ParseCrtString(str string) (*x509.Certificate, error)

func ParseKey

func ParseKey(path string) (*rsa.PrivateKey, error)

func PathExists

func PathExists(path string) (bool, error)

path is exist

func ReadFile

func ReadFile(path string) string

func VerifyCrt

func VerifyCrt()

Types

type CertInfo

type CertInfo struct {
	Country            []string
	Organization       []string
	OrganizationalUnit []string
	EmailAddress       []string
	Province           []string
	Locality           []string
	CommonName         string
	CrtName            string
	KeyName            string
	IsCA               bool
	Names              []pkix.AttributeTypeAndValue
}

struct for x509

type X509mit

type X509mit struct {
	// contains filtered or unexported fields
}

func (*X509mit) GenCa

func (x *X509mit) GenCa(country []string, organization []string, organizationalUnit []string) *X509mit

func (*X509mit) Is

func (x *X509mit) Is([]byte)

func (*X509mit) ReadCa

func (x *X509mit) ReadCa([]byte)

func (*X509mit) VerifyCa

func (x *X509mit) VerifyCa([]byte)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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