egelke / eid Goto Github PK
View Code? Open in Web Editor NEWNative .Net client of the Belgium eID card
Native .Net client of the Belgium eID card
Hi there,
Love the library!
We seem to struggle with an issue that is hard to reproduce, as it behaves differently on each system and with each card reader.
I have a HP ZBook with a build in E-ID card reader.
Basically, what happens is the following
And with crash I mean, the exception in Readers.cs line 112 is being hit and the task is in an invalid state, which prevents subsequent cards from being read.
The return value in that particular case is 0x8010001E which says SCARD_E_SERVICE_STOPPED.
Dug up some documentation on the web and found out that this link has the same issue ( https://ludovicrousseau.blogspot.com/2021/12/windows-pcsc-and-scardeservicestopped.html ).
if (retVal == 0x8010000A) continue; //timeout if (retVal != 0) { OnStateChange(retVal); continue; //throw new InvalidOperationException("Failed to update the status: 0x" + retVal.ToString("X")); }
What I did for testing purposes is throw an event with the Exception included ( ExceptionOccurred ) to the outside world instead of interrupting the task, so that my caller can dispose the Readers.cs and instantiate a new one.
protected virtual void OnStateChange(uint state) => StateChanged?.Invoke(this, state);
This is example code of how we implemented the "hack"
`private void CreateReader()
{
_readers = new Readers(ReaderScope.User);
_readers.CardInsert += Readers_CardInsert;
_readers.StateChanged += ReadersOnStateChanged;
_readers.StartListen();
}`
`private void ReadersOnStateChanged(object? sender, uint e)
{
DisposeReader();
CreateReader();
}`
While this method works but it feels a bit dirty and hacky.
Would love some guidance on how to proceed next.
Resent windows (tested on Windows 11) => Recent (with an c not an s ;o) Windows
Hi,
I would like to use your Eid package to get data from inserted eid card under Windows but for new eid cards, I have the following error :
System.AggregateException: Une ou plusieurs erreurs se sont produites. ---> System.InvalidOperationException: Unknown Document Type: 32
à Egelke.Eid.Client.Model.TLV.ToDocType(Byte[] value)
à Egelke.Eid.Client.Model.Identity..ctor(Byte[] file)
à Egelke.Eid.Client.EidCard.get_Identity()
à TestEidReadingFedict.Form1.Readers_CardInsert(Object sender, CardEventArgs e)
à Egelke.Eid.Client.Readers.OnCardInsert(Card card)
à Egelke.Eid.Client.Readers.DetectChanges()
Could you tell me what I can do ?
Thank you,
Best Regards,
Nicolas Giannone
Does this library support signing content via the private key embedded on the eID after unlocking with the pincode?
It works perfect in the windows environment, thanks again!
How can we run this library in the Linux environment?
Hello
I see this library has got an Address class, but I can't seem to find on how to read the address?
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.