open-eid / chrome-token-signing

DEPRECATED Chrome and Firefox extension for signing with your eID on the web
https://github.com/open-eid/chrome-token-signing/wiki
GNU Lesser General Public License v2.1
206 stars 75 forks source link

Luxtrust signing stick not working ? #74

Closed redosk closed 6 years ago

redosk commented 6 years ago

I am using a Luxtrust signing stick. I have installed Chrome extension (v0.0.29) and Chrome Token Signing Software (v1.0.6)

When I try the hwcrypto demo (hwcrypto/demo/sign.html), I receive a "technical_error" message. (When the signing stick is unplugged, I receive a "no_certificates" error.) Here is the output of background.js on the console :

background.js:169 SEND 2: {"type":"VERSION","nonce":"68k713g3zptw3pff","src":"page.js","origin":"https:/host.com","tab":2}
background.js:174 OPEN 2: ee.ria.esteid
background.js:169 SEND 2: {"type":"CERT","lang":"en","nonce":"sfvc9kvmlqpoz93o","src":"page.js","origin":"https://hostcom","tab":2}
background.js:183 RECV 2: {"api":1,"nonce":"68k713g3zptw3pff","result":"ok","version":"1.0.6.485"}
background.js:183 RECV 2: {"api":1,"message":null,"nonce":"sfvc9kvmlqpoz93o","result":"technical_error"}
metsma commented 6 years ago

Can you enable backend logging https://github.com/open-eid/chrome-token-signing/wiki/DeveloperTips#logging

redosk commented 6 years ago

So here is the log :

2017-11-01 02:06:04 main() [chrome-token-signing.cpp:37] Parsing input...
2017-11-01 02:06:15 IOCommunicator::readMessage() [IOCommunicator.cpp:42] Request(107): {"type":"VERSION","nonce":"8x4e690ah9az5jl6","src":"page.js","origin":"https://host.com","tab":2}
2017-11-01 02:06:15 IOCommunicator::sendMessage() [IOCommunicator.cpp:49] Response(88) {
        "api": 1,
        "nonce": "8x4e690ah9az5jl6",
        "result": "ok",
        "version": "1.0.6.485"
}

2017-11-01 02:06:15 main() [chrome-token-signing.cpp:37] Parsing input...
2017-11-01 02:06:15 IOCommunicator::readMessage() [IOCommunicator.cpp:42] Request(116): {"type":"CERT","lang":"en","nonce":"31e37e5ksf4cfkyk","src":"page.js","origin":"https://host.com","tab":2}
2017-11-01 02:06:15 PKCS11Path::atrList() [..\host-shared\PKCS11Path.cpp:71] found reader: Gemalto USB Key Smart Card Reader 0
2017-11-01 02:06:15 PKCS11Path::atrList() [..\host-shared\PKCS11Path.cpp:88] Set ATR = 3B7D94000080318065B0831100C883009000 for reader Gemalto USB Key Smart Card Reader 0
2017-11-01 02:06:15 PKCS11CardManager::PKCS11CardManager() [c:\jenkins\workspace\chrome-token-signing-release\label\Windows_release_VS2015\packaging\windows\build\chrome-token-signing-1.0.6.485\host-shared\PKCS11CardManager.h:141] Function List not loaded C:\Program Files (x86)\CryptoTech\CryptoCard\CCPkiP11.dll
2017-11-01 02:06:15 PKCS11CertificateSelector::getCert() [PKCS11CertificateSelector.cpp:55] Technical error: PKCS11 is not loaded
2017-11-01 02:06:15 IOCommunicator::sendMessage() [IOCommunicator.cpp:49] Response(94) {
        "api": 1,
        "message": null,
        "nonce": "31e37e5ksf4cfkyk",
        "result": "technical_error"
}

2017-11-01 02:06:15 main() [chrome-token-signing.cpp:37] Parsing input...

File "CCPkiP11.dll" is nowhere on my system. If I understand it correctly, it is used on Windows to access PKCS11 functions, but should have it been installed by Luxtrust Middleware or by something else ?

metsma commented 6 years ago

Does Luxtrust Middleware come with PKCS11 driver? Interesting that ATR matches Lithuanian card. You should probably alter the path match Luxtrust PKCS11 driver https://github.com/open-eid/chrome-token-signing/blob/master/host-shared/PKCS11Path.cpp#L154

metsma commented 6 years ago

Closing due inactivity, can reopen if needed