qcstatements

package
v0.0.0-...-f4af55d Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package qcstatements contains functions for building and extracting qualified statements for PSD2 qualified certificates. See ETSI TS 119 495 v1.2.1 and RFC 3739.

Index

Constants

This section is empty.

Variables

View Source
var (
	// QSEALType is the ASN.1 object identifier for QSeal certificates.
	QSEALType = asn1.ObjectIdentifier{0, 4, 0, 1862, 1, 6, 2}
	// QWACType is the ASN.1 object identifier for QWA certificates.
	QWACType = asn1.ObjectIdentifier{0, 4, 0, 1862, 1, 6, 3}
)

Functions

func Dump

func Dump(d []byte) error

Dump outputs to stdout a human-readable representation of an encoded qualified statement.

func DumpFromHex

func DumpFromHex(h string) error

DumpFromHex outputs to stdout a human-readable representation of a hex encoded qualified statement.

func Serialize

func Serialize(roles []Role, ca CompetentAuthority, t asn1.ObjectIdentifier) ([]byte, error)

Serialize will serialize the given roles and CA information into a DER encoded ASN.1 qualified statement. qcType should be one of QWACType or QSEALType.

Types

type CompetentAuthority

type CompetentAuthority struct {
	// Name of the authority, e.g. "Financial Conduct Authority".
	Name string
	// NCA identifier of the authority, e.g. "GB-FCA".
	ID string
}

CompetentAuthority under PSD2.

func CompetentAuthorityForCountryCode

func CompetentAuthorityForCountryCode(code string) (*CompetentAuthority, error)

CompetentAuthorityForCountryCode returns the correct competent authority string, e.g., "GB-FCA", based on the given country code.

type Role

type Role string

Role represents the role of the Payment Service Provider (PSP).

const (
	RoleAccountServicing   Role = "PSP_AS"
	RolePaymentInitiation  Role = "PSP_PI"
	RoleAccountInformation Role = "PSP_AI"
	RolePaymentInstruments Role = "PSP_IC"
)

Standard PSP roles.

func Extract

func Extract(data []byte) ([]Role, string, string, error)

Extract returns the roles, CA name and CA ID from an encoded qualified statement.

Jump to

Keyboard shortcuts

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