Documentation ¶
Index ¶
- Constants
- func CreatePersonCERT(RootCa *x509.Certificate, RootKey *rsa.PrivateKey, info CertInfo) error
- func CreateRootCERT(info CertInfo) error
- func FileExists(name string) bool
- func Parse(crtPath, keyPath string) (rootcertificate *x509.Certificate, rootPrivateKey *rsa.PrivateKey, err error)
- func ParseCrt(path string) (*x509.Certificate, error)
- func ParseCrtString(str string) (*x509.Certificate, error)
- func ParseKey(path string) (*rsa.PrivateKey, error)
- func PathExists(path string) (bool, error)
- func ReadFile(path string) string
- func VerifyCrt()
- type CertInfo
- type X509mit
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 FileExists ¶
func Parse ¶
func Parse(crtPath, keyPath string) (rootcertificate *x509.Certificate, rootPrivateKey *rsa.PrivateKey, err error)
func ParseCrtString ¶
func ParseCrtString(str string) (*x509.Certificate, error)
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
Click to show internal directories.
Click to hide internal directories.