Open jraynes opened 6 years ago
I tried to compile with the 2.1.2 SDK but that does not compile:
ant -DJAVACARD_HOME=c:\jc212
Buildfile: C:\Users\jraynes\Desktop\ykneo-oath-master\build.xml
init:
compile:
convert:
[java]
[java] warning: You did not supply export file for the previous minor version of the package
[java] Java Card 2.1.2 Class File Converter (version 1.2)
[java] Copyright (c) 2001 Sun Microsystems, Inc. All rights reserved.
[java] warning: Method <init> in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java]
[java] warning: Method setKey in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] parsing C:\Users\jraynes\Desktop\ykneo-oath-master\applet\bin\pkgYkneoOath\OathObj.class
[java] warning: Method setDigits in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] parsing C:\Users\jraynes\Desktop\ykneo-oath-master\applet\bin\pkgYkneoOath\YkneoOath.class
[java] warning: Method getDigits in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method getType in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method setName in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method getName in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method getNameLength in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method setProp in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method addObject in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method getFreeObject in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method findObject in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method calculate in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method calculateTruncated in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method getDigestLength in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method isActive in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method setActive in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method setImf in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method clearImf in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
[java] warning: Method <init> in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method install in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method process in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method handleReset in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method handleValidate in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method handleChangeCode in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method handleCalc in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method handleCalcAll in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method handleList in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method handleDelete in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method calculateTotalLen in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method handlePut in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method getLength in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method getLengthBytes in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] warning: Method setLength in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java] converting pkgYkneoOath.OathObj
[java] warning: Method sendData in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
[java]
[java] conversion completed with 1 errors and 36 warnings.
[java] error: export file lang.exp of package java.lang not found.
BUILD FAILED
Make sure you have a card with enough RAM available, this applet requires a bit over 2k of RAM available for transient use. Depending on other applets installed and how their RAM usage is defined this might give you this kind of issues.
For building this requires javacard 2.2.
I've compiled and installed the applet on the javacard but then the Yubico Authenticator desktop does not recognise the card producing an error "No YubiKey deleted"
Yeah, neither for me, because the AID of the applet is wrong. I traced the desktop app and it sends select commands:
00 A4 04 00 07 A0 00 00 05 27 20 01 //this one is used in ykotp applet https://github.com/arekinath/YkOtpApplet 00 A4 04 00 08 A0 00 00 05 27 47 11 17
but from the build file, the applet is compiled using
<property name="PACKAGE_AID" value="0xa0:0x00:0x00:0x05:0x27:0x21:0x01"/>
<property name="APPLET_AID" value="0xa0:0x00:0x00:0x05:0x27:0x21:0x01:0x01"/>
I tried to go with the second AID, did not get far though
00 A4 04 00 08 A0 00 00 05 27 47 11 17 79 03 01 00 02 71 ... 90 00 //select ok, version 1.0.2 00 1D 00 00 00 6D 00 //Instruction code not supported or invalid
With android app, I got an error: OATH functionality missing or disabled. Seems to work with yubikeys only then...
'APPLET_AID' with value '0xa0:0x00:0x00:0x05:0x27:0x21:0x01:0x01' is correct AID for OATH. Does Android Authenticator provides you an error if you have correct AID?
File not found errors are for other applets of YubiKey that are not part of this project. Overall Authenticator apps shouldn't much care about other than OATH applets (they provide additional information about YubiKey like what interfaces supported/enabled on the key, what type of key is that, etc). Checking Android version code and it doesn't use other applets. Hard to tell without any related to issue logs what happens. And please create your own issue as it's not related to topic starter.
Sorry, I was misled by @vlsinitsyn who seems to be having exactly the same issue, so I joined. Will create one once I can debug the android.
I'm trying to install this applet to a Global Platform javacard compliant with both the 2.1 and 2.2 spec. The applet loads fine but when GPShell tried to make it selectable it fails with SW 6985 - Conditions of use not satisfied. See full gpshell transcript below: