revocation

package
v0.0.0-...-abecaaa Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: BSD-2-Clause Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRL

type CRL []asn1.RawValue

CRL contains the raw bytes of a pkix.CertificateList and can be parsed with x509.PParseCRL.

type InfoArchival

type InfoArchival struct {
	CRL   CRL   `asn1:"tag:0,optional,explicit"`
	OCSP  OCSP  `asn1:"tag:1,optional,explicit"`
	Other Other `asn1:"tag:2,optional,explicit"`
}

InfoArchival is the pkcs7 container containing the revocation information for all embedded certificates.

Currently the internal structure is exposed but I don't like to expose the asn1.RawValue objects. We can probably make them private and expose the information with functions.

func (*InfoArchival) AddCRL

func (r *InfoArchival) AddCRL(b []byte) error

AddCRL is used to embed an CRL to revocation.InfoArchival object. You directly pass the bytes of a downloaded CRL to this function.

func (*InfoArchival) AddOCSP

func (r *InfoArchival) AddOCSP(b []byte) error

AddOCSP is used to embed the raw bytes of an OCSP response.

func (*InfoArchival) IsRevoked

func (r *InfoArchival) IsRevoked(c *x509.Certificate) bool

IsRevoked checks if there is a status inclded for the certificate and returns true if the certificate is marked as revoked.

TODO: We should report if there is no CRL or OCSP response embedded for this certificate TODO: Information about the revocation (time, reason, etc) must be extractable

type OCSP

type OCSP []asn1.RawValue

OCSP contains the raw bytes of an OCSP response and can be parsed with x/crypto/ocsp.ParseResponse

type Other

type Other struct {
	Type  asn1.ObjectIdentifier
	Value []byte
}

ANS.1 Object OtherRevInfo

Jump to

Keyboard shortcuts

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