00001 /* 00002 Simple Operating System for Smartcard Education 00003 Copyright (C) 2002 Matthias Bruestle <m@mbsks.franken.de> 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00029 #ifndef SOSSE_COMMANDS_H 00030 #define SOSSE_COMMANDS_H 00031 00032 #define CLA_PROP 0x80 00033 00034 #define INS_WRITE 0x02 00035 #define INS_READ 0x04 00036 #define INS_LED 0x06 00037 00038 #define INS_CHANGE_PIN 0x24 00039 #define INS_CREATE 0xE0 00040 #define INS_DELETE 0xE4 00041 #define INS_EXTERNAL_AUTH 0x82 00042 #define INS_GET_CHALLENGE 0x84 00043 #define INS_GET_RESPONSE 0xC0 00044 #define INS_INTERNAL_AUTH 0x88 00045 #define INS_READ_BINARY 0xB0 00046 #define INS_SELECT 0xA4 00047 #define INS_UNBLOCK_PIN 0x2C 00048 #define INS_UPDATE_BINARY 0xD6 00049 #define INS_VERIFY_KEY 0x2A 00050 #define INS_VERIFY_PIN 0x20 00051 00052 00053 extern iu8 resplen; 00054 00057 void cmd_write( void ); 00060 void cmd_read( void ); 00061 00064 void cmd_led( void ); 00065 00068 void cmd_changeUnblockPIN( void ); 00071 void cmd_create( void ); 00074 void cmd_delete( void ); 00077 void cmd_extAuth( void ); 00080 void cmd_getChallenge( void ); 00083 void cmd_getResponse( void ); 00086 void cmd_intAuth( void ); 00089 void cmd_readBinary( void ); 00092 void cmd_select( void ); 00095 void cmd_updateBinary( void ); 00101 void cmd_verifyKeyPIN( void ); 00102 00103 #endif /* SOSSE_COMMANDS_H */