mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 14:13:42 -07:00
added get_my_executable_directory() to finding capk file
This commit is contained in:
parent
179f2904d0
commit
670cf98254
1 changed files with 7 additions and 1 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "emv_pk.h"
|
||||
#include "crypto.h"
|
||||
#include <proxmark3.h>
|
||||
|
||||
/* For asprintf */
|
||||
#define _GNU_SOURCE
|
||||
|
@ -489,7 +490,12 @@ struct emv_pk *emv_pk_get_ca_pk(const unsigned char *rid, unsigned char idx)
|
|||
}
|
||||
*/
|
||||
if (!pk) {
|
||||
const char *fname = "emv/capk.txt";
|
||||
const char *relfname = "emv/capk.txt";
|
||||
|
||||
char fname[strlen(get_my_executable_directory()) + strlen(relfname) + 1];
|
||||
strcpy(fname, get_my_executable_directory());
|
||||
strcat(fname, relfname);
|
||||
|
||||
pk = emv_pk_get_ca_pk_from_file(fname, rid, idx);
|
||||
}
|
||||
if (!pk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue