diff options
author | Arnon Gilboa <agilboa@redhat.com> | 2011-05-12 12:12:09 +0300 |
---|---|---|
committer | Arnon Gilboa <agilboa@redhat.com> | 2011-05-12 15:13:40 +0300 |
commit | ba426a3a4cbc3599eeee720052831b06d65a5a2a (patch) | |
tree | 4005c4083dc1d31da27c74b565d4586669023fe0 /common | |
parent | ccddcdb82a5269f0950db9cc28993087884a5a1d (diff) | |
download | spice-ba426a3a4cbc3599eeee720052831b06d65a5a2a.tar.gz spice-ba426a3a4cbc3599eeee720052831b06d65a5a2a.tar.xz spice-ba426a3a4cbc3599eeee720052831b06d65a5a2a.zip |
common: fix ssl_verify windows build errors
Diffstat (limited to 'common')
-rw-r--r-- | common/ssl_verify.c | 5 | ||||
-rw-r--r-- | 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 5e3722e9..603d0f39 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 f0b97d85..8235c136 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> |