Blame SOURCES/0001-Link-with-ssl-shim.patch

3f476a
From 75268fbb6bbe32db695595e2b30f4600732767ad Mon Sep 17 00:00:00 2001
3f476a
From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= <jstanek@redhat.com>
3f476a
Date: Tue, 28 Apr 2020 11:15:24 +0200
3f476a
Subject: [PATCH] Link with ssl-shim
3f476a
MIME-Version: 1.0
3f476a
Content-Type: text/plain; charset=UTF-8
3f476a
Content-Transfer-Encoding: 8bit
3f476a
3f476a
Signed-off-by: Jan Staněk <jstanek@redhat.com>
3f476a
---
3f476a
 node.gypi          | 10 +++++++---
3f476a
 src/node_crypto.cc |  2 +-
3f476a
 src/node_crypto.h  |  2 ++
3f476a
 3 files changed, 10 insertions(+), 4 deletions(-)
3f476a
3f476a
diff --git a/node.gypi b/node.gypi
3f476a
index 43dbda7bbf..070f212d96 100644
3f476a
--- a/node.gypi
3f476a
+++ b/node.gypi
3f476a
@@ -364,9 +364,13 @@
3f476a
               ],
3f476a
             }],
3f476a
           ],
3f476a
-        }]]
3f476a
-
3f476a
-    }, {
3f476a
+        }],
3f476a
+        [ 'node_shared_openssl=="true"', {
3f476a
+          'include_dirs': ['deps/node-ssl-shim/include'],
3f476a
+          'libraries': ['
3f476a
+        }]
3f476a
+    ]},
3f476a
+    {
3f476a
       'defines': [ 'HAVE_OPENSSL=0' ]
3f476a
     }],
3f476a
 
3f476a
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
3f476a
index ed886abd74..6118829b43 100644
3f476a
--- a/src/node_crypto.cc
3f476a
+++ b/src/node_crypto.cc
3f476a
@@ -1155,7 +1155,7 @@ void SecureContext::AddRootCerts(const FunctionCallbackInfo<Value>& args) {
3f476a
 
3f476a
 void SecureContext::SetCipherSuites(const FunctionCallbackInfo<Value>& args) {
3f476a
   // BoringSSL doesn't allow API config of TLS1.3 cipher suites.
3f476a
-#ifndef OPENSSL_IS_BORINGSSL
3f476a
+#if !defined OPENSSL_IS_BORINGSSL && !OPENSSL_IS_LEGACY
3f476a
   SecureContext* sc;
3f476a
   ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder());
3f476a
   Environment* env = sc->env();
3f476a
diff --git a/src/node_crypto.h b/src/node_crypto.h
3f476a
index bef98b3e24..d46730c9ba 100644
3f476a
--- a/src/node_crypto.h
3f476a
+++ b/src/node_crypto.h
3f476a
@@ -42,6 +42,8 @@
3f476a
 #include <openssl/ec.h>
3f476a
 #include <openssl/rsa.h>
3f476a
 
3f476a
+#include <node-ssl-shim/ssl-shim.h>
3f476a
+
3f476a
 namespace node {
3f476a
 namespace crypto {
3f476a
 
3f476a
-- 
3f476a
2.26.2
3f476a