Use new methods search_file() and file_put_data().
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -54,7 +54,7 @@ int cmd_pso() {
|
||||
file_t *ca_ef = search_dynamic_file(fid);
|
||||
if (!ca_ef) {
|
||||
ca_ef = file_new(fid);
|
||||
flash_write_data_to_file(ca_ef, apdu.data, (uint16_t)apdu.nc);
|
||||
file_put_data(ca_ef, apdu.data, (uint16_t)apdu.nc);
|
||||
if (add_cert_puk_store(file_get_data(ca_ef), file_get_size(ca_ef),
|
||||
false) != CCID_OK) {
|
||||
return SW_FILE_FULL();
|
||||
@@ -144,7 +144,7 @@ int cmd_pso() {
|
||||
fid,
|
||||
buf,
|
||||
cd_len);
|
||||
flash_write_data_to_file(cd_ef, buf, cd_len);
|
||||
file_put_data(cd_ef, buf, cd_len);
|
||||
free(buf);
|
||||
if (r == 0) {
|
||||
return SW_EXEC_ERROR();
|
||||
|
||||
Reference in New Issue
Block a user