示例#1
0
    def __deleteApplication(self, args):
        if not self.__checkContext(): return
        if not self.__checkCardInfo(): return
        if not self.__checkSecurityInfo(): return
        
        appAID = args[0]

        try:
            self.__handler.handleLog('deleteApplication: Start ...')
            gp.deleteApplication(self.__context, self.__cardInfo, self.__securityInfo, (appAID, ))
            self.__handler.handleLog('deleteApplication: succeeded.')
        except Exception, e:
            self.__handler.handleException(e)
示例#2
0
    def __deleteApplication(self, args):
        if not self.__checkContext(): return
        if not self.__checkCardInfo(): return
        if not self.__checkSecurityInfo(): return

        self.__handler.handleActionBegin("delete application")

        appAID = args[0]

        try:
            self.__handler.handleLog('deleteApplication: Start ...')
            gp.deleteApplication(self.__context, self.__cardInfo,
                                 self.__securityInfo, (appAID, ))
            self.__handler.handleLog('deleteApplication: succeeded.',
                                     wx.LOG_Info)
        except Exception, e:
            self.__handler.handleException(e)
示例#3
0
 def deleteApplication(self, appAIDs):
     self.__checkContext()
     self.__checkCardInfo()
     self.__checkSecurityInfo()
     gp.deleteApplication(self.__context, self.__cardInfo, self.__securityInfo, appAIDs)
示例#4
0
        data_confirmation_counter = gp.getData(c, cc, sc, gp.TAG_CONFIRMATION_COUNTER)
        INFO_ARRAY(data_confirmation_counter, "    Data CONFIRMATION COUNTER: ")
    except:
        pass
    try:
        data_sequence_counter = gp.getData(c, cc, sc, gp.TAG_SEQUENCE_COUNTER)
        INFO_ARRAY(data_sequence_counter, "    Data SEQUENCE COUNTER: ", )
    except:
        pass
    
    packageAID = '\x11\x22\x33\x44\x55'
    moduleAID = '\x11\x22\x33\x44\x55\x00'
    appletAID = '\x11\x22\x33\x44\x55\x00'
    INFO("Delete Applet:")
    try:
        gp.deleteApplication(c, cc, sc, [packageAID]);
    except:
        pass
    
    INFO("Load CAP:")
    gp.installForLoad(c, cc, sc, packageAID, None, None, None, 0, 0, 0)
    gp.load(c, cc, sc, None, 'javacardos.cap')
    INFO("Install Applet:")
    gp.installForInstallAndMakeSelectable(c, cc, sc, packageAID, moduleAID, appletAID, 0x00, 0, 0, None, None)
    INFO("Process Applet:")
    gp.selectApplication(c, cc, appletAID);
    gp.sendApdu(c, cc, sc, '\x00\x00\x00\x00\x00')
    
    gp.disconnectCard(c, cc)
    gp.releaseContext(c)