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 "openpgp.h"
|
||||||
#include "asn1.h"
|
#include "asn1.h"
|
||||||
|
|
||||||
|
extern bool is_gpg;
|
||||||
|
|
||||||
int cmd_get_data() {
|
int cmd_get_data() {
|
||||||
if (apdu.nc > 0) {
|
if (apdu.nc > 0) {
|
||||||
return SW_WRONG_LENGTH();
|
return SW_WRONG_LENGTH();
|
||||||
|
|||||||
@@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
|
|
||||||
bool is_gpg = true;
|
|
||||||
|
|
||||||
extern const uint8_t openpgp_aid[];
|
extern const uint8_t openpgp_aid[];
|
||||||
extern const uint8_t openpgp_aid_full[];
|
extern const uint8_t openpgp_aid_full[];
|
||||||
|
|
||||||
|
|||||||
@@ -163,6 +163,4 @@
|
|||||||
|
|
||||||
#define EF_DEV_CONF 0x1122
|
#define EF_DEV_CONF 0x1122
|
||||||
|
|
||||||
extern bool is_gpg;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
#include "asn1.h"
|
#include "asn1.h"
|
||||||
#include "management.h"
|
#include "management.h"
|
||||||
|
|
||||||
|
bool is_gpg = true;
|
||||||
|
|
||||||
int man_process_apdu();
|
int man_process_apdu();
|
||||||
int man_unload();
|
int man_unload();
|
||||||
|
|
||||||
@@ -39,6 +41,7 @@ int man_select(app_t *a, uint8_t force) {
|
|||||||
res_APDU_size = strlen((char *) res_APDU);
|
res_APDU_size = strlen((char *) res_APDU);
|
||||||
apdu.ne = res_APDU_size;
|
apdu.ne = res_APDU_size;
|
||||||
init_piv();
|
init_piv();
|
||||||
|
is_gpg = false;
|
||||||
return PICOKEY_OK;
|
return PICOKEY_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +148,6 @@ int man_process_apdu() {
|
|||||||
}
|
}
|
||||||
for (const cmd_t *cmd = cmds; cmd->ins != 0x00; cmd++) {
|
for (const cmd_t *cmd = cmds; cmd->ins != 0x00; cmd++) {
|
||||||
if (cmd->ins == INS(apdu)) {
|
if (cmd->ins == INS(apdu)) {
|
||||||
is_gpg = false;
|
|
||||||
int r = cmd->cmd_handler();
|
int r = cmd->cmd_handler();
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user