mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
move capk.txt to resources/
This commit is contained in:
parent
c6ac4056d3
commit
382129205f
2 changed files with 8 additions and 7 deletions
|
@ -29,6 +29,8 @@
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
#include "crypto.h"
|
#include "crypto.h"
|
||||||
#include "proxmark3.h"
|
#include "proxmark3.h"
|
||||||
|
#include "fileutils.h"
|
||||||
|
#include "pm3_cmd.h"
|
||||||
|
|
||||||
#define BCD(c) (((c) >= '0' && (c) <= '9') ? ((c) - '0') : \
|
#define BCD(c) (((c) >= '0' && (c) <= '9') ? ((c) - '0') : \
|
||||||
-1)
|
-1)
|
||||||
|
@ -483,13 +485,12 @@ struct emv_pk *emv_pk_get_ca_pk(const unsigned char *rid, unsigned char idx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const char *relfname = "emv/capk.txt";
|
char *path;
|
||||||
|
if (searchFile(&path, RESOURCES_SUBDIR, "capk", ".txt") != PM3_SUCCESS) {
|
||||||
char fname[strlen(get_my_executable_directory()) + strlen(relfname) + 1];
|
return NULL;
|
||||||
strcpy(fname, get_my_executable_directory());
|
}
|
||||||
strcat(fname, relfname);
|
pk = emv_pk_get_ca_pk_from_file(path, rid, idx);
|
||||||
|
free(path);
|
||||||
pk = emv_pk_get_ca_pk_from_file(fname, rid, idx);
|
|
||||||
|
|
||||||
if (!pk)
|
if (!pk)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue