Nitrokey HSM USB compatible with Windows Server 2012 R2

We are trying to install Nitrokey HSM USB on a Windows Server 2012 R2 operating system.
When run the command: sc-hsm-tool --create-dkek-share dkek-share-1.pbe
It generated: Error generating random number failed with Transmit failed

Does anyone know how we can overcome this?

You would need a patched OpenSC which you can download here: ci.appveyor.com/project/szszszs … /artifacts

I have downloaded the patch and installed in my WIn 8. I got the same error:“Error generating random number failed with Transmit failed” can you confirm that the error has been fixed ? or any workaround solution ?
Best Regards,
Lap

You can use the latest OpenSC 0.16 instead of the patched OpenSC. Do you use any kind of virtual machine?

I have this same problem with 0.16 on Windows 10 x64.

I have the same problem on Windows 10 x64 with 0.16 of OpenSC. Here are the debugs…

[size=85] [sc-hsm-tool] card.c:767:sc_get_challenge: called [sc-hsm-tool] apdu.c:550:sc_transmit_apdu: called [sc-hsm-tool] card.c:394:sc_lock: called [sc-hsm-tool] apdu.c:517:sc_transmit: called [sc-hsm-tool] apdu.c:371:sc_single_transmit: called CLA:0, INS:84, P1:0, P2:0, data(0) 0000000000000000 reader 'Nitrokey Nitrokey HSM 0' [sc-hsm-tool] reader-pcsc.c:270:pcsc_transmit: Outgoing APDU (5 bytes): 00 84 00 00 08 ..... [sc-hsm-tool] reader-pcsc.c:199:pcsc_internal_transmit: called Nitrokey Nitrokey HSM 0:SCardTransmit/Control failed: 0x80100068 [sc-hsm-tool] reader-pcsc.c:397:pcsc_detect_card_presence: called Nitrokey Nitrokey HSM 0 check [sc-hsm-tool] reader-pcsc.c:323:refresh_attributes: returning with: 0 (Success) [sc-hsm-tool] reader-pcsc.c:402:pcsc_detect_card_presence: returning with: 5 [sc-hsm-tool] reader-pcsc.c:397:pcsc_detect_card_presence: called Nitrokey Nitrokey HSM 0 check [sc-hsm-tool] reader-pcsc.c:323:refresh_attributes: returning with: 0 (Success) [sc-hsm-tool] reader-pcsc.c:402:pcsc_detect_card_presence: returning with: 5 unable to transmit [sc-hsm-tool] apdu.c:384:sc_single_transmit: unable to transmit APDU: -1107 (Transmit failed) [sc-hsm-tool] apdu.c:520:sc_transmit: transmit APDU failed: -1107 (Transmit failed) [sc-hsm-tool] card.c:434:sc_unlock: called [sc-hsm-tool] iso7816.c:611:iso7816_get_challenge: APDU transmit failed: -1107 (Transmit failed) [sc-hsm-tool] card.c:773:sc_get_challenge: returning with: -1107 (Transmit failed) number failed with Transmit failed [sc-hsm-tool] card.c:434:sc_unlock: called [sc-hsm-tool] reader-pcsc.c:587:pcsc_unlock: called Nitrokey Nitrokey HSM 0:SCardEndTransaction failed: 0x80100068 [sc-hsm-tool] card.c:336:sc_disconnect_card: called [sc-hsm-tool] reader-pcsc.c:533:pcsc_disconnect: called [sc-hsm-tool] card.c:357:sc_disconnect_card: returning with: 0 (Success) [sc-hsm-tool] ctx.c:842:sc_release_context: called [sc-hsm-tool] reader-pcsc.c:794:pcsc_finish: called[/size]