Documentation ¶
Overview ¶
ThreatSpec package github.com/pki-io/core/x509 as x509
ThreatSpec package github.com/pki-io/core/x509 as x509
ThreatSpec package github.com/pki-io/core/x509 as x509
ThreatSpec package github.com/pki-io/core/x509 as x509
Index ¶
- Constants
- func NewID() string
- func NewSerial() (*big.Int, error)
- func PemDecodeX509CSR(in []byte) (*x509.CertificateRequest, error)
- func PemDecodeX509Certificate(in []byte) (*x509.Certificate, error)
- func PemEncodeX509CSRDER(cert []byte) []byte
- func PemEncodeX509CertificateDER(cert []byte) []byte
- type CA
- func (ca *CA) Certificate() (*x509.Certificate, error)
- func (ca *CA) Dump() string
- func (ca *CA) GenerateRoot() error
- func (ca *CA) GenerateSub(parentCA interface{}) error
- func (ca *CA) Id() string
- func (ca *CA) Load(jsonString interface{}) error
- func (ca *CA) Name() string
- func (ca *CA) PrivateKey() (interface{}, error)
- func (ca *CA) Sign(csr *CSR, useCSRSubject bool) (*Certificate, error)
- type CAData
- type CSR
- type CSRData
- type Certificate
- func (certificate *Certificate) Certificate() (*x509.Certificate, error)
- func (certificate *Certificate) Dump() string
- func (certificate *Certificate) Generate(parentCertificate interface{}, subject *pkix.Name) error
- func (certificate *Certificate) Id() string
- func (certificate *Certificate) Load(jsonString interface{}) error
- func (certificate *Certificate) Name() string
- func (certificate *Certificate) PrivateKey() (interface{}, error)
- type CertificateData
Constants ¶
View Source
const CADefault string = `` /* 528-byte string literal not displayed */
View Source
const CASchema string = `` /* 3869-byte string literal not displayed */
View Source
const CSRDefault string = `` /* 220-byte string literal not displayed */
View Source
const CSRSchema string = `` /* 1554-byte string literal not displayed */
View Source
const CertificateDefault string = `` /* 307-byte string literal not displayed */
View Source
const CertificateSchema string = `` /* 2055-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func PemDecodeX509CSR ¶
func PemDecodeX509CSR(in []byte) (*x509.CertificateRequest, error)
func PemDecodeX509Certificate ¶
func PemDecodeX509Certificate(in []byte) (*x509.Certificate, error)
func PemEncodeX509CSRDER ¶
Types ¶
type CA ¶
func (*CA) Certificate ¶
func (ca *CA) Certificate() (*x509.Certificate, error)
func (*CA) GenerateRoot ¶
func (*CA) GenerateSub ¶
ThreatSpec TMv0.1 for CA.GenerateSub Does Sub-CA certificate generation for App:X509
func (*CA) PrivateKey ¶
type CAData ¶
type CAData struct { Scope string `json:"scope"` Version int `json:"version"` Type string `json:"type"` Options string `json:"options"` Body struct { Id string `json:"id"` Name string `json:"name"` CAExpiry int `json:"ca-expiry"` CertExpiry int `json:"cert-expiry"` Certificate string `json:"certificate"` PrivateKey string `json:"private-key"` KeyType string `json:"key-type"` DNScope struct { Country string `json:"country"` Organization string `json:"organization"` OrganizationalUnit string `json:"organizational-unit"` Locality string `json:"locality"` Province string `json:"province"` StreetAddress string `json:"street-address"` PostalCode string `json:"postal-code"` } `json:"dn-scope"` } `json:"body"` }
type CSRData ¶
type CSRData struct { Scope string `json:"scope"` Version int `json:"version"` Type string `json:"type"` Options string `json:"options"` Body struct { Id string `json:"id"` Name string `json:"name"` CSR string `json:"csr"` KeyType string `json:"key-type"` PrivateKey string `json:"private-key"` } `json:"body"` }
type Certificate ¶
type Certificate struct { document.Document Data CertificateData }
func NewCertificate ¶
func NewCertificate(jsonString interface{}) (*Certificate, error)
func (*Certificate) Certificate ¶
func (certificate *Certificate) Certificate() (*x509.Certificate, error)
func (*Certificate) Dump ¶
func (certificate *Certificate) Dump() string
ThreatSpec TMv0.1 for Certificate.Dump Does certificate JSON dumping for App:X509
func (*Certificate) Generate ¶
func (certificate *Certificate) Generate(parentCertificate interface{}, subject *pkix.Name) error
func (*Certificate) Id ¶
func (certificate *Certificate) Id() string
func (*Certificate) Load ¶
func (certificate *Certificate) Load(jsonString interface{}) error
func (*Certificate) Name ¶
func (certificate *Certificate) Name() string
func (*Certificate) PrivateKey ¶
func (certificate *Certificate) PrivateKey() (interface{}, error)
ThreatSpec TMv0.1 for Certificate.PrivateKey Returns certificate private key for App:X509
type CertificateData ¶
type CertificateData struct { Scope string `json:"scope"` Version int `json:"version"` Type string `json:"type"` Options string `json:"options"` Body struct { Id string `json:"id"` Name string `json:"name"` Expiry int `json:"expiry"` KeyType string `json:"key-type"` Tags []string `json:"tags"` Certificate string `json:"certificate"` PrivateKey string `json:"private-key"` CACertificate string `json:"ca-certificate"` } `json:"body"` }
Click to show internal directories.
Click to hide internal directories.