Attached two patches fix compilation errors or warnings when compiling
with NSS support.

Compiler messages are mentioned in patch headers.

Note that implicit declaration fix again refers to implicit declaration
of function 'X509_cmp' problem, which may need x509.h, but location of
this header may vary. In last mail I incorrectly told, that it does not
appear in trunk, because I made test build with different options.
This warning appears only if compiling with LDAP support.

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: [EMAIL PROTECTED]
Lihovarská 1060/12           tel: +420 284 028 966, +49 911 740538747
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/
pkcs11_lib.c:295: error: conflicting types for 'find_slot_by_number'
pkcs11_lib.h:34: error: previous declaration of 'find_slot_by_number' was here
================================================================================
--- src/common/pkcs11_lib.c
+++ src/common/pkcs11_lib.c
@@ -292,7 +292,7 @@
   return 0; /* NSS initialized the module on load */
 }
 
-int find_slot_by_number(pkcs11_handle_t *h, int slot_num, unsigned int *slotID)
+int find_slot_by_number(pkcs11_handle_t *h, unsigned int slot_num, unsigned int *slotID)
 {
   SECMODModule *module = h->module;
   int i;
cert_vfy.c: In function 'verify_certificate':
cert_vfy.c:36: warning: implicit declaration of function 'SECU_Strerror'
cert_vfy.c:36: warning: implicit declaration of function 'PR_GetError'
cert_vfy.c: In function 'verify_signature':
cert_vfy.c:59: warning: implicit declaration of function 'SEC_GetSignatureAlgorithmOidTag'
cert_vfy.c:63: warning: implicit declaration of function 'VFY_VerifyData'
cert_vfy.c:67: warning: implicit declaration of function 'SECKEY_DestroyPublicKey'
error.c: In function 'set_error':
error.c:34: warning: implicit declaration of function 'vsnprintf'
ldap_mapper.c: In function 'ldap_get_certificate':
ldap_mapper.c:759: warning: implicit declaration of function 'd2i_X509'
ldap_mapper.c:759: warning: assignment makes pointer from integer without a cast
ldap_mapper.c: In function 'ldap_mapper_match_user':
ldap_mapper.c:873: warning: implicit declaration of function 'X509_cmp'
pkcs11_eventmgr.c: In function 'thats_all_folks':
pkcs11_eventmgr.c:94: warning: implicit declaration of function 'NSS_Shutdown'
pkcs11_eventmgr.c: In function 'main':
pkcs11_eventmgr.c:380: warning: implicit declaration of function 'NSS_Init'
pkcs11_eventmgr.c:383: warning: implicit declaration of function 'NSS_NoDB_Init'
pkcs11_eventmgr.c:422: warning: statement with no effect
pkcs11_eventmgr.c:466: warning: implicit declaration of function 'PK11_GetSlotID'
pkcs11_eventmgr.c:469: warning: implicit declaration of function 'PK11_IsPresent'
pkcs11_eventmgr.c:470: warning: implicit declaration of function 'PK11_GetSlotSeries'
pkcs11_eventmgr.c:496: warning: implicit declaration of function 'PK11_FreeSlot'
================================================================================
--- src/common/cert_vfy.c
+++ src/common/cert_vfy.c
@@ -18,8 +18,10 @@
 #include "cert_vfy.h"
 
 #ifdef HAVE_NSS
-
+#include <nspr.h>
+#include <cryptohi.h>
 #include "cert.h"
+#include "secutil.h"
 
 int verify_certificate(X509 * x509, cert_policy *policy)
 {
--- src/common/error.c
+++ src/common/error.c
@@ -17,6 +17,7 @@
 
 #include "error.h"
 #include <string.h>
+#include <stdio.h>
 
 #define __ERROR_C_
 
--- src/mappers/ldap_mapper.c
+++ src/mappers/ldap_mapper.c
@@ -36,6 +36,7 @@
 
 #include <ldap.h>
 #include <pwd.h>
+#include <openssl/x509.h>
 
 #include "../common/cert_st.h"
 #include "../common/debug.h"
--- src/tools/pkcs11_eventmgr.c
+++ src/tools/pkcs11_eventmgr.c
@@ -32,6 +32,8 @@
 
 #ifdef HAVE_NSS
 #include <secmod.h>
+#include <nss.h>
+#include <pk11pub.h>
 #endif
 
 #define DEF_POLLING 1    /* 1 second timeout */
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to