def test_keygen_3(card): pk = card.cmd_genkey(3) fpr_date = rsa_keys.calc_fpr(pk[0], pk[1]) r = card.cmd_put_data(0x00, 0xc9, fpr_date[0]) if r: r = card.cmd_put_data(0x00, 0xd0, fpr_date[1]) assert r
def test_keygen_2(self, card): pk = card.cmd_genkey(2) fpr_date = rsa_keys.calc_fpr(pk[0], pk[1]) r = card.cmd_put_data(0x00, 0xc8, fpr_date[0]) if r: r = card.cmd_put_data(0x00, 0xcf, fpr_date[1]) assert r
def generate_key(openpgp_keyno_str): openpgp_keyno = int(openpgp_keyno_str) pubkey_info = ftc.token.cmd_genkey(openpgp_keyno) scc.data = rsa_keys.calc_fpr(pubkey_info[0], pubkey_info[1])