Skip to content

BRZ-GmbH/CovidCertificate-SDK-iOS

Repository files navigation

CovidCertificateSDK for iOS

Swift Package Manager compatible License: MPL 2.0

Introduction

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)

Installation

Swift Package Manager

CovidCertificateSDK ist verfügbar über Swift Package Manager

  1. 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.

Architecture

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:

  1. Decode the base45 and prefixed string to retrieve a Digital Covid Certificate

  2. Verify the signature of the Certificate

  3. Check the revocation list. Currently always returns a valid ValidationResult

  4. 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.

Decoding

public func decode(encodedData: String) -> Result<DGCHolder, CovidCertError>

Verify Signature

public static func checkSignature(cose: DGCHolder, forceUpdate: Bool, _ completionHandler: @escaping (Result<ValidationResult, ValidationError>) -> Void)

Check Revocation List

Currently only stubs

public static func checkRevocationStatus(dgc: EuHealthCert, forceUpdate: Bool, _ completionHandler: @escaping (Result<ValidationResult, ValidationError>) -> Void)

Check National Specific Rules

public static func checkNationalRules(dgc: EuHealthCert, forceUpdate: Bool, _ completionHandler: @escaping (Result<VerificationResult, NationalRulesError>) -> Void)

Lizenz

Dieses Projekt ist lizenziert unter den Bestimmungen der MPL 2 license. Siehe LICENSE für Details.

References

[1] Health Certificate Specification

[2] Validation Core

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published