eu-digital-green-certificates / dgca-app-core-android Goto Github PK
View Code? Open in Web Editor NEWRepository for the Android app core module.
License: Apache License 2.0
Repository for the Android app core module.
License: Apache License 2.0
Please support in the hCert the following dates:
1978-01-26T00:00:00
1987-12-12
1987-12
1987
Example: ^(19|20)\d\d(-\d\d){0,2}$
The schema currently just support the short version, therefore the others are failing during validation. Please relax the schema in this direction.
Hi when try to build it-dgc-verificaC19-android project I hev this error :
* Exception is: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':decoder'. ...... Caused by: groovy.lang.MissingPropertyException: No such property: desugar_jdk_libs for class: Deps
Any info? the dgca-app-core-android project is in the same root folder...
Regards
The JSON Schema limits some fields to maxLength of 50. Please increase it to 80
dgca app core provides a decoder that is useful to others. It would be great if it was provided in an easy consumable format like an artifact in a public maven repository.
By using a public maven repo, it's easy for downstream dependencies to keep up to date with any bugfixes etc.
The tc field must be removed from the mandatory test field list.
com.github.fge:json-schema-validator:2.2.6
This version depends on Guava v16.0.1.
com.github.java-json-tools:json-schema-validator:2.2.14
(this is the same project; at least v2.2.13 is needed)
Resolves a dependency conflict for Google Guava. Java-based apps often explicitly depend on current versions of Guava.
Hi,
I integrated your dgci-app-core-android library in my app which is minsdk 24 (Android 7).
Your decoder is working fine except on Android 7 devices.
What is the reason that your libraries minSDK is 26?
Is there a way to make it work for SDK 24 (Android 7) devices?
Thanks or your feedback!
Best regards
Robert
Please relax all dates in the schema so that date times accepted as well. (e.g. vaccination date):
Please add a unit test for the special cases.
The testdata repo is filled with a lot of testdata. Please implement Decoder Unit Tests for the following list:
https://github.com/eu-digital-green-certificates/dgc-testdata/blob/main/BasicDgcTestsList.md
Please follow as well this implementation: https://github.com/eu-digital-green-certificates/dgca-app-core-ios/blob/main/Tests/SwiftDGCTests/SwiftDGCTests.swift
Please share this code as well to the Austrian Team:)
Decoded JSON fields might contain whitespaces.
E.g. GR/EL QR Vaccination Codes in Field "mp"
During the CBOR Deserialization, all fields must be trimmed for whitespaces.
Thank you very much for your answer !
Hi, could you please have a look here:
corona-warn-app/cwa-app-android#3417
Do you have any idea what might have gone wrong?
Summary: CBOR error while decoding a valid Polish vaccination certificate in two different Android apps (Corona-Warn-App and CovPass app), while iOS (Corona-Warn-App) works fine.
Suspected: Are there probably differences between the platforms how CBOR libraries treat special characters?
Gradle build fails because Deps.json_validation_rhino
is not declared in the buildSrc module.
I expected that cloning and building the project from main would work.
Add json_validation_rhino
to Versions- and Dependencies-objects under buildSrc.
Check for the correct OIDs and certificate types. With and without the ".0".
https://datatracker.ietf.org/doc/html/draft-faltstrom-base45-07#section-6 says:
Even though a Base45 encoded string contains only characters from the alphabet in Table 1 the following case has to be considered: The string "FGW" represents 65535 (FFFF in base 16), which is a valid encoding. The string "GGW" would represent 65536 (10000 in base 16), which is represented by more than 16 bit.
Implementations MUST reject the encoded data if it contains a triplet of characters which, when decoded, results in an unsigned integer which is greater than 65535 (ffff in base 16).
But Base45Decoder accepts triplets representing integers greater than 65535, e.g. "GGW".
Base45Decoder().decode("GGW")
should throw an exception, but returns a byte array with the bytes 0x01 0x00 0x00.
println(Base45Decoder().decode("GGW").joinToString(" ") { "%02X".format(it) })
prints 01 00 00
.
I have Qr code, conteins next fields:
{4: 1666386000, 1: "UA", -260: {1: {"type": "local", "nam": {"gn": "Євгенія", "fnt": "SHEVTSOVA", "fn": "Шевцова", "mn": "Валеріївна", "gnt": "YEVHENIIA"}, "itn": "2830208121", "ver": "1.3.0", "dob": "1977-06-27", "v": [{"sd": 2, "mp": "EU/1/20/1528", "vp": "1119349007", "tg": "840539006", "dn": 2, "ci": "URN:UVCI:01:UA:7NV72MZWKJ1V1ZDG4ZGX2KMF", "is": "State Enterprise "DIIA"", "co": "UA", "dt": "2021-10-22", "ma": "ORG-100030215"}]}}, 6: 1634926088}
Main problem in "mn": "Валеріївна" field:
dgca/verifier/app/decoder/cbor/DefaultCborService.kt:70
Unrecognized field "mn" (class dgca.verifier.app.decoder.model.Person), not marked as ignorable
In class dgca-app-core-android/decoder/src/main/java/dgca/verifier/app/decoder/model/Person.kt
Has not field mn
, and also it has not annotation @JsonIgnoreProperties(ignoreUnknown = true)
When executing schema validation using the dgca-app-core-android library and minifyEnabled=true the app crashes with this stacktrace:
I guess this library is not yet prepared for R8 code shrinking. I also included the dgca-app-code-android
lib and got the same error.
Steps
minifyEnabled=true
2021-07-21 16:32:15.947 10614-10614/dgca.wallet.app.android E/AndroidRuntime: FATAL EXCEPTION: main
Process: dgca.wallet.app.android, PID: 10614
java.lang.ExceptionInInitializerError
at e.b.a.b.g.g.a.b(:53)
at e.b.a.b.g.g.b.<clinit>(:58)
at e.b.a.b.g.g.b.b(:48)
at e.b.a.b.g.a.<clinit>(:35)
at e.b.a.b.g.a.a(:45)
at e.b.a.b.b.b.<clinit>(:63)
at e.b.a.b.b.a.h(:97)
at e.b.a.b.b.a.a(:107)
at e.b.a.b.h.c.<init>(:68)
at e.b.a.b.h.b.d(:123)
at e.b.a.b.h.b.b(:113)
at g.a.a.b.p.a.a(:53)
at dgca.wallet.app.android.certificate.claim.ClaimCertificateViewModel$b$a.u(:96)
at j.e0.j.a.a.i(:33)
at k.a.r0.run(:106)
at k.a.u2.a.Y(:571)
at k.a.u2.a$b.c(:750)
at k.a.u2.a$b.m(:678)
at k.a.u2.a$b.run(:665)
Caused by: java.lang.IllegalArgumentException: class "e.b.a.b.f.b.e.a" has no appropriate constructor (keyword "additionalItems"; expected a constructor with a JsonNode as an argument)
at e.b.a.b.f.b.d.<init>(:31)
at e.b.a.b.g.g.a.a(:125)
at e.b.a.b.g.g.a.<clinit>(:68)
at e.b.a.b.g.g.a.b(:53)
at e.b.a.b.g.g.b.<clinit>(:58)
at e.b.a.b.g.g.b.b(:48)
at e.b.a.b.g.a.<clinit>(:35)
at e.b.a.b.g.a.a(:45)
at e.b.a.b.b.b.<clinit>(:63)
at e.b.a.b.b.a.h(:97)
at e.b.a.b.b.a.a(:107)
at e.b.a.b.h.c.<init>(:68)
at e.b.a.b.h.b.d(:123)
at e.b.a.b.h.b.b(:113)
at g.a.a.b.p.a.a(:53)
at dgca.wallet.app.android.certificate.claim.ClaimCertificateViewModel$b$a.u(:96)
at j.e0.j.a.a.i(:33)
at k.a.r0.run(:106)
at k.a.u2.a.Y(:571)
at k.a.u2.a$b.c(:750)
at k.a.u2.a$b.m(:678)
at k.a.u2.a$b.run(:665)
I couldn't fix it but I started using these rules:
-keep public class dgca.verifier.app.decoder.model.*
-keep public class com.github.fge.jsonschema.** { *; }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.