crl

package
v0.0.0-...-2449554 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0, ISC, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListExtensionData

type ListExtensionData struct {
	CRLNumber int
	AuthKeyID x509.SubjAuthKeyId `json:"authority_key_id,omitempty"`
}

ListExtensionData - Data from optional, non-critical pkix.CertificateList extensions

type RevocationData

type RevocationData struct {
	CRLSignatureAlgorithm         x509.SignatureAlgorithm
	CRLSignatureValue             []byte
	Version                       int `asn1:"optional,default:0"`
	Issuer                        pkix.Name
	ThisUpdate                    time.Time
	NextUpdate                    time.Time `asn1:"optional"`
	CRLExtensions                 ListExtensionData
	UnknownCRLExtensions          []pkix.Extension `asn1:"tag:0,optional,explicit"`
	UnknownCriticalCRLExtensions  []pkix.Extension `asn1:"tag:0,optional,explicit"`
	IsRevoked                     bool
	RevocationTime                time.Time
	CertificateEntryExtensions    RevokedCertExtensionData
	RawCertificateEntryExtensions []pkix.Extension `asn1:"optional"`
}

RevocationData - information on whether a certificate has been revoked by a specified CRL, and information on the CRL

func CheckCRLForCert

func CheckCRLForCert(certList *pkix.CertificateList, cert *x509.Certificate, cache map[string]*pkix.RevokedCertificate) (*RevocationData, error)

CheckCRLForCert - parses through a given CRL and to see if a given certificate is present, and returns data on the revocation and CRL in general

type RevocationReasonCode

type RevocationReasonCode int

RevocationReasonCode - status codes that explain revocation reason see RFC 5280, Section 5.3.1

func (*RevocationReasonCode) MarshalJSON

func (code *RevocationReasonCode) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshler interface

func (*RevocationReasonCode) String

func (code *RevocationReasonCode) String() string

func (*RevocationReasonCode) UnmarshalJSON

func (code *RevocationReasonCode) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

type RevokedCertExtensionData

type RevokedCertExtensionData struct {
	Reason *RevocationReasonCode
	// contains filtered or unexported fields
}

RevokedCertExtensionData - Data from optional, non-critical pkix.RevokedCertificate extensions

Jump to

Keyboard shortcuts

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