{
int ret = 0;
- if ((ret = select(fid)) >= SCARD_ERROR_OK)
- {
+ if ((ret = select(fid)) >= SCARD_ERROR_OK) {
ByteArray dodfData, extra;
_DBG("response : %s", selectResponse.toString().c_str());
- if ((ret = readBinary(0, 0, getFCP()->getFileSize(), dodfData)) == 0)
- {
- _DBG("odfData : %s", dodfData.toString().c_str());
+ if ((ret = readBinaryAll(0, dodfData)) == 0) {
+ _DBG("dodfData : %s", dodfData.toString().c_str());
parseData(dodfData);
- }
- else
- {
+ } else {
_ERR("readBinary failed, [%d]", ret);
}
- }
- else
- {
+ } else {
_ERR("select failed, [%d]", ret);
}
}
{
int ret = 0;
- if ((ret = select(path)) >= SCARD_ERROR_OK)
- {
+ if ((ret = select(path)) >= SCARD_ERROR_OK) {
ByteArray dodfData, extra;
_DBG("response : %s", selectResponse.toString().c_str());
- if ((ret = readBinary(0, 0, getFCP()->getFileSize(), dodfData)) == 0)
- {
+ if ((ret = readBinaryAll(0, dodfData)) == 0) {
_DBG("dodfData : %s", dodfData.toString().c_str());
parseData(dodfData);
- }
- else
- {
+ } else {
_ERR("readBinary failed, [%d]", ret);
}
- }
- else
- {
+ } else {
_ERR("select failed, [%d]", ret);
}
}
bool result = false;
SimpleTLV tlv(data);
- while (tlv.decodeTLV())
- {
- switch (tlv.getTag())
- {
+ while (tlv.decodeTLV()) {
+ switch (tlv.getTag()) {
case (unsigned int)0xA1 : /* CHOICE 1 : OidDO */
{
PKCS15OID oid(tlv.getValue());
map<ByteArray, PKCS15OID>::const_iterator item;
item = mapOID.find(oid);
- if (item != mapOID.end())
- {
+ if (item != mapOID.end()) {
data = item->second.getPath();
result = 0;
}