summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh4
-rw-r--r--gtests/ssl_gtest/ssl_gtest.gyp10
-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, 11 insertions, 19 deletions
diff --git a/build.sh b/build.sh
index 6d070af20..4c6d513cd 100755
--- a/build.sh
+++ b/build.sh
@@ -50,7 +50,6 @@ fuzz=0
fuzz_tls=0
fuzz_oss=0
no_local_nspr=0
-sslkeylogfile=1
gyp_params=(--depth="$cwd" --generator-output=".")
ninja_params=()
@@ -104,7 +103,6 @@ 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 ;;
*) show_help; exit 2 ;;
esac
shift
@@ -118,8 +116,6 @@ 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 8a7070a73..ae7d4c78b 100644
--- a/gtests/ssl_gtest/ssl_gtest.gyp
+++ b/gtests/ssl_gtest/ssl_gtest.gyp
@@ -33,6 +33,7 @@
'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',
@@ -91,14 +92,6 @@
'<(DEPTH)/lib/dbm/src/src.gyp:dbm',
],
}],
- [ 'enable_sslkeylogfile==1', {
- 'sources': [
- 'ssl_keylog_unittest.cc',
- ],
- 'defines': [
- 'NSS_ALLOW_SSLKEYLOGFILE',
- ],
- }],
],
}
],
@@ -108,6 +101,7 @@
],
'defines': [
'NSS_USE_STATIC_LIBS',
+ 'NSS_ALLOW_SSLKEYLOGFILE=1',
],
},
'variables': {
diff --git a/gtests/ssl_gtest/ssl_keylog_unittest.cc b/gtests/ssl_gtest/ssl_keylog_unittest.cc
index 4713e52a2..d616dd250 100644
--- a/gtests/ssl_gtest/ssl_keylog_unittest.cc
+++ b/gtests/ssl_gtest/ssl_keylog_unittest.cc
@@ -4,6 +4,8 @@
* 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>
@@ -162,3 +164,5 @@ INSTANTIATE_TEST_CASE_P(
#endif
} // namespace nss_test
+
+#endif // NSS_ALLOW_SSLKEYLOGFILE
diff --git a/help.txt b/help.txt
index d905f6ec4..1df72736e 100644
--- a/help.txt
+++ b/help.txt
@@ -51,5 +51,3 @@ 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 enable support for logging key data to a file specified
- by the SSLKEYLOGFILE environment variable
diff --git a/lib/ssl/ssl.gyp b/lib/ssl/ssl.gyp
index e456885e4..2e28f6775 100644
--- a/lib/ssl/ssl.gyp
+++ b/lib/ssl/ssl.gyp
@@ -73,11 +73,6 @@
'-std=gnu99',
],
}],
- [ 'enable_sslkeylogfile==1', {
- 'defines': [
- 'NSS_ALLOW_SSLKEYLOGFILE',
- ],
- }],
],
'dependencies': [
'<(DEPTH)/exports.gyp:nss_exports',
@@ -97,6 +92,11 @@
}
}
],
+ 'target_defaults': {
+ 'defines': [
+ 'NSS_ALLOW_SSLKEYLOGFILE=1'
+ ]
+ },
'variables': {
'module': 'nss'
}