Dieses Projekt wurde veröffentlicht durch Bundesrechenzentrum GmbH. Es basiert auf auf der OpenSource-App des Schweizer Bundesamt für Information und Telekommunikation (BIT)(https://github.com/admin-ch/CovidCertificate-SDK-iOS)
CovidCertificateSDK ist verfügbar über Swift Package Manager
- Add the following to your
Package.swift
file:
dependencies: [
.package(url: "https://github.com/BRZ-GmbH/CovidCertificate-SDK-iOS.git", .branch("main"))
]
This version points to the HEAD of the main
branch and will always fetch the latest development status. Future releases will be made available using semantic versioning to ensure stability for depending projects.
The SDK needs to be initialized with an environment. This allows for different verification rules per environment or other environment specific settings.
After initialization the following pipeline should be used:
-
Decode the base45 and prefixed string to retrieve a Digital Covid Certificate
-
Verify the signature of the Certificate
-
Check the revocation list. Currently always returns a valid
ValidationResult
-
Check for rules specific to countries such as validity of vaccines or tests
All these checks check against verification properties that are loaded from a server. These returned properties use a property to specify how long they are valid (like max-age
in general networking). With the parameter forceUpdate
, these properties can be forced to update.
public func decode(encodedData: String) -> Result<DGCHolder, CovidCertError>
public static func checkSignature(cose: DGCHolder, forceUpdate: Bool, _ completionHandler: @escaping (Result<ValidationResult, ValidationError>) -> Void)
Currently only stubs
public static func checkRevocationStatus(dgc: EuHealthCert, forceUpdate: Bool, _ completionHandler: @escaping (Result<ValidationResult, ValidationError>) -> Void)
public static func checkNationalRules(dgc: EuHealthCert, forceUpdate: Bool, _ completionHandler: @escaping (Result<VerificationResult, NationalRulesError>) -> Void)
Dieses Projekt ist lizenziert unter den Bestimmungen der MPL 2 license. Siehe LICENSE für Details.
[1] Health Certificate Specification
[2] Validation Core