eudi

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Production_Yivi_RootCertificateRevocationListDistributionPoint       = "https://ca.yivi.app/ejbca/publicweb/crls/search.cgi?iHash=AKPlCD/saQ9CmdXzNQpPgmO%2BHQM"
	Production_Yivi_IssuerCaCertificateRevocationListDistributionPoint   = "https://ca.yivi.app/ejbca/publicweb/crls/search.cgi?iHash=TNFX2bhlb1JXido8TZQr1Wqlcb8"
	Production_Yivi_VerifierCaCertificateRevocationListDistributionPoint = "https://ca.yivi.app/ejbca/publicweb/crls/search.cgi?iHash=kP7IIn8hVVbRGQECuKyMxPkQM8k"

	Production_Yivi_IssuerTrustAnchor = `` /* 1635-byte string literal not displayed */

	Production_Yivi_VerifierTrustAnchor = `` /* 1621-byte string literal not displayed */

)

Production trust anchors

View Source
const (
	Staging_Yivi_RootCertificateRevocationListDistributionPoint       = "https://ca.staging.yivi.app/ejbca/publicweb/crls/search.cgi?iHash=kFCOt8NLhJ8g0WqMAnl%2BvoN2RuY"
	Staging_Yivi_IssuerCaCertificateRevocationListDistributionPoint   = "https://ca.staging.yivi.app/ejbca/publicweb/crls/search.cgi?iHash=NGSB30tAE2E/Z/j4V%2B%2BTTTS5Ay0"
	Staging_Yivi_VerifierCaCertificateRevocationListDistributionPoint = "https://ca.staging.yivi.app/ejbca/publicweb/crls/search.cgi?iHash=gVrSxh0lO5cdqAS18OiZ/oui5h4"

	Staging_Yivi_IssuerTrustAnchor = `` /* 1870-byte string literal not displayed */

	Staging_Yivi_VerifierTrustAnchor = `` /* 1855-byte string literal not displayed */

)

Staging trust anchors

Variables

View Source
var Logger *logrus.Logger

Logger is used for logging. For now, it will be set via the Client component

Functions

func LoadLogoImage added in v1.0.0

func LoadLogoImage(manager filesystem.LogoManager, key string) *clientmodels.Image

LoadLogoImage looks up a previously-saved logo by its logical key and wraps it as a base64-encoded clientmodels.Image. Returns nil when the key is empty, the manager is unavailable, or no logo is cached.

Types

type CertificateVerificationMode added in v1.0.0

type CertificateVerificationMode int
const (
	StrictCertificateVerification CertificateVerificationMode = iota
	DeveloperModeCertificateVerification
)

type Configuration

type Configuration struct {
	Storage   storage.Storage
	Issuers   TrustModel
	Verifiers TrustModel
	// contains filtered or unexported fields
}

Configuration keeps track of issuer and requestor trusted chains and certificate revocation lists, retrieving them from the eudi folder, and downloads and saves new ones on demand. The trust chains are stored in the issuers and verifiers subfolders (.pem files), and the crls in the crls subfolder (.crl files). The trust chains are expected to be in PEM format, where the first certificate is the root, followed by intermediate certificates.

func NewConfiguration

func NewConfiguration(s storage.Storage) (conf *Configuration, err error)

NewConfiguration returns a new configuration. After this ParseFolder() should be called to parse the specified path.

func (*Configuration) EnableStagingTrustAnchors

func (c *Configuration) EnableStagingTrustAnchors()

func (*Configuration) Reload

func (c *Configuration) Reload() error

Reload assumes the latest files (trust anchors and certificate revocation lists) are downloaded. Reload (re)populates the Configuration by loading the pinned trust anchors, followed by the downloaded ones. Intermediate certificates are checked against the revocation list of the root certificates befor being added to the trust model.

func (c *Configuration) ResolveVerifierLogo(key string) *clientmodels.Image

ResolveVerifierLogo returns the cached logo for the given verifier key (typically the verifier's certificate serial number) as a base64-encoded clientmodels.Image, or nil if no logo is cached.

func (*Configuration) SetCertificateVerificationMode added in v1.0.0

func (c *Configuration) SetCertificateVerificationMode(mode CertificateVerificationMode)

func (*Configuration) UpdateCertificateRevocationLists

func (c *Configuration) UpdateCertificateRevocationLists() error

type SdJwtVerificationMode added in v1.0.0

type SdJwtVerificationMode int
const (
	StrictSdJwtVerificationMode SdJwtVerificationMode = iota
	LaxSdJwtVerificationMode
)

type TrustModel

type TrustModel struct {
	// contains filtered or unexported fields
}

func NewTestTrustModel added in v1.0.0

func NewTestTrustModel(basePath string, rootPool, intermediatePool *x509.CertPool, revocationLists []*x509.RevocationList) *TrustModel

NewTestTrustModel creates a TrustModel for testing with the given PKI components.

func (*TrustModel) ClearTrustedIntermediateCertificates added in v1.0.0

func (tm *TrustModel) ClearTrustedIntermediateCertificates()

ClearTrustedIntermediateCertificates replaces the intermediate cert pool (for testing missing intermediates).

func (*TrustModel) ClearTrustedRootCertificates added in v1.0.0

func (tm *TrustModel) ClearTrustedRootCertificates()

ClearTrustedRootCertificates replaces the root cert pool (for testing missing roots).

func (*TrustModel) GetRevocationLists

func (tm *TrustModel) GetRevocationLists() []*x509.RevocationList

func (*TrustModel) GetSavedTrustChains added in v1.0.0

func (tm *TrustModel) GetSavedTrustChains() ([][]byte, error)

func (*TrustModel) GetVerificationOptionsTemplate

func (tm *TrustModel) GetVerificationOptionsTemplate() x509.VerifyOptions

func (*TrustModel) InstallCertificate added in v1.0.0

func (tm *TrustModel) InstallCertificate(pemData []byte) error

func (*TrustModel) Reload

func (tm *TrustModel) Reload() error

func (*TrustModel) SetCertificateVerificationMode added in v1.0.0

func (tm *TrustModel) SetCertificateVerificationMode(mode CertificateVerificationMode)

Directories

Path Synopsis
credentials
sdjwtvc/typemetadata
Package typemetadata fetches SD-JWT VC Type Metadata documents and OpenID4VCI issuer metadata documents needed to describe a credential type whose issuer the wallet has never seen.
Package typemetadata fetches SD-JWT VC Type Metadata documents and OpenID4VCI issuer metadata documents needed to describe a credential type whose issuer the wallet has never seen.
internal
eudi_sdjwt_dcql
Package eudi_sdjwt_dcql implements a DcqlCredentialQueryHandler for SD-JWT-VC credentials stored in the eudi SQLite storage (issued via OpenID4VCI).
Package eudi_sdjwt_dcql implements a DcqlCredentialQueryHandler for SD-JWT-VC credentials stored in the eudi SQLite storage (issued via OpenID4VCI).
db
sqlcipherstorage
Package sqlcipherstorage constructs the EUDI holder storage backed by an sqlcipher-encrypted SQLite database (the wallet-on-a-device deployment).
Package sqlcipherstorage constructs the EUDI holder storage backed by an sqlcipher-encrypted SQLite database (the wallet-on-a-device deployment).

Jump to

Keyboard shortcuts

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