Compare commits
611 Commits
nss-3_11_7
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
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 | ||
|
65a4d20cc7 | ||
|
07c729494a | ||
|
73106743c1 | ||
|
70bf1cefc1 | ||
|
877f068e97 | ||
|
82e9983e43 | ||
|
c6535e87bd | ||
|
8b6e6cc656 | ||
|
9168316fa8 | ||
|
1df1edced7 | ||
|
f52ebc585d | ||
|
387bb6b467 | ||
|
74f302809f | ||
|
ddcac56c2e | ||
|
e0be40e6f7 | ||
|
351f464ed1 | ||
|
7854e70d7e | ||
|
ff192a931a | ||
|
270f23d149 | ||
|
e666a29edf | ||
|
68e30820ed | ||
|
ef6c2f08e7 | ||
|
e51bf1ce38 | ||
|
3792f60887 | ||
|
1911d47990 | ||
|
f5c6a9ac04 | ||
|
85c6e70f3c | ||
|
c460de4d23 | ||
|
29b52f2caf | ||
|
fc09930b4d | ||
|
3648d70a92 | ||
|
2e6c8d6f71 | ||
|
299e9058d1 | ||
|
21d9cd13e1 | ||
|
b9c9bc550c | ||
|
ea86d5898c | ||
|
b22cf46b7c | ||
|
2a45956d5b | ||
|
e4343992f0 | ||
|
c0f6099656 | ||
|
69c688f3b5 | ||
|
fe44847276 | ||
|
c281a339e1 | ||
|
317de01a4d | ||
|
5953345108 | ||
|
f7ddea92df | ||
|
5fe1656484 | ||
|
0483a01742 | ||
|
65e0fbe683 | ||
|
337a03cdd8 | ||
|
34058a2a6e | ||
|
66122a0ff7 | ||
|
03da09b383 | ||
|
69b02be530 | ||
|
0a91ce3fe8 | ||
|
c13e32fe80 | ||
|
81b37a0f74 | ||
|
75207789dc | ||
|
82653be6b2 | ||
|
ae64727ebb | ||
|
a046ce773a | ||
|
17f536942a | ||
|
b10f7b1f18 | ||
|
c4f83dca30 | ||
|
8b92dbf50e | ||
|
f35af25385 | ||
|
0779a363b4 | ||
|
3a7ef4801d | ||
|
c0a0ca5eb2 | ||
|
856e33f728 | ||
|
a58533f703 | ||
|
f59c0d1275 | ||
|
9b7199b3db | ||
|
fa80ce0efb | ||
|
8687a87da5 | ||
|
8cfb70a447 | ||
|
8c142e52fe | ||
|
c70e45537d | ||
|
62096f81c3 | ||
|
a60e3001fe | ||
|
a7df0838aa | ||
|
3e2a0ea4de | ||
|
1765d80a6c | ||
|
0ac07fb221 | ||
|
64ca89cbe4 | ||
|
3e02cae346 | ||
|
db7f9bfa50 | ||
|
eaa519320e | ||
|
8025e7be74 | ||
|
fd6a1f2171 | ||
|
60816050f2 | ||
|
296fce6af9 | ||
|
f94fcb299b | ||
|
4d04992e9a | ||
|
37a942df5c | ||
|
0834927548 | ||
|
8b13702a67 | ||
|
4f24d9e6c9 | ||
|
23d7297fce | ||
|
9b8380a073 | ||
|
4c076bc0cd | ||
|
4fb9d07b7f | ||
|
a25fc11743 | ||
|
5d65d327f1 | ||
|
301ed12356 | ||
|
7285eaab48 | ||
|
d2ef6540b5 | ||
|
569d439b91 | ||
|
aae9602c01 | ||
|
6ab230bb01 | ||
|
b5567867a7 | ||
|
4f6555074f | ||
|
f37654e052 | ||
|
49e209f91d | ||
|
67a7a21b0e | ||
|
129e66ef0e | ||
|
658733b0d3 | ||
|
db7fe53123 | ||
|
a6a13f1a66 | ||
|
4b2b74e5e0 | ||
|
74d9e91174 | ||
|
306dd778f4 | ||
|
9b70717281 | ||
|
8f6f357e88 | ||
|
33f25f5720 | ||
|
da85237ace | ||
|
2285997461 | ||
|
1c902d0023 | ||
|
2c648570aa | ||
|
b4e6e308a6 | ||
|
5761e30a94 | ||
|
3888f3b230 | ||
|
8ae46fa97f | ||
|
fdb9637677 | ||
|
cf4a750103 | ||
|
8943f1ad54 | ||
|
efdced7007 | ||
|
65efb2c2f3 | ||
|
b8273ce04c | ||
|
e36079dd45 | ||
|
41e94360c9 | ||
|
2f66633263 | ||
|
f6ec57311f | ||
|
2249db62a6 | ||
|
30056fd35c | ||
|
2a8c1318ea | ||
|
59b5d52d9e | ||
|
21e8668243 | ||
|
7b5d7ea05f | ||
|
b03345792c | ||
|
0370142fd0 | ||
|
b3f05b9f44 | ||
|
96957e805a | ||
|
7a7f48e712 | ||
|
830ee96f85 | ||
|
ca00551ea7 | ||
|
b13dc44579 | ||
|
5a0d6572e1 | ||
|
edea054ffc | ||
|
765b3c410b | ||
|
461744f676 | ||
|
4e9cb6d944 | ||
|
e45858c07c | ||
|
6e1a26a079 | ||
|
19ad65d608 | ||
|
fef81756fd | ||
|
b5d7c8e158 | ||
|
247ec13766 | ||
|
fdff72cd4e | ||
|
f2639d5e85 | ||
|
b89655218d | ||
|
93eeb31cf1 | ||
|
e4dd1babb0 | ||
|
edf5ff0634 | ||
|
c2e20984e1 | ||
|
192d1d33fb | ||
|
3be7379237 | ||
|
982583d915 | ||
|
b11609d88a | ||
|
0889879046 | ||
|
1f01ab68b1 | ||
|
61aa73d6e8 | ||
|
53a120c4af | ||
|
ab9d670692 | ||
|
99a740d2ee | ||
|
bd7e7ae750 | ||
|
f304d0d0cf | ||
|
18cd8ce5de | ||
|
967fa1be0d | ||
|
7011f18b86 | ||
|
6b33cec549 | ||
|
e1a1b3583b | ||
|
580fd0d7b9 | ||
|
a27d98a9ec | ||
|
c38003c691 | ||
|
41064271a8 | ||
|
034c16be36 | ||
|
99d4b15c76 | ||
|
4fe7a90965 | ||
|
5203007534 | ||
|
310e64d3c2 | ||
|
c408966515 | ||
|
89045d8452 | ||
|
51c4dcf0e0 | ||
|
39b507ea3c | ||
|
19fee62ac7 | ||
|
7d1bd46bd6 | ||
|
3ccc11c806 | ||
|
85a1075a8d | ||
|
ca7f73c317 | ||
|
6e9d7578fc | ||
|
81470bd3c4 | ||
|
b6f8eca453 | ||
|
1f56c5ccc5 | ||
|
40928cb8e3 | ||
|
d5f0675cc9 | ||
|
def217ea25 | ||
|
aecd53f653 | ||
|
543ae9ce83 | ||
|
109e79922c | ||
|
1584b7eb6a | ||
|
e8491da33f | ||
|
3fe2df48eb | ||
|
f67889f49c | ||
|
2980194bf3 | ||
|
321e446e77 | ||
|
cb85c9e1da | ||
|
953f3cef9d | ||
|
1c8a4130f1 | ||
|
5fe8f41a13 | ||
|
a32a69acd9 | ||
|
dc20ddf3a8 | ||
|
190ec81eec | ||
|
0598777c8d | ||
|
cc7766a55d | ||
|
28928af492 | ||
|
4a87b24862 | ||
|
7b078b5247 | ||
|
e13d622bc5 | ||
|
bc4ac545c9 | ||
|
3586aff4e7 | ||
|
a1e61fa589 | ||
|
c26c5b1326 | ||
|
bc8d177729 | ||
|
4f63c4864b | ||
|
d7c5a94ba8 | ||
|
a7fb38e80b | ||
|
e2ce6e022c | ||
|
5c50a33200 | ||
|
6f6f1203b3 | ||
|
778a865dab | ||
|
321ca50d42 | ||
|
7232ae1bc7 | ||
|
c409805d45 | ||
|
656b5456ab | ||
|
976de5ebbe | ||
|
508cdeae12 | ||
|
6e1b6bdc24 | ||
|
a21a33ed09 | ||
|
4a912ae4d0 | ||
|
0b0026515f | ||
|
c40f16fc52 | ||
|
ab4de6fd80 | ||
|
87fcbd4706 | ||
|
4847c439c7 | ||
|
a8a5670437 | ||
|
882fcb9fcf | ||
|
4c53349943 | ||
|
a2f2732911 | ||
|
114f631980 | ||
|
cab275f8b6 | ||
|
40064d5204 | ||
|
1850759856 | ||
|
453276ca4d | ||
|
f76d0921cd | ||
|
5f7dfcf00d | ||
|
612496b72d | ||
|
d7e6ef54a1 | ||
|
fa715a1966 | ||
|
9cfe30c547 | ||
|
f5fbb3f944 | ||
|
f3c92abf85 | ||
|
c45196731a | ||
|
4c96b0e51a | ||
|
40b4497eee | ||
|
2cded812be | ||
|
7292dd3723 | ||
|
27e3c89861 | ||
|
50867d6093 | ||
|
89b371d9fc | ||
|
c5201d23da | ||
|
c51d121d29 | ||
|
53ccaaaa26 | ||
|
06f202356f | ||
|
1e21f59c8c | ||
|
958c0f4fd5 | ||
|
4a3d4a018a | ||
|
759a662b45 | ||
|
40dcb92ab3 | ||
|
5cb30e27e1 | ||
|
2becd412b2 | ||
|
8e3710e2cf | ||
|
1c9dbe330c | ||
|
b26040bb25 | ||
|
ff85d0f4c8 | ||
|
c647f9551c | ||
|
ebb7b25b6f | ||
|
88149c181c | ||
|
37584d01a1 | ||
|
a3ec3dfe11 | ||
|
9218303306 | ||
|
99c5eddfda | ||
|
f2b0bb17ab | ||
|
7edcfc8148 | ||
|
fbbc54fbf1 | ||
|
0b1d72fd87 | ||
|
f1e2b65a89 | ||
|
591ce17ea2 | ||
|
0578cf1b19 | ||
|
c2a52bb832 | ||
|
b84ca16585 | ||
|
ba88c56bfa | ||
|
688080c659 | ||
|
1533b72660 | ||
|
1970b5d230 | ||
|
f9076c4e22 | ||
|
90bba8e3ec | ||
|
6bcb3eb1cd | ||
|
19b99b2cd7 | ||
|
26452cb3f5 | ||
|
aff15a114b | ||
|
d06d666dbb | ||
|
88e3f7f389 | ||
|
c33feabbec | ||
|
2d16454a8b | ||
|
d2c868c9a3 | ||
|
8867167583 | ||
|
e10b9063cb | ||
|
4edf8a9398 | ||
|
9287622223 | ||
|
b1a6f7df84 | ||
|
e3bf0236f1 | ||
|
911a125478 | ||
|
43678392b1 | ||
|
99bd1bfc40 | ||
|
037460c0f7 | ||
|
4b75d3d442 | ||
|
319760bdff | ||
|
116eba883e | ||
|
f42072dcd7 | ||
|
2f6ca3a1fa | ||
|
e2b63134ba | ||
|
b936bcd440 | ||
|
cd2a7788c9 | ||
|
dfe95ffa5f | ||
|
e498f6c61b | ||
|
362e48244d | ||
|
a7f6c1391e | ||
|
fa433fc6ea | ||
|
112062ceda | ||
|
dd1807c548 | ||
|
f6653922f7 | ||
|
fb2fffccbb | ||
|
cf2658ea60 | ||
|
38fd5f87cc | ||
|
98d8df1f81 | ||
|
9c062e2a90 | ||
|
fe5c8907b6 | ||
|
6c848200f3 | ||
|
9c5e014b12 | ||
|
9142c946e9 | ||
|
c7deab353c | ||
|
377991d930 | ||
|
4958c3e053 | ||
|
9452372858 | ||
|
7c71f71235 | ||
|
1f48a6ef4d | ||
|
4f6e1c66fc | ||
|
854dd0599c | ||
|
1d13593f30 | ||
|
5defb2b727 | ||
|
9fbc7eb39e | ||
|
c36e8dd2ed | ||
|
948a740a96 | ||
|
696479cc95 | ||
|
aed9acfe30 | ||
|
2461dd439b | ||
|
df2284245d | ||
|
7298efec27 | ||
|
3069fb3fb9 | ||
|
4bf33e7173 | ||
|
d4d1c79960 | ||
|
5563696a20 | ||
|
2e4cd3ef83 | ||
|
a568ea0e54 | ||
|
c0f4da75f2 | ||
|
e927340c6e | ||
|
cfe6bf928d | ||
|
440dee86d3 | ||
|
f6c1d3c53e | ||
|
a7817b1921 | ||
|
56e4ce99ba | ||
|
b559a434b0 | ||
|
aa8c558d79 | ||
|
cd4fd0c0c9 | ||
|
3a2758790c | ||
|
85b2938cf6 | ||
|
cb7a4a846b | ||
|
3cecc97c63 | ||
|
3135805eb4 | ||
|
45322aee51 | ||
|
cce5278c40 | ||
|
22aee06a3f | ||
|
54f73856f4 | ||
|
e798b1ce92 | ||
|
e9604df12f | ||
|
f7ab7381e7 | ||
|
cf5144616f | ||
|
67fe764f58 | ||
|
c88fb87b6f | ||
|
32013d0f06 | ||
|
86f79bc9bd | ||
|
47b4b2b7f6 | ||
|
f1329e78eb | ||
|
29f74fb2bf | ||
|
c0eb0acd9a | ||
|
83fe6ce8bc | ||
|
a81017aa37 | ||
|
1d5ac5c524 | ||
|
3a8d3fe0c8 | ||
|
3cf50ec9ee | ||
|
dad318a3a0 | ||
|
afba8cf133 | ||
|
8b9004738c | ||
|
c0e27d86e9 | ||
|
5f40643e20 | ||
|
84365bbb46 | ||
|
52a319230b | ||
|
38b8c14270 | ||
|
7e3acf486b | ||
|
6dc6a9a7fe | ||
|
cbf4a20bfb | ||
|
c713a53f6e | ||
|
79bf6c1c6e | ||
|
d02b896095 | ||
|
e9d8216884 | ||
|
22ee35ce92 | ||
|
37d66db220 | ||
|
7c0fe911a5 | ||
|
724f4ea068 | ||
|
5ff871a313 | ||
|
25c0914795 | ||
|
df5886276b | ||
|
ce07e5f443 | ||
|
a31a41ac9f | ||
|
3434861fc6 | ||
|
04409e9ac7 | ||
|
75a9dc0dd7 | ||
|
ed4bab192b | ||
|
59d263fa78 | ||
|
3a3e2a0570 | ||
|
7729d267a9 | ||
|
824971507b | ||
|
f78be8f9b2 | ||
|
93ebcc19c9 | ||
|
1575c26b70 | ||
|
246489240b | ||
|
bddacee193 | ||
|
a2b7a459f1 | ||
|
21e39a1686 | ||
|
79f6667ff3 | ||
|
fc46195105 | ||
|
1c7c94c1d0 | ||
|
9bb178439b | ||
|
6887e03df9 | ||
|
f0c6761fb7 | ||
|
8cbe248c92 | ||
|
eded0595cb | ||
|
4746ec66a3 | ||
|
613a5e18e4 | ||
|
dd07d1c2d1 | ||
|
cf095e0763 | ||
|
726c3f6e3b | ||
|
8f343923c1 |
@ -1,4 +0,0 @@
|
|||||||
nss-3.11.5-fbst-stripped.tar.gz
|
|
||||||
nss-3.11.7-no-fbst-with-ckbi-1.64.tar.gz
|
|
||||||
nss-3.12-alpha-ckfw.tar.gz
|
|
||||||
nss-3.12-alpha-pem.tar.gz
|
|
51
.gitignore
vendored
Normal file
51
.gitignore
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
blank-cert8.db
|
||||||
|
blank-key3.db
|
||||||
|
blank-secmod.db
|
||||||
|
blank-cert9.db
|
||||||
|
blank-key4.db
|
||||||
|
PayPalEE.cert
|
||||||
|
TestCA.ca.cert
|
||||||
|
TestUser50.cert
|
||||||
|
TestUser51.cert
|
||||||
|
/PayPalRootCA.cert
|
||||||
|
/PayPalICA.cert
|
||||||
|
/nss-3.25.0.tar.gz
|
||||||
|
/nss-3.26.0.tar.gz
|
||||||
|
/nss-3.27.0.tar.gz
|
||||||
|
/nss-3.27.2.tar.gz
|
||||||
|
/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
|
6
Makefile
6
Makefile
@ -1,6 +0,0 @@
|
|||||||
# Makefile for source rpm: nss
|
|
||||||
# $Id$
|
|
||||||
NAME := nss
|
|
||||||
SPECFILE = $(firstword $(wildcard *.spec))
|
|
||||||
|
|
||||||
include ../common/Makefile.common
|
|
68
STAGE2-nss
Normal file
68
STAGE2-nss
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
#requires nspr
|
||||||
|
#requires perl
|
||||||
|
#requires nss-util
|
||||||
|
#requires nss-softokn
|
||||||
|
|
||||||
|
mcd $BUILDDIR/nss
|
||||||
|
|
||||||
|
export BUILD_OPT=1
|
||||||
|
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
|
||||||
|
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
|
||||||
|
export NSPR_INCLUDE_DIR=/usr/include/nspr
|
||||||
|
export NSPR_LIB_DIR=/usr/lib${SUFFIX}
|
||||||
|
export NSS_USE_SYSTEM_SQLITE=1
|
||||||
|
export NSS_BUILD_WITHOUT_SOFTOKEN=1
|
||||||
|
export USE_SYSTEM_SOFTOKEN=1
|
||||||
|
export SOFTOKEN_LIB_DIR=/usr/lib${SUFFIX}
|
||||||
|
export NSSUTIL_INCLUDE_DIR=/usr/include/nss3
|
||||||
|
export NSSUTIL_LIB_DIR=/usr/lib${SUFFIX}
|
||||||
|
export USE_SYSTEM_NSSUTIL=1
|
||||||
|
export FREEBL_INCLUDE_DIR=/usr/include/nss3
|
||||||
|
export FREEBL_LIB_DIR=/usr/lib${SUFFIX}
|
||||||
|
export USE_SYSTEM_FREEBL=1
|
||||||
|
export NSS_USE_SYSTEM_FREEBL=1
|
||||||
|
export FREEBL_NO_DEPEND=1
|
||||||
|
export IN_TREE_FREEBL_HEADERS_FIRST=1
|
||||||
|
export NSS_BLTEST_NOT_AVAILABLE=1
|
||||||
|
export NSS_NO_SSL2_NO_EXPORT=1
|
||||||
|
export NSS_ECC_MORE_THAN_SUITE_B=1
|
||||||
|
export NSS_NO_PKCS11_BYPASS=1
|
||||||
|
#export NSDISTMODE="copy"
|
||||||
|
|
||||||
|
if [ "$SUFFIX" = "64" ]; then
|
||||||
|
USE_64=1
|
||||||
|
export USE_64
|
||||||
|
fi
|
||||||
|
|
||||||
|
(cd $SRC/nss-3.* && mkdir -p dist/private/nss && cp nss/lib/ckfw/nssck.api dist/private/nss/)
|
||||||
|
|
||||||
|
make -C $SRC/nss-3.*/nss/coreconf
|
||||||
|
make -C $SRC/nss-3.*/nss/lib/dbm
|
||||||
|
|
||||||
|
# nss/nssinit.c, ssl/sslcon.c, smime/smimeutil.c and ckfw/builtins/binst.c
|
||||||
|
# need nss/verref.h which is exported privately, move it to where it can be found.
|
||||||
|
(cd $SRC/nss-3.* && mkdir -p dist/private/nss && cp -a nss/verref.h dist/private/nss/)
|
||||||
|
|
||||||
|
make -C $SRC/nss-3.*/nss
|
||||||
|
cd $SRC/nss-3.*/nss/coreconf
|
||||||
|
make install
|
||||||
|
cd $SRC/nss-3.*/nss/lib/dbm
|
||||||
|
make install
|
||||||
|
cd $SRC/nss-3.*/nss
|
||||||
|
make install
|
||||||
|
# Copy the binary libraries we want
|
||||||
|
NSSLIBS="libnss3.so libnssckbi.so libnsspem.so libnsssysinit.so libsmime3.so libssl3.so"
|
||||||
|
# BOZO: temporarily disable FIPS140 support
|
||||||
|
#NSSLIBCHKS="libnssdbm3.chk libfreebl3.chk libsoftokn3.chk"
|
||||||
|
NSSLIBCHKS=""
|
||||||
|
# END BOZO
|
||||||
|
cd $SRC/nss-3.*
|
||||||
|
for file in $NSSLIBS $NSSLIBCHKS
|
||||||
|
do
|
||||||
|
install -p -m 755 dist/*.OBJ/lib/$file /usr/lib${SUFFIX}/
|
||||||
|
done
|
||||||
|
# Copy the include files we want
|
||||||
|
for file in $SRC/nss-*/dist/public/nss/*.h
|
||||||
|
do
|
||||||
|
install -p -m 644 $file /usr/include/nss3/
|
||||||
|
done
|
BIN
blank-cert8.db
BIN
blank-cert8.db
Binary file not shown.
BIN
blank-key3.db
BIN
blank-key3.db
Binary file not shown.
BIN
blank-secmod.db
BIN
blank-secmod.db
Binary file not shown.
59
cert8.db.xml
Normal file
59
cert8.db.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?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="cert8.db">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<date>&date;</date>
|
||||||
|
<title>Network Security Services</title>
|
||||||
|
<productname>nss</productname>
|
||||||
|
<productnumber>&version;</productnumber>
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>cert8.db</refentrytitle>
|
||||||
|
<manvolnum>5</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>cert8.db</refname>
|
||||||
|
<refpurpose>Legacy NSS certificate database</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsection id="description">
|
||||||
|
<title>Description</title>
|
||||||
|
<para><emphasis>cert8.db</emphasis> is an NSS certificate database.</para>
|
||||||
|
<para>This certificate database is in the legacy database format. Consider migrating to cert9.db and key4.db which are the new sqlite-based shared database format with support for concurrent access.
|
||||||
|
</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Files</title>
|
||||||
|
<para><filename>/etc/pki/nssdb/cert8.db</filename></para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>See also</title>
|
||||||
|
<para>cert9.db(5), key4.db(5), pkcs11.txt(5), </para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection id="authors">
|
||||||
|
<title>Authors</title>
|
||||||
|
<para>The nss libraries 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>
|
59
cert9.db.xml
Normal file
59
cert9.db.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?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="cert9.db">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<date>&date;</date>
|
||||||
|
<title>Network Security Services</title>
|
||||||
|
<productname>nss</productname>
|
||||||
|
<productnumber>&version;</productnumber>
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>cert9.db</refentrytitle>
|
||||||
|
<manvolnum>5</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>cert9.db</refname>
|
||||||
|
<refpurpose>NSS certificate database</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsection id="description">
|
||||||
|
<title>Description</title>
|
||||||
|
<para><emphasis>cert9.db</emphasis> is an NSS certificate database.</para>
|
||||||
|
<para>This certificate database is the sqlite-based shared database with support for concurrent access.
|
||||||
|
</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Files</title>
|
||||||
|
<para><filename>/etc/pki/nssdb/cert9.db</filename></para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>See also</title>
|
||||||
|
<para>pkcs11.txt(5)</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection id="authors">
|
||||||
|
<title>Authors</title>
|
||||||
|
<para>The nss libraries 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>
|
20
fake-kstat.h
20
fake-kstat.h
@ -1,20 +0,0 @@
|
|||||||
struct tag_kstat_t
|
|
||||||
{
|
|
||||||
struct tag_kstat_t *ks_next;
|
|
||||||
char* ks_data;
|
|
||||||
PRUint32 ks_data_size;
|
|
||||||
int ks_ndata;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct tag_kstat_ctl_t
|
|
||||||
{
|
|
||||||
struct tag_kstat_t *kc_chain;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct tag_kstat_t kstat_t;
|
|
||||||
typedef struct tag_kstat_ctl_t kstat_ctl_t;
|
|
||||||
|
|
||||||
#define kstat_open() NULL
|
|
||||||
#define kstat_read(a,b,c) -1
|
|
||||||
#define kstat_close(x) -1
|
|
||||||
|
|
13
iquote.patch
Normal file
13
iquote.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
+# 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
|
59
key3.db.xml
Normal file
59
key3.db.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?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="key3.db">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<date>&date;</date>
|
||||||
|
<title>Network Security Services</title>
|
||||||
|
<productname>nss</productname>
|
||||||
|
<productnumber>&version;</productnumber>
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>key3.db</refentrytitle>
|
||||||
|
<manvolnum>5</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>key3.db</refname>
|
||||||
|
<refpurpose>Legacy NSS certificate database</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsection id="description">
|
||||||
|
<title>Description</title>
|
||||||
|
<para><emphasis>key3.db</emphasis> is an NSS certificate database.</para>
|
||||||
|
<para>This is a key database in the legacy database format. Consider migrating to cert9.db and key4.db which which are the new sqlite-based shared database format with support for concurrent access.
|
||||||
|
</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Files</title>
|
||||||
|
<para><filename>/etc/pki/nssdb/key3.db</filename></para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>See also</title>
|
||||||
|
<para>cert9.db(5), key4.db(5), pkcs11.txt(5), </para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection id="authors">
|
||||||
|
<title>Authors</title>
|
||||||
|
<para>The nss libraries 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>
|
59
key4.db.xml
Normal file
59
key4.db.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?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="key4.db">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<date>&date;</date>
|
||||||
|
<title>Network Security Services</title>
|
||||||
|
<productname>nss</productname>
|
||||||
|
<productnumber>&version;</productnumber>
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>key4.db</refentrytitle>
|
||||||
|
<manvolnum>5</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>key4.db</refname>
|
||||||
|
<refpurpose>NSS certificate database</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsection id="description">
|
||||||
|
<title>Description</title>
|
||||||
|
<para><emphasis>key4.db</emphasis> is an NSS key database.</para>
|
||||||
|
<para>This key database is the sqlite-based shared database format with support for concurrent access.
|
||||||
|
</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Files</title>
|
||||||
|
<para><filename>/etc/pki/nssdb/key4.db</filename></para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>See also</title>
|
||||||
|
<para>pkcs11.txt(5)</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection id="authors">
|
||||||
|
<title>Authors</title>
|
||||||
|
<para>The nss libraries 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>
|
@ -1,16 +0,0 @@
|
|||||||
Index: mozilla/security/coreconf/Linux.mk
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/coreconf/Linux.mk,v
|
|
||||||
retrieving revision 1.27
|
|
||||||
diff -u -r1.27 Linux.mk
|
|
||||||
--- mozilla/security/coreconf/Linux.mk 16 Sep 2005 17:09:23 -0000 1.27
|
|
||||||
+++ mozilla/security/coreconf/Linux.mk 15 Dec 2005 21:25:00 -0000
|
|
||||||
@@ -165,7 +165,7 @@
|
|
||||||
ARCH = linux
|
|
||||||
|
|
||||||
DSO_CFLAGS = -fPIC
|
|
||||||
-DSO_LDOPTS = -shared $(ARCHFLAG) -z defs
|
|
||||||
+DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,-z,defs
|
|
||||||
DSO_LDFLAGS =
|
|
||||||
LDFLAGS += $(ARCHFLAG)
|
|
||||||
|
|
62
nss-539183.patch
Normal file
62
nss-539183.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
--- 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,11 +0,0 @@
|
|||||||
--- mozilla/security/nss/lib/freebl/Makefile.fix180726 2006-02-15 07:19:21.000000000 +0100
|
|
||||||
+++ mozilla/security/nss/lib/freebl/Makefile 2006-02-15 07:19:25.000000000 +0100
|
|
||||||
@@ -134,7 +134,7 @@
|
|
||||||
ifeq ($(OS_TARGET),Linux)
|
|
||||||
ifeq ($(CPU_ARCH),x86_64)
|
|
||||||
ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
|
|
||||||
- ASFLAGS += -march=opteron -m64 -fPIC
|
|
||||||
+ ASFLAGS += -march=opteron -m64 -fPIC -Wa,--noexecstack
|
|
||||||
DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY
|
|
||||||
DEFINES += -DNSS_USE_COMBA
|
|
||||||
MPI_SRCS += mpi_amd64.c mp_comba.c
|
|
@ -20,6 +20,7 @@ Options:
|
|||||||
[--cflags]
|
[--cflags]
|
||||||
Dynamic Libraries:
|
Dynamic Libraries:
|
||||||
nss
|
nss
|
||||||
|
nssutil
|
||||||
ssl
|
ssl
|
||||||
smime
|
smime
|
||||||
EOF
|
EOF
|
||||||
@ -33,6 +34,7 @@ fi
|
|||||||
lib_ssl=yes
|
lib_ssl=yes
|
||||||
lib_smime=yes
|
lib_smime=yes
|
||||||
lib_nss=yes
|
lib_nss=yes
|
||||||
|
lib_nssutil=yes
|
||||||
|
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@ -83,6 +85,9 @@ while test $# -gt 0; do
|
|||||||
nss)
|
nss)
|
||||||
lib_nss=yes
|
lib_nss=yes
|
||||||
;;
|
;;
|
||||||
|
nssutil)
|
||||||
|
lib_nssutil=yes
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage 1 1>&2
|
usage 1 1>&2
|
||||||
;;
|
;;
|
||||||
@ -132,6 +137,9 @@ if test "$echo_libs" = "yes"; then
|
|||||||
if test -n "$lib_nss"; then
|
if test -n "$lib_nss"; then
|
||||||
libdirs="$libdirs -lnss${major_version}"
|
libdirs="$libdirs -lnss${major_version}"
|
||||||
fi
|
fi
|
||||||
|
if test -n "$lib_nssutil"; then
|
||||||
|
libdirs="$libdirs -lnssutil${major_version}"
|
||||||
|
fi
|
||||||
echo $libdirs
|
echo $libdirs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
132
nss-config.xml
Normal file
132
nss-config.xml
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
<?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="nss-config">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<date>&date;</date>
|
||||||
|
<title>Network Security Services</title>
|
||||||
|
<productname>nss</productname>
|
||||||
|
<productnumber>&version;</productnumber>
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>nss-config</refentrytitle>
|
||||||
|
<manvolnum>1</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>nss-config</refname>
|
||||||
|
<refpurpose>Return meta information about nss libraries</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsynopsisdiv>
|
||||||
|
<cmdsynopsis>
|
||||||
|
<command>nss-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>nss-config</command> is a shell scrip
|
||||||
|
tool which can be used to obtain gcc options for building client pacakges of nspt. </para>
|
||||||
|
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Options</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--prefix</option></term>
|
||||||
|
<listitem><simpara>Returns the top level system directory under which the nss libraries are installed.</simpara></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--exec-prefix</option></term>
|
||||||
|
<listitem><simpara>returns the top level system directory under which any nss 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 nss libraries are installed.</simpara></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--version</option></term>
|
||||||
|
<listitem><simpara>returns the upstream version of nss 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 nss 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/nss-config --cflags --libs
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Files</title>
|
||||||
|
|
||||||
|
<para><filename>/usr/bin/nss-config</filename></para>
|
||||||
|
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>See also</title>
|
||||||
|
<para>pkg-config(1)</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection id="authors">
|
||||||
|
<title>Authors</title>
|
||||||
|
<para>The nss 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>
|
||||||
|
|
@ -1,177 +0,0 @@
|
|||||||
Index: mozilla/security/nss/lib/nss/nss.def
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/nss/lib/nss/nss.def,v
|
|
||||||
retrieving revision 1.158.2.7
|
|
||||||
diff -u -r1.158.2.7 nss.def
|
|
||||||
--- mozilla/security/nss/lib/nss/nss.def 25 Apr 2007 23:26:53 -0000 1.158.2.7
|
|
||||||
+++ mozilla/security/nss/lib/nss/nss.def 31 Aug 2007 18:54:54 -0000
|
|
||||||
@@ -899,3 +899,10 @@
|
|
||||||
;+ local:
|
|
||||||
;+ *;
|
|
||||||
;+};
|
|
||||||
+;+NSS_3.12 {
|
|
||||||
+;+ global:
|
|
||||||
+PK11_CreateGenericObject;
|
|
||||||
+PK11_WriteRawAttribute;
|
|
||||||
+;+ local:
|
|
||||||
+;+ *;
|
|
||||||
+;+};
|
|
||||||
Index: mozilla/security/nss/lib/pk11wrap/pk11obj.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/nss/lib/pk11wrap/pk11obj.c,v
|
|
||||||
retrieving revision 1.11.2.3
|
|
||||||
diff -u -r1.11.2.3 pk11obj.c
|
|
||||||
--- mozilla/security/nss/lib/pk11wrap/pk11obj.c 5 Jan 2007 09:44:05 -0000 1.11.2.3
|
|
||||||
+++ mozilla/security/nss/lib/pk11wrap/pk11obj.c 9 May 2007 20:58:17 -0000
|
|
||||||
@@ -388,7 +388,7 @@
|
|
||||||
|
|
||||||
SECStatus
|
|
||||||
PK11_CreateNewObject(PK11SlotInfo *slot, CK_SESSION_HANDLE session,
|
|
||||||
- CK_ATTRIBUTE *theTemplate, int count,
|
|
||||||
+ const CK_ATTRIBUTE *theTemplate, int count,
|
|
||||||
PRBool token, CK_OBJECT_HANDLE *objectID)
|
|
||||||
{
|
|
||||||
CK_SESSION_HANDLE rwsession;
|
|
||||||
@@ -1306,7 +1306,7 @@
|
|
||||||
PK11_DestroyGenericObject(objects);
|
|
||||||
}
|
|
||||||
/* delete all the objects before it in the list */
|
|
||||||
- for (objects = prevObject; objects; objects = nextObject) {
|
|
||||||
+ for (objects = prevObject; objects; objects = prevObject) {
|
|
||||||
prevObject = objects->prev;
|
|
||||||
PK11_DestroyGenericObject(objects);
|
|
||||||
}
|
|
||||||
@@ -1314,6 +1314,96 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * Hand Create a new object and return the Generic object for our new object.
|
|
||||||
+ */
|
|
||||||
+PK11GenericObject *
|
|
||||||
+PK11_CreateGenericObject(PK11SlotInfo *slot, const CK_ATTRIBUTE *template,
|
|
||||||
+ int count, PRBool token)
|
|
||||||
+{
|
|
||||||
+ CK_OBJECT_HANDLE objectID;
|
|
||||||
+ PK11GenericObject *obj;
|
|
||||||
+ CK_RV crv;
|
|
||||||
+
|
|
||||||
+ PK11_EnterSlotMonitor(slot);
|
|
||||||
+ crv = PK11_CreateNewObject(slot, slot->session, template, count,
|
|
||||||
+ token, &objectID);
|
|
||||||
+ PK11_ExitSlotMonitor(slot);
|
|
||||||
+ if (crv != CKR_OK) {
|
|
||||||
+ PORT_SetError(PK11_MapError(crv));
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ obj = PORT_New(PK11GenericObject);
|
|
||||||
+ if ( !obj ) {
|
|
||||||
+ /* error set by PORT_New */
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* initialize it */
|
|
||||||
+ obj->slot = PK11_ReferenceSlot(slot);
|
|
||||||
+ obj->objectID = objectID;
|
|
||||||
+ obj->next = NULL;
|
|
||||||
+ obj->prev = NULL;
|
|
||||||
+ return obj;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Change an attribute on a raw object
|
|
||||||
+ */
|
|
||||||
+SECStatus
|
|
||||||
+PK11_WriteRawAttribute(PK11ObjectType objType, void *objSpec,
|
|
||||||
+ CK_ATTRIBUTE_TYPE attrType, SECItem *item)
|
|
||||||
+{
|
|
||||||
+ PK11SlotInfo *slot = NULL;
|
|
||||||
+ CK_OBJECT_HANDLE handle;
|
|
||||||
+ CK_ATTRIBUTE setTemplate;
|
|
||||||
+ CK_RV crv;
|
|
||||||
+ CK_SESSION_HANDLE rwsession;
|
|
||||||
+
|
|
||||||
+ switch (objType) {
|
|
||||||
+ case PK11_TypeGeneric:
|
|
||||||
+ slot = ((PK11GenericObject *)objSpec)->slot;
|
|
||||||
+ handle = ((PK11GenericObject *)objSpec)->objectID;
|
|
||||||
+ break;
|
|
||||||
+ case PK11_TypePrivKey:
|
|
||||||
+ slot = ((SECKEYPrivateKey *)objSpec)->pkcs11Slot;
|
|
||||||
+ handle = ((SECKEYPrivateKey *)objSpec)->pkcs11ID;
|
|
||||||
+ break;
|
|
||||||
+ case PK11_TypePubKey:
|
|
||||||
+ slot = ((SECKEYPublicKey *)objSpec)->pkcs11Slot;
|
|
||||||
+ handle = ((SECKEYPublicKey *)objSpec)->pkcs11ID;
|
|
||||||
+ break;
|
|
||||||
+ case PK11_TypeSymKey:
|
|
||||||
+ slot = ((PK11SymKey *)objSpec)->slot;
|
|
||||||
+ handle = ((PK11SymKey *)objSpec)->objectID;
|
|
||||||
+ break;
|
|
||||||
+ case PK11_TypeCert: /* don't handle cert case for now */
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ if (slot == NULL) {
|
|
||||||
+ PORT_SetError(SEC_ERROR_UNKNOWN_OBJECT_TYPE);
|
|
||||||
+ return SECFailure;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ PK11_SETATTRS(&setTemplate, attrType, (CK_CHAR *) item->data, item->len);
|
|
||||||
+ rwsession = PK11_GetRWSession(slot);
|
|
||||||
+ if (rwsession == CK_INVALID_SESSION) {
|
|
||||||
+ PORT_SetError(SEC_ERROR_BAD_DATA);
|
|
||||||
+ return SECFailure;
|
|
||||||
+ }
|
|
||||||
+ crv = PK11_GETTAB(slot)->C_SetAttributeValue(rwsession, handle,
|
|
||||||
+ &setTemplate, 1);
|
|
||||||
+ PK11_RestoreROSession(slot, rwsession);
|
|
||||||
+ if (crv != CKR_OK) {
|
|
||||||
+ PORT_SetError(PK11_MapError(crv));
|
|
||||||
+ return SECFailure;
|
|
||||||
+ }
|
|
||||||
+ return SECSuccess;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
SECStatus
|
|
||||||
PK11_ReadRawAttribute(PK11ObjectType objType, void *objSpec,
|
|
||||||
CK_ATTRIBUTE_TYPE attrType, SECItem *item)
|
|
||||||
Index: mozilla/security/nss/lib/pk11wrap/pk11pub.h
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/nss/lib/pk11wrap/pk11pub.h,v
|
|
||||||
retrieving revision 1.14.2.1
|
|
||||||
diff -u -r1.14.2.1 pk11pub.h
|
|
||||||
--- mozilla/security/nss/lib/pk11wrap/pk11pub.h 2 Mar 2006 00:12:27 -0000 1.14.2.1
|
|
||||||
+++ mozilla/security/nss/lib/pk11wrap/pk11pub.h 9 May 2007 20:58:17 -0000
|
|
||||||
@@ -688,8 +688,13 @@
|
|
||||||
PK11GenericObject *object);
|
|
||||||
SECStatus PK11_DestroyGenericObjects(PK11GenericObject *object);
|
|
||||||
SECStatus PK11_DestroyGenericObject(PK11GenericObject *object);
|
|
||||||
+PK11GenericObject *PK11_CreateGenericObject(PK11SlotInfo *slot,
|
|
||||||
+ const CK_ATTRIBUTE *template,
|
|
||||||
+ int count, PRBool token);
|
|
||||||
SECStatus PK11_ReadRawAttribute(PK11ObjectType type, void *object,
|
|
||||||
CK_ATTRIBUTE_TYPE attr, SECItem *item);
|
|
||||||
+SECStatus PK11_WriteRawAttribute(PK11ObjectType type, void *object,
|
|
||||||
+ CK_ATTRIBUTE_TYPE attr, SECItem *item);
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
Index: mozilla/security/nss/lib/pk11wrap/secmodi.h
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/nss/lib/pk11wrap/secmodi.h,v
|
|
||||||
retrieving revision 1.23
|
|
||||||
diff -u -r1.23 secmodi.h
|
|
||||||
--- mozilla/security/nss/lib/pk11wrap/secmodi.h 9 Sep 2005 02:03:57 -0000 1.23
|
|
||||||
+++ mozilla/security/nss/lib/pk11wrap/secmodi.h 9 May 2007 20:58:17 -0000
|
|
||||||
@@ -105,7 +105,7 @@
|
|
||||||
#define PK11_SETATTRS(x,id,v,l) (x)->type = (id); \
|
|
||||||
(x)->pValue=(v); (x)->ulValueLen = (l);
|
|
||||||
SECStatus PK11_CreateNewObject(PK11SlotInfo *slot, CK_SESSION_HANDLE session,
|
|
||||||
- CK_ATTRIBUTE *theTemplate, int count,
|
|
||||||
+ const CK_ATTRIBUTE *theTemplate, int count,
|
|
||||||
PRBool token, CK_OBJECT_HANDLE *objectID);
|
|
||||||
|
|
||||||
SECStatus pbe_PK11AlgidToParam(SECAlgorithmID *algid,SECItem *mech);
|
|
@ -1,317 +0,0 @@
|
|||||||
? mozilla/security/nss/cmd/crmf-cgi/~Makefile
|
|
||||||
? mozilla/security/nss/lib/ckfw/builtins/qa.der
|
|
||||||
Index: mozilla/security/nss/lib/nss/config.mk
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/nss/lib/nss/config.mk,v
|
|
||||||
retrieving revision 1.26.2.1
|
|
||||||
diff -u -p -r1.26.2.1 config.mk
|
|
||||||
--- mozilla/security/nss/lib/nss/config.mk 17 Nov 2006 01:33:15 -0000 1.26.2.1
|
|
||||||
+++ mozilla/security/nss/lib/nss/config.mk 12 Jun 2007 01:29:35 -0000
|
|
||||||
@@ -53,7 +53,6 @@ RESNAME = $(LIBRARY_NAME).rc
|
|
||||||
ifdef NS_USE_GCC
|
|
||||||
EXTRA_SHARED_LIBS += \
|
|
||||||
-L$(DIST)/lib \
|
|
||||||
- -lsoftokn3 \
|
|
||||||
-L$(NSPR_LIB_DIR) \
|
|
||||||
-lplc4 \
|
|
||||||
-lplds4 \
|
|
||||||
@@ -61,7 +60,6 @@ EXTRA_SHARED_LIBS += \
|
|
||||||
$(NULL)
|
|
||||||
else # ! NS_USE_GCC
|
|
||||||
EXTRA_SHARED_LIBS += \
|
|
||||||
- $(DIST)/lib/softokn3.lib \
|
|
||||||
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \
|
|
||||||
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \
|
|
||||||
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
|
|
||||||
@@ -74,7 +72,6 @@ else
|
|
||||||
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
|
|
||||||
EXTRA_SHARED_LIBS += \
|
|
||||||
-L$(DIST)/lib \
|
|
||||||
- -lsoftokn3 \
|
|
||||||
-L$(NSPR_LIB_DIR) \
|
|
||||||
-lplc4 \
|
|
||||||
-lplds4 \
|
|
||||||
Index: mozilla/security/nss/lib/pk11wrap/manifest.mn
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/nss/lib/pk11wrap/manifest.mn,v
|
|
||||||
retrieving revision 1.16.2.1
|
|
||||||
diff -u -p -r1.16.2.1 manifest.mn
|
|
||||||
--- mozilla/security/nss/lib/pk11wrap/manifest.mn 2 Jun 2007 02:23:37 -0000 1.16.2.1
|
|
||||||
+++ mozilla/security/nss/lib/pk11wrap/manifest.mn 12 Jun 2007 01:29:35 -0000
|
|
||||||
@@ -82,6 +82,13 @@ REQUIRES = dbm
|
|
||||||
|
|
||||||
LIBRARY_NAME = pk11wrap
|
|
||||||
|
|
||||||
+LIBRARY_VERSION = 3
|
|
||||||
+SOFTOKEN_LIBRARY_VERSION = 3
|
|
||||||
+
|
|
||||||
+DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" \
|
|
||||||
+ -DSHLIB_VERSION=\"$(LIBRARY_VERSION)\" \
|
|
||||||
+ -DSOFTOKEN_SHLIB_VERSION=\"$(SOFTOKEN_LIBRARY_VERSION)\"
|
|
||||||
+
|
|
||||||
# only add module debugging in opt builds if DEBUG_PKCS11 is set
|
|
||||||
ifdef DEBUG_PKCS11
|
|
||||||
DEFINES += -DDEBUG_MODULE -DFORCE_PR_LOG
|
|
||||||
Index: mozilla/security/nss/lib/pk11wrap/pk11load.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/nss/lib/pk11wrap/pk11load.c,v
|
|
||||||
retrieving revision 1.17
|
|
||||||
diff -u -p -r1.17 pk11load.c
|
|
||||||
--- mozilla/security/nss/lib/pk11wrap/pk11load.c 20 Sep 2005 20:56:07 -0000 1.17
|
|
||||||
+++ mozilla/security/nss/lib/pk11wrap/pk11load.c 12 Jun 2007 01:29:35 -0000
|
|
||||||
@@ -47,10 +47,6 @@
|
|
||||||
#include "nssilock.h"
|
|
||||||
#include "secerr.h"
|
|
||||||
|
|
||||||
-extern void FC_GetFunctionList(void);
|
|
||||||
-extern void NSC_GetFunctionList(void);
|
|
||||||
-extern void NSC_ModuleDBFunc(void);
|
|
||||||
-
|
|
||||||
#ifdef DEBUG
|
|
||||||
#define DEBUG_MODULE 1
|
|
||||||
#endif
|
|
||||||
@@ -221,6 +217,196 @@ SECMOD_SetRootCerts(PK11SlotInfo *slot,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+static const char* nss_name =
|
|
||||||
+ SHLIB_PREFIX"nss"SHLIB_VERSION"."SHLIB_SUFFIX;
|
|
||||||
+static const char* softoken_default_name =
|
|
||||||
+ SHLIB_PREFIX"softokn"SOFTOKEN_SHLIB_VERSION"."SHLIB_SUFFIX;
|
|
||||||
+static PRCallOnceType loadSoftokenOnce;
|
|
||||||
+static PRLibrary* softokenLib;
|
|
||||||
+
|
|
||||||
+#ifdef XP_UNIX
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#define BL_MAXSYMLINKS 20
|
|
||||||
+
|
|
||||||
+/* ### Copied from freebl/loader.c and freebl changed to softoken. */
|
|
||||||
+/*
|
|
||||||
+ * If 'link' is a symbolic link, this function follows the symbolic links
|
|
||||||
+ * and returns the pathname of the ultimate source of the symbolic links.
|
|
||||||
+ * If 'link' is not a symbolic link, this function returns NULL.
|
|
||||||
+ * The caller should call PR_Free to free the string returned by this
|
|
||||||
+ * function.
|
|
||||||
+ */
|
|
||||||
+static char* st_GetOriginalPathname(const char* link)
|
|
||||||
+{
|
|
||||||
+ char* resolved = NULL;
|
|
||||||
+ char* input = NULL;
|
|
||||||
+ PRUint32 iterations = 0;
|
|
||||||
+ PRInt32 len = 0, retlen = 0;
|
|
||||||
+ if (!link) {
|
|
||||||
+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+ len = PR_MAX(1024, strlen(link) + 1);
|
|
||||||
+ resolved = PR_Malloc(len);
|
|
||||||
+ input = PR_Malloc(len);
|
|
||||||
+ if (!resolved || !input) {
|
|
||||||
+ if (resolved) {
|
|
||||||
+ PR_Free(resolved);
|
|
||||||
+ }
|
|
||||||
+ if (input) {
|
|
||||||
+ PR_Free(input);
|
|
||||||
+ }
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+ strcpy(input, link);
|
|
||||||
+ while ( (iterations++ < BL_MAXSYMLINKS) &&
|
|
||||||
+ ( (retlen = readlink(input, resolved, len - 1)) > 0) ) {
|
|
||||||
+ char* tmp = input;
|
|
||||||
+ resolved[retlen] = '\0'; /* NULL termination */
|
|
||||||
+ input = resolved;
|
|
||||||
+ resolved = tmp;
|
|
||||||
+ }
|
|
||||||
+ PR_Free(resolved);
|
|
||||||
+ if (iterations == 1 && retlen < 0) {
|
|
||||||
+ PR_Free(input);
|
|
||||||
+ input = NULL;
|
|
||||||
+ }
|
|
||||||
+ return input;
|
|
||||||
+}
|
|
||||||
+#endif /* XP_UNIX */
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * We use PR_GetLibraryFilePathname to get the pathname of the loaded
|
|
||||||
+ * shared lib that contains this function, and then do a PR_LoadLibrary
|
|
||||||
+ * with an absolute pathname for the softoken shared library.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include "prio.h"
|
|
||||||
+#include "prprf.h"
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include "prsystem.h"
|
|
||||||
+
|
|
||||||
+/* ### Copied from freebl/loader.c and freebl changed to softoken,
|
|
||||||
+ * and softoken changed to nss.
|
|
||||||
+ */
|
|
||||||
+/*
|
|
||||||
+ * Load the softoken library with the file name 'name' residing in the same
|
|
||||||
+ * directory as libnss, whose pathname is 'nssPath'.
|
|
||||||
+ */
|
|
||||||
+static PRLibrary *
|
|
||||||
+st_LoadSoftokenLibInNssDir(const char *nssPath, const char *name)
|
|
||||||
+{
|
|
||||||
+ PRLibrary *dlh = NULL;
|
|
||||||
+ char *fullName = NULL;
|
|
||||||
+ char* c;
|
|
||||||
+ PRLibSpec libSpec;
|
|
||||||
+
|
|
||||||
+ /* Remove "libnss" from the pathname and add the softoken libname */
|
|
||||||
+ c = strrchr(nssPath, PR_GetDirectorySeparator());
|
|
||||||
+ if (c) {
|
|
||||||
+ size_t nssPathSize = 1 + c - nssPath;
|
|
||||||
+ fullName = (char*) PORT_Alloc(strlen(name) + nssPathSize + 1);
|
|
||||||
+ if (fullName) {
|
|
||||||
+ memcpy(fullName, nssPath, nssPathSize);
|
|
||||||
+ strcpy(fullName + nssPathSize, name);
|
|
||||||
+#ifdef DEBUG_LOADER
|
|
||||||
+ PR_fprintf(PR_STDOUT, "\nAttempting to load fully-qualified %s\n",
|
|
||||||
+ fullName);
|
|
||||||
+#endif
|
|
||||||
+ libSpec.type = PR_LibSpec_Pathname;
|
|
||||||
+ libSpec.value.pathname = fullName;
|
|
||||||
+ dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL);
|
|
||||||
+ PORT_Free(fullName);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return dlh;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* ### Copied from freebl/loader.c and freebl changed to softoken,
|
|
||||||
+ * and softoken changed to nss.
|
|
||||||
+ */
|
|
||||||
+static PRLibrary *
|
|
||||||
+st_LoadLibrary(const char *name)
|
|
||||||
+{
|
|
||||||
+ PRLibrary *lib = NULL;
|
|
||||||
+ PRFuncPtr fn_addr;
|
|
||||||
+ char* nssPath = NULL;
|
|
||||||
+ PRLibSpec libSpec;
|
|
||||||
+
|
|
||||||
+ /* Get the pathname for the loaded libnss, i.e. /usr/lib/libnss3.so
|
|
||||||
+ * PR_GetLibraryFilePathname works with either the base library name or a
|
|
||||||
+ * function pointer, depending on the platform. We can't query an exported
|
|
||||||
+ * symbol such as NSC_GetFunctionList, because on some platforms we can't
|
|
||||||
+ * find symbols in loaded implicit dependencies such as libnss.
|
|
||||||
+ * But we can just get the address of this function !
|
|
||||||
+ */
|
|
||||||
+ fn_addr = (PRFuncPtr) &st_LoadLibrary;
|
|
||||||
+ nssPath = PR_GetLibraryFilePathname(nss_name, fn_addr);
|
|
||||||
+
|
|
||||||
+ if (nssPath) {
|
|
||||||
+ lib = st_LoadSoftokenLibInNssDir(nssPath, name);
|
|
||||||
+#ifdef XP_UNIX
|
|
||||||
+ if (!lib) {
|
|
||||||
+ /*
|
|
||||||
+ * If nssPath is a symbolic link, resolve the symbolic
|
|
||||||
+ * link and try again.
|
|
||||||
+ */
|
|
||||||
+ char* originalNssPath = st_GetOriginalPathname(nssPath);
|
|
||||||
+ if (originalNssPath) {
|
|
||||||
+ PR_Free(nssPath);
|
|
||||||
+ nssPath = originalNssPath;
|
|
||||||
+ lib = st_LoadSoftokenLibInNssDir(nssPath, name);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+ PR_Free(nssPath);
|
|
||||||
+ }
|
|
||||||
+ if (!lib) {
|
|
||||||
+#ifdef DEBUG_LOADER
|
|
||||||
+ PR_fprintf(PR_STDOUT, "\nAttempting to load %s\n", name);
|
|
||||||
+#endif
|
|
||||||
+ libSpec.type = PR_LibSpec_Pathname;
|
|
||||||
+ libSpec.value.pathname = name;
|
|
||||||
+ lib = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL);
|
|
||||||
+ }
|
|
||||||
+ if (NULL == lib) {
|
|
||||||
+#ifdef DEBUG_LOADER
|
|
||||||
+ PR_fprintf(PR_STDOUT, "\nLoading failed : %s.\n", name);
|
|
||||||
+#endif
|
|
||||||
+ }
|
|
||||||
+ return lib;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* This function must be run only once. */
|
|
||||||
+/* determine if hybrid platform, then actually load the DSO. */
|
|
||||||
+static PRStatus
|
|
||||||
+softoken_LoadDSO( void )
|
|
||||||
+{
|
|
||||||
+ PRLibrary * handle;
|
|
||||||
+ const char * name = softoken_default_name;
|
|
||||||
+
|
|
||||||
+ if (!name) {
|
|
||||||
+ PR_SetError(PR_LOAD_LIBRARY_ERROR, 0);
|
|
||||||
+ return PR_FAILURE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ handle = st_LoadLibrary(name);
|
|
||||||
+ if (handle) {
|
|
||||||
+ softokenLib = handle;
|
|
||||||
+ return PR_SUCCESS;
|
|
||||||
+ }
|
|
||||||
+ return PR_FAILURE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static PRStatus
|
|
||||||
+softoken_RunLoaderOnce( void )
|
|
||||||
+{
|
|
||||||
+ PRStatus status;
|
|
||||||
+
|
|
||||||
+ status = PR_CallOnce(&loadSoftokenOnce, &softoken_LoadDSO);
|
|
||||||
+ return status;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* load a new module into our address space and initialize it.
|
|
||||||
*/
|
|
||||||
@@ -238,6 +424,11 @@ SECMOD_LoadPKCS11Module(SECMODModule *mo
|
|
||||||
|
|
||||||
/* intenal modules get loaded from their internal list */
|
|
||||||
if (mod->internal) {
|
|
||||||
+#if 0
|
|
||||||
+ /*
|
|
||||||
+ * Original NSS code that uses a softoken library
|
|
||||||
+ * linked in statically. Deactivated.
|
|
||||||
+ */
|
|
||||||
/* internal, statically get the C_GetFunctionList function */
|
|
||||||
if (mod->isFIPS) {
|
|
||||||
entry = (CK_C_GetFunctionList) FC_GetFunctionList;
|
|
||||||
@@ -251,6 +442,35 @@ SECMOD_LoadPKCS11Module(SECMODModule *mo
|
|
||||||
mod->loaded = PR_TRUE;
|
|
||||||
return SECSuccess;
|
|
||||||
}
|
|
||||||
+#else
|
|
||||||
+ /*
|
|
||||||
+ * Workaround code that loads softoken as a dynamic library,
|
|
||||||
+ * even though the rest of NSS assumes this as the "internal" module.
|
|
||||||
+ */
|
|
||||||
+ if (!softokenLib && PR_SUCCESS != softoken_RunLoaderOnce())
|
|
||||||
+ return SECFailure;
|
|
||||||
+
|
|
||||||
+ if (mod->isFIPS) {
|
|
||||||
+ entry = (CK_C_GetFunctionList)
|
|
||||||
+ PR_FindSymbol(softokenLib, "FC_GetFunctionList");
|
|
||||||
+ } else {
|
|
||||||
+ entry = (CK_C_GetFunctionList)
|
|
||||||
+ PR_FindSymbol(softokenLib, "NSC_GetFunctionList");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!entry)
|
|
||||||
+ return SECFailure;
|
|
||||||
+
|
|
||||||
+ if (mod->isModuleDB) {
|
|
||||||
+ mod->moduleDBFunc = (CK_C_GetFunctionList)
|
|
||||||
+ PR_FindSymbol(softokenLib, "NSC_ModuleDBFunc");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (mod->moduleDBOnly) {
|
|
||||||
+ mod->loaded = PR_TRUE;
|
|
||||||
+ return SECSuccess;
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
} else {
|
|
||||||
/* Not internal, load the DLL and look up C_GetFunctionList */
|
|
||||||
if (mod->dllName == NULL) {
|
|
@ -1,386 +0,0 @@
|
|||||||
--- mozilla/security/nss/lib/softoken/manifest.mn.nofbst 2006-10-03 00:58:51.000000000 +0200
|
|
||||||
+++ mozilla/security/nss/lib/softoken/manifest.mn 2007-06-16 11:16:42.000000000 +0200
|
|
||||||
@@ -40,8 +40,8 @@
|
|
||||||
|
|
||||||
REQUIRES = dbm
|
|
||||||
|
|
||||||
-LIBRARY_NAME = softokn
|
|
||||||
-LIBRARY_VERSION = 3
|
|
||||||
+#LIBRARY_NAME = softokn
|
|
||||||
+#LIBRARY_VERSION = 3
|
|
||||||
MAPFILE = $(OBJDIR)/softokn.def
|
|
||||||
|
|
||||||
DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" -DSOFTOKEN_LIB_NAME=\"$(notdir $(SHARED_LIBRARY))\"
|
|
||||||
@@ -66,28 +66,6 @@
|
|
||||||
softoknt.h \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
-CSRCS = \
|
|
||||||
- dbinit.c \
|
|
||||||
- dbmshim.c \
|
|
||||||
- ecdecode.c \
|
|
||||||
- fipsaudt.c \
|
|
||||||
- fipstest.c \
|
|
||||||
- fipstokn.c \
|
|
||||||
- keydb.c \
|
|
||||||
- lowcert.c \
|
|
||||||
- lowkey.c \
|
|
||||||
- lowpbe.c \
|
|
||||||
- padbuf.c \
|
|
||||||
- pcertdb.c \
|
|
||||||
- pk11db.c \
|
|
||||||
- pkcs11.c \
|
|
||||||
- pkcs11c.c \
|
|
||||||
- pkcs11u.c \
|
|
||||||
- rsawrapr.c \
|
|
||||||
- softkver.c \
|
|
||||||
- tlsprf.c \
|
|
||||||
- $(NULL)
|
|
||||||
-
|
|
||||||
ifdef NSS_ENABLE_ECC
|
|
||||||
DEFINES += -DNSS_ENABLE_ECC
|
|
||||||
endif
|
|
||||||
--- mozilla/security/nss/lib/softoken/Makefile.nofbst 2004-04-25 17:03:16.000000000 +0200
|
|
||||||
+++ mozilla/security/nss/lib/softoken/Makefile 2007-06-16 11:16:42.000000000 +0200
|
|
||||||
@@ -78,18 +78,3 @@
|
|
||||||
|
|
||||||
export:: private_export
|
|
||||||
|
|
||||||
-# On AIX 4.3, IBM xlC_r compiler (version 3.6.6) cannot compile
|
|
||||||
-# pkcs11c.c in 64-bit mode for unknown reasons. A workaround is
|
|
||||||
-# to compile it with optimizations turned on. (Bugzilla bug #63815)
|
|
||||||
-ifeq ($(OS_TARGET)$(OS_RELEASE),AIX4.3)
|
|
||||||
-ifeq ($(USE_64),1)
|
|
||||||
-ifndef BUILD_OPT
|
|
||||||
-$(OBJDIR)/pkcs11.o: pkcs11.c
|
|
||||||
- @$(MAKE_OBJDIR)
|
|
||||||
- $(CC) -o $@ -c -O2 $(CFLAGS) $<
|
|
||||||
-$(OBJDIR)/pkcs11c.o: pkcs11c.c
|
|
||||||
- @$(MAKE_OBJDIR)
|
|
||||||
- $(CC) -o $@ -c -O2 $(CFLAGS) $<
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
--- mozilla/security/nss/lib/freebl/manifest.mn.nofbst 2006-10-13 19:02:58.000000000 +0200
|
|
||||||
+++ mozilla/security/nss/lib/freebl/manifest.mn 2007-06-16 11:16:42.000000000 +0200
|
|
||||||
@@ -44,8 +44,10 @@
|
|
||||||
|
|
||||||
MODULE = nss
|
|
||||||
|
|
||||||
+ifndef FREEBL_CHILD_BUILD
|
|
||||||
LIBRARY_NAME = freebl
|
|
||||||
LIBRARY_VERSION = 3
|
|
||||||
+endif
|
|
||||||
|
|
||||||
ifdef FREEBL_CHILD_BUILD
|
|
||||||
ifdef USE_ABI32_INT32
|
|
||||||
@@ -98,56 +100,9 @@
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
MPI_HDRS = mpi-config.h mpi.h mpi-priv.h mplogic.h mpprime.h logtab.h mp_gf2m.h
|
|
||||||
-MPI_SRCS = mpprime.c mpmontg.c mplogic.c mpi.c mp_gf2m.c
|
|
||||||
|
|
||||||
|
|
||||||
ECL_HDRS = ecl-exp.h ecl.h ec2.h ecp.h ecl-priv.h
|
|
||||||
-ifdef NSS_ENABLE_ECC
|
|
||||||
-ECL_SRCS = ecl.c ecl_curve.c ecl_mult.c ecl_gf.c \
|
|
||||||
- ecp_aff.c ecp_jac.c ecp_mont.c \
|
|
||||||
- ec_naf.c ecp_jm.c
|
|
||||||
-ifdef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
-ECL_SRCS += ec2_aff.c ec2_mont.c ec2_proj.c \
|
|
||||||
- ec2_163.c ec2_193.c ec2_233.c \
|
|
||||||
- ecp_192.c ecp_224.c ecp_256.c ecp_384.c ecp_521.c
|
|
||||||
-endif
|
|
||||||
-else
|
|
||||||
-ECL_SRCS = $(NULL)
|
|
||||||
-endif
|
|
||||||
-SHA_SRCS = sha_fast.c
|
|
||||||
-MPCPU_SRCS = mpcpucache.c
|
|
||||||
-
|
|
||||||
-CSRCS = \
|
|
||||||
- freeblver.c \
|
|
||||||
- ldvector.c \
|
|
||||||
- prng_fips1861.c \
|
|
||||||
- sysrand.c \
|
|
||||||
- $(SHA_SRCS) \
|
|
||||||
- md2.c \
|
|
||||||
- md5.c \
|
|
||||||
- sha512.c \
|
|
||||||
- alghmac.c \
|
|
||||||
- rawhash.c \
|
|
||||||
- alg2268.c \
|
|
||||||
- arcfour.c \
|
|
||||||
- arcfive.c \
|
|
||||||
- desblapi.c \
|
|
||||||
- des.c \
|
|
||||||
- rijndael.c \
|
|
||||||
- aeskeywrap.c \
|
|
||||||
- dh.c \
|
|
||||||
- ec.c \
|
|
||||||
- pqg.c \
|
|
||||||
- dsa.c \
|
|
||||||
- rsa.c \
|
|
||||||
- shvfy.c \
|
|
||||||
- tlsprfalg.c \
|
|
||||||
- $(MPI_SRCS) \
|
|
||||||
- $(MPCPU_SRCS) \
|
|
||||||
- $(ECL_SRCS) \
|
|
||||||
- $(NULL)
|
|
||||||
-
|
|
||||||
-ALL_CSRCS := $(CSRCS)
|
|
||||||
|
|
||||||
ALL_HDRS = \
|
|
||||||
alghmac.h \
|
|
||||||
--- mozilla/security/nss/lib/freebl/Makefile.nofbst 2006-12-07 02:59:41.000000000 +0100
|
|
||||||
+++ mozilla/security/nss/lib/freebl/Makefile 2007-06-16 11:16:42.000000000 +0200
|
|
||||||
@@ -84,21 +84,17 @@
|
|
||||||
|
|
||||||
ifeq ($(OS_TARGET),OSF1)
|
|
||||||
DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD
|
|
||||||
- MPI_SRCS += mpvalpha.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET))) #omits WIN16 and WINCE
|
|
||||||
ifdef NS_USE_GCC
|
|
||||||
# Ideally, we want to use assembler
|
|
||||||
-# ASFILES = mpi_x86.s
|
|
||||||
# DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE \
|
|
||||||
# -DMP_ASSEMBLY_DIV_2DX1D
|
|
||||||
# but we haven't figured out how to make it work, so we are not
|
|
||||||
# using assembler right now.
|
|
||||||
- ASFILES =
|
|
||||||
DEFINES += -DMP_NO_MP_WORD -DMP_USE_UINT_DIGIT
|
|
||||||
else
|
|
||||||
- MPI_SRCS += mpi_x86_asm.c
|
|
||||||
DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
|
|
||||||
DEFINES += -DMP_ASSEMBLY_DIV_2DX1D -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
|
|
||||||
ifdef BUILD_OPT
|
|
||||||
@@ -114,7 +110,6 @@
|
|
||||||
|
|
||||||
ifeq ($(OS_TARGET),IRIX)
|
|
||||||
ifeq ($(USE_N32),1)
|
|
||||||
- ASFILES = mpi_mips.s
|
|
||||||
ifeq ($(NS_USE_GCC),1)
|
|
||||||
ASFLAGS = -Wp,-P -Wp,-traditional -O -mips3
|
|
||||||
else
|
|
||||||
@@ -127,16 +122,13 @@
|
|
||||||
|
|
||||||
ifeq ($(OS_TARGET),Linux)
|
|
||||||
ifeq ($(CPU_ARCH),x86_64)
|
|
||||||
- ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
|
|
||||||
ASFLAGS += -march=opteron -m64 -fPIC
|
|
||||||
DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY
|
|
||||||
DEFINES += -DNSS_USE_COMBA
|
|
||||||
DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
|
|
||||||
# DEFINES += -DMPI_AMD64_ADD
|
|
||||||
- MPI_SRCS += mpi_amd64.c mp_comba.c
|
|
||||||
endif
|
|
||||||
ifeq ($(CPU_ARCH),x86)
|
|
||||||
- ASFILES = mpi_x86.s
|
|
||||||
DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
|
|
||||||
DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
|
|
||||||
DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
|
|
||||||
@@ -155,33 +147,11 @@
|
|
||||||
ifeq ($(OS_TARGET), HP-UX)
|
|
||||||
ifneq ($(OS_TEST), ia64)
|
|
||||||
# PA-RISC
|
|
||||||
-ASFILES += ret_cr16.s
|
|
||||||
ifndef USE_64
|
|
||||||
FREEBL_BUILD_SINGLE_SHLIB =
|
|
||||||
HAVE_ABI32_INT32 = 1
|
|
||||||
HAVE_ABI32_FPU = 1
|
|
||||||
endif
|
|
||||||
-ifdef FREEBL_CHILD_BUILD
|
|
||||||
-ifdef USE_ABI32_INT32
|
|
||||||
-# build for DA1.1 (HP PA 1.1) 32-bit ABI build with 32-bit arithmetic
|
|
||||||
- DEFINES += -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
|
|
||||||
- DEFINES += -DSHA_NO_LONG_LONG # avoid 64-bit arithmetic in SHA512
|
|
||||||
-else
|
|
||||||
-ifdef USE_64
|
|
||||||
-# this builds for DA2.0W (HP PA 2.0 Wide), the LP64 ABI, using 64-bit digits
|
|
||||||
- MPI_SRCS += mpi_hp.c
|
|
||||||
- ASFILES += hpma512.s hppa20.s
|
|
||||||
- DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
|
|
||||||
-else
|
|
||||||
-# this builds for DA2.0 (HP PA 2.0 Narrow) ABI32_FPU model
|
|
||||||
-# (the 32-bit ABI with 64-bit registers) using 64-bit digits
|
|
||||||
- MPI_SRCS += mpi_hp.c
|
|
||||||
- ASFILES += hpma512.s hppa20.s
|
|
||||||
- DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
|
|
||||||
- ARCHFLAG = -Aa +e +DA2.0 +DS2.0
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
@@ -326,7 +296,6 @@
|
|
||||||
ifdef USE_ABI32_INT32
|
|
||||||
# this builds for Sparc v8 pure 32-bit architecture
|
|
||||||
DEFINES += -DMP_USE_UINT_DIGIT -DMP_ASSEMBLY_MULTIPLY
|
|
||||||
- ASFILES = mpv_sparcv8x.s
|
|
||||||
DEFINES += -DSHA_NO_LONG_LONG # avoid 64-bit arithmetic in SHA512
|
|
||||||
endif
|
|
||||||
ifdef USE_ABI32_INT64
|
|
||||||
@@ -337,8 +306,6 @@
|
|
||||||
ifdef USE_ABI32_FPU
|
|
||||||
# this builds for Sparc v8+a ABI32_FPU architecture, 64-bit registers,
|
|
||||||
# 32-bit ABI, it uses FPU code, and 32-bit word size
|
|
||||||
- MPI_SRCS += mpi_sparc.c
|
|
||||||
- ASFILES = mpv_sparcv8.s montmulfv8.s
|
|
||||||
DEFINES += -DMP_NO_MP_WORD -DMP_USE_UINT_DIGIT -DMP_ASSEMBLY_MULTIPLY
|
|
||||||
DEFINES += -DMP_USING_MONT_MULF -DMP_MONT_USE_MP_MUL
|
|
||||||
ECL_USE_FP = 1
|
|
||||||
@@ -350,8 +317,6 @@
|
|
||||||
ifdef USE_ABI64_FPU
|
|
||||||
# this builds for Sparc v9a pure 64-bit architecture
|
|
||||||
# It uses floating point, and 32-bit word size
|
|
||||||
- MPI_SRCS += mpi_sparc.c
|
|
||||||
- ASFILES = mpv_sparcv9.s montmulfv9.s
|
|
||||||
DEFINES += -DMP_NO_MP_WORD -DMP_USE_UINT_DIGIT -DMP_ASSEMBLY_MULTIPLY
|
|
||||||
DEFINES += -DMP_USING_MONT_MULF -DMP_MONT_USE_MP_MUL
|
|
||||||
ECL_USE_FP = 1
|
|
||||||
@@ -367,29 +332,22 @@
|
|
||||||
ifeq ($(USE_64),1)
|
|
||||||
# Solaris for AMD64
|
|
||||||
ifdef NS_USE_GCC
|
|
||||||
- ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
|
|
||||||
ASFLAGS += -march=opteron -m64 -fPIC
|
|
||||||
- MPI_SRCS += mp_comba.c
|
|
||||||
else
|
|
||||||
- ASFILES = arcfour-amd64-sun.s mpi_amd64_sun.s sha-fast-amd64-sun.s
|
|
||||||
- ASFILES += mp_comba_amd64_sun.s mpcpucache_amd64.s
|
|
||||||
ASFLAGS += -xarch=generic64 -K PIC
|
|
||||||
SHA_SRCS =
|
|
||||||
MPCPU_SRCS =
|
|
||||||
endif
|
|
||||||
DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY
|
|
||||||
DEFINES += -DNSS_USE_COMBA
|
|
||||||
- MPI_SRCS += mpi_amd64.c
|
|
||||||
else
|
|
||||||
# Solaris x86
|
|
||||||
DEFINES += -D_X86_
|
|
||||||
DEFINES += -DMP_USE_UINT_DIGIT
|
|
||||||
DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
|
|
||||||
DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
|
|
||||||
- ASFILES = mpi_i86pc.s
|
|
||||||
ifndef NS_USE_GCC
|
|
||||||
MPCPU_SRCS =
|
|
||||||
- ASFILES += mpcpucache_x86.s
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif # Solaris for non-sparc family CPUs
|
|
||||||
@@ -399,7 +357,6 @@
|
|
||||||
ifdef ECL_USE_FP
|
|
||||||
#enable floating point ECC code
|
|
||||||
DEFINES += -DECL_USE_FP
|
|
||||||
- ECL_SRCS += ecp_fp160.c ecp_fp192.c ecp_fp224.c ecp_fp.c
|
|
||||||
ECL_HDRS += ecp_fp.h
|
|
||||||
endif
|
|
||||||
endif # NSS_ENABLE_ECC
|
|
||||||
@@ -436,26 +393,12 @@
|
|
||||||
|
|
||||||
DEFINES += -DMP_API_COMPATIBLE
|
|
||||||
|
|
||||||
-MPI_USERS = dh.c pqg.c dsa.c rsa.c ec.c
|
|
||||||
-
|
|
||||||
-MPI_OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(MPI_SRCS:.c=$(OBJ_SUFFIX)))
|
|
||||||
-MPI_OBJS += $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(MPI_USERS:.c=$(OBJ_SUFFIX)))
|
|
||||||
-
|
|
||||||
$(MPI_OBJS): $(MPI_HDRS)
|
|
||||||
|
|
||||||
-ECL_USERS = ec.c
|
|
||||||
-
|
|
||||||
-ECL_OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(ECL_SRCS:.c=$(OBJ_SUFFIX)) $(ECL_ASM_SRCS:$(ASM_SUFFIX)=$(OBJ_SUFFIX)))
|
|
||||||
-ECL_OBJS += $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(ECL_USERS:.c=$(OBJ_SUFFIX)))
|
|
||||||
-
|
|
||||||
$(ECL_OBJS): $(ECL_HDRS)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-$(OBJDIR)/sysrand$(OBJ_SUFFIX): sysrand.c unix_rand.c win_rand.c mac_rand.c os2_rand.c
|
|
||||||
-
|
|
||||||
-$(OBJDIR)/$(PROG_PREFIX)mpprime$(OBJ_SUFFIX): primes.c
|
|
||||||
-
|
|
||||||
$(OBJDIR)/ldvector$(OBJ_SUFFIX) $(OBJDIR)/loader$(OBJ_SUFFIX) : loader.h
|
|
||||||
|
|
||||||
ifeq ($(SYSV_SPARC),1)
|
|
||||||
@@ -468,8 +411,6 @@
|
|
||||||
@$(MAKE_OBJDIR)
|
|
||||||
$(SOLARIS_AS) -o $@ $(SOLARIS_AS_FLAGS) $<
|
|
||||||
|
|
||||||
-$(OBJDIR)/mpmontg.o: mpmontg.c montmulf.h
|
|
||||||
-
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef FREEBL_CHILD_BUILD
|
|
||||||
@@ -565,25 +506,3 @@
|
|
||||||
|
|
||||||
endif # FREEBL_CHILD_BUILD
|
|
||||||
|
|
||||||
-
|
|
||||||
-# Bugzilla Bug 209827: disable optimization to work around what appears
|
|
||||||
-# to be a VACPP optimizer bug.
|
|
||||||
-ifdef XP_OS2_VACPP
|
|
||||||
-$(OBJDIR)/alg2268.obj: alg2268.c
|
|
||||||
- @$(MAKE_OBJDIR)
|
|
||||||
- $(CC) -Fo$@ -c $(filter-out /O+, $(CFLAGS)) $(call core_abspath,$<)
|
|
||||||
-endif
|
|
||||||
-
|
|
||||||
-# Bugzilla Bug 333917: the non-x86 code in desblapi.c seems to violate
|
|
||||||
-# ANSI C's strict aliasing rules.
|
|
||||||
-ifeq ($(OS_TARGET),Linux)
|
|
||||||
-ifneq ($(CPU_ARCH),x86)
|
|
||||||
-$(OBJDIR)/$(PROG_PREFIX)desblapi$(OBJ_SUFFIX): desblapi.c
|
|
||||||
- @$(MAKE_OBJDIR)
|
|
||||||
-ifdef NEED_ABSOLUTE_PATH
|
|
||||||
- $(CC) -o $@ -c $(CFLAGS) -fno-strict-aliasing $(call core_abspath,$<)
|
|
||||||
-else
|
|
||||||
- $(CC) -o $@ -c $(CFLAGS) -fno-strict-aliasing $<
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
-endif
|
|
||||||
--- mozilla/security/nss/cmd/shlibsign/Makefile.nofbst 2006-12-07 02:59:40.000000000 +0100
|
|
||||||
+++ mozilla/security/nss/cmd/shlibsign/Makefile 2007-06-16 11:16:42.000000000 +0200
|
|
||||||
@@ -60,9 +60,9 @@
|
|
||||||
|
|
||||||
# sign any and all shared libraries that contain the word freebl
|
|
||||||
|
|
||||||
-CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
|
|
||||||
-CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
|
|
||||||
-CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
|
|
||||||
+#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX)
|
|
||||||
+#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX))
|
|
||||||
+#CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
|
|
||||||
|
|
||||||
MD_LIB_RELEASE_FILES = $(CHECKLOC)
|
|
||||||
ALL_TRASH += $(CHECKLOC)
|
|
||||||
--- mozilla/security/nss/cmd/platlibs.mk.nofbst 2006-11-17 03:13:16.000000000 +0100
|
|
||||||
+++ mozilla/security/nss/cmd/platlibs.mk 2007-06-16 11:16:42.000000000 +0200
|
|
||||||
@@ -101,7 +101,6 @@
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)cryptohi.$(LIB_SUFFIX) \
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \
|
|
||||||
- $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
|
|
||||||
$(CRYPTOLIB) \
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \
|
|
||||||
@@ -143,7 +142,6 @@
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \
|
|
||||||
- $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \
|
|
||||||
$(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \
|
|
||||||
@@ -225,10 +223,6 @@
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
-ifeq ($(OS_ARCH), Darwin)
|
|
||||||
-EXTRA_SHARED_LIBS += -dylib_file @executable_path/libsoftokn3.dylib:$(DIST)/lib/libsoftokn3.dylib
|
|
||||||
-endif
|
|
||||||
-
|
|
||||||
|
|
||||||
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
|
|
||||||
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
|
|
@ -1,16 +0,0 @@
|
|||||||
Index: mozilla/security/nss/lib/ckfw/manifest.mn
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/nss/lib/ckfw/manifest.mn,v
|
|
||||||
retrieving revision 1.9
|
|
||||||
diff -u -r1.9 manifest.mn
|
|
||||||
--- mozilla/security/nss/lib/ckfw/manifest.mn 16 Dec 2005 00:48:01 -0000 1.9
|
|
||||||
+++ mozilla/security/nss/lib/ckfw/manifest.mn 31 Aug 2007 17:58:23 -0000
|
|
||||||
@@ -38,7 +38,7 @@
|
|
||||||
|
|
||||||
CORE_DEPTH = ../../..
|
|
||||||
|
|
||||||
-DIRS = builtins
|
|
||||||
+DIRS = builtins pem
|
|
||||||
|
|
||||||
PRIVATE_EXPORTS = \
|
|
||||||
ck.h \
|
|
21
nss-gcm-param-default-pkcs11v2.patch
Normal file
21
nss-gcm-param-default-pkcs11v2.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
diff -up ./lib/util/pkcs11n.h.aes_gcm_pkcs11_v2 ./lib/util/pkcs11n.h
|
||||||
|
--- ./lib/util/pkcs11n.h.aes_gcm_pkcs11_v2 2020-05-13 13:44:11.312405744 -0700
|
||||||
|
+++ ./lib/util/pkcs11n.h 2020-05-13 13:45:23.951723660 -0700
|
||||||
|
@@ -605,7 +605,7 @@ typedef struct CK_NSS_GCM_PARAMS {
|
||||||
|
typedef CK_NSS_GCM_PARAMS CK_PTR CK_NSS_GCM_PARAMS_PTR;
|
||||||
|
|
||||||
|
/* deprecated #defines. Drop in future NSS releases */
|
||||||
|
-#ifdef NSS_PKCS11_2_0_COMPAT
|
||||||
|
+#ifndef NSS_PKCS11_3_0_STRICT
|
||||||
|
|
||||||
|
/* defines that were changed between NSS's PKCS #11 and the Oasis headers */
|
||||||
|
#define CKF_EC_FP CKF_EC_F_P
|
||||||
|
@@ -664,7 +664,7 @@ typedef CK_NSS_GCM_PARAMS CK_PTR CK_GCM_
|
||||||
|
#define CKT_NETSCAPE_VALID CKT_NSS_VALID
|
||||||
|
#define CKT_NETSCAPE_VALID_DELEGATOR CKT_NSS_VALID_DELEGATOR
|
||||||
|
#else
|
||||||
|
-/* use the new CK_GCM_PARAMS if NSS_PKCS11_2_0_COMPAT is not defined */
|
||||||
|
+/* use the new CK_GCM_PARAMS if NSS_PKCS11_3_0_STRICT is defined */
|
||||||
|
typedef struct CK_GCM_PARAMS_V3 CK_GCM_PARAMS;
|
||||||
|
typedef CK_GCM_PARAMS_V3 CK_PTR CK_GCM_PARAMS_PTR;
|
||||||
|
#endif
|
31
nss-kremlin-ppc64le.patch
Normal file
31
nss-kremlin-ppc64le.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
Index: nss/lib/freebl/verified/kremlin/include/kremlin/internal/types.h
|
||||||
|
===================================================================
|
||||||
|
--- nss.orig/lib/freebl/verified/kremlin/include/kremlin/internal/types.h
|
||||||
|
+++ nss/lib/freebl/verified/kremlin/include/kremlin/internal/types.h
|
||||||
|
@@ -56,9 +56,10 @@ typedef const char *Prims_string;
|
||||||
|
!defined(__clang__)
|
||||||
|
#include <emmintrin.h>
|
||||||
|
typedef __m128i FStar_UInt128_uint128;
|
||||||
|
-#elif !defined(KRML_VERIFIED_UINT128) && !defined(_MSC_VER) && \
|
||||||
|
+#elif !defined(KRML_VERIFIED_UINT128) && !defined(_MSC_VER) && \
|
||||||
|
(defined(__x86_64__) || defined(__x86_64) || defined(__aarch64__) || \
|
||||||
|
- (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)))
|
||||||
|
+ (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)) || \
|
||||||
|
+ defined(__s390x__))
|
||||||
|
typedef unsigned __int128 FStar_UInt128_uint128;
|
||||||
|
#elif !defined(KRML_VERIFIED_UINT128) && defined(_MSC_VER) && defined(__clang__)
|
||||||
|
typedef __uint128_t FStar_UInt128_uint128;
|
||||||
|
Index: nss/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h
|
||||||
|
===================================================================
|
||||||
|
--- nss.orig/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h
|
||||||
|
+++ nss/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h
|
||||||
|
@@ -26,7 +26,8 @@
|
||||||
|
|
||||||
|
#if !defined(KRML_VERIFIED_UINT128) && (!defined(_MSC_VER) || defined(__clang__)) && \
|
||||||
|
(defined(__x86_64__) || defined(__x86_64) || defined(__aarch64__) || \
|
||||||
|
- (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)))
|
||||||
|
+ (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)) || \
|
||||||
|
+ defined(__s390x__))
|
||||||
|
|
||||||
|
/* GCC + using native unsigned __int128 support */
|
||||||
|
|
@ -1,916 +0,0 @@
|
|||||||
Index: mozilla/security/coreconf/config.mk
|
|
||||||
diff -u mozilla/security/coreconf/config.mk:1.17.28.1 mozilla/security/coreconf/config.mk:1.17.28.2
|
|
||||||
--- mozilla/security/coreconf/config.mk:1.17.28.1 Sat Jan 21 19:01:27 2006
|
|
||||||
+++ mozilla/security/coreconf/config.mk Fri Apr 28 03:36:22 2006
|
|
||||||
@@ -177,3 +177,7 @@
|
|
||||||
ifdef NSS_ENABLE_ECC
|
|
||||||
DEFINES += -DNSS_ENABLE_ECC
|
|
||||||
endif
|
|
||||||
+
|
|
||||||
+ifdef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
+DEFINES += -DNSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
+endif
|
|
||||||
Index: mozilla/security/nss/cmd/selfserv/selfserv.c
|
|
||||||
diff -u mozilla/security/nss/cmd/selfserv/selfserv.c:1.68.2.5 mozilla/security/nss/cmd/selfserv/selfserv.c:1.68.2.6
|
|
||||||
--- mozilla/security/nss/cmd/selfserv/selfserv.c:1.68.2.5 Sat Apr 22 05:19:47 2006
|
|
||||||
+++ mozilla/security/nss/cmd/selfserv/selfserv.c Fri Apr 28 03:35:33 2006
|
|
||||||
@@ -1806,7 +1806,11 @@
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if ((nickName == NULL) && (fNickName == NULL)) {
|
|
||||||
+ if ((nickName == NULL) && (fNickName == NULL)
|
|
||||||
+#ifdef NSS_ENABLE_ECC
|
|
||||||
+ && (ecNickName == NULL)
|
|
||||||
+#endif
|
|
||||||
+ ) {
|
|
||||||
fprintf(stderr, "Required arg '-n' (rsa nickname) not supplied.\n");
|
|
||||||
fprintf(stderr, "Run '%s -h' for usage information.\n", progName);
|
|
||||||
exit(6);
|
|
||||||
Index: mozilla/security/nss/cmd/bltest/blapitest.c
|
|
||||||
diff -u mozilla/security/nss/cmd/bltest/blapitest.c:1.46.2.1 mozilla/security/nss/cmd/bltest/blapitest.c:1.46.2.2
|
|
||||||
--- mozilla/security/nss/cmd/bltest/blapitest.c:1.46.2.1 Wed Feb 22 22:18:50 2006
|
|
||||||
+++ mozilla/security/nss/cmd/bltest/blapitest.c Fri Apr 28 03:35:32 2006
|
|
||||||
@@ -2499,9 +2499,12 @@
|
|
||||||
case bltestECDSA:
|
|
||||||
if (td)
|
|
||||||
fprintf(stdout, "%12s", "ec_curve");
|
|
||||||
- else
|
|
||||||
+ else {
|
|
||||||
+ ECCurveName curveName = info->params.ecdsa.eckey->ecParams.name;
|
|
||||||
fprintf(stdout, "%12s",
|
|
||||||
- ecCurve_map[info->params.ecdsa.eckey->ecParams.name]->text);
|
|
||||||
+ ecCurve_map[curveName]? ecCurve_map[curveName]->text:
|
|
||||||
+ "Unsupported curve");
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case bltestMD2:
|
|
||||||
Index: mozilla/security/nss/lib/ssl/sslimpl.h
|
|
||||||
diff -u mozilla/security/nss/lib/ssl/sslimpl.h:1.42.2.6 mozilla/security/nss/lib/ssl/sslimpl.h:1.42.2.7
|
|
||||||
--- mozilla/security/nss/lib/ssl/sslimpl.h:1.42.2.6 Sun Apr 23 03:05:42 2006
|
|
||||||
+++ mozilla/security/nss/lib/ssl/sslimpl.h Fri Apr 28 03:35:32 2006
|
|
||||||
@@ -39,7 +39,7 @@
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
-/* $Id: sslimpl.h,v 1.42.2.6 2006/04/23 03:05:42 nelson%bolyard.com Exp $ */
|
|
||||||
+/* $Id: sslimpl.h,v 1.42.2.7 2006/04/28 03:35:32 rrelyea%redhat.com Exp $ */
|
|
||||||
|
|
||||||
#ifndef __sslimpl_h_
|
|
||||||
#define __sslimpl_h_
|
|
||||||
@@ -180,7 +180,7 @@
|
|
||||||
#define NUM_MIXERS 9
|
|
||||||
|
|
||||||
/* Mask of the 25 named curves we support. */
|
|
||||||
-#ifdef NSS_ECC_ONLY_SUITE_B
|
|
||||||
+#ifndef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
#define SSL3_SUPPORTED_CURVES_MASK 0x3800000 /* only 3 curves, suite B*/
|
|
||||||
#else
|
|
||||||
#define SSL3_SUPPORTED_CURVES_MASK 0x3fffffe
|
|
||||||
Index: mozilla/security/nss/lib/ssl/ssl3ecc.c
|
|
||||||
diff -u mozilla/security/nss/lib/ssl/ssl3ecc.c:1.3.2.5 mozilla/security/nss/lib/ssl/ssl3ecc.c:1.3.2.6
|
|
||||||
--- mozilla/security/nss/lib/ssl/ssl3ecc.c:1.3.2.5 Sun Apr 23 03:05:42 2006
|
|
||||||
+++ mozilla/security/nss/lib/ssl/ssl3ecc.c Fri Apr 28 03:35:32 2006
|
|
||||||
@@ -40,7 +40,7 @@
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
/* ECC code moved here from ssl3con.c */
|
|
||||||
-/* $Id: ssl3ecc.c,v 1.3.2.5 2006/04/23 03:05:42 nelson%bolyard.com Exp $ */
|
|
||||||
+/* $Id: ssl3ecc.c,v 1.3.2.6 2006/04/28 03:35:32 rrelyea%redhat.com Exp $ */
|
|
||||||
|
|
||||||
#include "nssrenam.h"
|
|
||||||
#include "nss.h"
|
|
||||||
@@ -1030,9 +1030,9 @@
|
|
||||||
|
|
||||||
#define BE(n) 0, n
|
|
||||||
|
|
||||||
-#ifdef NSS_ECC_ONLY_SUITE_B
|
|
||||||
+#ifndef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
/* Prefabricated TLS client hello extension, Elliptic Curves List,
|
|
||||||
- * offers only 3 curves, the Suite B curves, 23-35
|
|
||||||
+ * offers only 3 curves, the Suite B curves, 23-25
|
|
||||||
*/
|
|
||||||
static const PRUint8 EClist[12] = {
|
|
||||||
BE(10), /* Extension type */
|
|
||||||
Index: mozilla/security/nss/lib/smime/cmssiginfo.c
|
|
||||||
diff -u mozilla/security/nss/lib/smime/cmssiginfo.c:1.29 mozilla/security/nss/lib/smime/cmssiginfo.c:1.29.2.1
|
|
||||||
--- mozilla/security/nss/lib/smime/cmssiginfo.c:1.29 Fri Sep 2 01:24:56 2005
|
|
||||||
+++ mozilla/security/nss/lib/smime/cmssiginfo.c Fri Apr 28 03:35:31 2006
|
|
||||||
@@ -38,7 +38,7 @@
|
|
||||||
/*
|
|
||||||
* CMS signerInfo methods.
|
|
||||||
*
|
|
||||||
- * $Id: cmssiginfo.c,v 1.29 2005/09/02 01:24:56 wtchang%redhat.com Exp $
|
|
||||||
+ * $Id: cmssiginfo.c,v 1.29.2.1 2006/04/28 03:35:31 rrelyea%redhat.com Exp $
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "cmslocal.h"
|
|
||||||
@@ -386,7 +386,9 @@
|
|
||||||
case SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST:
|
|
||||||
case SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION:
|
|
||||||
case SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION:
|
|
||||||
+#ifdef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
|
|
||||||
+#endif
|
|
||||||
/* ok */
|
|
||||||
break;
|
|
||||||
case SEC_OID_UNKNOWN:
|
|
||||||
Index: mozilla/security/nss/lib/pkcs7/p7decode.c
|
|
||||||
diff -u mozilla/security/nss/lib/pkcs7/p7decode.c:1.20 mozilla/security/nss/lib/pkcs7/p7decode.c:1.20.2.1
|
|
||||||
--- mozilla/security/nss/lib/pkcs7/p7decode.c:1.20 Mon Oct 3 22:01:56 2005
|
|
||||||
+++ mozilla/security/nss/lib/pkcs7/p7decode.c Fri Apr 28 03:35:30 2006
|
|
||||||
@@ -38,7 +38,7 @@
|
|
||||||
/*
|
|
||||||
* PKCS7 decoding, verification.
|
|
||||||
*
|
|
||||||
- * $Id: p7decode.c,v 1.20 2005/10/03 22:01:56 relyea%netscape.com Exp $
|
|
||||||
+ * $Id: p7decode.c,v 1.20.2.1 2006/04/28 03:35:30 rrelyea%redhat.com Exp $
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "nssrenam.h"
|
|
||||||
@@ -1665,7 +1665,9 @@
|
|
||||||
algiddata = SECOID_FindOID (&(signerinfo->digestEncAlg.algorithm));
|
|
||||||
if (algiddata == NULL ||
|
|
||||||
((algiddata->offset != SEC_OID_PKCS1_RSA_ENCRYPTION) &&
|
|
||||||
+#ifdef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
(algiddata->offset != SEC_OID_ANSIX962_EC_PUBLIC_KEY) &&
|
|
||||||
+#endif
|
|
||||||
(algiddata->offset != SEC_OID_ANSIX9_DSA_SIGNATURE))) {
|
|
||||||
PORT_SetError (SEC_ERROR_PKCS7_BAD_SIGNATURE);
|
|
||||||
goto done;
|
|
||||||
Index: mozilla/security/nss/lib/freebl/ecl/ecl_curve.c
|
|
||||||
diff -u mozilla/security/nss/lib/freebl/ecl/ecl_curve.c:1.2 mozilla/security/nss/lib/freebl/ecl/ecl_curve.c:1.2.28.1
|
|
||||||
--- mozilla/security/nss/lib/freebl/ecl/ecl_curve.c:1.2 Sun Apr 25 15:03:09 2004
|
|
||||||
+++ mozilla/security/nss/lib/freebl/ecl/ecl_curve.c Fri Apr 28 03:35:30 2006
|
|
||||||
@@ -91,7 +91,8 @@
|
|
||||||
ECCurveParams *
|
|
||||||
EC_GetNamedCurveParams(const ECCurveName name)
|
|
||||||
{
|
|
||||||
- if ((name <= ECCurve_noName) || (ECCurve_pastLastCurve <= name)) {
|
|
||||||
+ if ((name <= ECCurve_noName) || (ECCurve_pastLastCurve <= name) ||
|
|
||||||
+ (ecCurve_map[name] == NULL)) {
|
|
||||||
return NULL;
|
|
||||||
} else {
|
|
||||||
return ECCurveParams_dup(ecCurve_map[name]);
|
|
||||||
Index: mozilla/security/nss/lib/freebl/ecl/ecl.c
|
|
||||||
diff -u mozilla/security/nss/lib/freebl/ecl/ecl.c:1.5.2.2 mozilla/security/nss/lib/freebl/ecl/ecl.c:1.5.2.3
|
|
||||||
--- mozilla/security/nss/lib/freebl/ecl/ecl.c:1.5.2.2 Fri Mar 31 00:26:49 2006
|
|
||||||
+++ mozilla/security/nss/lib/freebl/ecl/ecl.c Fri Apr 28 03:35:30 2006
|
|
||||||
@@ -164,6 +164,7 @@
|
|
||||||
return group;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#ifdef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
/* Construct a generic ECGroup for elliptic curves over binary polynomial
|
|
||||||
* fields. */
|
|
||||||
ECGroup *
|
|
||||||
@@ -205,6 +206,7 @@
|
|
||||||
}
|
|
||||||
return group;
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Construct ECGroup from hex parameters and name, if any. Called by
|
|
||||||
* ECGroup_fromHex and ECGroup_fromName. */
|
|
||||||
@@ -246,6 +248,7 @@
|
|
||||||
|
|
||||||
/* determine which optimizations (if any) to use */
|
|
||||||
if (params->field == ECField_GFp) {
|
|
||||||
+#ifdef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
switch (name) {
|
|
||||||
#ifdef ECL_USE_FP
|
|
||||||
case ECCurve_SECG_PRIME_160R1:
|
|
||||||
@@ -302,10 +305,12 @@
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* use generic arithmetic */
|
|
||||||
+#endif
|
|
||||||
group =
|
|
||||||
ECGroup_consGFp_mont(&irr, &curvea, &curveb, &genx, &geny,
|
|
||||||
&order, params->cofactor);
|
|
||||||
if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
|
|
||||||
+#ifdef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
}
|
|
||||||
} else if (params->field == ECField_GF2m) {
|
|
||||||
group = ECGroup_consGF2m(&irr, NULL, &curvea, &curveb, &genx, &geny, &order, params->cofactor);
|
|
||||||
@@ -321,6 +326,7 @@
|
|
||||||
(name == ECCurve_NIST_B233)) {
|
|
||||||
MP_CHECKOK(ec_group_set_gf2m233(group, name));
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* set name, if any */
|
|
||||||
Index: mozilla/security/nss/lib/freebl/ecl/ecl-curve.h
|
|
||||||
diff -u mozilla/security/nss/lib/freebl/ecl/ecl-curve.h:1.2.28.2 mozilla/security/nss/lib/freebl/ecl/ecl-curve.h:1.2.28.3
|
|
||||||
--- mozilla/security/nss/lib/freebl/ecl/ecl-curve.h:1.2.28.2 Mon Feb 27 23:26:00 2006
|
|
||||||
+++ mozilla/security/nss/lib/freebl/ecl/ecl-curve.h Fri Apr 28 03:35:30 2006
|
|
||||||
@@ -42,25 +42,6 @@
|
|
||||||
#ifndef __ecl_curve_h_
|
|
||||||
#define __ecl_curve_h_
|
|
||||||
|
|
||||||
-/* NIST prime curves */
|
|
||||||
-static const ECCurveParams ecCurve_NIST_P192 = {
|
|
||||||
- "NIST-P192", ECField_GFp, 192,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
|
|
||||||
- "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1",
|
|
||||||
- "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012",
|
|
||||||
- "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_P224 = {
|
|
||||||
- "NIST-P224", ECField_GFp, 224,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE",
|
|
||||||
- "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4",
|
|
||||||
- "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21",
|
|
||||||
- "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", 1
|
|
||||||
-};
|
|
||||||
static const ECCurveParams ecCurve_NIST_P256 = {
|
|
||||||
"NIST-P256", ECField_GFp, 256,
|
|
||||||
"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",
|
|
||||||
@@ -70,6 +51,7 @@
|
|
||||||
"4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",
|
|
||||||
"FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", 1
|
|
||||||
};
|
|
||||||
+
|
|
||||||
static const ECCurveParams ecCurve_NIST_P384 = {
|
|
||||||
"NIST-P384", ECField_GFp, 384,
|
|
||||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF",
|
|
||||||
@@ -80,6 +62,7 @@
|
|
||||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973",
|
|
||||||
1
|
|
||||||
};
|
|
||||||
+
|
|
||||||
static const ECCurveParams ecCurve_NIST_P521 = {
|
|
||||||
"NIST-P521", ECField_GFp, 521,
|
|
||||||
"01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
|
|
||||||
@@ -91,558 +74,67 @@
|
|
||||||
1
|
|
||||||
};
|
|
||||||
|
|
||||||
-/* NIST binary curves */
|
|
||||||
-static const ECCurveParams ecCurve_NIST_K163 = {
|
|
||||||
- "NIST-K163", ECField_GF2m, 163,
|
|
||||||
- "0800000000000000000000000000000000000000C9",
|
|
||||||
- "000000000000000000000000000000000000000001",
|
|
||||||
- "000000000000000000000000000000000000000001",
|
|
||||||
- "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8",
|
|
||||||
- "0289070FB05D38FF58321F2E800536D538CCDAA3D9",
|
|
||||||
- "04000000000000000000020108A2E0CC0D99F8A5EF", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_B163 = {
|
|
||||||
- "NIST-B163", ECField_GF2m, 163,
|
|
||||||
- "0800000000000000000000000000000000000000C9",
|
|
||||||
- "000000000000000000000000000000000000000001",
|
|
||||||
- "020A601907B8C953CA1481EB10512F78744A3205FD",
|
|
||||||
- "03F0EBA16286A2D57EA0991168D4994637E8343E36",
|
|
||||||
- "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1",
|
|
||||||
- "040000000000000000000292FE77E70C12A4234C33", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_K233 = {
|
|
||||||
- "NIST-K233", ECField_GF2m, 233,
|
|
||||||
- "020000000000000000000000000000000000000004000000000000000001",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000001",
|
|
||||||
- "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126",
|
|
||||||
- "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3",
|
|
||||||
- "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", 4
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_B233 = {
|
|
||||||
- "NIST-B233", ECField_GF2m, 233,
|
|
||||||
- "020000000000000000000000000000000000000004000000000000000001",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000001",
|
|
||||||
- "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD",
|
|
||||||
- "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B",
|
|
||||||
- "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052",
|
|
||||||
- "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_K283 = {
|
|
||||||
- "NIST-K283", ECField_GF2m, 283,
|
|
||||||
- "0800000000000000000000000000000000000000000000000000000000000000000010A1",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000000000000000001",
|
|
||||||
- "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836",
|
|
||||||
- "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259",
|
|
||||||
- "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61",
|
|
||||||
- 4
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_B283 = {
|
|
||||||
- "NIST-B283", ECField_GF2m, 283,
|
|
||||||
- "0800000000000000000000000000000000000000000000000000000000000000000010A1",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000000000000000001",
|
|
||||||
- "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5",
|
|
||||||
- "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053",
|
|
||||||
- "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4",
|
|
||||||
- "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307",
|
|
||||||
- 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_K409 = {
|
|
||||||
- "NIST-K409", ECField_GF2m, 409,
|
|
||||||
- "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
|
|
||||||
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
|
|
||||||
- "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746",
|
|
||||||
- "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B",
|
|
||||||
- "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF",
|
|
||||||
- 4
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_B409 = {
|
|
||||||
- "NIST-B409", ECField_GF2m, 409,
|
|
||||||
- "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
|
|
||||||
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
|
|
||||||
- "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F",
|
|
||||||
- "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7",
|
|
||||||
- "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706",
|
|
||||||
- "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173",
|
|
||||||
- 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_K571 = {
|
|
||||||
- "NIST-K571", ECField_GF2m, 571,
|
|
||||||
- "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
|
|
||||||
- "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972",
|
|
||||||
- "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3",
|
|
||||||
- "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001",
|
|
||||||
- 4
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_NIST_B571 = {
|
|
||||||
- "NIST-B571", ECField_GF2m, 571,
|
|
||||||
- "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
|
|
||||||
- "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A",
|
|
||||||
- "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19",
|
|
||||||
- "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B",
|
|
||||||
- "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47",
|
|
||||||
- 2
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-/* ANSI X9.62 prime curves */
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_PRIME_192V2 = {
|
|
||||||
- "X9.62 P-192V2", ECField_GFp, 192,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
|
|
||||||
- "CC22D6DFB95C6B25E49C0D6364A4E5980C393AA21668D953",
|
|
||||||
- "EEA2BAE7E1497842F2DE7769CFE9C989C072AD696F48034A",
|
|
||||||
- "6574D11D69B6EC7A672BB82A083DF2F2B0847DE970B2DE15",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_PRIME_192V3 = {
|
|
||||||
- "X9.62 P-192V3", ECField_GFp, 192,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
|
|
||||||
- "22123DC2395A05CAA7423DAECCC94760A7D462256BD56916",
|
|
||||||
- "7D29778100C65A1DA1783716588DCE2B8B4AEE8E228F1896",
|
|
||||||
- "38A90F22637337334B49DCB66A6DC8F9978ACA7648A943B0",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_PRIME_239V1 = {
|
|
||||||
- "X9.62 P-239V1", ECField_GFp, 239,
|
|
||||||
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
|
|
||||||
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
|
|
||||||
- "6B016C3BDCF18941D0D654921475CA71A9DB2FB27D1D37796185C2942C0A",
|
|
||||||
- "0FFA963CDCA8816CCC33B8642BEDF905C3D358573D3F27FBBD3B3CB9AAAF",
|
|
||||||
- "7DEBE8E4E90A5DAE6E4054CA530BA04654B36818CE226B39FCCB7B02F1AE",
|
|
||||||
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_PRIME_239V2 = {
|
|
||||||
- "X9.62 P-239V2", ECField_GFp, 239,
|
|
||||||
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
|
|
||||||
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
|
|
||||||
- "617FAB6832576CBBFED50D99F0249C3FEE58B94BA0038C7AE84C8C832F2C",
|
|
||||||
- "38AF09D98727705120C921BB5E9E26296A3CDCF2F35757A0EAFD87B830E7",
|
|
||||||
- "5B0125E4DBEA0EC7206DA0FC01D9B081329FB555DE6EF460237DFF8BE4BA",
|
|
||||||
- "7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_PRIME_239V3 = {
|
|
||||||
- "X9.62 P-239V3", ECField_GFp, 239,
|
|
||||||
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
|
|
||||||
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
|
|
||||||
- "255705FA2A306654B1F4CB03D6A750A30C250102D4988717D9BA15AB6D3E",
|
|
||||||
- "6768AE8E18BB92CFCF005C949AA2C6D94853D0E660BBF854B1C9505FE95A",
|
|
||||||
- "1607E6898F390C06BC1D552BAD226F3B6FCFE48B6E818499AF18E3ED6CF3",
|
|
||||||
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551", 1
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-/* ANSI X9.62 binary curves */
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V1 = {
|
|
||||||
- "X9.62 C2-PNB163V1", ECField_GF2m, 163,
|
|
||||||
- "080000000000000000000000000000000000000107",
|
|
||||||
- "072546B5435234A422E0789675F432C89435DE5242",
|
|
||||||
- "00C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9",
|
|
||||||
- "07AF69989546103D79329FCC3D74880F33BBE803CB",
|
|
||||||
- "01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F",
|
|
||||||
- "0400000000000000000001E60FC8821CC74DAEAFC1", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V2 = {
|
|
||||||
- "X9.62 C2-PNB163V2", ECField_GF2m, 163,
|
|
||||||
- "080000000000000000000000000000000000000107",
|
|
||||||
- "0108B39E77C4B108BED981ED0E890E117C511CF072",
|
|
||||||
- "0667ACEB38AF4E488C407433FFAE4F1C811638DF20",
|
|
||||||
- "0024266E4EB5106D0A964D92C4860E2671DB9B6CC5",
|
|
||||||
- "079F684DDF6684C5CD258B3890021B2386DFD19FC5",
|
|
||||||
- "03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V3 = {
|
|
||||||
- "X9.62 C2-PNB163V3", ECField_GF2m, 163,
|
|
||||||
- "080000000000000000000000000000000000000107",
|
|
||||||
- "07A526C63D3E25A256A007699F5447E32AE456B50E",
|
|
||||||
- "03F7061798EB99E238FD6F1BF95B48FEEB4854252B",
|
|
||||||
- "02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB",
|
|
||||||
- "05B935590C155E17EA48EB3FF3718B893DF59A05D0",
|
|
||||||
- "03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB176V1 = {
|
|
||||||
- "X9.62 C2-PNB176V1", ECField_GF2m, 176,
|
|
||||||
- "0100000000000000000000000000000000080000000007",
|
|
||||||
- "E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B",
|
|
||||||
- "5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2",
|
|
||||||
- "8D16C2866798B600F9F08BB4A8E860F3298CE04A5798",
|
|
||||||
- "6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C",
|
|
||||||
- "00010092537397ECA4F6145799D62B0A19CE06FE26AD", 0xFF6E
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V1 = {
|
|
||||||
- "X9.62 C2-TNB191V1", ECField_GF2m, 191,
|
|
||||||
- "800000000000000000000000000000000000000000000201",
|
|
||||||
- "2866537B676752636A68F56554E12640276B649EF7526267",
|
|
||||||
- "2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC",
|
|
||||||
- "36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D",
|
|
||||||
- "765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB",
|
|
||||||
- "40000000000000000000000004A20E90C39067C893BBB9A5", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V2 = {
|
|
||||||
- "X9.62 C2-TNB191V2", ECField_GF2m, 191,
|
|
||||||
- "800000000000000000000000000000000000000000000201",
|
|
||||||
- "401028774D7777C7B7666D1366EA432071274F89FF01E718",
|
|
||||||
- "0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01",
|
|
||||||
- "3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10",
|
|
||||||
- "17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A",
|
|
||||||
- "20000000000000000000000050508CB89F652824E06B8173", 4
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V3 = {
|
|
||||||
- "X9.62 C2-TNB191V3", ECField_GF2m, 191,
|
|
||||||
- "800000000000000000000000000000000000000000000201",
|
|
||||||
- "6C01074756099122221056911C77D77E77A777E7E7E77FCB",
|
|
||||||
- "71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8",
|
|
||||||
- "375D4CE24FDE434489DE8746E71786015009E66E38A926DD",
|
|
||||||
- "545A39176196575D985999366E6AD34CE0A77CD7127B06BE",
|
|
||||||
- "155555555555555555555555610C0B196812BFB6288A3EA3", 6
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB208W1 = {
|
|
||||||
- "X9.62 C2-PNB208W1", ECField_GF2m, 208,
|
|
||||||
- "010000000000000000000000000000000800000000000000000007",
|
|
||||||
- "0000000000000000000000000000000000000000000000000000",
|
|
||||||
- "C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E",
|
|
||||||
- "89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A",
|
|
||||||
- "0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3",
|
|
||||||
- "000101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D", 0xFE48
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V1 = {
|
|
||||||
- "X9.62 C2-TNB239V1", ECField_GF2m, 239,
|
|
||||||
- "800000000000000000000000000000000000000000000000001000000001",
|
|
||||||
- "32010857077C5431123A46B808906756F543423E8D27877578125778AC76",
|
|
||||||
- "790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16",
|
|
||||||
- "57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D",
|
|
||||||
- "61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305",
|
|
||||||
- "2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447", 4
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V2 = {
|
|
||||||
- "X9.62 C2-TNB239V2", ECField_GF2m, 239,
|
|
||||||
- "800000000000000000000000000000000000000000000000001000000001",
|
|
||||||
- "4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F",
|
|
||||||
- "5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B",
|
|
||||||
- "28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205",
|
|
||||||
- "5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833",
|
|
||||||
- "1555555555555555555555555555553C6F2885259C31E3FCDF154624522D", 6
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V3 = {
|
|
||||||
- "X9.62 C2-TNB239V3", ECField_GF2m, 239,
|
|
||||||
- "800000000000000000000000000000000000000000000000001000000001",
|
|
||||||
- "01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F",
|
|
||||||
- "6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40",
|
|
||||||
- "70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92",
|
|
||||||
- "2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461",
|
|
||||||
- "0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF", 0xA
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB272W1 = {
|
|
||||||
- "X9.62 C2-PNB272W1", ECField_GF2m, 272,
|
|
||||||
- "010000000000000000000000000000000000000000000000000000010000000000000B",
|
|
||||||
- "91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586FB20",
|
|
||||||
- "7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E540F7",
|
|
||||||
- "6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171DD8D",
|
|
||||||
- "10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE9D23",
|
|
||||||
- "000100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E629521",
|
|
||||||
- 0xFF06
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB304W1 = {
|
|
||||||
- "X9.62 C2-PNB304W1", ECField_GF2m, 304,
|
|
||||||
- "010000000000000000000000000000000000000000000000000000000000000000000000000807",
|
|
||||||
- "FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C1288078365A0396C8E681",
|
|
||||||
- "BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C14039601E55827340BE",
|
|
||||||
- "197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A644F740A2614",
|
|
||||||
- "E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B549FDC1B92C03B",
|
|
||||||
- "000101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899164443051D",
|
|
||||||
- 0xFE2E
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB359V1 = {
|
|
||||||
- "X9.62 C2-TNB359V1", ECField_GF2m, 359,
|
|
||||||
- "800000000000000000000000000000000000000000000000000000000000000000000000100000000000000001",
|
|
||||||
- "5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223A5E05656FB549016A96656A557",
|
|
||||||
- "2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626089687742B6329E70680231988",
|
|
||||||
- "3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6BDCDE98E8E707C07A2239B1B097",
|
|
||||||
- "53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868FE57E4AE2DE211305A407104BD",
|
|
||||||
- "01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20A7EB964FE7719E74F490758D3B",
|
|
||||||
- 0x4C
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB368W1 = {
|
|
||||||
- "X9.62 C2-PNB368W1", ECField_GF2m, 368,
|
|
||||||
- "0100000000000000000000000000000000000000000000000000000000000000000000002000000000000000000007",
|
|
||||||
- "E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C576D62F0AB7519CCD2A1A906AE30D",
|
|
||||||
- "FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1C2112D84D164F444F8F74786046A",
|
|
||||||
- "1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22E7E789E927BE216F02E1FB136A5F",
|
|
||||||
- "7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87CD1855ADAA81E2A0750B80FDA2310",
|
|
||||||
- "00010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87E909AE40A6F131E9CFCE5BD967",
|
|
||||||
- 0xFF70
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB431R1 = {
|
|
||||||
- "X9.62 C2-TNB431R1", ECField_GF2m, 431,
|
|
||||||
- "800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000001",
|
|
||||||
- "1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF620B0EB9906D0957F6C6FEACD615468DF104DE296CD8F",
|
|
||||||
- "10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A919B626D4E50A8DD731B107A9962381FB5D807BF2618",
|
|
||||||
- "120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7",
|
|
||||||
- "20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760",
|
|
||||||
- "0340340340340340340340340340340340340340340340340340340323C313FAB50589703B5EC68D3587FEC60D161CC149C1AD4A91",
|
|
||||||
- 0x2760
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-/* SEC2 prime curves */
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_112R1 = {
|
|
||||||
- "SECP-112R1", ECField_GFp, 112,
|
|
||||||
- "DB7C2ABF62E35E668076BEAD208B",
|
|
||||||
- "DB7C2ABF62E35E668076BEAD2088",
|
|
||||||
- "659EF8BA043916EEDE8911702B22",
|
|
||||||
- "09487239995A5EE76B55F9C2F098",
|
|
||||||
- "A89CE5AF8724C0A23E0E0FF77500",
|
|
||||||
- "DB7C2ABF62E35E7628DFAC6561C5", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_112R2 = {
|
|
||||||
- "SECP-112R2", ECField_GFp, 112,
|
|
||||||
- "DB7C2ABF62E35E668076BEAD208B",
|
|
||||||
- "6127C24C05F38A0AAAF65C0EF02C",
|
|
||||||
- "51DEF1815DB5ED74FCC34C85D709",
|
|
||||||
- "4BA30AB5E892B4E1649DD0928643",
|
|
||||||
- "adcd46f5882e3747def36e956e97",
|
|
||||||
- "36DF0AAFD8B8D7597CA10520D04B", 4
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_128R1 = {
|
|
||||||
- "SECP-128R1", ECField_GFp, 128,
|
|
||||||
- "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
|
|
||||||
- "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC",
|
|
||||||
- "E87579C11079F43DD824993C2CEE5ED3",
|
|
||||||
- "161FF7528B899B2D0C28607CA52C5B86",
|
|
||||||
- "CF5AC8395BAFEB13C02DA292DDED7A83",
|
|
||||||
- "FFFFFFFE0000000075A30D1B9038A115", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_128R2 = {
|
|
||||||
- "SECP-128R2", ECField_GFp, 128,
|
|
||||||
- "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
|
|
||||||
- "D6031998D1B3BBFEBF59CC9BBFF9AEE1",
|
|
||||||
- "5EEEFCA380D02919DC2C6558BB6D8A5D",
|
|
||||||
- "7B6AA5D85E572983E6FB32A7CDEBC140",
|
|
||||||
- "27B6916A894D3AEE7106FE805FC34B44",
|
|
||||||
- "3FFFFFFF7FFFFFFFBE0024720613B5A3", 4
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_160K1 = {
|
|
||||||
- "SECP-160K1", ECField_GFp, 160,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
|
|
||||||
- "0000000000000000000000000000000000000000",
|
|
||||||
- "0000000000000000000000000000000000000007",
|
|
||||||
- "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB",
|
|
||||||
- "938CF935318FDCED6BC28286531733C3F03C4FEE",
|
|
||||||
- "0100000000000000000001B8FA16DFAB9ACA16B6B3", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_160R1 = {
|
|
||||||
- "SECP-160R1", ECField_GFp, 160,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC",
|
|
||||||
- "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45",
|
|
||||||
- "4A96B5688EF573284664698968C38BB913CBFC82",
|
|
||||||
- "23A628553168947D59DCC912042351377AC5FB32",
|
|
||||||
- "0100000000000000000001F4C8F927AED3CA752257", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_160R2 = {
|
|
||||||
- "SECP-160R2", ECField_GFp, 160,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70",
|
|
||||||
- "B4E134D3FB59EB8BAB57274904664D5AF50388BA",
|
|
||||||
- "52DCB034293A117E1F4FF11B30F7199D3144CE6D",
|
|
||||||
- "FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E",
|
|
||||||
- "0100000000000000000000351EE786A818F3A1A16B", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_192K1 = {
|
|
||||||
- "SECP-192K1", ECField_GFp, 192,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37",
|
|
||||||
- "000000000000000000000000000000000000000000000000",
|
|
||||||
- "000000000000000000000000000000000000000000000003",
|
|
||||||
- "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D",
|
|
||||||
- "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_224K1 = {
|
|
||||||
- "SECP-224K1", ECField_GFp, 224,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D",
|
|
||||||
- "00000000000000000000000000000000000000000000000000000000",
|
|
||||||
- "00000000000000000000000000000000000000000000000000000005",
|
|
||||||
- "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C",
|
|
||||||
- "7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5",
|
|
||||||
- "010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_PRIME_256K1 = {
|
|
||||||
- "SECP-256K1", ECField_GFp, 256,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F",
|
|
||||||
- "0000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
- "0000000000000000000000000000000000000000000000000000000000000007",
|
|
||||||
- "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
|
|
||||||
- "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", 1
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-/* SEC2 binary curves */
|
|
||||||
-static const ECCurveParams ecCurve_SECG_CHAR2_113R1 = {
|
|
||||||
- "SECT-113R1", ECField_GF2m, 113,
|
|
||||||
- "020000000000000000000000000201",
|
|
||||||
- "003088250CA6E7C7FE649CE85820F7",
|
|
||||||
- "00E8BEE4D3E2260744188BE0E9C723",
|
|
||||||
- "009D73616F35F4AB1407D73562C10F",
|
|
||||||
- "00A52830277958EE84D1315ED31886",
|
|
||||||
- "0100000000000000D9CCEC8A39E56F", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_CHAR2_113R2 = {
|
|
||||||
- "SECT-113R2", ECField_GF2m, 113,
|
|
||||||
- "020000000000000000000000000201",
|
|
||||||
- "00689918DBEC7E5A0DD6DFC0AA55C7",
|
|
||||||
- "0095E9A9EC9B297BD4BF36E059184F",
|
|
||||||
- "01A57A6A7B26CA5EF52FCDB8164797",
|
|
||||||
- "00B3ADC94ED1FE674C06E695BABA1D",
|
|
||||||
- "010000000000000108789B2496AF93", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_CHAR2_131R1 = {
|
|
||||||
- "SECT-131R1", ECField_GF2m, 131,
|
|
||||||
- "080000000000000000000000000000010D",
|
|
||||||
- "07A11B09A76B562144418FF3FF8C2570B8",
|
|
||||||
- "0217C05610884B63B9C6C7291678F9D341",
|
|
||||||
- "0081BAF91FDF9833C40F9C181343638399",
|
|
||||||
- "078C6E7EA38C001F73C8134B1B4EF9E150",
|
|
||||||
- "0400000000000000023123953A9464B54D", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_CHAR2_131R2 = {
|
|
||||||
- "SECT-131R2", ECField_GF2m, 131,
|
|
||||||
- "080000000000000000000000000000010D",
|
|
||||||
- "03E5A88919D7CAFCBF415F07C2176573B2",
|
|
||||||
- "04B8266A46C55657AC734CE38F018F2192",
|
|
||||||
- "0356DCD8F2F95031AD652D23951BB366A8",
|
|
||||||
- "0648F06D867940A5366D9E265DE9EB240F",
|
|
||||||
- "0400000000000000016954A233049BA98F", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_CHAR2_163R1 = {
|
|
||||||
- "SECT-163R1", ECField_GF2m, 163,
|
|
||||||
- "0800000000000000000000000000000000000000C9",
|
|
||||||
- "07B6882CAAEFA84F9554FF8428BD88E246D2782AE2",
|
|
||||||
- "0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9",
|
|
||||||
- "0369979697AB43897789566789567F787A7876A654",
|
|
||||||
- "00435EDB42EFAFB2989D51FEFCE3C80988F41FF883",
|
|
||||||
- "03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_CHAR2_193R1 = {
|
|
||||||
- "SECT-193R1", ECField_GF2m, 193,
|
|
||||||
- "02000000000000000000000000000000000000000000008001",
|
|
||||||
- "0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01",
|
|
||||||
- "00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814",
|
|
||||||
- "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1",
|
|
||||||
- "0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05",
|
|
||||||
- "01000000000000000000000000C7F34A778F443ACC920EBA49", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_CHAR2_193R2 = {
|
|
||||||
- "SECT-193R2", ECField_GF2m, 193,
|
|
||||||
- "02000000000000000000000000000000000000000000008001",
|
|
||||||
- "0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B",
|
|
||||||
- "00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE",
|
|
||||||
- "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F",
|
|
||||||
- "01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C",
|
|
||||||
- "010000000000000000000000015AAB561B005413CCD4EE99D5", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_SECG_CHAR2_239K1 = {
|
|
||||||
- "SECT-239K1", ECField_GF2m, 239,
|
|
||||||
- "800000000000000000004000000000000000000000000000000000000001",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
- "000000000000000000000000000000000000000000000000000000000001",
|
|
||||||
- "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC",
|
|
||||||
- "76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA",
|
|
||||||
- "2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5", 4
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-/* WTLS curves */
|
|
||||||
-static const ECCurveParams ecCurve_WTLS_1 = {
|
|
||||||
- "WTLS-1", ECField_GF2m, 113,
|
|
||||||
- "020000000000000000000000000201",
|
|
||||||
- "000000000000000000000000000001",
|
|
||||||
- "000000000000000000000000000001",
|
|
||||||
- "01667979A40BA497E5D5C270780617",
|
|
||||||
- "00F44B4AF1ECC2630E08785CEBCC15",
|
|
||||||
- "00FFFFFFFFFFFFFFFDBF91AF6DEA73", 2
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_WTLS_8 = {
|
|
||||||
- "WTLS-8", ECField_GFp, 112,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFDE7",
|
|
||||||
- "0000000000000000000000000000",
|
|
||||||
- "0000000000000000000000000003",
|
|
||||||
- "0000000000000000000000000001",
|
|
||||||
- "0000000000000000000000000002",
|
|
||||||
- "0100000000000001ECEA551AD837E9", 1
|
|
||||||
-};
|
|
||||||
-static const ECCurveParams ecCurve_WTLS_9 = {
|
|
||||||
- "WTLS-9", ECField_GFp, 160,
|
|
||||||
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC808F",
|
|
||||||
- "0000000000000000000000000000000000000000",
|
|
||||||
- "0000000000000000000000000000000000000003",
|
|
||||||
- "0000000000000000000000000000000000000001",
|
|
||||||
- "0000000000000000000000000000000000000002",
|
|
||||||
- "0100000000000000000001CDC98AE0E2DE574ABF33", 1
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
/* mapping between ECCurveName enum and pointers to ECCurveParams */
|
|
||||||
static const ECCurveParams *ecCurve_map[] = {
|
|
||||||
- NULL, /* ECCurve_noName */
|
|
||||||
- &ecCurve_NIST_P192, /* ECCurve_NIST_P192 */
|
|
||||||
- &ecCurve_NIST_P224, /* ECCurve_NIST_P224 */
|
|
||||||
- &ecCurve_NIST_P256, /* ECCurve_NIST_P256 */
|
|
||||||
- &ecCurve_NIST_P384, /* ECCurve_NIST_P384 */
|
|
||||||
- &ecCurve_NIST_P521, /* ECCurve_NIST_P521 */
|
|
||||||
- &ecCurve_NIST_K163, /* ECCurve_NIST_K163 */
|
|
||||||
- &ecCurve_NIST_B163, /* ECCurve_NIST_B163 */
|
|
||||||
- &ecCurve_NIST_K233, /* ECCurve_NIST_K233 */
|
|
||||||
- &ecCurve_NIST_B233, /* ECCurve_NIST_B233 */
|
|
||||||
- &ecCurve_NIST_K283, /* ECCurve_NIST_K283 */
|
|
||||||
- &ecCurve_NIST_B283, /* ECCurve_NIST_B283 */
|
|
||||||
- &ecCurve_NIST_K409, /* ECCurve_NIST_K409 */
|
|
||||||
- &ecCurve_NIST_B409, /* ECCurve_NIST_B409 */
|
|
||||||
- &ecCurve_NIST_K571, /* ECCurve_NIST_K571 */
|
|
||||||
- &ecCurve_NIST_B571, /* ECCurve_NIST_B571 */
|
|
||||||
- &ecCurve_X9_62_PRIME_192V2, /* ECCurve_X9_62_PRIME_192V2 */
|
|
||||||
- &ecCurve_X9_62_PRIME_192V3, /* ECCurve_X9_62_PRIME_192V3 */
|
|
||||||
- &ecCurve_X9_62_PRIME_239V1, /* ECCurve_X9_62_PRIME_239V1 */
|
|
||||||
- &ecCurve_X9_62_PRIME_239V2, /* ECCurve_X9_62_PRIME_239V2 */
|
|
||||||
- &ecCurve_X9_62_PRIME_239V3, /* ECCurve_X9_62_PRIME_239V3 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_PNB163V1, /* ECCurve_X9_62_CHAR2_PNB163V1 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_PNB163V2, /* ECCurve_X9_62_CHAR2_PNB163V2 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_PNB163V3, /* ECCurve_X9_62_CHAR2_PNB163V3 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_PNB176V1, /* ECCurve_X9_62_CHAR2_PNB176V1 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_TNB191V1, /* ECCurve_X9_62_CHAR2_TNB191V1 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_TNB191V2, /* ECCurve_X9_62_CHAR2_TNB191V2 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_TNB191V3, /* ECCurve_X9_62_CHAR2_TNB191V3 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_PNB208W1, /* ECCurve_X9_62_CHAR2_PNB208W1 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_TNB239V1, /* ECCurve_X9_62_CHAR2_TNB239V1 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_TNB239V2, /* ECCurve_X9_62_CHAR2_TNB239V2 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_TNB239V3, /* ECCurve_X9_62_CHAR2_TNB239V3 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_PNB272W1, /* ECCurve_X9_62_CHAR2_PNB272W1 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_PNB304W1, /* ECCurve_X9_62_CHAR2_PNB304W1 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_TNB359V1, /* ECCurve_X9_62_CHAR2_TNB359V1 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_PNB368W1, /* ECCurve_X9_62_CHAR2_PNB368W1 */
|
|
||||||
- &ecCurve_X9_62_CHAR2_TNB431R1, /* ECCurve_X9_62_CHAR2_TNB431R1 */
|
|
||||||
- &ecCurve_SECG_PRIME_112R1, /* ECCurve_SECG_PRIME_112R1 */
|
|
||||||
- &ecCurve_SECG_PRIME_112R2, /* ECCurve_SECG_PRIME_112R2 */
|
|
||||||
- &ecCurve_SECG_PRIME_128R1, /* ECCurve_SECG_PRIME_128R1 */
|
|
||||||
- &ecCurve_SECG_PRIME_128R2, /* ECCurve_SECG_PRIME_128R2 */
|
|
||||||
- &ecCurve_SECG_PRIME_160K1, /* ECCurve_SECG_PRIME_160K1 */
|
|
||||||
- &ecCurve_SECG_PRIME_160R1, /* ECCurve_SECG_PRIME_160R1 */
|
|
||||||
- &ecCurve_SECG_PRIME_160R2, /* ECCurve_SECG_PRIME_160R2 */
|
|
||||||
- &ecCurve_SECG_PRIME_192K1, /* ECCurve_SECG_PRIME_192K1 */
|
|
||||||
- &ecCurve_SECG_PRIME_224K1, /* ECCurve_SECG_PRIME_224K1 */
|
|
||||||
- &ecCurve_SECG_PRIME_256K1, /* ECCurve_SECG_PRIME_256K1 */
|
|
||||||
- &ecCurve_SECG_CHAR2_113R1, /* ECCurve_SECG_CHAR2_113R1 */
|
|
||||||
- &ecCurve_SECG_CHAR2_113R2, /* ECCurve_SECG_CHAR2_113R2 */
|
|
||||||
- &ecCurve_SECG_CHAR2_131R1, /* ECCurve_SECG_CHAR2_131R1 */
|
|
||||||
- &ecCurve_SECG_CHAR2_131R2, /* ECCurve_SECG_CHAR2_131R2 */
|
|
||||||
- &ecCurve_SECG_CHAR2_163R1, /* ECCurve_SECG_CHAR2_163R1 */
|
|
||||||
- &ecCurve_SECG_CHAR2_193R1, /* ECCurve_SECG_CHAR2_193R1 */
|
|
||||||
- &ecCurve_SECG_CHAR2_193R2, /* ECCurve_SECG_CHAR2_193R2 */
|
|
||||||
- &ecCurve_SECG_CHAR2_239K1, /* ECCurve_SECG_CHAR2_239K1 */
|
|
||||||
- &ecCurve_WTLS_1, /* ECCurve_WTLS_1 */
|
|
||||||
- &ecCurve_WTLS_8, /* ECCurve_WTLS_8 */
|
|
||||||
- &ecCurve_WTLS_9, /* ECCurve_WTLS_9 */
|
|
||||||
- NULL /* ECCurve_pastLastCurve */
|
|
||||||
+ NULL, /* ECCurve_noName */
|
|
||||||
+ NULL, /* ECCurve_NIST_P192 */
|
|
||||||
+ NULL, /* ECCurve_NIST_P224 */
|
|
||||||
+ &ecCurve_NIST_P256, /* ECCurve_NIST_P256 */
|
|
||||||
+ &ecCurve_NIST_P384, /* ECCurve_NIST_P384 */
|
|
||||||
+ &ecCurve_NIST_P521, /* ECCurve_NIST_P521 */
|
|
||||||
+ NULL, /* ECCurve_NIST_K163 */
|
|
||||||
+ NULL, /* ECCurve_NIST_B163 */
|
|
||||||
+ NULL, /* ECCurve_NIST_K233 */
|
|
||||||
+ NULL, /* ECCurve_NIST_B233 */
|
|
||||||
+ NULL, /* ECCurve_NIST_K283 */
|
|
||||||
+ NULL, /* ECCurve_NIST_B283 */
|
|
||||||
+ NULL, /* ECCurve_NIST_K409 */
|
|
||||||
+ NULL, /* ECCurve_NIST_B409 */
|
|
||||||
+ NULL, /* ECCurve_NIST_K571 */
|
|
||||||
+ NULL, /* ECCurve_NIST_B571 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_PRIME_192V2 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_PRIME_192V3 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_PRIME_239V1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_PRIME_239V2 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_PRIME_239V3 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_PNB163V1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_PNB163V2 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_PNB163V3 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_PNB176V1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_TNB191V1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_TNB191V2 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_TNB191V3 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_PNB208W1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_TNB239V1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_TNB239V2 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_TNB239V3 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_PNB272W1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_PNB304W1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_TNB359V1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_PNB368W1 */
|
|
||||||
+ NULL, /* ECCurve_X9_62_CHAR2_TNB431R1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_112R1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_112R2 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_128R1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_128R2 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_160K1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_160R1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_160R2 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_192K1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_224K1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_PRIME_256K1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_CHAR2_113R1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_CHAR2_113R2 */
|
|
||||||
+ NULL, /* ECCurve_SECG_CHAR2_131R1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_CHAR2_131R2 */
|
|
||||||
+ NULL, /* ECCurve_SECG_CHAR2_163R1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_CHAR2_193R1 */
|
|
||||||
+ NULL, /* ECCurve_SECG_CHAR2_193R2 */
|
|
||||||
+ NULL, /* ECCurve_SECG_CHAR2_239K1 */
|
|
||||||
+ NULL, /* ECCurve_WTLS_1 */
|
|
||||||
+ NULL, /* ECCurve_WTLS_8 */
|
|
||||||
+ NULL, /* ECCurve_WTLS_9 */
|
|
||||||
+ NULL /* ECCurve_pastLastCurve */
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Index: mozilla/security/nss/lib/freebl/manifest.mn
|
|
||||||
diff -u mozilla/security/nss/lib/freebl/manifest.mn:1.44.2.1 mozilla/security/nss/lib/freebl/manifest.mn:1.44.2.2
|
|
||||||
--- mozilla/security/nss/lib/freebl/manifest.mn:1.44.2.1 Fri Mar 31 00:26:40 2006
|
|
||||||
+++ mozilla/security/nss/lib/freebl/manifest.mn Fri Apr 28 03:35:29 2006
|
|
||||||
@@ -104,11 +104,13 @@
|
|
||||||
ECL_HDRS = ecl-exp.h ecl.h ec2.h ecp.h ecl-priv.h
|
|
||||||
ifdef NSS_ENABLE_ECC
|
|
||||||
ECL_SRCS = ecl.c ecl_curve.c ecl_mult.c ecl_gf.c \
|
|
||||||
- ec2_aff.c ec2_mont.c ec2_proj.c \
|
|
||||||
- ec2_163.c ec2_193.c ec2_233.c \
|
|
||||||
ecp_aff.c ecp_jac.c ecp_mont.c \
|
|
||||||
- ecp_192.c ecp_224.c ecp_256.c ecp_384.c ecp_521.c \
|
|
||||||
ec_naf.c ecp_jm.c
|
|
||||||
+ifdef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
+ECL_SRCS += ec2_aff.c ec2_mont.c ec2_proj.c \
|
|
||||||
+ ec2_163.c ec2_193.c ec2_233.c \
|
|
||||||
+ ecp_192.c ecp_224.c ecp_256.c ecp_384.c ecp_521.c
|
|
||||||
+endif
|
|
||||||
else
|
|
||||||
ECL_SRCS = $(NULL)
|
|
||||||
endif
|
|
||||||
Index: mozilla/security/nss/lib/cryptohi/secsign.c
|
|
||||||
diff -u mozilla/security/nss/lib/cryptohi/secsign.c:1.14.2.2 mozilla/security/nss/lib/cryptohi/secsign.c:1.14.2.3
|
|
||||||
--- mozilla/security/nss/lib/cryptohi/secsign.c:1.14.2.2 Thu Mar 2 00:12:26 2006
|
|
||||||
+++ mozilla/security/nss/lib/cryptohi/secsign.c Fri Apr 28 03:35:29 2006
|
|
||||||
@@ -37,7 +37,7 @@
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
-/* $Id: secsign.c,v 1.14.2.2 2006/03/02 00:12:26 wtchang%redhat.com Exp $ */
|
|
||||||
+/* $Id: secsign.c,v 1.14.2.3 2006/04/28 03:35:29 rrelyea%redhat.com Exp $ */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "cryptohi.h"
|
|
||||||
@@ -157,6 +157,13 @@
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#ifndef NSS_ECC_MORE_THAN_SUITE_B
|
|
||||||
+ if (key->keyType == ecKey) {
|
|
||||||
+ PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
cx = (SGNContext*) PORT_ZAlloc(sizeof(SGNContext));
|
|
||||||
if (cx) {
|
|
||||||
cx->hashalg = hashalg;
|
|
@ -1,14 +0,0 @@
|
|||||||
--- ./mozilla/security/nss/cmd/platlibs.mk.withrpath 2007-02-19 07:17:06.000000000 +0100
|
|
||||||
+++ ./mozilla/security/nss/cmd/platlibs.mk 2007-02-19 07:18:07.000000000 +0100
|
|
||||||
@@ -52,9 +52,9 @@
|
|
||||||
|
|
||||||
ifeq ($(OS_ARCH), Linux)
|
|
||||||
ifeq ($(USE_64), 1)
|
|
||||||
-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib'
|
|
||||||
+#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib'
|
|
||||||
else
|
|
||||||
-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib'
|
|
||||||
+#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib'
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
4
nss-p11-kit.config
Normal file
4
nss-p11-kit.config
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
name=p11-kit-proxy
|
||||||
|
library=p11-kit-proxy.so
|
||||||
|
|
||||||
|
|
94
nss-signtool-format.patch
Normal file
94
nss-signtool-format.patch
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
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) {
|
||||||
|
- sprintf(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
|
||||||
|
@@ -132,17 +132,20 @@ rm_dash_r(char *path)
|
||||||
|
if (!dir) {
|
||||||
|
PR_fprintf(errorFD, "Error: Unable to open directory %s.\n", path);
|
||||||
|
errorCount++;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Recursively delete all entries in the directory */
|
||||||
|
while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
|
||||||
|
- sprintf(filename, "%s/%s", path, entry->name);
|
||||||
|
+ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name) >= sizeof(filename)) {
|
||||||
|
+ errorCount++;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
if (rm_dash_r(filename))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PR_CloseDir(dir) != PR_SUCCESS) {
|
||||||
|
PR_fprintf(errorFD, "Error: Could not close %s.\n", path);
|
||||||
|
errorCount++;
|
||||||
|
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,83 +0,0 @@
|
|||||||
Index: mozilla/security/nss/lib/pk11wrap/pk11auth.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvsroot/mozilla/security/nss/lib/pk11wrap/pk11auth.c,v
|
|
||||||
retrieving revision 1.5
|
|
||||||
diff -u -r1.5 pk11auth.c
|
|
||||||
--- mozilla/security/nss/lib/pk11wrap/pk11auth.c 29 Sep 2005 23:44:39 -0000 1.5
|
|
||||||
+++ mozilla/security/nss/lib/pk11wrap/pk11auth.c 12 Jan 2007 01:23:20 -0000
|
|
||||||
@@ -84,6 +84,8 @@
|
|
||||||
CK_RV crv;
|
|
||||||
SECStatus rv;
|
|
||||||
int64 currtime = PR_Now();
|
|
||||||
+ PRBool mustRetry;
|
|
||||||
+ int retry = 0;
|
|
||||||
|
|
||||||
if (slot->protectedAuthPath) {
|
|
||||||
len = 0;
|
|
||||||
@@ -95,27 +97,46 @@
|
|
||||||
len = PORT_Strlen(pw);
|
|
||||||
}
|
|
||||||
|
|
||||||
- PK11_EnterSlotMonitor(slot);
|
|
||||||
- crv = PK11_GETTAB(slot)->C_Login(slot->session,CKU_USER,
|
|
||||||
+ do {
|
|
||||||
+ PK11_EnterSlotMonitor(slot);
|
|
||||||
+ crv = PK11_GETTAB(slot)->C_Login(slot->session,CKU_USER,
|
|
||||||
(unsigned char *)pw,len);
|
|
||||||
- slot->lastLoginCheck = 0;
|
|
||||||
- PK11_ExitSlotMonitor(slot);
|
|
||||||
- switch (crv) {
|
|
||||||
- /* if we're already logged in, we're good to go */
|
|
||||||
- case CKR_OK:
|
|
||||||
- slot->authTransact = PK11_Global.transaction;
|
|
||||||
- case CKR_USER_ALREADY_LOGGED_IN:
|
|
||||||
- slot->authTime = currtime;
|
|
||||||
- rv = SECSuccess;
|
|
||||||
- break;
|
|
||||||
- case CKR_PIN_INCORRECT:
|
|
||||||
- PORT_SetError(SEC_ERROR_BAD_PASSWORD);
|
|
||||||
- rv = SECWouldBlock; /* everything else is ok, only the pin is bad */
|
|
||||||
- break;
|
|
||||||
- default:
|
|
||||||
- PORT_SetError(PK11_MapError(crv));
|
|
||||||
- rv = SECFailure; /* some failure we can't fix by retrying */
|
|
||||||
- }
|
|
||||||
+ slot->lastLoginCheck = 0;
|
|
||||||
+ mustRetry = PR_FALSE;
|
|
||||||
+ PK11_ExitSlotMonitor(slot);
|
|
||||||
+ switch (crv) {
|
|
||||||
+ /* if we're already logged in, we're good to go */
|
|
||||||
+ case CKR_OK:
|
|
||||||
+ slot->authTransact = PK11_Global.transaction;
|
|
||||||
+ case CKR_USER_ALREADY_LOGGED_IN:
|
|
||||||
+ slot->authTime = currtime;
|
|
||||||
+ rv = SECSuccess;
|
|
||||||
+ break;
|
|
||||||
+ case CKR_PIN_INCORRECT:
|
|
||||||
+ PORT_SetError(SEC_ERROR_BAD_PASSWORD);
|
|
||||||
+ rv = SECWouldBlock; /* everything else is ok, only the pin is bad */
|
|
||||||
+ break;
|
|
||||||
+ /* someone called reset while we fetched the password, try again once
|
|
||||||
+ * if the token is still there. */
|
|
||||||
+ case CKR_SESSION_HANDLE_INVALID:
|
|
||||||
+ case CKR_SESSION_CLOSED:
|
|
||||||
+ if (retry++ == 0) {
|
|
||||||
+ rv = PK11_InitToken(slot,PR_FALSE);
|
|
||||||
+ if (rv == SECSuccess) {
|
|
||||||
+ if (slot->session != CK_INVALID_SESSION) {
|
|
||||||
+ mustRetry = PR_TRUE;
|
|
||||||
+ } else {
|
|
||||||
+ PORT_SetError(PK11_MapError(crv));
|
|
||||||
+ rv = SECFailure;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ default:
|
|
||||||
+ PORT_SetError(PK11_MapError(crv));
|
|
||||||
+ rv = SECFailure; /* some failure we can't fix by retrying */
|
|
||||||
+ }
|
|
||||||
+ } while (mustRetry);
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
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}
|
@ -1,11 +0,0 @@
|
|||||||
--- ./mozilla/security/coreconf/config.mk.org 2007-05-25 01:53:04.000000000 +0200
|
|
||||||
+++ ./mozilla/security/coreconf/config.mk 2007-05-25 01:52:58.000000000 +0200
|
|
||||||
@@ -185,3 +185,8 @@
|
|
||||||
ifdef NSS_ALLOW_UNSUPPORTED_CRITICAL
|
|
||||||
DEFINES += -DNSS_ALLOW_UNSUPPORTED_CRITICAL
|
|
||||||
endif
|
|
||||||
+
|
|
||||||
+ifdef USE_NETSTAT_HACK
|
|
||||||
+DEFINES += -DSOLARIS
|
|
||||||
+INCLUDES += -I../fake
|
|
||||||
+endif
|
|
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}
|
@ -6,6 +6,6 @@ includedir=%includedir%
|
|||||||
Name: NSS
|
Name: NSS
|
||||||
Description: Network Security Services
|
Description: Network Security Services
|
||||||
Version: %NSS_VERSION%
|
Version: %NSS_VERSION%
|
||||||
Requires: nspr >= %NSPR_VERSION%
|
Requires: nspr >= %NSPR_VERSION%, nss-util >= %NSSUTIL_VERSION%
|
||||||
Libs: -lssl3 -lsmime3 -lnss3
|
Libs: -L${libdir} -lssl3 -lsmime3 -lnss3
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
56
pkcs11.txt.xml
Normal file
56
pkcs11.txt.xml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<?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="pkcs11.txt">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<date>&date;</date>
|
||||||
|
<title>Network Security Services</title>
|
||||||
|
<productname>nss</productname>
|
||||||
|
<productnumber>&version;</productnumber>
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>pkcs11.txt</refentrytitle>
|
||||||
|
<manvolnum>5</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>pkcs11.txt</refname>
|
||||||
|
<refpurpose>NSS PKCS #11 module configuration file</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsection id="description">
|
||||||
|
<title>Description</title>
|
||||||
|
<para>
|
||||||
|
The pkcs11.txt file is used to configure initialization parameters for the nss security module and optionally other pkcs #11 modules.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
For full documentation visit <ulink url="https://developer.mozilla.org/en-US/docs/PKCS11_Module_Specs">PKCS #11 Module Specs</ulink>.
|
||||||
|
</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Files</title>
|
||||||
|
<para><filename>/etc/pki/nssdb/pkcs11.txt</filename></para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection id="authors">
|
||||||
|
<title>Authors</title>
|
||||||
|
<para>The nss libraries 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>
|
||||||
|
|
63
secmod.db.xml
Normal file
63
secmod.db.xml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?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="secmod.db">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<date>&date;</date>
|
||||||
|
<title>Network Security Services</title>
|
||||||
|
<productname>nss</productname>
|
||||||
|
<productnumber>&version;</productnumber>
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>secmod.db</refentrytitle>
|
||||||
|
<manvolnum>5</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>secmod.db</refname>
|
||||||
|
<refpurpose>Legacy NSS security modules database</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsection id="description">
|
||||||
|
<title>Description</title>
|
||||||
|
<para><emphasis>secmod.db</emphasis> is an NSS security modules database.</para>
|
||||||
|
<para>The security modules database is used to keep track of the NSS security modules. The NSS security modules export their services via the PKCS #11 API which NSS uses as its Services Provider Interface.
|
||||||
|
</para>
|
||||||
|
<para>The command line utility <emphasis>modutil</emphasis> is used for managing PKCS #11 module information both within secmod.db files and within hardware tokens.
|
||||||
|
</para>
|
||||||
|
<para>For new applications the recommended way of tracking security modules is via the pkcs11.txt configuration file used in conjunction the new sqlite-based shared database format for certificate and key databases.
|
||||||
|
</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Files</title>
|
||||||
|
<para><filename>/etc/pki/nssdb/secmod.db</filename></para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>See also</title>
|
||||||
|
<para>modutil(1), cert8.db(5), cert9.db(5), key3.db(5), key4.db(5), pkcs11.txt(5)</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection id="authors">
|
||||||
|
<title>Authors</title>
|
||||||
|
<para>The nss libraries 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>
|
68
setup-nsssysinit.sh
Executable file
68
setup-nsssysinit.sh
Executable file
@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Turns on or off the nss-sysinit module db by editing the
|
||||||
|
# global PKCS #11 congiguration file. Displays the status.
|
||||||
|
#
|
||||||
|
# This script can be invoked by the user as super user.
|
||||||
|
# It is invoked at nss-sysinit post install time with argument on.
|
||||||
|
#
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
Usage: setup-nsssysinit [on|off]
|
||||||
|
on - turns on nsssysinit
|
||||||
|
off - turns off nsssysinit
|
||||||
|
status - reports whether nsssysinit is turned on or off
|
||||||
|
EOF
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
|
# validate
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
usage 1 1>&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# the system-wide configuration file
|
||||||
|
p11conf="/etc/pki/nssdb/pkcs11.txt"
|
||||||
|
# must exist, otherwise report it and exit with failure
|
||||||
|
if [ ! -f $p11conf ]; then
|
||||||
|
echo "Could not find ${p11conf}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check if nsssysinit is currently enabled or disabled
|
||||||
|
sysinit_enabled()
|
||||||
|
{
|
||||||
|
grep -q '^library=libnsssysinit' ${p11conf}
|
||||||
|
}
|
||||||
|
|
||||||
|
umask 022
|
||||||
|
case "$1" in
|
||||||
|
on | ON )
|
||||||
|
if sysinit_enabled; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
cat ${p11conf} | \
|
||||||
|
sed -e 's/^library=$/library=libnsssysinit.so/' \
|
||||||
|
-e '/^NSS/s/\(Flags=internal\)\(,[^m]\)/\1,moduleDBOnly\2/' > \
|
||||||
|
${p11conf}.on
|
||||||
|
mv ${p11conf}.on ${p11conf}
|
||||||
|
;;
|
||||||
|
off | OFF )
|
||||||
|
if ! sysinit_enabled; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
cat ${p11conf} | \
|
||||||
|
sed -e 's/^library=libnsssysinit.so/library=/' \
|
||||||
|
-e '/^NSS/s/Flags=internal,moduleDBOnly/Flags=internal/' > \
|
||||||
|
${p11conf}.off
|
||||||
|
mv ${p11conf}.off ${p11conf}
|
||||||
|
;;
|
||||||
|
status )
|
||||||
|
echo -n 'NSS sysinit is '
|
||||||
|
sysinit_enabled && echo 'enabled' || echo 'disabled'
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
usage 1 1>&2
|
||||||
|
;;
|
||||||
|
esac
|
106
setup-nsssysinit.xml
Normal file
106
setup-nsssysinit.xml
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<?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="setup-nsssysinit">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<date>&date;</date>
|
||||||
|
<title>Network Security Services</title>
|
||||||
|
<productname>nss</productname>
|
||||||
|
<productnumber>&version;</productnumber>
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>setup-nsssysinit</refentrytitle>
|
||||||
|
<manvolnum>1</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>setup-nsssysinit</refname>
|
||||||
|
<refpurpose>Query or enable the nss-sysinit module</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsynopsisdiv>
|
||||||
|
<cmdsynopsis>
|
||||||
|
<command>setup-nsssysinit</command>
|
||||||
|
<arg><option>on</option></arg>
|
||||||
|
<arg><option>off</option></arg>
|
||||||
|
<arg><option>status</option></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
<refsection id="description">
|
||||||
|
<title>Description</title>
|
||||||
|
<para><command>setup-nsssysinit</command> is a shell script to query the status of the nss-sysinit module and when run with root priviledge it can enable or disable it. </para>
|
||||||
|
<para>Turns on or off the nss-sysinit module db by editing the global PKCS #11 configuration file. Displays the status. This script can be invoked by the user as super user. It is invoked at nss-sysinit post install time with argument on.
|
||||||
|
</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Options</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>on</option></term>
|
||||||
|
<listitem><simpara>Turn on nss-sysinit.</simpara></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>off</option></term>
|
||||||
|
<listitem><simpara>Turn on nss-sysinit.</simpara></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>status</option></term>
|
||||||
|
<listitem><simpara>returns whether nss-syinit is enabled or not.</simpara></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
</variablelist>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
|
<para>The following example will query for the status of nss-sysinit:
|
||||||
|
<programlisting>
|
||||||
|
/usr/bin/setup-nsssysinit status
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>The following example, when run as superuser, will turn on nss-sysinit:
|
||||||
|
<programlisting>
|
||||||
|
/usr/bin/setup-nsssysinit on
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Files</title>
|
||||||
|
<para><filename>/usr/bin/setup-nsssysinit</filename></para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>See also</title>
|
||||||
|
<para>pkg-config(1)</para>
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection id="authors">
|
||||||
|
<title>Authors</title>
|
||||||
|
<para>The nss libraries 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>
|
||||||
|
|
10
sources
10
sources
@ -1,4 +1,6 @@
|
|||||||
68c5e1bd8ba091e5a50babcd9e552bc5 nss-3.11.5-fbst-stripped.tar.gz
|
SHA512 (blank-cert8.db) = ac131d15708c5f1b5e467831f919f4fc4ba13b60a4bb5fe260c845fa9afcd899a588d21ed52060abaa1bbb29f2b53af8b495d28407183cb03aff1974f95f1d3d
|
||||||
c1053d1e001a5b1eb4b7c296a968ca5c nss-3.11.7-no-fbst-with-ckbi-1.64.tar.gz
|
SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06
|
||||||
baa96599af6f0a2b656479d8e4efd58f nss-3.12-alpha-ckfw.tar.gz
|
SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c
|
||||||
84bad7e42304a6d4fdf2b83f5295b938 nss-3.12-alpha-pem.tar.gz
|
SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7
|
||||||
|
SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310
|
||||||
|
SHA512 (nss-3.52.tar.gz) = a45baf38717bceda03c292b2c01def680a24a846327e17d36044a85e30ed40c68220c78c0a2c3025c11778ee58f5d5eb0fff1b4cd274b95c408fb59e394e62c6
|
||||||
|
5
system-pkcs11.txt
Normal file
5
system-pkcs11.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
library=libnsssysinit.so
|
||||||
|
name=NSS Internal PKCS #11 Module
|
||||||
|
parameters=configdir='sql:/etc/pki/nssdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
|
||||||
|
NSS=Flags=internal,moduleDBOnly,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
|
||||||
|
|
64
tests/NSS-tools-should-not-use-SHA1-by-default-when/Makefile
Normal file
64
tests/NSS-tools-should-not-use-SHA1-by-default-when/Makefile
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /CoreOS/nss/Regression/NSS-tools-should-not-use-SHA1-by-default-when
|
||||||
|
# Description: NSS tools should not use SHA1 by default when
|
||||||
|
# Author: Hubert Kario <hkario@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/CoreOS/nss/Regression/NSS-tools-should-not-use-SHA1-by-default-when
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Hubert Kario <hkario@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: NSS tools should not use SHA1 by default when" >> $(METADATA)
|
||||||
|
@echo "Type: Regression" >> $(METADATA)
|
||||||
|
@echo "TestTime: 10m" >> $(METADATA)
|
||||||
|
@echo "RunFor: nss openssl" >> $(METADATA)
|
||||||
|
@echo "Requires: nss nss-tools openssl" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
@ -0,0 +1,4 @@
|
|||||||
|
PURPOSE of NSS-tools-should-not-use-SHA1-by-default-when
|
||||||
|
Description: NSS tools should not use SHA1 by default when
|
||||||
|
Author: Hubert Kario <hkario@redhat.com>
|
||||||
|
Summary: NSS tools should not use SHA1 by default when generating digital signatures/certificates
|
125
tests/NSS-tools-should-not-use-SHA1-by-default-when/runtest.sh
Executable file
125
tests/NSS-tools-should-not-use-SHA1-by-default-when/runtest.sh
Executable file
@ -0,0 +1,125 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of NSS-tools-should-not-use-SHA1-by-default-when
|
||||||
|
# Description: NSS tools should not use SHA1 by default when
|
||||||
|
# Author: Hubert Kario <hkario@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
PACKAGE="nss"
|
||||||
|
PACKAGES="nss openssl"
|
||||||
|
DBDIR="nssdb"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlAssertRpm --all
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlRun "mkdir nssdb"
|
||||||
|
rlRun "certutil -N -d $DBDIR --empty-password"
|
||||||
|
rlLogInfo "Create a JAR file"
|
||||||
|
rlRun "mkdir java-dir"
|
||||||
|
rlRun "pushd java-dir"
|
||||||
|
rlRun "mkdir META-INF mypackage"
|
||||||
|
rlRun "echo 'Main-Class: mypackage/MyMainFile' > META-INF/MANIFEST.MF"
|
||||||
|
rlRun "echo 'Those are not the droids you are looking for' > mypackage/MyMainFile.class"
|
||||||
|
#rlRun "jar -cfe package.jar mypackage/MyMainFile mypackage/MyMainFile.class"
|
||||||
|
rlRun "popd"
|
||||||
|
#rlRun "mv java-dir/package.jar ."
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Self signing certificates"
|
||||||
|
rlRun "dd if=/dev/urandom of=noise bs=1 count=32 >/dev/null"
|
||||||
|
rlRun "certutil -d $DBDIR -S -n 'CA' -t 'cTC,cTC,cTC' -s 'CN=CA' -x -z noise"
|
||||||
|
rlRun -s "certutil -d $DBDIR -L -n 'CA' -a | openssl x509 -noout -text"
|
||||||
|
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
|
||||||
|
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Signing certificates"
|
||||||
|
rlRun "dd if=/dev/urandom of=noise bs=1 count=32 >/dev/null"
|
||||||
|
rlRun "certutil -d $DBDIR -S -n 'server' -t 'u,u,u' -s 'CN=server.example.com' -c 'CA' -z noise --nsCertType sslClient,sslServer,objectSigning,smime"
|
||||||
|
rlRun -s "certutil -d $DBDIR -L -n 'server' -a | openssl x509 -noout -text"
|
||||||
|
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
|
||||||
|
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Certificate request"
|
||||||
|
rlRun "dd if=/dev/urandom of=noise bs=1 count=32 >/dev/null"
|
||||||
|
rlRun "mkdir srv2db"
|
||||||
|
rlRun "certutil -d srv2db -N --empty-password"
|
||||||
|
rlRun "certutil -d srv2db -R -s CN=www.example.com -o srv2.req -a -z noise"
|
||||||
|
rlRun -s "openssl req -noout -text -in srv2.req"
|
||||||
|
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
|
||||||
|
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
|
||||||
|
rlRun "certutil -d $DBDIR -C -c 'CA' -i srv2.req -a -o srv2.crt"
|
||||||
|
rlRun -s "openssl x509 -in srv2.crt -noout -text"
|
||||||
|
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
|
||||||
|
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
|
||||||
|
rlRun "rm -rf srv2db"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Certificate request with SHA1"
|
||||||
|
rlRun "dd if=/dev/urandom of=noise bs=1 count=32 >/dev/null"
|
||||||
|
rlRun "mkdir srv2db"
|
||||||
|
rlRun "certutil -d srv2db -N --empty-password"
|
||||||
|
rlRun "certutil -d srv2db -R -s CN=www.example.com -o srv2.req -a -z noise -Z SHA1"
|
||||||
|
rlRun -s "openssl req -noout -text -in srv2.req"
|
||||||
|
rlAssertGrep "Signature Algorithm: sha1WithRSAEncryption" "$rlRun_LOG"
|
||||||
|
rlRun "certutil -d $DBDIR -C -c 'CA' -i srv2.req -a -o srv2.crt"
|
||||||
|
rlRun -s "openssl x509 -in srv2.crt -noout -text"
|
||||||
|
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
|
||||||
|
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
|
||||||
|
rlRun "rm -rf srv2db"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Signing CMS messages"
|
||||||
|
rlRun "echo 'This is a document' > document.txt"
|
||||||
|
rlRun "cmsutil -S -d $DBDIR -N 'server' -i document.txt -o document.cms"
|
||||||
|
rlRun -s "openssl cms -in document.cms -inform der -noout -cmsout -print"
|
||||||
|
rlAssertGrep "algorithm: sha256" $rlRun_LOG
|
||||||
|
rlAssertNotGrep "algorithm: sha1" $rlRun_LOG
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "CRL signing"
|
||||||
|
rlRun "echo $(date --utc +update=%Y%m%d%H%M%SZ) > script"
|
||||||
|
rlRun "echo $(date -d 'next week' --utc +nextupdate=%Y%m%d%H%M%SZ) >> script"
|
||||||
|
rlRun "echo addext crlNumber 0 1245 >>script"
|
||||||
|
rlRun "echo addcert 12 $(date -d 'yesterday' --utc +%Y%m%d%H%M%SZ) >>script"
|
||||||
|
rlRun "echo addext reasonCode 0 0 >>script"
|
||||||
|
rlRun "cat script"
|
||||||
|
rlRun "crlutil -G -c script -d $DBDIR -n CA -o ca.crl"
|
||||||
|
rlRun -s "openssl crl -in ca.crl -inform der -noout -text"
|
||||||
|
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" $rlRun_LOG
|
||||||
|
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
12
tests/tests.yml
Normal file
12
tests/tests.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
# This first play always runs on the local staging system
|
||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-beakerlib
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
tests:
|
||||||
|
- NSS-tools-should-not-use-SHA1-by-default-when
|
||||||
|
required_packages:
|
||||||
|
- nss-tools
|
||||||
|
- nss
|
Loading…
Reference in New Issue
Block a user