diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/Makefile.am | 4 | ||||
-rw-r--r-- | common/canvas_base.c | 2 | ||||
-rw-r--r-- | common/canvas_utils.c | 2 | ||||
-rw-r--r-- | common/ring.h | 9 | ||||
-rw-r--r-- | common/ssl_verify.c | 10 | ||||
-rw-r--r-- | common/ssl_verify.h | 3 |
6 files changed, 16 insertions, 14 deletions
diff --git a/common/Makefile.am b/common/Makefile.am index 2e41549..8f4bbfb 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -49,8 +49,8 @@ COMMON_SRCS = \ quic_family_tmpl.c \ quic_rgb_tmpl.c \ quic_tmpl.c \ - ssl_verfiy.h \ - ssl_verfiy.c \ + ssl_verify.h \ + ssl_verify.c \ $(NULL) EXTRA_DIST = $(COMMON_SRCS) diff --git a/common/canvas_base.c b/common/canvas_base.c index db83245..3b0f801 100644 --- a/common/canvas_base.c +++ b/common/canvas_base.c @@ -612,7 +612,7 @@ static pixman_image_t *canvas_get_jpeg_alpha(CanvasBase *canvas, &lz_alpha_width, &lz_alpha_height, &n_comp_pixels, &lz_alpha_top_down, NULL); ASSERT(lz_alpha_type == LZ_IMAGE_TYPE_XXXA); - ASSERT(lz_alpha_top_down == alpha_top_down); + ASSERT(!!lz_alpha_top_down == !!alpha_top_down); ASSERT(lz_alpha_width == width); ASSERT(lz_alpha_height == height); ASSERT(n_comp_pixels == width * height); diff --git a/common/canvas_utils.c b/common/canvas_utils.c index 01de936..743c86c 100644 --- a/common/canvas_utils.c +++ b/common/canvas_utils.c @@ -27,7 +27,7 @@ #include "mem.h" #ifdef WIN32 -int gdi_handlers; +static int gdi_handlers = 0; #endif #ifndef ASSERT diff --git a/common/ring.h b/common/ring.h index 91d4794..0194959 100644 --- a/common/ring.h +++ b/common/ring.h @@ -21,16 +21,17 @@ #include <stddef.h> +#ifndef ASSERT +# include <assert.h> +# define ASSERT(X) assert(X) +#endif + typedef struct Ring RingItem; typedef struct Ring { RingItem *prev; RingItem *next; } Ring; -#ifndef ASSERT -# define ASSERT(X) -#endif - static inline void ring_init(Ring *ring) { ring->next = ring->prev = ring; diff --git a/common/ssl_verify.c b/common/ssl_verify.c index d0cf128..f7d9482 100644 --- a/common/ssl_verify.c +++ b/common/ssl_verify.c @@ -251,8 +251,8 @@ X509_NAME* subject_to_x509_name(const char *subject, int *nentries) VALUE } state; - key = alloca(strlen(subject)); - val = alloca(strlen(subject)); + key = (char*)alloca(strlen(subject)); + val = (char*)alloca(strlen(subject)); in_subject = X509_NAME_new(); if (!in_subject || !key || !val) { @@ -374,8 +374,8 @@ static int openssl_verify(int preverify_ok, X509_STORE_CTX *ctx) SSL *ssl; X509* cert; - ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); - v = SSL_get_app_data(ssl); + ssl = (SSL*)X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); + v = (SpiceOpenSSLVerify*)SSL_get_app_data(ssl); depth = X509_STORE_CTX_get_error_depth(ctx); if (depth > 0) { @@ -427,7 +427,7 @@ SpiceOpenSSLVerify* spice_openssl_verify_new(SSL *ssl, SPICE_SSL_VERIFY_OP verif v->ssl = ssl; v->verifyop = verifyop; v->hostname = spice_strdup(hostname); - v->pubkey = spice_memdup(pubkey, pubkey_size); + v->pubkey = (char*)spice_memdup(pubkey, pubkey_size); v->pubkey_size = pubkey_size; v->subject = spice_strdup(subject); diff --git a/common/ssl_verify.h b/common/ssl_verify.h index 0838c0a..c422c4d 100644 --- a/common/ssl_verify.h +++ b/common/ssl_verify.h @@ -29,7 +29,8 @@ #include <openssl/x509v3.h> typedef enum { - SPICE_SSL_VERIFY_OP_PUBKEY = 1, + SPICE_SSL_VERIFY_OP_NONE = 0, + SPICE_SSL_VERIFY_OP_PUBKEY = (1 << 0), SPICE_SSL_VERIFY_OP_HOSTNAME = (1 << 1), SPICE_SSL_VERIFY_OP_SUBJECT = (1 << 2), } SPICE_SSL_VERIFY_OP; |