summaryrefslogtreecommitdiffstats
path: root/security/nss/gtests/softoken_gtest
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/gtests/softoken_gtest')
-rw-r--r--security/nss/gtests/softoken_gtest/Makefile45
-rw-r--r--security/nss/gtests/softoken_gtest/manifest.mn38
-rw-r--r--security/nss/gtests/softoken_gtest/softoken_dh_vectors.h3411
-rw-r--r--security/nss/gtests/softoken_gtest/softoken_gtest.cc985
-rw-r--r--security/nss/gtests/softoken_gtest/softoken_gtest.gyp59
-rw-r--r--security/nss/gtests/softoken_gtest/softoken_nssckbi_testlib_gtest.cc124
6 files changed, 4662 insertions, 0 deletions
diff --git a/security/nss/gtests/softoken_gtest/Makefile b/security/nss/gtests/softoken_gtest/Makefile
new file mode 100644
index 0000000000..996669782d
--- /dev/null
+++ b/security/nss/gtests/softoken_gtest/Makefile
@@ -0,0 +1,45 @@
+#! gmake
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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/.
+
+#######################################################################
+# (1) Include initial platform-independent assignments (MANDATORY). #
+#######################################################################
+
+include manifest.mn
+
+#######################################################################
+# (2) Include "global" configuration information. (OPTIONAL) #
+#######################################################################
+
+include $(CORE_DEPTH)/coreconf/config.mk
+
+#######################################################################
+# (3) Include "component" configuration information. (OPTIONAL) #
+#######################################################################
+
+
+#######################################################################
+# (4) Include "local" platform-dependent assignments (OPTIONAL). #
+#######################################################################
+
+include ../common/gtest.mk
+
+CFLAGS += -I$(CORE_DEPTH)/lib/util
+
+#######################################################################
+# (5) Execute "global" rules. (OPTIONAL) #
+#######################################################################
+
+include $(CORE_DEPTH)/coreconf/rules.mk
+
+#######################################################################
+# (6) Execute "component" rules. (OPTIONAL) #
+#######################################################################
+
+
+#######################################################################
+# (7) Execute "local" rules. (OPTIONAL). #
+#######################################################################
diff --git a/security/nss/gtests/softoken_gtest/manifest.mn b/security/nss/gtests/softoken_gtest/manifest.mn
new file mode 100644
index 0000000000..b6c15c7082
--- /dev/null
+++ b/security/nss/gtests/softoken_gtest/manifest.mn
@@ -0,0 +1,38 @@
+# -*- makefile -*-
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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/.
+CORE_DEPTH = ../..
+DEPTH = ../..
+MODULE = nss
+
+DEFINES += -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" -DDLL_PREFIX=\"$(DLL_PREFIX)\"
+
+include $(CORE_DEPTH)/coreconf/arch.mk
+ifneq ($(OS_ARCH),WINNT)
+DB_TESTS = \
+ softoken_nssckbi_testlib_gtest.cc
+endif
+
+CPPSRCS = \
+ softoken_gtest.cc \
+ $(DB_TESTS) \
+ $(NULL)
+
+INCLUDES += \
+ -I$(CORE_DEPTH)/gtests/google_test/gtest/include \
+ -I$(CORE_DEPTH)/gtests/common \
+ -I$(CORE_DEPTH)/cpputil \
+ $(NULL)
+
+REQUIRES = nspr gtest cpputil
+
+PROGRAM = softoken_gtest
+
+EXTRA_LIBS = \
+ $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) \
+ $(DIST)/lib/$(LIB_PREFIX)cpputil.$(LIB_SUFFIX) \
+ $(DIST)/lib/$(LIB_PREFIX)gtestutil.$(LIB_SUFFIX) \
+ $(NULL)
+
+USE_STATIC_LIBS = 1
diff --git a/security/nss/gtests/softoken_gtest/softoken_dh_vectors.h b/security/nss/gtests/softoken_gtest/softoken_dh_vectors.h
new file mode 100644
index 0000000000..0e5c8069c7
--- /dev/null
+++ b/security/nss/gtests/softoken_gtest/softoken_dh_vectors.h
@@ -0,0 +1,3411 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * 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/. */
+
+/* If you want the full range of tests, compile with
+ * -DNSS_SOFTOKEN_DH_INCLUDE_SLOW. These tests could take minuts on a fast
+ * PC and longer on a slow mac */
+
+namespace nss_test {
+/* first list the primes we want to test */
+
+/* known primes */
+/* IKE 1536 prime is: 2^1536 - 2^1472 - 1 + 2^64 * { [2^1406 pi] + 741804 } */
+static const unsigned char prime_ike_1536[] = {
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2,
+ 0x21, 0x68, 0xC2, 0x34, 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1,
+ 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, 0x02, 0x0B, 0xBE, 0xA6,
+ 0x3B, 0x13, 0x9B, 0x22, 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD,
+ 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, 0x30, 0x2B, 0x0A, 0x6D,
+ 0xF2, 0x5F, 0x14, 0x37, 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45,
+ 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, 0xF4, 0x4C, 0x42, 0xE9,
+ 0xA6, 0x37, 0xED, 0x6B, 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED,
+ 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, 0xAE, 0x9F, 0x24, 0x11,
+ 0x7C, 0x4B, 0x1F, 0xE6, 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D,
+ 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, 0x98, 0xDA, 0x48, 0x36,
+ 0x1C, 0x55, 0xD3, 0x9A, 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F,
+ 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, 0x1C, 0x62, 0xF3, 0x56,
+ 0x20, 0x85, 0x52, 0xBB, 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D,
+ 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, 0xF1, 0x74, 0x6C, 0x08,
+ 0xCA, 0x23, 0x73, 0x27, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
+
+/* IKE 2048 prime is: 2^2048 - 2^1984 - 1 + 2^64 * { [2^1918 pi] + 124476 } */
+static const unsigned char prime_ike_2048[] = {
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2,
+ 0x21, 0x68, 0xC2, 0x34, 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1,
+ 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, 0x02, 0x0B, 0xBE, 0xA6,
+ 0x3B, 0x13, 0x9B, 0x22, 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD,
+ 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, 0x30, 0x2B, 0x0A, 0x6D,
+ 0xF2, 0x5F, 0x14, 0x37, 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45,
+ 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, 0xF4, 0x4C, 0x42, 0xE9,
+ 0xA6, 0x37, 0xED, 0x6B, 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED,
+ 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, 0xAE, 0x9F, 0x24, 0x11,
+ 0x7C, 0x4B, 0x1F, 0xE6, 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D,
+ 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, 0x98, 0xDA, 0x48, 0x36,
+ 0x1C, 0x55, 0xD3, 0x9A, 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F,
+ 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, 0x1C, 0x62, 0xF3, 0x56,
+ 0x20, 0x85, 0x52, 0xBB, 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D,
+ 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, 0xF1, 0x74, 0x6C, 0x08,
+ 0xCA, 0x18, 0x21, 0x7C, 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B,
+ 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, 0x9B, 0x27, 0x83, 0xA2,
+ 0xEC, 0x07, 0xA2, 0x8F, 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9,
+ 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, 0x39, 0x95, 0x49, 0x7C,
+ 0xEA, 0x95, 0x6A, 0xE5, 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10,
+ 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF};
+
+/* TLS 2048 prime is: 2^2048 - 2^1984 + {[2^1918 * e] + 560316 } * 2^64 - 1 */
+static const unsigned char prime_tls_2048[] = {
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xF8, 0x54, 0x58,
+ 0xA2, 0xBB, 0x4A, 0x9A, 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1,
+ 0xD8, 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 0x1C, 0x21, 0x7E, 0x6C, 0x38, 0x26, 0xE5, 0x2C,
+ 0x51, 0xAA, 0x69, 0x1E, 0x0E, 0x42, 0x3C, 0xFC, 0x99, 0xE9, 0xE3, 0x16,
+ 0x50, 0xC1, 0x21, 0x7B, 0x62, 0x48, 0x16, 0xCD, 0xAD, 0x9A, 0x95, 0xF9,
+ 0xD5, 0xB8, 0x01, 0x94, 0x88, 0xD9, 0xC0, 0xA0, 0xA1, 0xFE, 0x30, 0x75,
+ 0xA5, 0x77, 0xE2, 0x31, 0x83, 0xF8, 0x1D, 0x4A, 0x3F, 0x2F, 0xA4, 0x57,
+ 0x1E, 0xFC, 0x8C, 0xE0, 0xBA, 0x8A, 0x4F, 0xE8, 0xB6, 0x85, 0x5D, 0xFE,
+ 0x72, 0xB0, 0xA6, 0x6E, 0xDE, 0xD2, 0xFB, 0xAB, 0xFB, 0xE5, 0x8A, 0x30,
+ 0xFA, 0xFA, 0xBE, 0x1C, 0x5D, 0x71, 0xA8, 0x7E, 0x2F, 0x74, 0x1E, 0xF8,
+ 0xC1, 0xFE, 0x86, 0xFE, 0xA6, 0xBB, 0xFD, 0xE5, 0x30, 0x67, 0x7F, 0x0D,
+ 0x97, 0xD1, 0x1D, 0x49, 0xF7, 0xA8, 0x44, 0x3D, 0x08, 0x22, 0xE5, 0x06,
+ 0xA9, 0xF4, 0x61, 0x4E, 0x01, 0x1E, 0x2A, 0x94, 0x83, 0x8F, 0xF8, 0x8C,
+ 0xD6, 0x8C, 0x8B, 0xB7, 0xC5, 0xC6, 0x42, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF};
+
+/* safe primes that aren't already known. These primes should pass, but
+ * take more processing in FIPS mode */
+static const unsigned char prime_safe_1536[] = {
+ 0xf7, 0x67, 0x31, 0xc8, 0x45, 0x6a, 0xd9, 0xea, 0x53, 0x0b, 0x21, 0xc7,
+ 0x4a, 0xfa, 0x81, 0x66, 0x76, 0x5c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 0x58, 0xcb, 0xe0, 0xd4, 0xa9, 0xe5, 0x1a, 0x3b, 0x84, 0x7e,
+ 0x19, 0x87, 0xad, 0x67, 0xcd, 0x9b, 0x97, 0xb0, 0x32, 0xd7, 0xb8, 0x1e,
+ 0x96, 0x69, 0x75, 0x0f, 0x61, 0x69, 0xb3, 0xc9, 0xce, 0x73, 0x7c, 0x5f,
+ 0xd5, 0x08, 0xdf, 0xd4, 0x07, 0x75, 0x60, 0xd7, 0x50, 0x52, 0xe7, 0x5c,
+ 0x6f, 0x04, 0x59, 0x65, 0xbd, 0x70, 0x99, 0x15, 0xf9, 0xbc, 0x34, 0x78,
+ 0x6a, 0x64, 0xac, 0x5f, 0x07, 0xc2, 0x89, 0x88, 0xfe, 0x11, 0x7a, 0xf7,
+ 0x3d, 0xbe, 0x83, 0xff, 0xeb, 0x1d, 0x52, 0xbe, 0xd4, 0x09, 0x71, 0x0f,
+ 0x7c, 0x95, 0x19, 0xf2, 0x4b, 0xf5, 0x44, 0x63, 0xf2, 0xec, 0x3f, 0xf9,
+ 0xe4, 0xfb, 0xbe, 0x24, 0xb2, 0x18, 0x53, 0xce, 0x16, 0x40, 0x1e, 0x27,
+ 0x62, 0x99, 0x93, 0xc9, 0x49, 0x8f, 0x98, 0x0d, 0xd8, 0x73, 0x65, 0x99,
+ 0xac, 0xff, 0xfe, 0x22, 0x6a, 0xd1, 0xfb, 0xa1, 0xe4, 0xe7, 0xab, 0x3c,
+ 0x72, 0x10, 0xac, 0x73};
+
+/* Weak primes with value subprimes. Accepted, but takes more processing
+ * in both modes. */
+static const unsigned char prime_weak_1024[] = {
+ 0xe4, 0x82, 0x09, 0x4a, 0x6b, 0xbe, 0x9b, 0x51, 0x11, 0xa0, 0x74, 0x25,
+ 0xff, 0x50, 0x1c, 0x0a, 0xd6, 0xd0, 0xbc, 0xd3, 0x24, 0x89, 0x75, 0x74,
+ 0xb3, 0xd6, 0x6b, 0xf4, 0xc7, 0x5f, 0x6a, 0xec, 0x1e, 0x3a, 0x20, 0x02,
+ 0x16, 0x75, 0xcc, 0x44, 0x4a, 0xbf, 0x5b, 0x58, 0xad, 0xfe, 0xb0, 0x18,
+ 0x6a, 0x38, 0x8b, 0xcb, 0xdb, 0xd1, 0x77, 0x42, 0xe3, 0xa3, 0x87, 0x8a,
+ 0x99, 0x2e, 0x11, 0xd8, 0xc9, 0x02, 0x84, 0x1d, 0xd2, 0x67, 0x28, 0xbd,
+ 0x8f, 0xfb, 0x56, 0xf2, 0x63, 0x8a, 0x2c, 0x7c, 0x38, 0xef, 0xa2, 0x0c,
+ 0x6a, 0x36, 0xd0, 0x99, 0x13, 0x47, 0x48, 0x40, 0xe5, 0xcd, 0xdb, 0x04,
+ 0x4c, 0xa2, 0x12, 0x3f, 0x1a, 0x9b, 0x9a, 0x0e, 0xb8, 0x68, 0x7d, 0x01,
+ 0xbc, 0x16, 0x6f, 0x51, 0x64, 0x1d, 0xab, 0x21, 0x75, 0x49, 0x12, 0x36,
+ 0xac, 0x65, 0x8b, 0xf8, 0x87, 0xd9, 0xaf, 0xd1};
+
+static const unsigned char subprime_weak_1024[] = {
+ 0xef, 0x0c, 0x17, 0x60, 0xd1, 0x91, 0x8f, 0xea, 0x4d, 0xbe,
+ 0x0a, 0xb2, 0x37, 0xcc, 0x6b, 0xba, 0x97, 0x98, 0x2d, 0x4b};
+
+static const unsigned char base_weak_1024[] = {
+ 0x5a, 0x70, 0x8b, 0xe1, 0x1d, 0xed, 0x69, 0x04, 0xd0, 0xdc, 0xda, 0x84,
+ 0x9e, 0x79, 0x56, 0x11, 0x44, 0xdc, 0xf7, 0xb8, 0x84, 0x88, 0x75, 0x67,
+ 0xba, 0x80, 0x5b, 0x7e, 0x50, 0xc1, 0x5c, 0x80, 0x59, 0xaa, 0x55, 0x24,
+ 0x44, 0x6a, 0x8a, 0x31, 0x20, 0x1a, 0xd4, 0xba, 0x5f, 0x32, 0xc6, 0x5d,
+ 0x9d, 0x0e, 0x58, 0xfc, 0xd0, 0x6c,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x39, 0x49, 0x49, 0xaa,
+ 0xe7, 0x98, 0x01, 0xa2, 0x2e, 0x0a, 0x33, 0x82, 0x9e, 0xb9, 0x24, 0xb7,
+ 0x80, 0xdf, 0xd3, 0xdf, 0x04, 0xe4, 0x50, 0x9d};
+
+#ifdef NSS_SOFTOKEN_DH_INCLUDE_SLOW
+static const unsigned char subprime_weak_4096[] = {
+ 0xcf, 0xd9, 0x38, 0x6d, 0x5b, 0x8d, 0x82, 0x9d, 0xa8, 0xe7, 0x9f,
+ 0x21, 0x46, 0xcc, 0x15, 0xea, 0x61, 0x31, 0x13, 0x5d, 0x50, 0xcd,
+ 0x99, 0x26, 0xf9, 0x44, 0x28, 0x44, 0xc8, 0xae, 0xb7, 0x8f};
+#endif
+
+static const unsigned char base_weak_4096[] = {
+ 0x55, 0xa1, 0x9d, 0x92, 0x16, 0x3d, 0x9c, 0xfa, 0xd7, 0x7c, 0x71, 0xea,
+ 0x29, 0x53, 0x9b, 0xdc, 0x8e, 0xa6, 0xbb, 0x06, 0xd5, 0x00, 0x5d, 0x6c,
+ 0x8e, 0x5d, 0x44, 0xb9, 0x13, 0x4b, 0x20, 0x92, 0x6d, 0x39, 0x9d, 0x34,
+ 0xaf, 0x9b, 0x12, 0x1d, 0xc5, 0xea, 0xb2, 0x89, 0x05, 0xa6, 0x49, 0x9f,
+ 0xd8, 0xf4, 0xba, 0x33, 0xab, 0x28, 0xf2, 0x2f, 0xf6, 0x49, 0x37, 0x0e,
+ 0xb2, 0xc6, 0x41, 0x8c, 0x91, 0x97, 0x07, 0xf8, 0xa3, 0x88, 0x12, 0x6b,
+ 0xe8, 0x85, 0x0e, 0x26, 0x0a, 0x79, 0xe2, 0x48, 0x1c, 0x5c, 0xee, 0x99,
+ 0x4b, 0xd1, 0xf7, 0xe8, 0xff, 0xae, 0x5b, 0xd1, 0xf4, 0x5e, 0x6a, 0x09,
+ 0xc2, 0xa0, 0xc3, 0x14, 0xe3, 0xc6, 0x25, 0x3e, 0xe4, 0x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d2, 0x14, 0xcd, 0x47, 0x85, 0x9f, 0x86, 0xd7, 0xde, 0xaa, 0x1e, 0x0e,
+ 0x71, 0x13, 0xec, 0xfe, 0x7c, 0x69, 0xbf, 0x22, 0xf0, 0x61, 0x50, 0x97,
+ 0x77, 0xc2, 0x2b, 0x31, 0x89, 0x11, 0xd6, 0x08, 0xb1, 0xd4, 0xce, 0xba,
+ 0xa0, 0x16, 0x9c, 0x2b, 0x8b, 0x3e, 0x17, 0xd8, 0xea, 0xe1, 0xf1, 0x20,
+ 0x7f, 0x3e, 0x76, 0x9f, 0x2f, 0x46, 0xc3, 0xaf, 0xc4, 0xba, 0xc9, 0x63,
+ 0xf7, 0xbb, 0x98, 0x6d, 0x60, 0x16, 0x04, 0x14, 0xc2, 0xed, 0x2e, 0xc3,
+ 0x00, 0x4f, 0x8f, 0x9d, 0xc6, 0xd9, 0xcd, 0xc1, 0xab, 0x4e, 0x67, 0xed,
+ 0xf8, 0xd2, 0x62, 0x13, 0xfa, 0x11, 0x31, 0xbb, 0x08, 0xdd, 0x4e, 0x89,
+ 0x4a, 0xff, 0x07, 0x89, 0xb5, 0x6c, 0xc3, 0xfe, 0x76, 0x6d, 0x10, 0x4c,
+ 0x1e, 0x10, 0x55, 0x22, 0x95, 0xfe, 0x09, 0xa5, 0x6e, 0x73, 0x0c, 0x2b};
+
+#ifdef NSS_SOFTOKEN_DH_INCLUDE_SLOW
+static const unsigned char subprime_weak_6144[] = {
+ 0xa8, 0x61, 0x65, 0x91, 0xb2, 0x43, 0xe3, 0x04, 0x25, 0x77, 0xb0,
+ 0x5a, 0xc5, 0xb1, 0x50, 0x19, 0x31, 0x2a, 0xd4, 0x79, 0x93, 0xc4,
+ 0x90, 0x9b, 0x27, 0xf1, 0x1e, 0xbb, 0x6e, 0x08, 0x98, 0xb1};
+#endif
+
+static const unsigned char base_weak_6144[] = {
+ 0x34, 0xc2, 0xb2, 0x1f, 0xd9, 0x4e, 0xb6, 0xfd, 0x6c, 0x01, 0x47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c8, 0x98, 0xce, 0x7a, 0xef,
+ 0x1d, 0xa6, 0x09, 0x3a, 0xff, 0xf7, 0x68, 0xd9, 0xb8, 0xe9, 0x7e, 0x8a,
+ 0xec, 0x23, 0x01, 0x97};
+
+#ifdef NSS_SOFTOKEN_DH_INCLUDE_SLOW
+static const unsigned char subprime_weak_8192[] = {
+ 0xe2, 0x48, 0x2e, 0xe9, 0x45, 0x85, 0xe1, 0x01, 0x91, 0x3b, 0xd1,
+ 0x15, 0x16, 0xb4, 0xf5, 0x5b, 0x2c, 0xb4, 0xae, 0x42, 0x61, 0x7a,
+ 0xd9, 0x26, 0x39, 0x12, 0xd2, 0x46, 0xb3, 0x46, 0x9b, 0x5f};
+#endif
+
+static const unsigned char base_weak_8192[] = {
+ 0x78, 0x4d, 0x5d, 0xa1, 0xce, 0x9d, 0x68, 0xae, 0x47, 0x31, 0x81, 0x08,
+ 0x8c, 0x24, 0x38, 0x6a, 0xc8, 0xc7, 0xf4, 0x1c, 0xa1, 0xcb, 0x5d, 0x65,
+ 0x04, 0x6e, 0x0d, 0xbe, 0x55, 0x1d, 0x25, 0xc2, 0xca, 0x74, 0x99, 0x66,
+ 0x67, 0x75, 0x00, 0xd6, 0x12, 0x90, 0x7f, 0x44, 0x56, 0x40, 0x98, 0x23,
+ 0x30, 0x87, 0x7b, 0x02, 0x86, 0xc1, 0xb3, 0x1b, 0x83, 0x82, 0xdb, 0x5b,
+ 0xa6, 0x72, 0x90, 0x77, 0xf9, 0x63, 0x9d, 0xb4, 0xe0, 0x83, 0x5e, 0x04,
+ 0x1d, 0x7b, 0x25, 0x68, 0x67, 0xa4, 0xb2, 0x4e, 0x5a, 0xde, 0x1f, 0x48,
+ 0x01, 0x10, 0xde, 0xde, 0xa9, 0xc3, 0x14, 0xc5, 0x9c, 0xda, 0xbe, 0xd9,
+ 0x19, 0x91, 0x43, 0x4a, 0xaa, 0x77, 0xcc, 0xbb, 0xe0, 0xe7, 0x71, 0xa9,
+ 0xa2, 0x73, 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0x5c, 0xcb, 0x6c, 0xcd, 0x66, 0x65, 0xe2, 0x94, 0xb2, 0xb1, 0xf4, 0x52,
+ 0x75, 0xed, 0x32, 0x8c, 0x08, 0xa1, 0x86, 0x53, 0x01, 0x6f, 0x52, 0x78,
+ 0xda, 0x20, 0x6e, 0x6a};
+/* Calculated subprimes to verify primes are safe primes */
+
+/* q=(p-1)/2 for prime prime_ike_1536 */
+static const unsigned char sub2_prime_ike_1536[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x87, 0xed, 0x51,
+ 0x10, 0xb4, 0x61, 0x1a, 0x62, 0x63, 0x31, 0x45, 0xc0, 0x6e, 0x0e, 0x68,
+ 0x94, 0x81, 0x27, 0x04, 0x45, 0x33, 0xe6, 0x3a, 0x01, 0x05, 0xdf, 0x53,
+ 0x1d, 0x89, 0xcd, 0x91, 0x28, 0xa5, 0x04, 0x3c, 0xc7, 0x1a, 0x02, 0x6e,
+ 0xf7, 0xca, 0x8c, 0xd9, 0xe6, 0x9d, 0x21, 0x8d, 0x98, 0x15, 0x85, 0x36,
+ 0xf9, 0x2f, 0x8a, 0x1b, 0xa7, 0xf0, 0x9a, 0xb6, 0xb6, 0xa8, 0xe1, 0x22,
+ 0xf2, 0x42, 0xda, 0xbb, 0x31, 0x2f, 0x3f, 0x63, 0x7a, 0x26, 0x21, 0x74,
+ 0xd3, 0x1b, 0xf6, 0xb5, 0x85, 0xff, 0xae, 0x5b, 0x7a, 0x03, 0x5b, 0xf6,
+ 0xf7, 0x1c, 0x35, 0xfd, 0xad, 0x44, 0xcf, 0xd2, 0xd7, 0x4f, 0x92, 0x08,
+ 0xbe, 0x25, 0x8f, 0xf3, 0x24, 0x94, 0x33, 0x28, 0xf6, 0x72, 0x2d, 0x9e,
+ 0xe1, 0x00, 0x3e, 0x5c, 0x50, 0xb1, 0xdf, 0x82, 0xcc, 0x6d, 0x24, 0x1b,
+ 0x0e, 0x2a, 0xe9, 0xcd, 0x34, 0x8b, 0x1f, 0xd4, 0x7e, 0x92, 0x67, 0xaf,
+ 0xc1, 0xb2, 0xae, 0x91, 0xee, 0x51, 0xd6, 0xcb, 0x0e, 0x31, 0x79, 0xab,
+ 0x10, 0x42, 0xa9, 0x5d, 0xcf, 0x6a, 0x94, 0x83, 0xb8, 0x4b, 0x4b, 0x36,
+ 0xb3, 0x86, 0x1a, 0xa7, 0x25, 0x5e, 0x4c, 0x02, 0x78, 0xba, 0x36, 0x04,
+ 0x65, 0x11, 0xb9, 0x93, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_ike_2048 */
+static const unsigned char sub2_prime_ike_2048[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x87, 0xed, 0x51,
+ 0x10, 0xb4, 0x61, 0x1a, 0x62, 0x63, 0x31, 0x45, 0xc0, 0x6e, 0x0e, 0x68,
+ 0x94, 0x81, 0x27, 0x04, 0x45, 0x33, 0xe6, 0x3a, 0x01, 0x05, 0xdf, 0x53,
+ 0x1d, 0x89, 0xcd, 0x91, 0x28, 0xa5, 0x04, 0x3c, 0xc7, 0x1a, 0x02, 0x6e,
+ 0xf7, 0xca, 0x8c, 0xd9, 0xe6, 0x9d, 0x21, 0x8d, 0x98, 0x15, 0x85, 0x36,
+ 0xf9, 0x2f, 0x8a, 0x1b, 0xa7, 0xf0, 0x9a, 0xb6, 0xb6, 0xa8, 0xe1, 0x22,
+ 0xf2, 0x42, 0xda, 0xbb, 0x31, 0x2f, 0x3f, 0x63, 0x7a, 0x26, 0x21, 0x74,
+ 0xd3, 0x1b, 0xf6, 0xb5, 0x85, 0xff, 0xae, 0x5b, 0x7a, 0x03, 0x5b, 0xf6,
+ 0xf7, 0x1c, 0x35, 0xfd, 0xad, 0x44, 0xcf, 0xd2, 0xd7, 0x4f, 0x92, 0x08,
+ 0xbe, 0x25, 0x8f, 0xf3, 0x24, 0x94, 0x33, 0x28, 0xf6, 0x72, 0x2d, 0x9e,
+ 0xe1, 0x00, 0x3e, 0x5c, 0x50, 0xb1, 0xdf, 0x82, 0xcc, 0x6d, 0x24, 0x1b,
+ 0x0e, 0x2a, 0xe9, 0xcd, 0x34, 0x8b, 0x1f, 0xd4, 0x7e, 0x92, 0x67, 0xaf,
+ 0xc1, 0xb2, 0xae, 0x91, 0xee, 0x51, 0xd6, 0xcb, 0x0e, 0x31, 0x79, 0xab,
+ 0x10, 0x42, 0xa9, 0x5d, 0xcf, 0x6a, 0x94, 0x83, 0xb8, 0x4b, 0x4b, 0x36,
+ 0xb3, 0x86, 0x1a, 0xa7, 0x25, 0x5e, 0x4c, 0x02, 0x78, 0xba, 0x36, 0x04,
+ 0x65, 0x0c, 0x10, 0xbe, 0x19, 0x48, 0x2f, 0x23, 0x17, 0x1b, 0x67, 0x1d,
+ 0xf1, 0xcf, 0x3b, 0x96, 0x0c, 0x07, 0x43, 0x01, 0xcd, 0x93, 0xc1, 0xd1,
+ 0x76, 0x03, 0xd1, 0x47, 0xda, 0xe2, 0xae, 0xf8, 0x37, 0xa6, 0x29, 0x64,
+ 0xef, 0x15, 0xe5, 0xfb, 0x4a, 0xac, 0x0b, 0x8c, 0x1c, 0xca, 0xa4, 0xbe,
+ 0x75, 0x4a, 0xb5, 0x72, 0x8a, 0xe9, 0x13, 0x0c, 0x4c, 0x7d, 0x02, 0x88,
+ 0x0a, 0xb9, 0x47, 0x2d, 0x45, 0x56, 0x55, 0x34, 0x7f, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_tls_2048 */
+static const unsigned char sub2_prime_tls_2048[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xfc, 0x2a, 0x2c,
+ 0x51, 0x5d, 0xa5, 0x4d, 0x57, 0xee, 0x2b, 0x10, 0x13, 0x9e, 0x9e, 0x78,
+ 0xec,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0x27, 0x89, 0x19,
+ 0x77, 0x79, 0x40, 0xc1, 0xe1, 0xff, 0x1d, 0x8d, 0xa6, 0x37, 0xd6, 0xb9,
+ 0x9d, 0xda, 0xfe, 0x5e, 0x17, 0x61, 0x10, 0x02, 0xe2, 0xc7, 0x78, 0xc1,
+ 0xbe, 0x8b, 0x41, 0xd9, 0x63, 0x79, 0xa5, 0x13, 0x60, 0xd9, 0x77, 0xfd,
+ 0x44, 0x35, 0xa1, 0x1c, 0x30, 0x94, 0x2e, 0x4b, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_ike_3072 */
+static const unsigned char sub2_prime_ike_3072[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x87, 0xed, 0x51,
+ 0x10, 0xb4, 0x61, 0x1a, 0x62, 0x63, 0x31, 0x45, 0xc0, 0x6e, 0x0e, 0x68,
+ 0x94, 0x81, 0x27, 0x04, 0x45, 0x33, 0xe6, 0x3a, 0x01, 0x05, 0xdf, 0x53,
+ 0x1d, 0x89, 0xcd, 0x91, 0x28, 0xa5, 0x04, 0x3c, 0xc7, 0x1a, 0x02, 0x6e,
+ 0xf7, 0xca, 0x8c, 0xd9, 0xe6, 0x9d, 0x21, 0x8d, 0x98, 0x15, 0x85, 0x36,
+ 0xf9, 0x2f, 0x8a, 0x1b, 0xa7, 0xf0, 0x9a, 0xb6, 0xb6, 0xa8, 0xe1, 0x22,
+ 0xf2, 0x42, 0xda, 0xbb, 0x31, 0x2f, 0x3f, 0x63, 0x7a, 0x26, 0x21, 0x74,
+ 0xd3, 0x1b, 0xf6, 0xb5, 0x85, 0xff, 0xae, 0x5b, 0x7a, 0x03, 0x5b, 0xf6,
+ 0xf7, 0x1c, 0x35, 0xfd, 0xad, 0x44, 0xcf, 0xd2, 0xd7, 0x4f, 0x92, 0x08,
+ 0xbe, 0x25, 0x8f, 0xf3, 0x24, 0x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, 0x46, 0x6d, 0x84, 0x99, 0xeb, 0x8f, 0x46, 0x4a, 0x70,
+ 0x25, 0x12, 0xb0, 0xce, 0xe7, 0x71, 0xe9, 0x13, 0x0d, 0x69, 0x77, 0x35,
+ 0xf8, 0x97, 0xfd, 0x03, 0x6c, 0xc5, 0x04, 0x32, 0x6c, 0x3b, 0x01, 0x39,
+ 0x9f, 0x64, 0x35, 0x32, 0x29, 0x0f, 0x95, 0x8c, 0x0b, 0xbd, 0x90, 0x06,
+ 0x5d, 0xf0, 0x8b, 0xab, 0xbd, 0x30, 0xae, 0xb6, 0x3b, 0x84, 0xc4, 0x60,
+ 0x5d, 0x6c, 0xa3, 0x71, 0x04, 0x71, 0x27, 0xd0, 0x3a, 0x72, 0xd5, 0x98,
+ 0xa1, 0xed, 0xad, 0xfe, 0x70, 0x7e, 0x88, 0x47, 0x25, 0xc1, 0x68, 0x90,
+ 0x54, 0x9d, 0x69, 0x65, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_tls_3072 */
+static const unsigned char sub2_prime_tls_3072[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xfc, 0x2a, 0x2c,
+ 0x51, 0x5d, 0xa5, 0x4d, 0x57, 0xee, 0x2b, 0x10, 0x13, 0x9e, 0x9e, 0x78,
+ 0xec, 0x5c, 0xe2, 0xc1, 0xe7, 0x16, 0x9b, 0x4a, 0xd4, 0xf0, 0x9b, 0x20,
+ 0x8a, 0x32, 0x19, 0xfd, 0xe6, 0x49, 0xce, 0xe7, 0x12, 0x4d, 0x9f, 0x7c,
+ 0xbe, 0x97, 0xf1, 0xb1, 0xb1, 0x86, 0x3a, 0xec, 0x7b, 0x40, 0xd9, 0x01,
+ 0x57, 0x62, 0x30, 0xbd, 0x69, 0xef, 0x8f, 0x6a, 0xea, 0xfe, 0xb2, 0xb0,
+ 0x92, 0x19, 0xfa, 0x8f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xb2, 0x8c, 0x81, 0xad, 0xde, 0x1a, 0x7a, 0x6f, 0x7c, 0xce, 0x01, 0x1c,
+ 0x30, 0xda, 0x37, 0xe4, 0xeb, 0x73, 0x64, 0x83, 0xbd, 0x6c, 0x8e, 0x93,
+ 0x48, 0xfb, 0xfb, 0xf7, 0x2c, 0xc6, 0x58, 0x7d, 0x60, 0xc3, 0x6c, 0x8e,
+ 0x57, 0x7f, 0x09, 0x84, 0xc2, 0x89, 0xc9, 0x38, 0x5a, 0x09, 0x86, 0x49,
+ 0xde, 0x21, 0xbc, 0xa2, 0x7a, 0x7e, 0xa2, 0x29, 0x71, 0x6b, 0xa6, 0xe9,
+ 0xb2, 0x79, 0x71, 0x0f, 0x38, 0xfa, 0xa5, 0xff, 0xae, 0x57, 0x41, 0x55,
+ 0xce, 0x4e, 0xfb, 0x4f, 0x74, 0x36, 0x95, 0xe2, 0x91, 0x1b, 0x1d, 0x06,
+ 0xd5, 0xe2, 0x90, 0xcb, 0xcd, 0x86, 0xf5, 0x6d, 0x0e, 0xdf, 0xcd, 0x21,
+ 0x6a, 0xe2, 0x24, 0x27, 0x05, 0x5e, 0x68, 0x35, 0xfd, 0x29, 0xee, 0xf7,
+ 0x9e, 0x0d, 0x90, 0x77, 0x1f, 0xea, 0xce, 0xbe, 0x12, 0xf2, 0x0e, 0x95,
+ 0xb3, 0x63, 0x17, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_ike_4096 */
+static const unsigned char sub2_prime_ike_4096[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x87, 0xed, 0x51,
+ 0x10, 0xb4, 0x61, 0x1a, 0x62, 0x63, 0x31, 0x45, 0xc0, 0x6e, 0x0e, 0x68,
+ 0x94, 0x81, 0x27, 0x04, 0x45, 0x33, 0xe6, 0x3a, 0x01, 0x05, 0xdf, 0x53,
+ 0x1d, 0x89, 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0xe1, 0x93, 0x8c,
+ 0x35, 0x7a, 0x71, 0x1e, 0x0d, 0x4a, 0x34, 0x1a, 0x5b, 0x0a, 0x85, 0xed,
+ 0x12, 0xc1, 0xf4, 0xe5, 0x15, 0x6a, 0x26, 0x74, 0x6d, 0xdd, 0xe1, 0x6d,
+ 0x82, 0x6f, 0x47, 0x7c, 0x97, 0x47, 0x7e, 0x0a, 0x0f, 0xdf, 0x65, 0x53,
+ 0x14, 0x3e, 0x2c, 0xa3, 0xa7, 0x35, 0xe0, 0x2e, 0xcc, 0xd9, 0x4b, 0x27,
+ 0xd0, 0x48, 0x61, 0xd1, 0x11, 0x9d, 0xd0, 0xc3, 0x28, 0xad, 0xf3, 0xf6,
+ 0x8f, 0xb0, 0x94, 0xb8, 0x67, 0x71, 0x6b, 0xd7, 0xdc, 0x0d, 0xee, 0xbb,
+ 0x10, 0xb8, 0x24, 0x0e, 0x68, 0x03, 0x48, 0x93, 0xea, 0xd8, 0x2d, 0x54,
+ 0xc9, 0xda, 0x75, 0x4c, 0x46, 0xc7, 0xee, 0xe0, 0xc3, 0x7f, 0xdb, 0xee,
+ 0x48, 0x53, 0x60, 0x47, 0xa6, 0xfa, 0x1a, 0xe4, 0x9a, 0x03, 0x18, 0xcc,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_tls_4096 */
+static const unsigned char sub2_prime_tls_4096[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xfc, 0x2a, 0x2c,
+ 0x51, 0x5d, 0xa5, 0x4d, 0x57, 0xee, 0x2b, 0x10, 0x13, 0x9e, 0x9e, 0x78,
+ 0xec, 0x5c, 0xe2, 0xc1, 0xe7, 0x16, 0x9b, 0x4a, 0xd4, 0xf0, 0x9b, 0x20,
+ 0x8a, 0x32, 0x19, 0xfd, 0xe6, 0x49, 0xce, 0xe7, 0x12, 0x4d, 0x9f, 0x7c,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b, 0xb1, 0xe7, 0x8e, 0xaa, 0x81, 0xa0, 0x02,
+ 0x43, 0xfa, 0xad, 0xd2, 0xbf, 0x18, 0xe6, 0x3d, 0x38, 0x9a, 0xe4, 0x43,
+ 0x77, 0xda, 0x18, 0xc5, 0x76, 0xb5, 0x0f, 0x00, 0x96, 0xcf, 0x34, 0x19,
+ 0x54, 0x83, 0xb0, 0x05, 0x48, 0xc0, 0x98, 0x62, 0x36, 0xe3, 0xbc, 0x7c,
+ 0xb8, 0xd6, 0x80, 0x1c, 0x04, 0x94, 0xcc, 0xd1, 0x99, 0xe5, 0xc5, 0xbd,
+ 0x0d, 0x0e, 0xdc, 0x9e, 0xb8, 0xa0, 0x00, 0x1e, 0x15, 0x27, 0x67, 0x54,
+ 0xfc, 0xc6, 0x85, 0x66, 0x05, 0x41, 0x48, 0xe6, 0xe7, 0x64, 0xbe, 0xe7,
+ 0xc7, 0x64, 0xda, 0xad, 0x3f, 0xc4, 0x52, 0x35, 0xa6, 0xda, 0xd4, 0x28,
+ 0xfa, 0x20, 0xc1, 0x70, 0xe3, 0x45, 0x00, 0x3f, 0x2f, 0x32, 0xaf, 0xb5,
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_ike_6144 */
+static const unsigned char sub2_prime_ike_6144[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x87, 0xed, 0x51,
+ 0x10, 0xb4, 0x61, 0x1a, 0x62, 0x63, 0x31, 0x45, 0xc0, 0x6e, 0x0e, 0x68,
+ 0x94, 0x81, 0x27, 0x04, 0x45, 0x33, 0xe6, 0x3a, 0x01, 0x05, 0xdf, 0x53,
+ 0x1d, 0x89, 0xcd, 0x91, 0x28, 0xa5, 0x04, 0x3c, 0xc7, 0x1a, 0x02, 0x6e,
+ 0xf7, 0xca, 0x8c, 0xd9, 0xe6, 0x9d, 0x21, 0x8d, 0x98, 0x15,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0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_tls_6144 */
+static const unsigned char sub2_prime_tls_6144[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xfc, 0x2a, 0x2c,
+ 0x51, 0x5d, 0xa5, 0x4d, 0x57, 0xee, 0x2b, 0x10, 0x13, 0x9e, 0x9e, 0x78,
+ 0xec, 0x5c, 0xe2, 0xc1, 0xe7, 0x16, 0x9b, 0x4a, 0xd4, 0xf0, 0x9b, 0x20,
+ 0x8a, 0x32, 0x19, 0xfd, 0xe6, 0x49, 0xce, 0xe7, 0x12, 0x4d, 0x9f, 0x7c,
+ 0xbe, 0x97, 0xf1, 0xb1, 0xb1, 0x86, 0x3a, 0xec, 0x7b, 0x40, 0xd9, 0x01,
+ 0x57, 0x62, 0x30, 0xbd, 0x69, 0xef, 0x8f, 0x6a, 0xea, 0xfe, 0xb2, 0xb0,
+ 0x92, 0x19, 0xfa, 0x8f, 0xaf, 0x83, 0x37, 0x68, 0x42, 0xb1, 0xb2, 0xaa,
+ 0x9e, 0xf6, 0x8d, 0x79, 0xda, 0xab, 0x89, 0xaf, 0x3f, 0xab, 0xe4, 0x9a,
+ 0xcc, 0x27, 0x86, 0x38, 0x70, 0x73, 0x45, 0xbb, 0xf1, 0x53, 0x44, 0xed,
+ 0x79, 0xf7, 0xf4, 0x39, 0x0e, 0xf8, 0xac, 0x50, 0x9b, 0x56, 0xf3, 0x9a,
+ 0x98, 0x56, 0x65, 0x27, 0xa4, 0x1d, 0x3c, 0xbd, 0x5e, 0x05, 0x58, 0xc1,
+ 0x59, 0x92, 0x7d, 0xb0, 0xe8, 0x84, 0x54, 0xa5, 0xd9, 0x64, 0x71, 0xfd,
+ 0xdc, 0xb5, 0x6d, 0x5b, 0xb0, 0x6b, 0xfa, 0x34, 0x0e, 0xa7, 0xa1, 0x51,
+ 0xef, 0x1c, 0xa6, 0xfa, 0x57, 0x2b, 0x76, 0xf3, 0xb1,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 0x72, 0x4f, 0xa9, 0x1a, 0xe4, 0xad, 0xc8, 0x8b, 0xc6, 0x67, 0x96, 0xea,
+ 0xe5, 0x67, 0x7a, 0x01, 0xf6, 0x4e, 0x8c, 0x08, 0x63, 0x13, 0x95, 0x82,
+ 0x2d, 0x9d, 0xb8, 0xfc, 0xee, 0x35, 0xc0, 0x6b, 0x1f, 0xee, 0xa5, 0x47,
+ 0x4d, 0x6d, 0x8f, 0x34, 0xb1, 0x53, 0x4a, 0x93, 0x6a, 0x18, 0xb0, 0xe0,
+ 0xd2, 0x0e, 0xab, 0x86, 0xbc, 0x9c, 0x6d, 0x6a, 0x52, 0x07, 0x19, 0x4e,
+ 0x68, 0x72, 0x07, 0x32, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_ike_8192 */
+static const unsigned char sub2_prime_ike_8192[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x87, 0xed, 0x51,
+ 0x10, 0xb4, 0x61, 0x1a, 0x62, 0x63, 0x31, 0x45, 0xc0, 0x6e, 0x0e, 0x68,
+ 0x94, 0x81, 0x27, 0x04, 0x45, 0x33, 0xe6, 0x3a, 0x01, 0x05, 0xdf, 0x53,
+ 0x1d, 0x89, 0xcd, 0x91, 0x28, 0xa5, 0x04, 0x3c, 0xc7, 0x1a, 0x02, 0x6e,
+ 0xf7, 0xca, 0x8c, 0xd9, 0xe6, 0x9d, 0x21, 0x8d, 0x98, 0x15, 0x85, 0x36,
+ 0xf9, 0x2f, 0x8a, 0x1b, 0xa7, 0xf0, 0x9a, 0xb6, 0xb6, 0xa8, 0xe1, 0x22,
+ 0xf2, 0x42, 0xda, 0xbb, 0x31, 0x2f, 0x3f, 0x63, 0x7a, 0x26, 0x21, 0x74,
+ 0xd3, 0x1b, 0xf6, 0xb5, 0x85, 0xff, 0xae, 0x5b, 0x7a, 0x03, 0x5b, 0xf6,
+ 0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, 0x01, 0x37, 0x23,
+ 0xca, 0xac, 0x72, 0x23, 0xab, 0x3b, 0xf4, 0xd5, 0x4f, 0x18, 0x28, 0x71,
+ 0x3b, 0x2b, 0x4a, 0x6f, 0xe4, 0x0f, 0xab, 0x74, 0x40, 0x5c, 0xb7, 0x38,
+ 0xb0, 0x64, 0xc0, 0x6e, 0xcc, 0x76, 0xe9, 0xef, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_tls_8192 */
+static const unsigned char sub2_prime_tls_8192[] = {
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xfc, 0x2a, 0x2c,
+ 0x51, 0x5d, 0xa5, 0x4d, 0x57, 0xee, 0x2b, 0x10, 0x13, 0x9e, 0x9e, 0x78,
+ 0xec, 0x5c, 0xe2, 0xc1, 0xe7, 0x16, 0x9b, 0x4a, 0xd4, 0xf0, 0x9b, 0x20,
+ 0x8a, 0x32, 0x19, 0xfd, 0xe6, 0x49, 0xce, 0xe7, 0x12, 0x4d, 0x9f, 0x7c,
+ 0xbe, 0x97, 0xf1, 0xb1, 0xb1, 0x86, 0x3a, 0xec, 0x7b, 0x40, 0xd9, 0x01,
+ 0x57, 0x62, 0x30, 0xbd, 0x69, 0xef, 0x8f, 0x6a, 0xea, 0xfe, 0xb2, 0xb0,
+ 0x92, 0x19, 0xfa, 0x8f, 0xaf, 0x83, 0x37, 0x68, 0x42, 0xb1, 0xb2, 0xaa,
+ 0x9e, 0xf6, 0x8d, 0x79, 0xda, 0xab, 0x89, 0xaf, 0x3f, 0xab, 0xe4, 0x9a,
+ 0xcc, 0x27, 0x86, 0x38, 0x70, 0x73, 0x45, 0xbb, 0xf1, 0x53, 0x44, 0xed,
+ 0x79, 0xf7, 0xf4, 0x39, 0x0e, 0xf8, 0xac, 0x50, 0x9b, 0x56, 0xf3, 0x9a,
+ 0x98, 0x56, 0x65, 0x27, 0xa4,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x6b, 0x46, 0x45, 0xdb, 0xe2, 0xe3, 0x21, 0x26, 0x7f, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+};
+
+/* q=(p-1)/2 for prime prime_safe_1536 */
+static const unsigned char sub2_prime_safe_1536[] = {
+ 0x7b, 0xb3, 0x98, 0xe4, 0x22, 0xb5, 0x6c, 0xf5, 0x29, 0x85, 0x90, 0xe3,
+ 0xa5, 0x7d, 0x40, 0xb3, 0x3b, 0x2e, 0x75, 0x5b, 0xfa, 0x88, 0x99, 0x36,
+ 0xe9, 0xa6, 0x3d, 0x56, 0x1c, 0x8b, 0x8d, 0x43, 0xdc, 0x00, 0x6b, 0x88,
+ 0xe2, 0xfe, 0xf0, 0xf1, 0xb2, 0xa6, 0x0f, 0xa1, 0x12, 0x20, 0x8f, 0x49,
+ 0x21, 0x5f, 0xdb, 0x32, 0x87, 0x39, 0x41, 0xc5, 0x5c, 0x41, 0x53, 0x27,
+ 0xcf, 0x65, 0x27, 0xe8, 0xd8, 0x89, 0xe1, 0x7d, 0x33, 0xd0, 0xb5, 0x03,
+ 0x27, 0xd7, 0xb7, 0x0b, 0x6c, 0xca, 0x6c, 0x6d, 0x71, 0xb3, 0x31, 0x00,
+ 0x8f, 0xc1, 0x47, 0x88, 0x70, 0x17, 0x9e, 0x51, 0xa1, 0x54, 0x5d, 0xca,
+ 0x19, 0x3c, 0xbc, 0xbf, 0xcb, 0xfc, 0x1d, 0x18, 0xd5, 0x0a, 0x63, 0xff,
+ 0x09, 0xcb, 0x3b, 0x8a, 0xdf, 0xa3, 0x90, 0x2b, 0x88, 0xf0, 0x27, 0xed,
+ 0x3f, 0x54, 0x8c, 0xa4, 0xd0, 0xc6, 0x94, 0xbb, 0x45, 0x69, 0xcd, 0xd8,
+ 0x5f, 0x28, 0x61, 0x92, 0xc1, 0x7c, 0xf1, 0x90, 0xc6, 0x7e, 0xd3, 0x28,
+ 0xf2, 0x9b, 0x3f, 0x41, 0x5b, 0x48, 0x22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0x32, 0xa3, 0x46, 0x43, 0xe9, 0x4c, 0xc1, 0x6f,
+ 0xc7, 0x00, 0x44, 0xf9, 0x86, 0xea, 0xe0, 0x2a, 0x4a, 0x63, 0x51, 0xc9,
+ 0x07, 0xc8, 0x88, 0x77, 0x51, 0xb2, 0xa2, 0x5b, 0xb6, 0xf4, 0x11, 0xfc,
+ 0xbf, 0xc8, 0xb1, 0x32, 0x84, 0xc7, 0x50, 0x99, 0xea, 0x6b, 0x2a, 0x85,
+ 0x60, 0x74, 0x33, 0x38, 0x02, 0xe8, 0x09, 0x1a, 0x60, 0xfe, 0xe7, 0x3a,
+ 0xd2, 0x3a, 0xf0, 0xa3, 0x50, 0x84, 0x5a, 0x29, 0x7f, 0x12, 0xd2, 0x62,
+ 0xa7, 0x91, 0x82, 0x3f, 0x50, 0x96, 0x79, 0xab, 0x65, 0xfd, 0x3d, 0x5e,
+ 0x22, 0xe6, 0x3c, 0x59, 0x94, 0x79, 0xf2, 0xea, 0x93, 0x2b, 0x13, 0xc3,
+ 0x35, 0x2b, 0x35, 0xc3, 0xab, 0x07, 0x62, 0x1e, 0x76, 0xff, 0xe5, 0xcb,
+ 0x5a, 0x09, 0x8e, 0xa6, 0x9c, 0x27, 0x34, 0x9a, 0x28, 0xbd, 0x42, 0x98,
+ 0xda, 0x40, 0x6d, 0x20, 0xf1, 0xee, 0x17, 0x29, 0xec, 0x38, 0x9f, 0x66,
+ 0x1b, 0xc5, 0x40, 0x19,
+};
+
+/* q=(p-1)/2 for prime prime_safe_3072 */
+static const unsigned char sub2_prime_safe_3072[] = {
+ 0x43, 0xb3, 0x6f, 0xfb, 0xf6, 0x24, 0xb5, 0x4d, 0x3e, 0x4b, 0x14, 0x57,
+ 0x33, 0x9c, 0x55, 0xfd, 0x7f, 0x2e, 0x23, 0x3d, 0xf7, 0xf4, 0x8c, 0x53,
+ 0x3b, 0x59, 0x72, 0x87, 0x5f, 0x5c, 0x79, 0x40, 0x1b, 0x04, 0xc1, 0x22,
+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1)/2 for prime prime_safe_4096 */
+static const unsigned char sub2_prime_safe_4096[] = {
+ 0x45, 0xef, 0xe0, 0xd1, 0xf2, 0x5e, 0x8e, 0x58, 0xfa, 0x58, 0xa8, 0xe9,
+ 0xc5, 0x67, 0x1e, 0x99, 0xac, 0x40, 0x51, 0x8e, 0x3e, 0x06, 0xde, 0xc7,
+ 0x5e, 0xd9, 0xf3, 0xcf, 0x6a, 0x6f, 0x03, 0x7e, 0x4c, 0x57, 0x80, 0xa1,
+ 0xc9, 0x96, 0x7e, 0x7d, 0xc9, 0x40, 0x70, 0x37, 0x7c, 0xfb, 0x55, 0xb9,
+ 0xcb, 0x46, 0xbf, 0x60, 0x75, 0x93, 0x36, 0x06, 0x29, 0x83, 0x4f, 0x99,
+ 0x25, 0xd6, 0xa9, 0xea, 0xdf, 0xc8, 0x9a, 0x8b, 0x7e, 0xbf, 0xdd, 0x18,
+ 0x5b, 0x5a, 0x44, 0x08, 0x0f, 0xad, 0x60, 0x31, 0x7c, 0xbf, 0xb8, 0xcd,
+ 0xda, 0x88, 0x25, 0xcc, 0xe8, 0x78, 0x74, 0xe1, 0x77, 0x1a, 0x92, 0x75,
+ 0xe6, 0x77, 0x03, 0x5f, 0xd0, 0x02, 0xf2, 0x30, 0xd2, 0x53, 0x4c, 0x11,
+ 0xe8, 0x72, 0x45, 0x30, 0xe5, 0x02, 0xc5, 0x36, 0x4c, 0x7d, 0x41, 0xe1,
+ 0xa8, 0x3e, 0xaa, 0x9d, 0x97, 0x6a, 0xd6, 0x0a, 0x30, 0xc3, 0x68, 0xda,
+ 0xe7, 0xe0, 0x6e, 0x34, 0xa5, 0xb6, 0x25, 0x62, 0xeb, 0xff, 0x70, 0x74,
+ 0x0d, 0x32, 0x08, 0xed, 0xab, 0x78, 0x0e, 0x4a, 0xae, 0x68, 0xb5, 0x5c,
+ 0xfb, 0x71, 0x00, 0x7a, 0x11, 0x01, 0x81, 0x95, 0x5e, 0x4e, 0x41, 0x75,
+ 0xc4, 0x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0x5a,
+ 0xdf, 0xd0, 0xf3, 0xc9, 0xa8, 0x0a, 0x84, 0x13, 0x93, 0x9e, 0x66, 0x29,
+ 0xc1, 0x33, 0xea, 0x79, 0x06, 0x93, 0x30, 0x43, 0x82, 0x97, 0x55, 0x31,
+ 0x2a, 0xe6, 0x4d, 0x77, 0x16, 0x10, 0x11, 0x8a, 0x7d, 0x2e, 0x14, 0xa0,
+ 0xf0, 0xc4, 0xc1, 0x8c, 0xe0, 0x9b, 0x46, 0x52, 0x48, 0xfb, 0x20, 0x1b,
+ 0xb8, 0x15, 0x06, 0xc1, 0x5d, 0xab, 0x37, 0x11, 0x9a, 0x5c, 0xb7, 0x19,
+};
+
+/* q=(p-1)/2 for prime prime_safe_8192 */
+static const unsigned char sub2_prime_safe_8192[] = {
+ 0x4d, 0xd3, 0xcd, 0xd1, 0x43, 0x2a, 0x73, 0xcc, 0x88, 0xad, 0x9a, 0xc0,
+ 0xea, 0xbd, 0x45, 0x37, 0x26, 0xa6, 0xb0, 0xae, 0xe9, 0xe7, 0x86, 0x32,
+ 0xbf, 0x6d, 0x6c, 0x67, 0x14, 0x56, 0x50, 0x1c, 0x40, 0xf7, 0x50, 0x8a,
+ 0x12, 0x90, 0xb3, 0xb3, 0x1d, 0x36, 0x07, 0xc0, 0x1e, 0xc4, 0xbc, 0xff,
+ 0x38, 0xa1, 0xab, 0xe1, 0xd4, 0xaa, 0x0f, 0x10, 0x45, 0x77, 0x07, 0xd3,
+ 0x45, 0xc4, 0x40, 0x9e, 0xf4, 0x2e, 0x20, 0x23, 0x82, 0xef, 0xec, 0x36,
+ 0xcc, 0x32, 0x8b, 0x54, 0xfc, 0xe2, 0x46, 0x01, 0x5d, 0x57, 0x35, 0x9b,
+ 0x3b, 0x64, 0xfd, 0x47, 0x68, 0x6b, 0xcd, 0x1e, 0x65, 0xe8, 0xa2, 0x04,
+ 0xeb, 0xa7, 0x94, 0x28, 0xca, 0x49, 0x2d, 0x81, 0x59, 0x5e, 0xbc, 0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59, 0x0c, 0x29, 0xe7, 0x0b, 0x20, 0x0f, 0x13,
+ 0xb1, 0x4c, 0xc9, 0xe4, 0xa4, 0xc7, 0xcc, 0x06, 0xec, 0x39, 0xb2, 0xcc,
+ 0xd6, 0x7f, 0xff, 0x11, 0x35, 0x68, 0xfd, 0xd0, 0xf2, 0x73, 0xd5, 0x9e,
+ 0x39, 0x08, 0x56, 0x39,
+};
+#endif
+
+/* q=(p-1)/2 for prime prime_weak_1024 */
+static const unsigned char sub2_prime_weak_1024[] = {
+ 0x72, 0x41, 0x04, 0xa5, 0x35, 0xdf, 0x4d, 0xa8, 0x88, 0xd0, 0x3a, 0x12,
+ 0xff, 0xa8, 0x0e, 0x05, 0x6b, 0x68, 0x5e, 0x69, 0x92, 0x44, 0xba, 0xba,
+ 0x59, 0xeb, 0x35, 0xfa, 0x63, 0xaf, 0xb5, 0x76, 0x0f, 0x1d, 0x10, 0x01,
+ 0x0b, 0x3a, 0xe6, 0x22, 0x25, 0x5f, 0xad, 0xac, 0x56, 0xff, 0x58, 0x0c,
+ 0x35, 0x1c, 0x45, 0xe5, 0xed, 0xe8, 0xbb, 0xa1, 0x71, 0xd1, 0xc3, 0xc5,
+ 0x4c, 0x97, 0x08, 0xec, 0x64, 0x81, 0x42, 0x0e, 0xe9, 0x33, 0x94, 0x5e,
+ 0xc7, 0xfd, 0xab, 0x79, 0x31, 0xc5, 0x16, 0x3e, 0x1c, 0x77, 0xd1, 0x06,
+ 0x35, 0x1b, 0x68, 0x4c, 0x89, 0xa3, 0xa4, 0x20, 0x72, 0xe6, 0xed, 0x82,
+ 0x26, 0x51, 0x09, 0x1f, 0x8d, 0x4d, 0xcd, 0x07, 0x5c, 0x34, 0x3e, 0x80,
+ 0xde, 0x0b, 0x37, 0xa8, 0xb2, 0x0e, 0xd5, 0x90, 0xba, 0xa4, 0x89, 0x1b,
+ 0x56, 0x32, 0xc5, 0xfc, 0x43, 0xec, 0xd7, 0xe8,
+};
+
+/* q=(p-1)/2 for prime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51, 0x6b, 0x8d, 0x21, 0x56, 0xba, 0x5e, 0xdd, 0xe7, 0x90,
+ 0xc8, 0xe9, 0x35, 0x8e, 0xce, 0xd4, 0x02, 0xc4, 0x27, 0xd8, 0xa2, 0xd1,
+ 0x43, 0x48, 0x09, 0x7e, 0xe5, 0x92, 0xf0, 0x89, 0x04, 0x23, 0x8e, 0xc1,
+ 0x96, 0x8a, 0x21, 0x10, 0x04, 0x18, 0xaa, 0x16, 0x4d, 0xa4, 0xfb, 0x5b,
+ 0x16, 0x92, 0xf5, 0x14, 0x5f, 0x89, 0x95, 0xe9, 0xa2, 0xc6, 0x81, 0x4f,
+ 0xd2, 0xd5, 0x75, 0xe0, 0x24, 0x68, 0x83, 0x73, 0x0f, 0x50, 0x1f, 0x02,
+ 0x10, 0x3c, 0xbe, 0x68, 0xe8, 0x56, 0x30, 0xc4, 0xb6, 0x1d, 0xc4, 0x51,
+ 0xaa, 0x36, 0x40, 0x2c,
+};
+
+/* q=(p-1)/2 for prime prime_weak_3072 */
+static const unsigned char sub2_prime_weak_3072[] = {
+ 0x4a, 0x19, 0x63, 0xa3, 0xa8, 0xd1, 0x81, 0xcd, 0xf9, 0x28, 0xae, 0x34,
+ 0xd7, 0x82, 0x9e, 0x3b, 0x31, 0x51, 0x76, 0x2d, 0x66, 0x6f, 0xc0, 0x79,
+ 0x96, 0xe7, 0x52, 0xd2, 0xcf, 0x16, 0xd5, 0xaf, 0xc8, 0xde, 0xc9, 0xb0,
+ 0xeb, 0xbd, 0xb8, 0xb7, 0xf9, 0xc9, 0x5f, 0xd4, 0x7e, 0x66, 0x80, 0x7a,
+ 0xa4, 0x84, 0x00, 0x46, 0x69, 0x7f, 0x25, 0x6c, 0x15, 0xb7, 0x21, 0x60,
+ 0x6c, 0x51, 0x45, 0x95, 0x8c, 0x01, 0x56, 0xf4, 0x27, 0x22, 0x04, 0x93,
+ 0x50, 0xd0, 0xe5, 0x4c, 0xf1, 0xec, 0xcd, 0x43, 0x9e, 0x41, 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xf6, 0x9e, 0x5c, 0x38,
+ 0xde, 0x84, 0x7a, 0xc4, 0xbf, 0x2f, 0x1c, 0x20, 0x6b, 0xf6, 0xbb, 0xc6,
+ 0xbd, 0x76, 0x95, 0x4f, 0xfe, 0x00, 0xfa, 0x71, 0x67, 0xed, 0x46, 0x51,
+ 0xab, 0xee, 0x0a, 0x6b, 0x50, 0xec, 0xcb, 0xdc, 0xf3, 0x7e, 0x24, 0x3a,
+ 0xa1, 0xde, 0x9d, 0xc8, 0x8b, 0x9e, 0x19, 0xe5, 0x67, 0x14, 0x84, 0x8d,
+ 0xf4, 0x4e, 0xdb, 0x3a, 0x02, 0xaf, 0x17, 0x52, 0x8e, 0xbf, 0x9d, 0x54,
+ 0x96, 0x7b, 0x26, 0xa0, 0xc8, 0x5e, 0x2b, 0x0c, 0x29, 0x01, 0x48, 0x77,
+ 0xb8, 0xff, 0x9f, 0x06, 0x7c, 0x00, 0x02, 0x03, 0xea, 0x90, 0x13, 0x6e,
+ 0xae, 0x58, 0x9b, 0x81, 0x90, 0x06, 0x5a, 0x5b, 0x1c, 0xa4, 0xa4, 0xd5,
+ 0x73, 0xcc, 0x00, 0xd1, 0x17, 0x05, 0x19, 0xc1, 0x4f, 0x5c, 0x92, 0x5b,
+ 0xc0, 0x6f, 0xe9, 0xef, 0x82, 0x72, 0x28, 0x4e,
+};
+
+#ifdef NSS_SOFTOKEN_DH_INCLUDE_SLOW
+/* q=(p-1)/2 for prime prime_weak_6144 */
+static const unsigned char sub2_prime_weak_6144[] = {
+ 0x51, 0x12, 0x4b, 0x5b, 0x10, 0xb4, 0x6a, 0xbf, 0x16, 0x30, 0x26, 0xe4,
+ 0x40, 0xac, 0xce, 0x0e, 0x38, 0x76, 0x12, 0x14, 0x5b, 0x29, 0x1b, 0x04,
+ 0xc3, 0xd5, 0x60, 0xad, 0xf2, 0xd3, 0x1f, 0x44, 0x2a, 0x02, 0xf1, 0x84,
+ 0x84, 0xe5, 0x36, 0xcd, 0xe2, 0x46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xb6, 0x61, 0xff, 0x3b, 0x36, 0x88, 0x26,
+ 0x0f, 0x08, 0x2a, 0x91, 0x4a, 0xff, 0x04, 0xd2, 0xb7, 0x39, 0x86, 0x15,
+};
+
+/* q=(p-1)/2 for prime prime_weak_8192 */
+static const unsigned char sub2_prime_weak_8192[] = {
+ 0x49, 0xef, 0xb6, 0x9b, 0xee, 0x15, 0x52, 0x55, 0xae, 0xee, 0x39, 0xa1,
+ 0x09, 0x0c, 0x47, 0x9c, 0xa3, 0xb9, 0xfa, 0x9f, 0x5e, 0x37, 0x06, 0x95,
+ 0x34, 0x2e, 0xa9, 0xa7, 0x91, 0x46, 0x54, 0x54, 0x25, 0x56, 0x35, 0x30,
+ 0x2a, 0x65, 0x0d, 0x3a, 0xed, 0x42, 0x81, 0x2f, 0x40, 0x5d, 0xcd, 0xad,
+ 0x3a, 0x4b, 0x34, 0xe1, 0x3e, 0x42, 0x0f, 0xbb, 0x06, 0xa9, 0xf2, 0x05,
+ 0x99, 0x79, 0xa5, 0xfb, 0x49, 0x2d, 0x96, 0x4c, 0x2e, 0xd4, 0xb0, 0x6e,
+ 0x0b, 0xad, 0xfd, 0xda, 0x87, 0x1c, 0x57, 0x31, 0x8b, 0x3c, 0xd2, 0x62,
+ 0xbb, 0x3a, 0x10, 0x4b, 0xad, 0xee, 0x54, 0xc4, 0x68, 0x8a, 0x23, 0x1f,
+ 0x0e, 0xf3, 0x65, 0x5a, 0x9c, 0x2b, 0xfe, 0xf5, 0xb3, 0x15, 0x7d, 0x46,
+ 0x18, 0x03, 0xf5, 0x5a, 0x5e, 0x3c, 0x99, 0x8a, 0x6f, 0xc7, 0x8e, 0xb0,
+ 0x23, 0xe3, 0x91, 0xec, 0xbf, 0xf1, 0x8e, 0x4a, 0x54, 0xdd, 0x96, 0x8d,
+ 0x9b, 0xb2, 0x10, 0x67, 0xb4, 0x29, 0x1c, 0xec, 0xb7, 0x91, 0xa8, 0x59,
+ 0x33, 0xe4, 0x23, 0xd5, 0x1c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xae, 0x9e, 0xf4, 0x15, 0x8b, 0xfd, 0x14, 0xae, 0x75,
+ 0xc9, 0x86, 0x07, 0x94, 0xb4, 0x10, 0xc9, 0xb1, 0x79, 0x70, 0xa2, 0x1c,
+ 0x34, 0x90, 0xab, 0xc3, 0x38, 0xb5, 0x9e, 0x89, 0x27, 0x14, 0x6d, 0x85,
+ 0xea, 0x16, 0x62, 0xf4, 0x2f, 0xcd, 0xe9, 0x13, 0x04, 0x22, 0xd2, 0x59,
+ 0x58, 0xaf, 0x68, 0x8c, 0x1f, 0x31, 0x46, 0xbb, 0xd0, 0x31, 0x03, 0xba,
+ 0x86, 0x34, 0x3f, 0xd5, 0xe9, 0x16, 0x76, 0x47, 0x54, 0xb7, 0x1b, 0x9e,
+ 0xed, 0x99, 0xbd, 0x25, 0x5d, 0x43, 0x12, 0xa8, 0x35, 0x1b, 0x8d, 0xcd,
+ 0xc8, 0x8d, 0x2f, 0xc9, 0x90, 0xf5, 0x48, 0xee, 0x32, 0x5b, 0x03, 0xa2,
+ 0x1a, 0x3c, 0xb5, 0x35, 0x21, 0x27, 0x79, 0xf1, 0x51, 0x35, 0xff, 0xe6,
+ 0xeb, 0xe2, 0xb4, 0xdc, 0xc0, 0xbe, 0x9a, 0x5a, 0x2d, 0xdb, 0x41, 0xe1,
+ 0xb5, 0xcd, 0x70, 0x97, 0x2f, 0x1a, 0x00, 0x90, 0xf5, 0x9b, 0xe6, 0x62,
+ 0xaf, 0xbf, 0xd0, 0x6f, 0x07, 0xbc, 0xdb, 0xe1, 0x9d, 0xc2, 0x3e, 0xf4,
+ 0x4b, 0x7e, 0x99, 0x23, 0xbc, 0x1f, 0x11, 0x64, 0x4c, 0x67, 0x3d, 0x77,
+ 0x8e, 0xd3, 0x04, 0x9d, 0x7f, 0xfb, 0xb4, 0x6c, 0xdc, 0x74, 0xbf, 0x45,
+ 0x76, 0x11, 0x80, 0xcb,
+};
+#endif
+
+/* Public keys in known small subgroups - fails in all modes */
+static const unsigned char pub_key_zero[] = {0};
+static const unsigned char pub_key_one[] = {1};
+
+static const unsigned char pub_key_minus_1_ike_1536[] = {
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2,
+ 0x21, 0x68, 0xC2, 0x34, 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1,
+ 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, 0x02, 0x0B, 0xBE, 0xA6,
+ 0x3B, 0x13, 0x9B, 0x22, 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD,
+ 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, 0x30, 0x2B, 0x0A, 0x6D,
+ 0xF2, 0x5F, 0x14, 0x37, 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45,
+ 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, 0xF4, 0x4C, 0x42, 0xE9,
+ 0xA6, 0x37, 0xED, 0x6B, 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED,
+ 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, 0xAE, 0x9F, 0x24, 0x11,
+ 0x7C, 0x4B, 0x1F, 0xE6, 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D,
+ 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, 0x98, 0xDA, 0x48, 0x36,
+ 0x1C, 0x55, 0xD3, 0x9A, 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F,
+ 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, 0x1C, 0x62, 0xF3, 0x56,
+ 0x20, 0x85, 0x52, 0xBB, 0x9E, 0xD5, 0x29, 0x07, 0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, 0x22, 0x6a, 0xd1, 0xfb, 0xa1, 0xe4, 0xe7, 0xab, 0x3c,
+ 0x72, 0x10, 0xac, 0x72};
+
+/* Public keys in small subgroups of weak primes - fails in all modes*/
+static const unsigned char pub_key_bad_weak_1024[] = {3};
+static const unsigned char pub_key_bad_weak_2048[] = {3};
+static const unsigned char pub_key_bad_weak_3072[] = {3};
+static const unsigned char pub_key_bad_weak_4096[] = {3};
+static const unsigned char pub_key_bad_weak_6144[] = {3};
+static const unsigned char pub_key_bad_weak_8192[] = {3};
+
+enum DhParamType {
+ TLS_APPROVED,
+ IKE_APPROVED,
+ SAFE_PRIME,
+ SAFE_PRIME_WITH_SUBPRIME,
+ KNOWN_SUBPRIME,
+ WRONG_SUBPRIME,
+ UNKNOWN_SUBPRIME,
+ BAD_PUB_KEY
+};
+
+enum DhKeyClass {
+ CLASS_1536 = 0,
+ CLASS_2048,
+ CLASS_3072,
+ CLASS_4096,
+ CLASS_6144,
+ CLASS_8192,
+ CLASS_LAST
+};
+const DhKeyClass CLASS_FIRST = CLASS_1536;
+
+const unsigned char *reference_prime[CLASS_LAST] = {
+ prime_ike_1536, prime_tls_2048, prime_tls_3072,
+ prime_ike_4096, prime_ike_6144, prime_tls_8192};
+
+const size_t reference_prime_len[CLASS_LAST] = {
+ sizeof(prime_ike_1536), sizeof(prime_tls_2048), sizeof(prime_tls_3072),
+ sizeof(prime_ike_4096), sizeof(prime_ike_6144), sizeof(prime_tls_8192)};
+
+struct DhTestVector {
+ const char *id;
+ SECItem p;
+ SECItem g;
+ SECItem q;
+ SECItem pub_key;
+ DhParamType param_type;
+ DhKeyClass key_class;
+};
+
+static const unsigned char g2[] = {2};
+static const unsigned char g3[] = {3};
+
+static const DhTestVector DH_TEST_VECTORS[] = {
+ /* test our approved primes, the pass in all modes and configurations */
+ {"IKE 1536",
+ {siBuffer, (unsigned char *)prime_ike_1536, sizeof(prime_ike_1536)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME,
+ CLASS_1536},
+ {"IKE 2048",
+ {siBuffer, (unsigned char *)prime_ike_2048, sizeof(prime_ike_2048)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_2048},
+ {"TLS 3048",
+ {siBuffer, (unsigned char *)prime_tls_2048, sizeof(prime_tls_2048)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_2048},
+ {"IKE 3072",
+ {siBuffer, (unsigned char *)prime_ike_3072, sizeof(prime_ike_3072)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_3072},
+ {"TLS 3072",
+ {siBuffer, (unsigned char *)prime_tls_3072, sizeof(prime_tls_3072)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_3072},
+ {"IKE 4096",
+ {siBuffer, (unsigned char *)prime_ike_4096, sizeof(prime_ike_4096)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_4096},
+ {"TLS 4096",
+ {siBuffer, (unsigned char *)prime_tls_4096, sizeof(prime_tls_4096)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_4096},
+ {"IKE 6144",
+ {siBuffer, (unsigned char *)prime_ike_6144, sizeof(prime_ike_6144)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_6144},
+ {"TLS 6144",
+ {siBuffer, (unsigned char *)prime_tls_6144, sizeof(prime_tls_6144)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_6144},
+ {"IKE 8192",
+ {siBuffer, (unsigned char *)prime_ike_8192, sizeof(prime_ike_8192)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_8192},
+ {"TLS 8192",
+ {siBuffer, (unsigned char *)prime_tls_8192, sizeof(prime_tls_8192)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_8192},
+ /* approved primes with explicit subprimes.These should pass without
+ * the need to verify the primes and subprimes for primality */
+ {"IKE 1536 with subprime",
+ {siBuffer, (unsigned char *)prime_ike_1536, sizeof(prime_ike_1536)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_ike_1536,
+ sizeof(sub2_prime_ike_1536)},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME,
+ CLASS_1536},
+ {"IKE 2048 with subprime",
+ {siBuffer, (unsigned char *)prime_ike_2048, sizeof(prime_ike_2048)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_ike_2048,
+ sizeof(sub2_prime_ike_2048)},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_2048},
+ {"TLS 2048 with subprime",
+ {siBuffer, (unsigned char *)prime_tls_2048, sizeof(prime_tls_2048)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_tls_2048,
+ sizeof(sub2_prime_tls_2048)},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_2048},
+ {"IKE 3072 with subprime",
+ {siBuffer, (unsigned char *)prime_ike_3072, sizeof(prime_ike_3072)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_ike_3072,
+ sizeof(sub2_prime_ike_3072)},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_3072},
+ {"TLS 3072 with subprime",
+ {siBuffer, (unsigned char *)prime_tls_3072, sizeof(prime_tls_3072)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_tls_3072,
+ sizeof(sub2_prime_tls_3072)},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_3072},
+ {"IKE 4096 with subprime",
+ {siBuffer, (unsigned char *)prime_ike_4096, sizeof(prime_ike_4096)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_ike_4096,
+ sizeof(sub2_prime_ike_4096)},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_4096},
+ {"TLS 4096 with subprime",
+ {siBuffer, (unsigned char *)prime_tls_4096, sizeof(prime_tls_4096)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_tls_4096,
+ sizeof(sub2_prime_tls_4096)},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_4096},
+ {"IKE 6144 with subprime",
+ {siBuffer, (unsigned char *)prime_ike_6144, sizeof(prime_ike_6144)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_ike_6144,
+ sizeof(sub2_prime_ike_6144)},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_6144},
+ {"TLS 6144 with subprime",
+ {siBuffer, (unsigned char *)prime_tls_6144, sizeof(prime_tls_6144)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_tls_6144,
+ sizeof(sub2_prime_tls_6144)},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_6144},
+ {"IKE 8192 with subprime",
+ {siBuffer, (unsigned char *)prime_ike_8192, sizeof(prime_ike_8192)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_ike_8192,
+ sizeof(sub2_prime_ike_8192)},
+ {siBuffer, NULL, 0},
+ IKE_APPROVED,
+ CLASS_8192},
+ {"TLS 8192 with subprime",
+ {siBuffer, (unsigned char *)prime_tls_8192, sizeof(prime_tls_8192)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_tls_8192,
+ sizeof(sub2_prime_tls_8192)},
+ {siBuffer, NULL, 0},
+ TLS_APPROVED,
+ CLASS_8192},
+ /* test our non-approved safe primes. This primes should pass in
+ * non-FIPS and fail in FIPS. They should pass without checks */
+ {"Safe Prime 1536",
+ {siBuffer, (unsigned char *)prime_safe_1536, sizeof(prime_safe_1536)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME,
+ CLASS_1536},
+ {"Safe Prime 2048",
+ {siBuffer, (unsigned char *)prime_safe_2048, sizeof(prime_safe_2048)},
+ {siBuffer, (unsigned char *)g3, sizeof(g3)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME,
+ CLASS_2048},
+ {"Safe Prime 3072",
+ {siBuffer, (unsigned char *)prime_safe_3072, sizeof(prime_safe_3072)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME,
+ CLASS_3072},
+ {"Safe Prime 4096",
+ {siBuffer, (unsigned char *)prime_safe_4096, sizeof(prime_safe_4096)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME,
+ CLASS_4096},
+ {"Safe Prime 6144",
+ {siBuffer, (unsigned char *)prime_safe_6144, sizeof(prime_safe_6144)},
+ {siBuffer, (unsigned char *)g3, sizeof(g3)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME,
+ CLASS_6144},
+ {"Safe Prime 8192",
+ {siBuffer, (unsigned char *)prime_safe_8192, sizeof(prime_safe_8192)},
+ {siBuffer, (unsigned char *)g3, sizeof(g3)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME,
+ CLASS_8192},
+ /* test our non-approved safe primes. This primes should pass in
+ * non-FIPS and fail in FIPS. In non-FIPS, they need checks */
+ {"Safe Prime 1536 with Subprime",
+ {siBuffer, (unsigned char *)prime_safe_1536, sizeof(prime_safe_1536)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_safe_1536,
+ sizeof(sub2_prime_safe_1536)},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME_WITH_SUBPRIME,
+ CLASS_1536},
+ {"Safe Prime 2048 with Subprime",
+ {siBuffer, (unsigned char *)prime_safe_2048, sizeof(prime_safe_2048)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_safe_2048,
+ sizeof(sub2_prime_safe_2048)},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME_WITH_SUBPRIME,
+ CLASS_2048},
+ {"Safe Prime 3072 with Subprime",
+ {siBuffer, (unsigned char *)prime_safe_3072, sizeof(prime_safe_3072)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_safe_3072,
+ sizeof(sub2_prime_safe_3072)},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME_WITH_SUBPRIME,
+ CLASS_3072},
+#ifdef NSS_SOFTOKEN_DH_INCLUDE_SLOW
+ {"Safe Prime 4096 with Subprime",
+ {siBuffer, (unsigned char *)prime_safe_4096, sizeof(prime_safe_4096)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_safe_4096,
+ sizeof(sub2_prime_safe_4096)},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME_WITH_SUBPRIME,
+ CLASS_4096},
+ {"Safe Prime 6144 with Subprime",
+ {siBuffer, (unsigned char *)prime_safe_6144, sizeof(prime_safe_6144)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_safe_6144,
+ sizeof(sub2_prime_safe_6144)},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME_WITH_SUBPRIME,
+ CLASS_6144},
+ {"Safe Prime 8192 with Subprime",
+ {siBuffer, (unsigned char *)prime_safe_8192, sizeof(prime_safe_8192)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_safe_8192,
+ sizeof(sub2_prime_safe_8192)},
+ {siBuffer, NULL, 0},
+ SAFE_PRIME_WITH_SUBPRIME,
+ CLASS_8192},
+#endif
+ /* test "weak" primes with "unknown" subprimes. We use
+ * the same primes as the known subprimes, but we don't
+ * include the subprime in the test. These primes should
+ * pass in non-FIPS mode and fail in FIPS mode */
+ {"Weak Prime 1024 Unknown Subprime",
+ {siBuffer, (unsigned char *)prime_weak_1024, sizeof(prime_weak_1024)},
+ {siBuffer, (unsigned char *)base_weak_1024, sizeof(base_weak_1024)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ UNKNOWN_SUBPRIME,
+ CLASS_1536},
+ {"Weak Prime 2048 Unknown Subprime",
+ {siBuffer, (unsigned char *)prime_weak_2048, sizeof(prime_weak_2048)},
+ {siBuffer, (unsigned char *)base_weak_2048, sizeof(base_weak_2048)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ UNKNOWN_SUBPRIME,
+ CLASS_2048},
+ {"Weak Prime 3072 Unknown Subprime",
+ {siBuffer, (unsigned char *)prime_weak_3072, sizeof(prime_weak_3072)},
+ {siBuffer, (unsigned char *)base_weak_3072, sizeof(base_weak_3072)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ UNKNOWN_SUBPRIME,
+ CLASS_3072},
+ {"Weak Prime 4096 Unknown Subprime",
+ {siBuffer, (unsigned char *)prime_weak_4096, sizeof(prime_weak_4096)},
+ {siBuffer, (unsigned char *)base_weak_4096, sizeof(base_weak_4096)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ UNKNOWN_SUBPRIME,
+ CLASS_4096},
+ {"Weak Prime 6144 Unknown Subprime",
+ {siBuffer, (unsigned char *)prime_weak_6144, sizeof(prime_weak_6144)},
+ {siBuffer, (unsigned char *)base_weak_6144, sizeof(base_weak_6144)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ UNKNOWN_SUBPRIME,
+ CLASS_6144},
+ {"Weak Prime 8192 Unknown Subprime",
+ {siBuffer, (unsigned char *)prime_weak_8192, sizeof(prime_weak_8192)},
+ {siBuffer, (unsigned char *)base_weak_8192, sizeof(base_weak_8192)},
+ {siBuffer, NULL, 0},
+ {siBuffer, NULL, 0},
+ UNKNOWN_SUBPRIME,
+ CLASS_8192},
+ /* test "weak" primes with known subprimes. These primes should
+ * pass in non-FIPS and fail in FIPS. In non-FIPS they should have full
+ * checks. */
+ {"Weak Prime 1024 Known Subprime",
+ {siBuffer, (unsigned char *)prime_weak_1024, sizeof(prime_weak_1024)},
+ {siBuffer, (unsigned char *)base_weak_1024, sizeof(base_weak_1024)},
+ {siBuffer, (unsigned char *)subprime_weak_1024,
+ sizeof(subprime_weak_1024)},
+ {siBuffer, NULL, 0},
+ KNOWN_SUBPRIME,
+ CLASS_1536},
+ {"Weak Prime 2048 Known Subprime",
+ {siBuffer, (unsigned char *)prime_weak_2048, sizeof(prime_weak_2048)},
+ {siBuffer, (unsigned char *)base_weak_2048, sizeof(base_weak_2048)},
+ {siBuffer, (unsigned char *)subprime_weak_2048,
+ sizeof(subprime_weak_2048)},
+ {siBuffer, NULL, 0},
+ KNOWN_SUBPRIME,
+ CLASS_2048},
+ {"Weak Prime 3072 Known Subprime",
+ {siBuffer, (unsigned char *)prime_weak_3072, sizeof(prime_weak_3072)},
+ {siBuffer, (unsigned char *)base_weak_3072, sizeof(base_weak_3072)},
+ {siBuffer, (unsigned char *)subprime_weak_3072,
+ sizeof(subprime_weak_3072)},
+ {siBuffer, NULL, 0},
+ KNOWN_SUBPRIME,
+ CLASS_3072},
+#ifdef NSS_SOFTOKEN_DH_INCLUDE_SLOW
+ {"Weak Prime 4096 Known Subprime",
+ {siBuffer, (unsigned char *)prime_weak_4096, sizeof(prime_weak_4096)},
+ {siBuffer, (unsigned char *)base_weak_4096, sizeof(base_weak_4096)},
+ {siBuffer, (unsigned char *)subprime_weak_4096,
+ sizeof(subprime_weak_4096)},
+ {siBuffer, NULL, 0},
+ KNOWN_SUBPRIME,
+ CLASS_4096},
+ {"Weak Prime 6144 Known Subprime",
+ {siBuffer, (unsigned char *)prime_weak_6144, sizeof(prime_weak_6144)},
+ {siBuffer, (unsigned char *)base_weak_6144, sizeof(base_weak_6144)},
+ {siBuffer, (unsigned char *)subprime_weak_6144,
+ sizeof(subprime_weak_6144)},
+ {siBuffer, NULL, 0},
+ KNOWN_SUBPRIME,
+ CLASS_6144},
+ {"Weak Prime 8192 Known Subprime",
+ {siBuffer, (unsigned char *)prime_weak_8192, sizeof(prime_weak_8192)},
+ {siBuffer, (unsigned char *)base_weak_8192, sizeof(base_weak_8192)},
+ {siBuffer, (unsigned char *)subprime_weak_8192,
+ sizeof(subprime_weak_8192)},
+ {siBuffer, NULL, 0},
+ KNOWN_SUBPRIME,
+ CLASS_8192},
+#endif
+ /* test "weak" primes as if they were safe primes. These primes should
+ * faill in all modes. */
+ {"Weak Prime 1024 Wrong Subprime",
+ {siBuffer, (unsigned char *)prime_weak_1024, sizeof(prime_weak_1024)},
+ {siBuffer, (unsigned char *)base_weak_1024, sizeof(base_weak_1024)},
+ {siBuffer, (unsigned char *)sub2_prime_weak_1024,
+ sizeof(sub2_prime_weak_1024)},
+ {siBuffer, NULL, 0},
+ WRONG_SUBPRIME,
+ CLASS_1536},
+ {"Weak Prime 2048 Wrong Subprime",
+ {siBuffer, (unsigned char *)prime_weak_2048, sizeof(prime_weak_2048)},
+ {siBuffer, (unsigned char *)base_weak_2048, sizeof(base_weak_2048)},
+ {siBuffer, (unsigned char *)sub2_prime_weak_2048,
+ sizeof(sub2_prime_weak_2048)},
+ {siBuffer, NULL, 0},
+ WRONG_SUBPRIME,
+ CLASS_2048},
+ {"Weak Prime 3072 Wrong Subprime",
+ {siBuffer, (unsigned char *)prime_weak_3072, sizeof(prime_weak_3072)},
+ {siBuffer, (unsigned char *)base_weak_3072, sizeof(base_weak_3072)},
+ {siBuffer, (unsigned char *)sub2_prime_weak_3072,
+ sizeof(sub2_prime_weak_3072)},
+ {siBuffer, NULL, 0},
+ WRONG_SUBPRIME,
+ CLASS_3072},
+#ifdef NSS_SOFTOKEN_DH_INCLUDE_SLOW
+ {"Weak Prime 4096 Wrong Subprime",
+ {siBuffer, (unsigned char *)prime_weak_4096, sizeof(prime_weak_4096)},
+ {siBuffer, (unsigned char *)base_weak_4096, sizeof(base_weak_4096)},
+ {siBuffer, (unsigned char *)sub2_prime_weak_4096,
+ sizeof(sub2_prime_weak_4096)},
+ {siBuffer, NULL, 0},
+ WRONG_SUBPRIME,
+ CLASS_4096},
+ {"Weak Prime 6144 Wrong Subprime",
+ {siBuffer, (unsigned char *)prime_weak_6144, sizeof(prime_weak_6144)},
+ {siBuffer, (unsigned char *)base_weak_6144, sizeof(base_weak_6144)},
+ {siBuffer, (unsigned char *)sub2_prime_weak_6144,
+ sizeof(sub2_prime_weak_6144)},
+ {siBuffer, NULL, 0},
+ WRONG_SUBPRIME,
+ CLASS_6144},
+ {"Weak Prime 8192 Wrong Subprime",
+ {siBuffer, (unsigned char *)prime_weak_8192, sizeof(prime_weak_8192)},
+ {siBuffer, (unsigned char *)base_weak_8192, sizeof(base_weak_8192)},
+ {siBuffer, (unsigned char *)sub2_prime_weak_8192,
+ sizeof(sub2_prime_weak_8192)},
+ {siBuffer, NULL, 0},
+ WRONG_SUBPRIME,
+ CLASS_8192},
+#endif
+ /******** Now test various invalid public keys */
+ /* first known small subgroups of safe primes. These test should
+ * fail in all modes with all primes */
+ {"Pubkey = 0 IKE 1536",
+ {siBuffer, (unsigned char *)prime_ike_1536, sizeof(prime_ike_1536)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, (unsigned char *)pub_key_zero, sizeof(pub_key_zero)},
+ BAD_PUB_KEY,
+ CLASS_1536},
+ {"PubKey = 1 TLS 2048",
+ {siBuffer, (unsigned char *)prime_tls_2048, sizeof(prime_tls_2048)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, (unsigned char *)pub_key_one, sizeof(pub_key_one)},
+ BAD_PUB_KEY,
+ CLASS_2048},
+ {"Pubkey == -1 IKE 1536",
+ {siBuffer, (unsigned char *)prime_ike_1536, sizeof(prime_ike_1536)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, (unsigned char *)pub_key_minus_1_ike_1536,
+ sizeof(pub_key_minus_1_ike_1536)},
+ BAD_PUB_KEY,
+ CLASS_1536},
+ {"Pubkey = -1 SAFE 2048 WITH SUBPRIME",
+ {siBuffer, (unsigned char *)prime_safe_2048, sizeof(prime_safe_2048)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_safe_2048,
+ sizeof(sub2_prime_safe_2048)},
+ {siBuffer, (unsigned char *)pub_key_minus_1_safe_2048,
+ sizeof(pub_key_minus_1_safe_2048)},
+ BAD_PUB_KEY,
+ CLASS_2048},
+ {"Pubkey = -1 WEAK 3072 KNOWN SUBPRIME",
+ {siBuffer, (unsigned char *)prime_weak_3072, sizeof(prime_weak_3072)},
+ {siBuffer, (unsigned char *)base_weak_3072, sizeof(base_weak_3072)},
+ {siBuffer, (unsigned char *)subprime_weak_3072,
+ sizeof(subprime_weak_3072)},
+ {siBuffer, (unsigned char *)pub_key_minus_1_weak_3072,
+ sizeof(pub_key_minus_1_weak_3072)},
+ BAD_PUB_KEY,
+ CLASS_3072},
+ {"Pubkey = -1 WEAK 4096 UNKNOWN SUBPRIME",
+ {siBuffer, (unsigned char *)prime_weak_4096, sizeof(prime_weak_4096)},
+ {siBuffer, (unsigned char *)base_weak_4096, sizeof(base_weak_4096)},
+ {siBuffer, NULL, 0},
+ {siBuffer, (unsigned char *)pub_key_minus_1_weak_4096,
+ sizeof(pub_key_minus_1_weak_4096)},
+ BAD_PUB_KEY,
+ CLASS_4096},
+ {"Pubkey = -1 TLS 6144 WITH SUBPRIME",
+ {siBuffer, (unsigned char *)prime_tls_6144, sizeof(prime_tls_6144)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, (unsigned char *)sub2_prime_tls_6144,
+ sizeof(sub2_prime_tls_6144)},
+ {siBuffer, (unsigned char *)pub_key_minus_1_tls_6144,
+ sizeof(pub_key_minus_1_tls_6144)},
+ BAD_PUB_KEY,
+ CLASS_6144},
+ {"Pubkey = -1 SAFE 8192",
+ {siBuffer, (unsigned char *)prime_safe_8192, sizeof(prime_safe_8192)},
+ {siBuffer, (unsigned char *)g2, sizeof(g2)},
+ {siBuffer, NULL, 0},
+ {siBuffer, (unsigned char *)pub_key_minus_1_safe_8192,
+ sizeof(pub_key_minus_1_safe_8192)},
+ BAD_PUB_KEY,
+ CLASS_8192},
+ /* y is a known small subgroups of weak primes (which known subprimes).
+ * These test should fail in all modes with all primes */
+ {"Pubkey small subgroup Weak 1024 prime",
+ {siBuffer, (unsigned char *)prime_weak_1024, sizeof(prime_weak_1024)},
+ {siBuffer, (unsigned char *)base_weak_1024, sizeof(base_weak_1024)},
+ {siBuffer, (unsigned char *)subprime_weak_1024,
+ sizeof(subprime_weak_1024)},
+ {siBuffer, (unsigned char *)pub_key_bad_weak_1024,
+ sizeof(pub_key_bad_weak_1024)},
+ BAD_PUB_KEY,
+ CLASS_1536},
+ {"Pubkey small subgroup Weak 2048 prime",
+ {siBuffer, (unsigned char *)prime_weak_2048, sizeof(prime_weak_2048)},
+ {siBuffer, (unsigned char *)base_weak_2048, sizeof(base_weak_2048)},
+ {siBuffer, (unsigned char *)subprime_weak_2048,
+ sizeof(subprime_weak_2048)},
+ {siBuffer, (unsigned char *)pub_key_bad_weak_2048,
+ sizeof(pub_key_bad_weak_2048)},
+ BAD_PUB_KEY,
+ CLASS_2048},
+ {"Pubkey small subgroup Weak 3072 prime",
+ {siBuffer, (unsigned char *)prime_weak_3072, sizeof(prime_weak_3072)},
+ {siBuffer, (unsigned char *)base_weak_3072, sizeof(base_weak_3072)},
+ {siBuffer, (unsigned char *)subprime_weak_3072,
+ sizeof(subprime_weak_3072)},
+ {siBuffer, (unsigned char *)pub_key_bad_weak_3072,
+ sizeof(pub_key_bad_weak_3072)},
+ BAD_PUB_KEY,
+ CLASS_3072},
+#ifdef NSS_SOFTOKEN_DH_INCLUDE_SLOW
+ {"Pubkey small subgroup Weak 4096 prime",
+ {siBuffer, (unsigned char *)prime_weak_4096, sizeof(prime_weak_4096)},
+ {siBuffer, (unsigned char *)base_weak_4096, sizeof(base_weak_4096)},
+ {siBuffer, (unsigned char *)subprime_weak_4096,
+ sizeof(subprime_weak_4096)},
+ {siBuffer, (unsigned char *)pub_key_bad_weak_4096,
+ sizeof(pub_key_bad_weak_4096)},
+ BAD_PUB_KEY,
+ CLASS_4096},
+ {"Pubkey small subgroup Weak 6144 prime",
+ {siBuffer, (unsigned char *)prime_weak_6144, sizeof(prime_weak_6144)},
+ {siBuffer, (unsigned char *)base_weak_6144, sizeof(base_weak_6144)},
+ {siBuffer, (unsigned char *)subprime_weak_6144,
+ sizeof(subprime_weak_6144)},
+ {siBuffer, (unsigned char *)pub_key_bad_weak_6144,
+ sizeof(pub_key_bad_weak_6144)},
+ BAD_PUB_KEY,
+ CLASS_6144},
+ {"Pubkey small subgroup Weak 8192 prime",
+ {siBuffer, (unsigned char *)prime_weak_8192, sizeof(prime_weak_8192)},
+ {siBuffer, (unsigned char *)base_weak_8192, sizeof(base_weak_8192)},
+ {siBuffer, (unsigned char *)subprime_weak_8192,
+ sizeof(subprime_weak_8192)},
+ {siBuffer, (unsigned char *)pub_key_bad_weak_8192,
+ sizeof(pub_key_bad_weak_8192)},
+ BAD_PUB_KEY,
+ CLASS_8192}
+#endif
+};
+}; // namespace nss_test
diff --git a/security/nss/gtests/softoken_gtest/softoken_gtest.cc b/security/nss/gtests/softoken_gtest/softoken_gtest.cc
new file mode 100644
index 0000000000..059bdadfda
--- /dev/null
+++ b/security/nss/gtests/softoken_gtest/softoken_gtest.cc
@@ -0,0 +1,985 @@
+#include "cert.h"
+#include "certdb.h"
+#include "nspr.h"
+#include "nss.h"
+#include "pk11pub.h"
+#include "secmod.h"
+#include "secerr.h"
+
+#include "nss_scoped_ptrs.h"
+#include "util.h"
+
+#define GTEST_HAS_RTTI 0
+#include "gtest/gtest.h"
+#include "databuffer.h"
+#include <fstream>
+#include <chrono>
+#include <sqlite3.h>
+using namespace std::chrono;
+
+#include "softoken_dh_vectors.h"
+
+namespace nss_test {
+class SoftokenTest : public ::testing::Test {
+ protected:
+ SoftokenTest() : mNSSDBDir("SoftokenTest.d-") {}
+ SoftokenTest(const std::string &prefix) : mNSSDBDir(prefix) {}
+
+ virtual void SetUp() {
+ std::string nssInitArg("sql:");
+ nssInitArg.append(mNSSDBDir.GetUTF8Path());
+ ASSERT_EQ(SECSuccess, NSS_Initialize(nssInitArg.c_str(), "", "", SECMOD_DB,
+ NSS_INIT_NOROOTINIT));
+ }
+
+ virtual void TearDown() {
+ ASSERT_EQ(SECSuccess, NSS_Shutdown());
+ const std::string &nssDBDirPath = mNSSDBDir.GetPath();
+ ASSERT_EQ(0, unlink((nssDBDirPath + "/cert9.db").c_str()));
+ ASSERT_EQ(0, unlink((nssDBDirPath + "/key4.db").c_str()));
+ ASSERT_EQ(0, unlink((nssDBDirPath + "/pkcs11.txt").c_str()));
+ }
+
+ ScopedUniqueDirectory mNSSDBDir;
+};
+
+TEST_F(SoftokenTest, CheckDefaultPbkdf2Iterations) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+
+ // Open key4.db and check encoded PBE algorithm and iteration count.
+ // Compare bytes against the expected values to avoid ASN.1 here.
+ std::string key_db = mNSSDBDir.GetPath() + "/key4.db";
+
+ sqlite3 *sql_db = NULL;
+ ASSERT_EQ(SQLITE_OK, sqlite3_open(key_db.c_str(), &sql_db));
+
+ char *query_str = sqlite3_mprintf("SELECT item2 FROM metaData;");
+ ASSERT_NE(nullptr, query_str);
+
+ sqlite3_stmt *statement = NULL;
+ ASSERT_EQ(SQLITE_OK,
+ sqlite3_prepare_v2(sql_db, query_str, -1, &statement, NULL));
+ ASSERT_EQ(SQLITE_ROW, sqlite3_step(statement));
+ unsigned int len = sqlite3_column_bytes(statement, 0);
+ const unsigned char *reader = sqlite3_column_text(statement, 0);
+
+ ASSERT_NE(nullptr, reader);
+ ASSERT_EQ(133U, len);
+
+ // pkcs5PBES2, pkcs5PBKDF2
+ const uint8_t pkcs5_with_pbkdf2[] = {
+ 0x30, 0x81, 0x82, 0x30, 0x6E, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86,
+ 0xF7, 0x0D, 0x01, 0x05, 0x0D, 0x30, 0x61, 0x30, 0x42, 0x06, 0x09,
+ 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x05, 0x0C, 0x30, 0x35};
+ EXPECT_EQ(0, memcmp(reader, pkcs5_with_pbkdf2, sizeof(pkcs5_with_pbkdf2)));
+ reader += sizeof(pkcs5_with_pbkdf2);
+
+ // Skip over the 32B random salt
+ const uint8_t salt_prefix[] = {0x04, 0x20};
+ EXPECT_EQ(0, memcmp(reader, salt_prefix, sizeof(salt_prefix)));
+ reader += sizeof(salt_prefix) + 0x20;
+
+ // Expect 10000 iterations
+ const uint8_t iterations[] = {0x02, 0x02, 0x27, 0x10};
+ EXPECT_EQ(0, memcmp(reader, iterations, sizeof(iterations)));
+ reader += sizeof(iterations);
+
+ // hmacWithSHA256, aes256-CBC
+ const uint8_t oids[] = {0x02, 0x01, 0x20, 0x30, 0x0A, 0x06, 0x08,
+ 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02,
+ 0x09, 0x30, 0x1B, 0x06, 0x09, 0x60, 0x86,
+ 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x2A};
+ EXPECT_EQ(0, memcmp(reader, oids, sizeof(oids)));
+
+ EXPECT_EQ(SQLITE_OK, sqlite3_finalize(statement));
+ sqlite3_free(query_str);
+ sqlite3_close(sql_db);
+}
+
+TEST_F(SoftokenTest, ResetSoftokenEmptyPassword) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, nullptr));
+ EXPECT_EQ(SECSuccess, PK11_ResetToken(slot.get(), nullptr));
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, nullptr));
+}
+
+TEST_F(SoftokenTest, ResetSoftokenNonEmptyPassword) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+ EXPECT_EQ(SECSuccess, PK11_ResetToken(slot.get(), nullptr));
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password2"));
+}
+
+// Test certificate to use in the CreateObject tests.
+static const CK_OBJECT_CLASS cko_nss_trust = CKO_NSS_TRUST;
+static const CK_BBOOL ck_false = CK_FALSE;
+static const CK_BBOOL ck_true = CK_TRUE;
+static const CK_TRUST ckt_nss_must_verify_trust = CKT_NSS_MUST_VERIFY_TRUST;
+static const CK_TRUST ckt_nss_trusted_delegator = CKT_NSS_TRUSTED_DELEGATOR;
+static const CK_ATTRIBUTE attributes[] = {
+ {CKA_CLASS, (void *)&cko_nss_trust, (PRUint32)sizeof(CK_OBJECT_CLASS)},
+ {CKA_TOKEN, (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL)},
+ {CKA_PRIVATE, (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL)},
+ {CKA_MODIFIABLE, (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL)},
+ {CKA_LABEL,
+ (void *)"Symantec Class 2 Public Primary Certification Authority - G4",
+ (PRUint32)61},
+ {CKA_CERT_SHA1_HASH,
+ (void *)"\147\044\220\056\110\001\260\042\226\100\020\106\264\261\147\054"
+ "\251\165\375\053",
+ (PRUint32)20},
+ {CKA_CERT_MD5_HASH,
+ (void *)"\160\325\060\361\332\224\227\324\327\164\337\276\355\150\336\226",
+ (PRUint32)16},
+ {CKA_ISSUER,
+ (void *)"\060\201\224\061\013\060\011\006\003\125\004\006\023\002\125\123"
+ "\061\035\060\033\006\003\125\004\012\023\024\123\171\155\141\156"
+ "\164\145\143\040\103\157\162\160\157\162\141\164\151\157\156\061"
+ "\037\060\035\006\003\125\004\013\023\026\123\171\155\141\156\164"
+ "\145\143\040\124\162\165\163\164\040\116\145\164\167\157\162\153"
+ "\061\105\060\103\006\003\125\004\003\023\074\123\171\155\141\156"
+ "\164\145\143\040\103\154\141\163\163\040\062\040\120\165\142\154"
+ "\151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151"
+ "\146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151"
+ "\164\171\040\055\040\107\064",
+ (PRUint32)151},
+ {CKA_SERIAL_NUMBER,
+ (void *)"\002\020\064\027\145\022\100\073\267\126\200\055\200\313\171\125"
+ "\246\036",
+ (PRUint32)18},
+ {CKA_TRUST_SERVER_AUTH, (void *)&ckt_nss_must_verify_trust,
+ (PRUint32)sizeof(CK_TRUST)},
+ {CKA_TRUST_EMAIL_PROTECTION, (void *)&ckt_nss_trusted_delegator,
+ (PRUint32)sizeof(CK_TRUST)},
+ {CKA_TRUST_CODE_SIGNING, (void *)&ckt_nss_must_verify_trust,
+ (PRUint32)sizeof(CK_TRUST)},
+ {CKA_TRUST_STEP_UP_APPROVED, (void *)&ck_false,
+ (PRUint32)sizeof(CK_BBOOL)}};
+
+TEST_F(SoftokenTest, GetInvalidAttribute) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ ASSERT_NE(nullptr, obj);
+ SECItem out = {siBuffer, nullptr, 0};
+ SECStatus rv = PK11_ReadRawAttribute(PK11_TypeGeneric, obj.get(),
+ CKA_ALLOWED_MECHANISMS, &out);
+ EXPECT_EQ(SECFailure, rv);
+ // CKR_ATTRIBUTE_TYPE_INVALID maps to SEC_ERROR_BAD_DATA.
+ EXPECT_EQ(SEC_ERROR_BAD_DATA, PORT_GetError());
+}
+
+TEST_F(SoftokenTest, GetValidAttributes) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ ASSERT_NE(nullptr, obj);
+
+ CK_ATTRIBUTE template_attrs[] = {
+ {CKA_LABEL, NULL, 0},
+ {CKA_CERT_SHA1_HASH, NULL, 0},
+ {CKA_ISSUER, NULL, 0},
+ };
+ SECStatus rv =
+ PK11_ReadRawAttributes(nullptr, PK11_TypeGeneric, obj.get(),
+ template_attrs, PR_ARRAY_SIZE(template_attrs));
+ EXPECT_EQ(SECSuccess, rv);
+ ASSERT_EQ(attributes[4].ulValueLen, template_attrs[0].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[4].pValue, template_attrs[0].pValue,
+ template_attrs[0].ulValueLen));
+ ASSERT_EQ(attributes[5].ulValueLen, template_attrs[1].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[5].pValue, template_attrs[1].pValue,
+ template_attrs[1].ulValueLen));
+ ASSERT_EQ(attributes[7].ulValueLen, template_attrs[2].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[7].pValue, template_attrs[2].pValue,
+ template_attrs[2].ulValueLen));
+ for (unsigned int i = 0; i < PR_ARRAY_SIZE(template_attrs); i++) {
+ PORT_Free(template_attrs[i].pValue);
+ }
+}
+
+TEST_F(SoftokenTest, GetOnlyInvalidAttributes) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ ASSERT_NE(nullptr, obj);
+
+ // Provide buffers of sufficient size, so that token
+ // will write the data. This is annoying, but PK11_GetAttributes
+ // won't allocate in the cases below when a single attribute
+ // is missing. So, just put them all on the stack.
+ unsigned char buf1[100];
+ unsigned char buf2[100];
+ CK_ATTRIBUTE template_attrs[] = {{0xffffffffUL, buf1, sizeof(buf1)},
+ {0xfffffffeUL, buf2, sizeof(buf2)}};
+ SECStatus rv =
+ PK11_ReadRawAttributes(nullptr, PK11_TypeGeneric, obj.get(),
+ template_attrs, PR_ARRAY_SIZE(template_attrs));
+ EXPECT_EQ(SECFailure, rv);
+ EXPECT_EQ(SEC_ERROR_BAD_DATA, PORT_GetError());
+
+ // MSVC rewards -1UL with a C4146 warning...
+ ASSERT_EQ(0UL, template_attrs[0].ulValueLen + 1);
+ ASSERT_EQ(0UL, template_attrs[1].ulValueLen + 1);
+}
+
+TEST_F(SoftokenTest, GetAttributesInvalidInterspersed1) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ ASSERT_NE(nullptr, obj);
+
+ unsigned char buf1[100];
+ unsigned char buf2[100];
+ unsigned char buf3[200];
+ CK_ATTRIBUTE template_attrs[] = {{0xffffffff, buf1, sizeof(buf1)},
+ {CKA_CERT_SHA1_HASH, buf2, sizeof(buf2)},
+ {CKA_ISSUER, buf3, sizeof(buf3)}};
+ SECStatus rv =
+ PK11_ReadRawAttributes(nullptr, PK11_TypeGeneric, obj.get(),
+ template_attrs, PR_ARRAY_SIZE(template_attrs));
+ EXPECT_EQ(SECFailure, rv);
+ EXPECT_EQ(SEC_ERROR_BAD_DATA, PORT_GetError());
+ ASSERT_EQ(0UL, template_attrs[0].ulValueLen + 1);
+ ASSERT_EQ(attributes[5].ulValueLen, template_attrs[1].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[5].pValue, template_attrs[1].pValue,
+ template_attrs[1].ulValueLen));
+ ASSERT_EQ(attributes[7].ulValueLen, template_attrs[2].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[7].pValue, template_attrs[2].pValue,
+ template_attrs[2].ulValueLen));
+}
+
+TEST_F(SoftokenTest, GetAttributesInvalidInterspersed2) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ ASSERT_NE(nullptr, obj);
+
+ unsigned char buf1[100];
+ unsigned char buf2[100];
+ unsigned char buf3[100];
+ CK_ATTRIBUTE template_attrs[] = {{CKA_LABEL, buf1, sizeof(buf1)},
+ {CKA_CERT_SHA1_HASH, buf2, sizeof(buf2)},
+ {0xffffffffUL, buf3, sizeof(buf3)}};
+ SECStatus rv =
+ PK11_ReadRawAttributes(nullptr, PK11_TypeGeneric, obj.get(),
+ template_attrs, PR_ARRAY_SIZE(template_attrs));
+ EXPECT_EQ(SECFailure, rv);
+ EXPECT_EQ(SEC_ERROR_BAD_DATA, PORT_GetError());
+ ASSERT_EQ(attributes[4].ulValueLen, template_attrs[0].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[4].pValue, template_attrs[0].pValue,
+ template_attrs[0].ulValueLen));
+ ASSERT_EQ(attributes[5].ulValueLen, template_attrs[1].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[5].pValue, template_attrs[1].pValue,
+ template_attrs[1].ulValueLen));
+ ASSERT_EQ(0UL, template_attrs[2].ulValueLen + 1);
+}
+
+TEST_F(SoftokenTest, GetAttributesInvalidInterspersed3) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ ASSERT_NE(nullptr, obj);
+
+ unsigned char buf1[100];
+ unsigned char buf2[100];
+ unsigned char buf3[100];
+ unsigned char buf4[100];
+ unsigned char buf5[100];
+ unsigned char buf6[200];
+ CK_ATTRIBUTE template_attrs[6] = {{CKA_LABEL, buf1, sizeof(buf1)},
+ {0xffffffffUL, buf2, sizeof(buf2)},
+ {0xfffffffeUL, buf3, sizeof(buf3)},
+ {CKA_CERT_SHA1_HASH, buf4, sizeof(buf4)},
+ {0xfffffffdUL, buf5, sizeof(buf5)},
+ {CKA_ISSUER, buf6, sizeof(buf6)}};
+ SECStatus rv =
+ PK11_ReadRawAttributes(nullptr, PK11_TypeGeneric, obj.get(),
+ template_attrs, PR_ARRAY_SIZE(template_attrs));
+ EXPECT_EQ(SECFailure, rv);
+ EXPECT_EQ(SEC_ERROR_BAD_DATA, PORT_GetError());
+
+ ASSERT_EQ(attributes[4].ulValueLen, template_attrs[0].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[4].pValue, template_attrs[0].pValue,
+ template_attrs[0].ulValueLen));
+ ASSERT_EQ(0UL, template_attrs[1].ulValueLen + 1);
+ ASSERT_EQ(0UL, template_attrs[2].ulValueLen + 1);
+ ASSERT_EQ(attributes[5].ulValueLen, template_attrs[3].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[5].pValue, template_attrs[3].pValue,
+ template_attrs[3].ulValueLen));
+ ASSERT_EQ(0UL, template_attrs[4].ulValueLen + 1);
+ ASSERT_EQ(attributes[7].ulValueLen, template_attrs[5].ulValueLen);
+ EXPECT_EQ(0, memcmp(attributes[7].pValue, template_attrs[5].pValue,
+ template_attrs[5].ulValueLen));
+}
+
+TEST_F(SoftokenTest, CreateObjectNonEmptyPassword) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+ EXPECT_EQ(SECSuccess, PK11_Logout(slot.get()));
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ EXPECT_EQ(nullptr, obj);
+}
+
+TEST_F(SoftokenTest, CreateObjectChangePassword) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, nullptr));
+ EXPECT_EQ(SECSuccess, PK11_ChangePW(slot.get(), "", "password"));
+ EXPECT_EQ(SECSuccess, PK11_Logout(slot.get()));
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ EXPECT_EQ(nullptr, obj);
+}
+
+// The size limit for a password is 500 characters as defined in pkcs11i.h
+TEST_F(SoftokenTest, CreateObjectChangeToBigPassword) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, nullptr));
+ EXPECT_EQ(
+ SECSuccess,
+ PK11_ChangePW(slot.get(), "",
+ "rUIFIFr2bxKnbJbitsfkyqttpk6vCJzlYMNxcxXcaN37gSZKbLk763X7iR"
+ "yeVNWZHQ02lSF69HYjzTyPW3318ZD0DBFMMbALZ8ZPZP73CIo5uIQlaowV"
+ "IbP8eOhRYtGUqoLGlcIFNEYogV8Q3GN58VeBMs0KxrIOvPQ9s8SnYYkqvt"
+ "zzgntmAvCgvk64x6eQf0okHwegd5wi6m0WVJytEepWXkP9J629FSa5kNT8"
+ "FvL3jvslkiImzTNuTvl32fQDXXMSc8vVk5Q3mH7trMZM0VDdwHWYERjHbz"
+ "kGxFgp0VhediHx7p9kkz6H6ac4et9sW4UkTnN7xhYc1Zr17wRSk2heQtcX"
+ "oZJGwuzhiKm8A8wkuVxms6zO56P4JORIk8oaUW6lyNTLo2kWWnTA"));
+ EXPECT_EQ(SECSuccess, PK11_Logout(slot.get()));
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ EXPECT_EQ(nullptr, obj);
+}
+
+TEST_F(SoftokenTest, CreateObjectChangeToEmptyPassword) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, "password"));
+ EXPECT_EQ(SECSuccess, PK11_ChangePW(slot.get(), "password", ""));
+ // PK11_Logout returnes an error and SEC_ERROR_TOKEN_NOT_LOGGED_IN if the user
+ // is not "logged in".
+ EXPECT_EQ(SECFailure, PK11_Logout(slot.get()));
+ EXPECT_EQ(SEC_ERROR_TOKEN_NOT_LOGGED_IN, PORT_GetError());
+ ScopedPK11GenericObject obj(PK11_CreateGenericObject(
+ slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
+ // Because there's no password we can't logout and the operation should have
+ // succeeded.
+ EXPECT_NE(nullptr, obj);
+}
+
+// We should be able to read CRLF, LF and CR.
+// During the Initialization of the NSS Database, is called a function to load
+// PKCS11 modules defined in pkcs11.txt. This file is read to get the
+// specifications, parse them and load the modules. Here we are ensuring that
+// the parsing will work correctly, independent of the breaking line format of
+// pkcs11.txt file, which could vary depending where it was created.
+// If the parsing is not well interpreted, the database cannot initialize.
+TEST_F(SoftokenTest, CreateObjectReadBreakLine) {
+ const std::string path = mNSSDBDir.GetPath();
+ const std::string dbname_in = path + "/pkcs11.txt";
+ const std::string dbname_out_cr = path + "/pkcs11_cr.txt";
+ const std::string dbname_out_crlf = path + "/pkcs11_crlf.txt";
+ const std::string dbname_out_lf = path + "/pkcs11_lf.txt";
+
+ std::ifstream in(dbname_in);
+ ASSERT_TRUE(in);
+ std::ofstream out_cr(dbname_out_cr);
+ ASSERT_TRUE(out_cr);
+ std::ofstream out_crlf(dbname_out_crlf);
+ ASSERT_TRUE(out_crlf);
+ std::ofstream out_lf(dbname_out_lf);
+ ASSERT_TRUE(out_lf);
+
+ // Database should be correctly initialized by Setup()
+ ASSERT_TRUE(NSS_IsInitialized());
+ ASSERT_EQ(SECSuccess, NSS_Shutdown());
+
+ // Prepare the file formats with CR, CRLF and LF
+ for (std::string line; getline(in, line);) {
+ out_cr << line << "\r";
+ out_crlf << line << "\r\n";
+ out_lf << line << "\n";
+ }
+ in.close();
+ out_cr.close();
+ out_crlf.close();
+ out_lf.close();
+
+ // Change the pkcs11.txt to CR format.
+ ASSERT_TRUE(!remove(dbname_in.c_str()));
+ ASSERT_TRUE(!rename(dbname_out_cr.c_str(), dbname_in.c_str()));
+
+ // Try to initialize with CR format.
+ std::string nssInitArg("sql:");
+ nssInitArg.append(mNSSDBDir.GetUTF8Path());
+ ASSERT_EQ(SECSuccess, NSS_Initialize(nssInitArg.c_str(), "", "", SECMOD_DB,
+ NSS_INIT_NOROOTINIT));
+ ASSERT_TRUE(NSS_IsInitialized());
+ ASSERT_EQ(SECSuccess, NSS_Shutdown());
+
+ // Change the pkcs11.txt to CRLF format.
+ ASSERT_TRUE(!remove(dbname_in.c_str()));
+ ASSERT_TRUE(!rename(dbname_out_crlf.c_str(), dbname_in.c_str()));
+
+ // Try to initialize with CRLF format.
+ ASSERT_EQ(SECSuccess, NSS_Initialize(nssInitArg.c_str(), "", "", SECMOD_DB,
+ NSS_INIT_NOROOTINIT));
+ ASSERT_TRUE(NSS_IsInitialized());
+ ASSERT_EQ(SECSuccess, NSS_Shutdown());
+
+ // Change the pkcs11.txt to LF format.
+ ASSERT_TRUE(!remove(dbname_in.c_str()));
+ ASSERT_TRUE(!rename(dbname_out_lf.c_str(), dbname_in.c_str()));
+
+ // Try to initialize with LF format.
+ ASSERT_EQ(SECSuccess, NSS_Initialize(nssInitArg.c_str(), "", "", SECMOD_DB,
+ NSS_INIT_NOROOTINIT));
+ ASSERT_TRUE(NSS_IsInitialized());
+}
+
+class SoftokenNonAsciiTest : public SoftokenTest {
+ protected:
+ SoftokenNonAsciiTest() : SoftokenTest("SoftokenTest.\xF7-") {}
+};
+
+TEST_F(SoftokenNonAsciiTest, NonAsciiPathWorking) {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, nullptr));
+ EXPECT_EQ(SECSuccess, PK11_ResetToken(slot.get(), nullptr));
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, nullptr));
+}
+
+// This is just any X509 certificate. Its contents don't matter.
+static unsigned char certDER[] = {
+ 0x30, 0x82, 0x01, 0xEF, 0x30, 0x82, 0x01, 0x94, 0xA0, 0x03, 0x02, 0x01,
+ 0x02, 0x02, 0x14, 0x49, 0xC4, 0xC4, 0x4A, 0xB6, 0x86, 0x07, 0xA3, 0x06,
+ 0xDC, 0x4D, 0xC8, 0xC3, 0xFE, 0xC7, 0x21, 0x3A, 0x2D, 0xE4, 0xDA, 0x30,
+ 0x0B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B,
+ 0x30, 0x0F, 0x31, 0x0D, 0x30, 0x0B, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C,
+ 0x04, 0x74, 0x65, 0x73, 0x74, 0x30, 0x22, 0x18, 0x0F, 0x32, 0x30, 0x31,
+ 0x35, 0x31, 0x31, 0x32, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5A,
+ 0x18, 0x0F, 0x32, 0x30, 0x31, 0x38, 0x30, 0x32, 0x30, 0x35, 0x30, 0x30,
+ 0x30, 0x30, 0x30, 0x30, 0x5A, 0x30, 0x0F, 0x31, 0x0D, 0x30, 0x0B, 0x06,
+ 0x03, 0x55, 0x04, 0x03, 0x0C, 0x04, 0x74, 0x65, 0x73, 0x74, 0x30, 0x82,
+ 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D,
+ 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00, 0x30, 0x82,
+ 0x01, 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00, 0xBA, 0x88, 0x51, 0xA8, 0x44,
+ 0x8E, 0x16, 0xD6, 0x41, 0xFD, 0x6E, 0xB6, 0x88, 0x06, 0x36, 0x10, 0x3D,
+ 0x3C, 0x13, 0xD9, 0xEA, 0xE4, 0x35, 0x4A, 0xB4, 0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0xE1, 0xB3, 0x7B, 0x2F, 0x22, 0x6F, 0x69, 0xE3, 0xB4, 0x8A,
+ 0x95, 0x61, 0x1D, 0xEE, 0x26, 0xD6, 0x25, 0x9D, 0xAB, 0x91, 0x08, 0x4E,
+ 0x36, 0xCB, 0x1C, 0x24, 0x04, 0x2C, 0xBF, 0x16, 0x8B, 0x2F, 0xE5, 0xF1,
+ 0x8F, 0x99, 0x17, 0x31, 0xB8, 0xB3, 0xFE, 0x49, 0x23, 0xFA, 0x72, 0x51,
+ 0xC4, 0x31, 0xD5, 0x03, 0xAC, 0xDA, 0x18, 0x0A, 0x35, 0xED, 0x8D, 0x02,
+ 0x03, 0x01, 0x00, 0x01, 0x30, 0x0B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86,
+ 0xF7, 0x0D, 0x01, 0x01, 0x0B, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20,
+ 0x5C, 0x75, 0x51, 0x9F, 0x13, 0x11, 0x50, 0xCD, 0x5D, 0x8A, 0xDE, 0x20,
+ 0xA3, 0xBC, 0x06, 0x30, 0x91, 0xFF, 0xB2, 0x73, 0x75, 0x5F, 0x31, 0x64,
+ 0xEC, 0xFD, 0xCB, 0x42, 0x80, 0x0A, 0x70, 0xE6, 0x02, 0x21, 0x00, 0x82,
+ 0x12, 0xF7, 0xE5, 0xEA, 0x40, 0x27, 0xFD, 0xF7, 0xC0, 0x0E, 0x25, 0xF3,
+ 0x3E, 0x34, 0x95, 0x80, 0xB9, 0xA3, 0x38, 0xE0, 0x56, 0x68, 0xDA, 0xE5,
+ 0xC1, 0xF5, 0x37, 0xC7, 0xB5, 0xCE, 0x0D};
+
+struct PasswordPair {
+ const char *mInitialPassword;
+ const char *mSecondPassword;
+};
+
+class SoftokenPasswordChangeTest
+ : public SoftokenTest,
+ public ::testing::WithParamInterface<PasswordPair> {};
+
+TEST_P(SoftokenPasswordChangeTest, KeepTrustAfterPasswordChange) {
+ const PasswordPair &passwords = GetParam();
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ // Set a password.
+ EXPECT_EQ(SECSuccess,
+ PK11_InitPin(slot.get(), nullptr, passwords.mInitialPassword));
+ SECItem certDERItem = {siBuffer, certDER, sizeof(certDER)};
+ // Import a certificate.
+ ScopedCERTCertificate cert(CERT_NewTempCertificate(
+ CERT_GetDefaultCertDB(), &certDERItem, nullptr, true, true));
+ EXPECT_TRUE(cert);
+ SECStatus result =
+ PK11_ImportCert(slot.get(), cert.get(), CK_INVALID_HANDLE, "test", false);
+ EXPECT_EQ(SECSuccess, result);
+ // Set a trust value.
+ CERTCertTrust trust = {CERTDB_TRUSTED_CLIENT_CA | CERTDB_NS_TRUSTED_CA |
+ CERTDB_TRUSTED_CA | CERTDB_VALID_CA,
+ 0, 0};
+ result = CERT_ChangeCertTrust(nullptr, cert.get(), &trust);
+ EXPECT_EQ(SECSuccess, result);
+ // Release the certificate to ensure we get it from the DB rather than an
+ // in-memory cache, below.
+ cert = nullptr;
+ // Change the password.
+ result = PK11_ChangePW(slot.get(), passwords.mInitialPassword,
+ passwords.mSecondPassword);
+ EXPECT_EQ(SECSuccess, result);
+ // Look up the certificate again.
+ ScopedCERTCertificate newCert(
+ PK11_FindCertFromDERCertItem(slot.get(), &certDERItem, nullptr));
+ EXPECT_TRUE(newCert.get());
+ // The trust should be the same as before.
+ CERTCertTrust newTrust = {0, 0, 0};
+ result = CERT_GetCertTrust(newCert.get(), &newTrust);
+ EXPECT_EQ(SECSuccess, result);
+ EXPECT_EQ(trust.sslFlags, newTrust.sslFlags);
+ EXPECT_EQ(trust.emailFlags, newTrust.emailFlags);
+ EXPECT_EQ(trust.objectSigningFlags, newTrust.objectSigningFlags);
+}
+
+static const PasswordPair PASSWORD_CHANGE_TESTS[] = {
+ {"password", ""}, // non-empty to empty password
+ {"", "password"}, // empty to non-empty password
+ {"password", "password2"}, // non-empty to non-empty password
+};
+
+INSTANTIATE_TEST_SUITE_P(SoftokenPasswordChangeTests,
+ SoftokenPasswordChangeTest,
+ ::testing::ValuesIn(PASSWORD_CHANGE_TESTS));
+
+class SoftokenNoDBTest : public ::testing::Test {};
+
+TEST_F(SoftokenNoDBTest, NeedUserInitNoDB) {
+ ASSERT_EQ(SECSuccess, NSS_NoDB_Init("."));
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(PR_FALSE, PK11_NeedUserInit(slot.get()));
+
+ // When shutting down in here we have to release the slot first.
+ slot = nullptr;
+ ASSERT_EQ(SECSuccess, NSS_Shutdown());
+}
+
+SECStatus test_dh_value(const PQGParams *params, const SECItem *pub_key_value,
+ PRBool genFailOK, time_t *time) {
+ SECKEYDHParams dh_params;
+ dh_params.base = params->base;
+ dh_params.prime = params->prime;
+
+ ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
+ EXPECT_TRUE(slot);
+ if (!slot) return SECFailure;
+
+ /* create a private/public key pair in with the given params */
+ SECKEYPublicKey *pub_tmp = nullptr;
+ ScopedSECKEYPrivateKey priv_key(
+ PK11_GenerateKeyPair(slot.get(), CKM_DH_PKCS_KEY_PAIR_GEN, &dh_params,
+ &pub_tmp, PR_FALSE, PR_TRUE, nullptr));
+ if ((genFailOK) && ((priv_key.get() == nullptr) || (pub_tmp == nullptr))) {
+ return SECFailure;
+ }
+ EXPECT_NE(nullptr, priv_key.get())
+ << "PK11_GenerateKeyPair failed: " << PORT_ErrorToName(PORT_GetError());
+ EXPECT_NE(nullptr, pub_tmp);
+ if ((priv_key.get() == nullptr) || (pub_tmp == nullptr)) return SECFailure;
+ ScopedSECKEYPublicKey pub_key(pub_tmp);
+ ScopedSECKEYPublicKey peer_pub_key_manager(nullptr);
+ SECKEYPublicKey *peer_pub_key = pub_key.get();
+
+ /* if a subprime has been given set it on the PKCS #11 key */
+ if (params->subPrime.data != nullptr) {
+ SECStatus rv;
+ EXPECT_EQ(SECSuccess, rv = PK11_WriteRawAttribute(
+ PK11_TypePrivKey, priv_key.get(), CKA_SUBPRIME,
+ (SECItem *)&params->subPrime))
+ << "PK11_WriteRawAttribute failed: "
+ << PORT_ErrorToString(PORT_GetError());
+ if (rv != SECSuccess) {
+ return rv;
+ }
+ }
+
+ /* find if we weren't passed a public value in, use the
+ * one we just generated */
+ if (pub_key_value && pub_key_value->data) {
+ peer_pub_key = SECKEY_CopyPublicKey(pub_key.get());
+ EXPECT_NE(nullptr, peer_pub_key);
+ if (peer_pub_key == nullptr) {
+ return SECFailure;
+ }
+ peer_pub_key->u.dh.publicValue = *pub_key_value;
+ peer_pub_key_manager.reset(peer_pub_key);
+ }
+
+ /* now do the derive. time it and return the time if
+ * the caller requested it. */
+ auto start = high_resolution_clock::now();
+ ScopedPK11SymKey derivedKey(PK11_PubDerive(
+ priv_key.get(), peer_pub_key, PR_FALSE, nullptr, nullptr,
+ CKM_DH_PKCS_DERIVE, CKM_HKDF_DERIVE, CKA_DERIVE, 32, nullptr));
+ auto stop = high_resolution_clock::now();
+ if (!derivedKey) {
+ std::cerr << "PK11_PubDerive failed: "
+ << PORT_ErrorToString(PORT_GetError()) << std::endl;
+ }
+
+ if (time) {
+ auto duration = duration_cast<microseconds>(stop - start);
+ *time = duration.count();
+ }
+ return derivedKey ? SECSuccess : SECFailure;
+}
+
+class SoftokenDhTest : public SoftokenTest {
+ protected:
+ SoftokenDhTest() : SoftokenTest("SoftokenDhTest.d-") {}
+#ifdef NSS_USE_TIMING_CODE
+ time_t reference_time[CLASS_LAST] = {0};
+#endif
+
+ virtual void SetUp() {
+ SoftokenTest::SetUp();
+
+#ifdef NSS_USE_TIMING_CODE
+ ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
+ ASSERT_TRUE(slot);
+
+ time_t time;
+ for (int i = CLASS_FIRST; i < CLASS_LAST; i++) {
+ PQGParams params;
+ params.prime.data = (unsigned char *)reference_prime[i];
+ params.prime.len = reference_prime_len[i];
+ params.base.data = (unsigned char *)g2;
+ params.base.len = sizeof(g2);
+ params.subPrime.data = nullptr;
+ params.subPrime.len = 0;
+ ASSERT_EQ(SECSuccess, test_dh_value(&params, nullptr, PR_FALSE, &time));
+ reference_time[i] = time / 2 + 3 * time;
+ }
+#endif
+ };
+};
+
+const char *param_value(DhParamType param_type) {
+ switch (param_type) {
+ case TLS_APPROVED:
+ return "TLS_APPROVED";
+ case IKE_APPROVED:
+ return "IKE_APPROVED";
+ case SAFE_PRIME:
+ return "SAFE_PRIME";
+ case SAFE_PRIME_WITH_SUBPRIME:
+ return "SAFE_PRIME_WITH_SUBPRIME";
+ case KNOWN_SUBPRIME:
+ return "KNOWN_SUBPRIME";
+ case UNKNOWN_SUBPRIME:
+ return "UNKNOWN_SUBPRIME";
+ case WRONG_SUBPRIME:
+ return "WRONG_SUBPRIME";
+ case BAD_PUB_KEY:
+ return "BAD_PUB_KEY";
+ }
+ return "**Invalid**";
+}
+
+const char *key_value(DhKeyClass key_class) {
+ switch (key_class) {
+ case CLASS_1536:
+ return "CLASS_1536";
+ case CLASS_2048:
+ return "CLASS_2048";
+ case CLASS_3072:
+ return "CLASS_3072";
+ case CLASS_4096:
+ return "CLASS_4096";
+ case CLASS_6144:
+ return "CLASS_6144";
+ case CLASS_8192:
+ return "CLASS_8192";
+ case CLASS_LAST:
+ break;
+ }
+ return "**Invalid**";
+}
+
+class SoftokenDhValidate : public SoftokenDhTest,
+ public ::testing::WithParamInterface<DhTestVector> {
+};
+
+/* test the DH validation process. In non-fips mode, only BAD_PUB_KEY tests
+ * should fail */
+TEST_P(SoftokenDhValidate, DhVectors) {
+ const DhTestVector dhTestValues = GetParam();
+ std::string testId = (char *)(dhTestValues.id);
+ std::string err = "Test(" + testId + ") failed";
+ SECStatus rv;
+ time_t time;
+
+ PQGParams params;
+ params.prime = dhTestValues.p;
+ params.base = dhTestValues.g;
+ params.subPrime = dhTestValues.q;
+
+ std::cerr << "Test: " + testId << std::endl
+ << "param_type: " << param_value(dhTestValues.param_type)
+ << ", key_class: " << key_value(dhTestValues.key_class) << std::endl
+ << "p: " << DataBuffer(dhTestValues.p.data, dhTestValues.p.len)
+ << std::endl
+ << "g: " << DataBuffer(dhTestValues.g.data, dhTestValues.g.len)
+ << std::endl
+ << "q: " << DataBuffer(dhTestValues.q.data, dhTestValues.q.len)
+ << std::endl
+ << "pub_key: "
+ << DataBuffer(dhTestValues.pub_key.data, dhTestValues.pub_key.len)
+ << std::endl;
+ rv = test_dh_value(&params, &dhTestValues.pub_key, PR_FALSE, &time);
+
+ switch (dhTestValues.param_type) {
+ case TLS_APPROVED:
+ case IKE_APPROVED:
+ case SAFE_PRIME:
+ case UNKNOWN_SUBPRIME:
+ EXPECT_EQ(SECSuccess, rv) << err;
+#ifdef NSS_USE_TIMING_CODE
+ EXPECT_LE(time, reference_time[dhTestValues.key_class]) << err;
+#endif
+ break;
+ case KNOWN_SUBPRIME:
+ case SAFE_PRIME_WITH_SUBPRIME:
+ EXPECT_EQ(SECSuccess, rv) << err;
+#ifdef NSS_USE_TIMING_CODE
+ EXPECT_GT(time, reference_time[dhTestValues.key_class]) << err;
+#endif
+ break;
+ case WRONG_SUBPRIME:
+ case BAD_PUB_KEY:
+ EXPECT_EQ(SECFailure, rv) << err;
+ break;
+ }
+}
+
+INSTANTIATE_TEST_SUITE_P(DhValidateCases, SoftokenDhValidate,
+ ::testing::ValuesIn(DH_TEST_VECTORS));
+
+#ifndef NSS_FIPS_DISABLED
+
+class SoftokenFipsTest : public SoftokenTest {
+ protected:
+ SoftokenFipsTest() : SoftokenTest("SoftokenFipsTest.d-") {}
+ SoftokenFipsTest(const std::string &prefix) : SoftokenTest(prefix) {}
+
+ virtual void SetUp() {
+ SoftokenTest::SetUp();
+
+ // Turn on FIPS mode (code borrowed from FipsMode in modutil/pk11.c)
+ char *internal_name;
+ ASSERT_FALSE(PK11_IsFIPS());
+ internal_name = PR_smprintf("%s", SECMOD_GetInternalModule()->commonName);
+ ASSERT_EQ(SECSuccess, SECMOD_DeleteInternalModule(internal_name))
+ << PORT_ErrorToName(PORT_GetError());
+ PR_smprintf_free(internal_name);
+ ASSERT_TRUE(PK11_IsFIPS());
+ }
+};
+
+class SoftokenFipsDhTest : public SoftokenFipsTest {
+ protected:
+ SoftokenFipsDhTest() : SoftokenFipsTest("SoftokenFipsDhTest.d-") {}
+#ifdef NSS_USE_TIMING_CODE
+ time_t reference_time[CLASS_LAST] = {0};
+#endif
+
+ virtual void SetUp() {
+ SoftokenFipsTest::SetUp();
+
+ ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
+ ASSERT_TRUE(slot);
+
+ ASSERT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, ""));
+ ASSERT_EQ(SECSuccess, PK11_Authenticate(slot.get(), PR_FALSE, nullptr));
+
+#ifdef NSS_USE_TIMING_CODE
+ time_t time;
+ for (int i = CLASS_FIRST; i < CLASS_LAST; i++) {
+ PQGParams params;
+ params.prime.data = (unsigned char *)reference_prime[i];
+ params.prime.len = reference_prime_len[i];
+ params.base.data = (unsigned char *)g2;
+ params.base.len = sizeof(g2);
+ params.subPrime.data = nullptr;
+ params.subPrime.len = 0;
+ ASSERT_EQ(SECSuccess, test_dh_value(&params, nullptr, PR_FALSE, &time));
+ reference_time[i] = time / 2 + 3 * time;
+ }
+#endif
+ };
+};
+
+const std::vector<std::string> kFipsPasswordCases[] = {
+ // FIPS level1 -> level1 -> level1
+ {"", "", ""},
+ // FIPS level1 -> level1 -> level2
+ {"", "", "strong-_123"},
+ // FIXME: this should work: FIPS level1 -> level2 -> level2
+ // {"", "strong-_123", "strong-_456"},
+ // FIPS level2 -> level2 -> level2
+ {"strong-_123", "strong-_456", "strong-_123"}};
+
+const std::vector<std::string> kFipsPasswordBadCases[] = {
+ // FIPS level1 -> level2 -> level1
+ {"", "strong-_123", ""},
+ // FIPS level2 -> level1 -> level1
+ {"strong-_123", ""},
+ // FIPS level2 -> level2 -> level1
+ {"strong-_123", "strong-_456", ""},
+ // initialize with a weak password
+ {"weak"},
+ // FIPS level1 -> weak password
+ {"", "weak"},
+ // FIPS level2 -> weak password
+ {"strong-_123", "weak"}};
+
+class SoftokenFipsPasswordTest
+ : public SoftokenFipsTest,
+ public ::testing::WithParamInterface<std::vector<std::string>> {};
+
+class SoftokenFipsBadPasswordTest
+ : public SoftokenFipsTest,
+ public ::testing::WithParamInterface<std::vector<std::string>> {};
+
+TEST_P(SoftokenFipsPasswordTest, SetPassword) {
+ const std::vector<std::string> &passwords = GetParam();
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+
+ auto it = passwords.begin();
+ auto prev_it = it;
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, (*it).c_str()));
+ for (it++; it != passwords.end(); it++, prev_it++) {
+ EXPECT_EQ(SECSuccess,
+ PK11_ChangePW(slot.get(), (*prev_it).c_str(), (*it).c_str()));
+ }
+}
+
+TEST_P(SoftokenFipsBadPasswordTest, SetBadPassword) {
+ const std::vector<std::string> &passwords = GetParam();
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+
+ auto it = passwords.begin();
+ auto prev_it = it;
+ SECStatus rv = PK11_InitPin(slot.get(), nullptr, (*it).c_str());
+ if (it + 1 == passwords.end())
+ EXPECT_EQ(SECFailure, rv);
+ else
+ EXPECT_EQ(SECSuccess, rv);
+ for (it++; it != passwords.end(); it++, prev_it++) {
+ rv = PK11_ChangePW(slot.get(), (*prev_it).c_str(), (*it).c_str());
+ if (it + 1 == passwords.end())
+ EXPECT_EQ(SECFailure, rv);
+ else
+ EXPECT_EQ(SECSuccess, rv);
+ }
+}
+
+class SoftokenFipsDhValidate
+ : public SoftokenFipsDhTest,
+ public ::testing::WithParamInterface<DhTestVector> {};
+
+/* test the DH validation process. In fips mode, primes with unknown
+ * subprimes, and all sorts of bad public keys should fail */
+TEST_P(SoftokenFipsDhValidate, DhVectors) {
+ const DhTestVector dhTestValues = GetParam();
+ std::string testId = (char *)(dhTestValues.id);
+ std::string err = "Test(" + testId + ") failed";
+ time_t time;
+ PRBool genFailOK = PR_FALSE;
+ SECStatus rv;
+
+ PQGParams params;
+ params.prime = dhTestValues.p;
+ params.base = dhTestValues.g;
+ params.subPrime = dhTestValues.q;
+ std::cerr << "Test:" + testId << std::endl
+ << "param_type: " << param_value(dhTestValues.param_type)
+ << ", key_class: " << key_value(dhTestValues.key_class) << std::endl
+ << "p: " << DataBuffer(dhTestValues.p.data, dhTestValues.p.len)
+ << std::endl
+ << "g: " << DataBuffer(dhTestValues.g.data, dhTestValues.g.len)
+ << std::endl
+ << "q: " << DataBuffer(dhTestValues.q.data, dhTestValues.q.len)
+ << std::endl
+ << "pub_key: "
+ << DataBuffer(dhTestValues.pub_key.data, dhTestValues.pub_key.len)
+ << std::endl;
+
+ if ((dhTestValues.param_type != TLS_APPROVED) &&
+ (dhTestValues.param_type != IKE_APPROVED)) {
+ genFailOK = PR_TRUE;
+ }
+ rv = test_dh_value(&params, &dhTestValues.pub_key, genFailOK, &time);
+
+ switch (dhTestValues.param_type) {
+ case TLS_APPROVED:
+ case IKE_APPROVED:
+ EXPECT_EQ(SECSuccess, rv) << err;
+#ifdef NSS_USE_TIMING_CODE
+ EXPECT_LE(time, reference_time[dhTestValues.key_class]) << err;
+#endif
+ break;
+ case SAFE_PRIME:
+ case SAFE_PRIME_WITH_SUBPRIME:
+ case KNOWN_SUBPRIME:
+ case UNKNOWN_SUBPRIME:
+ case WRONG_SUBPRIME:
+ case BAD_PUB_KEY:
+ EXPECT_EQ(SECFailure, rv) << err;
+ break;
+ }
+}
+
+INSTANTIATE_TEST_SUITE_P(FipsPasswordCases, SoftokenFipsPasswordTest,
+ ::testing::ValuesIn(kFipsPasswordCases));
+
+INSTANTIATE_TEST_SUITE_P(BadFipsPasswordCases, SoftokenFipsBadPasswordTest,
+ ::testing::ValuesIn(kFipsPasswordBadCases));
+
+INSTANTIATE_TEST_SUITE_P(FipsDhCases, SoftokenFipsDhValidate,
+ ::testing::ValuesIn(DH_TEST_VECTORS));
+#endif
+
+} // namespace nss_test
+
+int main(int argc, char **argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+
+ return RUN_ALL_TESTS();
+}
diff --git a/security/nss/gtests/softoken_gtest/softoken_gtest.gyp b/security/nss/gtests/softoken_gtest/softoken_gtest.gyp
new file mode 100644
index 0000000000..f364dbe334
--- /dev/null
+++ b/security/nss/gtests/softoken_gtest/softoken_gtest.gyp
@@ -0,0 +1,59 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../common/gtest.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'softoken_gtest',
+ 'type': 'executable',
+ 'sources': [
+ 'softoken_gtest.cc',
+ 'softoken_nssckbi_testlib_gtest.cc',
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/cpputil/cpputil.gyp:cpputil',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ '<(DEPTH)/gtests/google_test/google_test.gyp:gtest',
+ ],
+ 'conditions': [
+ [ 'static_libs==1', {
+ 'dependencies': [
+ '<(DEPTH)/lib/nss/nss.gyp:nss_static',
+ '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap_static',
+ '<(DEPTH)/lib/cryptohi/cryptohi.gyp:cryptohi',
+ '<(DEPTH)/lib/certhigh/certhigh.gyp:certhi',
+ '<(DEPTH)/lib/certdb/certdb.gyp:certdb',
+ '<(DEPTH)/lib/base/base.gyp:nssb',
+ '<(DEPTH)/lib/dev/dev.gyp:nssdev',
+ '<(DEPTH)/lib/pki/pki.gyp:nsspki',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl',
+ '<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix',
+ ],
+ }, {
+ 'dependencies': [
+ '<(DEPTH)/lib/nss/nss.gyp:nss3',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl3',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3',
+ ],
+ }],
+ ],
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../lib/util'
+ ],
+ 'defines': [
+ 'DLL_PREFIX=\"<(dll_prefix)\"',
+ 'DLL_SUFFIX=\"<(dll_suffix)\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/security/nss/gtests/softoken_gtest/softoken_nssckbi_testlib_gtest.cc b/security/nss/gtests/softoken_gtest/softoken_nssckbi_testlib_gtest.cc
new file mode 100644
index 0000000000..e7d6bc28b5
--- /dev/null
+++ b/security/nss/gtests/softoken_gtest/softoken_nssckbi_testlib_gtest.cc
@@ -0,0 +1,124 @@
+#include "cert.h"
+#include "certdb.h"
+#include "nspr.h"
+#include "nss.h"
+#include "pk11pub.h"
+#include "secerr.h"
+
+#include "nss_scoped_ptrs.h"
+#include "util.h"
+
+#define GTEST_HAS_RTTI 0
+#include "gtest/gtest.h"
+
+namespace nss_test {
+
+class SoftokenBuiltinsTest : public ::testing::Test {
+ protected:
+ SoftokenBuiltinsTest() : nss_db_dir_("SoftokenBuiltinsTest.d-") {}
+ SoftokenBuiltinsTest(const std::string &prefix) : nss_db_dir_(prefix) {}
+
+ virtual void SetUp() {
+ std::string nss_init_arg("sql:");
+ nss_init_arg.append(nss_db_dir_.GetUTF8Path());
+ ASSERT_EQ(SECSuccess, NSS_Initialize(nss_init_arg.c_str(), "", "",
+ SECMOD_DB, NSS_INIT_NOROOTINIT));
+ }
+
+ virtual void TearDown() {
+ ASSERT_EQ(SECSuccess, NSS_Shutdown());
+ const std::string &nss_db_dir_path = nss_db_dir_.GetPath();
+ ASSERT_EQ(0, unlink((nss_db_dir_path + "/cert9.db").c_str()));
+ ASSERT_EQ(0, unlink((nss_db_dir_path + "/key4.db").c_str()));
+ ASSERT_EQ(0, unlink((nss_db_dir_path + "/pkcs11.txt").c_str()));
+ }
+
+ virtual void LoadModule() {
+ ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+ ASSERT_TRUE(slot);
+ EXPECT_EQ(SECSuccess, PK11_InitPin(slot.get(), nullptr, nullptr));
+ SECStatus result = SECMOD_AddNewModule(
+ "Builtins-testlib", DLL_PREFIX "nssckbi-testlib." DLL_SUFFIX, 0, 0);
+ ASSERT_EQ(result, SECSuccess);
+ }
+
+ ScopedUniqueDirectory nss_db_dir_;
+};
+
+// The next tests in this class are used to test the Distrust Fields.
+// More details about these fields in lib/ckfw/builtins/README.
+TEST_F(SoftokenBuiltinsTest, CheckNoDistrustFields) {
+ const char *kCertNickname =
+ "Builtin Object Token:Distrust Fields Test - no_distrust";
+ LoadModule();
+
+ CERTCertDBHandle *cert_handle = CERT_GetDefaultCertDB();
+ ASSERT_TRUE(cert_handle);
+ ScopedCERTCertificate cert(
+ CERT_FindCertByNickname(cert_handle, kCertNickname));
+ ASSERT_TRUE(cert);
+
+ EXPECT_EQ(PR_FALSE,
+ PK11_HasAttributeSet(cert->slot, cert->pkcs11ID,
+ CKA_NSS_SERVER_DISTRUST_AFTER, PR_FALSE));
+ EXPECT_EQ(PR_FALSE,
+ PK11_HasAttributeSet(cert->slot, cert->pkcs11ID,
+ CKA_NSS_EMAIL_DISTRUST_AFTER, PR_FALSE));
+ ASSERT_FALSE(cert->distrust);
+}
+
+TEST_F(SoftokenBuiltinsTest, CheckOkDistrustFields) {
+ const char *kCertNickname =
+ "Builtin Object Token:Distrust Fields Test - ok_distrust";
+ LoadModule();
+
+ CERTCertDBHandle *cert_handle = CERT_GetDefaultCertDB();
+ ASSERT_TRUE(cert_handle);
+ ScopedCERTCertificate cert(
+ CERT_FindCertByNickname(cert_handle, kCertNickname));
+ ASSERT_TRUE(cert);
+
+ const char *kExpectedDERValueServer = "200617000000Z";
+ const char *kExpectedDERValueEmail = "071014085320Z";
+ // When a valid timestamp is encoded, the result length is exactly 13.
+ const unsigned int kDistrustFieldSize = 13;
+
+ ASSERT_TRUE(cert->distrust);
+ ASSERT_EQ(kDistrustFieldSize, cert->distrust->serverDistrustAfter.len);
+ ASSERT_NE(nullptr, cert->distrust->serverDistrustAfter.data);
+ EXPECT_TRUE(!memcmp(kExpectedDERValueServer,
+ cert->distrust->serverDistrustAfter.data,
+ kDistrustFieldSize));
+
+ ASSERT_EQ(kDistrustFieldSize, cert->distrust->emailDistrustAfter.len);
+ ASSERT_NE(nullptr, cert->distrust->emailDistrustAfter.data);
+ EXPECT_TRUE(!memcmp(kExpectedDERValueEmail,
+ cert->distrust->emailDistrustAfter.data,
+ kDistrustFieldSize));
+}
+
+TEST_F(SoftokenBuiltinsTest, CheckInvalidDistrustFields) {
+ const char *kCertNickname =
+ "Builtin Object Token:Distrust Fields Test - err_distrust";
+ LoadModule();
+
+ CERTCertDBHandle *cert_handle = CERT_GetDefaultCertDB();
+ ASSERT_TRUE(cert_handle);
+ ScopedCERTCertificate cert(
+ CERT_FindCertByNickname(cert_handle, kCertNickname));
+ ASSERT_TRUE(cert);
+
+ // The field should never be set to TRUE in production, we are just
+ // testing if this field is readable, even if set to TRUE.
+ EXPECT_EQ(PR_TRUE,
+ PK11_HasAttributeSet(cert->slot, cert->pkcs11ID,
+ CKA_NSS_SERVER_DISTRUST_AFTER, PR_FALSE));
+ // If something other than CK_BBOOL CK_TRUE, it will be considered FALSE
+ // Here, there is an OCTAL value, but with unexpected content (1 digit less).
+ EXPECT_EQ(PR_FALSE,
+ PK11_HasAttributeSet(cert->slot, cert->pkcs11ID,
+ CKA_NSS_EMAIL_DISTRUST_AFTER, PR_FALSE));
+ ASSERT_FALSE(cert->distrust);
+}
+
+} // namespace nss_test