summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh4
-rw-r--r--gtests/ssl_gtest/ssl_gtest.gyp9
-rw-r--r--gtests/ssl_gtest/ssl_keylog_unittest.cc4
-rw-r--r--help.txt2
-rw-r--r--lib/ssl/ssl.gyp10
5 files changed, 19 insertions, 10 deletions
diff --git a/build.sh b/build.sh
index 37ff9708c..0b6fec83a 100755
--- a/build.sh
+++ b/build.sh
@@ -50,6 +50,7 @@ fuzz=0
fuzz_tls=0
fuzz_oss=0
no_local_nspr=0
+sslkeylogfile=1
gyp_params=(--depth="$cwd" --generator-output=".")
ninja_params=()
@@ -103,6 +104,7 @@ while [ $# -gt 0 ]; do
--enable-fips) gyp_params+=(-Ddisable_fips=0) ;;
--enable-libpkix) gyp_params+=(-Ddisable_libpkix=0) ;;
--mozpkix-only) gyp_params+=(-Dmozpkix_only=1 -Ddisable_tests=1 -Dsign_libs=0) ;;
+ --disable-keylog) sslkeylogfile=0 ;;
-D*) gyp_params+=("$1") ;;
*) show_help; exit 2 ;;
esac
@@ -117,6 +119,8 @@ else
target=Debug
fi
+gyp_params+=(-Denable_sslkeylogfile="$sslkeylogfile")
+
# Do special setup.
if [ "$fuzz" = 1 ]; then
source "$cwd"/coreconf/fuzz.sh
diff --git a/gtests/ssl_gtest/ssl_gtest.gyp b/gtests/ssl_gtest/ssl_gtest.gyp
index fb0a8701e..a3531f852 100644
--- a/gtests/ssl_gtest/ssl_gtest.gyp
+++ b/gtests/ssl_gtest/ssl_gtest.gyp
@@ -32,7 +32,6 @@
'ssl_gather_unittest.cc',
'ssl_gtest.cc',
'ssl_hrr_unittest.cc',
- 'ssl_keylog_unittest.cc',
'ssl_keyupdate_unittest.cc',
'ssl_loopback_unittest.cc',
'ssl_misc_unittest.cc',
@@ -93,6 +92,14 @@
'<(DEPTH)/lib/dbm/src/src.gyp:dbm',
],
}],
+ [ 'enable_sslkeylogfile==1', {
+ 'sources': [
+ 'ssl_keylog_unittest.cc',
+ ],
+ 'defines': [
+ 'NSS_ALLOW_SSLKEYLOGFILE',
+ ],
+ }],
],
}
],
diff --git a/gtests/ssl_gtest/ssl_keylog_unittest.cc b/gtests/ssl_gtest/ssl_keylog_unittest.cc
index 322b64837..b6d8fcb51 100644
--- a/gtests/ssl_gtest/ssl_keylog_unittest.cc
+++ b/gtests/ssl_gtest/ssl_keylog_unittest.cc
@@ -4,8 +4,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifdef NSS_ALLOW_SSLKEYLOGFILE
-
#include <cstdlib>
#include <fstream>
#include <sstream>
@@ -114,5 +112,3 @@ INSTANTIATE_TEST_CASE_P(
#endif
} // namespace nss_test
-
-#endif // NSS_ALLOW_SSLKEYLOGFILE
diff --git a/help.txt b/help.txt
index 180e9ecf9..63dc132ee 100644
--- a/help.txt
+++ b/help.txt
@@ -51,4 +51,6 @@ NSS build tool options:
--enable-libpkix make libpkix part of the build
--mozpkix-only build only static mozpkix and mozpkix-test libraries
support for this build option is limited
+ --disable-keylog disable support for logging key data to a file specified
+ by the SSLKEYLOGFILE environment variable
-D<gyp-option> pass an option directly to gyp
diff --git a/lib/ssl/ssl.gyp b/lib/ssl/ssl.gyp
index 235f752d5..7c89d80c1 100644
--- a/lib/ssl/ssl.gyp
+++ b/lib/ssl/ssl.gyp
@@ -74,6 +74,11 @@
'-std=gnu99',
],
}],
+ [ 'enable_sslkeylogfile==1', {
+ 'defines': [
+ 'NSS_ALLOW_SSLKEYLOGFILE',
+ ],
+ }],
],
'dependencies': [
'<(DEPTH)/exports.gyp:nss_exports',
@@ -93,11 +98,6 @@
}
}
],
- 'target_defaults': {
- 'defines': [
- 'NSS_ALLOW_SSLKEYLOGFILE=1'
- ]
- },
'variables': {
'module': 'nss'
}