diff options
author | Tijl Coosemans <tijl@FreeBSD.org> | 2014-08-15 18:49:20 +0000 |
---|---|---|
committer | Tijl Coosemans <tijl@FreeBSD.org> | 2014-08-15 18:49:20 +0000 |
commit | 3bedbc5ab997abf6478dd8409d38a3b911a80b43 (patch) | |
tree | 3a43d96385bb50c78025fb99d22c72b00e7f7945 /security/libbeid/files | |
parent | dc3f5c64b6f37a71e4ac0f5b13a61b9df1be7760 (diff) | |
download | ports-3bedbc5ab997abf6478dd8409d38a3b911a80b43.tar.gz ports-3bedbc5ab997abf6478dd8409d38a3b911a80b43.zip |
Notes
Diffstat (limited to 'security/libbeid/files')
-rw-r--r-- | security/libbeid/files/patch-cardlayer | 91 | ||||
-rw-r--r-- | security/libbeid/files/patch-common | 149 | ||||
-rw-r--r-- | security/libbeid/files/patch-dialogs | 389 | ||||
-rw-r--r-- | security/libbeid/files/patch-pkcs11 | 48 |
4 files changed, 181 insertions, 496 deletions
diff --git a/security/libbeid/files/patch-cardlayer b/security/libbeid/files/patch-cardlayer index 6cd639dc0dbb..673e2c14db19 100644 --- a/security/libbeid/files/patch-cardlayer +++ b/security/libbeid/files/patch-cardlayer @@ -1,6 +1,8 @@ ---- cardlayer/src/cache.cpp.orig -+++ cardlayer/src/cache.cpp -@@ -202,10 +202,8 @@ +Index: cardlayer/src/cache.cpp +=================================================================== +--- cardlayer/src/cache.cpp (revision 1614) ++++ cardlayer/src/cache.cpp (working copy) +@@ -203,10 +203,8 @@ void CCache::DiskStoreFile(const std::st ; // TODO: log else { @@ -13,18 +15,11 @@ fclose(f); } } ---- cardlayer/src/card.cpp.orig -+++ cardlayer/src/card.cpp -@@ -25,7 +25,7 @@ - - CCard::CCard(SCARDHANDLE hCard, CContext *poContext, CPinpad *poPinpad) : - m_hCard(hCard), m_poContext(poContext), m_poPinpad(poPinpad), -- m_oCache(poContext), m_ulLockCount(0), m_bSerialNrString(false),m_cardType(CARD_UNKNOWN) -+ m_oCache(poContext), m_cardType(CARD_UNKNOWN), m_ulLockCount(0), m_bSerialNrString(false) - { - } - -@@ -301,7 +301,7 @@ +Index: cardlayer/src/card.cpp +=================================================================== +--- cardlayer/src/card.cpp (revision 1614) ++++ cardlayer/src/card.cpp (working copy) +@@ -301,7 +301,7 @@ tCacheInfo CCard::GetCacheInfo(const std { // By default no caching, card must implement this method // to allow certain files to be cached (in a certain way). @@ -33,9 +28,11 @@ return dontCache; } ---- cardlayer/src/pkcs15.cpp.orig -+++ cardlayer/src/pkcs15.cpp -@@ -27,7 +27,7 @@ +Index: cardlayer/src/pkcs15.cpp +=================================================================== +--- cardlayer/src/pkcs15.cpp (revision 1614) ++++ cardlayer/src/pkcs15.cpp (working copy) +@@ -27,7 +27,7 @@ namespace eIDMW { const static tPin PinInvalid = {false, "",0,0,0,0,0,0, 0, 0, 0, 0, 0,PIN_ENC_BCD,"",""}; @@ -44,19 +41,26 @@ const static tPrivKey PrivKeyInvalid = {false, "", 0,0,0,0,0,0,0,"", 0,false}; // Hardcoded Beid V1 PINs, keys, certs -- to be removed -@@ -63,8 +63,7 @@ +@@ -59,13 +59,12 @@ namespace eIDMW + const std::string defaultEFODF = "3F00DF005031"; + + +- CPKCS15::CPKCS15(void) : m_poContext(NULL), m_poParser(NULL) ++ CPKCS15::CPKCS15(void) : m_poParser(NULL) { + Clear(); } -- CPKCS15::CPKCS15(CContext *poContext) : -- m_poContext(poContext) -+ CPKCS15::CPKCS15(CContext *poContext) + CPKCS15::CPKCS15(CContext *poContext) : +- m_poContext(poContext), + m_poParser(NULL) { Clear(); - } ---- cardlayer/src/pkcs15.h.orig -+++ cardlayer/src/pkcs15.h -@@ -90,7 +90,6 @@ +Index: cardlayer/src/pkcs15.h +=================================================================== +--- cardlayer/src/pkcs15.h (revision 1614) ++++ cardlayer/src/pkcs15.h (working copy) +@@ -90,7 +90,6 @@ namespace eIDMW private: CCard *m_poCard; @@ -64,20 +68,11 @@ PKCS15Parser *m_poParser; #ifdef WIN32 ---- cardlayer/src/pkicard.cpp.orig -+++ cardlayer/src/pkicard.cpp -@@ -363,7 +363,7 @@ - tFileInfo CPkiCard::SelectFile(const std::string & csPath, bool bReturnFileInfo) - { - CByteArray oResp; -- tFileInfo xFileInfo = {0}; -+ tFileInfo xFileInfo = {0,0,0}; - - unsigned long ulPathLen = (unsigned long) csPath.size(); - if (ulPathLen % 4 != 0 || ulPathLen == 0) ---- cardlayer/src/reader.cpp.orig -+++ cardlayer/src/reader.cpp -@@ -280,8 +280,7 @@ +Index: cardlayer/src/reader.cpp +=================================================================== +--- cardlayer/src/reader.cpp (revision 1614) ++++ cardlayer/src/reader.cpp (working copy) +@@ -280,8 +280,7 @@ std::string CReader::GetSerialNr() } catch(CMWException &e) { @@ -87,9 +82,11 @@ return m_oPKCS15.GetSerialNr(); } } ---- cardlayer/src/threadpool.cpp.orig -+++ cardlayer/src/threadpool.cpp -@@ -79,7 +79,7 @@ +Index: cardlayer/src/threadpool.cpp +=================================================================== +--- cardlayer/src/threadpool.cpp (revision 1614) ++++ cardlayer/src/threadpool.cpp (working copy) +@@ -79,7 +79,7 @@ void CEventCallbackThread::Run() m_bRunning = false; } @@ -98,9 +95,11 @@ { m_bStop = true; } ---- cardlayer/src/threadpool.h.orig -+++ cardlayer/src/threadpool.h -@@ -42,7 +42,7 @@ +Index: cardlayer/src/threadpool.h +=================================================================== +--- cardlayer/src/threadpool.h (revision 1614) ++++ cardlayer/src/threadpool.h (working copy) +@@ -42,7 +42,7 @@ public: void Run(); diff --git a/security/libbeid/files/patch-common b/security/libbeid/files/patch-common index 87ab86a8abfa..7ecaad66e218 100644 --- a/security/libbeid/files/patch-common +++ b/security/libbeid/files/patch-common @@ -1,5 +1,7 @@ ---- common/src/bytearrayreader.cpp.orig -+++ common/src/bytearrayreader.cpp +Index: common/src/bytearrayreader.cpp +=================================================================== +--- common/src/bytearrayreader.cpp (revision 1614) ++++ common/src/bytearrayreader.cpp (working copy) @@ -24,7 +24,6 @@ #include "bytearrayreader.h" #include "bytearray.h" @@ -8,9 +10,11 @@ /***************** ByteArray **************************/ ---- common/src/datafile.cpp.orig -+++ common/src/datafile.cpp -@@ -243,8 +243,7 @@ +Index: common/src/datafile.cpp +=================================================================== +--- common/src/datafile.cpp (revision 1614) ++++ common/src/datafile.cpp (working copy) +@@ -249,8 +249,7 @@ bool CDataFile::Load(bool bLock) while ( !bDone ) { memset(buffer, 0, MAX_BUFFER_LEN); @@ -20,7 +24,7 @@ szLine = buffer; Trim(szLine); -@@ -1004,8 +1003,7 @@ +@@ -1011,8 +1010,7 @@ int WriteLn(FILE * stream, wchar_t* fmt, if ( buf[nLength] != '\n' && buf[nLength] != '\r' ) buf[nLength++] = '\n'; @@ -30,32 +34,15 @@ return nLength; } ---- common/src/dynamiclib.cpp.orig -+++ common/src/dynamiclib.cpp -@@ -42,7 +42,7 @@ - - void * CDynamicLib::GetAddress(const std::string & csFunctionName) - { -- if (m_module != m_module) -+ if (m_module == NULL) - return NULL; - - return PlatformGetAddress(csFunctionName.c_str()); -@@ -50,7 +50,7 @@ - - void CDynamicLib::Close() - { -- if (m_module != m_module) -+ if (m_module != NULL) - return PlatformClose(); - - m_module = NULL; ---- common/src/logbase.cpp.orig -+++ common/src/logbase.cpp -@@ -29,11 +29,7 @@ +Index: common/src/logbase.cpp +=================================================================== +--- common/src/logbase.cpp (revision 1614) ++++ common/src/logbase.cpp (working copy) +@@ -29,12 +29,7 @@ #include "mw_util.h" #ifndef WIN32 +-#include <malloc.h> -#ifdef LINUX #include "wintypes.h" -#else @@ -64,7 +51,7 @@ #include "sys/stat.h" #include "util.h" -@@ -567,6 +563,7 @@ +@@ -575,6 +570,7 @@ bool CLog::open(bool bWchar) else err = fopen_s(&m_f,utilStringNarrow(filename).c_str(),"a"); #else @@ -72,37 +59,10 @@ m_f = fopen(utilStringNarrow(filename).c_str(),"a, ccs=UTF-8"); if (m_f == NULL) err=errno; #endif ---- common/src/mw_util.cpp.orig -+++ common/src/mw_util.cpp -@@ -271,7 +271,7 @@ - - if (r != -1 && csTmp != NULL) - { -- r = fprintf(stream, csTmp); -+ r = fputs(csTmp, stream); - free(csTmp); - } - -@@ -289,7 +289,7 @@ - - if (r != -1 && csTmp != NULL) - { -- r = fprintf(stream, csTmp); -+ r = fputs(csTmp, stream); - free(csTmp); - } - -@@ -306,7 +306,7 @@ - - if (r != -1 && csTmp != NULL) - { -- r = fprintf(stream, csTmp); -+ r = fputs(csTmp, stream); - free(csTmp); - } - ---- common/src/mw_util.h.orig -+++ common/src/mw_util.h +Index: common/src/mw_util.h +=================================================================== +--- common/src/mw_util.h (revision 1614) ++++ common/src/mw_util.h (working copy) @@ -38,7 +38,6 @@ #endif @@ -111,50 +71,11 @@ #endif #ifndef HAVE_ERRNO_T ---- common/src/mwexception.cpp.orig -+++ common/src/mwexception.cpp -@@ -34,14 +34,14 @@ - - // CMWEXCEPTION::CMWEXCEPTION(long lError, const char *cpFile, long lLine) - CMWException::CMWException(long lError, const char *cpFile, long lLine) --: m_lError(lError), -- m_sFile(cpFile), -+: m_sFile(cpFile), -+ m_lError(lError), - m_lLine(lLine) - - { - } - --const char* CMWException::what() throw() -+const char* CMWException::what() const throw() - { - return "CMWException, error code strings to be implemented"; - } ---- common/src/mwexception.h.orig -+++ common/src/mwexception.h -@@ -37,7 +37,7 @@ - //CMWException(long lError); - CMWException(long lError, const char *cpFile, long lLine); - ~CMWException () throw(){}; -- virtual const char* what() throw(); -+ virtual const char* what() const throw(); - - long GetError() const {return m_lError;}; - std::string GetFile() const {return m_sFile;}; ---- common/src/socket/socketclient.cpp.orig -+++ common/src/socket/socketclient.cpp -@@ -23,6 +23,7 @@ - #include "../util.h" - - #ifndef WIN32 -+#include <netinet/in.h> - #include <errno.h> - #endif - ---- common/src/util.cpp.orig -+++ common/src/util.cpp -@@ -348,7 +348,7 @@ +Index: common/src/util.cpp +=================================================================== +--- common/src/util.cpp (revision 1614) ++++ common/src/util.cpp (working copy) +@@ -348,7 +348,7 @@ void GetProcessName(wchar_t *wBuffer,uns /* Get our PID and build the name of the link in /proc */ pid = getpid(); @@ -163,21 +84,3 @@ { /* This should only happen on large word systems. I'm not sure what the proper response is here. -@@ -474,7 +474,7 @@ - - if (r != -1 && csTmp != NULL) - { -- r = fprintf(stream, csTmp); -+ r = fputs(csTmp, stream); - free(csTmp); - } - -@@ -490,7 +490,7 @@ - - if (r != -1 && csTmp != NULL) - { -- r = fprintf(stream, csTmp); -+ r = fputs(csTmp, stream); - free(csTmp); - } - diff --git a/security/libbeid/files/patch-dialogs b/security/libbeid/files/patch-dialogs index 8178a0a9033f..14354314fb05 100644 --- a/security/libbeid/files/patch-dialogs +++ b/security/libbeid/files/patch-dialogs @@ -1,65 +1,42 @@ ---- dialogs/src/dialogsgtk/beid-askaccess.c.orig -+++ dialogs/src/dialogsgtk/beid-askaccess.c -@@ -32,22 +32,15 @@ +Index: dialogs/src/dialogs.h +=================================================================== +--- dialogs/src/dialogs.h (revision 1614) ++++ dialogs/src/dialogs.h (working copy) +@@ -27,6 +27,7 @@ + #ifndef __DIALOGS_H__ + #define __DIALOGS_H__ + ++#include <sys/types.h> + #include <string> + + #ifdef WIN32 +Index: dialogs/src/dialogsgtk/beid-askaccess.c +=================================================================== +--- dialogs/src/dialogsgtk/beid-askaccess.c (revision 1614) ++++ dialogs/src/dialogsgtk/beid-askaccess.c (working copy) +@@ -32,7 +32,7 @@ enum { MSG_ACCESS_CARD_TITLE=1, MSG_ACCESS_CARD_QUESTION }; -char* beid_messages[4][3]={ -- "en", "beID: Card Access", "The application [%s] wants to access the eID card. Do you want to accept it?", -- "nl", "beID: Lezen Kaart", "Het Programma [%s] vraagt toegang tot de eID kaart. Wil U dit toelaten?", -- "fr", "beID: Lecture de Carte", "l'application [%s] essaye d'accéder à la carte eID. Acceptez-vous?", -- "de", "beID: Kartenzugriff", "Die Anwendung [%s] will auf die eID-Karte zugreifen. Möchten Sie akzeptieren?" -- }; +static char const *const beid_messages[4][3]={ -+ { "en", "beID: Card Access", "The application [%s] wants to access the eID card. Do you want to accept it?" }, -+ { "nl", "beID: Lezen Kaart", "Het Programma [%s] vraagt toegang tot de eID kaart. Wil U dit toelaten?" }, -+ { "fr", "beID: Lecture de Carte", "l'Application [%s] essaye d'accéder à la carte eID. Acceptez-vous?" }, -+ { "de", "beID: Kartenzugriff", "Die Anwendung [%s] will auf die eID-Karte zugreifen. Möchten Sie akzeptieren?" } -+}; - - #include "beid-i18n.h" - --// event handler for delete-event. always approves the deletion --/////////////////////////////////////////////////////////////// --static gboolean on_delete_event( GtkWidget *widget, GdkEvent* event, gpointer pindialog) --{ -- return TRUE; --} -- - int main(int argc, char* argv[]) - { - int return_value; -@@ -63,7 +56,7 @@ - { - char message[2048]; - snprintf(message, sizeof(message)-2, _MSG_(MSG_ACCESS_CARD_QUESTION), caller_path); -- dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_OK_CANCEL,message); -+ dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_OK_CANCEL,"%s",message); - } - else - { ---- dialogs/src/dialogsgtk/beid-askpin.c.orig -+++ dialogs/src/dialogsgtk/beid-askpin.c -@@ -35,12 +35,12 @@ + {"en", "beID: Card Access", "The application [%s] wants to access the eID card. Do you want to accept it?"}, + {"nl", "beID: Lezen Kaart", "Het Programma [%s] vraagt toegang tot de eID kaart. Wil U dit toelaten?"}, + {"fr", "beID: Lecture de Carte", "l'application [%s] essaye d'accéder à la carte eID. Acceptez-vous?"}, +Index: dialogs/src/dialogsgtk/beid-askpin.c +=================================================================== +--- dialogs/src/dialogsgtk/beid-askpin.c (revision 1614) ++++ dialogs/src/dialogsgtk/beid-askpin.c (working copy) +@@ -35,7 +35,7 @@ #define EXIT_ERROR 2 enum { MSG_PIN_CODE_REQUIRED=1, MSG_PLEASE_ENTER_PIN }; -char* beid_messages[4][3]={ -- "en", "beID: PIN Code Required", "The application\n[%s]\nrequests your eID PIN code.", -- "nl", "beID: PINcode Vereist", "Het programma\n[%s]\nvraagt uw eID PINcode", -- "fr", "beID: Code PIN Necessaire", "l'application\n[%s]\nvous demande votre code PIN eID", -- "de", "beID: PIN Code Required", "Die Anwendung\n[%s]\nfragt um Ihren eID PIN-code" -- }; +static char const *const beid_messages[4][3]={ -+ { "en", "beID: PIN Code Required", "The application\n[%s]\nrequests your eID PIN code." }, -+ { "nl", "beID: PINcode Vereist", "Het programma\n[%s]\nvraagt uw eID PINcode" }, -+ { "fr", "beID: Code PIN Necessaire", "l'Application\n[%s]\nvous demande votre code PIN eID" }, -+ { "de", "beID: PIN Code Required", "Die Anwendung\n[%s]\nfragt um Ihren eID PIN-code" } -+}; - - #include "beid-i18n.h" - -@@ -58,7 +58,7 @@ + {"en", "beID: PIN Code Required", "The application\n[%s]\nrequests your eID PIN code."}, + {"nl", "beID: PINcode Vereist", "Het programma\n[%s]\nvraagt uw eID PINcode"}, + {"fr", "beID: Code PIN Necessaire", "l'application\n[%s]\nvous demande votre code PIN eID"}, +@@ -58,7 +58,7 @@ typedef struct /////////////////////////////////////////////////////////////////////////////////////////// void update_pin_label(PinDialogInfo *pindialog) { @@ -68,45 +45,10 @@ gchar tmp[MAX_PIN_LENGTH*6]; tmp[0]='\0'; for(i=0;i<strlen(pindialog->pin);i++) -@@ -74,14 +74,14 @@ - { - gtk_dialog_set_response_sensitive(GTK_DIALOG(pindialog->dialog),GTK_RESPONSE_OK, TRUE); - gtk_dialog_set_default_response(GTK_DIALOG(pindialog->dialog),GTK_RESPONSE_OK); -- gtk_widget_grab_focus(pindialog->okbutton); -+ gtk_widget_grab_focus(GTK_WIDGET(pindialog->okbutton)); - - } - else - { - gtk_dialog_set_response_sensitive(GTK_DIALOG(pindialog->dialog), GTK_RESPONSE_OK, FALSE); - gtk_dialog_set_default_response(GTK_DIALOG(pindialog->dialog),GTK_RESPONSE_CANCEL); -- gtk_widget_grab_focus(pindialog->cancelbutton); -+ gtk_widget_grab_focus(GTK_WIDGET(pindialog->cancelbutton)); - } - } - -@@ -210,7 +210,7 @@ - char message[2048]; - pindialog_init(&pindialog); // setup PinDialogInfo structure - snprintf(message, sizeof(message)-2, _MSG_(MSG_PLEASE_ENTER_PIN), caller_path); -- pindialog.dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_NONE,message); -+ pindialog.dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_NONE,"%s",message); - } - else - { -@@ -218,8 +218,8 @@ - exit(EXIT_ERROR); - } - -- pindialog.cancelbutton=gtk_dialog_add_button(pindialog.dialog,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); -- pindialog.okbutton =gtk_dialog_add_button(pindialog.dialog,GTK_STOCK_OK, GTK_RESPONSE_OK); -+ pindialog.cancelbutton=GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(pindialog.dialog),GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL)); -+ pindialog.okbutton=GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(pindialog.dialog),GTK_STOCK_OK,GTK_RESPONSE_OK)); - - gtk_dialog_set_default_response(GTK_DIALOG(pindialog.dialog),GTK_RESPONSE_OK); - gtk_window_set_title(GTK_WINDOW(pindialog.dialog),_MSG_(MSG_PIN_CODE_REQUIRED)); ---- dialogs/src/dialogsgtk/beid-badpin.c.orig -+++ dialogs/src/dialogsgtk/beid-badpin.c +Index: dialogs/src/dialogsgtk/beid-badpin.c +=================================================================== +--- dialogs/src/dialogsgtk/beid-badpin.c (revision 1614) ++++ dialogs/src/dialogsgtk/beid-badpin.c (working copy) @@ -16,6 +16,7 @@ * http://www.gnu.org/licenses/. **************************************************************************** */ @@ -115,63 +57,19 @@ #include <gtk/gtk.h> #include <gtk/gtkenums.h> #include <gdk/gdkkeysyms.h> -@@ -30,22 +31,23 @@ +@@ -31,7 +32,7 @@ #define EXIT_ERROR 2 - enum { MSG_INCORRECT_PIN_CODE=1, MSG_N_ATTEMPTS_LEFT, MSG_LAST_ATTEMPT }; + enum msgs { MSG_INCORRECT_PIN_CODE=1, MSG_N_ATTEMPTS_LEFT, MSG_LAST_ATTEMPT }; -char* beid_messages[4][4]={ -- "en", "beID: Incorrect PIN Code", "You have entered an incorrect PIN code.\nPlease note that you have only %d attempts left before your PIN is blocked.", "You have entered an incorrect PIN code.\nPlease note that at the next incorrect entry your PIN code will be blocked.", -- "nl", "beID: Foutive PINcode", "U hebt een foutive PIN code ingegeven.\nGelieve te noteren dat u nog slechts %d pogingen hebt alvorens uw PIN code geblokkeerd wordt.", "U hebt een foutive PIN code ingegeven.\nGelieve te noteren dat bij de volgende incorrecte ingave uw PIN code geblokkeerd wordt.", -- "fr", "beID: Code PIN incorrect", "Vous avez entré un code PIN incorrect.\nVeuillez noter qu'il ne vous reste plus que %d tentatives avant que votre PIN soit bloqué", "Vous avez entré un code PIN incorrect.\nVieullez noter qu'a la prochaine entree incorrecte votre code PIN sera bloqué", -- "de", "beID: Incorrect PIN Code", "You have entered an incorrect PIN code.\nPlease note that you have only %d attempts left before your PIN is blocked.", "You have entered an incorrect PIN code.\nPlease note that at the next incorrect entry your PIN code will be blocked." -- }; +static char const *const beid_messages[4][4]={ -+ { "en", "beID: Incorrect PIN Code", -+ "You have entered an incorrect PIN code.\nPlease note that you have only %d attempts left before your PIN is blocked.", -+ "You have entered an incorrect PIN code.\nPlease note that at the next incorrect entry your PIN code will be blocked." }, -+ { "nl", "beID: Foutive PINcode", -+ "U hebt een foutive PIN code ingegeven.\nGelieve te noteren dat u nog slechts %d pogingen hebt alvorens uw PIN code geblokkeerd wordt.", -+ "U hebt een foutive PIN code ingegeven.\nGelieve te noteren dat bij de volgende incorrecte ingave uw PIN code geblokkeerd wordt." }, -+ { "fr", "beID: Code PIN incorrect", -+ "Vous avez entré un code PIN incorrect.\nVeuillez noter qu'il ne vous reste plus que %d tentatives avant que votre PIN soit bloqué", -+ "Vous avez entré un code PIN incorrect.\nVieullez noter qu'a la prochaine entree incorrecte votre code PIN sera bloqué" }, -+ { "de", "beID: Incorrect PIN Code", -+ "You have entered an incorrect PIN code.\nPlease note that you have only %d attempts left before your PIN is blocked.", -+ "You have entered an incorrect PIN code.\nPlease note that at the next incorrect entry your PIN code will be blocked." } -+}; - - #include "beid-i18n.h" - --// event handler for delete-event. always approves the deletion --/////////////////////////////////////////////////////////////// --static gboolean on_delete_event( GtkWidget *widget, GdkEvent* event, gpointer pindialog) --{ -- return TRUE; --} -- - int main(int argc, char* argv[]) - { - int return_value=EXIT_ERROR; -@@ -63,7 +65,7 @@ - if(attempts>1) - snprintf(message,sizeof(message)-2,_MSG_(MSG_N_ATTEMPTS_LEFT),attempts); - else -- snprintf(message,sizeof(message)-2,_MSG_(MSG_LAST_ATTEMPT)); -+ snprintf(message,sizeof(message)-2,"%s",_MSG_(MSG_LAST_ATTEMPT)); - } - else - { -@@ -71,7 +73,7 @@ - exit(EXIT_ERROR); - } - -- dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_WARNING,GTK_BUTTONS_OK,message); -+ dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_WARNING,GTK_BUTTONS_OK,"%s",message); - gtk_dialog_set_default_response(GTK_DIALOG(dialog),GTK_RESPONSE_OK); - gtk_window_set_title(GTK_WINDOW(dialog),_MSG_(MSG_INCORRECT_PIN_CODE)); - gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER); ---- dialogs/src/dialogsgtk/beid-changepin.c.orig -+++ dialogs/src/dialogsgtk/beid-changepin.c + {"en", "beID: Incorrect PIN Code", "You have entered an incorrect PIN code.\nPlease note that you have only %d attempts left before your PIN is blocked.", "You have entered an incorrect PIN code.\nPlease note that at the next incorrect entry your PIN code will be blocked."}, + {"nl", "beID: Foutive PINcode", "U hebt een foutive PIN code ingegeven.\nGelieve te noteren dat u nog slechts %d pogingen hebt alvorens uw PIN code geblokkeerd wordt.", "U hebt een foutive PIN code ingegeven.\nGelieve te noteren dat bij de volgende incorrecte ingave uw PIN code geblokkeerd wordt."}, + {"fr", "beID: Code PIN incorrect", "Vous avez entré un code PIN incorrect.\nVeuillez noter qu'il ne vous reste plus que %d tentatives avant que votre PIN soit bloqué", "Vous avez entré un code PIN incorrect.\nVieullez noter qu'a la prochaine entree incorrecte votre code PIN sera bloqué"}, +Index: dialogs/src/dialogsgtk/beid-changepin.c +=================================================================== +--- dialogs/src/dialogsgtk/beid-changepin.c (revision 1614) ++++ dialogs/src/dialogsgtk/beid-changepin.c (working copy) @@ -17,6 +17,7 @@ * http://www.gnu.org/licenses/. @@ -180,67 +78,19 @@ #include <gtk/gtk.h> #include <gtk/gtkenums.h> #include <gdk/gdkkeysyms.h> -@@ -36,13 +37,20 @@ +@@ -37,7 +38,7 @@ #define EXIT_ERROR 2 enum { MSG_CHANGE_PIN_CODE=1, MSG_PLEASE_ENTER_OLD_AND_NEW_PINS, MSG_CURRENT_PIN, MSG_NEW_PIN, MSG_NEW_PIN_AGAIN }; -char* beid_messages[4][6]={ -- "en", "beID: Change PIN Code", "Request from Application [%s]:\n\nPlease enter your current eID PIN, followed by your new eID PIN (twice)", "Current PIN:", "New PIN:", "New PIN (again):", -- "nl", "beID: PIN Code Wijzigen", "Verzoek van programma [%s]:\n\nGelieve Uw bestaande eID PIN code, en tweemaal uw nieuwe eID PINcode in te voeren.", "Huidige PIN:", "Nieuwe PIN:", "Nieuwe PIN (opnieuw):", -- "fr", "beID: Changement de code PIN", "Demande de l'application [%s]:\n\nVeuillez entrer votre code PIN eID existant, suivi de votre nouveau code PIN eID (2 fois)", "Code PIN existant:", "Nouveau code PIN:","Nouveau code PIN (verification):", -- "de", "beID: PIN Code ändern", "Anfrage von Anwendug [%s]:\n\nBitte geben Sie ihren bestehenden eID PIN-Code, gefolgt von Ihrem neuen eID PIN-Code (zwei mal), ein", "Aktueller PIN-Code:", "Neuer PIN-Code:", "Neuer PIN-Code (noch einmal):" -- -- }; +static char const *const beid_messages[4][6]={ -+ { "en", "beID: Change PIN Code", -+ "Request from application [%s]:\n\nPlease enter your current eID PIN, followed by your new eID PIN (twice)", -+ "Current PIN:", "New PIN:", "New PIN (again):" }, -+ { "nl", "beID: PIN Code Wijzigen", -+ "Verzoek van programma [%s]:\n\nGelieve Uw bestaande eID PIN code, en tweemaal uw nieuwe eID PINcode in te voeren.", -+ "Huidige PIN:", "Nieuwe PIN:", "Nieuwe PIN (opnieuw):" }, -+ { "fr", "beID: Changement de code PIN", -+ "Demande de l'application [%s]:\n\nVeuillez entrer votre code PIN eID existant, suivi de votre nouveau code PIN eID (2 fois)", -+ "Code PIN existant:", "Nouveau code PIN:", "Nouveau code PIN (verification):" }, -+ { "de", "beID: PIN Code ändern", -+ "Anfrage von Anwendug [%s]:\n\nBitte geben Sie ihren bestehenden eID PIN-Code, gefolgt von Ihrem neuen eID PIN-Code (zwei mal), ein", -+ "Aktueller PIN-Code:", "Neuer PIN-Code:", "Neuer PIN-Code (noch einmal):" } -+}; - - #include "beid-i18n.h" - -@@ -161,7 +169,7 @@ - { - char message[2048]; - snprintf(message, sizeof(message)-2, _MSG_(MSG_PLEASE_ENTER_OLD_AND_NEW_PINS), caller_path); -- pindialog.dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_NONE,message); -+ pindialog.dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_NONE,"%s",message); - } - else - { -@@ -169,8 +177,8 @@ - exit(EXIT_ERROR); - } - -- pindialog.cancelbutton =gtk_dialog_add_button(pindialog.dialog,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); -- pindialog.okbutton =gtk_dialog_add_button(pindialog.dialog,GTK_STOCK_OK, GTK_RESPONSE_OK); -+ pindialog.cancelbutton=GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(pindialog.dialog),GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL)); -+ pindialog.okbutton=GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(pindialog.dialog),GTK_STOCK_OK,GTK_RESPONSE_OK)); - - gtk_dialog_set_default_response(GTK_DIALOG(pindialog.dialog),GTK_RESPONSE_OK); - gtk_window_set_title(GTK_WINDOW(pindialog.dialog),_MSG_(MSG_CHANGE_PIN_CODE)); -@@ -234,8 +242,8 @@ - { - case GTK_RESPONSE_OK: // if the user chose OK - { -- char* oldpin=gtk_entry_get_text(GTK_ENTRY(pindialog.originalPinEntry)); -- char* newpin=gtk_entry_get_text(GTK_ENTRY(pindialog.newPin0Entry)); -+ char const *oldpin=gtk_entry_get_text(GTK_ENTRY(pindialog.originalPinEntry)); -+ char const *newpin=gtk_entry_get_text(GTK_ENTRY(pindialog.newPin0Entry)); - printf("%s:%s\n",oldpin,newpin); // output the PINs to stdout - return_value=EXIT_OK; // and return OK - } ---- dialogs/src/dialogsgtk/beid-i18n.h.orig -+++ dialogs/src/dialogsgtk/beid-i18n.h + {"en", "beID: Change PIN Code", "Request from Application [%s]:\n\nPlease enter your current eID PIN, followed by your new eID PIN (twice)", "Current PIN:", "New PIN:", "New PIN (again):"}, + {"nl", "beID: PIN Code Wijzigen", "Verzoek van programma [%s]:\n\nGelieve Uw bestaande eID PIN code, en tweemaal uw nieuwe eID PINcode in te voeren.", "Huidige PIN:", "Nieuwe PIN:", "Nieuwe PIN (opnieuw):"}, + {"fr", "beID: Changement de code PIN", "Demande de l'application [%s]:\n\nVeuillez entrer votre code PIN eID existant, suivi de votre nouveau code PIN eID (2 fois)", "Code PIN existant:", "Nouveau code PIN:","Nouveau code PIN (verification):"}, +Index: dialogs/src/dialogsgtk/beid-i18n.h +=================================================================== +--- dialogs/src/dialogsgtk/beid-i18n.h (revision 1614) ++++ dialogs/src/dialogsgtk/beid-i18n.h (working copy) @@ -1,7 +1,7 @@ -char* _MSG_(int msgnum) +char const *_MSG_(int msgnum) @@ -252,87 +102,37 @@ if(lang!=NULL && strlen(lang)==5 && lang[2]=='_') { int i; ---- dialogs/src/dialogsgtk/beid-spr-askpin.c.orig -+++ dialogs/src/dialogsgtk/beid-spr-askpin.c -@@ -34,12 +34,12 @@ +Index: dialogs/src/dialogsgtk/beid-spr-askpin.c +=================================================================== +--- dialogs/src/dialogsgtk/beid-spr-askpin.c (revision 1614) ++++ dialogs/src/dialogsgtk/beid-spr-askpin.c (working copy) +@@ -34,7 +34,7 @@ #define EXIT_ERROR 2 enum { MSG_PIN_CODE_REQUIRED=1, MSG_PLEASE_ENTER_PIN }; -char* beid_messages[4][3]={ -- "en", "beID: PIN Code Required", "The application [%s] requests your eID PIN code on the secure pinpad reader:\n[%s]..", -- "nl", "beID: PINcode Vereist", "Het programma [%s] vraagt uw eID PIN code in te geven op de beveiligde kaartlezer:\n[%s].", -- "fr", "beID: Code PIN Necessaire", "l'application [%s] vous demande d'entrer votre code PIN eID sur le lecteur securise\n[%s]..", -- "de", "beID: PIN Code Required", "Die Anwendung [%s] fragt um Ihren eID PIN-Code auf dem sicheren Kartenleser:\n[%s].." -- }; +static char const* const beid_messages[4][3]={ -+ { "en", "beID: PIN Code Required", "The application [%s] requests your eID PIN code on the secure pinpad reader:\n[%s].." }, -+ { "nl", "beID: PINcode Vereist", "Het programma [%s] vraagt uw eID PIN code in te geven op de beveiligde kaartlezer:\n[%s].." }, -+ { "fr", "beID: Code PIN Necessaire", "l'Application [%s] vous demande d'entrer votre code PIN eID sur le lecteur securise\n[%s].." }, -+ { "de", "beID: PIN Code Required", "Die Anwendung [%s] fragt um Ihren eID PIN-Code auf dem sicheren Kartenleser:\n[%s].." } -+}; - - #include "beid-i18n.h" - -@@ -88,7 +88,7 @@ - // create new message dialog with CANCEL button in standard places, in center of user's screen - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- pindialog.dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_NONE,message); -+ pindialog.dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_NONE,"%s",message); - gtk_dialog_set_default_response(GTK_DIALOG(pindialog.dialog),GTK_RESPONSE_OK); - gtk_window_set_title(GTK_WINDOW(pindialog.dialog),_MSG_(MSG_PIN_CODE_REQUIRED)); - gtk_window_set_position(GTK_WINDOW(pindialog.dialog), GTK_WIN_POS_CENTER); ---- dialogs/src/dialogsgtk/beid-spr-changepin.c.orig -+++ dialogs/src/dialogsgtk/beid-spr-changepin.c -@@ -34,12 +34,12 @@ + {"en", "beID: PIN Code Required", "The application [%s] requests your eID PIN code on the secure pinpad reader:\n[%s].."}, + {"nl", "beID: PINcode Vereist", "Het programma [%s] vraagt uw eID PIN code in te geven op de beveiligde kaartlezer:\n[%s]."}, + {"fr", "beID: Code PIN Necessaire", "l'application [%s] vous demande d'entrer votre code PIN eID sur le lecteur securise\n[%s].."}, +Index: dialogs/src/dialogsgtk/beid-spr-changepin.c +=================================================================== +--- dialogs/src/dialogsgtk/beid-spr-changepin.c (revision 1614) ++++ dialogs/src/dialogsgtk/beid-spr-changepin.c (working copy) +@@ -34,7 +34,7 @@ #define EXIT_ERROR 2 enum { MSG_CHANGE_PIN_CODE=1, MSG_PLEASE_CHANGE_PIN }; -char* beid_messages[4][3]={ -- "en", "beID: Change PIN Code", "Request from Application [%s]:\n\nPlease change your eID PIN code on the secure pinpad reader:\n[%s]..", -- "nl", "beID: Wijziging PINcode", "Verzoek van programma [%s]:\n\nGelieve uw eID PIN code op de beveiligde kaartlezer:\n[%s]\nte willen wijzigen.", -- "fr", "beID: Changement de code PIN", "Demande de l'application [%s]:\n\nVeuillez changer votre code PIN eID sur le lecteur securise\n[%s]..", -- "de", "beID: Change PIN Code", "Anfrage von Anwendug [%s]:\n\nPlease change your eID PIN code on the secure pinpad reader:\n[%s].." -- }; +static char const *const beid_messages[4][3]={ -+ { "en", "beID: Change PIN Code", "Request from Application [%s]:\n\nPlease change your eID PIN code on the secure pinpad reader:\n[%s].." }, -+ { "nl", "beID: Wijziging PINcode", "Verzoek van programma [%s]:\n\nGelieve uw eID PIN code te wijzigen op de beveiligde kaartlezer:\n[%s].." }, -+ { "fr", "beID: Changement de code PIN", "Demande de l'application [%s]:\n\nVeuillez changer votre code PIN eID sur le lecteur securise\n[%s].." }, -+ { "de", "beID: Change PIN Code", "Anfrage von Anwendug [%s]:\n\nPlease change your eID PIN code on the secure pinpad reader:\n[%s].." } -+}; - - #include "beid-i18n.h" - -@@ -60,7 +60,6 @@ - - int main(int argc, char* argv[]) - { -- char pid_path[PATH_MAX]; - int return_value=EXIT_ERROR; - PinDialogInfo pindialog; // this struct contains all dialog objects - char caller_path[1024]; -@@ -89,7 +88,7 @@ - exit(EXIT_ERROR); - } - -- pindialog.dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_NONE,message); -+ pindialog.dialog=gtk_message_dialog_new(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_NONE,"%s",message); - gtk_dialog_set_default_response(GTK_DIALOG(pindialog.dialog),GTK_RESPONSE_OK); - gtk_window_set_title(GTK_WINDOW(pindialog.dialog),_MSG_(MSG_CHANGE_PIN_CODE)); - gtk_window_set_position(GTK_WINDOW(pindialog.dialog), GTK_WIN_POS_CENTER); ---- dialogs/src/dialogs.h.orig -+++ dialogs/src/dialogs.h -@@ -27,6 +27,7 @@ - #ifndef __DIALOGS_H__ - #define __DIALOGS_H__ - -+#include <sys/types.h> - #include <string> - - #ifdef WIN32 ---- dialogs/src/dialogsgtk/dlgs_gtk.cpp.orig -+++ dialogs/src/dialogsgtk/dlgs_gtk.cpp -@@ -56,12 +56,13 @@ + {"en", "beID: Change PIN Code", "Request from Application [%s]:\n\nPlease change your eID PIN code on the secure pinpad reader:\n[%s].."}, + {"nl", "beID: Wijziging PINcode", "Verzoek van programma [%s]:\n\nGelieve uw eID PIN code op de beveiligde kaartlezer:\n[%s]\nte willen wijzigen."}, + {"fr", "beID: Changement de code PIN", "Demande de l'application [%s]:\n\nVeuillez changer votre code PIN eID sur le lecteur securise\n[%s].."}, +Index: dialogs/src/dialogsgtk/dlgs_gtk.cpp +=================================================================== +--- dialogs/src/dialogsgtk/dlgs_gtk.cpp (revision 1614) ++++ dialogs/src/dialogsgtk/dlgs_gtk.cpp (working copy) +@@ -56,12 +56,13 @@ extern "C" @@ -345,28 +145,21 @@ - snprintf(log_txt,sizeof(log_txt),"%s:%s",comment,strerror_r(errno,err_txt,sizeof(err_txt))); + strerror_r(errno,err_txt,sizeof(err_txt)); + snprintf(log_txt,sizeof(log_txt),"%s:%s",comment,err_txt); - mbstowcs(wide_log_txt,log_txt,sizeof(wide_log_txt)); + mbstowcs(wide_log_txt,log_txt,sizeof(wide_log_txt)/sizeof(wchar_t)); return MWLOG(level,mod,wide_log_txt); } -@@ -112,7 +113,7 @@ - char count[4]; - MWLOG(LEV_DEBUG,MOD_DLG,L"eIDMW::DlgBadPin called"); - -- snprintf(count,sizeof(count)-2,"%1d",ulRemainingTries); -+ snprintf(count,sizeof(count)-2,"%1lu",ulRemainingTries); - char* response=sdialog_call_modal(QUOTEME(BEID_BADPIN_DIALOG),count); - free(response); - return DLG_OK; ---- dialogs/src/dialogsgtk/parent.c.orig -+++ dialogs/src/dialogsgtk/parent.c +Index: dialogs/src/dialogsgtk/parent.c +=================================================================== +--- dialogs/src/dialogsgtk/parent.c (revision 1614) ++++ dialogs/src/dialogsgtk/parent.c (working copy) @@ -1,4 +1,6 @@ +#include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include "config.h" #include "parent.h" - -@@ -9,7 +11,7 @@ + #include <unistd.h> +@@ -11,7 +13,7 @@ ssize_t get_parent_path(char* exec_path, char proc_path[32]; ssize_t exec_path_len=-1; @@ -375,30 +168,12 @@ if((exec_path_len=readlink(proc_path,exec_path,exec_path_size-1))!=-1) exec_path[exec_path_len]='\0'; return exec_path_len; ---- dialogs/src/dialogsgtk/parent.h.orig -+++ dialogs/src/dialogsgtk/parent.h +Index: dialogs/src/dialogsgtk/parent.h +=================================================================== +--- dialogs/src/dialogsgtk/parent.h (revision 1614) ++++ dialogs/src/dialogsgtk/parent.h (working copy) @@ -1,2 +1,4 @@ +#include <sys/types.h> + ssize_t get_parent_path(char* exec_path, size_t exec_path_size); ---- dialogs/src/dialogsgtk/single_dialog.c.orig -+++ dialogs/src/dialogsgtk/single_dialog.c -@@ -40,14 +40,15 @@ - #define DPRINTF(format,args...) fprintf(stderr, format , ## args) - #define DERROR(label) perror(label) - #else --#define DPRINTF --#define DERROR -+#define DPRINTF(format,args...) -+#define DERROR(label) - #endif - - - /* the sdialog_call_modal function borrows from readpass.c in the OpenSSH distribution, whose Copyright is as follows: - * - * START OF extra (C) NOTICE FOR sdialog_call_modal() -+ */ - - /* $OpenBSD: readpass.c,v 1.47 2006/08/03 03:34:42 deraadt Exp $ */ - /* diff --git a/security/libbeid/files/patch-pkcs11 b/security/libbeid/files/patch-pkcs11 index a301e4261047..fcbc952fc638 100644 --- a/security/libbeid/files/patch-pkcs11 +++ b/security/libbeid/files/patch-pkcs11 @@ -1,6 +1,8 @@ ---- pkcs11/src/asn1.c.orig -+++ pkcs11/src/asn1.c -@@ -253,7 +253,7 @@ +Index: pkcs11/src/asn1.c +=================================================================== +--- pkcs11/src/asn1.c (revision 1614) ++++ pkcs11/src/asn1.c (working copy) +@@ -253,7 +253,7 @@ for (; *p_cPath; p_cPath++) /* check if we are decoding inside a BIT STRING: iNumTag == parent_tag */ /* first octet of bit string is the number of unused bits at the end of the bitstring */ /* in CER/DER: unused bits are always zero. And if they aren't zero, we still don't need to know the nr. of unused bits */ @@ -9,9 +11,11 @@ { p_cDat++; iLen--; ---- pkcs11/src/cal.cpp.orig -+++ pkcs11/src/cal.cpp -@@ -865,7 +865,7 @@ +Index: pkcs11/src/cal.cpp +=================================================================== +--- pkcs11/src/cal.cpp (revision 1614) ++++ pkcs11/src/cal.cpp (working copy) +@@ -945,7 +945,7 @@ CK_RV cal_get_card_data(CK_SLOT_ID hSlot std::string szReader; // char cBuffer[250]; // unsigned char ucBuffer[250]; @@ -20,9 +24,9 @@ CTLVBuffer oTLVBuffer; P11_SLOT *pSlot = NULL; CK_ATTRIBUTE ID_DATA[]= BEID_TEMPLATE_ID_DATA; -@@ -1026,8 +1026,8 @@ +@@ -1141,8 +1141,8 @@ CK_RV cal_read_ID_files(CK_SLOT_ID hSlot std::string szReader; - char cBuffer[250]; + char cBuffer[256]; // unsigned char ucBuffer[250]; - char* plabel = NULL; - char* pobjectID = NULL; @@ -31,7 +35,7 @@ unsigned long ulLen=0; CTLVBuffer oTLVBuffer; CTLVBuffer oTLVBufferAddress;//need second buffer object, as memory is only freed when this object is destructed -@@ -1061,7 +1061,7 @@ +@@ -1176,7 +1176,7 @@ CK_RV cal_read_ID_files(CK_SLOT_ID hSlot pobjectID = BEID_OBJECTID_ID; ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA)/sizeof(CK_ATTRIBUTE), CK_TRUE, CKO_DATA, CK_FALSE, &hObject, (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),(CK_VOID_PTR) oFileData.GetBytes(),(CK_ULONG)oFileData.Size(), @@ -40,7 +44,7 @@ if (ret) goto cleanup; oTLVBuffer.ParseTLV(oFileData.GetBytes(), oFileData.Size()); -@@ -1075,7 +1075,7 @@ +@@ -1190,7 +1190,7 @@ CK_RV cal_read_ID_files(CK_SLOT_ID hSlot oTLVBuffer.FillUTF8Data(ID_LABELS[i].tag, cBuffer, &ulLen); plabel = ID_LABELS[i].name; ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA)/sizeof(CK_ATTRIBUTE), CK_TRUE, CKO_DATA, CK_FALSE, &hObject, @@ -49,7 +53,7 @@ if (ret) goto cleanup; } if(dataType != CACHED_DATA_TYPE_ALL){ -@@ -1087,7 +1087,7 @@ +@@ -1202,7 +1202,7 @@ CK_RV cal_read_ID_files(CK_SLOT_ID hSlot pobjectID = BEID_OBJECTID_ADDRESS; ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA)/sizeof(CK_ATTRIBUTE), CK_TRUE, CKO_DATA, CK_FALSE, &hObject, (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),(CK_VOID_PTR) oFileData.GetBytes(),(CK_ULONG)oFileData.Size(), @@ -58,7 +62,7 @@ if (ret) goto cleanup; oTLVBufferAddress.ParseTLV(oFileData.GetBytes(), oFileData.Size()); nrOfItems = sizeof(ADDRESS_LABELS)/sizeof(BEID_DATA_LABELS_NAME); -@@ -1099,7 +1099,7 @@ +@@ -1214,7 +1214,7 @@ CK_RV cal_read_ID_files(CK_SLOT_ID hSlot plabel = ADDRESS_LABELS[i].name; ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA)/sizeof(CK_ATTRIBUTE), CK_TRUE, CKO_DATA, CK_FALSE, &hObject, (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),(CK_VOID_PTR) cBuffer,ulLen, @@ -67,7 +71,7 @@ if (ret) goto cleanup; } if(dataType != CACHED_DATA_TYPE_ALL){ -@@ -1111,7 +1111,7 @@ +@@ -1226,7 +1226,7 @@ CK_RV cal_read_ID_files(CK_SLOT_ID hSlot oFileData = oReader.ReadFile(BEID_FILE_PHOTO); ret = p11_add_slot_ID_object(pSlot, ID_DATA, sizeof(ID_DATA)/sizeof(CK_ATTRIBUTE), CK_TRUE, CKO_DATA, CK_FALSE, &hObject, (CK_VOID_PTR)plabel, (CK_ULONG)strlen(plabel),(CK_VOID_PTR) oFileData.GetBytes(),(CK_ULONG)oFileData.Size(), @@ -76,9 +80,11 @@ if (ret) goto cleanup; if(dataType != CACHED_DATA_TYPE_ALL){ break; ---- pkcs11/src/cal.h.orig -+++ pkcs11/src/cal.h -@@ -179,7 +179,7 @@ +Index: pkcs11/src/cal.h +=================================================================== +--- pkcs11/src/cal.h (revision 1614) ++++ pkcs11/src/cal.h (working copy) +@@ -184,7 +184,7 @@ extern "C" { typedef struct BEID_DATA_LABELS_NAME { unsigned char tag; @@ -87,9 +93,11 @@ }BEID_DATA_LABELS_NAME; #define BEID_LABEL_DATA_FILE "DATA_FILE" ---- pkcs11/src/log.h.orig -+++ pkcs11/src/log.h -@@ -60,42 +60,42 @@ +Index: pkcs11/src/log.h +=================================================================== +--- pkcs11/src/log.h (revision 1614) ++++ pkcs11/src/log.h (working copy) +@@ -60,42 +60,42 @@ typedef struct P11_MAP_TYPE static P11_MAP_TYPE const P11_CLASS_TYPES[]= { @@ -160,7 +168,7 @@ }; static P11_MAP_TYPE const P11_ATTR_TYPES[]= { -@@ -159,7 +159,7 @@ +@@ -159,7 +159,7 @@ static P11_MAP_TYPE const P11_ATTR_TYPES { CKA_RESET_ON_INIT, "CKA_RESET_ON_INIT", 0 }, { CKA_HAS_RESET, "CKA_HAS_RESET", 0 }, { CKA_VENDOR_DEFINED, "CKA_VENDOR_DEFINED", 0 }, |