Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ExtKeyUsagesNameMap = map[x509.ExtKeyUsage]string{ x509.ExtKeyUsageAny: "Any", x509.ExtKeyUsageServerAuth: "TLS Web Server Authentication", x509.ExtKeyUsageClientAuth: "TLS Web Client Authentication", x509.ExtKeyUsageCodeSigning: "Code Signing", x509.ExtKeyUsageEmailProtection: "E-mail Protection", x509.ExtKeyUsageIPSECEndSystem: "IPSec End System", x509.ExtKeyUsageIPSECTunnel: "IPSec Tunnel", x509.ExtKeyUsageIPSECUser: "IPSec User", x509.ExtKeyUsageTimeStamping: "Time Stamping", x509.ExtKeyUsageOCSPSigning: "OCSP Signing", x509.ExtKeyUsageMicrosoftServerGatedCrypto: "Microsoft Server Gated Crypto", x509.ExtKeyUsageNetscapeServerGatedCrypto: "Netscape Server Gated Crypto", x509.ExtKeyUsageMicrosoftCommercialCodeSigning: "Microsoft Commercial Code Signing", x509.ExtKeyUsageMicrosoftKernelCodeSigning: "Microsoft Kernel Code Signing", }
View Source
var KeyUsageArray = []x509.KeyUsage{ x509.KeyUsageDigitalSignature, x509.KeyUsageContentCommitment, x509.KeyUsageKeyEncipherment, x509.KeyUsageDataEncipherment, x509.KeyUsageKeyAgreement, x509.KeyUsageCertSign, x509.KeyUsageCRLSign, x509.KeyUsageEncipherOnly, x509.KeyUsageDecipherOnly, }
View Source
var KeyUsageNameMap = map[int]string{
0: "Digital Signature",
1: "Non Repudiation",
2: "Key Encipherment",
3: "Data Encipherment",
4: "Key Agreement",
5: "Certificate Sign",
6: "CRL Sign",
7: "Encipher Only",
8: "Decipher Only",
}
Functions ¶
This section is empty.
Types ¶
type Cert ¶
type Cert struct { CommonName string `json:"commonName" yaml:"commonName"` AltNames []string `json:"altNames" yaml:"altNames"` NotBefore time.Time `json:"notBefore" yaml:"notBefore"` NotAfter time.Time `json:"notAfter" yaml:"notAfter"` KeyUsages []string `json:"keyUsages" yaml:"keyUsages"` ExtKeyUsages []string `json:"extKeyUsages" yaml:"extKeyUsages"` SerialNumber string `json:"serialNumber" yaml:"serialNumber"` Issuer string `json:"issuer" yaml:"issuer"` FingerPrints []CertFingerPrints `json:"fingerprints" yaml:"fingerprints"` }
func BuildCert ¶
func BuildCert(certificate *x509.Certificate) *Cert
type CertFingerPrints ¶
Click to show internal directories.
Click to hide internal directories.