Documentation ¶
Index ¶
- func GetActiveCertificates(jwks []interface{}, instant time.Time) []*x509.Certificate
- func GetCertificate(jwkAsMap interface{}) *x509.Certificate
- func MarshalNutsDomain(domain string) ([]byte, error)
- func MarshalOtherSubjectAltName(valueType asn1.ObjectIdentifier, value string) ([]byte, error)
- func UnmarshalNutsDomain(data []byte) (string, error)
- func UnmarshalOtherSubjectAltName(valueType asn1.ObjectIdentifier, data []byte) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActiveCertificates ¶
func GetActiveCertificates(jwks []interface{}, instant time.Time) []*x509.Certificate
GetActiveCertificates converts the given JWKs to X509 certificates and returns them sorted, longest valid certificate first. Expired certificates aren't returned.
func GetCertificate ¶
func GetCertificate(jwkAsMap interface{}) *x509.Certificate
GetCertificate converts the given JWK to a X.509 certificate chain, returning the topmost certificate. If the JWK does not contain any certificates, nil is returned.
func MarshalNutsDomain ¶
func MarshalOtherSubjectAltName ¶
func MarshalOtherSubjectAltName(valueType asn1.ObjectIdentifier, value string) ([]byte, error)
func UnmarshalNutsDomain ¶
UnmarshalNutsDomain tries to unmarshal the ASN.1 encoded Nuts Domain extension in a X.509 certificate. It returns the value as a string, or an error if one occurs.
func UnmarshalOtherSubjectAltName ¶
func UnmarshalOtherSubjectAltName(valueType asn1.ObjectIdentifier, data []byte) (string, error)
UnmarshalOtherSubjectAltName tries to unmarshal an SubjectAlternativeName otherName entry (marshalled by MarshalOtherSubjectAltName) with the given OID type (valueType). It returns the value as string. If an otherName with the given type wasn't found, an empty string is returned. If an errors occurs during unmarshalling, it is returned.
Types ¶
This section is empty.