[glib-networking] openssl: Fix warning on Linux
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] openssl: Fix warning on Linux
- Date: Wed, 20 Feb 2019 17:26:38 +0000 (UTC)
commit 7857dc1d25229dbbf449849e791a399c2fed241a
Author: Nirbheek Chauhan <nirbheek centricular com>
Date: Wed Feb 20 22:16:18 2019 +0530
openssl: Fix warning on Linux
warning: passing argument 2 of ‘d2i_OCSP_RESPONSE’ from incompatible pointer type
[-Wincompatible-pointer-types]
resp = d2i_OCSP_RESPONSE (NULL, &p, len);
SSL_get_tlsext_status_ocsp_resp() expects it to not be const and
causes a warning on MSVC if we make it always const, but
d2i_OCSP_RESPONSE() wants it to be const because it won't modify it.
https://gitlab.gnome.org/GNOME/glib-networking/merge_requests/23#note_441785
tls/openssl/gtlsconnection-openssl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index 81fdf04..c6df559 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -296,7 +296,7 @@ verify_ocsp_response (GTlsConnectionOpenssl *openssl,
if (p == NULL)
return 0;
- resp = d2i_OCSP_RESPONSE (NULL, &p, len);
+ resp = d2i_OCSP_RESPONSE (NULL, (const unsigned char **) &p, len);
if (resp == NULL)
return G_TLS_CERTIFICATE_GENERIC_ERROR;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]