lucapisano / greenpassvalidator Goto Github PK
View Code? Open in Web Editor NEWThis project provides a library to validate Green Pass QR codes issued by EU governments
License: MIT License
This project provides a library to validate Green Pass QR codes issued by EU governments
License: MIT License
Hi Luca,
I found a mistake in "ValidationService" at row 96 and 101, when you add "day" not "hours"
and at row 143 where you test "Certificate Valid Until" with "current date"
It is right? Or not?
thanks
Hi,
i've used the latest version in a .net framework 4.8 project, and i'm finding that running the software on a windows 10 machine it seems to work as expected, same results as the official android app, but running the software on a windows 7 machine (tried with a real machine and a virtual one) the bool "IsInvalid" seems to always be true. Same framework version, both in x86 and x64, tried with various strings from 4 green passes.
Let me know if you need something to identify the issue, maybe it's a problem on my part.
Hello Luca, thank you so much for the work in this repo, that's very useful as I'm investigating (like you) how to decode the italian DGC.
I'm trying, however, to use it from a Windows Forms .net 5 project but I'm stuck as the constructor needs a IServiceProvider object. How to use it in a non web projects?
I'm not used to .net core so maybe that's a silly question, please forgive me in that case, just give me a hint.
Thank you in advance for your time.
Hi, i tried the example but i couldn't get my certificate validated because the rules don't get downloaded with the error in the title.
I read online that the issue could be that the ciphers of my OS are not supported anymore and to update my os.
But i don't know what to update to because i tried with Windows 11 21H2 and Windows Server 2019 1809. Am i missing something?
With chrome or postman a have no problem getting the data from https://get.dgc.gov.it/v1/dgc/settings
Thanks.
Hi,
if you are interested and if this is still alive i would implement the super-greenpass.
I was thinking of adding the fields IsVaccinated, IsRecovered, IsTested to the return from the .Validate()
method. That way every application can decide by itself what's necessary for them.
Let me know what you think.
Attualmente la demo non funziona. Anche compilando il Dockerfile in locale ottengo lo stesso errore. Sto provando con un qr code di test preso da https://github.com/eu-digital-green-certificates/dgc-testdata/tree/main/IT, per esempio:
HC1:6BFOXN%TS3DH0YOJ58S S-W5HDC M0II5XHC9B5G2+$N IOP-IA%NFQGRJPC%OQHIZC4.OI1RM8ZA.A5:S9MKN4NN3F85QNCY0O%0VZ001HOC9JU0D0HT0HB2PL/IB09B9LW4T8+DCMH0LDK2%K:XFE70LP$V25$0Q:J:4MO1P0%0L0HD+9E/HY+4J6TH48S%4K.GJ2PT3QY:GQ3TE2I+-CPHN6D7LLK2HG%89UV-0LZ 2ZJJ524-LH/CJTK96L6SR9MU9DHGZ%P WUQRENS431T1XCNCF+47AY0-IFO0500TGPN8F5G.41Q2E4T8ALW.INSV$ 07UV5SR+BNQHNML7 /KD3TU 4VCAT3ZGLQMI/XI%ZJNSBBXK2:UG%UJMI:TU+MMPZ5$/PMX19UE:-PSR3/$NU44CBE6DQ3D7B0FBOFX0DV2DGMB$YPF62I$60/F$Z2I6IFX21XNI-LM%3/DF/U6Z9FEOJVRLVW6K$UG+BKK57:1+D10%4K83F+1VWD1NE
In locale ottengo questo messaggio, nel log:
DGCValidator.Services.CWT.CertificateUnknownException: No signer certificates could be found
at DGCValidator.Services.CWT.DGCVerifier.VerifyAsync(Byte[] signedDGC, SignedDGC vacProof) in C:\src\GreenPass\Services\CWT\DGCVerifier.cs:line 94
at GreenPass.ValidationService.VerifySignedData(Byte[] signedData, SignedDGC vacProof, CertificateManager certificateManager) in C:\src\GreenPass\Services\ValidationService.cs:line 185
at GreenPass.ValidationService.Validate(String codeData) in C:\src\GreenPass\Services\ValidationService.cs:line 53
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HMC3B416DBN9", Request id "0HMC3B416DBN9:00000002": An unhandled exception was thrown by the application.
DGCValidator.Services.CWT.CertificateUnknownException: No signer certificates could be found
at GreenPass.ValidationService.Validate(String codeData) in C:\src\GreenPass\Services\ValidationService.cs:line 65
at GreenPass.API.Controllers.ValidationController.Validate(String input) in C:\src\GreenPass.API\Controllers\ValidationController.cs:line 34
at lambda_method5(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Objec
t[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Obje
ct state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean
isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Hi Luca,
Thank's for your job.
I have a problem making the call from CURL
curl -X POST "https://localhost:44370/Validation/bool?input=QRSTRING" -H "accept: text/plain" -d ""
I get this error:
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
why if I try it from the web interface it works and from a direct call curl doesn't?
can you give me some suggestions how to solve?
thanks a lot
Hi, I ask how i use it and in README.md add how to use
Good job!
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.