mirror of
https://github.com/polhenarejos/pico-openpgp.git
synced 2026-04-09 17:25:51 +02:00
Move is_gpg flag for fido2.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include "openpgp.h"
|
||||
#include "asn1.h"
|
||||
|
||||
extern bool is_gpg;
|
||||
|
||||
int cmd_get_data() {
|
||||
if (apdu.nc > 0) {
|
||||
return SW_WRONG_LENGTH();
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
#include "files.h"
|
||||
|
||||
bool is_gpg = true;
|
||||
|
||||
extern const uint8_t openpgp_aid[];
|
||||
extern const uint8_t openpgp_aid_full[];
|
||||
|
||||
|
||||
@@ -163,6 +163,4 @@
|
||||
|
||||
#define EF_DEV_CONF 0x1122
|
||||
|
||||
extern bool is_gpg;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "asn1.h"
|
||||
#include "management.h"
|
||||
|
||||
bool is_gpg = true;
|
||||
|
||||
int man_process_apdu();
|
||||
int man_unload();
|
||||
|
||||
@@ -39,6 +41,7 @@ int man_select(app_t *a, uint8_t force) {
|
||||
res_APDU_size = strlen((char *) res_APDU);
|
||||
apdu.ne = res_APDU_size;
|
||||
init_piv();
|
||||
is_gpg = false;
|
||||
return PICOKEY_OK;
|
||||
}
|
||||
|
||||
@@ -145,7 +148,6 @@ int man_process_apdu() {
|
||||
}
|
||||
for (const cmd_t *cmd = cmds; cmd->ins != 0x00; cmd++) {
|
||||
if (cmd->ins == INS(apdu)) {
|
||||
is_gpg = false;
|
||||
int r = cmd->cmd_handler();
|
||||
return r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user