From a020e1f7d420fbfaa25739064719b1c1062d3d9f Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Thu, 1 Oct 2015 16:20:00 +0200 Subject: [PATCH 1/2] pkcs11: Fix signedness issues in debug messages Use the appropriate printf conversion for data->buffer_len which is an unsigned int. --- src/pkcs11/mechanism.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pkcs11/mechanism.c b/src/pkcs11/mechanism.c index 72c0424c..6ceaba77 100644 --- a/src/pkcs11/mechanism.c +++ b/src/pkcs11/mechanism.c @@ -415,7 +415,7 @@ sc_pkcs11_signature_update(sc_pkcs11_operation_t *operation, LOG_FUNC_RETURN(context, CKR_DATA_LEN_RANGE); memcpy(data->buffer + data->buffer_len, pPart, ulPartLen); data->buffer_len += ulPartLen; - sc_log(context, "data length %li", data->buffer_len); + sc_log(context, "data length %u", data->buffer_len); LOG_FUNC_RETURN(context, CKR_OK); } @@ -428,7 +428,7 @@ sc_pkcs11_signature_final(sc_pkcs11_operation_t *operation, LOG_FUNC_CALLED(context); data = (struct signature_data *) operation->priv_data; - sc_log(context, "data length %li", data->buffer_len); + sc_log(context, "data length %u", data->buffer_len); if (data->md) { sc_pkcs11_operation_t *md = data->md; CK_ULONG len = sizeof(data->buffer); @@ -441,7 +441,7 @@ sc_pkcs11_signature_final(sc_pkcs11_operation_t *operation, data->buffer_len = len; } - sc_log(context, "%li bytes to sign", data->buffer_len); + sc_log(context, "%u bytes to sign", data->buffer_len); rv = data->key->ops->sign(operation->session, data->key, &operation->mechanism, data->buffer, data->buffer_len, pSignature, pulSignatureLen); LOG_FUNC_RETURN(context, rv); From c8fbcdd076a4371ca7a637d07214eb54bb06e5c0 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Thu, 1 Oct 2015 16:27:00 +0200 Subject: [PATCH 2/2] card-gemsafeV1: Add ATR for European Patent Office smart card The EPO hands this card out to attorneys and inventors to authenticate with their online services. The applet on the card seems to be identical to the one on Swedish eID cards. Ludovic Rousseau's list identifies the card as Gemalto IDClassic 340. Gemalto Classic Client identifies the card as GemSAFE V3. Previously the EPO was using a GemSAFE V1 card, its ATR was added with 81bbddfc24de ("card-gemsafeV1: Add a GemSafe V1 ATR"). --- src/libopensc/card-gemsafeV1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libopensc/card-gemsafeV1.c b/src/libopensc/card-gemsafeV1.c index 28ba39a4..13f1ba50 100644 --- a/src/libopensc/card-gemsafeV1.c +++ b/src/libopensc/card-gemsafeV1.c @@ -63,6 +63,8 @@ static struct sc_atr_table gemsafe_atrs[] = { {"3B:7D:95:00:00:80:31:80:65:B0:83:11:00:C8:83:00:90:00", NULL, NULL, SC_CARD_TYPE_GEMSAFEV1_PTEID, 0, NULL}, /* Swedish eID card */ {"3B:7D:96:00:00:80:31:80:65:B0:83:11:00:C8:83:00:90:00", NULL, NULL, SC_CARD_TYPE_GEMSAFEV1_SEEID, 0, NULL}, + /* European Patent Office epoline card*/ + {"3b:7d:96:00:00:80:31:80:65:b0:83:02:01:f3:83:00:90:00", NULL, NULL, SC_CARD_TYPE_GEMSAFEV1_SEEID, 0, NULL}, {NULL, NULL, NULL, 0, 0, NULL} };