add emv part

This commit is contained in:
merlokk committed 2021-09-13 15:20:33 +03:00
1 parent 775faaffd6
commit 9db39e2493
2 files changed
+8 -8

No files matched your search

+5 -5
View File
@@ -191,7 +191,7 @@ static struct emv_pk *emv_pki_decode_key_ex(const struct emv_pk *enc_pk,
exp_tlv,
add_tlv,
sdatl_tlv,
NULL);
(uint8_t *)NULL);
if (!data || data_len < 11 + pan_length) {
PrintAndLogEx(WARNING, "ERROR: Can't decode message");
return NULL;
@@ -365,7 +365,7 @@ struct tlvdb *emv_pki_recover_dac_ex(const struct emv_pk *enc_pk, const struct t
3,
sda_tlv,
&sda_tdata,
NULL);
(uint8_t *)NULL);
free(sdatl); // malloc here: emv_pki_sdatl_fill
@@ -396,7 +396,7 @@ struct tlvdb *emv_pki_recover_idn_ex(const struct emv_pk *enc_pk, const struct t
tlvdb_get(db, 0x9f4b, NULL),
2,
dyn_tlv,
NULL);
(uint8_t *)NULL);
if (!data || data_len < 3)
return NULL;
@@ -432,7 +432,7 @@ struct tlvdb *emv_pki_recover_atc_ex(const struct emv_pk *enc_pk, const struct t
tlvdb_get(db, 0x9f02, NULL),
tlvdb_get(db, 0x5f2a, NULL),
tlvdb_get(db, 0x9f69, NULL),
NULL);
(uint8_t *)NULL);
if (!data || data_len < 3)
return NULL;
@@ -502,7 +502,7 @@ struct tlvdb *emv_pki_perform_cda_ex(const struct emv_pk *enc_pk, const struct t
tlvdb_get(this_db, 0x9f4b, NULL),
2,
un_tlv,
NULL);
(uint8_t *)NULL);
if (!data || data_len < 3) {
PrintAndLogEx(WARNING, "ERROR: can't decode message. [%zu bytes]", data_len);
return NULL;
+3 -3
View File
@@ -204,7 +204,7 @@ static struct tlvdb *emv_pki_sign_key(const struct crypto_pk *cp,
msg, pos,
tlvdb_get(exp_db, exp_tag, NULL),
add_tlv,
NULL);
(uint8_t *)NULL);
free(msg);
if (!db) {
free(exp_db);
@@ -244,7 +244,7 @@ struct tlvdb *emv_pki_sign_dac(const struct crypto_pk *cp, const struct tlv *dac
0x93, 0,
msg, pos,
sda_tlv,
NULL);
(uint8_t *)NULL);
free(msg);
@@ -269,7 +269,7 @@ struct tlvdb *emv_pki_sign_idn(const struct crypto_pk *cp, const struct tlv *idn
0x9f4b, 0,
msg, pos,
dyn_tlv,
NULL);
(uint8_t *)NULL);
free(msg);