Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building cap #6

Open
JorisBolsens opened this issue Sep 5, 2021 · 0 comments
Open

Building cap #6

JorisBolsens opened this issue Sep 5, 2021 · 0 comments

Comments

@JorisBolsens
Copy link

JorisBolsens commented Sep 5, 2021

I am trying to build a cap file using latest master branch, but it says to run gradlew convertJavaCard which seems to not be a valid task.

I ran gradlew buildJavaCard which seems like it is a valid tasks, and it builds successfully:

[ant:cap] INFO: using JavaCard v3.x SDK in D:\Ubuntu\u2f-javacard\libs-sdks\jc304_kit
[ant:cap] Building CAP with 1 applet from package com.ledger.u2f
[ant:cap] com.ledger.u2f.U2FApplet A000000617004F97A2E94901
[ant:compile] Compiling 8 source files to C:\Users\Epicb\AppData\Local\Temp\jccpro503086039154406036
[ant:cap] CAP saved to D:\Ubuntu\u2f-javacard\build\javacard\ledger-u2f.cap
[ant:export] EXP saved to D:\Ubuntu\u2f-javacard\build\javacard\ledger-u2f.exp\com\ledger\u2f\javacard\u2f.exp
[ant:export] Building jar: D:\Ubuntu\u2f-javacard\build\javacard\ledger-u2f.exp\u2f.jar
[ant:jca] JCA saved to D:\Ubuntu\u2f-javacard\build\javacard\ledger-u2f.jca


BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed

But then I get an error when I try to install the key

>gp -d -v -a "00 A4 04 00 08 A0 00 00 06 47 2F 00 01" -a "80 01 00 00 80 30 82 01 3c 30 81 e4 a0 03 02 01 02 02 0a 47 90 12 80 00 11 55 95 73 52 30 0a 06 08 2a 86 48 ce 3d 04 03 02 30 17 31 15 30 13 06 03 55 04 03 13 0c 47 6e 75 62 62 79 20 50 69 6c 6f 74 30 1e 17 0d 31 32 30 38 31 34 31 38 32 39 33 32 5a 17 0d 31 33 30 38 31 34 31 38 32 39 33 32 5a 30 31 31 2f 30 2d 06 03 55 04 03 13 26 50 69 6c 6f 74 47 6e 75 62 62 79 2d 30 2e 34 2e 31 2d 34 37 39 30" -a "80 01 00 80 80 31 32 38 30 30 30 31 31 35 35 39 35 37 33 35 32 30 59 30 13 06 07 2a 86 48 ce 3d 02 01 06 08 2a 86 48 ce 3d 03 01 07 03 42 00 04 8d 61 7e 65 c9 50 8e 64 bc c5 67 3a c8 2a 67 99 da 3c 14 46 68 2c 25 8c 46 3f ff df 58 df d2 fa 3e 6c 37 8b 53 d7 95 c4 a4 df fb 41 99 ed d7 86 2f 23 ab af 02 03 b4 b8 91 1b a0 56 99 94 e1 01 30 0a 06 08 2a 86 48 ce 3d 04 03 02 03 47 00 30 44 02 20 60 cd" -a "80 01 01 00 40 b6 06 1e 9c 22 26 2d 1a ac 1d 96 d8 c7 08 29 b2 36 65 31 dd a2 68 83 2c b8 36 bc d3 0d fa 02 20 63 1b 14 59 f0 9e 63 30 05 57 22 c8 d8 9b 7f 48 88 3b 90 89 b8 8d 60 d1 d9 79 59 02 b3 04 10 df"
GlobalPlatformPro v20.01.23-0-g5ad373b
Running on Windows 10 10.0 amd64, Java 15.0.1 by Oracle Corporation
# Detected readers from JNA2PCSC
[ ] HID Global OMNIKEY 5422 Smartcard Reader 0
[*] HID Global OMNIKEY 5422CL Smartcard Reader 0
SCardConnect("HID Global OMNIKEY 5422CL Smartcard Reader 0", T=*) -> T=1, 3B88800100000011778183006D
SCardBeginTransaction("HID Global OMNIKEY 5422CL Smartcard Reader 0")
Reader: HID Global OMNIKEY 5422CL Smartcard Reader 0
ATR: 3B88800100000011778183006D
More information about your card:
    http://smartcard-atr.appspot.com/parse?ATR=3B88800100000011778183006D

A>> T=1 (4+0008) 00A40400 08 A0000006472F0001
<< (2ms) SCARD_E_NO_ACCESS
Failed to communicate with card in apdu4j.terminals.LoggingCardTerminal@6f7fd0e6: Transmit failed: SCardTransmit got response 0x80100027 (SCARD_E_NO_ACCESS: Access is denied to this file.)
SCardEndTransaction("HID Global OMNIKEY 5422CL Smartcard Reader 0")
SCardDisconnect("HID Global OMNIKEY 5422CL Smartcard Reader 0", true) tx:0/rx:0

I was able to download and install the cap file from the release page, but it seems that one is old and does not work with windows 10 (also have issues getting it to work with google authenticator). However it works great with OSX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant