Changed API: encode_tagged is now encode_application since we are encoding an application tag.

This commit is contained in:
skarg
2007-10-13 12:26:16 +00:00
parent fe2c7cd00a
commit 3d6158443c
36 changed files with 466 additions and 464 deletions
+11 -11
View File
@@ -53,22 +53,22 @@ int arf_encode_apdu(uint8_t * apdu,
apdu[2] = invoke_id;
apdu[3] = SERVICE_CONFIRMED_ATOMIC_READ_FILE; /* service choice */
apdu_len = 4;
apdu_len += encode_tagged_object_id(&apdu[apdu_len],
apdu_len += encode_application_object_id(&apdu[apdu_len],
data->object_type, data->object_instance);
switch (data->access) {
case FILE_STREAM_ACCESS:
apdu_len += encode_opening_tag(&apdu[apdu_len], 0);
apdu_len += encode_tagged_signed(&apdu[apdu_len],
apdu_len += encode_application_signed(&apdu[apdu_len],
data->type.stream.fileStartPosition);
apdu_len += encode_tagged_unsigned(&apdu[apdu_len],
apdu_len += encode_application_unsigned(&apdu[apdu_len],
data->type.stream.requestedOctetCount);
apdu_len += encode_closing_tag(&apdu[apdu_len], 0);
break;
case FILE_RECORD_ACCESS:
apdu_len += encode_opening_tag(&apdu[apdu_len], 1);
apdu_len += encode_tagged_signed(&apdu[apdu_len],
apdu_len += encode_application_signed(&apdu[apdu_len],
data->type.record.fileStartRecord);
apdu_len += encode_tagged_unsigned(&apdu[apdu_len],
apdu_len += encode_application_unsigned(&apdu[apdu_len],
data->type.record.RecordCount);
apdu_len += encode_closing_tag(&apdu[apdu_len], 1);
break;
@@ -193,23 +193,23 @@ int arf_ack_encode_apdu(uint8_t * apdu,
apdu_len = 3;
/* endOfFile */
apdu_len +=
encode_tagged_boolean(&apdu[apdu_len], data->endOfFile);
encode_application_boolean(&apdu[apdu_len], data->endOfFile);
switch (data->access) {
case FILE_STREAM_ACCESS:
apdu_len += encode_opening_tag(&apdu[apdu_len], 0);
apdu_len += encode_tagged_signed(&apdu[apdu_len],
apdu_len += encode_application_signed(&apdu[apdu_len],
data->type.stream.fileStartPosition);
apdu_len += encode_tagged_octet_string(&apdu[apdu_len],
apdu_len += encode_application_octet_string(&apdu[apdu_len],
&data->fileData);
apdu_len += encode_closing_tag(&apdu[apdu_len], 0);
break;
case FILE_RECORD_ACCESS:
apdu_len += encode_opening_tag(&apdu[apdu_len], 1);
apdu_len += encode_tagged_signed(&apdu[apdu_len],
apdu_len += encode_application_signed(&apdu[apdu_len],
data->type.record.fileStartRecord);
apdu_len += encode_tagged_unsigned(&apdu[apdu_len],
apdu_len += encode_application_unsigned(&apdu[apdu_len],
data->type.record.RecordCount);
apdu_len += encode_tagged_octet_string(&apdu[apdu_len],
apdu_len += encode_application_octet_string(&apdu[apdu_len],
&data->fileData);
apdu_len += encode_closing_tag(&apdu[apdu_len], 1);
break;