Giter Site home page Giter Site logo

web-eid / libelectronic-id Goto Github PK

View Code? Open in Web Editor NEW
5.0 13.0 20.0 308 KB

C++ library for performing cryptographic operations with electronic ID smart cards

License: MIT License

CMake 1.28% C++ 89.97% Shell 0.13% C 8.61%
cryptography smartcard eid-card pcsc authentication digital-signature pkcs11 cpp

libelectronic-id's People

Contributors

counter178 avatar matsjoonas avatar metsma avatar mkmayer avatar mrts avatar pwntester avatar vytax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libelectronic-id's Issues

Issue with belgian EID card

Hello,

I tried to authenticate with a belgian EID card through the web-eid.js script and I get the following error
image

I use the 'Web eID software' version 2.2.0.572 on Windows 10 and the 'web-eid.js' script version 2.0.1.
I tried to authenticate through Chrome and Edge.

The logs of the 'RIA web-eid' software are the following:

2023-07-09T11:47:59.342Z DEBUG src\controller\application.cpp:162:class std::unique_ptr<struct std::pair<class CommandType,class QMap<class QString,class QVariant> >,struct std::default_delete<struct std::pair<class CommandType,class QMap<class QString,class QVariant> > > > __cdecl Application::parseArgs(void) - Parent window handle is unused "0"
2023-07-09T11:47:59.342Z INFO src\controller\controller.cpp:72:void __cdecl Controller::run(void) - "web-eid" app "2.2.0+572" running in stdin/stdout mode
2023-07-09T11:47:59.445Z DEBUG src\controller\threads\controllerchildthread.hpp:106:void __cdecl ControllerChildThread::beforeRun(void) - Starting "WaitForCardThread" 2058862480688 for command "INSERT_CARD"
2023-07-09T11:48:03.822Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "SMART_CARD_CHANGE_REQUIRED": C_GetTokenInfo: token not recognized in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:140:tokens
2023-07-09T11:48:08.721Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "SMART_CARD_CHANGE_REQUIRED": C_GetTokenInfo: token not recognized in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:140:tokens
2023-07-09T11:48:11.709Z DEBUG src\controller\controller.cpp:336:void __cdecl Controller::onDialogCancel(void) - User cancelled
2023-07-09T11:48:11.711Z DEBUG src\controller\controller.cpp:58:void __cdecl `anonymous-namespace'::interruptThread(class QThread *) - Interrupting thread 2058862480688
2023-07-09T11:48:13.540Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "SMART_CARD_CHANGE_REQUIRED": C_GetTokenInfo: token not recognized in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:140:tokens
2023-07-09T11:48:13.540Z INFO src\controller\threads\controllerchildthread.hpp:47:void __cdecl ControllerChildThread::run(void) - "WaitForCardThread" 2058862480688 for command "INSERT_CARD" completed successfully
2023-07-09T11:48:13.542Z DEBUG src\controller\threads\controllerchildthread.hpp:97:__cdecl ControllerChildThread::~ControllerChildThread(void) - "WaitForCardThread" 2058862480688 destroyed

Could you please help me debug this issue?
@mrts and @saxomoose, perhaps you could help me regarding the issues or patches you have applied for belgian EID.

Regards,
Renaud

Variable ATR?

Does Web-eID infrastructure support variable ATR?

I.e. recognizing supported card by on-card AID, not pre-defined ATR?

Belgian eID card support

Hi!

First of all, huge thanks for this project! Makes eID card integrations so much easier.

We have many clients who'd like to use their Belgian eID cards with web-eid extension, so, what are your plans regarding adding Belgian eID?

I could also provide a Belgian eID test card for you if necessary.

Issue with Lithuanian ID card - "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005

There is an issue trying to use Lithuanian ID card (issued on 2023-02-17).

The dialog shows driver error, meanwhile web-eid log file continously logs "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 warning, until I close the dialog, resulting in the "User cancelled" web-eid log message.

image

2023-03-15T15:11:35.331Z INFO src\controller\controller.cpp:72:void __cdecl Controller::run(void) - "web-eid" app "2.2.0+572" running in stdin/stdout mode
2023-03-15T15:11:35.420Z DEBUG src\controller\threads\controllerchildthread.hpp:106:void __cdecl ControllerChildThread::beforeRun(void) - Starting "WaitForCardThread" 1812154685472 for command "INSERT_CARD"
2023-03-15T15:11:38.457Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:131:tokens
2023-03-15T15:11:42.497Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:131:tokens
2023-03-15T15:11:46.538Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:131:tokens
2023-03-15T15:11:50.579Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:131:tokens
2023-03-15T15:11:54.620Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:131:tokens
2023-03-15T15:11:58.661Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:131:tokens
2023-03-15T15:12:02.714Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:131:tokens
2023-03-15T15:12:06.760Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:131:tokens
2023-03-15T15:12:10.809Z WARNING src\controller\threads/waitforcardthread.hpp:72:bool __cdecl WaitForCardThread::warnAndEmitStatusUpdate(const enum RetriableError,const class std::exception &) - Command "INSERT_CARD" retriable error "PKCS11_ERROR": C_GetSlotList failed with return code 0x00000005 in src\electronic-ids\pkcs11\PKCS11CardManager.hpp:131:tokens
2023-03-15T15:12:10.906Z DEBUG src\controller\controller.cpp:336:void __cdecl Controller::onDialogCancel(void) - User cancelled
2023-03-15T15:12:10.908Z DEBUG src\controller\controller.cpp:58:void __cdecl `anonymous-namespace'::interruptThread(class QThread *) - Interrupting thread 1812154685472

