[glib-openssl/ignatenko/openssl-1.1.0: 4/4] openssl/gtlsclientconnection: adapt to OpenSSL 1.1.0+
- From: Igor Gnatenko <ignatenko src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-openssl/ignatenko/openssl-1.1.0: 4/4] openssl/gtlsclientconnection: adapt to OpenSSL 1.1.0+
- Date: Fri, 21 Oct 2016 15:41:00 +0000 (UTC)
commit ae75a0540947d5b9b73ac8e1f0a2073dfaa7c532
Author: Igor Gnatenko <ignatenko src gnome org>
Date: Fri Oct 21 17:39:47 2016 +0200
openssl/gtlsclientconnection: adapt to OpenSSL 1.1.0+
Signed-off-by: Igor Gnatenko <ignatenko src gnome org>
tls/openssl/gtlsclientconnection-openssl.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/tls/openssl/gtlsclientconnection-openssl.c b/tls/openssl/gtlsclientconnection-openssl.c
index 4608f7e..cb9e647 100644
--- a/tls/openssl/gtlsclientconnection-openssl.c
+++ b/tls/openssl/gtlsclientconnection-openssl.c
@@ -381,7 +381,11 @@ retrieve_certificate (SSL *ssl,
key = g_tls_certificate_openssl_get_key (G_TLS_CERTIFICATE_OPENSSL (cert));
/* increase ref count */
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
CRYPTO_add (&key->references, 1, CRYPTO_LOCK_EVP_PKEY);
+#else
+ EVP_PKEY_up_ref (key);
+#endif
*pkey = key;
*x509 = X509_dup (g_tls_certificate_openssl_get_cert (G_TLS_CERTIFICATE_OPENSSL (cert)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]