admin.name = AustrianQuickEPurse admin.model = Various admin.description = Austrian Quick E-purse admin.supplier = Niki W. Waibel admin.version = 0.1 admin.type = smartcard --StartWords-- noID onException AustrianQuickEPurse tokenType setprop "Trying " tokenType getprop concat msg "VERSION 0.1" msg atr.atr getprop # check the ATR length -> 24 = 0x18 # 3B BF 11 00 81 31 .. 45 45 50 41 00 00 00 00 .. .. .. .. 00 00 .. .. .. # 3B BF 11 00 81 31 FE 45 45 50 41 00 00 00 00 36 60 72 43 00 00 00 00 96 dup hexlength 18 hexequals noID jmpIfFalse dup 3BBF11008131FE4545504100000000366072430000000096 hexequals AustrianQuickEPurse2008 jmpIfTrue # DEBUG " DBG: ATR (" swap concat ") NOT OK" swap concat msg showstack # END DEBUG false noID jmpifFalse AustrianQuickEPurse2008:: # drop atr from the stack drop " DBG: ATR matches AustrianQuickEPurse2008" msg # GetCardData16 -> 16byteSerialNumber 80F6000000 00 exchangeAPDU badCard jmpIfFalse 9000 hexequals noID jmpIfFalse drop noID jmpIfFalse # log sun ray uniq identifier dup " Token ID: " swap concat tokenType getprop " Token Type: " swap concat concat "Identified " swap concat msg # return the tokenType and Token ID tokenType getprop returnID # # This card isn't a card that we could identify # so just return and let the next config file (if any) # have a shot at the card. # noID:: "Unable to determine ID for " tokenType getprop concat msg return # # an error occurred while accessing the card # badCard:: "Error accessing " tokenType getprop concat msg return --EndWords--