The card works as expected with Softemia mCard toolbox and Dokobit extension.

Is support for Croatian eID cards released?

Hi!

The website https://web-eid.eu/ says that Croatian eID cards are supported in the first phase, but when I try to sign using the code from https://github.com/web-eid/web-eid-spring-boot-example with my Croatian eID card I get the following window:
CardNotSupported

The web-eid.log in the C:\Users[User]\AppData\Local\RIA\web-eid has the following lines:

2021-10-19T16:59:58.051Z INFO src\controller\controller.cpp:76:void __cdecl Controller::run(void) - "web-eid" app "1.0.0+527" running in stdin/stdout mode
2021-10-19T16:59:58.572Z DEBUG src\controller\threads\controllerchildthread.hpp:105:void __cdecl ControllerChildThread::beforeRun(void) - Starting "WaitForCardThread" 1849941933440 for command "INSERT_CARD"
2021-10-19T17:00:48.653Z DEBUG src\controller\controller.cpp:319:void __cdecl Controller::onDialogCancel(void) - User cancelled
2021-10-19T17:00:48.660Z DEBUG src\controller\controller.cpp:63:void __cdecl `anonymous-namespace'::interruptThread(class QThread *) - Interrupting thread 1849941933440
2021-10-19T17:00:48.663Z INFO src\controller\threads\controllerchildthread.hpp:47:void __cdecl ControllerChildThread::run(void) - "WaitForCardThread" 1849941933440 for command "INSERT_CARD" completed successfully
2021-10-19T17:00:48.664Z DEBUG src\controller\controller.cpp:148:auto __cdecl Controller::saveChildThreadPtrAndConnectFailureFinish::<lambda_3e97e70140d2e0a9c6ad97d32f838a34>::operator ()(void) const - Thread 1849941933440 finished
2021-10-19T17:00:48.664Z DEBUG src\controller\threads\controllerchildthread.hpp:96:__cdecl ControllerChildThread::~ControllerChildThread(void) - "WaitForCardThread" 1849941933440 destroyed

Is support for Croatian eID cards released because it doesn't work for my Croatian eID card and because I see that #2 pull request is still open?

Available certificates p12

Hi! I would like to know if it is possible to make signatures with self-contained p12 certificates that are outside of a smart card.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.