Lines Matching refs:rpdu

52 getResponseInternal(uint8_t cla, phNxpEse_7816_rpdu_t& rpdu,
517 phNxpEse_7816_rpdu_t rpdu; in openLogicalChannel() local
519 phNxpEse_memset(&rpdu, 0x00, sizeof(phNxpEse_7816_rpdu_t)); in openLogicalChannel()
546 rpdu.len = 0x02; in openLogicalChannel()
547 rpdu.pdata = (uint8_t*)phNxpEse_memalloc(cpdu.le * sizeof(uint8_t)); in openLogicalChannel()
549 status = phNxpEse_7816_Transceive(&cpdu, &rpdu); in openLogicalChannel()
553 if (rpdu.len > 0 && (rpdu.sw1 == 0x64 && rpdu.sw2 == 0xFF)) { in openLogicalChannel()
561 uint16_t responseLen = rpdu.len + 2; in openLogicalChannel()
563 memcpy(&resApduBuff.selectResponse[0], rpdu.pdata, rpdu.len); in openLogicalChannel()
564 resApduBuff.selectResponse[responseLen - 1] = rpdu.sw2; in openLogicalChannel()
565 resApduBuff.selectResponse[responseLen - 2] = rpdu.sw1; in openLogicalChannel()
567 if (rpdu.sw1 == SW1_BYTES_REMAINING) { in openLogicalChannel()
569 getResponseInternal(cpdu.cla, rpdu, resApduBuff.selectResponse); in openLogicalChannel()
576 if ((rpdu.sw1 == 0x90 && rpdu.sw2 == 0x00) || (rpdu.sw1 == 0x62) || in openLogicalChannel()
577 (rpdu.sw1 == 0x63)) { in openLogicalChannel()
581 else if ((rpdu.sw1 == 0x6A && rpdu.sw2 == 0x82) || in openLogicalChannel()
582 (rpdu.sw1 == 0x69 && (rpdu.sw2 == 0x99 || rpdu.sw2 == 0x85))) { in openLogicalChannel()
586 else if (rpdu.sw1 == 0x6A && rpdu.sw2 == 0x86) { in openLogicalChannel()
607 phNxpEse_free(rpdu.pdata); in openLogicalChannel()
624 phNxpEse_7816_rpdu_t rpdu; in openBasicChannel() local
700 phNxpEse_memset(&rpdu, 0x00, sizeof(phNxpEse_7816_rpdu_t)); in openBasicChannel()
712 rpdu.len = 0x02; in openBasicChannel()
713 rpdu.pdata = (uint8_t*)phNxpEse_memalloc(cpdu.le * sizeof(uint8_t)); in openBasicChannel()
719 status = phNxpEse_7816_Transceive(&cpdu, &rpdu); in openBasicChannel()
725 if (rpdu.len > 0 && (rpdu.sw1 == 0x64 && rpdu.sw2 == 0xFF)) { in openBasicChannel()
733 uint16_t responseLen = rpdu.len + 2; in openBasicChannel()
735 memcpy(&result[0], rpdu.pdata, rpdu.len); in openBasicChannel()
736 result[responseLen - 1] = rpdu.sw2; in openBasicChannel()
737 result[responseLen - 2] = rpdu.sw1; in openBasicChannel()
738 if (rpdu.sw1 == SW1_BYTES_REMAINING) { in openBasicChannel()
739 sestatus = getResponseInternal(cpdu.cla, rpdu, result); in openBasicChannel()
746 if (((rpdu.sw1 == 0x90) && (rpdu.sw2 == 0x00)) || (rpdu.sw1 == 0x62) || in openBasicChannel()
747 (rpdu.sw1 == 0x63)) { in openBasicChannel()
757 else if ((rpdu.sw1 == 0x6A && rpdu.sw2 == 0x82) || in openBasicChannel()
758 (rpdu.sw1 == 0x69 && (rpdu.sw2 == 0x99 || rpdu.sw2 == 0x85))) { in openBasicChannel()
762 else if (rpdu.sw1 == 0x6A && rpdu.sw2 == 0x86) { in openBasicChannel()
781 phNxpEse_free(rpdu.pdata); in openBasicChannel()
790 phNxpEse_7816_rpdu_t rpdu; in internalCloseChannel() local
799 phNxpEse_memset(&rpdu, 0x00, sizeof(phNxpEse_7816_rpdu_t)); in internalCloseChannel()
815 status = phNxpEse_7816_Transceive(&cpdu, &rpdu); in internalCloseChannel()
817 if ((rpdu.sw1 == 0x90) && (rpdu.sw2 == 0x00)) { in internalCloseChannel()
985 getResponseInternal(uint8_t cla, phNxpEse_7816_rpdu_t& rpdu, in getResponseInternal() argument
991 uint16_t responseLen = rpdu.len; // Response already copied in getResponseInternal()
992 uint8_t getRespLe = rpdu.sw2; // Response pending to receive in getResponseInternal()
1035 rpdu.sw1 = rspApdu.p_data[rspApdu.len - 2]; in getResponseInternal()
1036 rpdu.sw2 = rspApdu.p_data[rspApdu.len - 1]; in getResponseInternal()
1038 rpdu.sw1 = INVALID_LEN_SW1; in getResponseInternal()
1039 rpdu.sw2 = INVALID_LEN_SW2; in getResponseInternal()