Compare commits
266 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
117904af75 | ||
|
|
5fe03d3913 | ||
|
|
80a8f5a3f8 | ||
|
|
537c2cef8c | ||
|
|
a604aac163 | ||
|
|
c99abc8d2d | ||
|
|
8528926729 | ||
|
|
b940d2b757 | ||
|
|
1c353878db | ||
|
|
9ae7d12cea | ||
|
|
72ab2385f9 | ||
|
|
f20863c707 | ||
|
|
923a0828c6 | ||
|
|
9713a51349 | ||
|
|
7d99899c84 | ||
|
|
8800e2b198 | ||
|
|
e152eba84f | ||
|
|
8d7e0c16e5 | ||
|
|
c1a19bc961 | ||
|
|
4b07a07351 | ||
|
|
46c3dbdc3d | ||
|
|
3ce53b8f23 | ||
|
|
8eb8871086 | ||
|
|
c912527553 | ||
|
|
94a814ad29 | ||
|
|
0e47038a38 | ||
|
|
a6b5971706 | ||
|
|
bc2e179b05 | ||
|
|
1b792e8970 | ||
|
|
a1fdf422a4 | ||
|
|
6eadeeede7 | ||
|
|
2e3eef8d0b | ||
|
|
4436503372 | ||
|
|
2078d428ac | ||
|
|
f5e7a76ada | ||
|
|
4eea0aaadb | ||
|
|
0da876eb6e | ||
|
|
0a70d6e5a5 | ||
|
|
c082112060 | ||
|
|
a02a56c72a | ||
|
|
9179093aa6 | ||
|
|
b3bf5a4b57 | ||
|
|
97717e128c | ||
|
|
f904297318 | ||
|
|
c322fd4ce2 | ||
|
|
7a963c96b2 | ||
|
|
b40f26ee71 | ||
|
|
5b2f53fc24 | ||
|
|
78c186d68b | ||
|
|
a5c303c526 | ||
|
|
d11658ac7e | ||
|
|
2e20259fc5 |
||
|
|
d99edd1158 | ||
|
|
3ba95b4e6d |
||
|
|
9420b56ac3 |
||
|
|
5ddb492599 |
||
|
|
ab34898fd4 |
||
|
|
746cb03e25 |
||
|
|
2bdda3a809 |
||
|
|
493bb4aa7b |
||
|
|
c285f42bbe |
||
|
|
410a644f5b | ||
|
|
7f35208eca |
||
|
|
2360d75a85 |
||
|
|
12fcec8a23 | ||
|
|
ed6e518933 | ||
|
|
ef1f194244 | ||
|
|
9a23e7f5cd |
||
|
|
7983668370 | ||
|
|
ea71f8dfa8 | ||
|
|
e88705bd74 |
||
|
|
1c86aae278 | ||
|
|
faa802de5a | ||
|
|
b3fa07dc54 | ||
|
|
297e6280a5 | ||
|
|
37b1b613d2 | ||
|
|
3b1f91342a | ||
|
|
a9f44e8e59 | ||
|
|
e5848562c6 | ||
|
|
8a88a4bee4 | ||
|
|
8c57561b09 | ||
|
|
5b97003412 | ||
|
|
1ef41fe34b | ||
|
|
7939bc1609 | ||
|
|
167cff7975 | ||
|
|
2fff7ce02e | ||
|
|
8138473262 | ||
|
|
af791c1ba6 | ||
|
|
a9f294d68c | ||
|
|
8abf80e788 | ||
|
|
3b8e99f54d | ||
|
|
89863272ee | ||
|
|
4a9ae95d97 | ||
|
|
ff3ede0b35 | ||
|
|
8a77a14ab9 | ||
|
|
b982271bc3 | ||
|
|
5caf7e1665 | ||
|
|
f760740a2b | ||
|
|
0bf3c58252 | ||
|
|
9ff440494f | ||
|
|
0b58cf9e56 | ||
|
|
535c4fae51 | ||
|
|
0b3033dcf4 | ||
|
|
a580405acc | ||
|
|
37aceda53b | ||
|
|
2a6b0539cc | ||
|
|
4d0b92b333 | ||
|
|
245982b2c4 | ||
|
|
6f68ada6a7 | ||
|
|
4ecb833a82 | ||
|
|
8f25129254 | ||
|
|
a0090873a5 | ||
|
|
b09fff4da1 | ||
|
|
466a27e84d | ||
|
|
51aa05789c | ||
|
|
3a93ebecac | ||
|
|
ef0e3207fd | ||
|
|
e698f2504c | ||
|
|
0d4d4780af | ||
|
|
0d673b36cc | ||
|
|
f73f7ce1e4 | ||
|
|
e5fecd4da4 | ||
|
|
8b34570da2 | ||
|
|
6b70690de5 | ||
|
|
a73f735839 | ||
|
|
2bb137e19d | ||
|
|
c77e79a71e | ||
|
|
614e62c67d | ||
|
|
d4e86043ee | ||
|
|
661472da51 | ||
|
|
08dea7d5c7 | ||
|
|
2d5d6d2cf7 | ||
|
|
d81f1e4f76 | ||
|
|
c2e2fc0161 | ||
|
|
208c55f1d2 | ||
|
|
27b7534706 | ||
|
|
965c121198 | ||
|
|
9699d7efc7 | ||
|
|
3f35603021 | ||
|
|
614f823eb3 | ||
|
|
26f93fa193 | ||
|
|
047dc3ed4e | ||
|
|
fc0174ead1 | ||
|
|
3c018618ca | ||
|
|
65271d923d | ||
|
|
9ae0f0b9e1 | ||
|
|
2b122e4485 | ||
|
|
507a1cebf0 | ||
|
|
7f30e21d0f | ||
|
|
aa7d80b11e | ||
|
|
f512836b78 | ||
|
|
58ca69fcaf | ||
|
|
bd89f2ce5c | ||
|
|
9e1e74ca17 | ||
|
|
37c40ebd3d | ||
|
|
656c979c95 | ||
|
|
0b17c92d39 | ||
|
|
3c27dc2471 | ||
|
|
36505c331d | ||
|
|
6e689ce0cb | ||
|
|
703a4f9a95 | ||
|
|
1e2f8acd14 | ||
|
|
74b268dbd9 | ||
|
|
541296170e | ||
|
|
f3ad534c37 | ||
|
|
a8a8d020bf | ||
|
|
704f2e22d6 | ||
|
|
4f639ad73c | ||
|
|
8c9ed11be4 | ||
|
|
115989f50d | ||
|
|
2ec4745f30 | ||
|
|
626f1941fd | ||
|
|
16706fe38d | ||
|
|
d86af7693a | ||
|
|
fa84af3e06 | ||
|
|
2f14d11d0d | ||
|
|
3f3c20ae17 | ||
|
|
326f5d0c9a | ||
|
|
c5b7db61f4 | ||
|
|
7b734a0c80 | ||
|
|
c7e445694f | ||
|
|
3ea5d2fb0e | ||
|
|
4567b678cc | ||
|
|
141e716639 | ||
|
|
5deb5dd362 | ||
|
|
d3f6891026 | ||
|
|
df8d75ac51 | ||
|
|
b3b17b08a0 | ||
|
|
455711f1df | ||
|
|
0e03f768ab | ||
|
|
e5e5a75933 | ||
|
|
431c940fc5 | ||
|
|
41b9b6b6a1 | ||
|
|
f572eae5ce | ||
|
|
b250b65666 | ||
|
|
5221baae09 | ||
|
|
cab16c0490 | ||
|
|
af46412ffe | ||
|
|
e557c2c2a1 | ||
|
|
8be7f95db1 | ||
|
|
7bdb9fac17 | ||
|
|
71d6df3266 | ||
|
|
390eaefc52 | ||
|
|
4b42d21883 | ||
|
|
ec4d144b47 | ||
|
|
705e2b3229 | ||
|
|
26c062714a | ||
|
|
c29d479b7f | ||
|
|
18c140b4c2 | ||
|
|
bdf4e9ddaf | ||
|
|
93c1de8b0d | ||
|
|
db341dd2e0 | ||
|
|
89b8b47d46 | ||
|
|
e4c3da9da7 | ||
|
|
137780ff5d | ||
|
|
6f4f615c05 | ||
|
|
2b3aa61f20 | ||
|
|
3b822a7262 | ||
|
|
8d5d06f814 | ||
|
|
26f23aeeb6 | ||
|
|
dfa19ec931 | ||
|
|
e874285f92 | ||
|
|
abfbe95c8d | ||
|
|
e42c9742c4 | ||
|
|
93dca340cd | ||
|
|
a24d6b1353 | ||
|
|
418745fdce | ||
|
|
03874d1272 | ||
|
|
2007524db8 | ||
|
|
67567fd852 | ||
|
|
2eadf22a1d | ||
|
|
3edcb8bd09 | ||
|
|
b33603605a |
||
|
|
7504d3f5b2 | ||
|
|
51a16f5968 | ||
|
|
1689d12cbb | ||
|
|
0a70bce56d | ||
|
|
ccf407af47 | ||
|
|
08f152ebf9 | ||
|
|
bd239c046a | ||
|
|
6d15c06123 | ||
|
|
423cf344b1 | ||
|
|
cd77ff2c17 | ||
|
|
c4dce982fc | ||
|
|
24e850cb0b | ||
|
|
06c6c5b05b | ||
|
|
8a8a89e2ed | ||
|
|
c6bdcf333a | ||
|
|
3e4febd5a1 | ||
|
|
61169569b1 | ||
|
|
2d62c98a25 | ||
|
|
7ae9f54af6 | ||
|
|
3bbfdef75c | ||
|
|
7a90b2748d | ||
|
|
943827bba4 | ||
|
|
82b3129713 | ||
|
|
4b45ae6d65 | ||
|
|
314afd2133 | ||
|
|
b2ceaeb648 | ||
|
|
5ed56146a2 | ||
|
|
4a49c5748c | ||
|
|
405310c946 | ||
|
|
cd8db2917d | ||
|
|
17cd27bdca | ||
|
|
b6664ebb77 | ||
|
|
8b601d64b2 |
43 changed files with 109011 additions and 828 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
98
.gitignore
vendored
98
.gitignore
vendored
|
|
@ -16,3 +16,101 @@ TestUser51.cert
|
|||
/nss-3.28.1.tar.gz
|
||||
/nss-3.29.0.tar.gz
|
||||
/nss-3.29.1.tar.gz
|
||||
/nss-3.30.0.tar.gz
|
||||
/nss-3.30.2.tar.gz
|
||||
/nss-3.31.0.tar.gz
|
||||
/nss-3.32.0.tar.gz
|
||||
/nss-3.32.1.tar.gz
|
||||
/nss-3.33.0.tar.gz
|
||||
/nss-3.34.0.tar.gz
|
||||
/nss-3.35.0.tar.gz
|
||||
/nss-3.36.0.tar.gz
|
||||
/nss-3.36.1.tar.gz
|
||||
/nss-3.37.1.tar.gz
|
||||
/nss-3.37.3.tar.gz
|
||||
/nss-3.38.0.tar.gz
|
||||
/nss-3.39.tar.gz
|
||||
/nss-3.40.1.tar.gz
|
||||
/nss-3.41.tar.gz
|
||||
/nss-3.42.tar.gz
|
||||
/nss-3.42.1.tar.gz
|
||||
/nss-3.43.tar.gz
|
||||
/nss-3.44.tar.gz
|
||||
/nss-3.44.1.tar.gz
|
||||
/nss-3.45.tar.gz
|
||||
/nss-3.46.tar.gz
|
||||
/nss-3.46.1.tar.gz
|
||||
/nss-3.47.tar.gz
|
||||
/nss-3.47.1.tar.gz
|
||||
/nss-3.48.tar.gz
|
||||
/nss-3.49.tar.gz
|
||||
/nss-3.49.2.tar.gz
|
||||
/nss-3.50.tar.gz
|
||||
/nss-3.51.tar.gz
|
||||
/nss-3.51.1.tar.gz
|
||||
/nss-3.52.tar.gz
|
||||
/nss-3.53.tar.gz
|
||||
/nss-3.54.tar.gz
|
||||
/nss-3.55.tar.gz
|
||||
/nss-3.56.tar.gz
|
||||
/nss-3.57.tar.gz
|
||||
/nss-3.58.tar.gz
|
||||
/nspr-4.29.tar.gz
|
||||
/nss-3.59.tar.gz
|
||||
/nss-3.60.1.tar.gz
|
||||
/nss-3.62.tar.gz
|
||||
/nss-3.63.tar.gz
|
||||
/nspr-4.30.tar.gz
|
||||
/nss-3.65.tar.gz
|
||||
/nss-3.67.tar.gz
|
||||
/nspr-4.31.tar.gz
|
||||
/nss-3.69.tar.gz
|
||||
/nspr-4.32.tar.gz
|
||||
/nss-3.71.tar.gz
|
||||
/nss-3.73.tar.gz
|
||||
/nss-3.75.tar.gz
|
||||
/nss-3.77.tar.gz
|
||||
/nss-3.79.tar.gz
|
||||
/nspr-4.34.tar.gz
|
||||
/nss-3.81.tar.gz
|
||||
/nss-3.83.tar.gz
|
||||
/nspr-4.35.tar.gz
|
||||
/nss-3.85.tar.gz
|
||||
/nss-3.87.tar.gz
|
||||
/nss-3.88.1.tar.gz
|
||||
/nss-3.89.tar.gz
|
||||
/nss-3.89-with-nspr-4.35.tar.gz
|
||||
/nss-3.90-with-nspr-4.35.tar.gz
|
||||
/nss-3.91-with-nspr-4.35.tar.gz
|
||||
/nss-3.92-with-nspr-4.35.tar.gz
|
||||
/nss-3.93-with-nspr-4.35.tar.gz
|
||||
/nss-3.94-with-nspr-4.35.tar.gz
|
||||
/nss-3.95-with-nspr-4.35.tar.gz
|
||||
/nss-3.96-with-nspr-4.35.tar.gz
|
||||
/nss-3.96.1-with-nspr-4.35.tar.gz
|
||||
/nss-3.97-with-nspr-4.35.tar.gz
|
||||
/nss-3.98-with-nspr-4.35.tar.gz
|
||||
/nss-3.99-with-nspr-4.35.tar.gz
|
||||
/nss-3.100-with-nspr-4.35.tar.gz
|
||||
/nss-3.101-with-nspr-4.35.tar.gz
|
||||
/nss-3.103-with-nspr-4.35.tar.gz
|
||||
/nss-3.104-with-nspr-4.35.tar.gz
|
||||
/nss-3.105-with-nspr-4.35.tar.gz
|
||||
/nss-3.106-with-nspr-4.36.tar.gz
|
||||
/nss-3.107-with-nspr-4.36.tar.gz
|
||||
/nss-3.108-with-nspr-4.36.tar.gz
|
||||
/nss-3.109-with-nspr-4.36.tar.gz
|
||||
/nss-3.110-with-nspr-4.36.tar.gz
|
||||
/nss-3.111-with-nspr-4.36.tar.gz
|
||||
/nss-3.112-with-nspr-4.36.tar.gz
|
||||
/nss-3.113-with-nspr-4.36.tar.gz
|
||||
/nss-3.114-with-nspr-4.37.tar.gz
|
||||
/nss-3.115-with-nspr-4.37.tar.gz
|
||||
/nss-3.115.1-with-nspr-4.37.tar.gz
|
||||
/nss-3.116-with-nspr-4.37.tar.gz
|
||||
/nss-3.117-with-nspr-4.37.tar.gz
|
||||
/nss-3.118.1-with-nspr-4.37.tar.gz
|
||||
/nss-3.118-ml-dsa-test-for-sign-verify-pkcs12_files.tar.xz
|
||||
/nss-3.119-with-nspr-4.38.2.tar.gz
|
||||
/nss-3.119.1-with-nspr-4.38.2.tar.gz
|
||||
/nss-3_119_1-with-nspr-4.38.2.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
diff -up nss/coreconf/Linux.mk.relro nss/coreconf/Linux.mk
|
||||
--- nss/coreconf/Linux.mk.relro 2013-04-09 14:29:45.943228682 -0700
|
||||
+++ nss/coreconf/Linux.mk 2013-04-09 14:31:26.194953927 -0700
|
||||
@@ -174,6 +174,12 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
+# harden DSOs/executables a bit against exploits
|
||||
+ifeq (2.6,$(firstword $(sort 2.6 $(OS_RELEASE))))
|
||||
+DSO_LDOPTS+=-Wl,-z,relro
|
||||
+LDFLAGS += -Wl,-z,relro
|
||||
+endif
|
||||
+
|
||||
USE_SYSTEM_ZLIB = 1
|
||||
ZLIB_LIBS = -lz
|
||||
|
||||
1
ci.fmf
Normal file
1
ci.fmf
Normal file
|
|
@ -0,0 +1 @@
|
|||
resultsdb-testcase: separate
|
||||
220
iquote.patch
220
iquote.patch
|
|
@ -1,211 +1,13 @@
|
|||
diff -up ./nss/cmd/certcgi/Makefile.iquote ./nss/cmd/certcgi/Makefile
|
||||
--- ./nss/cmd/certcgi/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/cmd/certcgi/Makefile 2016-03-05 12:04:06.216474144 -0800
|
||||
@@ -36,7 +36,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
+INCLUDES += -iquote $(DIST)/../private/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/cmd/certutil/Makefile.iquote ./nss/cmd/certutil/Makefile
|
||||
--- ./nss/cmd/certutil/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/cmd/certutil/Makefile 2016-03-05 12:04:06.216474144 -0800
|
||||
@@ -37,7 +37,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
+INCLUDES += -iquote $(DIST)/../private/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/cmd/lib/Makefile.iquote ./nss/cmd/lib/Makefile
|
||||
--- ./nss/cmd/lib/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/cmd/lib/Makefile 2016-03-05 12:04:06.216474144 -0800
|
||||
@@ -38,7 +38,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../private/nss
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/cmd/modutil/Makefile.iquote ./nss/cmd/modutil/Makefile
|
||||
--- ./nss/cmd/modutil/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/cmd/modutil/Makefile 2016-03-05 12:04:06.216474144 -0800
|
||||
@@ -37,6 +37,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
|
||||
|
||||
#######################################################################
|
||||
diff -up ./nss/cmd/selfserv/Makefile.iquote ./nss/cmd/selfserv/Makefile
|
||||
--- ./nss/cmd/selfserv/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/cmd/selfserv/Makefile 2016-03-05 12:04:06.216474144 -0800
|
||||
@@ -35,7 +35,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
+INCLUDES += -iquote $(DIST)/../private/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/cmd/ssltap/Makefile.iquote ./nss/cmd/ssltap/Makefile
|
||||
--- ./nss/cmd/ssltap/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/cmd/ssltap/Makefile 2016-03-05 12:04:06.216474144 -0800
|
||||
@@ -39,7 +39,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../private/nss
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/cmd/strsclnt/Makefile.iquote ./nss/cmd/strsclnt/Makefile
|
||||
--- ./nss/cmd/strsclnt/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/cmd/strsclnt/Makefile 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -36,7 +36,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
+INCLUDES += -iquote $(DIST)/../private/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/cmd/tstclnt/Makefile.iquote ./nss/cmd/tstclnt/Makefile
|
||||
--- ./nss/cmd/tstclnt/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/cmd/tstclnt/Makefile 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -37,6 +37,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
#######################################################################
|
||||
|
||||
#include ../platlibs.mk
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
+INCLUDES += -iquote $(DIST)/../private/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/cmd/vfyserv/Makefile.iquote ./nss/cmd/vfyserv/Makefile
|
||||
--- ./nss/cmd/vfyserv/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/cmd/vfyserv/Makefile 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -37,6 +37,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
#######################################################################
|
||||
|
||||
#include ../platlibs.mk
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
+INCLUDES += -iquote $(DIST)/../private/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/coreconf/location.mk.iquote ./nss/coreconf/location.mk
|
||||
--- ./nss/coreconf/location.mk.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/coreconf/location.mk 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -45,6 +45,10 @@ endif
|
||||
|
||||
ifdef NSS_INCLUDE_DIR
|
||||
INCLUDES += -I$(NSS_INCLUDE_DIR)
|
||||
+ ifdef IN_TREE_FREEBL_HEADERS_FIRST
|
||||
+ INCLUDES += -iquote $(DIST)/../public/nss
|
||||
+ INCLUDES += -iquote $(DIST)/../private/nss
|
||||
+ endif
|
||||
diff -up nss/coreconf/location.mk.iquote nss/coreconf/location.mk
|
||||
--- nss/coreconf/location.mk.iquote 2017-07-27 16:09:32.000000000 +0200
|
||||
+++ nss/coreconf/location.mk 2017-09-06 13:23:14.633611555 +0200
|
||||
@@ -75,4 +75,9 @@ ifndef SQLITE_LIB_NAME
|
||||
SQLITE_LIB_NAME = sqlite3
|
||||
endif
|
||||
|
||||
ifndef NSS_LIB_DIR
|
||||
diff -up ./nss/gtests/pk11_gtest/Makefile.iquote ./nss/gtests/pk11_gtest/Makefile
|
||||
--- ./nss/gtests/pk11_gtest/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/gtests/pk11_gtest/Makefile 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -37,6 +37,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/gtests/ssl_gtest/Makefile.iquote ./nss/gtests/ssl_gtest/Makefile
|
||||
--- ./nss/gtests/ssl_gtest/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/gtests/ssl_gtest/Makefile 2016-03-05 12:05:17.208082475 -0800
|
||||
@@ -43,6 +43,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/lib/certhigh/Makefile.iquote ./nss/lib/certhigh/Makefile
|
||||
--- ./nss/lib/certhigh/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/lib/certhigh/Makefile 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -38,7 +38,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/lib/cryptohi/Makefile.iquote ./nss/lib/cryptohi/Makefile
|
||||
--- ./nss/lib/cryptohi/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/lib/cryptohi/Makefile 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -38,7 +38,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/lib/nss/Makefile.iquote ./nss/lib/nss/Makefile
|
||||
--- ./nss/lib/nss/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/lib/nss/Makefile 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -37,7 +37,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
+INCLUDES += -iquote $(DIST)/../private/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/lib/pk11wrap/Makefile.iquote ./nss/lib/pk11wrap/Makefile
|
||||
--- ./nss/lib/pk11wrap/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/lib/pk11wrap/Makefile 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -38,7 +38,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
diff -up ./nss/lib/ssl/Makefile.iquote ./nss/lib/ssl/Makefile
|
||||
--- ./nss/lib/ssl/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
|
||||
+++ ./nss/lib/ssl/Makefile 2016-03-05 12:04:06.217474124 -0800
|
||||
@@ -49,7 +49,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
-
|
||||
+INCLUDES += -iquote $(DIST)/../public/nss
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
+# Prefer in-tree headers over system headers
|
||||
+ifdef IN_TREE_FREEBL_HEADERS_FIRST
|
||||
+ INCLUDES += -iquote $(DIST)/../public/nss -iquote $(DIST)/../private/nss
|
||||
+endif
|
||||
+
|
||||
MK_LOCATION = included
|
||||
|
|
|
|||
37
nspr-config-pc.patch
Normal file
37
nspr-config-pc.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
diff -up nspr/config/nspr-config.in.flags nspr/config/nspr-config.in
|
||||
--- nspr/config/nspr-config.in.flags 2013-05-29 13:46:34.147971410 -0700
|
||||
+++ nspr/config/nspr-config.in 2013-05-29 14:17:10.990838914 -0700
|
||||
@@ -102,7 +102,7 @@ if test -z "$includedir"; then
|
||||
includedir=@includedir@
|
||||
fi
|
||||
if test -z "$libdir"; then
|
||||
- libdir=@libdir@
|
||||
+ libdir=`pkg-config --variable=libdir nspr`
|
||||
fi
|
||||
|
||||
if test "$echo_prefix" = "yes"; then
|
||||
@@ -136,12 +136,12 @@ if test "$echo_libs" = "yes"; then
|
||||
if test -n "$lib_nspr"; then
|
||||
libdirs="$libdirs -lnspr${major_version}"
|
||||
fi
|
||||
- os_ldflags="@LDFLAGS@"
|
||||
+ os_ldflags=`pkg-config --variable=ldflags nspr`
|
||||
for i in $os_ldflags ; do
|
||||
if echo $i | grep \^-L >/dev/null; then
|
||||
libdirs="$libdirs $i"
|
||||
fi
|
||||
done
|
||||
- echo $libdirs @OS_LIBS@
|
||||
+ echo $libdirs `pkg-config --variable=os_libs nspr`
|
||||
fi
|
||||
|
||||
diff -up nspr/config/nspr.pc.in.flags nspr/config/nspr.pc.in
|
||||
--- nspr/config/nspr.pc.in.flags 2013-05-29 13:48:15.026643570 -0700
|
||||
+++ nspr/config/nspr.pc.in 2013-05-29 13:49:47.795202949 -0700
|
||||
@@ -6,5 +6,5 @@ includedir=@includedir@
|
||||
Name: NSPR
|
||||
Description: The Netscape Portable Runtime
|
||||
Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@
|
||||
-Libs: -L@libdir@ -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@
|
||||
+Libs: -L@libdir@ -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ @OS_LIBS@
|
||||
Cflags: -I@includedir@
|
||||
127
nspr-config.xml
Normal file
127
nspr-config.xml
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
|
||||
<!ENTITY date SYSTEM "date.xml">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
]>
|
||||
|
||||
<refentry id="nspr-config">
|
||||
|
||||
<refentryinfo>
|
||||
<date>&date;</date>
|
||||
<title>Netscape Portable Runtime</title>
|
||||
<productname>nspr</productname>
|
||||
<productnumber>&version;</productnumber>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>nspr-config</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>nspr-config</refname>
|
||||
<refpurpose>Return meta information about nspr libraries</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>nspr-config</command>
|
||||
<arg><option>--prefix</option></arg>
|
||||
<arg><option>--exec-prefix</option></arg>
|
||||
<arg><option>--includedir</option></arg>
|
||||
<arg><option>--libs</option></arg>
|
||||
<arg><option>--cflags</option></arg>
|
||||
<arg><option>--libdir</option></arg>
|
||||
<arg><option>--version</option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection id="description">
|
||||
<title>Description</title>
|
||||
<para><command>nspr-config</command> is a shell script which can be used to obtain gcc options for building client pacakges of nspr.</para>
|
||||
</refsection>
|
||||
|
||||
<refsection>
|
||||
<title>Options</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>--prefix</option></term>
|
||||
<listitem><simpara>Returns the top level system directory under which the nspr libraries are installed.</simpara></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--exec-prefix</option></term>
|
||||
<listitem><simpara>Returns the top level system directory under which any nspr binaries would be installed.</simpara></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--includedir</option> <replaceable>count</replaceable></term>
|
||||
<listitem><simpara>Returns the path to the directory were the nspr headers are installed.</simpara></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--version</option></term>
|
||||
<listitem><simpara>Returns the upstream version of nspr in the form major_version-minor_version-patch_version.</simpara></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--libs</option></term>
|
||||
<listitem><simpara>Returns the compiler linking flags.</simpara></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--cflags</option></term>
|
||||
<listitem><simpara>Returns the compiler include flags.</simpara></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--libdir</option></term>
|
||||
<listitem><simpara>Returns the path to the directory were the nspr libraries are installed.</simpara></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsection>
|
||||
|
||||
<refsection>
|
||||
<title>Examples</title>
|
||||
|
||||
<para>The following example will query for both include path and linkage flags:
|
||||
<programlisting>
|
||||
/usr/bin/nspr-config --cflags --libs
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection>
|
||||
<title>Files</title>
|
||||
|
||||
<para><filename>/usr/bin/nspr-config</filename></para>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection>
|
||||
<title>See also</title>
|
||||
<para>pkg-config(1)</para>
|
||||
</refsection>
|
||||
|
||||
<refsection id="authors">
|
||||
<title>Authors</title>
|
||||
<para>The NSPR liraries were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</para>
|
||||
<para>
|
||||
Authors: Elio Maldonado <emaldona@redhat.com>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<!-- don't change -->
|
||||
<refsection id="license">
|
||||
<title>LICENSE</title>
|
||||
<para>Licensed under 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/.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
</refentry>
|
||||
|
||||
51
nspr-gcc-atomics.patch
Normal file
51
nspr-gcc-atomics.patch
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h
|
||||
--- ./pr/include/md/_linux.h.gcc-atomics 2022-09-20 11:23:22.008942926 -0700
|
||||
+++ ./pr/include/md/_linux.h 2022-09-20 11:34:45.536751340 -0700
|
||||
@@ -105,6 +105,15 @@
|
||||
#endif
|
||||
|
||||
#if defined(__i386__)
|
||||
+#if defined(__GNUC__)
|
||||
+/* Use GCC built-in functions */
|
||||
+#define _PR_HAVE_ATOMIC_OPS
|
||||
+#define _MD_INIT_ATOMIC()
|
||||
+#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
|
||||
+#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
|
||||
+#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
|
||||
+#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
|
||||
+#else
|
||||
#define _PR_HAVE_ATOMIC_OPS
|
||||
#define _MD_INIT_ATOMIC()
|
||||
extern PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val);
|
||||
@@ -116,6 +125,7 @@ extern PRInt32 _PR_x86_AtomicAdd(PRInt32
|
||||
extern PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||
#define _MD_ATOMIC_SET _PR_x86_AtomicSet
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(__ia64__)
|
||||
#define _PR_HAVE_ATOMIC_OPS
|
||||
@@ -131,6 +141,15 @@ extern PRInt32 _PR_ia64_AtomicSet(PRInt3
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__)
|
||||
+#if defined(__GNUC__)
|
||||
+/* Use GCC built-in functions */
|
||||
+#define _PR_HAVE_ATOMIC_OPS
|
||||
+#define _MD_INIT_ATOMIC()
|
||||
+#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
|
||||
+#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
|
||||
+#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
|
||||
+#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
|
||||
+#else
|
||||
#define _PR_HAVE_ATOMIC_OPS
|
||||
#define _MD_INIT_ATOMIC()
|
||||
extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val);
|
||||
@@ -142,6 +161,7 @@ extern PRInt32 _PR_x86_64_AtomicAdd(PRIn
|
||||
extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||
#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(__loongarch__)
|
||||
#if defined(__GNUC__)
|
||||
12
nss-3.110-dissable_test-ssl_policy_pkix_oscp.patch
Normal file
12
nss-3.110-dissable_test-ssl_policy_pkix_oscp.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up nss/tests/ssl/ssl.sh.ignore_test nss/tests/ssl/ssl.sh
|
||||
--- nss/tests/ssl/ssl.sh.ignore_test 2025-04-22 10:30:10.569990667 +0200
|
||||
+++ nss/tests/ssl/ssl.sh 2025-04-22 10:30:34.773327320 +0200
|
||||
@@ -1600,7 +1600,7 @@ ssl_run_tests()
|
||||
if using_sql ; then
|
||||
ssl_policy_listsuites
|
||||
ssl_policy_selfserv
|
||||
- ssl_policy_pkix_ocsp
|
||||
+# ssl_policy_pkix_ocsp
|
||||
ssl_policy
|
||||
fi
|
||||
;;
|
||||
21026
nss-3.118-ml-dsa-leancrypto.patch
Normal file
21026
nss-3.118-ml-dsa-leancrypto.patch
Normal file
File diff suppressed because it is too large
Load diff
610
nss-3.118-ml-dsa-test-for-sign-verify-pkcs12.patch
Normal file
610
nss-3.118-ml-dsa-test-for-sign-verify-pkcs12.patch
Normal file
|
|
@ -0,0 +1,610 @@
|
|||
diff --git a/cmd/certutil/certutil.c b/cmd/certutil/certutil.c
|
||||
--- a/cmd/certutil/certutil.c
|
||||
+++ b/cmd/certutil/certutil.c
|
||||
@@ -1158,12 +1158,14 @@
|
||||
"\t\t [-f pwfile] [-z noisefile] [-d certdir] [-P dbprefix]\n", progName);
|
||||
FPS "\t%s -G [-h token-name] -k dsa [-q pqgfile -g key-size] [-f pwfile]\n"
|
||||
"\t\t [-z noisefile] [-d certdir] [-P dbprefix]\n", progName);
|
||||
FPS "\t%s -G [-h token-name] -k ec -q curve [-f pwfile]\n"
|
||||
"\t\t [-z noisefile] [-d certdir] [-P dbprefix]\n", progName);
|
||||
- FPS "\t%s -K [-n key-name] [-h token-name] [-k dsa|ec|rsa|all]\n",
|
||||
- progName);
|
||||
+ FPS "\t%s -G [-h token-name] -k mldsa -q paramset [-f pwfile]\n"
|
||||
+ "\t\t [-z noisefile] [-d certdir] [-P dbprefix]\n", progName);
|
||||
+ FPS "\t%s -K [-n key-name] [-h token-name] [-k dsa|ec|rsa|mldsa|all]\n",
|
||||
+ progName);
|
||||
FPS "\t\t [-f pwfile] [-X] [-d certdir] [-P dbprefix]\n");
|
||||
FPS "\t%s --upgrade-merge --source-dir upgradeDir --upgrade-id uniqueID\n",
|
||||
progName);
|
||||
FPS "\t\t [--upgrade-token-name tokenName] [-d targetDBDir]\n");
|
||||
FPS "\t\t [-P targetDBPrefix] [--source-prefix upgradeDBPrefix]\n");
|
||||
@@ -1392,10 +1394,13 @@
|
||||
FPS "%-20s c2pnb208w1, c2tnb239v1, c2tnb239v2, c2tnb239v3, \n", "");
|
||||
FPS "%-20s c2pnb272w1, c2pnb304w1, \n", "");
|
||||
FPS "%-20s c2tnb359w1, c2pnb368w1, c2tnb431r1, secp112r1, \n", "");
|
||||
FPS "%-20s secp112r2, secp128r1, secp128r2, sect113r1, sect113r2\n", "");
|
||||
FPS "%-20s sect131r1, sect131r2\n", "");
|
||||
+ FPS "%-20s ML-DSA parameter set (mldsa only)\n",
|
||||
+ " -q paramset");
|
||||
+ FPS "%-20s valid values are ml-dsa-44, ml-dsa-65, ml-dsa-87:\n", "");
|
||||
FPS "%-20s Key database directory (default is ~/.netscape)\n",
|
||||
" -d keydir");
|
||||
FPS "%-20s Cert & Key database prefix\n",
|
||||
" -P dbprefix");
|
||||
FPS "%-20s\n"
|
||||
@@ -1484,10 +1489,11 @@
|
||||
FPS "%-20s Name of token to search (\"all\" for all tokens)\n",
|
||||
" -h token-name ");
|
||||
|
||||
FPS "%-20s Key type (\"all\" (default), \"dsa\","
|
||||
" \"ec\","
|
||||
+ " \"mldsa\","
|
||||
" \"rsa\")\n",
|
||||
" -k key-type");
|
||||
FPS "%-20s The nickname of the key or associated certificate\n",
|
||||
" -n name");
|
||||
FPS "%-20s Specify the password file\n",
|
||||
@@ -1644,10 +1650,14 @@
|
||||
" -q pqgfile");
|
||||
FPS "%-20s Elliptic curve name (ec only)\n",
|
||||
" -q curve-name");
|
||||
FPS "%-20s See the \"-G\" option for a full list of supported names.\n",
|
||||
"");
|
||||
+ FPS "%-20s ML-DSA parameter set (mldsa only)\n",
|
||||
+ " -q paramset");
|
||||
+ FPS "%-20s See the \"-G\" option for a full list of supported names.\n",
|
||||
+ "");
|
||||
FPS "%-20s Specify the password file\n",
|
||||
" -f pwfile");
|
||||
FPS "%-20s Key database directory (default is ~/.netscape)\n",
|
||||
" -d keydir");
|
||||
FPS "%-20s Cert & Key database prefix\n",
|
||||
@@ -1824,10 +1834,14 @@
|
||||
" -q pqgfile");
|
||||
FPS "%-20s Elliptic curve name (ec only)\n",
|
||||
" -q curve-name");
|
||||
FPS "%-20s See the \"-G\" option for a full list of supported names.\n",
|
||||
"");
|
||||
+ FPS "%-20s ML-DSA parameter set (mldsa only)\n",
|
||||
+ " -q paramset");
|
||||
+ FPS "%-20s See the \"-G\" option for a full list of supported names.\n",
|
||||
+ "");
|
||||
FPS "%-20s Self sign\n",
|
||||
" -x");
|
||||
FPS "%-20s Sign the certificate with RSA-PSS (the issuer key must be rsa)\n",
|
||||
" --pss-sign");
|
||||
FPS "%-20s Cert serial number\n",
|
||||
@@ -2776,13 +2790,38 @@
|
||||
upgradeID = certutil.options[opt_UpgradeID].arg;
|
||||
|
||||
if (certutil.options[opt_UpgradeTokenName].activated)
|
||||
upgradeTokenName = certutil.options[opt_UpgradeTokenName].arg;
|
||||
|
||||
+ /* must be before opt_KeySize! */
|
||||
+ /* -k key type */
|
||||
+ if (certutil.options[opt_KeyType].activated) {
|
||||
+ char *arg = certutil.options[opt_KeyType].arg;
|
||||
+ if (PL_strcmp(arg, "rsa") == 0) {
|
||||
+ keytype = rsaKey;
|
||||
+ } else if (PL_strcmp(arg, "dsa") == 0) {
|
||||
+ keytype = dsaKey;
|
||||
+ } else if (PL_strcmp(arg, "ec") == 0) {
|
||||
+ keytype = ecKey;
|
||||
+ } else if (PL_strcmp(arg, "mldsa") == 0) {
|
||||
+ keytype = mldsaKey;
|
||||
+ } else if (PL_strcmp(arg, "all") == 0) {
|
||||
+ keytype = nullKey;
|
||||
+ } else {
|
||||
+ /* use an existing private/public key pair */
|
||||
+ keysource = arg;
|
||||
+ }
|
||||
+ } else if (certutil.commands[cmd_ListKeys].activated) {
|
||||
+ keytype = nullKey;
|
||||
+ }
|
||||
+
|
||||
if (certutil.options[opt_KeySize].activated) {
|
||||
keysize = PORT_Atoi(certutil.options[opt_KeySize].arg);
|
||||
- if ((keysize < MIN_KEY_BITS) || (keysize > MAX_KEY_BITS)) {
|
||||
+ /* mldsa limits are much different that rsa and dsa, don't
|
||||
+ * do the check here */
|
||||
+ if ((keytype != mldsaKey) &&
|
||||
+ ((keysize < MIN_KEY_BITS) || (keysize > MAX_KEY_BITS))) {
|
||||
PR_fprintf(PR_STDERR,
|
||||
"%s -g: Keysize must be between %d and %d.\n",
|
||||
progName, MIN_KEY_BITS, MAX_KEY_BITS);
|
||||
return 255;
|
||||
}
|
||||
@@ -2809,29 +2848,10 @@
|
||||
progName, arg);
|
||||
return 255;
|
||||
}
|
||||
}
|
||||
|
||||
- /* -k key type */
|
||||
- if (certutil.options[opt_KeyType].activated) {
|
||||
- char *arg = certutil.options[opt_KeyType].arg;
|
||||
- if (PL_strcmp(arg, "rsa") == 0) {
|
||||
- keytype = rsaKey;
|
||||
- } else if (PL_strcmp(arg, "dsa") == 0) {
|
||||
- keytype = dsaKey;
|
||||
- } else if (PL_strcmp(arg, "ec") == 0) {
|
||||
- keytype = ecKey;
|
||||
- } else if (PL_strcmp(arg, "all") == 0) {
|
||||
- keytype = nullKey;
|
||||
- } else {
|
||||
- /* use an existing private/public key pair */
|
||||
- keysource = arg;
|
||||
- }
|
||||
- } else if (certutil.commands[cmd_ListKeys].activated) {
|
||||
- keytype = nullKey;
|
||||
- }
|
||||
-
|
||||
if (certutil.options[opt_KeyOpFlagsOn].activated) {
|
||||
keyOpFlagsOn = GetOpFlags(certutil.options[opt_KeyOpFlagsOn].arg);
|
||||
}
|
||||
if (certutil.options[opt_KeyOpFlagsOff].activated) {
|
||||
keyOpFlagsOff = GetOpFlags(certutil.options[opt_KeyOpFlagsOff].arg);
|
||||
@@ -2870,13 +2890,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* -q PQG file or curve name */
|
||||
if (certutil.options[opt_PQGFile].activated) {
|
||||
- if ((keytype != dsaKey) && (keytype != ecKey)) {
|
||||
+ if ((keytype != dsaKey) && (keytype != ecKey) &&
|
||||
+ (keytype != mldsaKey)) {
|
||||
PR_fprintf(PR_STDERR, "%s -q: specifies a PQG file for DSA keys"
|
||||
- " (-k dsa) or a named curve for EC keys (-k ec)\n)",
|
||||
+ " (-k dsa)\n"
|
||||
+ " or a named curve for EC keys (-k ec)\n"
|
||||
+ " or a parameter set for ML-DSA keys (-k mldsa)\n",
|
||||
progName);
|
||||
return 255;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/cmd/certutil/keystuff.c b/cmd/certutil/keystuff.c
|
||||
--- a/cmd/certutil/keystuff.c
|
||||
+++ b/cmd/certutil/keystuff.c
|
||||
@@ -515,10 +515,11 @@
|
||||
CK_FLAGS opFlagsOff, secuPWData *pwdata)
|
||||
{
|
||||
CK_MECHANISM_TYPE mechanism;
|
||||
PK11RSAGenParams rsaparams;
|
||||
SECKEYPQGParams *dsaparams = NULL;
|
||||
+ CK_ULONG paramSet;
|
||||
void *params;
|
||||
SECKEYPrivateKey *privKey = NULL;
|
||||
|
||||
if (slot == NULL)
|
||||
return NULL;
|
||||
@@ -567,10 +568,54 @@
|
||||
mechanism = CKM_EC_KEY_PAIR_GEN;
|
||||
/* For EC keys, PQGFile determines EC parameters */
|
||||
if ((params = (void *)getECParams(pqgFile)) == NULL)
|
||||
return NULL;
|
||||
break;
|
||||
+ case mldsaKey:
|
||||
+ mechanism = CKM_ML_DSA_KEY_PAIR_GEN;
|
||||
+ /* set paramset */
|
||||
+ paramSet = 0;
|
||||
+ if (pqgFile) {
|
||||
+ if (PORT_Strcasecmp(pqgFile, "ML-DSA-44") == 0) {
|
||||
+ paramSet = CKP_ML_DSA_44;
|
||||
+ } else if (PORT_Strcasecmp(pqgFile, "ML-DSA-65") == 0) {
|
||||
+ paramSet = CKP_ML_DSA_65;
|
||||
+ } else if (PORT_Strcasecmp(pqgFile, "ML-DSA-87") == 0) {
|
||||
+ paramSet = CKP_ML_DSA_87;
|
||||
+ } else {
|
||||
+ /* if we set pqgfile, it had better be right, don't
|
||||
+ * fall back to key size */
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ } else
|
||||
+ switch (size) {
|
||||
+ /* optionally use the size, either the actual size in bytes
|
||||
+ * or the short hand ('44', '65', '87') */
|
||||
+ case 44:
|
||||
+ case 2560:
|
||||
+ paramSet = CKP_ML_DSA_44;
|
||||
+ break;
|
||||
+ case 65:
|
||||
+ case 4032:
|
||||
+ paramSet = CKP_ML_DSA_65;
|
||||
+ break;
|
||||
+ case 87:
|
||||
+ case 4896:
|
||||
+ paramSet = CKP_ML_DSA_87;
|
||||
+ break;
|
||||
+ default:
|
||||
+ /* force a size to be specified somewhere */
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ /* paranoia, shouldn't be able to happen logically. Code
|
||||
+ * scanners will scream, but I like belt and suspenders */
|
||||
+ if (paramSet == 0) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ params = ¶mSet;
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fprintf(stderr, "\n\n");
|
||||
diff --git a/cmd/pk11importtest/pk11importtest.c b/cmd/pk11importtest/pk11importtest.c
|
||||
--- a/cmd/pk11importtest/pk11importtest.c
|
||||
+++ b/cmd/pk11importtest/pk11importtest.c
|
||||
@@ -64,11 +64,10 @@
|
||||
SECKEYPrivateKey *privKey = NULL;
|
||||
PK11GenericObject *objs = NULL;
|
||||
PK11GenericObject *obj = NULL;
|
||||
SECKEYEncryptedPrivateKeyInfo *epki = NULL;
|
||||
PRBool keyFound = 0;
|
||||
- KeyType keyType;
|
||||
|
||||
fprintf(stderr, "Testing %s PrivateKeyImport ***********************\n",
|
||||
testname);
|
||||
|
||||
/* generate a temp key */
|
||||
@@ -88,28 +87,19 @@
|
||||
SECU_PrintError(progName, "PK11_ExportEncryptedPrivKeyInfo Failed");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Save the public value, which we will need on import */
|
||||
- keyType = pubKey->keyType;
|
||||
- switch (keyType) {
|
||||
- case rsaKey:
|
||||
- SECITEM_CopyItem(NULL, &pubValue, &pubKey->u.rsa.modulus);
|
||||
- break;
|
||||
- case dhKey:
|
||||
- SECITEM_CopyItem(NULL, &pubValue, &pubKey->u.dh.publicValue);
|
||||
- break;
|
||||
- case dsaKey:
|
||||
- SECITEM_CopyItem(NULL, &pubValue, &pubKey->u.dsa.publicValue);
|
||||
- break;
|
||||
- case ecKey:
|
||||
- SECITEM_CopyItem(NULL, &pubValue, &pubKey->u.ec.publicValue);
|
||||
- break;
|
||||
- default:
|
||||
- fprintf(stderr, "Unknown keytype = %d\n", keyType);
|
||||
- goto cleanup;
|
||||
+ const SECItem *constValue = PK11_GetPublicValueFromPublicKey(pubKey);
|
||||
+ KeyType keyType = pubKey->keyType;
|
||||
+
|
||||
+ if (constValue == NULL) {
|
||||
+ fprintf(stderr, "Unknown keytype = %d\n", keyType);
|
||||
+ goto cleanup;
|
||||
}
|
||||
+
|
||||
+ SECITEM_CopyItem(NULL, &pubValue, constValue);
|
||||
if (pubValue.data == NULL) {
|
||||
SECU_PrintError(progName, "Unable to allocate memory");
|
||||
goto cleanup;
|
||||
}
|
||||
dumpItem("pubValue", &pubValue);
|
||||
@@ -218,23 +207,25 @@
|
||||
opt_PWFile,
|
||||
opt_PWString,
|
||||
opt_NoRSA,
|
||||
opt_NoDSA,
|
||||
opt_NoEC,
|
||||
- opt_NoDH
|
||||
+ opt_NoDH,
|
||||
+ opt_NoMLDSA,
|
||||
};
|
||||
|
||||
static secuCommandFlag options[] = {
|
||||
{ /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_KeySize */ 'k', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_ECCurve */ 'C', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_PWFile */ 'f', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_PWString */ 'p', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_NORSA */ 'r', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_NoDSA */ 'D', PR_TRUE, 0, PR_FALSE },
|
||||
+ { /* opt_NoEC */ 'e', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_NoDH */ 'h', PR_TRUE, 0, PR_FALSE },
|
||||
- { /* opt_NoEC */ 'e', PR_TRUE, 0, PR_FALSE },
|
||||
+ { /* opt_NoMLDSA */ 'm', PR_TRUE, 0, PR_FALSE },
|
||||
};
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -246,11 +237,13 @@
|
||||
secuPWData pwArgs = { PW_NONE, 0 };
|
||||
PRBool doRSA = PR_TRUE;
|
||||
PRBool doDSA = PR_TRUE;
|
||||
PRBool doDH = PR_FALSE; /* NSS currently can't export wrapped DH keys */
|
||||
PRBool doEC = PR_TRUE;
|
||||
+ PRBool doMLDSA = PR_FALSE;
|
||||
PQGParams *pqgParams = NULL;
|
||||
+ CK_ULONG paramSet = CKP_ML_DSA_44;
|
||||
int keySize;
|
||||
|
||||
args.numCommands = 0;
|
||||
args.numOptions = sizeof(options) / sizeof(secuCommandFlag);
|
||||
args.commands = NULL;
|
||||
@@ -298,10 +291,13 @@
|
||||
doDH = PR_FALSE;
|
||||
}
|
||||
if (args.options[opt_NoEC].activated) {
|
||||
doEC = PR_FALSE;
|
||||
}
|
||||
+ if (args.options[opt_NoMLDSA].activated) {
|
||||
+ doMLDSA = PR_FALSE;
|
||||
+ }
|
||||
|
||||
slot = PK11_GetInternalKeySlot();
|
||||
if (slot == NULL) {
|
||||
SECU_PrintError(progName, "Couldn't find the internal key slot\n");
|
||||
return 255;
|
||||
@@ -386,10 +382,20 @@
|
||||
fprintf(stderr, "ECC Import Failed!\n");
|
||||
failed = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
+ if (doMLDSA) {
|
||||
+ rv = handleEncryptedPrivateImportTest(progName, slot, "ML-DSA",
|
||||
+ CKM_ML_DSA_KEY_PAIR_GEN,
|
||||
+ ¶mSet, &pwArgs);
|
||||
+ if (rv != SECSuccess) {
|
||||
+ fprintf(stderr, "ML-DSA Import Failed!\n");
|
||||
+ failed = PR_TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (pqgParams) {
|
||||
PK11_PQG_DestroyParams(pqgParams);
|
||||
}
|
||||
|
||||
if (slot) {
|
||||
diff --git a/tests/cert/cert.sh b/tests/cert/cert.sh
|
||||
--- a/tests/cert/cert.sh
|
||||
+++ b/tests/cert/cert.sh
|
||||
@@ -104,10 +104,13 @@
|
||||
if [ -z ${NSS_DISABLE_DSA} ]; then
|
||||
cert_add_algorithm "DSA" "-dsa" "-k dsa" "true" 20000
|
||||
fi
|
||||
# NOTE: curve is added later, so the full command would be '-k ec -q curve'
|
||||
cert_add_algorithm "ECC" "-ec" "-k ec -q" "true" 10000
|
||||
+ cert_add_algorithm "ML-DSA-44" "-ml-dsa-44" "-k mldsa -q ml-dsa-44" "false" 30000
|
||||
+ cert_add_algorithm "ML-DSA-65" "-ml-dsa-65" "-k mldsa -q ml-dsa-65" "false" 40000
|
||||
+ cert_add_algorithm "ML-DSA-87" "-ml-dsa-87" "-k mldsa -q ml-dsa-87" "false" 50000
|
||||
# currently rsa-pss is only enabled for a subset of tests
|
||||
# this will enable a full suite of RSA-PSS certs, and we would
|
||||
# then remove the explicit ones
|
||||
# ulike the other tests, we would need to change ssl tests as this
|
||||
# will rename some of the RSA-PSS certificates.
|
||||
@@ -527,10 +530,19 @@
|
||||
cert_ec_CA "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}" "${ALG}"
|
||||
;;
|
||||
RSA-PSS)
|
||||
cert_rsa_pss_CA "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}" "${ALG}"
|
||||
;;
|
||||
+ ML-DSA-44)
|
||||
+ cert_ml_dsa_CA ml-dsa-44 "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}"
|
||||
+ ;;
|
||||
+ ML-DSA-65)
|
||||
+ cert_ml_dsa_CA ml-dsa-65 "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}"
|
||||
+ ;;
|
||||
+ ML-DSA-87)
|
||||
+ cert_ml_dsa_CA ml-dsa-65 "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}"
|
||||
+ ;;
|
||||
*)
|
||||
Exit 9 "Fatal - unknown key type ${KEY_TYPE}, failed to create CA cert"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -683,13 +695,72 @@
|
||||
Exit 7 "Fatal - failed to export dsa root cert"
|
||||
fi
|
||||
cp root-dsa.cert ${NICKNAME}.ca.cert
|
||||
}
|
||||
|
||||
++################################ cert_ml_dsa_CA #############################
|
||||
+# local shell function to build the Temp. Certificate Authority (CA)
|
||||
+# used for testing purposes, creating a CA Certificate and a root cert
|
||||
+# This is the ML-DSA version of cert_CA.
|
||||
+##########################################################################
|
||||
+cert_ml_dsa_CA()
|
||||
+{
|
||||
+ PARAM_SET=$1
|
||||
+ CUR_CADIR=$2
|
||||
+ NICKNAME=$3
|
||||
+ SIGNER=$4
|
||||
+ TRUSTARG=$5
|
||||
+ DOMAIN=$6
|
||||
+ CERTSERIAL=$7
|
||||
|
||||
+ echo "$SCRIPTNAME: Creating a ML-DSA ($PARAM_SET) CA Certificate $NICKNAME =========================="
|
||||
+
|
||||
+ if [ ! -d "${CUR_CADIR}" ]; then
|
||||
+ mkdir -p "${CUR_CADIR}"
|
||||
+ fi
|
||||
+ cd ${CUR_CADIR}
|
||||
+ pwd
|
||||
+
|
||||
+ LPROFILE=.
|
||||
+ if [ -n "${MULTIACCESS_DBM}" ]; then
|
||||
+ LPROFILE="multiaccess:${DOMAIN}"
|
||||
+ fi
|
||||
|
||||
+ ################# Creating a ML-DSA CA Cert ###############################
|
||||
+ #
|
||||
+ CU_ACTION="Creating ML-DSA ($PARAM_SET) CA Cert $NICKNAME "
|
||||
+ CU_SUBJECT=$ALL_CU_SUBJECT
|
||||
+ certu -S -n $NICKNAME -k mldsa -q $PARAM_SET -t $TRUSTARG -v 600 $SIGNER \
|
||||
+ -d ${LPROFILE} -1 -2 -5 -f ${R_PWFILE} -z ${R_NOISE_FILE} \
|
||||
+ -m $CERTSERIAL 2>&1 <<CERTSCRIPT
|
||||
+5
|
||||
+6
|
||||
+9
|
||||
+n
|
||||
+y
|
||||
+-1
|
||||
+n
|
||||
+5
|
||||
+6
|
||||
+7
|
||||
+9
|
||||
+n
|
||||
+CERTSCRIPT
|
||||
|
||||
+ if [ "$RET" -ne 0 ]; then
|
||||
+ echo "return value is $RET"
|
||||
+ Exit 6 "Fatal - failed to create ML-DSA ($PARAM_SET) CA cert"
|
||||
+ fi
|
||||
+
|
||||
+ ################# Exporting ML-DSA Root Cert ###############################
|
||||
+ #
|
||||
+ CU_ACTION="Exporting ML-DSA ($PARAM_SET) Root Cert"
|
||||
+ certu -L -n $NICKNAME -r -d ${LPROFILE} -o ${NICKNAME}.ca.cert
|
||||
+ if [ "$RET" -ne 0 ]; then
|
||||
+ Exit 7 "Fatal - failed to export $PARAM_SET root cert"
|
||||
+ fi
|
||||
+}
|
||||
|
||||
################################ cert_rsa_pss_CA #############################
|
||||
# local shell function to build the Temp. Certificate Authority (CA)
|
||||
# used for testing purposes, creating a CA Certificate and a root cert
|
||||
# This is the RSA-PSS version of cert_CA.
|
||||
@@ -1208,11 +1279,11 @@
|
||||
# local shell function to create certificates for FIPS tests
|
||||
##############################################################################
|
||||
cert_fips()
|
||||
{
|
||||
CERTFAILED=0
|
||||
- echo "$SCRIPTNAME: Creating FIPS 140 DSA Certificates =============="
|
||||
+ echo "$SCRIPTNAME: Creating FIPS 140 Certificates =============="
|
||||
cert_init_cert "${FIPSDIR}" "FIPS PUB 140 Test Certificate" 1000 "${D_FIPS}"
|
||||
|
||||
CU_ACTION="Initializing ${CERTNAME}'s Cert DB"
|
||||
certu -N -d "${PROFILEDIR}" -f "${R_FIPSPWFILE}" 2>&1
|
||||
|
||||
diff --git a/tests/tools/tools.sh b/tests/tools/tools.sh
|
||||
--- a/tests/tools/tools.sh
|
||||
+++ b/tests/tools/tools.sh
|
||||
@@ -126,10 +126,19 @@
|
||||
cp ${QADIR}/tools/pbmac1-valid-sha512.p12 ${TOOLSDIR}/data
|
||||
cp ${QADIR}/tools/pbmac1-invalid-bad-iter.p12 ${TOOLSDIR}/data
|
||||
cp ${QADIR}/tools/pbmac1-invalid-bad-salt.p12 ${TOOLSDIR}/data
|
||||
cp ${QADIR}/tools/pbmac1-invalid-no-length.p12 ${TOOLSDIR}/data
|
||||
cp ${QADIR}/tools/corrupted_cert_bag.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-44-both.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-44-key.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-65-both.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-65-key.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-87-both.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-87-key.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/openssl-ml-dsa-44.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/openssl-ml-dsa-65.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/openssl-ml-dsa-87.p12 ${TOOLSDIR}/data
|
||||
|
||||
cd ${TOOLSDIR}
|
||||
}
|
||||
|
||||
########################## list_p12_file ###############################
|
||||
@@ -479,10 +488,34 @@
|
||||
echo "pk12util -l Alice-ec-long.p12 -w ${R_LONGPWFILE}"
|
||||
${BINDIR}/pk12util -l Alice-ec-long.p12 -w ${R_LONGPWFILE} 2>&1
|
||||
ret=$?
|
||||
html_msg $ret 0 "Listing Alice's pk12 EC file with long pw (pk12util -l)"
|
||||
check_tmpfile
|
||||
+
|
||||
+ echo "$SCRIPTNAME: Exporting Alice's ML-DSA cert & key---------------"
|
||||
+ echo "pk12util -o Alice-mldsa.p12 -n \"Alice-ml-dsa-44\" -d ${P_R_ALICEDIR} -k ${R_PWFILE} \\"
|
||||
+ echo " -w ${R_PWFILE}"
|
||||
+ ${BINDIR}/pk12util -o Alice-mldsa.p12 -n "Alice-ml-dsa-44" -d ${P_R_ALICEDIR} -k ${R_PWFILE} \
|
||||
+ -w ${R_PWFILE} 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Exporting Alice's ML-DSA cert & key (pk12util -o)"
|
||||
+ check_tmpfile
|
||||
+ verify_p12 Alice-mldsa.p12 "default" "default" "default"
|
||||
+
|
||||
+ echo "$SCRIPTNAME: Importing Alice's ML-DSA cert & key --------------"
|
||||
+ echo "pk12util -i Alice-mldsa.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -w ${R_PWFILE}"
|
||||
+ ${BINDIR}/pk12util -i Alice-mldsa.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -w ${R_PWFILE} 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Importing Alice's ML-DSA cert & key (pk12util -i)"
|
||||
+ check_tmpfile
|
||||
+
|
||||
+ echo "$SCRIPTNAME: Listing Alice's pk12 ML-DSA file -----------------"
|
||||
+ echo "pk12util -l Alice-mldsa.p12 -w ${R_PWFILE}"
|
||||
+ ${BINDIR}/pk12util -l Alice-mldsa.p12 -w ${R_PWFILE} 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Listing Alice's pk12 ML-DSA file (pk12util -l)"
|
||||
+ check_tmpfile
|
||||
}
|
||||
|
||||
tools_p12_import_old_files()
|
||||
{
|
||||
echo "$SCRIPTNAME: Importing PKCS#12 files created with older NSS --------------"
|
||||
@@ -527,10 +560,37 @@
|
||||
check_tmpfile
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
+tools_p12_ml_dsa_import()
|
||||
+{
|
||||
+ echo "$SCRIPTNAME: Testing ml-dsa compatibility with pkcs12 --------------"
|
||||
+ for i in 44 65 87
|
||||
+ do
|
||||
+ echo "${BINDIR}/pk12util -i ${TOOLSDIR}/data/openssl-ml-dsa-$i.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W 'test' 2>&1"
|
||||
+ ${BINDIR}/pk12util -i ${TOOLSDIR}/data/openssl-ml-dsa-$i.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W 'test' 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Importing openssl encoded ml-dsa-$i private key from PKCS#12 file"
|
||||
+ check_tmpfile
|
||||
+ for j in 'key' 'both'
|
||||
+ do
|
||||
+ echo "${BINDIR}/pk12util -i ${TOOLSDIR}/data/ietf-ml-dsa-$i-$j.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W 'test' 2>&1"
|
||||
+ ${BINDIR}/pk12util -i ${TOOLSDIR}/data/ietf-ml-dsa-$i-$j.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W 'test' 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Importing openssl encoded ml-dsa-$i private key from PKCS#12 file"
|
||||
+ check_tmpfile
|
||||
+ html_msg $ret 0 "Importing ietf sample ml-dsa-$i-$j private key from PKCS#12 file"
|
||||
+
|
||||
+ # each cert has the same issuer/sn, so we can't hold more than one in
|
||||
+ # the data base
|
||||
+ echo "${BINDIR}/certutil -F -n "ietf ml-dsa-$i-$j sample" -d ${P_R_COPYDIR} -f ${R_PWFILE}"
|
||||
+ ${BINDIR}/certutil -F -n "ietf ml-dsa-$i-$j sample" -d ${P_R_COPYDIR} -f ${R_PWFILE}
|
||||
+ done
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
tools_p12_import_pbmac1_samples()
|
||||
{
|
||||
echo "$SCRIPTNAME: Importing private key pbmac1 PKCS#12 file --------------"
|
||||
echo "${BINDIR}/pk12util -i ${TOOLSDIR}/data/pbmac1-valid-sha256.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234'"
|
||||
${BINDIR}/pk12util -i ${TOOLSDIR}/data/pbmac1-valid-sha256.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234' 2>&1
|
||||
@@ -581,11 +641,11 @@
|
||||
# pkcs12 tests and complete in a reasonable time. Use the iterateration
|
||||
# count from the previous tests to determine how many tests
|
||||
# we can run.
|
||||
iteration_count=$(pp -t p12 -i Alice-ec.p12 | grep "Iterations: " | sed -e 's;.*Iterations: ;;' -e 's;(.*).*;;')
|
||||
echo "Iteration count=${iteration_count}"
|
||||
- if [ -n "${iteration_count}" -a ${iteration_count} -le 10000 ]; then
|
||||
+ if [-z "${NSS_PK12_SHORT_TESTS}" -a -n "${iteration_count}" -a ${iteration_count} -le 10000 ]; then
|
||||
tools_p12_export_list_import_all_pkcs5v2_ciphers
|
||||
tools_p12_export_list_import_all_pkcs12v2pbe_ciphers
|
||||
else
|
||||
tools_p12_export_list_import_most_ciphers
|
||||
fi
|
||||
@@ -593,10 +653,11 @@
|
||||
tools_p12_export_with_invalid_ciphers
|
||||
tools_p12_import_old_files
|
||||
tools_p12_import_pbmac1_samples
|
||||
if using_sql; then
|
||||
tools_p12_import_rsa_pss_private_key
|
||||
+ tools_p12_ml_dsa_import
|
||||
tools_p12_policy
|
||||
fi
|
||||
}
|
||||
|
||||
############################## tools_sign ##############################
|
||||
|
||||
|
||||
418
nss-3.118-ml-dsa-tls-test.patch
Normal file
418
nss-3.118-ml-dsa-tls-test.patch
Normal file
|
|
@ -0,0 +1,418 @@
|
|||
diff --git a/cmd/lib/secutil.c b/cmd/lib/secutil.c
|
||||
--- a/cmd/lib/secutil.c
|
||||
+++ b/cmd/lib/secutil.c
|
||||
@@ -4387,10 +4387,13 @@
|
||||
MAKE_SCHEME(rsa_pss_pss_sha512),
|
||||
MAKE_SCHEME(dsa_sha1),
|
||||
MAKE_SCHEME(dsa_sha256),
|
||||
MAKE_SCHEME(dsa_sha384),
|
||||
MAKE_SCHEME(dsa_sha512),
|
||||
+ MAKE_SCHEME(mldsa44),
|
||||
+ MAKE_SCHEME(mldsa65),
|
||||
+ MAKE_SCHEME(mldsa87),
|
||||
};
|
||||
|
||||
static const size_t sslSignatureSchemeStringLen =
|
||||
PR_ARRAY_SIZE(sslSignatureSchemeStringArray);
|
||||
|
||||
diff --git a/gtests/ssl_gtest/ssl_auth_unittest.cc b/gtests/ssl_gtest/ssl_auth_unittest.cc
|
||||
--- a/gtests/ssl_gtest/ssl_auth_unittest.cc
|
||||
+++ b/gtests/ssl_gtest/ssl_auth_unittest.cc
|
||||
@@ -2293,6 +2293,28 @@
|
||||
TlsConnectTestBase::kTlsV12,
|
||||
::testing::Values(TlsAgent::kServerEcdsa256,
|
||||
TlsAgent::kServerEcdsa384),
|
||||
::testing::Values(ssl_auth_ecdsa),
|
||||
::testing::Values(ssl_sig_ecdsa_sha1)));
|
||||
+// ML-DSA is only allowed to be used in TLS 1.3 or greater
|
||||
+INSTANTIATE_TEST_SUITE_P(
|
||||
+ SignatureSchemeMlDsa44Tls13, TlsSignatureSchemeConfiguration,
|
||||
+ ::testing::Combine(TlsConnectTestBase::kTlsVariantsAll,
|
||||
+ TlsConnectTestBase::kTlsV13,
|
||||
+ ::testing::Values(TlsAgent::kServerMlDsa44),
|
||||
+ ::testing::Values(ssl_auth_mldsa44),
|
||||
+ ::testing::Values(ssl_sig_mldsa44)));
|
||||
+INSTANTIATE_TEST_SUITE_P(
|
||||
+ SignatureSchemeMlDsa65Tls13, TlsSignatureSchemeConfiguration,
|
||||
+ ::testing::Combine(TlsConnectTestBase::kTlsVariantsAll,
|
||||
+ TlsConnectTestBase::kTlsV13,
|
||||
+ ::testing::Values(TlsAgent::kServerMlDsa65),
|
||||
+ ::testing::Values(ssl_auth_mldsa65),
|
||||
+ ::testing::Values(ssl_sig_mldsa65)));
|
||||
+INSTANTIATE_TEST_SUITE_P(
|
||||
+ SignatureSchemeMlDsa87Tls13, TlsSignatureSchemeConfiguration,
|
||||
+ ::testing::Combine(TlsConnectTestBase::kTlsVariantsAll,
|
||||
+ TlsConnectTestBase::kTlsV13,
|
||||
+ ::testing::Values(TlsAgent::kServerMlDsa87),
|
||||
+ ::testing::Values(ssl_auth_mldsa87),
|
||||
+ ::testing::Values(ssl_sig_mldsa87)));
|
||||
} // namespace nss_test
|
||||
diff --git a/gtests/ssl_gtest/tls_agent.h b/gtests/ssl_gtest/tls_agent.h
|
||||
--- a/gtests/ssl_gtest/tls_agent.h
|
||||
+++ b/gtests/ssl_gtest/tls_agent.h
|
||||
@@ -84,13 +84,19 @@
|
||||
static const std::string kServerEcdsa384;
|
||||
static const std::string kServerEcdsa521;
|
||||
static const std::string kServerEcdhEcdsa;
|
||||
static const std::string kServerEcdhRsa;
|
||||
static const std::string kServerDsa;
|
||||
+ static const std::string kServerMlDsa44;
|
||||
+ static const std::string kServerMlDsa65;
|
||||
+ static const std::string kServerMlDsa87;
|
||||
static const std::string kDelegatorEcdsa256; // draft-ietf-tls-subcerts
|
||||
static const std::string kDelegatorRsae2048; // draft-ietf-tls-subcerts
|
||||
static const std::string kDelegatorRsaPss2048; // draft-ietf-tls-subcerts
|
||||
+ static const std::string kDelegatorMlDsa44; // draft-ietf-tls-subcerts
|
||||
+ static const std::string kDelegatorMlDsa65; // draft-ietf-tls-subcerts
|
||||
+ static const std::string kDelegatorMlDsa87; // draft-ietf-tls-subcerts
|
||||
|
||||
TlsAgent(const std::string& name, Role role, SSLProtocolVariant variant);
|
||||
virtual ~TlsAgent();
|
||||
|
||||
void SetPeer(std::shared_ptr<TlsAgent>& peer) {
|
||||
diff --git a/gtests/ssl_gtest/tls_agent.cc b/gtests/ssl_gtest/tls_agent.cc
|
||||
--- a/gtests/ssl_gtest/tls_agent.cc
|
||||
+++ b/gtests/ssl_gtest/tls_agent.cc
|
||||
@@ -42,13 +42,19 @@
|
||||
const std::string TlsAgent::kServerEcdsa384 = "ecdsa384";
|
||||
const std::string TlsAgent::kServerEcdsa521 = "ecdsa521";
|
||||
const std::string TlsAgent::kServerEcdhRsa = "ecdh_rsa";
|
||||
const std::string TlsAgent::kServerEcdhEcdsa = "ecdh_ecdsa";
|
||||
const std::string TlsAgent::kServerDsa = "dsa";
|
||||
+const std::string TlsAgent::kServerMlDsa44 = "mldsa44";
|
||||
+const std::string TlsAgent::kServerMlDsa65 = "mldsa65";
|
||||
+const std::string TlsAgent::kServerMlDsa87 = "mldsa87";
|
||||
const std::string TlsAgent::kDelegatorEcdsa256 = "delegator_ecdsa256";
|
||||
const std::string TlsAgent::kDelegatorRsae2048 = "delegator_rsae2048";
|
||||
const std::string TlsAgent::kDelegatorRsaPss2048 = "delegator_rsa_pss2048";
|
||||
+const std::string TlsAgent::kDelegatorMlDsa44 = "delegator_mldsa44";
|
||||
+const std::string TlsAgent::kDelegatorMlDsa65 = "delegator_mldsa65";
|
||||
+const std::string TlsAgent::kDelegatorMlDsa87 = "delegator_mldsa87";
|
||||
|
||||
static const uint8_t kCannedTls13ServerHello[] = {
|
||||
0x03, 0x03, 0x9c, 0xbc, 0x14, 0x9b, 0x0e, 0x2e, 0xfa, 0x0d, 0xf3,
|
||||
0xf0, 0x5c, 0x70, 0x7a, 0xe0, 0xd1, 0x9b, 0x3e, 0x5a, 0x44, 0x6b,
|
||||
0xdf, 0xe5, 0xc2, 0x28, 0x64, 0xf7, 0x00, 0xc1, 0x9c, 0x08, 0x76,
|
||||
diff --git a/gtests/ssl_gtest/tls_subcerts_unittest.cc b/gtests/ssl_gtest/tls_subcerts_unittest.cc
|
||||
--- a/gtests/ssl_gtest/tls_subcerts_unittest.cc
|
||||
+++ b/gtests/ssl_gtest/tls_subcerts_unittest.cc
|
||||
@@ -19,10 +19,11 @@
|
||||
namespace nss_test {
|
||||
|
||||
const std::string kEcdsaDelegatorId = TlsAgent::kDelegatorEcdsa256;
|
||||
const std::string kRsaeDelegatorId = TlsAgent::kDelegatorRsae2048;
|
||||
const std::string kPssDelegatorId = TlsAgent::kDelegatorRsaPss2048;
|
||||
+const std::string kMlDsa65DelegatorId = TlsAgent::kDelegatorMlDsa65;
|
||||
const std::string kDCId = TlsAgent::kServerEcdsa256;
|
||||
const SSLSignatureScheme kDCScheme = ssl_sig_ecdsa_secp256r1_sha256;
|
||||
const PRUint32 kDCValidFor = 60 * 60 * 24 * 7 /* 1 week (seconds) */;
|
||||
|
||||
static void CheckPreliminaryPeerDelegCred(
|
||||
@@ -228,10 +229,56 @@
|
||||
EXPECT_TRUE(cfilter->captured());
|
||||
CheckPeerDelegCred(client_, true, 256);
|
||||
EXPECT_EQ(ssl_sig_ecdsa_secp256r1_sha256, client_->info().signatureScheme);
|
||||
}
|
||||
|
||||
+// Connected with ML-DSA-65, using an ML-DSA-65 SKI and ML-DSA-65 delegation
|
||||
+// cert.
|
||||
+TEST_P(TlsConnectTls13, DCConnectMlDsa65MlDsa65) {
|
||||
+ Reset(kMlDsa65DelegatorId);
|
||||
+
|
||||
+ static const SSLSignatureScheme kSchemes[] = {ssl_sig_ecdsa_secp256r1_sha256,
|
||||
+ ssl_sig_mldsa65};
|
||||
+ client_->SetSignatureSchemes(kSchemes, PR_ARRAY_SIZE(kSchemes));
|
||||
+ server_->SetSignatureSchemes(kSchemes, PR_ARRAY_SIZE(kSchemes));
|
||||
+
|
||||
+ client_->EnableDelegatedCredentials();
|
||||
+ server_->AddDelegatedCredential(TlsAgent::kServerMlDsa65, ssl_sig_mldsa65,
|
||||
+ kDCValidFor, now());
|
||||
+
|
||||
+ auto cfilter = MakeTlsFilter<TlsExtensionCapture>(
|
||||
+ client_, ssl_delegated_credentials_xtn);
|
||||
+ Connect();
|
||||
+
|
||||
+ EXPECT_TRUE(cfilter->captured());
|
||||
+ CheckPeerDelegCred(client_, true, ML_DSA_65_PUBLICKEY_LEN * 8);
|
||||
+ EXPECT_EQ(ssl_sig_mldsa65, client_->info().signatureScheme);
|
||||
+}
|
||||
+
|
||||
+// Connected with ECDSA-P256 using a ML-DSA-65 delegation cert.
|
||||
+TEST_P(TlsConnectTls13, DCConnectEcdsaP256MlDsa65) {
|
||||
+ Reset(kMlDsa65DelegatorId);
|
||||
+
|
||||
+ static const SSLSignatureScheme kSchemes[] = {ssl_sig_ecdsa_secp256r1_sha256,
|
||||
+ ssl_sig_mldsa65};
|
||||
+ client_->SetSignatureSchemes(kSchemes, PR_ARRAY_SIZE(kSchemes));
|
||||
+ server_->SetSignatureSchemes(kSchemes, PR_ARRAY_SIZE(kSchemes));
|
||||
+
|
||||
+ client_->EnableDelegatedCredentials();
|
||||
+ server_->AddDelegatedCredential(TlsAgent::kServerEcdsa256,
|
||||
+ ssl_sig_ecdsa_secp256r1_sha256, kDCValidFor,
|
||||
+ now());
|
||||
+
|
||||
+ auto cfilter = MakeTlsFilter<TlsExtensionCapture>(
|
||||
+ client_, ssl_delegated_credentials_xtn);
|
||||
+ Connect();
|
||||
+
|
||||
+ EXPECT_TRUE(cfilter->captured());
|
||||
+ CheckPeerDelegCred(client_, true, 256);
|
||||
+ EXPECT_EQ(ssl_sig_ecdsa_secp256r1_sha256, client_->info().signatureScheme);
|
||||
+}
|
||||
+
|
||||
// Simulate the client receiving a DC containing algorithms not advertised.
|
||||
// Do this by tweaking the client's supported sigSchemes after the CH.
|
||||
TEST_P(TlsConnectTls13, DCReceiveUnadvertisedScheme) {
|
||||
Reset(kEcdsaDelegatorId);
|
||||
static const SSLSignatureScheme kClientSchemes[] = {
|
||||
@@ -723,8 +770,25 @@
|
||||
EXPECT_EQ(SECFailure,
|
||||
SSL_DelegateCredential(cert.get(), priv.get(), pub_ecdsa.get(),
|
||||
ssl_sig_ecdsa_secp384r1_sha384, kDCValidFor,
|
||||
now, &dc));
|
||||
EXPECT_EQ(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM, PORT_GetError());
|
||||
+ ScopedSECKEYPublicKey pub_mldsa;
|
||||
+ ScopedSECKEYPrivateKey priv_mldsa;
|
||||
+ ASSERT_TRUE(TlsAgent::LoadKeyPairFromCert(TlsAgent::kServerMlDsa65,
|
||||
+ &pub_mldsa, &priv_mldsa));
|
||||
+ EXPECT_EQ(SECFailure,
|
||||
+ SSL_DelegateCredential(cert.get(), priv.get(), pub_mldsa.get(),
|
||||
+ ssl_sig_rsa_pss_rsae_sha256, kDCValidFor,
|
||||
+ now, &dc));
|
||||
+ EXPECT_EQ(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM, PORT_GetError());
|
||||
+ EXPECT_EQ(SECFailure,
|
||||
+ SSL_DelegateCredential(cert.get(), priv.get(), pub_mldsa.get(),
|
||||
+ ssl_sig_mldsa44, kDCValidFor, now, &dc));
|
||||
+ EXPECT_EQ(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM, PORT_GetError());
|
||||
+ EXPECT_EQ(SECSuccess,
|
||||
+ SSL_DelegateCredential(cert.get(), priv.get(), pub_mldsa.get(),
|
||||
+ ssl_sig_mldsa65, kDCValidFor, now, &dc));
|
||||
+ dc.Reset();
|
||||
}
|
||||
|
||||
} // namespace nss_test
|
||||
diff --git a/tests/common/certsetup.sh b/tests/common/certsetup.sh
|
||||
--- a/tests/common/certsetup.sh
|
||||
+++ b/tests/common/certsetup.sh
|
||||
@@ -35,19 +35,43 @@
|
||||
rsa8192) type_args=(-g 8192);type=rsa ;;
|
||||
rsapss) type_args=(-g 1024 --pss);type=rsa ;;
|
||||
rsapss384) type_args=(-g 1024 --pss);type=rsa;sighash=(-Z SHA384) ;;
|
||||
rsapss512) type_args=(-g 2048 --pss);type=rsa;sighash=(-Z SHA512) ;;
|
||||
rsapss_noparam) type_args=(-g 2048 --pss);type=rsa;sighash=() ;;
|
||||
+ mldsa44) type_args=(-q ml-dsa-44);type=mldsa;sighash=() ;;
|
||||
+ mldsa65) type_args=(-q ml-dsa-65);type=mldsa;sighash=() ;;
|
||||
+ mldsa87) type_args=(-q ml-dsa-87);type=mldsa;sighash=() ;;
|
||||
p256) type_args=(-q nistp256);type=ec ;;
|
||||
p384) type_args=(-q secp384r1);type=ec ;;
|
||||
p521) type_args=(-q secp521r1);type=ec ;;
|
||||
rsa_ca) type_args=(-g 1024);trust='CT,CT,CT';type=rsa ;;
|
||||
rsa_chain) type_args=(-g 1024);sign=(-c rsa_ca);type=rsa;;
|
||||
rsapss_ca) type_args=(-g 1024 --pss);trust='CT,CT,CT';type=rsa ;;
|
||||
rsapss_chain) type_args=(-g 1024);sign=(-c rsa_pss_ca);type=rsa;;
|
||||
rsa_ca_rsapss_chain) type_args=(-g 1024 --pss-sign);sign=(-c rsa_ca);type=rsa;;
|
||||
+ mldsa44_ca) type_args=(-q ml-dsa-44);trust='CT,CT,CT';type=mldsa ;;
|
||||
+ mldsa65_ca) type_args=(-q ml-dsa-65);trust='CT,CT,CT';type=mldsa ;;
|
||||
+ mldsa87_ca) type_args=(-q ml-dsa-87);trust='CT,CT,CT';type=mldsa ;;
|
||||
+ mldsa44_chain) type_args=(-q ml-dsa-44);sign=(-c mldsa44_ca);type=mldsa;;
|
||||
+ mldsa65_chain) type_args=(-q ml-dsa-65);sign=(-c mldsa65_ca);type=mldsa;;
|
||||
+ mldsa87_chain) type_args=(-q ml-dsa-87);sign=(-c mldsa87_ca);type=mldsa;;
|
||||
ecdh_rsa) type_args=(-q nistp256);sign=(-c rsa_ca);type=ec ;;
|
||||
+ delegator_mldsa44)
|
||||
+ touch empty.txt
|
||||
+ type_args=(-q ml-dsa-44 --extGeneric 1.3.6.1.4.1.44363.44:not-critical:empty.txt)
|
||||
+ type=mldsa
|
||||
+ ;;
|
||||
+ delegator_mldsa65)
|
||||
+ touch empty.txt
|
||||
+ type_args=(-q ml-dsa-65 --extGeneric 1.3.6.1.4.1.44363.44:not-critical:empty.txt)
|
||||
+ type=mldsa
|
||||
+ ;;
|
||||
+ delegator_mldsa87)
|
||||
+ touch empty.txt
|
||||
+ type_args=(-q ml-dsa-87 --extGeneric 1.3.6.1.4.1.87363.87:not-critical:empty.txt)
|
||||
+ type=mldsa
|
||||
+ ;;
|
||||
delegator_p256)
|
||||
touch empty.txt
|
||||
type_args=(-q nistp256 --extGeneric 1.3.6.1.4.1.44363.44:not-critical:empty.txt)
|
||||
type=ec
|
||||
;;
|
||||
diff --git a/tests/ssl/ssl.sh b/tests/ssl/ssl.sh
|
||||
--- a/tests/ssl/ssl.sh
|
||||
+++ b/tests/ssl/ssl.sh
|
||||
@@ -246,34 +246,39 @@
|
||||
{
|
||||
if [ -n "$testname" ] ; then
|
||||
echo "$SCRIPTNAME: $testname ----"
|
||||
fi
|
||||
if [ -z "$NO_ECC_CERTS" -o "$NO_ECC_CERTS" != "1" ] ; then
|
||||
- ECC_OPTIONS="-e ${HOSTADDR}-ecmixed -e ${HOSTADDR}-ec"
|
||||
+ ECC_OPTIONS="-e ${HOSTADDR}-ecmixed -e ${HOSTADDR}-ec "
|
||||
else
|
||||
ECC_OPTIONS=""
|
||||
fi
|
||||
+ if [ -z "$NO_ML_DSA_CERTS" -o "$NO_ML_DSA_CERTS" != "1" ] ; then
|
||||
+ ML_DSA_OPTIONS="-e ${HOSTADDR}-ml-dsa-44 -e ${HOSTADDR}-ml-dsa-65 -e ${HOSTADDR}-ml-dsa-87 "
|
||||
+ else
|
||||
+ ML_DSA_OPTIONS=""
|
||||
+ fi
|
||||
if [ -z "$RSA_PSS_CERT" -o "$RSA_PSS_CERT" != "1" ] ; then
|
||||
RSA_OPTIONS="-n ${HOSTADDR}"
|
||||
else
|
||||
RSA_OPTIONS="-n ${HOSTADDR}-rsa-pss"
|
||||
fi
|
||||
if [ -z "$NSS_DISABLE_DSA" ]; then
|
||||
- DSA_OPTIONS="-S ${HOSTADDR}-dsa"
|
||||
+ DSA_OPTIONS="-S ${HOSTADDR}-dsa "
|
||||
else
|
||||
DSA_OPTIONS=""
|
||||
fi
|
||||
|
||||
SERVER_VMIN=${SERVER_VMIN-ssl3}
|
||||
SERVER_VMAX=${SERVER_VMAX-tls1.2}
|
||||
echo "selfserv starting at `date`"
|
||||
echo "selfserv -D -p ${PORT} -d ${P_R_SERVERDIR} ${RSA_OPTIONS} ${SERVER_OPTIONS} \\"
|
||||
- echo " ${ECC_OPTIONS} ${DSA_OPTIONS} -w nss "$@" -i ${R_SERVERPID}\\"
|
||||
+ echo " ${ECC_OPTIONS}${DSA_OPTIONS}${ML_DSA_OPTONS}-w nss "$@" -i ${R_SERVERPID}\\"
|
||||
echo " -V ${SERVER_VMIN}:${SERVER_VMAX} $verbose -H 1 &"
|
||||
if [ ${fileout} -eq 1 ]; then
|
||||
${PROFTOOL} ${BINDIR}/selfserv -D -p ${PORT} -d ${P_R_SERVERDIR} ${RSA_OPTIONS} ${SERVER_OPTIONS} \
|
||||
- ${ECC_OPTIONS} ${DSA_OPTIONS} -w nss "$@" -i ${R_SERVERPID} -V ${SERVER_VMIN}:${SERVER_VMAX} $verbose -H 1 \
|
||||
+ ${ECC_OPTIONS}${DSA_OPTIONS}${ML_DSA_OPTIONS}-w nss "$@" -i ${R_SERVERPID} -V ${SERVER_VMIN}:${SERVER_VMAX} $verbose -H 1 \
|
||||
> ${SERVEROUTFILE} 2>&1 &
|
||||
RET=$?
|
||||
else
|
||||
${PROFTOOL} ${BINDIR}/selfserv -D -p ${PORT} -d ${P_R_SERVERDIR} ${RSA_OPTIONS} ${SERVER_OPTIONS} \
|
||||
${ECC_OPTIONS} ${DSA_OPTIONS} -w nss "$@" -i ${R_SERVERPID} -V ${SERVER_VMIN}:${SERVER_VMAX} $verbose -H 1 &
|
||||
@@ -336,15 +341,24 @@
|
||||
# cygwin, which means we can't kill selfserv at the end here.
|
||||
SSL_COV_TMP=$(mktemp /tmp/ssl_cov.XXXXXX)
|
||||
ignore_blank_lines ${SSLCOV} > ${SSL_COV_TMP}
|
||||
while read ectype testmax param sig testname
|
||||
do
|
||||
- # RSA-PSS tests are handled in a separate function
|
||||
+ # Select the TLS SIG SCHEME if necessary
|
||||
+ TLS_SIG_SCHEMES=""
|
||||
if [ "$sig" = "RSA-PSS" ]; then
|
||||
+ # RSA-PSS tests are currently handled in a separate function
|
||||
continue
|
||||
+ elif [ "$sig" = "ML-DSA-44" ]; then
|
||||
+ TLS_SIG_SCHEMES="-J mldsa44 "
|
||||
+ elif [ "$sig" = "ML-DSA-65" ]; then
|
||||
+ TLS_SIG_SCHEMES="-J mldsa65 "
|
||||
+ elif [ "$sig" = "ML-DSA-87" ]; then
|
||||
+ TLS_SIG_SCHEMES="-J mldsa87 "
|
||||
fi
|
||||
|
||||
+
|
||||
# skip DSA tests if they are disabled
|
||||
if [ -n "$NSS_DISABLE_DSA" -a "$sig" = "DSA" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -388,15 +402,15 @@
|
||||
TLS_GROUPS="secp256r1mlkem768"
|
||||
elif [ "$ectype" = "MLKEM384" ]; then
|
||||
TLS_GROUPS="secp384r1mlkem1024"
|
||||
fi
|
||||
|
||||
- echo "tstclnt -4 -p ${PORT} -h ${HOSTADDR} -c ${param} -I \"${TLS_GROUPS}\" -V ${VMIN}:${VMAX} ${CLIENT_OPTIONS} \\"
|
||||
+ echo "tstclnt -4 -p ${PORT} -h ${HOSTADDR} -c ${param} -I \"${TLS_GROUPS}\" ${TLS_SIG_SCHEMES}-V ${VMIN}:${VMAX} ${CLIENT_OPTIONS} \\"
|
||||
echo " -f -d ${P_R_CLIENTDIR} $verbose -w nss < ${REQUEST_FILE}"
|
||||
|
||||
rm ${TMP}/$HOST.tmp.$$ 2>/dev/null
|
||||
- ${PROFTOOL} ${BINDIR}/tstclnt -4 -p ${PORT} -h ${HOSTADDR} -c ${param} -I "${TLS_GROUPS}" -V ${VMIN}:${VMAX} ${CLIENT_OPTIONS} -f \
|
||||
+ ${PROFTOOL} ${BINDIR}/tstclnt -4 -p ${PORT} -h ${HOSTADDR} -c ${param} -I "${TLS_GROUPS}" ${TLS_SIG_SCHEMES}-V ${VMIN}:${VMAX} ${CLIENT_OPTIONS} -f \
|
||||
-d ${P_R_CLIENTDIR} $verbose -w nss < ${REQUEST_FILE} \
|
||||
>${TMP}/$HOST.tmp.$$ 2>&1
|
||||
ret=$?
|
||||
cat ${TMP}/$HOST.tmp.$$
|
||||
rm ${TMP}/$HOST.tmp.$$ 2>/dev/null
|
||||
diff --git a/tests/ssl/sslauth.txt b/tests/ssl/sslauth.txt
|
||||
--- a/tests/ssl/sslauth.txt
|
||||
+++ b/tests/ssl/sslauth.txt
|
||||
@@ -80,5 +80,23 @@
|
||||
SNI 0 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-w_nss_-n_TestUser TLS Server hello response without SNI
|
||||
SNI 0 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-c_v_-w_nss_-n_TestUser_-a_Host-sni.Dom TLS Server hello response with SNI
|
||||
SNI 1 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-w_nss_-n_TestUser_-a_Host-sni.Dom_-a_Host.Dom TLS Server hello response with SNI: Change name on 2d HS
|
||||
SNI 1 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-c_v_-w_nss_-n_TestUser_-a_Host-sni.Dom_-a_Host-sni1.Dom TLS Server hello response with SNI: Change name to invalid 2d HS
|
||||
SNI 1 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-c_v_-w_nss_-n_TestUser_-a_Host-sni1.Dom TLS Server response with alert
|
||||
+#
|
||||
+# ML-DSA Tests
|
||||
+#
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-44_-w_nss TLS 1.3 ML-DSA-44 Request don't require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-44_-w_nss TLS 1.3 ML-DSA-44 Require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-44 Request don't require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 1 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-44 Require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 0 -r_-r_-r_-E_-u -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-44_-w_nss TLS 1.3 ML-DSA-44 Request don't require client auth on post hs with session ticket (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-65_-w_nss TLS 1.3 ML-DSA-65 Request don't require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-65_-w_nss TLS 1.3 ML-DSA-65 Require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-65 Request don't require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 1 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-65 Require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 0 -r_-r_-r_-E_-u -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-65_-w_nss TLS 1.3 ML-DSA-65 Request don't require client auth on post hs with session ticket (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-87_-w_nss TLS 1.3 ML-DSA-87 Request don't require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-87_-w_nss TLS 1.3 ML-DSA-87 Require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-87 Request don't require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 1 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-87 Require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 0 -r_-r_-r_-E_-u -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-87_-w_nss TLS 1.3 ML-DSA-87 Request don't require client auth on post hs with session ticket (client auth)
|
||||
diff --git a/tests/ssl/sslcov.txt b/tests/ssl/sslcov.txt
|
||||
--- a/tests/ssl/sslcov.txt
|
||||
+++ b/tests/ssl/sslcov.txt
|
||||
@@ -154,9 +154,15 @@
|
||||
MLKEM256 TLS13 :1302 ECC TLS13_SECP256R1MLKEM768_WITH_AES_256_GCM_SHA384
|
||||
MLKEM256 TLS13 :1303 ECC TLS13_SECP256R1MLKEM768_WITH_CHACHA20_POLY1305_SHA256
|
||||
MLKEM384 TLS13 :1301 ECC TLS13_SECP384R1MLKEM1024_WITH_AES_128_GCM_SHA256
|
||||
MLKEM384 TLS13 :1302 ECC TLS13_SECP384R1MLKEM1024_WITH_AES_256_GCM_SHA384
|
||||
MLKEM384 TLS13 :1303 ECC TLS13_SECP384R1MLKEM1024_WITH_CHACHA20_POLY1305_SHA256
|
||||
+ ECC TLS13 :1301 ML_DSA_44 TLS13_ECDHE_WITH_AES_128_GCM_SHA256 (ML_DSA_44)
|
||||
+ ECC TLS13 :1302 ML_DSA_65 TLS13_ECDHE_WITH_AES_256_GCM_SHA384 (ML_DSA_65)
|
||||
+ ECC TLS13 :1303 ML_DSA_87 TLS13_ECDHE_WITH_CHACHA20_POLY1305_SHA256 (ML_DSA_87)
|
||||
+MLKEM219 TLS13 :1301 ML_DSA_65 TLS13_MLKEM768X25519_WITH_AES_128_GCM_SHA256 (ML_DSA_65)
|
||||
+MLKEM219 TLS13 :1302 ML_DSA_87 TLS13_MLKEM768X25519_WITH_AES_256_GCM_SHA384 (ML_DSA_87)
|
||||
+MLKEM219 TLS13 :1303 ML_DSA_44 TLS13_MLKEM768X25519_WITH_CHACHA20_POLY1305_SHA256 (ML_DSA_44)
|
||||
# need to turn on policy in selfserv/tstclnt to make these work
|
||||
#XYBER TLS13 :1301 ECC TLS13_XYBER768D00_WITH_AES_128_GCM_SHA256
|
||||
#XYBER TLS13 :1302 ECC TLS13_XYBER768D00_WITH_AES_256_GCM_SHA384
|
||||
#XYBER TLS13 :1303 ECC TLS13_XYBER768D00_WITH_CHACHA20_POLY1305_SHA256
|
||||
diff --git a/tests/ssl_gtests/ssl_gtests.sh b/tests/ssl_gtests/ssl_gtests.sh
|
||||
--- a/tests/ssl_gtests/ssl_gtests.sh
|
||||
+++ b/tests/ssl_gtests/ssl_gtests.sh
|
||||
@@ -47,23 +47,35 @@
|
||||
make_cert rsa_pss_noparam rsapss_noparam sign
|
||||
make_cert rsa_decrypt rsa kex
|
||||
make_cert ecdsa256 p256 sign
|
||||
make_cert ecdsa384 p384 sign
|
||||
make_cert ecdsa521 p521 sign
|
||||
+ make_cert mldsa44 mldsa44 sign
|
||||
+ make_cert mldsa65 mldsa65 sign
|
||||
+ make_cert mldsa87 mldsa87 sign
|
||||
make_cert ecdh_ecdsa p256 kex
|
||||
make_cert rsa_ca rsa_ca ca
|
||||
make_cert rsa_chain rsa_chain sign
|
||||
make_cert rsa_pss_ca rsapss_ca ca
|
||||
make_cert rsa_pss_chain rsapss_chain sign
|
||||
make_cert rsa_ca_rsa_pss_chain rsa_ca_rsapss_chain sign
|
||||
+ make_cert mldsa44_ca mldsa44_ca ca
|
||||
+ make_cert mldsa44_chain mldsa44_chain sign
|
||||
+ make_cert mldsa65_ca mldsa65_ca ca
|
||||
+ make_cert mldsa65_chain mldsa65_chain sign
|
||||
+ make_cert mldsa87_ca mldsa87_ca ca
|
||||
+ make_cert mldsa87_chain mldsa87_chain sign
|
||||
make_cert ecdh_rsa ecdh_rsa kex
|
||||
if [ -z "${NSS_DISABLE_DSA}" ]; then
|
||||
make_cert dsa dsa sign
|
||||
fi
|
||||
make_cert delegator_ecdsa256 delegator_p256 sign
|
||||
make_cert delegator_rsae2048 delegator_rsae2048 sign
|
||||
make_cert delegator_rsa_pss2048 delegator_rsa_pss2048 sign
|
||||
+ make_cert delegator_mldsa44 delegator_mldsa44 sign
|
||||
+ make_cert delegator_mldsa65 delegator_mldsa65 sign
|
||||
+ make_cert delegator_mldsa87 delegator_mldsa87 sign
|
||||
}
|
||||
|
||||
############################## ssl_gtest_init ##########################
|
||||
# local shell function to initialize this script
|
||||
########################################################################
|
||||
|
||||
|
||||
642
nss-3.118-ml-dsa-tls.patch
Normal file
642
nss-3.118-ml-dsa-tls.patch
Normal file
|
|
@ -0,0 +1,642 @@
|
|||
diff --git a/automation/abi-check/expected-report-libssl3.so.txt b/automation/abi-check/expected-report-libssl3.so.txt
|
||||
--- a/automation/abi-check/expected-report-libssl3.so.txt
|
||||
+++ b/automation/abi-check/expected-report-libssl3.so.txt
|
||||
@@ -0,0 +1,24 @@
|
||||
+
|
||||
+1 function with some indirect sub-type change:
|
||||
+
|
||||
+ [C]'function SECStatus SSL_ConfigServerCert(PRFileDesc*, CERTCertificate*, SECKEYPrivateKey*, const SSLExtraServerCertData*, unsigned int)' at sslcert.c:662:1 has some indirect sub-type changes:
|
||||
+ parameter 4 of type 'const SSLExtraServerCertData*' has sub-type changes:
|
||||
+ in pointed to type 'const SSLExtraServerCertData':
|
||||
+ in unqualified underlying type 'typedef SSLExtraServerCertData' at sslt.h:310:1:
|
||||
+ underlying type 'struct SSLExtraServerCertDataStr' at sslt.h:269:1 changed:
|
||||
+ type size hasn't changed
|
||||
+ 1 data member change:
|
||||
+ type of 'SSLAuthType SSLExtraServerCertDataStr::authType' changed:
|
||||
+ underlying type 'enum __anonymous_enum__' at sslt.h:176:1 changed:
|
||||
+ type size hasn't changed
|
||||
+ 3 enumerator insertions:
|
||||
+ '__anonymous_enum__::ssl_auth_mldsa44' value '11'
|
||||
+ '__anonymous_enum__::ssl_auth_mldsa65' value '12'
|
||||
+ '__anonymous_enum__::ssl_auth_mldsa87' value '13'
|
||||
+
|
||||
+ 1 enumerator change:
|
||||
+ '__anonymous_enum__::ssl_auth_size' from value '11' to '14' at sslt.h:180:1
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c
|
||||
--- a/lib/ssl/ssl3con.c
|
||||
+++ b/lib/ssl/ssl3con.c
|
||||
@@ -69,10 +69,11 @@
|
||||
static CK_MECHANISM_TYPE ssl3_GetMgfMechanismByHashType(SSLHashType hash);
|
||||
PRBool ssl_IsRsaPssSignatureScheme(SSLSignatureScheme scheme);
|
||||
PRBool ssl_IsRsaeSignatureScheme(SSLSignatureScheme scheme);
|
||||
PRBool ssl_IsRsaPkcs1SignatureScheme(SSLSignatureScheme scheme);
|
||||
PRBool ssl_IsDsaSignatureScheme(SSLSignatureScheme scheme);
|
||||
+PRBool ssl_IsMldsaSignatureScheme(SSLSignatureScheme scheme);
|
||||
static SECStatus ssl3_UpdateDefaultHandshakeHashes(sslSocket *ss,
|
||||
const unsigned char *b,
|
||||
unsigned int l);
|
||||
const PRUint32 kSSLSigSchemePolicy =
|
||||
NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_ANY_SIGNATURE;
|
||||
@@ -203,11 +204,14 @@
|
||||
ssl_sig_rsa_pkcs1_sha512,
|
||||
ssl_sig_rsa_pkcs1_sha1,
|
||||
ssl_sig_dsa_sha256,
|
||||
ssl_sig_dsa_sha384,
|
||||
ssl_sig_dsa_sha512,
|
||||
- ssl_sig_dsa_sha1
|
||||
+ ssl_sig_dsa_sha1,
|
||||
+ ssl_sig_mldsa44,
|
||||
+ ssl_sig_mldsa65,
|
||||
+ ssl_sig_mldsa87,
|
||||
};
|
||||
PR_STATIC_ASSERT(PR_ARRAY_SIZE(defaultSignatureSchemes) <=
|
||||
MAX_SIGNATURE_SCHEMES);
|
||||
|
||||
/* Verify that SSL_ImplementedCiphers and cipherSuites are in consistent order.
|
||||
@@ -361,11 +365,14 @@
|
||||
CKM_ECDH1_DERIVE, /* ssl_auth_ecdh_rsa */
|
||||
CKM_ECDH1_DERIVE, /* ssl_auth_ecdh_ecdsa */
|
||||
CKM_RSA_PKCS, /* ssl_auth_rsa_sign */
|
||||
CKM_RSA_PKCS_PSS, /* ssl_auth_rsa_pss */
|
||||
CKM_HKDF_DATA, /* ssl_auth_psk (just check for HKDF) */
|
||||
- CKM_INVALID_MECHANISM /* ssl_auth_tls13_any */
|
||||
+ CKM_INVALID_MECHANISM, /* ssl_auth_tls13_any */
|
||||
+ CKM_ML_DSA, /* ssl_auth_mldsa44 */
|
||||
+ CKM_ML_DSA, /* ssl_auth_mldsa65 */
|
||||
+ CKM_ML_DSA, /* ssl_auth_mldsa87 */
|
||||
};
|
||||
PR_STATIC_ASSERT(PR_ARRAY_SIZE(auth_alg_defs) == ssl_auth_size);
|
||||
|
||||
static const CK_MECHANISM_TYPE kea_alg_defs[] = {
|
||||
CKM_INVALID_MECHANISM, /* ssl_kea_null */
|
||||
@@ -917,10 +924,18 @@
|
||||
{
|
||||
PRCList *cursor;
|
||||
if (authType == ssl_auth_null || authType == ssl_auth_psk || authType == ssl_auth_tls13_any) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
+ /* mldsa is only supported in TLS 1.3 or greater */
|
||||
+ if (maxVersion < SSL_LIBRARY_VERSION_TLS_1_3 &&
|
||||
+ (authType == ssl_auth_mldsa44 ||
|
||||
+ authType == ssl_auth_mldsa65 ||
|
||||
+ authType == ssl_auth_mldsa87)) {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
+
|
||||
for (cursor = PR_NEXT_LINK(&ss->serverCerts);
|
||||
cursor != &ss->serverCerts;
|
||||
cursor = PR_NEXT_LINK(cursor)) {
|
||||
sslServerCert *cert = (sslServerCert *)cursor;
|
||||
if (!cert->serverKeyPair ||
|
||||
@@ -989,19 +1004,28 @@
|
||||
}
|
||||
|
||||
/* Check that a signature scheme is accepted.
|
||||
* Both by policy and by having a token that supports it. */
|
||||
static PRBool
|
||||
-ssl_SignatureSchemeAccepted(PRUint16 minVersion,
|
||||
+ssl_SignatureSchemeAccepted(PRUint16 maxVersion,
|
||||
+ PRUint16 minVersion,
|
||||
SSLSignatureScheme scheme,
|
||||
PRBool forCert)
|
||||
{
|
||||
/* Disable RSA-PSS schemes if there are no tokens to verify them. */
|
||||
if (ssl_IsRsaPssSignatureScheme(scheme)) {
|
||||
if (!PK11_TokenExists(auth_alg_defs[ssl_auth_rsa_pss])) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
+ } else if (ssl_IsMldsaSignatureScheme(scheme)) {
|
||||
+ /* ML-DSA: only in TLS 1.3 and later. */
|
||||
+ if (maxVersion < SSL_LIBRARY_VERSION_TLS_1_3) {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
+ if (!PK11_TokenExists(auth_alg_defs[ssl_auth_mldsa44])) {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
} else if (!forCert && ssl_IsRsaPkcs1SignatureScheme(scheme)) {
|
||||
/* Disable PKCS#1 signatures if we are limited to TLS 1.3.
|
||||
* We still need to advertise PKCS#1 signatures in CH and CR
|
||||
* for certificate signatures.
|
||||
*/
|
||||
@@ -1046,11 +1070,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure that there is a signature scheme that can be accepted.*/
|
||||
for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
|
||||
- if (ssl_SignatureSchemeAccepted(ss->vrange.min,
|
||||
+ if (ssl_SignatureSchemeAccepted(ss->vrange.max, ss->vrange.min,
|
||||
ss->ssl3.signatureSchemes[i],
|
||||
PR_FALSE /* forCert */)) {
|
||||
return SECSuccess;
|
||||
}
|
||||
}
|
||||
@@ -1077,11 +1101,12 @@
|
||||
SSLSignatureScheme scheme = ss->ssl3.signatureSchemes[i];
|
||||
SSLAuthType schemeAuthType = ssl_SignatureSchemeToAuthType(scheme);
|
||||
PRBool acceptable = authType == schemeAuthType ||
|
||||
(schemeAuthType == ssl_auth_rsa_pss &&
|
||||
authType == ssl_auth_rsa_sign);
|
||||
- if (acceptable && ssl_SignatureSchemeAccepted(ss->version, scheme, PR_FALSE /* forCert */)) {
|
||||
+ if (acceptable && ssl_SignatureSchemeAccepted(ss->version, ss->version,
|
||||
+ scheme, PR_FALSE /* forCert */)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
@@ -3569,10 +3594,11 @@
|
||||
case ssl_hash_none:
|
||||
/* ssl_hash_none is for pre-1.2 suites, which use SHA-256. */
|
||||
return CKM_SHA256;
|
||||
case ssl_hash_sha1:
|
||||
return CKM_SHA_1;
|
||||
+ /* don't return a mechansim for ml_dsa hashes */
|
||||
default:
|
||||
PORT_Assert(0);
|
||||
}
|
||||
return CKM_SHA256;
|
||||
}
|
||||
@@ -4525,10 +4551,16 @@
|
||||
return SEC_OID_PKCS1_RSA_PSS_SIGNATURE;
|
||||
case ssl_auth_ecdsa:
|
||||
return SEC_OID_ANSIX962_EC_PUBLIC_KEY;
|
||||
case ssl_auth_dsa:
|
||||
return SEC_OID_ANSIX9_DSA_SIGNATURE;
|
||||
+ case ssl_auth_mldsa44:
|
||||
+ return SEC_OID_ML_DSA_44;
|
||||
+ case ssl_auth_mldsa65:
|
||||
+ return SEC_OID_ML_DSA_65;
|
||||
+ case ssl_auth_mldsa87:
|
||||
+ return SEC_OID_ML_DSA_87;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* shouldn't ever get there */
|
||||
PORT_Assert(0);
|
||||
@@ -4561,10 +4593,14 @@
|
||||
case ssl_sig_rsa_pss_pss_sha512:
|
||||
case ssl_sig_dsa_sha512:
|
||||
return ssl_hash_sha512;
|
||||
case ssl_sig_rsa_pkcs1_sha1md5:
|
||||
return ssl_hash_none; /* Special for TLS 1.0/1.1. */
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ case ssl_sig_mldsa87:
|
||||
+ return ssl_hash_none; /* ml_dsa does no hashing */
|
||||
case ssl_sig_none:
|
||||
case ssl_sig_ed25519:
|
||||
case ssl_sig_ed448:
|
||||
break;
|
||||
}
|
||||
@@ -4613,14 +4649,38 @@
|
||||
return PR_FALSE;
|
||||
}
|
||||
/* With TLS 1.3, EC keys should have been selected based on calling
|
||||
* ssl_SignatureSchemeFromSpki(), reject them otherwise. */
|
||||
return spkiOid != SEC_OID_ANSIX962_EC_PUBLIC_KEY;
|
||||
+ } else {
|
||||
+ if (ssl_IsMldsaSignatureScheme(scheme)) {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
}
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
+/* some schmemes match 1 for 1 to oids, for those schemes, we
|
||||
+ * can return the oid directly. If this function return ssl_sig_none,
|
||||
+ * it means the oid doesn't match a scheme or matches more than one
|
||||
+ * scheme */
|
||||
+SSLSignatureScheme
|
||||
+ssl_SignatureSchemeFromPublicKeyOid(SECOidTag tag)
|
||||
+{
|
||||
+ switch (tag) {
|
||||
+ case SEC_OID_ML_DSA_44:
|
||||
+ return ssl_sig_mldsa44;
|
||||
+ case SEC_OID_ML_DSA_65:
|
||||
+ return ssl_sig_mldsa65;
|
||||
+ case SEC_OID_ML_DSA_87:
|
||||
+ return ssl_sig_mldsa87;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ return ssl_sig_none;
|
||||
+}
|
||||
+
|
||||
static SECStatus
|
||||
ssl_SignatureSchemeFromPssSpki(const CERTSubjectPublicKeyInfo *spki,
|
||||
SSLSignatureScheme *scheme)
|
||||
{
|
||||
SECKEYRSAPSSParams pssParam = { 0 };
|
||||
@@ -4709,22 +4769,27 @@
|
||||
ssl_SignatureSchemeFromSpki(const CERTSubjectPublicKeyInfo *spki,
|
||||
PRBool isTls13, SSLSignatureScheme *scheme)
|
||||
{
|
||||
SECOidTag spkiOid = SECOID_GetAlgorithmTag(&spki->algorithm);
|
||||
|
||||
- if (spkiOid == SEC_OID_PKCS1_RSA_PSS_SIGNATURE) {
|
||||
- return ssl_SignatureSchemeFromPssSpki(spki, scheme);
|
||||
- }
|
||||
-
|
||||
- /* Only do this lookup for TLS 1.3, where the scheme can be determined from
|
||||
- * the SPKI alone because the ECDSA key size determines the hash. Earlier
|
||||
- * TLS versions allow the same EC key to be used with different hashes. */
|
||||
- if (isTls13 && spkiOid == SEC_OID_ANSIX962_EC_PUBLIC_KEY) {
|
||||
- return ssl_SignatureSchemeFromEcSpki(spki, scheme);
|
||||
- }
|
||||
-
|
||||
*scheme = ssl_sig_none;
|
||||
+ switch (spkiOid) {
|
||||
+ case SEC_OID_PKCS1_RSA_PSS_SIGNATURE:
|
||||
+ return ssl_SignatureSchemeFromPssSpki(spki, scheme);
|
||||
+ case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
|
||||
+ /* Only do this lookup for TLS 1.3, where the scheme can be
|
||||
+ * determined from the SPKI alone because the ECDSA key size
|
||||
+ * determines the hash. Earlier TLS versions allow the same
|
||||
+ * EC key to be used with different hashes. */
|
||||
+ if (isTls13) {
|
||||
+ return ssl_SignatureSchemeFromEcSpki(spki, scheme);
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ *scheme = ssl_SignatureSchemeFromPublicKeyOid(spkiOid);
|
||||
+ break;
|
||||
+ }
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
/* Check that a signature scheme is enabled by configuration. */
|
||||
PRBool
|
||||
@@ -4826,10 +4891,13 @@
|
||||
case ssl_sig_rsa_pss_pss_sha384:
|
||||
case ssl_sig_rsa_pss_pss_sha512:
|
||||
case ssl_sig_ecdsa_secp256r1_sha256:
|
||||
case ssl_sig_ecdsa_secp384r1_sha384:
|
||||
case ssl_sig_ecdsa_secp521r1_sha512:
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ case ssl_sig_mldsa87:
|
||||
case ssl_sig_dsa_sha1:
|
||||
case ssl_sig_dsa_sha256:
|
||||
case ssl_sig_dsa_sha384:
|
||||
case ssl_sig_dsa_sha512:
|
||||
case ssl_sig_ecdsa_sha1:
|
||||
@@ -4908,10 +4976,25 @@
|
||||
return PR_FALSE;
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
+PRBool
|
||||
+ssl_IsMldsaSignatureScheme(SSLSignatureScheme scheme)
|
||||
+{
|
||||
+ switch (scheme) {
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ case ssl_sig_mldsa87:
|
||||
+ return PR_TRUE;
|
||||
+
|
||||
+ default:
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
+ return PR_FALSE;
|
||||
+}
|
||||
+
|
||||
SSLAuthType
|
||||
ssl_SignatureSchemeToAuthType(SSLSignatureScheme scheme)
|
||||
{
|
||||
switch (scheme) {
|
||||
case ssl_sig_rsa_pkcs1_sha1:
|
||||
@@ -4936,10 +5019,21 @@
|
||||
case ssl_sig_dsa_sha1:
|
||||
case ssl_sig_dsa_sha256:
|
||||
case ssl_sig_dsa_sha384:
|
||||
case ssl_sig_dsa_sha512:
|
||||
return ssl_auth_dsa;
|
||||
+ /* while there is one mechanism for ML-DSA,
|
||||
+ * server cert selection depends on which
|
||||
+ * flavor (paramset) is being used, so
|
||||
+ * we need one auth foreach param set.
|
||||
+ */
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ return ssl_auth_mldsa44;
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ return ssl_auth_mldsa65;
|
||||
+ case ssl_sig_mldsa87:
|
||||
+ return ssl_auth_mldsa87;
|
||||
|
||||
default:
|
||||
PORT_Assert(0);
|
||||
}
|
||||
return ssl_auth_null;
|
||||
@@ -10490,17 +10584,18 @@
|
||||
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
SECStatus
|
||||
-ssl3_EncodeSigAlgs(const sslSocket *ss, PRUint16 minVersion, PRBool forCert,
|
||||
- PRBool grease, sslBuffer *buf)
|
||||
+ssl3_EncodeSigAlgs(const sslSocket *ss, PRUint16 maxVersion, PRUint16 minVersion,
|
||||
+ PRBool forCert, PRBool grease, sslBuffer *buf)
|
||||
{
|
||||
SSLSignatureScheme filtered[MAX_SIGNATURE_SCHEMES] = { 0 };
|
||||
unsigned int filteredCount = 0;
|
||||
|
||||
- SECStatus rv = ssl3_FilterSigAlgs(ss, minVersion, PR_FALSE, forCert,
|
||||
+ SECStatus rv = ssl3_FilterSigAlgs(ss, maxVersion, minVersion,
|
||||
+ PR_FALSE, forCert,
|
||||
PR_ARRAY_SIZE(filtered),
|
||||
filtered, &filteredCount);
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
@@ -10573,12 +10668,12 @@
|
||||
* requires that PKCS#1 schemes are placed last in the list if they
|
||||
* are present. This sorting can be removed once we support
|
||||
* signature_algorithms_cert.
|
||||
*/
|
||||
SECStatus
|
||||
-ssl3_FilterSigAlgs(const sslSocket *ss, PRUint16 minVersion, PRBool disableRsae,
|
||||
- PRBool forCert,
|
||||
+ssl3_FilterSigAlgs(const sslSocket *ss, PRUint16 maxVersion, PRUint16 minVersion,
|
||||
+ PRBool disableRsae, PRBool forCert,
|
||||
unsigned int maxSchemes, SSLSignatureScheme *filteredSchemes,
|
||||
unsigned int *numFilteredSchemes)
|
||||
{
|
||||
PORT_Assert(filteredSchemes);
|
||||
PORT_Assert(numFilteredSchemes);
|
||||
@@ -10591,25 +10686,25 @@
|
||||
PRBool allowUnsortedPkcs1 = forCert && minVersion < SSL_LIBRARY_VERSION_TLS_1_3;
|
||||
for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
|
||||
if (disableRsae && ssl_IsRsaeSignatureScheme(ss->ssl3.signatureSchemes[i])) {
|
||||
continue;
|
||||
}
|
||||
- if (ssl_SignatureSchemeAccepted(minVersion,
|
||||
+ if (ssl_SignatureSchemeAccepted(maxVersion, minVersion,
|
||||
ss->ssl3.signatureSchemes[i],
|
||||
allowUnsortedPkcs1)) {
|
||||
filteredSchemes[(*numFilteredSchemes)++] = ss->ssl3.signatureSchemes[i];
|
||||
}
|
||||
}
|
||||
if (forCert && !allowUnsortedPkcs1) {
|
||||
for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
|
||||
if (disableRsae && ssl_IsRsaeSignatureScheme(ss->ssl3.signatureSchemes[i])) {
|
||||
continue;
|
||||
}
|
||||
- if (!ssl_SignatureSchemeAccepted(minVersion,
|
||||
+ if (!ssl_SignatureSchemeAccepted(maxVersion, minVersion,
|
||||
ss->ssl3.signatureSchemes[i],
|
||||
PR_FALSE) &&
|
||||
- ssl_SignatureSchemeAccepted(minVersion,
|
||||
+ ssl_SignatureSchemeAccepted(maxVersion, minVersion,
|
||||
ss->ssl3.signatureSchemes[i],
|
||||
PR_TRUE)) {
|
||||
filteredSchemes[(*numFilteredSchemes)++] = ss->ssl3.signatureSchemes[i];
|
||||
}
|
||||
}
|
||||
@@ -10648,11 +10743,11 @@
|
||||
certTypes = certificate_types;
|
||||
certTypesLength = sizeof certificate_types;
|
||||
|
||||
length = 1 + certTypesLength + 2 + calen;
|
||||
if (isTLS12) {
|
||||
- rv = ssl3_EncodeSigAlgs(ss, ss->version, PR_TRUE /* forCert */,
|
||||
+ rv = ssl3_EncodeSigAlgs(ss, ss->version, ss->version, PR_TRUE /* forCert */,
|
||||
PR_FALSE /* GREASE */, &sigAlgsBuf);
|
||||
if (rv != SECSuccess) {
|
||||
return rv;
|
||||
}
|
||||
length += SSL_BUFFER_LEN(&sigAlgsBuf);
|
||||
@@ -11854,10 +11949,15 @@
|
||||
/* Don't check EC strength here on the understanding that we
|
||||
* only support curves we like. */
|
||||
minKey = ss->sec.authKeyBits;
|
||||
}
|
||||
break;
|
||||
+ case mldsaKey:
|
||||
+ /* ML DSA has fixed sizes per param set and are handled by
|
||||
+ * separate policy oids for each param set */
|
||||
+ minKey = ss->sec.authKeyBits;
|
||||
+ break;
|
||||
|
||||
default:
|
||||
FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
|
||||
return SECFailure;
|
||||
}
|
||||
diff --git a/lib/ssl/ssl3exthandle.c b/lib/ssl/ssl3exthandle.c
|
||||
--- a/lib/ssl/ssl3exthandle.c
|
||||
+++ b/lib/ssl/ssl3exthandle.c
|
||||
@@ -1653,17 +1653,21 @@
|
||||
if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_2) {
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
PRUint16 minVersion;
|
||||
+ PRUint16 maxVersion;
|
||||
if (ss->sec.isServer) {
|
||||
+ maxVersion = ss->version; /* CertificateRequest */
|
||||
minVersion = ss->version; /* CertificateRequest */
|
||||
} else {
|
||||
+ maxVersion = ss->vrange.max; /* ClientHello */
|
||||
minVersion = ss->vrange.min; /* ClientHello */
|
||||
}
|
||||
|
||||
- SECStatus rv = ssl3_EncodeSigAlgs(ss, minVersion, PR_TRUE /* forCert */,
|
||||
+ SECStatus rv = ssl3_EncodeSigAlgs(ss, maxVersion, minVersion,
|
||||
+ PR_TRUE /* forCert */,
|
||||
ss->opt.enableGrease, buf);
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
diff --git a/lib/ssl/sslcert.c b/lib/ssl/sslcert.c
|
||||
--- a/lib/ssl/sslcert.c
|
||||
+++ b/lib/ssl/sslcert.c
|
||||
@@ -568,10 +568,27 @@
|
||||
if (cert->keyUsage & KU_KEY_ENCIPHERMENT) {
|
||||
authTypes |= 1 << ssl_GetEcdhAuthType(cert);
|
||||
}
|
||||
break;
|
||||
|
||||
+ case SEC_OID_ML_DSA_44:
|
||||
+ if (cert->keyUsage & KU_DIGITAL_SIGNATURE) {
|
||||
+ authTypes |= 1 << ssl_auth_mldsa44;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case SEC_OID_ML_DSA_65:
|
||||
+ if (cert->keyUsage & KU_DIGITAL_SIGNATURE) {
|
||||
+ authTypes |= 1 << ssl_auth_mldsa65;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case SEC_OID_ML_DSA_87:
|
||||
+ if (cert->keyUsage & KU_DIGITAL_SIGNATURE) {
|
||||
+ authTypes |= 1 << ssl_auth_mldsa87;
|
||||
+ }
|
||||
+
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check that we successfully picked an authType */
|
||||
@@ -729,10 +746,19 @@
|
||||
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
|
||||
mask |= 1 << ssl_auth_ecdsa;
|
||||
mask |= 1 << ssl_auth_ecdh_rsa;
|
||||
mask |= 1 << ssl_auth_ecdh_ecdsa;
|
||||
break;
|
||||
+ case SEC_OID_ML_DSA_44:
|
||||
+ mask |= 1 << ssl_auth_mldsa44;
|
||||
+ break;
|
||||
+ case SEC_OID_ML_DSA_65:
|
||||
+ mask |= 1 << ssl_auth_mldsa65;
|
||||
+ break;
|
||||
+ case SEC_OID_ML_DSA_87:
|
||||
+ mask |= 1 << ssl_auth_mldsa87;
|
||||
+ break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
PORT_Assert(authTypes);
|
||||
/* Simply test that no inappropriate auth types are set. */
|
||||
diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h
|
||||
--- a/lib/ssl/sslimpl.h
|
||||
+++ b/lib/ssl/sslimpl.h
|
||||
@@ -1746,16 +1746,18 @@
|
||||
SECStatus ssl_SetAuthKeyBits(sslSocket *ss, const SECKEYPublicKey *pubKey);
|
||||
SECStatus ssl3_HandleServerSpki(sslSocket *ss);
|
||||
SECStatus ssl3_AuthCertificate(sslSocket *ss);
|
||||
SECStatus ssl_ReadCertificateStatus(sslSocket *ss, PRUint8 *b,
|
||||
PRUint32 length);
|
||||
-SECStatus ssl3_EncodeSigAlgs(const sslSocket *ss, PRUint16 minVersion, PRBool forCert,
|
||||
+SECStatus ssl3_EncodeSigAlgs(const sslSocket *ss, PRUint16 maxVersion,
|
||||
+ PRUint16 minVersion, PRBool forCert,
|
||||
PRBool grease, sslBuffer *buf);
|
||||
SECStatus ssl3_EncodeFilteredSigAlgs(const sslSocket *ss,
|
||||
const SSLSignatureScheme *schemes,
|
||||
PRUint32 numSchemes, PRBool grease, sslBuffer *buf);
|
||||
-SECStatus ssl3_FilterSigAlgs(const sslSocket *ss, PRUint16 minVersion, PRBool disableRsae, PRBool forCert,
|
||||
+SECStatus ssl3_FilterSigAlgs(const sslSocket *ss, PRUint16 maxVersion, PRUint16 minVersion,
|
||||
+ PRBool disableRsae, PRBool forCert,
|
||||
unsigned int maxSchemes, SSLSignatureScheme *filteredSchemes,
|
||||
unsigned int *numFilteredSchemes);
|
||||
SECStatus ssl_GetCertificateRequestCAs(const sslSocket *ss,
|
||||
unsigned int *calenp,
|
||||
const SECItem **namesp,
|
||||
@@ -1821,10 +1823,11 @@
|
||||
SECStatus ssl_InsertRecordHeader(const sslSocket *ss, ssl3CipherSpec *cwSpec,
|
||||
SSLContentType contentType, sslBuffer *wrBuf,
|
||||
PRBool *needsLength);
|
||||
PRBool ssl_SignatureSchemeValid(SSLSignatureScheme scheme, SECOidTag spkiOid,
|
||||
PRBool isTls13);
|
||||
+SSLSignatureScheme ssl_SignatureSchemeFromPublicKeyOid(SECOidTag tag);
|
||||
|
||||
/* Pull in DTLS functions */
|
||||
#include "dtlscon.h"
|
||||
|
||||
/* Pull in TLS 1.3 functions */
|
||||
diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h
|
||||
--- a/lib/ssl/sslt.h
|
||||
+++ b/lib/ssl/sslt.h
|
||||
@@ -154,10 +154,14 @@
|
||||
ssl_sig_dsa_sha256 = 0x0402,
|
||||
ssl_sig_dsa_sha384 = 0x0502,
|
||||
ssl_sig_dsa_sha512 = 0x0602,
|
||||
ssl_sig_ecdsa_sha1 = 0x0203,
|
||||
|
||||
+ ssl_sig_mldsa44 = 0x0904,
|
||||
+ ssl_sig_mldsa65 = 0x0905,
|
||||
+ ssl_sig_mldsa87 = 0x0906,
|
||||
+
|
||||
/* The following value (which can't be used in the protocol), represents
|
||||
* the RSA signature using SHA-1 and MD5 that is used in TLS 1.0 and 1.1.
|
||||
* This is reported as a signature scheme when TLS 1.0 or 1.1 is used.
|
||||
* This should not be passed to SSL_SignatureSchemePrefSet(); this
|
||||
* signature scheme is always used and cannot be disabled. */
|
||||
@@ -183,10 +187,13 @@
|
||||
ssl_auth_ecdh_ecdsa = 6, /* ECDH cert with an ECDSA signature. */
|
||||
ssl_auth_rsa_sign = 7, /* RSA signing with an rsaEncryption key. */
|
||||
ssl_auth_rsa_pss = 8, /* RSA signing with a PSS key. */
|
||||
ssl_auth_psk = 9,
|
||||
ssl_auth_tls13_any = 10,
|
||||
+ ssl_auth_mldsa44 = 11, /* use separate auth for each paramset */
|
||||
+ ssl_auth_mldsa65 = 12, /* so we can properly identify the certs */
|
||||
+ ssl_auth_mldsa87 = 13,
|
||||
ssl_auth_size /* number of authentication types */
|
||||
} SSLAuthType;
|
||||
|
||||
typedef enum {
|
||||
ssl_psk_none = 0,
|
||||
diff --git a/lib/ssl/tls13exthandle.c b/lib/ssl/tls13exthandle.c
|
||||
--- a/lib/ssl/tls13exthandle.c
|
||||
+++ b/lib/ssl/tls13exthandle.c
|
||||
@@ -1450,11 +1450,11 @@
|
||||
* the "advertised" list, then encode them to be sent. If we receive
|
||||
* a DC in response, validate that it matches one of the advertised
|
||||
* schemes. */
|
||||
SSLSignatureScheme filtered[MAX_SIGNATURE_SCHEMES] = { 0 };
|
||||
unsigned int filteredCount = 0;
|
||||
- SECStatus rv = ssl3_FilterSigAlgs(ss, ss->vrange.max,
|
||||
+ SECStatus rv = ssl3_FilterSigAlgs(ss, ss->vrange.max, ss->vrange.max,
|
||||
PR_TRUE /* disableRsae */,
|
||||
PR_FALSE /* forCert */,
|
||||
MAX_SIGNATURE_SCHEMES,
|
||||
filtered,
|
||||
&filteredCount);
|
||||
diff --git a/lib/ssl/tls13signature.c b/lib/ssl/tls13signature.c
|
||||
--- a/lib/ssl/tls13signature.c
|
||||
+++ b/lib/ssl/tls13signature.c
|
||||
@@ -55,10 +55,24 @@
|
||||
break;
|
||||
case ssl_sig_ecdsa_secp521r1_sha512:
|
||||
algTag = SEC_OID_ANSIX962_ECDSA_SHA512_SIGNATURE;
|
||||
hashAlgTag = SEC_OID_SHA512;
|
||||
break;
|
||||
+ /* ML-DSA fully defines the hash and sign algorithm,
|
||||
+ * we set the hash alg to the same as the sign alg. */
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ algTag = SEC_OID_ML_DSA_44;
|
||||
+ hashAlgTag = SEC_OID_ML_DSA_44;
|
||||
+ break;
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ algTag = SEC_OID_ML_DSA_65;
|
||||
+ hashAlgTag = SEC_OID_ML_DSA_65;
|
||||
+ break;
|
||||
+ case ssl_sig_mldsa87:
|
||||
+ algTag = SEC_OID_ML_DSA_87;
|
||||
+ hashAlgTag = SEC_OID_ML_DSA_87;
|
||||
+ break;
|
||||
|
||||
/* the following is unsupported in tls 1.3 and greater, just break.
|
||||
* We include them here explicitly so we get the compiler warning about
|
||||
* missing enums in the switch statement. default would be a break anyway.
|
||||
* That way we'll know to update this table when new algorithms are
|
||||
diff --git a/lib/ssl/tls13subcerts.c b/lib/ssl/tls13subcerts.c
|
||||
--- a/lib/ssl/tls13subcerts.c
|
||||
+++ b/lib/ssl/tls13subcerts.c
|
||||
@@ -649,11 +649,17 @@
|
||||
PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM);
|
||||
return NULL;
|
||||
}
|
||||
return SECKEY_CreateSubjectPublicKeyInfo(dcPub);
|
||||
}
|
||||
-
|
||||
+ case mldsaKey:
|
||||
+ if (ssl_SignatureSchemeFromPublicKeyOid(dcPub->u.mldsa.paramSet)
|
||||
+ != dcCertVerifyAlg) {
|
||||
+ PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ return SECKEY_CreateSubjectPublicKeyInfo(dcPub);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
PORT_SetError(SEC_ERROR_INVALID_KEY);
|
||||
|
||||
80604
nss-3.118-ml-dsa-unittests.patch
Normal file
80604
nss-3.118-ml-dsa-unittests.patch
Normal file
File diff suppressed because one or more lines are too long
61
nss-3.118-prefer-all-hybrid.patch
Normal file
61
nss-3.118-prefer-all-hybrid.patch
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c
|
||||
--- a/lib/ssl/sslsock.c
|
||||
+++ b/lib/ssl/sslsock.c
|
||||
@@ -163,22 +163,22 @@ static const PRUint16 srtpCiphers[] = {
|
||||
ssl_grp_kem_##first##second, size, ssl_kea_ecdh_hybrid, \
|
||||
SEC_OID_##first_oid##second_oid, assumeSupported \
|
||||
}
|
||||
|
||||
const sslNamedGroupDef ssl_named_groups[] = {
|
||||
/* Note that 256 for 25519 and x25519mlkem786 is a lie, but we only use it
|
||||
* for checking bit security and expect 256 bits there (not 255). */
|
||||
HYGROUP(mlkem768, x25519, 256, MLKEM768, X25519, PR_TRUE),
|
||||
+ HYGROUP(secp256r1, mlkem768, 256, SECP256R1, MLKEM768, PR_TRUE),
|
||||
+ HYGROUP(secp384r1, mlkem1024, 256, SECP384R1, MLKEM1024, PR_TRUE),
|
||||
{ ssl_grp_ec_curve25519, 256, ssl_kea_ecdh, SEC_OID_CURVE25519, PR_TRUE },
|
||||
ECGROUP(secp256r1, 256, SECP256R1, PR_TRUE),
|
||||
ECGROUP(secp384r1, 384, SECP384R1, PR_TRUE),
|
||||
ECGROUP(secp521r1, 521, SECP521R1, PR_TRUE),
|
||||
- HYGROUP(secp256r1, mlkem768, 256, SECP256R1, MLKEM768, PR_TRUE),
|
||||
- HYGROUP(secp384r1, mlkem1024, 256, SECP384R1, MLKEM1024, PR_TRUE),
|
||||
{ ssl_grp_kem_xyber768d00, 256, ssl_kea_ecdh_hybrid, SEC_OID_XYBER768D00, PR_FALSE },
|
||||
FFGROUP(2048),
|
||||
FFGROUP(3072),
|
||||
FFGROUP(4096),
|
||||
FFGROUP(6144),
|
||||
FFGROUP(8192),
|
||||
ECGROUP(secp192r1, 192, SECP192R1, PR_FALSE),
|
||||
ECGROUP(secp160r2, 160, SECP160R2, PR_FALSE),
|
||||
diff --git a/lib/ssl/tls13con.c b/lib/ssl/tls13con.c
|
||||
--- a/lib/ssl/tls13con.c
|
||||
+++ b/lib/ssl/tls13con.c
|
||||
@@ -666,20 +666,29 @@ tls13_SetupClientHello(sslSocket *ss, ss
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
/* Select the first enabled group.
|
||||
* TODO(ekr@rtfm.com): be smarter about offering the group
|
||||
* that the other side negotiated if we are resuming. */
|
||||
PORT_Assert(PR_CLIST_IS_EMPTY(&ss->ephemeralKeyPairs));
|
||||
+ PRBool has_hybrid = PR_FALSE;
|
||||
for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
|
||||
if (!ss->namedGroupPreferences[i]) {
|
||||
continue;
|
||||
}
|
||||
+ /* only send one hybrid key share no matter how many key
|
||||
+ * shares we send */
|
||||
+ if (ss->namedGroupPreferences[i]->keaType == ssl_kea_ecdh_hybrid) {
|
||||
+ if (has_hybrid) {
|
||||
+ continue; /* already have one skip*/
|
||||
+ }
|
||||
+ has_hybrid = PR_TRUE;
|
||||
+ }
|
||||
rv = tls13_AddKeyShare(ss, ss->namedGroupPreferences[i]);
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
if (++numShares > ss->additionalShares) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
11
nss-3.118.1-add-const-qual-for-gcc15.patch
Normal file
11
nss-3.118.1-add-const-qual-for-gcc15.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- nss/lib/freebl/genload.c.const-qual-fix 2025-11-25 15:52:31.669711787 +0100
|
||||
+++ nss/lib/freebl/genload.c 2025-11-25 15:53:03.103908883 +0100
|
||||
@@ -85,7 +85,7 @@ loader_LoadLibInReferenceDir(const char*
|
||||
{
|
||||
PRLibrary* dlh = NULL;
|
||||
char* fullName = NULL;
|
||||
- char* c;
|
||||
+ const char* c;
|
||||
PRLibSpec libSpec;
|
||||
|
||||
/* Remove the trailing filename from referencePath and add the new one */
|
||||
11
nss-3.118.1-fix-test-typo.patch
Normal file
11
nss-3.118.1-fix-test-typo.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- nss/tests/ssl/ssl.sh.test_fix 2025-11-20 09:24:38.286520477 +0100
|
||||
+++ nss/tests/ssl/ssl.sh 2025-11-20 09:24:41.829532357 +0100
|
||||
@@ -126,7 +126,7 @@ ssl_init()
|
||||
# in fips mode, turn off curve25519 until it's NIST approved
|
||||
ALL_GROUPS="P256,P384,P521,x25519,FF2048,FF3072,FF4096,FF6144,FF8192,xyber768d00,x25519mlkem768,secp256r1mlkem768,secp384r1mlkem1024"
|
||||
NON_PQ_GROUPS="P256,P384,P521,x25519,FF2048,FF3072,FF4096,FF6144,FF8192"
|
||||
- FIPS_GROUPS="P256,P384,P521,FF2048,FF3072,FF4096,FF6144,FF8192,mx25519mlkem768,secp256r1mlkem768,secp384r1mlkem1024"
|
||||
+ FIPS_GROUPS="P256,P384,P521,FF2048,FF3072,FF4096,FF6144,FF8192,x25519mlkem768,secp256r1mlkem768,secp384r1mlkem1024"
|
||||
FIPS_NON_PQ_GROUPS="P256,P384,P521,FF2048,FF3072,FF4096,FF6144,FF8192"
|
||||
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
diff -up nss/tests/chains/scenarios/scenarios.noocsptest nss/tests/chains/scenarios/scenarios
|
||||
--- nss/tests/chains/scenarios/scenarios.noocsptest 2013-06-27 10:58:08.000000000 -0700
|
||||
+++ nss/tests/chains/scenarios/scenarios 2013-07-02 16:13:27.075038930 -0700
|
||||
@@ -50,7 +50,6 @@ bridgewithpolicyextensionandmapping.cfg
|
||||
realcerts.cfg
|
||||
dsa.cfg
|
||||
revoc.cfg
|
||||
-ocsp.cfg
|
||||
crldp.cfg
|
||||
trustanchors.cfg
|
||||
nameconstraints.cfg
|
||||
3411
nss-3.79-dbtool.patch
Normal file
3411
nss-3.79-dbtool.patch
Normal file
File diff suppressed because it is too large
Load diff
78
nss-3.89-dangling.patch
Normal file
78
nss-3.89-dangling.patch
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
diff --git a/cmd/ecperf/ecperf.c b/cmd/ecperf/ecperf.c
|
||||
--- a/cmd/ecperf/ecperf.c
|
||||
+++ b/cmd/ecperf/ecperf.c
|
||||
@@ -51,10 +51,11 @@
|
||||
int iters = threadData->iters;
|
||||
unsigned char sigData[256];
|
||||
SECItem sig;
|
||||
CK_SESSION_HANDLE session;
|
||||
CK_RV crv;
|
||||
+ void *tmp = NULL;
|
||||
|
||||
threadData->status = SECSuccess;
|
||||
threadData->count = 0;
|
||||
|
||||
/* get our thread's session */
|
||||
@@ -66,10 +67,11 @@
|
||||
}
|
||||
|
||||
if (threadData->isSign) {
|
||||
sig.data = sigData;
|
||||
sig.len = sizeof(sigData);
|
||||
+ tmp = threadData->p2;
|
||||
threadData->p2 = (void *)&sig;
|
||||
}
|
||||
|
||||
while (iters--) {
|
||||
threadData->status = (*op)(session, threadData->p1,
|
||||
@@ -77,27 +79,33 @@
|
||||
if (threadData->status != SECSuccess) {
|
||||
break;
|
||||
}
|
||||
threadData->count++;
|
||||
}
|
||||
+
|
||||
+ if (threadData->isSign) {
|
||||
+ threadData->p2 = tmp;
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
genericThread(void *data)
|
||||
{
|
||||
ThreadData *threadData = (ThreadData *)data;
|
||||
int iters = threadData->iters;
|
||||
unsigned char sigData[256];
|
||||
SECItem sig;
|
||||
+ void *tmp = NULL;
|
||||
|
||||
threadData->status = SECSuccess;
|
||||
threadData->count = 0;
|
||||
|
||||
if (threadData->isSign) {
|
||||
sig.data = sigData;
|
||||
sig.len = sizeof(sigData);
|
||||
+ tmp = threadData->p2;
|
||||
threadData->p2 = (void *)&sig;
|
||||
}
|
||||
|
||||
while (iters--) {
|
||||
threadData->status = (*threadData->op)(threadData->p1,
|
||||
@@ -105,10 +113,14 @@
|
||||
if (threadData->status != SECSuccess) {
|
||||
break;
|
||||
}
|
||||
threadData->count++;
|
||||
}
|
||||
+
|
||||
+ if (threadData->isSign) {
|
||||
+ threadData->p2 = tmp;
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
/* Time iter repetitions of operation op. */
|
||||
SECStatus
|
||||
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
--- ./nss/cmd/httpserv/httpserv.c.539183 2016-05-21 18:31:39.879585420 -0700
|
||||
+++ ./nss/cmd/httpserv/httpserv.c 2016-05-21 18:37:22.374464057 -0700
|
||||
@@ -953,23 +953,23 @@
|
||||
getBoundListenSocket(unsigned short port)
|
||||
{
|
||||
PRFileDesc *listen_sock;
|
||||
int listenQueueDepth = 5 + (2 * maxThreads);
|
||||
PRStatus prStatus;
|
||||
PRNetAddr addr;
|
||||
PRSocketOptionData opt;
|
||||
|
||||
- addr.inet.family = PR_AF_INET;
|
||||
- addr.inet.ip = PR_INADDR_ANY;
|
||||
- addr.inet.port = PR_htons(port);
|
||||
+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
|
||||
+ errExit("PR_SetNetAddr");
|
||||
+ }
|
||||
|
||||
- listen_sock = PR_NewTCPSocket();
|
||||
+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
|
||||
if (listen_sock == NULL) {
|
||||
- errExit("PR_NewTCPSocket");
|
||||
+ errExit("PR_OpenTCPSockett");
|
||||
}
|
||||
|
||||
opt.option = PR_SockOpt_Nonblocking;
|
||||
opt.value.non_blocking = PR_FALSE;
|
||||
prStatus = PR_SetSocketOption(listen_sock, &opt);
|
||||
if (prStatus < 0) {
|
||||
PR_Close(listen_sock);
|
||||
errExit("PR_SetSocketOption(PR_SockOpt_Nonblocking)");
|
||||
--- ./nss/cmd/selfserv/selfserv.c.539183 2016-05-21 18:31:39.882585367 -0700
|
||||
+++ ./nss/cmd/selfserv/selfserv.c 2016-05-21 18:41:43.092801174 -0700
|
||||
@@ -1711,23 +1711,23 @@
|
||||
getBoundListenSocket(unsigned short port)
|
||||
{
|
||||
PRFileDesc *listen_sock;
|
||||
int listenQueueDepth = 5 + (2 * maxThreads);
|
||||
PRStatus prStatus;
|
||||
PRNetAddr addr;
|
||||
PRSocketOptionData opt;
|
||||
|
||||
- addr.inet.family = PR_AF_INET;
|
||||
- addr.inet.ip = PR_INADDR_ANY;
|
||||
- addr.inet.port = PR_htons(port);
|
||||
+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
|
||||
+ errExit("PR_SetNetAddr");
|
||||
+ }
|
||||
|
||||
- listen_sock = PR_NewTCPSocket();
|
||||
+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
|
||||
if (listen_sock == NULL) {
|
||||
- errExit("PR_NewTCPSocket");
|
||||
+ errExit("PR_OpenTCPSocket error");
|
||||
}
|
||||
|
||||
opt.option = PR_SockOpt_Nonblocking;
|
||||
opt.value.non_blocking = PR_FALSE;
|
||||
prStatus = PR_SetSocketOption(listen_sock, &opt);
|
||||
if (prStatus < 0) {
|
||||
PR_Close(listen_sock);
|
||||
errExit("PR_SetSocketOption(PR_SockOpt_Nonblocking)");
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
diff -up nss/lib/pk11wrap/pk11pars.c.check_policy_file nss/lib/pk11wrap/pk11pars.c
|
||||
--- nss/lib/pk11wrap/pk11pars.c.check_policy_file 2017-01-06 13:21:47.002952050 +0100
|
||||
+++ nss/lib/pk11wrap/pk11pars.c 2017-01-06 13:28:18.972536334 +0100
|
||||
@@ -109,6 +109,7 @@ secmod_NewModule(void)
|
||||
*other flags are set */
|
||||
#define SECMOD_FLAG_MODULE_DB_SKIP_FIRST 0x02
|
||||
#define SECMOD_FLAG_MODULE_DB_DEFAULT_MODDB 0x04
|
||||
+#define SECMOD_FLAG_MODULE_DB_POLICY_ONLY 0x08
|
||||
|
||||
/* private flags for internal (field in SECMODModule). */
|
||||
/* The meaing of these flags is as follows:
|
||||
@@ -704,6 +705,9 @@ SECMOD_CreateModuleEx(const char *librar
|
||||
if (NSSUTIL_ArgHasFlag("flags", "defaultModDB", nssc)) {
|
||||
flags |= SECMOD_FLAG_MODULE_DB_DEFAULT_MODDB;
|
||||
}
|
||||
+ if (NSSUTIL_ArgHasFlag("flags", "policyOnly", nssc)) {
|
||||
+ flags |= SECMOD_FLAG_MODULE_DB_POLICY_ONLY;
|
||||
+ }
|
||||
/* additional moduleDB flags could be added here in the future */
|
||||
mod->isModuleDB = (PRBool)flags;
|
||||
}
|
||||
@@ -744,6 +748,14 @@ SECMOD_GetDefaultModDBFlag(SECMODModule
|
||||
}
|
||||
|
||||
PRBool
|
||||
+secmod_PolicyOnly(SECMODModule *mod)
|
||||
+{
|
||||
+ char flags = (char) mod->isModuleDB;
|
||||
+
|
||||
+ return (flags & SECMOD_FLAG_MODULE_DB_POLICY_ONLY) ? PR_TRUE : PR_FALSE;
|
||||
+}
|
||||
+
|
||||
+PRBool
|
||||
secmod_IsInternalKeySlot(SECMODModule *mod)
|
||||
{
|
||||
char flags = (char)mod->internal;
|
||||
@@ -1661,6 +1673,12 @@ SECMOD_LoadModule(char *modulespec, SECM
|
||||
if (!module) {
|
||||
goto loser;
|
||||
}
|
||||
+
|
||||
+ /* a policy only stanza doesn't actually get 'loaded'. policy has already
|
||||
+ * been parsed as a side effect of the CreateModuleEx call */
|
||||
+ if (secmod_PolicyOnly(module)) {
|
||||
+ return module;
|
||||
+ }
|
||||
if (parent) {
|
||||
module->parent = SECMOD_ReferenceModule(parent);
|
||||
if (module->internal && secmod_IsInternalKeySlot(parent)) {
|
||||
13
nss-dso-ldflags.patch
Normal file
13
nss-dso-ldflags.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Index: nss/coreconf/Linux.mk
|
||||
===================================================================
|
||||
--- nss.orig/coreconf/Linux.mk
|
||||
+++ nss/coreconf/Linux.mk
|
||||
@@ -144,7 +144,7 @@ ifdef USE_PTHREADS
|
||||
endif
|
||||
|
||||
DSO_CFLAGS = -fPIC
|
||||
-DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections
|
||||
+DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections $(DSO_LDFLAGS)
|
||||
# The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
|
||||
# incorrectly reports undefined references in the libraries we link with, so
|
||||
# we don't use -z defs there.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c.gcc7 nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c
|
||||
--- nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c.gcc7 2017-02-08 14:34:04.212655936 +0100
|
||||
+++ nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c 2017-02-08 14:37:33.326388891 +0100
|
||||
@@ -89,7 +89,7 @@ pkix_pl_OcspRequest_Hashcode(
|
||||
PKIX_HASHCODE(ocspRq->signerCert, &signerHash, plContext,
|
||||
PKIX_CERTHASHCODEFAILED);
|
||||
|
||||
- *pHashcode = (((((extensionHash << 8) || certHash) << 8) ||
|
||||
+ *pHashcode = ((PKIX_UInt32)(((PKIX_UInt32)((extensionHash << 8) || certHash) << 8) ||
|
||||
dateHash) << 8) || signerHash;
|
||||
|
||||
cleanup:
|
||||
120
nss-no-dbm-man-page.patch
Normal file
120
nss-no-dbm-man-page.patch
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
diff -up ./doc/certutil.xml.no-dbm ./doc/certutil.xml
|
||||
--- ./doc/certutil.xml.no-dbm 2021-05-29 10:26:21.853386165 -0700
|
||||
+++ ./doc/certutil.xml 2021-05-29 10:31:15.057058619 -0700
|
||||
@@ -205,8 +205,7 @@ If this option is not used, the validity
|
||||
<para><command>certutil</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). </para>
|
||||
<para>NSS recognizes the following prefixes:</para>
|
||||
<itemizedlist>
|
||||
- <listitem><para><command>sql:</command> requests the newer database</para></listitem>
|
||||
- <listitem><para><command>dbm:</command> requests the legacy database</para></listitem>
|
||||
+ <listitem><para><command>sql:</command> requests the sql-lite database</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>If no prefix is specified the default type is retrieved from NSS_DEFAULT_DB_TYPE. If NSS_DEFAULT_DB_TYPE is not set then <command>sql:</command> is the default.</para>
|
||||
</listitem>
|
||||
@@ -1205,17 +1204,9 @@ BerkeleyDB. These new databases provide
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
-<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
|
||||
+<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. </para>
|
||||
|
||||
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.
|
||||
-Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
|
||||
-
|
||||
-<programlisting>$ certutil -L -d dbm:/home/my/sharednssdb</programlisting>
|
||||
-
|
||||
-<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
|
||||
-<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
|
||||
-
|
||||
-<para>This line can be set added to the <filename>~/.bashrc</filename> file to make the change permanent.</para>
|
||||
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
diff -up ./doc/modutil.xml.no-dbm ./doc/modutil.xml
|
||||
--- ./doc/modutil.xml.no-dbm 2021-05-29 10:26:21.854386171 -0700
|
||||
+++ ./doc/modutil.xml 2021-05-29 10:28:23.293078869 -0700
|
||||
@@ -151,7 +151,7 @@
|
||||
<varlistentry>
|
||||
<term>-dbdir directory</term>
|
||||
<listitem><para>Specify the database directory in which to access or create security module database files.</para>
|
||||
- <para><command>modutil</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>dbm:</command> is not used, then the tool assumes that the given databases are in SQLite format.</para></listitem>
|
||||
+ <para><command>modutil</command> supports SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). </para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
@@ -689,15 +689,7 @@ BerkleyDB. These new databases provide m
|
||||
|
||||
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
|
||||
|
||||
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.
|
||||
-Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
|
||||
-
|
||||
-<programlisting>modutil -create -dbdir dbm:/home/my/sharednssdb</programlisting>
|
||||
-
|
||||
-<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
|
||||
-<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
|
||||
-
|
||||
-<para>This line can be added to the <filename>~/.bashrc</filename> file to make the change permanent for the user.</para>
|
||||
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type. </para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
diff -up ./doc/pk12util.xml.no-dbm ./doc/pk12util.xml
|
||||
--- ./doc/pk12util.xml.no-dbm 2021-05-29 10:26:21.854386171 -0700
|
||||
+++ ./doc/pk12util.xml 2021-05-29 10:28:23.293078869 -0700
|
||||
@@ -90,7 +90,7 @@
|
||||
<varlistentry>
|
||||
<term>-d directory</term>
|
||||
<listitem><para>Specify the database directory into which to import to or export from certificates and keys.</para>
|
||||
- <para><command>pk12util</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>dbm:</command> is not used, then the tool assumes that the given databases are in the SQLite format.</para></listitem>
|
||||
+ <para><command>pk12util</command> supports SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). </para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
@@ -394,15 +394,7 @@ BerkleyDB. These new databases provide m
|
||||
|
||||
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
|
||||
|
||||
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type
|
||||
-Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
|
||||
-
|
||||
-<programlisting># pk12util -i /tmp/cert-files/users.p12 -d dbm:/home/my/sharednssdb</programlisting>
|
||||
-
|
||||
-<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
|
||||
-<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
|
||||
-
|
||||
-<para>This line can be set added to the <filename>~/.bashrc</filename> file to make the change permanent.</para>
|
||||
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type. </para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
diff -up ./doc/signver.xml.no-dbm ./doc/signver.xml
|
||||
--- ./doc/signver.xml.no-dbm 2021-05-29 10:26:21.854386171 -0700
|
||||
+++ ./doc/signver.xml 2021-05-29 10:28:23.293078869 -0700
|
||||
@@ -66,7 +66,7 @@
|
||||
<varlistentry>
|
||||
<term>-d <emphasis>directory</emphasis></term>
|
||||
<listitem><para>Specify the database directory which contains the certificates and keys.</para>
|
||||
- <para><command>signver</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>dbm:</command> is not used, then the tool assumes that the given databases are in the SQLite format.</para></listitem>
|
||||
+ <para><command>signver</command> supports SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). </para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>-a</term>
|
||||
@@ -155,15 +155,7 @@ BerkleyDB. These new databases provide m
|
||||
|
||||
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
|
||||
|
||||
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type
|
||||
-Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
|
||||
-
|
||||
-<programlisting># signver -A -s <replaceable>signature</replaceable> -d dbm:/home/my/sharednssdb</programlisting>
|
||||
-
|
||||
-<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
|
||||
-<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
|
||||
-
|
||||
-<para>This line can be added to the <filename>~/.bashrc</filename> file to make the change permanent for the user.</para>
|
||||
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
85
nss-signtool-format.patch
Normal file
85
nss-signtool-format.patch
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
diff --git a/cmd/modutil/install.c b/cmd/modutil/install.c
|
||||
--- a/cmd/modutil/install.c
|
||||
+++ b/cmd/modutil/install.c
|
||||
@@ -825,17 +825,20 @@ rm_dash_r(char *path)
|
||||
|
||||
dir = PR_OpenDir(path);
|
||||
if (!dir) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Recursively delete all entries in the directory */
|
||||
while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
|
||||
- snprintf(filename, sizeof(filename), "%s/%s", path, entry->name);
|
||||
+ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name) >= sizeof(filename)) {
|
||||
+ PR_CloseDir(dir);
|
||||
+ return -1;
|
||||
+ }
|
||||
if (rm_dash_r(filename)) {
|
||||
PR_CloseDir(dir);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (PR_CloseDir(dir) != PR_SUCCESS) {
|
||||
return -1;
|
||||
diff --git a/cmd/signtool/util.c b/cmd/signtool/util.c
|
||||
--- a/cmd/signtool/util.c
|
||||
+++ b/cmd/signtool/util.c
|
||||
@@ -138,6 +138,12 @@ rm_dash_r(char *path)
|
||||
/* Recursively delete all entries in the directory */
|
||||
while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
|
||||
snprintf(filename, sizeof(filename), "%s/%s", path, entry->name);
|
||||
+ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name
|
||||
+) >= sizeof(filename)) {
|
||||
+ errorCount++;
|
||||
+ PR_CloseDir(dir);
|
||||
+ return -1;
|
||||
+ }
|
||||
if (rm_dash_r(filename)) {
|
||||
PR_CloseDir(dir);
|
||||
return -1;
|
||||
diff --git a/lib/libpkix/pkix/util/pkix_list.c b/lib/libpkix/pkix/util/pkix_list.c
|
||||
--- a/lib/libpkix/pkix/util/pkix_list.c
|
||||
+++ b/lib/libpkix/pkix/util/pkix_list.c
|
||||
@@ -1530,17 +1530,17 @@ cleanup:
|
||||
*/
|
||||
PKIX_Error *
|
||||
PKIX_List_SetItem(
|
||||
PKIX_List *list,
|
||||
PKIX_UInt32 index,
|
||||
PKIX_PL_Object *item,
|
||||
void *plContext)
|
||||
{
|
||||
- PKIX_List *element;
|
||||
+ PKIX_List *element = NULL;
|
||||
|
||||
PKIX_ENTER(LIST, "PKIX_List_SetItem");
|
||||
PKIX_NULLCHECK_ONE(list);
|
||||
|
||||
if (list->immutable){
|
||||
PKIX_ERROR(PKIX_OPERATIONNOTPERMITTEDONIMMUTABLELIST);
|
||||
}
|
||||
|
||||
diff --git a/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c b/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c
|
||||
--- a/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c
|
||||
+++ b/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c
|
||||
@@ -102,17 +102,17 @@ cleanup:
|
||||
*/
|
||||
static PKIX_Error *
|
||||
pkix_pl_OID_Equals(
|
||||
PKIX_PL_Object *first,
|
||||
PKIX_PL_Object *second,
|
||||
PKIX_Boolean *pResult,
|
||||
void *plContext)
|
||||
{
|
||||
- PKIX_Int32 cmpResult;
|
||||
+ PKIX_Int32 cmpResult = 0;
|
||||
|
||||
PKIX_ENTER(OID, "pkix_pl_OID_Equals");
|
||||
PKIX_NULLCHECK_THREE(first, second, pResult);
|
||||
|
||||
PKIX_CHECK(pkix_pl_OID_Comparator
|
||||
(first, second, &cmpResult, plContext),
|
||||
PKIX_OIDCOMPARATORFAILED);
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
diff -up ./nss/cmd/Makefile.skipthem ./nss/cmd/Makefile
|
||||
--- ./nss/cmd/Makefile.skipthem 2017-01-06 13:17:27.477848351 +0100
|
||||
+++ ./nss/cmd/Makefile 2017-01-06 13:19:30.244586100 +0100
|
||||
@@ -19,7 +19,11 @@ BLTEST_SRCDIR =
|
||||
ECPERF_SRCDIR =
|
||||
FREEBL_ECTEST_SRCDIR =
|
||||
FIPSTEST_SRCDIR =
|
||||
+ifeq ($(NSS_BLTEST_NOT_AVAILABLE),1)
|
||||
+SHLIBSIGN_SRCDIR = shlibsign
|
||||
+else
|
||||
SHLIBSIGN_SRCDIR =
|
||||
+endif
|
||||
else
|
||||
BLTEST_SRCDIR = bltest
|
||||
ECPERF_SRCDIR = ecperf
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up ./gtests/manifest.mn.skip_util_gtest ./gtests/manifest.mn
|
||||
--- ./gtests/manifest.mn.skip_util_gtest 2016-09-29 12:05:28.858019733 +0200
|
||||
+++ ./gtests/manifest.mn 2016-09-29 12:06:17.298681765 +0200
|
||||
@@ -9,8 +9,5 @@ DIRS = \
|
||||
google_test \
|
||||
common \
|
||||
der_gtest \
|
||||
- util_gtest \
|
||||
- pk11_gtest \
|
||||
- ssl_gtest \
|
||||
nss_bogo_shim \
|
||||
$(NULL)
|
||||
116
nss-softokn-config.in
Normal file
116
nss-softokn-config.in
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
#!/bin/sh
|
||||
|
||||
prefix=@prefix@
|
||||
|
||||
major_version=@MOD_MAJOR_VERSION@
|
||||
minor_version=@MOD_MINOR_VERSION@
|
||||
patch_version=@MOD_PATCH_VERSION@
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: nss-softokn-config [OPTIONS] [LIBRARIES]
|
||||
Options:
|
||||
[--prefix[=DIR]]
|
||||
[--exec-prefix[=DIR]]
|
||||
[--includedir[=DIR]]
|
||||
[--libdir[=DIR]]
|
||||
[--version]
|
||||
[--libs]
|
||||
[--cflags]
|
||||
Dynamic Libraries:
|
||||
softokn3 - Requires full dynamic linking
|
||||
freebl3 - for internal use only (and glibc for self-integrity check)
|
||||
nssdbm3 - for internal use only
|
||||
Dymamically linked
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage 1 1>&2
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
;;
|
||||
--prefix)
|
||||
echo_prefix=yes
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo_exec_prefix=yes
|
||||
;;
|
||||
--includedir=*)
|
||||
includedir=$optarg
|
||||
;;
|
||||
--includedir)
|
||||
echo_includedir=yes
|
||||
;;
|
||||
--libdir=*)
|
||||
libdir=$optarg
|
||||
;;
|
||||
--libdir)
|
||||
echo_libdir=yes
|
||||
;;
|
||||
--version)
|
||||
echo ${major_version}.${minor_version}.${patch_version}
|
||||
;;
|
||||
--cflags)
|
||||
echo_cflags=yes
|
||||
;;
|
||||
--libs)
|
||||
echo_libs=yes
|
||||
;;
|
||||
*)
|
||||
usage 1 1>&2
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Set variables that may be dependent upon other variables
|
||||
if test -z "$exec_prefix"; then
|
||||
exec_prefix=`pkg-config --variable=exec_prefix nss-softokn`
|
||||
fi
|
||||
if test -z "$includedir"; then
|
||||
includedir=`pkg-config --variable=includedir nss-softokn`
|
||||
fi
|
||||
if test -z "$libdir"; then
|
||||
libdir=`pkg-config --variable=libdir nss-softokn`
|
||||
fi
|
||||
|
||||
if test "$echo_prefix" = "yes"; then
|
||||
echo $prefix
|
||||
fi
|
||||
|
||||
if test "$echo_exec_prefix" = "yes"; then
|
||||
echo $exec_prefix
|
||||
fi
|
||||
|
||||
if test "$echo_includedir" = "yes"; then
|
||||
echo $includedir
|
||||
fi
|
||||
|
||||
if test "$echo_libdir" = "yes"; then
|
||||
echo $libdir
|
||||
fi
|
||||
|
||||
if test "$echo_cflags" = "yes"; then
|
||||
echo -I$includedir
|
||||
fi
|
||||
|
||||
if test "$echo_libs" = "yes"; then
|
||||
libdirs="-Wl,-rpath-link,$libdir -L$libdir"
|
||||
echo $libdirs
|
||||
fi
|
||||
|
||||
18
nss-softokn-dracut-module-setup.sh
Normal file
18
nss-softokn-dracut-module-setup.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
check() {
|
||||
return 255
|
||||
}
|
||||
|
||||
depends() {
|
||||
return 0
|
||||
}
|
||||
|
||||
install() {
|
||||
local _dir
|
||||
|
||||
inst_libdir_file libfreeblpriv3.so libfreeblpriv3.chk \
|
||||
libfreebl3.so
|
||||
}
|
||||
3
nss-softokn-dracut.conf
Normal file
3
nss-softokn-dracut.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# turn on nss-softokn module
|
||||
|
||||
add_dracutmodules+=" nss-softokn "
|
||||
11
nss-softokn.pc.in
Normal file
11
nss-softokn.pc.in
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
|
||||
Name: NSS-SOFTOKN
|
||||
Description: Network Security Services Softoken PKCS #11 Module
|
||||
Version: %SOFTOKEN_VERSION%
|
||||
Requires: nspr >= %NSPR_VERSION%, nss-util >= %NSSUTIL_VERSION%
|
||||
Libs: -L${libdir} -lfreebl3 -lnssdbm3 -lsoftokn3
|
||||
Cflags: -I${includedir}
|
||||
118
nss-util-config.in
Normal file
118
nss-util-config.in
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
#!/bin/sh
|
||||
|
||||
prefix=@prefix@
|
||||
|
||||
major_version=@MOD_MAJOR_VERSION@
|
||||
minor_version=@MOD_MINOR_VERSION@
|
||||
patch_version=@MOD_PATCH_VERSION@
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: nss-util-config [OPTIONS] [LIBRARIES]
|
||||
Options:
|
||||
[--prefix[=DIR]]
|
||||
[--exec-prefix[=DIR]]
|
||||
[--includedir[=DIR]]
|
||||
[--libdir[=DIR]]
|
||||
[--version]
|
||||
[--libs]
|
||||
[--cflags]
|
||||
Dynamic Libraries:
|
||||
nssutil
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage 1 1>&2
|
||||
fi
|
||||
|
||||
lib_nssutil=yes
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
;;
|
||||
--prefix)
|
||||
echo_prefix=yes
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo_exec_prefix=yes
|
||||
;;
|
||||
--includedir=*)
|
||||
includedir=$optarg
|
||||
;;
|
||||
--includedir)
|
||||
echo_includedir=yes
|
||||
;;
|
||||
--libdir=*)
|
||||
libdir=$optarg
|
||||
;;
|
||||
--libdir)
|
||||
echo_libdir=yes
|
||||
;;
|
||||
--version)
|
||||
echo ${major_version}.${minor_version}.${patch_version}
|
||||
;;
|
||||
--cflags)
|
||||
echo_cflags=yes
|
||||
;;
|
||||
--libs)
|
||||
echo_libs=yes
|
||||
;;
|
||||
*)
|
||||
usage 1 1>&2
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Set variables that may be dependent upon other variables
|
||||
if test -z "$exec_prefix"; then
|
||||
exec_prefix=`pkg-config --variable=exec_prefix nss-util`
|
||||
fi
|
||||
if test -z "$includedir"; then
|
||||
includedir=`pkg-config --variable=includedir nss-util`
|
||||
fi
|
||||
if test -z "$libdir"; then
|
||||
libdir=`pkg-config --variable=libdir nss-util`
|
||||
fi
|
||||
|
||||
if test "$echo_prefix" = "yes"; then
|
||||
echo $prefix
|
||||
fi
|
||||
|
||||
if test "$echo_exec_prefix" = "yes"; then
|
||||
echo $exec_prefix
|
||||
fi
|
||||
|
||||
if test "$echo_includedir" = "yes"; then
|
||||
echo $includedir
|
||||
fi
|
||||
|
||||
if test "$echo_libdir" = "yes"; then
|
||||
echo $libdir
|
||||
fi
|
||||
|
||||
if test "$echo_cflags" = "yes"; then
|
||||
echo -I$includedir
|
||||
fi
|
||||
|
||||
if test "$echo_libs" = "yes"; then
|
||||
libdirs="-Wl,-rpath-link,$libdir -L$libdir"
|
||||
if test -n "$lib_nssutil"; then
|
||||
libdirs="$libdirs -lnssutil${major_version}"
|
||||
fi
|
||||
echo $libdirs
|
||||
fi
|
||||
|
||||
11
nss-util.pc.in
Normal file
11
nss-util.pc.in
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
|
||||
Name: NSS-UTIL
|
||||
Description: Network Security Services Utility Library
|
||||
Version: %NSSUTIL_VERSION%
|
||||
Requires: nspr >= %NSPR_VERSION%
|
||||
Libs: -L${libdir} -lnssutil3
|
||||
Cflags: -I${includedir}
|
||||
10
plans/gnutls-2way.fmf
Normal file
10
plans/gnutls-2way.fmf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
summary: Upstreamed interop-2way tests
|
||||
contact: Stanislav Zidek <szidek@redhat.com>
|
||||
discover:
|
||||
# upstreamed tests (public)
|
||||
- name: interop-gnutls-2way
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat-crypto/tests/interop.git
|
||||
filter: 'tag: interop-nss & tag: interop-gnutls & tag: interop-2way'
|
||||
execute:
|
||||
how: tmt
|
||||
10
plans/openssl-2way.fmf
Normal file
10
plans/openssl-2way.fmf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
summary: Upstreamed interop-2way tests
|
||||
contact: Stanislav Zidek <szidek@redhat.com>
|
||||
discover:
|
||||
# upstreamed tests (public)
|
||||
- name: interop-openssl-2way
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat-crypto/tests/interop.git
|
||||
filter: 'tag: interop-nss & tag: interop-openssl & tag: interop-2way'
|
||||
execute:
|
||||
how: tmt
|
||||
10
plans/openssl-reneg.fmf
Normal file
10
plans/openssl-reneg.fmf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
summary: Upstreamed interop-nss-openssl renegotiation test
|
||||
contact: Stanislav Zidek <szidek@redhat.com>
|
||||
discover:
|
||||
# upstreamed tests (public)
|
||||
- name: interop-openssl-reneg
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat-crypto/tests/interop.git
|
||||
filter: 'tag: interop-nss & tag: interop-openssl & tag: interop-reneg'
|
||||
execute:
|
||||
how: tmt
|
||||
10
plans/short-interop-tests.fmf
Normal file
10
plans/short-interop-tests.fmf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
summary: Upstreamed interop tests - short tests which do not need to run in parallel
|
||||
contact: Stanislav Zidek <szidek@redhat.com>
|
||||
discover:
|
||||
# upstreamed tests (public)
|
||||
- name: interop-other+nss-fast
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat-crypto/tests/interop.git
|
||||
filter: 'tag: interop-nss & tag: -interop-slow'
|
||||
execute:
|
||||
how: tmt
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up ./nss/lib/ssl/sslsock.c.transitional ./nss/lib/ssl/sslsock.c
|
||||
--- ./nss/lib/ssl/sslsock.c.transitional 2016-06-23 21:03:16.316480089 -0400
|
||||
+++ ./nss/lib/ssl/sslsock.c 2016-06-23 21:08:07.290202477 -0400
|
||||
@@ -72,7 +72,7 @@ static sslOptions ssl_defaults = {
|
||||
PR_FALSE, /* noLocks */
|
||||
PR_FALSE, /* enableSessionTickets */
|
||||
PR_FALSE, /* enableDeflate */
|
||||
- 2, /* enableRenegotiation (default: requires extension) */
|
||||
+ 3, /* enableRenegotiation (default: transitional) */
|
||||
PR_FALSE, /* requireSafeNegotiation */
|
||||
PR_FALSE, /* enableFalseStart */
|
||||
PR_TRUE, /* cbcRandomIV */
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
--- ./nss/lib/ssl/ssl3con.c.1185708_3des 2016-06-23 21:10:09.765992512 -0400
|
||||
+++ ./nss/lib/ssl/ssl3con.c 2016-06-23 22:58:39.121398601 -0400
|
||||
@@ -118,18 +118,18 @@
|
||||
{ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE},
|
||||
{ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE},
|
||||
{ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE},
|
||||
{ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE},
|
||||
{ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE},
|
||||
{ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE},
|
||||
{ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, SSL_ALLOWED, PR_FALSE, PR_FALSE},
|
||||
{ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, SSL_ALLOWED, PR_FALSE, PR_FALSE},
|
||||
- { TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE},
|
||||
- { TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE},
|
||||
+ { TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE},
|
||||
+ { TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE},
|
||||
{ TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE},
|
||||
{ TLS_ECDHE_RSA_WITH_RC4_128_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE},
|
||||
|
||||
{ TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE},
|
||||
{ TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,SSL_ALLOWED,PR_TRUE, PR_FALSE},
|
||||
{ TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE},
|
||||
{ TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, SSL_ALLOWED, PR_FALSE, PR_FALSE},
|
||||
{ TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, SSL_ALLOWED, PR_FALSE, PR_FALSE},
|
||||
6
sources
6
sources
|
|
@ -1,6 +1,4 @@
|
|||
SHA512 (blank-cert8.db) = ac131d15708c5f1b5e467831f919f4fc4ba13b60a4bb5fe260c845fa9afcd899a588d21ed52060abaa1bbb29f2b53af8b495d28407183cb03aff1974f95f1d3d
|
||||
SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06
|
||||
SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c
|
||||
SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7
|
||||
SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310
|
||||
SHA512 (nss-3.29.1.tar.gz) = c060f568a3243343b5a1315d632015373dc7dfd2ca9567fb484190dd56f87b1bc977539b9e28fe4fbfc6ee25409e69b1192a2b590031257dd8c89d162332e050
|
||||
SHA512 (nss-3.118-ml-dsa-test-for-sign-verify-pkcs12_files.tar.xz) = c6440f332703ca9a3351be5a35eac42f24b9c114f54137b95691aa353cc329f0fb7016b689b2f976bc6cff66aa62760067f3226efad665a5252f37294a3d12a6
|
||||
SHA512 (nss-3_119_1-with-nspr-4.38.2.tar.gz) = 926b68d5a94c28c651d4282f3bba34a4347ae39e31b1fb7a449da11123bed08caeba7cb300e242a8c4fab1f683765b50888b63b62ba9e4dc092fd86588cc5443
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
diff -up nss/lib/nss/config.mk.templates nss/lib/nss/config.mk
|
||||
--- nss/lib/nss/config.mk.templates 2013-06-18 11:32:07.590089155 -0700
|
||||
+++ nss/lib/nss/config.mk 2013-06-18 11:33:28.732763345 -0700
|
||||
@@ -3,6 +3,10 @@
|
||||
# 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/.
|
||||
|
||||
+#ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1)
|
||||
+INCLUDES += -I/usr/include/nss3/templates
|
||||
+#endif
|
||||
+
|
||||
# can't do this in manifest.mn because OS_TARGET isn't defined there.
|
||||
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue