1
0
Fork 0
Rust decoder for EU Digital COVID Certificate (EUDCC)
Go to file
Daniele Tricoli cd6098925b
ci/woodpecker/push/test Pipeline was successful Details
Remove no more used pipeline
2022-12-04 03:36:41 +01:00
.woodpecker Migrate to woodpecker syntax 2022-12-04 03:33:43 +01:00
src Switch to ciborium since serde_cbor is unmaintained 2021-12-21 02:46:17 +01:00
.gitignore Add gitignore 2021-07-02 02:15:08 +02:00
.rustfmt.toml Add rustfmt.toml 2021-07-02 02:15:20 +02:00
Cargo.lock Switch to ciborium since serde_cbor is unmaintained 2021-12-21 02:46:17 +01:00
Cargo.toml Bump version to 0.2.0 2021-12-21 02:47:07 +01:00
LICENSE Initial import 2021-07-02 02:13:47 +02:00
README.md Add more examples 2021-07-02 23:26:14 +02:00

README.md

eudccdec - EU Digital COVID Certificate decoder

eudccdec is a decoder for EU Digital COVID Certificate (EUDCC), written in Rust and released under the GPLv3 license.

It ignores COSE signing and it extracts the EUDCC payload to show data about:

  1. vaccination;
  2. recovery;
  3. tests;

Installation

 cargo install --branch main --git https://noa.mornie.org/eriol/eudccdec

Note that is my shell prompt, you don't have to write it.

Usage

In the following example curl and zbarimg are used, to install them on a Debian based system use sudo apt install curl zbar-tools.

Example of a certificate with a vaccination entry:

 curl -sL https://github.com/eu-digital-green-certificates/dgc-testdata/raw/main/IT/png/1.png | \
  zbarimg --quiet --raw - | eudccdec
Certificate {
    ver: "1.0.0",
    nam: Name {
        fn_: "Di Caprio",
        fnt: "DI<CAPRIO",
        gn: "Marilù Teresa",
        gnt: "MARILU<TERESA",
    },
    dob: "1977-06-16",
    v: [
        VaccineRecord {
            tg: "840539006",
            vp: "1119349007",
            mp: "EU/1/20/1528",
            ma: "ORG-100030215",
            dn: 2,
            sd: 2,
            dt: "2021-04-10",
            co: "IT",
            is: "IT",
            ci: "01ITE7300E1AB2A84C719004F103DCB1F70A#6",
        },
    ],
    r: [],
    t: [],
}

Example of a certificate with a recovery entry:

 curl -sL https://github.com/eu-digital-green-certificates/dgc-testdata/raw/main/IT/png/2.png | \
  zbarimg --quiet --raw - | eudccdec
Certificate {
    ver: "1.0.0",
    nam: Name {
        fn_: "Di Caprio",
        fnt: "DI<CAPRIO",
        gn: "Marilù Teresa",
        gnt: "MARILU<TERESA",
    },
    dob: "1977-06-16",
    v: [],
    r: [
        RecoveryRecord {
            tg: "840539006",
            fr: "2021-05-02",
            co: "IT",
            is: "IT",
            df: "2021-05-04",
            du: "2021-10-31",
            ci: "01ITA65E2BD36C9E4900B0273D2E7C92EEB9#1",
        },
    ],
    t: [],
}

Example of a certificate with a test entry:

 curl -sL https://github.com/eu-digital-green-certificates/dgc-testdata/raw/main/IT/png/3.png | \
  zbarimg --quiet --raw - | eudccdec
Certificate {
    ver: "1.0.0",
    nam: Name {
        fn_: "Di Caprio",
        fnt: "DI<CAPRIO",
        gn: "Marilù Teresa",
        gnt: "MARILU<TERESA",
    },
    dob: "1977-06-16",
    v: [],
    r: [],
    t: [
        TestRecord {
            tg: "840539006",
            tt: "LP6464-4",
            nm: "Roche LightCycler qPCR",
            ma: "1232",
            sc: "2021-05-03T10:27:15Z",
            dr: "2021-05-11T12:27:15Z",
            tr: "260415000",
            tc: "Policlinico Umberto I",
            co: "IT",
            is: "IT",
            ci: "01IT053059F7676042D9BEE9F874C4901F9B#3",
        },
    ],
}