mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-29 00:41:33 +00:00
common: fix ssl_verify windows build errors
This commit is contained in:
parent
ccddcdb82a
commit
ba426a3a4c
@ -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;
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user