Documentation
¶
Index ¶
- Constants
- Variables
- func GetVerifiersForCLI() (*idemixverifier.Verifier, *hcertverifier.Verifier)
- func HasDomesticPrefix(proofQREncoded []byte) bool
- func IsDCC(proofQREncoded []byte) bool
- func IsForeignDCC(proofQREncoded []byte) bool
- type AnnotatedDomesticPk
- type CreateCredentialResultValue
- type DomesticPksLookup
- type PublicKeysConfig
- type Result
- func CreateCommitmentMessage(holderSkJson, issueSpecificationMessageJson []byte) *Result
- func CreateCredentials(ccmsJson []byte) *Result
- func Disclose(holderSkJson, credJson []byte, disclosurePolicy string) *Result
- func DiscloseWithTime(holderSkJson, credJson []byte, disclosurePolicy string, unixTimeSeconds int64) *Result
- func ErrorResult(err error) *Result
- func GenerateHolderSk() *Result
- func InitializeHolder(configDirectoryPath string) *Result
- func InitializeVerifier(configDirectoryPath string) *Result
- func ReadDomesticCredential(credJson []byte) *Result
- func ReadEuropeanCredential(proofQREncoded []byte) *Result
- func WrappedErrorResult(err error, prefix string) *Result
- type VerificationDetails
- type VerificationResult
Constants ¶
View Source
const ( HOLDER_CONFIG_FILENAME = "config.json" HOLDER_PUBLIC_KEYS_FILENAME = "public_keys.json" CREATE_CREDENTIAL_VERSION = 3 DCC_DOMESTIC_ISSUER_COUNTRY_CODE = "NL" DCC_DOMESTIC_ISSUER_KEY_SAN = "NLD" )
View Source
const ( DISCLOSURE_POLICY_1G = "1" DISCLOSURE_POLICY_3G = "3" )
View Source
const ( VERIFIER_CONFIG_FILENAME = "config.json" VERIFIER_PUBLIC_KEYS_FILENAME = "public_keys.json" )
View Source
const ( VERIFICATION_SUCCESS = 1 + iota VERIFICATION_FAILED_UNRECOGNIZED_PREFIX VERIFICATION_FAILED_IS_NL_DCC VERIFICATION_FAILED_ERROR )
View Source
const ( VERIFICATION_POLICY_1G = "1" VERIFICATION_POLICY_3G = "3" )
View Source
const ( HCERT_SPECIMEN_EXPIRATION_TIME int64 = 42 DISEASE_TARGETED_COVID_19 = "840539006" TEST_RESULT_NOT_DETECTED = "260415000" VACCINE_MEDICINAL_PRODUCT_JANSSEN = "EU/1/20/1525" YYYYMMDD_FORMAT = "2006-01-02" DOB_EMPTY_VALUE = "XX" )
View Source
const (
CATEGORY_ATTRIBUTE_1G = "1"
)
Variables ¶
View Source
var (
DATE_OF_BIRTH_REGEX = regexp.MustCompile(`^(?:((?:19|20)\d\d)(?:-(\d\d)(?:-(\d\d))?)?)?$`)
)
Functions ¶
func GetVerifiersForCLI ¶ added in v0.2.2
func GetVerifiersForCLI() (*idemixverifier.Verifier, *hcertverifier.Verifier)
func HasDomesticPrefix ¶ added in v0.4.2
func IsForeignDCC ¶ added in v0.4.2
Types ¶
type AnnotatedDomesticPk ¶
type CreateCredentialResultValue ¶
type CreateCredentialResultValue struct {
Credential *gabi.Credential `json:"credential"`
Attributes map[string]string `json:"attributes"`
}
type DomesticPksLookup ¶
type DomesticPksLookup map[string]*AnnotatedDomesticPk
type PublicKeysConfig ¶
type PublicKeysConfig struct {
DomesticPks DomesticPksLookup `json:"nl_keys"`
EuropeanPks hcertverifier.PksLookup `json:"eu_keys"`
// DEPRECATED: Remove this struct when the transition to nl_keys is complete
LegacyDomesticPks []*AnnotatedDomesticPk `json:"cl_keys"`
}
func NewPublicKeysConfig ¶
func NewPublicKeysConfig(pksPath string) (*PublicKeysConfig, error)
func (*PublicKeysConfig) FindAndCacheDomestic ¶
func (pkc *PublicKeysConfig) FindAndCacheDomestic(kid string) (*gabi.PublicKey, error)
func (*PublicKeysConfig) TransformLegacyDomesticPks ¶
func (pkc *PublicKeysConfig) TransformLegacyDomesticPks()
DEPRECATED: Remove this legacy transformation together with LegacyDomesticPks
type Result ¶
func CreateCommitmentMessage ¶
func CreateCredentials ¶
func DiscloseWithTime ¶ added in v0.2.4
func ErrorResult ¶
func GenerateHolderSk ¶
func GenerateHolderSk() *Result
func InitializeHolder ¶
func InitializeVerifier ¶
func ReadDomesticCredential ¶
func ReadEuropeanCredential ¶
func WrappedErrorResult ¶
type VerificationDetails ¶
type VerificationDetails struct {
CredentialVersion string `json:"credentialVersion"`
IsSpecimen string `json:"isSpecimen"`
IssuerCountryCode string `json:"issuerCountryCode"`
FirstNameInitial string `json:"firstNameInitial"`
LastNameInitial string `json:"lastNameInitial"`
BirthDay string `json:"birthDay"`
BirthMonth string `json:"birthMonth"`
}
VerificationDetails very much mimics the domestic verifier attributes, with only string type values,
to minimize app-side changes. In the future, both should return properly typed values.
type VerificationResult ¶
type VerificationResult struct {
Status int
Details *VerificationDetails
Error string
}
func Verify ¶
func Verify(proofQREncoded []byte, verificationPolicy string) *VerificationResult
func VerifyWithTime ¶ added in v0.2.4
func VerifyWithTime(proofQREncoded []byte, verificationPolicy string, unixTimeSeconds int64) *VerificationResult
Source Files
¶
Click to show internal directories.
Click to hide internal directories.