Adding version header to show in lsusb command (bcdDevice) and major version in pkcs15-tool -D.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-03-08 18:43:30 +01:00
parent 9be78aade6
commit 4a0144ed2a
5 changed files with 44 additions and 24 deletions

View File

@@ -8,6 +8,7 @@
#include "mbedtls/rsa.h"
#include "mbedtls/ecp.h"
#include "mbedtls/ecdsa.h"
#include "version.h"
const uint8_t sc_hsm_aid[] = {
11,
@@ -195,7 +196,7 @@ int parse_token_info(const file_t *f, int mode) {
char *label = "PicoHSM";
char *manu = "Pol Henarejos";
sc_pkcs15_tokeninfo_t *ti = (sc_pkcs15_tokeninfo_t *)calloc(1, sizeof(sc_pkcs15_tokeninfo_t));
ti->version = 3;
ti->version = HSM_VERSION_MAJOR;
ti->flags = SC_PKCS15_TOKEN_PRN_GENERATION | SC_PKCS15_TOKEN_EID_COMPLIANT;
ti->label = (char *)calloc(strlen(label)+1, sizeof(char));
strlcpy(ti->label, label, strlen(label)+1);