Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IssuerSerial ¶
type IssuerSerial EntryType
IssuerSerial is an alias for a string that is formatted as "<IssuerName>,<B64 Serial>"
func NewIssuerSerial ¶
func NewIssuerSerial(issuer *pkix.RDNSequence, serial []byte) IssuerSerial
type Record ¶
type Record interface { IssuerSerial() *IssuerSerial SubjectKeyHash() *SubjectKeyHash Type() Type }
type SetImpl ¶
type SetImpl struct {
// contains filtered or unexported fields
}
SetImpl holds a mapping of IssuerSerial -> Record and a mapping SubjectKeyHash -> Record and provides a logical, singular, view into both datasets.
For example, if you wish to find if a Record is within a SetImpl then the provided record will be asked for its type. If it is an IssuerSerialType then the issuerSerial map will be checked. If it is a SubjectKeyHashType, then the subjectKeyHash map will be checked. If it is Either then both will be checked.
Consumers of this struct SHOULD embed a *SetImpl and override the Add method if they wish to make the underlying Records homogenous.
SetImpl has a dependency injection requirement on a factory function for a specific type of Set. This is required as the set operations (Union, Difference, and Intersection) need to return a new Set
func NewDynamicSetImpl ¶
func NewDynamicSetImpl() *SetImpl
func NewSetImpl ¶
func (*SetImpl) Add ¶
Add will ATTEMPT to add the provided to record to the set. If the record cannot serialize itself into the appropriate type (IsserSerial:SubjectKeyHash) then it will be silent ignored. Implementors of Record SHOULD log errors this case as implementors are much closer to the data and can provide more meaningful messages than can be accomplished in this stack frame.
The reason why this is an attemp is because there are entries within staging that are junk data that result in a B64 or ASN1 decoding error. We would HOPE that "real" entries aren't going to suffer from this, however we have not way to tell which entries are test data and which are destined for production. I suppose if an entry doesn't show up on Bugzilla, but you see it logged, then we know why.
func (*SetImpl) Difference ¶
Difference returns a Set of all Records that are in self but are NOT in other. If self is homogenous then the returned Set will be homogenous and off the same type as self.
func (*SetImpl) Intersection ¶
Intersection returns a Set of all Records that are both in self AND in other. If self is homogenous then the returned // Set will be homogenous and off the same type as self.
func (*SetImpl) Union ¶
Union returns the unino of self and other. If self and other are homogenous and of same type, then the returned Set will also be homogenous of the same type. Otherwise the returned set will be heterogeneous.
If the Set returned by the set factory injected into this struct enforces type checking then this method will likely panic in the heterogeneous case.
type SubjectKeyHash ¶
type SubjectKeyHash EntryType
IssuerSerial is an alias for a string that is formatted as "<SubjectName>,<B64 Key Hash>"
func NewSubjectKeyHash ¶
func NewSubjectKeyHash(subject *pkix.RDNSequence, hash []byte) SubjectKeyHash