Documentation ¶
Index ¶
- Constants
- func BytesToHex(bytes []byte) string
- func FormatOID(header, oldKey, newKey string) string
- func GetPidFromSubject(subjectAsText string) (int32, error)
- func GetVidFromSubject(subjectAsText string) (int32, error)
- func RemoveWhitespaces(pem string) string
- func ToBase64String(subject []byte) string
- func ToSubjectAsText(subject string) string
- type Certificate
Constants ¶
View Source
const ( Mvid = "Mvid" Mpid = "Mpid" )
Variables ¶
This section is empty.
Functions ¶
func BytesToHex ¶
func FormatOID ¶ added in v0.10.0
This function is needed to patch the Issuer/Subject(vid/pid) field of certificate to hex format. https://github.com/zigbee-alliance/distributed-compliance-ledger/issues/270
func GetPidFromSubject ¶ added in v1.2.0
func GetVidFromSubject ¶ added in v1.2.0
func RemoveWhitespaces ¶ added in v1.4.3
func ToBase64String ¶ added in v0.10.0
func ToSubjectAsText ¶ added in v0.10.0
Types ¶
type Certificate ¶ added in v0.10.0
type Certificate struct { Issuer string SerialNumber string Subject string SubjectAsText string SubjectKeyID string AuthorityKeyID string Certificate *x509.Certificate }
func DecodeX509Certificate ¶
func DecodeX509Certificate(pemCertificate string) (*Certificate, error)
func (Certificate) IsSelfSigned ¶ added in v0.10.0
func (c Certificate) IsSelfSigned() bool
func (Certificate) Verify ¶ added in v0.10.0
func (c Certificate) Verify(parent *Certificate, blockTime time.Time) error
Click to show internal directories.
Click to hide internal directories.