Lines Matching refs:res
95 auto res = reader->isSecureElementPresent(&status); in testSelectableAid() local
96 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testSelectableAid()
99 res = reader->openSession(&session); in testSelectableAid()
100 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testSelectableAid()
103 res = session->openLogicalChannel(aid, 0x00, seListener, &channel); in testSelectableAid()
104 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testSelectableAid()
107 res = channel->getSelectResponse(&selectResponse); in testSelectableAid()
108 ASSERT_TRUE(res.isOk()) << "failed to get Select Response"; in testSelectableAid()
135 auto res = reader->isSecureElementPresent(&status); in testUnauthorisedAid() local
136 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testUnauthorisedAid()
139 res = reader->openSession(&session); in testUnauthorisedAid()
140 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testUnauthorisedAid()
143 res = session->openLogicalChannel(aid, 0x00, seListener, &channel); in testUnauthorisedAid()
148 if (!res.isOk()) { in testUnauthorisedAid()
149 ASSERT_EQ(res.getExceptionCode(), EX_SECURITY); in testUnauthorisedAid()
150 ASSERT_FALSE(res.isOk()) << "expected failed status for this test"; in testUnauthorisedAid()
171 auto res = reader->isSecureElementPresent(&status); in testTransmitAPDU() local
172 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testTransmitAPDU()
175 res = reader->openSession(&session); in testTransmitAPDU()
176 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testTransmitAPDU()
179 res = session->openLogicalChannel(aid, 0x00, seListener, &channel); in testTransmitAPDU()
180 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testTransmitAPDU()
183 res = channel->getSelectResponse(&selectResponse); in testTransmitAPDU()
184 ASSERT_TRUE(res.isOk()) << "failed to get Select Response"; in testTransmitAPDU()
191 res = channel->transmit(apdu, &transmitResponse); in testTransmitAPDU()
192 LOG(INFO) << "STATUS OF TRNSMIT: " << res.getExceptionCode() in testTransmitAPDU()
193 << " Message: " << res.getMessage(); in testTransmitAPDU()
196 ASSERT_TRUE(res.isOk()) << "failed to transmit"; in testTransmitAPDU()
216 auto res = reader->isSecureElementPresent(&status); in testUnauthorisedAPDU() local
217 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testUnauthorisedAPDU()
220 res = reader->openSession(&session); in testUnauthorisedAPDU()
221 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testUnauthorisedAPDU()
224 res = session->openLogicalChannel(aid, 0x00, seListener, &channel); in testUnauthorisedAPDU()
225 ASSERT_TRUE(res.isOk()) << res.getMessage(); in testUnauthorisedAPDU()
228 res = channel->getSelectResponse(&selectResponse); in testUnauthorisedAPDU()
229 ASSERT_TRUE(res.isOk()) << "failed to get Select Response"; in testUnauthorisedAPDU()
236 res = channel->transmit(apdu, &transmitResponse); in testUnauthorisedAPDU()
237 LOG(INFO) << "STATUS OF TRNSMIT: " << res.getExceptionCode() in testUnauthorisedAPDU()
238 << " Message: " << res.getMessage(); in testUnauthorisedAPDU()
242 if (!res.isOk()) { in testUnauthorisedAPDU()
243 ASSERT_EQ(res.getExceptionCode(), EX_SECURITY); in testUnauthorisedAPDU()
244 ASSERT_FALSE(res.isOk()) << "expected failed status for this test"; in testUnauthorisedAPDU()