Skip to content

Commit

Permalink
Parse IBAN (field 5F53) as format 'an'
Browse files Browse the repository at this point in the history
EMV 4.4 Book 3 Annex A states that this field has format 'var' and a
length of up to 34 bytes while Wikipedia states that an IBAN consists of
34 alphanumeric characters. Therefore this implementation assumes that
this field can be interpreted as format 'an'.
  • Loading branch information
leonlynch committed Mar 22, 2024
1 parent 0e1ab29 commit 5ce902c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/emv_strings.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,12 @@ int emv_tlv_get_info(
"Uniquely identifies the account of a customer at a financial "
"institution as defined in ISO 13616.";
info->format = EMV_FORMAT_VAR;
return emv_tlv_value_get_string(tlv, EMV_FORMAT_CN, 34, value_str, value_str_len);
// EMV 4.4 Book 3 Annex A states that this field has format 'var'
// and a length of up to 34 bytes while Wikipedia states that an
// IBAN consists of 34 alphanumeric characters. Therefore this
// implementation assumes that this field can be interpreted as
// format 'an'.
return emv_tlv_value_get_string(tlv, EMV_FORMAT_AN, 34, value_str, value_str_len);

case EMV_TAG_5F54_BANK_IDENTIFIER_CODE:
info->tag_name = "Bank Identifier Code (BIC)";
Expand Down

0 comments on commit 5ce902c

Please sign in to comment.