cert

package
v0.0.0-...-d123447 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CertFormatPEM    certFormat = "PEM"
	CertFormatRawPEM certFormat = "RawPEM" // PEM without headers
	CertFormatDER    certFormat = "DER"
	CertFormatPKCS7  certFormat = "PKCS7"
)

Variables

This section is empty.

Functions

func GetCertFormat

func GetCertFormat(crtContent []byte) (certFormat, error)

Types

type NCA

type NCA struct {
	Country string
	Name    string
	Id      string
}

type PSD2QcType

type PSD2QcType struct {
	RolesOfPSP []Role
	NCAName    string
	NCAId      string
}

type ParsedCert

type ParsedCert struct {
	Cert      *x509.Certificate `json:"-"` // not serialized
	Registers []models.Register `bson:"registers" json:"registers"`
	CreatedAt time.Time         `bson:"created_at" json:"created_at"`
	UpdatedAt time.Time         `bson:"updated_at" json:"updated_at"`
	IsActive  bool              `bson:"is_active" json:"is_active"`
	Position  models.Position   `bson:"position" json:"position"`
}

func ParseCerts

func ParseCerts(data []byte) ([]*ParsedCert, error)

func (*ParsedCert) CertificateResponse

func (c *ParsedCert) CertificateResponse() (*models.CertificateResponse, error)

func (*ParsedCert) CompanyId

func (c *ParsedCert) CompanyId() string

func (*ParsedCert) Expired

func (c *ParsedCert) Expired() bool

func (*ParsedCert) IsSandbox

func (c *ParsedCert) IsSandbox() bool

func (*ParsedCert) NCA

func (c *ParsedCert) NCA() (*NCA, error)

func (*ParsedCert) OBScopes

func (c *ParsedCert) OBScopes() ([]models.Scope, error)

func (*ParsedCert) Pem

func (c *ParsedCert) Pem() []byte

func (*ParsedCert) Sha256

func (c *ParsedCert) Sha256() string

func (*ParsedCert) ToBson

func (c *ParsedCert) ToBson() (bson.M, error)

func (*ParsedCert) UnmarshalBSON

func (c *ParsedCert) UnmarshalBSON(data []byte) error

func (*ParsedCert) Usage

func (c *ParsedCert) Usage() models.CertUsage

type PolicyInformation

type PolicyInformation struct {
	PolicyIdentifier asn1.ObjectIdentifier
	PolicyQualifiers []PolicyQualifierInfo `asn1:"optional"`
}

type PolicyQualifierInfo

type PolicyQualifierInfo struct {
	PolicyQualifierId asn1.ObjectIdentifier
	Qualifier         asn1.RawValue `asn1:"optional"`
}

type QCStatement

type QCStatement struct {
	ID    asn1.ObjectIdentifier
	Value asn1.RawValue `asn1:"optional"`
}

type Role

type Role struct {
	OID   asn1.ObjectIdentifier
	Value models.ObRole
}

Jump to

Keyboard shortcuts

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