Ejemplo n.º 1
0
 def tearDownClass(cls):
     instance, pkg, applet = cls.des.getaids()
     api_pcsc.connectreader()
     api_gp.card()
     api_gp.auth()
     api_gp.deleteaid(pkg, True, expectSW='9000')
     cls.des = None
     api_pcsc.disconnect()
Ejemplo n.º 2
0
    def setUpClass(cls):
        # delete, load, install
        des = DESKEY()
        instance, pkg, applet = des.getaids()

        api_pcsc.connectreader()
        api_gp.card()
        api_gp.auth()
        api_gp.deleteaid(pkg, True, expectSW='')  # omit delete result
        api_gp.upload(des.getcappath(), pkg)
        api_gp.install(instance, pkg, applet)

        cls.des = des
Ejemplo n.º 3
0
    def setUpClass(cls):
        # delete, load, install
        alg = ALG_PSEUDO_RANDOM()
        instance, pkg, applet = alg.getaids()

        api_pcsc.connectreader()
        api_gp.card()
        api_gp.auth()
        api_gp.deleteaid(pkg, True, expectSW='')  # omit delete result
        api_gp.upload(alg.getcappath(), pkg)
        api_gp.install(instance, pkg, applet)

        cls.alg = alg
Ejemplo n.º 4
0
    def setUpClass(cls):
        # delete, load, install
        jcs = JCSystem()
        instance, pkg, applet = jcs.getaids()

        api_pcsc.connectreader()
        api_gp.card()
        api_gp.auth()
        api_gp.deleteaid(pkg, True, expectSW='')  # omit delete result
        api_gp.upload(jcs.getcappath(), pkg)
        api_gp.install(instance, pkg, applet)

        cls.jcs = jcs
Ejemplo n.º 5
0
    def tearDownClass(cls):
        instance, pkg, applet = cls.etc.getaids()
        api_pcsc.connectreader(Cloud4700.READER_NAME)
        api_gp.card()
        api_gp.auth()
        api_gp.deleteaid(pkg, True, expectSW='9000')
        cls.etc = None

        cls.cloud.enable_all_classes()
        cls.cloud.enable_pps()
        cls.cloud.set_clock_divison(4) # restore to 4.8 MHz
        cls.cloud = None

        api_pcsc.disconnect()
    def setUpClass(cls):
        # delete, load, install
        app = Performace_arrayCopy()
        instance, pkg, applet = app.getaids()

        api_pcsc.connectreader()
        api_gp.card()
        api_gp.auth()
        api_gp.deleteaid(pkg, True, expectSW='')  # omit delete result
        api_gp.upload(app.getcappath(), pkg)
        api_gp.install(instance, pkg, applet)

        api_pcsc.reset()
        cls.app = app
Ejemplo n.º 7
0
    def setUpClass(cls):
        # delete, load, install
        etc = Applet_ETC_ITS_BCTC()
        instance, pkg, applet = etc.getaids()

        api_pcsc.connectreader(Cloud4700.READER_NAME) # 指明读卡器名字,因为目前只有4700可以通过APDU方式设定各类电压是否支持
        api_gp.card()
        api_gp.auth()
        api_gp.deleteaid(pkg, True, expectSW='') # omit delete result
        api_gp.upload(etc.getcappath(), pkg)
        api_gp.install(instance, pkg, applet)

        cloud = Cloud4700()
        cloud.enable_all_classes()
        cloud.set_clock_divison(4) # restore to 4.8 MHz
        api_pcsc.reset()

        cls.etc = etc
        cls.cloud = cloud