Index: head/security/libbeid/Makefile =================================================================== --- head/security/libbeid/Makefile (revision 399903) +++ head/security/libbeid/Makefile (revision 399904) @@ -1,37 +1,37 @@ # $FreeBSD$ PORTNAME= libbeid -PORTVERSION= 4.1.2 +PORTVERSION= 4.1.8 DISTVERSIONPREFIX= v CATEGORIES= security MAINTAINER= tijl@FreeBSD.org COMMENT= Belgian eID PKCS #11 module LICENSE= LGPL3 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libpcsclite.so:${PORTSDIR}/devel/pcsc-lite USE_GITHUB= yes GH_ACCOUNT= Fedict GH_PROJECT= eid-mw USES= autoreconf dos2unix libtool pkgconfig USE_GNOME= gtk20 DOS2UNIX_FILES= cardcomm/pkcs11/src/common/datafile.cpp \ cardcomm/pkcs11/src/common/logbase.cpp \ cardcomm/pkcs11/src/common/util.cpp \ cardcomm/pkcs11/src/dialogs/dialogs.h \ cardcomm/pkcs11/src/log.h GNU_CONFIGURE= yes -CONFIGURE_ARGS= --disable-static +CONFIGURE_ARGS= --disable-static --with-gtkvers=2 INSTALL_TARGET= install-strip post-patch: @${REINPLACE_CMD} '/^libbeidpkcs11_la_LIBADD =/s/-ldl//' \ ${WRKSRC}/cardcomm/pkcs11/src/Makefile.am .include Index: head/security/libbeid/distinfo =================================================================== --- head/security/libbeid/distinfo (revision 399903) +++ head/security/libbeid/distinfo (revision 399904) @@ -1,2 +1,2 @@ -SHA256 (Fedict-eid-mw-v4.1.2_GH0.tar.gz) = 5332de389ef752553141419c62ead39dd521c8f1cde5b8e3350370de55084477 -SIZE (Fedict-eid-mw-v4.1.2_GH0.tar.gz) = 7412374 +SHA256 (Fedict-eid-mw-v4.1.8_GH0.tar.gz) = 229c3126e90453531df2f18419007580f3ff2f416f15bd1458e0a8c93800947b +SIZE (Fedict-eid-mw-v4.1.8_GH0.tar.gz) = 7566483 Index: head/security/libbeid/files/patch-cardlayer =================================================================== --- head/security/libbeid/files/patch-cardlayer (revision 399903) +++ head/security/libbeid/files/patch-cardlayer (revision 399904) @@ -1,96 +1,81 @@ ---- cardcomm/pkcs11/src/cardlayer/cache.cpp.orig 2015-02-19 13:59:02 UTC -+++ cardcomm/pkcs11/src/cardlayer/cache.cpp -@@ -203,10 +203,8 @@ void CCache::DiskStoreFile(const std::st - ; // TODO: log - else - { -- size_t tmpHeader = fwrite(&header, sizeof(tCacheHeader), 1, f); -- tmpHeader = tmpHeader; //avoid warning -- size_t tmpData = fwrite(oData.GetBytes(), 1, oData.Size(), f); -- tmpData = tmpData; //avoid warning -+ (void)fwrite(&header, sizeof(tCacheHeader), 1, f); -+ (void)fwrite(oData.GetBytes(), 1, oData.Size(), f); - fclose(f); - } - } ---- cardcomm/pkcs11/src/cardlayer/card.cpp.orig 2015-02-19 13:59:02 UTC +--- cardcomm/pkcs11/src/cardlayer/card.cpp.orig 2015-10-09 08:01:44 UTC +++ cardcomm/pkcs11/src/cardlayer/card.cpp -@@ -301,7 +301,7 @@ tCacheInfo CCard::GetCacheInfo(const std +@@ -160,7 +160,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). - tCacheInfo dontCache = {DONT_CACHE}; + tCacheInfo dontCache = {DONT_CACHE,0}; return dontCache; } --- cardcomm/pkcs11/src/cardlayer/pkcs15.cpp.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/cardlayer/pkcs15.cpp @@ -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,"",""}; - const static tCert CertInvalid = {false, "", 0, 0,0,0}; + const static tCert CertInvalid = {false, "", 0, 0,0,0,false,false,""}; const static tPrivKey PrivKeyInvalid = {false, "", 0,0,0,0,0,0,0,"", 0,false}; // Hardcoded Beid V1 PINs, keys, certs -- to be removed @@ -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), m_poParser(NULL) { Clear(); --- cardcomm/pkcs11/src/cardlayer/pkcs15.h.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/cardlayer/pkcs15.h @@ -90,7 +90,6 @@ namespace eIDMW private: CCard *m_poCard; - CContext *m_poContext; PKCS15Parser *m_poParser; #ifdef WIN32 --- cardcomm/pkcs11/src/cardlayer/reader.cpp.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/cardlayer/reader.cpp @@ -284,8 +284,7 @@ std::string CReader::GetSerialNr() } catch(CMWException &e) { - unsigned long err = e.GetError(); - err = err; + (void)e.GetError(); return m_oPKCS15.GetSerialNr(); } } --- cardcomm/pkcs11/src/cardlayer/threadpool.cpp.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/cardlayer/threadpool.cpp @@ -81,7 +81,7 @@ void CEventCallbackThread::Run() m_bRunning = false; } -void CEventCallbackThread::Stop() +void CEventCallbackThread::Stop(unsigned long ulSleepFrequency) { m_bStop = true; } --- cardcomm/pkcs11/src/cardlayer/threadpool.h.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/cardlayer/threadpool.h @@ -42,7 +42,7 @@ public: void Run(); - void Stop(); + void Stop(unsigned long ulSleepFrequency=100); bool HasStopped(); Index: head/security/libbeid/files/patch-common =================================================================== --- head/security/libbeid/files/patch-common (revision 399903) +++ head/security/libbeid/files/patch-common (revision 399904) @@ -1,75 +1,65 @@ ---- cardcomm/pkcs11/src/common/bytearrayreader.cpp.orig 2015-02-19 13:59:02 UTC -+++ cardcomm/pkcs11/src/common/bytearrayreader.cpp -@@ -24,7 +24,6 @@ - #include "bytearrayreader.h" - #include "bytearray.h" - --const static unsigned long EXTRA_INCREMENT_LEN = 10; - - /***************** ByteArray **************************/ - --- cardcomm/pkcs11/src/common/datafile.cpp.orig 2015-06-02 08:02:25 UTC +++ cardcomm/pkcs11/src/common/datafile.cpp @@ -249,8 +249,7 @@ bool CDataFile::Load(bool bLock) while ( !bDone ) { memset(buffer, 0, MAX_BUFFER_LEN); - wchar_t* tmp = fgetws( buffer, MAX_BUFFER_LEN, m_stream); - tmp=tmp; // avoid warning + (void)fgetws( buffer, MAX_BUFFER_LEN, m_stream); szLine = buffer; Trim(szLine); @@ -1011,8 +1010,7 @@ int WriteLn(FILE * stream, wchar_t* fmt, if ( buf[nLength] != '\n' && buf[nLength] != '\r' ) buf[nLength++] = '\n'; - size_t tmp = fwrite(buf, sizeof( wchar_t ), nLength, stream); - tmp = tmp; // avoid warning + (void)fwrite(buf, sizeof( wchar_t ), nLength, stream); return nLength; } --- cardcomm/pkcs11/src/common/logbase.cpp.orig 2015-06-02 08:02:25 UTC +++ cardcomm/pkcs11/src/common/logbase.cpp @@ -30,11 +30,7 @@ #ifndef WIN32 #include -#ifdef LINUX #include "wintypes.h" -#else -#include "PCSC/wintypes.h" -#endif #include "sys/stat.h" #include "util.h" @@ -575,6 +571,7 @@ bool CLog::open(bool bWchar) else err = fopen_s(&m_f,utilStringNarrow(filename).c_str(),"a"); #else + (void)bWchar; m_f = fopen(utilStringNarrow(filename).c_str(),"a, ccs=UTF-8"); if (m_f == NULL) err=errno; #endif --- cardcomm/pkcs11/src/common/mw_util.h.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/common/mw_util.h @@ -38,7 +38,6 @@ #endif #if !defined __APPLE__ && !defined USE_WINERROR -#include "error.h" #endif #ifndef HAVE_ERRNO_T --- cardcomm/pkcs11/src/common/util.cpp.orig 2015-06-02 08:02:25 UTC +++ cardcomm/pkcs11/src/common/util.cpp @@ -376,7 +376,7 @@ void GetProcessName(wchar_t *wBuffer,uns /* Get our PID and build the name of the link in /proc */ pid = getpid(); - if (snprintf(linkname, sizeof(linkname), "/proc/%i/exe", pid) < 0) + if (snprintf(linkname, sizeof(linkname), "/proc/%i/file", pid) < 0) { /* This should only happen on large word systems. I'm not sure what the proper response is here. Index: head/security/libbeid/files/patch-configure.ac =================================================================== --- head/security/libbeid/files/patch-configure.ac (revision 399903) +++ head/security/libbeid/files/patch-configure.ac (revision 399904) @@ -1,27 +1,27 @@ ---- configure.ac.orig 2015-02-19 13:59:02 UTC +--- configure.ac.orig 2015-10-09 08:01:44 UTC +++ configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.61]) AC_INIT([eid-mw], -- m4_esyscmd_s(echo "4.1.2-"$(git describe --dirty|sed -e 's/-/./g')), -+ [4.1.2-release], +- m4_esyscmd_s(echo "4.1.6-"$(git describe --dirty|sed -e 's/-/./g')), ++ [4.1.8-release], [servicedesk@fedict.be],, [http://eid.belgium.be]) @@ -26,7 +26,6 @@ AS_VAR_IF([GXX],[yes],[],AC_MSG_ERROR([G # Checks for header files. AC_CHECK_HEADERS([fcntl.h float.h limits.h netinet/in.h stdlib.h string.h sys/file.h sys/ioctl.h sys/time.h unistd.h malloc.h memory.h sys/timeb.h termios.h]) -AM_GNU_GETTEXT([external]) ###### pcsc-lite ########## - AC_MSG_CHECKING([custom pcsc-lite installation]) -@@ -99,7 +98,6 @@ AC_DEFINE_UNQUOTED([HAVE_JPEGLIB], $HAVE - PKG_CHECK_MODULES(SSL, "openssl", [HAVE_OPENSSL=1], [HAVE_OPENSSL=0]) - AC_DEFINE_UNQUOTED([HAVE_OPENSSL], $HAVE_OPENSSL, [Define to 1 if you have OpenSSL installed]) + PKG_CHECK_MODULES([PCSC],[libpcsclite >= 1.4.4], +@@ -104,7 +103,6 @@ MAINVERSION=$(echo $PACKAGE_VERSION|sed + AC_DEFINE_UNQUOTED([MAINVERSION], $MAINVERSION, [do not change this]) + AC_SUBST(MAINVERSION) --AC_CONFIG_FILES([Makefile cardcomm/pkcs11/src/Makefile tests/unit/Makefile plugins_tools/aboutmw/gtk/Makefile plugins_tools/aboutmw/gtk/about-eid-mw.desktop.sh plugins_tools/aboutmw/gtk/po/Makefile.in]) +-AC_CONFIG_FILES([Makefile cardcomm/pkcs11/src/Makefile tests/unit/Makefile plugins_tools/aboutmw/gtk/Makefile plugins_tools/aboutmw/gtk/about-eid-mw.desktop.sh plugins_tools/aboutmw/gtk/po/Makefile.in rpm/eid-mw.spec]) -AC_CONFIG_SUBDIRS([plugins_tools/xpi]) +AC_CONFIG_FILES([Makefile cardcomm/pkcs11/src/Makefile]) AC_OUTPUT Index: head/security/libbeid/files/patch-dialogs =================================================================== --- head/security/libbeid/files/patch-dialogs (revision 399903) +++ head/security/libbeid/files/patch-dialogs (revision 399904) @@ -1,157 +1,157 @@ --- cardcomm/pkcs11/src/dialogs/dialogs.h.orig 2015-06-02 08:02:25 UTC +++ cardcomm/pkcs11/src/dialogs/dialogs.h @@ -27,6 +27,7 @@ #ifndef __DIALOGS_H__ #define __DIALOGS_H__ +#include #include #ifdef WIN32 --- cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-askaccess.c.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-askaccess.c @@ -31,7 +31,7 @@ enum { MSG_ACCESS_CARD_TITLE=1, MSG_ACCESS_CARD_QUESTION }; -char* beid_messages[4][3]={ +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?"}, --- cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-askpin.c.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-askpin.c @@ -34,7 +34,7 @@ #define EXIT_ERROR 2 enum { MSG_PIN_CODE_REQUIRED=1, MSG_PLEASE_ENTER_PIN }; -char* beid_messages[4][3]={ +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"}, @@ -57,7 +57,7 @@ typedef struct /////////////////////////////////////////////////////////////////////////////////////////// void update_pin_label(PinDialogInfo *pindialog) { - int i; + size_t i; gchar tmp[MAX_PIN_LENGTH*6]; tmp[0]='\0'; for(i=0;ipin);i++) --- cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-badpin.c.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-badpin.c @@ -16,6 +16,7 @@ * http://www.gnu.org/licenses/. **************************************************************************** */ +#include #include #include #include @@ -30,7 +31,7 @@ #define EXIT_ERROR 2 enum msgs { MSG_INCORRECT_PIN_CODE=1, MSG_N_ATTEMPTS_LEFT, MSG_LAST_ATTEMPT }; -char* beid_messages[4][4]={ +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é"}, --- cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-changepin.c.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-changepin.c @@ -17,6 +17,7 @@ * http://www.gnu.org/licenses/. **************************************************************************** */ +#include #include #include #include @@ -36,7 +37,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]={ +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):"}, --- cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-i18n.h.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-i18n.h @@ -1,7 +1,7 @@ -char* _MSG_(int msgnum) +char const *_MSG_(int msgnum) { - char* message=beid_messages[0][msgnum]; // default=English - char* lang=getenv("LANG"); + char const *message=beid_messages[0][msgnum]; // default=English + char const *lang=getenv("LANG"); if(lang!=NULL && strlen(lang)==5 && lang[2]=='_') { int i; --- cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-spr-askpin.c.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-spr-askpin.c @@ -33,7 +33,7 @@ #define EXIT_ERROR 2 enum { MSG_PIN_CODE_REQUIRED=1, MSG_PLEASE_ENTER_PIN }; -char* beid_messages[4][3]={ +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].."}, --- cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-spr-changepin.c.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/beid-spr-changepin.c @@ -33,7 +33,7 @@ #define EXIT_ERROR 2 enum { MSG_CHANGE_PIN_CODE=1, MSG_PLEASE_CHANGE_PIN }; -char* beid_messages[4][3]={ +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 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].."}, ---- cardcomm/pkcs11/src/dialogs/dialogsgtk/dlgs_gtk.cpp.orig 2015-02-19 13:59:02 UTC +--- cardcomm/pkcs11/src/dialogs/dialogsgtk/dlgs_gtk.cpp.orig 2015-10-09 08:01:44 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/dlgs_gtk.cpp -@@ -55,12 +55,14 @@ extern "C" - - +@@ -48,12 +48,14 @@ extern "C" + void dlg_log_error(const char* label); + } +static bool MW_PERROR(tLevel level, tModule mod, const char* comment) { char err_txt[256],log_txt[1024]; wchar_t wide_log_txt[1024]; - 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)/sizeof(wchar_t)); return MWLOG(level,mod,wide_log_txt); } --- cardcomm/pkcs11/src/dialogs/dialogsgtk/parent.c.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/parent.c @@ -1,4 +1,6 @@ +#include #include +#include #include "config.h" #include "parent.h" #include @@ -11,7 +13,7 @@ ssize_t get_parent_path(char* exec_path, char proc_path[32]; ssize_t exec_path_len=-1; - snprintf(proc_path,sizeof(proc_path)-1,"/proc/%d/exe",getppid()); + snprintf(proc_path,sizeof(proc_path)-1,"/proc/%d/file",getppid()); if((exec_path_len=readlink(proc_path,exec_path,exec_path_size-1))!=-1) exec_path[exec_path_len]='\0'; return exec_path_len; --- cardcomm/pkcs11/src/dialogs/dialogsgtk/parent.h.orig 2015-02-19 13:59:02 UTC +++ cardcomm/pkcs11/src/dialogs/dialogsgtk/parent.h @@ -1,2 +1,4 @@ +#include + ssize_t get_parent_path(char* exec_path, size_t exec_path_size); Index: head/security/libbeid/files/patch-pkcs11 =================================================================== --- head/security/libbeid/files/patch-pkcs11 (revision 399903) +++ head/security/libbeid/files/patch-pkcs11 (revision 399904) @@ -1,82 +1,82 @@ ---- cardcomm/pkcs11/src/log.h.orig 2015-06-02 08:02:25 UTC +--- cardcomm/pkcs11/src/log.h.orig 2015-10-21 10:16:26 UTC +++ cardcomm/pkcs11/src/log.h -@@ -60,42 +60,42 @@ typedef struct P11_MAP_TYPE +@@ -64,42 +64,42 @@ typedef struct P11_MAP_TYPE static P11_MAP_TYPE const P11_CLASS_TYPES[]= { - { CKO_DATA, "CKO_DATA" }, - { CKO_CERTIFICATE, "CKO_CERTIFICATE" }, - { CKO_PUBLIC_KEY, "CKO_PUBLIC_KEY" }, - { CKO_PRIVATE_KEY, "CKO_PRIVATE_KEY" }, - { CKO_SECRET_KEY, "CKO_SECRET_KEY" }, - { CKO_HW_FEATURE, "CKO_HW_FEATURE" }, - { CKO_DOMAIN_PARAMETERS, "CKO_DOMAIN_PARAMETERS" }, - { CKO_VENDOR_DEFINED, "CKO_VENDOR_DEFINED" }, - {0,0} + { CKO_DATA, "CKO_DATA", 0 }, + { CKO_CERTIFICATE, "CKO_CERTIFICATE", 0 }, + { CKO_PUBLIC_KEY, "CKO_PUBLIC_KEY", 0 }, + { CKO_PRIVATE_KEY, "CKO_PRIVATE_KEY", 0 }, + { CKO_SECRET_KEY, "CKO_SECRET_KEY", 0 }, + { CKO_HW_FEATURE, "CKO_HW_FEATURE", 0 }, + { CKO_DOMAIN_PARAMETERS, "CKO_DOMAIN_PARAMETERS", 0 }, + { CKO_VENDOR_DEFINED, "CKO_VENDOR_DEFINED", 0 }, + {0,0,0} }; static P11_MAP_TYPE const P11_CERTIFICATE_TYPES[]= { - { CKC_X_509, "CKC_X_509" }, - { CKC_X_509_ATTR_CERT, "CKC_X_509_ATTR_CERT" }, - {0,0} + { CKC_X_509, "CKC_X_509", 0 }, + { CKC_X_509_ATTR_CERT, "CKC_X_509_ATTR_CERT", 0 }, + {0,0,0} }; static P11_MAP_TYPE const P11_KEY_TYPES[]= { - { CKK_RSA, "CKK_RSA" }, - { CKK_DSA, "CKK_DSA" }, - { CKK_DH, "CKK_DH" }, - { CKK_ECDSA, "CKK_ECDSA" }, - { CKK_EC, "CKK_EC" }, - { CKK_RC2, "CKK_RC2" }, - { CKK_RC4, "CKK_RC4" }, - { CKK_RC5, "CKK_RC5" }, - { CKK_DES, "CKK_DES" }, - { CKK_DES3, "CKK_DES3" }, - { CKK_CAST, "CKK_CAST" }, - { CKK_CAST3, "CKK_CAST3" }, - { CKK_CAST128, "CKK_CAST128" }, - { CKK_IDEA, "CKK_IDEA" }, - { CKK_AES, "CKK_AES" }, - {0,0} + { CKK_RSA, "CKK_RSA", 0 }, + { CKK_DSA, "CKK_DSA", 0 }, + { CKK_DH, "CKK_DH", 0 }, + { CKK_ECDSA, "CKK_ECDSA", 0 }, + { CKK_EC, "CKK_EC", 0 }, + { CKK_RC2, "CKK_RC2", 0 }, + { CKK_RC4, "CKK_RC4", 0 }, + { CKK_RC5, "CKK_RC5", 0 }, + { CKK_DES, "CKK_DES", 0 }, + { CKK_DES3, "CKK_DES3", 0 }, + { CKK_CAST, "CKK_CAST", 0 }, + { CKK_CAST3, "CKK_CAST3", 0 }, + { CKK_CAST128, "CKK_CAST128", 0 }, + { CKK_IDEA, "CKK_IDEA", 0 }, + { CKK_AES, "CKK_AES", 0 }, + {0,0,0} }; static P11_MAP_TYPE const P11_ATTR_TYPES[]= { -@@ -159,7 +159,7 @@ static P11_MAP_TYPE const P11_ATTR_TYPES +@@ -163,7 +163,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 }, - {0,0} + {0,0,0} };