[xmlsec] fix compile warnings



commit e3b2ce95c1e486ffb0a9fc834c004ce5207907eb
Author: Aleksey Sanin <aleksey aleksey com>
Date:   Tue Apr 20 16:42:35 2010 -0700

    fix compile warnings

 src/openssl/signatures.c |   15 ++++++++-------
 src/openssl/x509vfy.c    |   16 ++++++++--------
 2 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/src/openssl/signatures.c b/src/openssl/signatures.c
index 2a16983..7032fc4 100644
--- a/src/openssl/signatures.c
+++ b/src/openssl/signatures.c
@@ -603,13 +603,13 @@ xmlSecOpenSSLDsaSha1EvpInit(EVP_MD_CTX *ctx)
 }
 
 static int 
-xmlSecOpenSSLDsaSha1EvpUpdate(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+xmlSecOpenSSLDsaSha1EvpUpdate(EVP_MD_CTX *ctx, const void *data, size_t count)
 { 
     return SHA1_Update(ctx->md_data,data,count); 
 }
 
 static int 
-xmlSecOpenSSLDsaSha1EvpFinal(EVP_MD_CTX *ctx,xmlSecByte *md)
+xmlSecOpenSSLDsaSha1EvpFinal(EVP_MD_CTX *ctx, unsigned char *md)
 { 
     return SHA1_Final(md,ctx->md_data); 
 }
@@ -617,8 +617,8 @@ xmlSecOpenSSLDsaSha1EvpFinal(EVP_MD_CTX *ctx,xmlSecByte *md)
 
 static int 	
 xmlSecOpenSSLDsaSha1EvpSign(int type ATTRIBUTE_UNUSED, 
-			const xmlSecByte *dgst, int dlen,
-			xmlSecByte *sig, unsigned int *siglen, DSA *dsa) {
+			const unsigned char *dgst, unsigned int dlen,
+			unsigned char *sig, unsigned int *siglen, void *dsa) {
     DSA_SIG *s;
     int rSize, sSize;
 
@@ -654,8 +654,9 @@ xmlSecOpenSSLDsaSha1EvpSign(int type ATTRIBUTE_UNUSED,
 
 static int 
 xmlSecOpenSSLDsaSha1EvpVerify(int type ATTRIBUTE_UNUSED, 
-			const xmlSecByte *dgst, int dgst_len,
-			const xmlSecByte *sigbuf, int siglen, DSA *dsa) {
+			const unsigned char *dgst, unsigned int dgst_len,
+			const unsigned char *sigbuf, unsigned int siglen, 
+			void *dsa) {
     DSA_SIG *s;    
     int ret = -1;
 
@@ -710,7 +711,7 @@ static const EVP_MD xmlSecOpenSSLDsaMdEvp = {
     SHA1_Final,
 #endif /* XMLSEC_OPENSSL_096 */
     xmlSecOpenSSLDsaSha1EvpSign,
-    xmlSecOpenSSLDsaSha1EvpVerify, 
+    xmlSecOpenSSLDsaSha1EvpVerify,
     {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3,EVP_PKEY_DSA4,0},
     SHA_CBLOCK,
     sizeof(EVP_MD *)+sizeof(SHA_CTX),
diff --git a/src/openssl/x509vfy.c b/src/openssl/x509vfy.c
index 40264c0..d226dd8 100644
--- a/src/openssl/x509vfy.c
+++ b/src/openssl/x509vfy.c
@@ -107,10 +107,10 @@ static int 		xmlSecOpenSSLX509NameStringRead			(xmlSecByte **str,
 									 int ingoreTrailingSpaces);
 static int		xmlSecOpenSSLX509NamesCompare			(X509_NAME *a,
 									 X509_NAME *b);
-static int 		xmlSecOpenSSLX509_NAME_cmp			(const X509_NAME *a, 
-									 const X509_NAME *b);
-static int 		xmlSecOpenSSLX509_NAME_ENTRY_cmp		(const X509_NAME_ENTRY **a, 
-									 const X509_NAME_ENTRY **b);
+static int 		xmlSecOpenSSLX509_NAME_cmp			(const X509_NAME * a, 
+									 const X509_NAME * b);
+static int 		xmlSecOpenSSLX509_NAME_ENTRY_cmp		(const X509_NAME_ENTRY * const *a, 
+									 const X509_NAME_ENTRY * const *b);
 
 /** 
  * xmlSecOpenSSLX509StoreGetKlass:
@@ -1172,7 +1172,7 @@ xmlSecOpenSSLX509NameStringRead(xmlSecByte **str, int *strLen,
 }
 
 static
-int xmlSecOpenSSLX509_NAME_cmp(const X509_NAME *a, const X509_NAME *b) {
+int xmlSecOpenSSLX509_NAME_cmp(const X509_NAME * a, const X509_NAME * b) {
     int i,ret;
     const X509_NAME_ENTRY *na,*nb;
 
@@ -1203,7 +1203,7 @@ int xmlSecOpenSSLX509_NAME_cmp(const X509_NAME *a, const X509_NAME *b) {
  * We have to sort X509_NAME entries to get correct results.
  * This is ugly but OpenSSL does not support it
  */
-static int		
+static int
 xmlSecOpenSSLX509NamesCompare(X509_NAME *a, X509_NAME *b) {
     X509_NAME *a1 = NULL;
     X509_NAME *b1 = NULL;
@@ -1239,7 +1239,7 @@ xmlSecOpenSSLX509NamesCompare(X509_NAME *a, X509_NAME *b) {
 
     /* actually compare */
     ret = xmlSecOpenSSLX509_NAME_cmp(a1, b1);
-    
+
     /* cleanup */
     X509_NAME_free(a1);
     X509_NAME_free(b1);
@@ -1247,7 +1247,7 @@ xmlSecOpenSSLX509NamesCompare(X509_NAME *a, X509_NAME *b) {
 }
 
 static int 
-xmlSecOpenSSLX509_NAME_ENTRY_cmp(const X509_NAME_ENTRY **a, const X509_NAME_ENTRY **b) {
+xmlSecOpenSSLX509_NAME_ENTRY_cmp(const X509_NAME_ENTRY * const *a, const X509_NAME_ENTRY * const *b) {
     int ret;
     
     xmlSecAssert2(a != NULL, -1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]