[Spice-devel] [PATCH 4/6] common: fix ssl_verify windows build errors
Arnon Gilboa
agilboa at redhat.com
Thu May 12 02:37:29 PDT 2011
---
common/ssl_verify.c | 5 +++--
common/ssl_verify.h | 5 +++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/common/ssl_verify.c b/common/ssl_verify.c
index 5e3722e..603d0f3 100644
--- a/common/ssl_verify.c
+++ b/common/ssl_verify.c
@@ -31,7 +31,7 @@
#include <ctype.h>
#ifndef SPICE_DEBUG
-# define SPICE_DEBUG(format, args...)
+# define SPICE_DEBUG(format, ...)
#endif
#ifdef WIN32
@@ -165,6 +165,7 @@ static int verify_hostname(X509* cert, const char *hostname)
struct in_addr addr;
int addr_len = 0;
int cn_match = 0;
+ X509_NAME* subject;
if (!cert) {
SPICE_DEBUG("warning: no cert!");
@@ -227,7 +228,7 @@ static int verify_hostname(X509* cert, const char *hostname)
}
/* extracting commonNames */
- X509_NAME* subject = X509_get_subject_name(cert);
+ subject = X509_get_subject_name(cert);
if (subject) {
int pos = -1;
X509_NAME_ENTRY* cn_entry;
diff --git a/common/ssl_verify.h b/common/ssl_verify.h
index f0b97d8..8235c13 100644
--- a/common/ssl_verify.h
+++ b/common/ssl_verify.h
@@ -19,6 +19,11 @@
#ifndef SSL_VERIFY_H
#define SSL_VERIFY_H
+#ifdef WIN32
+#include <windows.h>
+#include <wincrypt.h>
+#endif
+
#include <openssl/rsa.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
--
1.7.4.1
More information about the Spice-devel
mailing list