internal

package
v0.0.0-...-9d78088 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrganizationName

func GetOrganizationName(c *x509.Certificate) string

GetOrganizationName returns organization name from the certificate

Priority:

  • Issuer O
  • Subject O
  • Subject CN

func GetRemainingDays

func GetRemainingDays(c *x509.Certificate, now time.Time) int

GetRemainingDays returns remaining validity period of the certificate in days

func GetTNEntrySPC

func GetTNEntrySPC(c *x509.Certificate) (string, error)

func GetUniqueOCN

func GetUniqueOCN(c *x509.Certificate) string

func GetValidityDays

func GetValidityDays(c *x509.Certificate) int

GetValidityDays returns validity period of the certificate in days

func ParseCertificates

func ParseCertificates(source []byte) []*x509.Certificate

ParseCertificates parses certificates from the DER or PEM source

Types

type PemCertificate

type PemCertificate struct {
	Headers     map[string]string
	Certificate *x509.Certificate
}

type TNAuthorizationList

type TNAuthorizationList = []TNEntry

TNAuthorizationList represents the ASN.1 structure of the same name. See RFC 8226

func ParseTNAuthorizationList

func ParseTNAuthorizationList(raw []byte) (TNAuthorizationList, error)

type TNEntry

type TNEntry struct {
	SPC string
}

TNEntry represents the ASN.1 structure of the same name. See RFC 8226

Jump to

Keyboard shortcuts

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