Compare commits
602 Commits
BEN_FIPS_T
...
OpenSSL_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a40916cbba | ||
|
|
62ecdf077f | ||
|
|
5905787c6d | ||
|
|
9f03d028e7 | ||
|
|
10f8acdf4c | ||
|
|
cd029eb6f0 | ||
|
|
f6fefec921 | ||
|
|
ec5a7681fe | ||
|
|
a21ce67a63 | ||
|
|
e2f0d879b1 | ||
|
|
017f35edba | ||
|
|
a0434788ce | ||
|
|
b269af6829 | ||
|
|
9273be0795 | ||
|
|
6c8a3344b6 | ||
|
|
e80f233749 | ||
|
|
6835cdf3b4 | ||
|
|
c0c943e82b | ||
|
|
bb67f28a1e | ||
|
|
08f7417a98 | ||
|
|
84c881d0b5 | ||
|
|
f25209267f | ||
|
|
07cc19fcac | ||
|
|
34aca2b6b6 | ||
|
|
67dbe90856 | ||
|
|
4a29c4e39f | ||
|
|
0902926150 | ||
|
|
15d95d5f92 | ||
|
|
0116eae43e | ||
|
|
d01f1d89e3 | ||
|
|
722a5c5ade | ||
|
|
2788e3983e | ||
|
|
5ba3ebb593 | ||
|
|
2b19ce86dc | ||
|
|
140e5c3f3b | ||
|
|
77bc62c3a7 | ||
|
|
42f335ca0e | ||
|
|
43b30bf2c8 | ||
|
|
06e12403e0 | ||
|
|
03b3a0d022 | ||
|
|
f840728f43 | ||
|
|
30fc34625c | ||
|
|
18f3210a35 | ||
|
|
82da9623bf | ||
|
|
7c0341dbc4 | ||
|
|
7450139b8b | ||
|
|
e85e5ca5ec | ||
|
|
67cdaca99d | ||
|
|
b00f715c96 | ||
|
|
098927c384 | ||
|
|
0eb8e0058c | ||
|
|
56c55b0655 | ||
|
|
e17d60d5fb | ||
|
|
e32b08abc3 | ||
|
|
2776beb91a | ||
|
|
dca20343e0 | ||
|
|
e99f6700e1 | ||
|
|
3da3c85a3f | ||
|
|
d58d546e2d | ||
|
|
780b97aba6 | ||
|
|
e0ec2d772c | ||
|
|
5fbf6769fc | ||
|
|
7bf79446c8 | ||
|
|
bdee60fc1a | ||
|
|
0b62d2f4c9 | ||
|
|
4375ca95a4 | ||
|
|
acce7b5963 | ||
|
|
c5098ee16f | ||
|
|
6d0e43d555 | ||
|
|
9f32d49de9 | ||
|
|
db84c9075b | ||
|
|
e96fad9d2d | ||
|
|
0c7b06714e | ||
|
|
d893001918 | ||
|
|
b8bd781b7e | ||
|
|
bb792a485a | ||
|
|
452421d059 | ||
|
|
ea8399724e | ||
|
|
26655341fc | ||
|
|
5858d32a59 | ||
|
|
0dfe532ea9 | ||
|
|
5c567ffd4c | ||
|
|
3bc1781994 | ||
|
|
485bcc9cab | ||
|
|
bb1bbb3274 | ||
|
|
4bd7bc97e8 | ||
|
|
4d4339922c | ||
|
|
c3d03b70af | ||
|
|
e4c2c550b9 | ||
|
|
570357b7a8 | ||
|
|
7044d328a2 | ||
|
|
35d7cc8166 | ||
|
|
80790d89ec | ||
|
|
7bad200b49 | ||
|
|
6b6f64da2d | ||
|
|
31def5ae59 | ||
|
|
713407a5c7 | ||
|
|
db73333585 | ||
|
|
84c9b6edb1 | ||
|
|
e609c04994 | ||
|
|
53cfa36d37 | ||
|
|
b10bd63df3 | ||
|
|
44a287747f | ||
|
|
20a413620c | ||
|
|
e99b588f1b | ||
|
|
48a3f2818e | ||
|
|
fc0e014ca3 | ||
|
|
8baaeba881 | ||
|
|
150ebacd8a | ||
|
|
bedcd5c0bb | ||
|
|
fd86c390eb | ||
|
|
63453c025f | ||
|
|
ecb1445ce2 | ||
|
|
64c32bf9eb | ||
|
|
775e82c58d | ||
|
|
db5cbd8954 | ||
|
|
c6012b252d | ||
|
|
e1ff593dcb | ||
|
|
c4d9c13a31 | ||
|
|
00c1c6cb28 | ||
|
|
973fbfe3a3 | ||
|
|
9fc1d3f4c4 | ||
|
|
765863f0bf | ||
|
|
cbd72088ec | ||
|
|
8aabdf3505 | ||
|
|
fcec494072 | ||
|
|
88f62fb98a | ||
|
|
69488fa929 | ||
|
|
b0367dde56 | ||
|
|
ad93095f16 | ||
|
|
82b47955fc | ||
|
|
95477d36f6 | ||
|
|
eb798944b3 | ||
|
|
b1ca6f2f3d | ||
|
|
102e6481ae | ||
|
|
97949ccfc8 | ||
|
|
44e9bc81eb | ||
|
|
4b27a9feb3 | ||
|
|
0649b6f0f2 | ||
|
|
389ff2e01f | ||
|
|
8cf1846857 | ||
|
|
2dab26339d | ||
|
|
239e31f896 | ||
|
|
4bf3222d96 | ||
|
|
3380c4561e | ||
|
|
3f2f0c8892 | ||
|
|
0ee883650d | ||
|
|
70cf309517 | ||
|
|
8b5bf52ac2 | ||
|
|
73a9485081 | ||
|
|
d37a65bc81 | ||
|
|
9dc4f157bc | ||
|
|
34c7ff6dc9 | ||
|
|
647907918d | ||
|
|
cee73df3bd | ||
|
|
07481951f9 | ||
|
|
f15c448a72 | ||
|
|
fcb41c0ee8 | ||
|
|
8513320593 | ||
|
|
9b62318311 | ||
|
|
c1efb6705f | ||
|
|
5f1841cdca | ||
|
|
4b45051902 | ||
|
|
f07320eae0 | ||
|
|
9e5790ce21 | ||
|
|
a0724cb261 | ||
|
|
cdbba1067f | ||
|
|
d837ca70f7 | ||
|
|
fb64e17555 | ||
|
|
e8f245d243 | ||
|
|
fce8c6cc53 | ||
|
|
0ff469d38d | ||
|
|
73f3c281ff | ||
|
|
05338b58ce | ||
|
|
081057c3ff | ||
|
|
94c1672ef0 | ||
|
|
405d9761a5 | ||
|
|
4c3a2d64e4 | ||
|
|
6a62b2e54b | ||
|
|
98a2fd32a0 | ||
|
|
7bdeeb64ac | ||
|
|
43b45a42fd | ||
|
|
9af1bfb3d5 | ||
|
|
aed14edd12 | ||
|
|
14a948e6ad | ||
|
|
af2fcf3a65 | ||
|
|
4a676ac4f8 | ||
|
|
37e27219f2 | ||
|
|
d2284ab5d1 | ||
|
|
78e91e7574 | ||
|
|
c1668fe59d | ||
|
|
e1cc0671ac | ||
|
|
c1a8a5de13 | ||
|
|
e3d0e0a792 | ||
|
|
7c7667b86b | ||
|
|
38be5db93b | ||
|
|
6a50d0a422 | ||
|
|
7ab2d30349 | ||
|
|
d753c3f582 | ||
|
|
1897c89302 | ||
|
|
9aa260ab57 | ||
|
|
c7e7d382d5 | ||
|
|
3cc54008eb | ||
|
|
ff8bcccdd4 | ||
|
|
81170986ed | ||
|
|
a93b01be57 | ||
|
|
04b304d346 | ||
|
|
6c61726b2a | ||
|
|
cd202fe2f9 | ||
|
|
69af4faec1 | ||
|
|
4b21c202ff | ||
|
|
df9e0bf507 | ||
|
|
879b19801a | ||
|
|
6ec8e63af6 | ||
|
|
465b9f6b26 | ||
|
|
0c9c87a76e | ||
|
|
a7a90b2f00 | ||
|
|
4d6e7733fa | ||
|
|
2deadf1672 | ||
|
|
9ea862e0b3 | ||
|
|
11c9b7cfeb | ||
|
|
b08868c48a | ||
|
|
9ca46ff609 | ||
|
|
800e400de5 | ||
|
|
05886a6f77 | ||
|
|
667aef4c6a | ||
|
|
49e179cc52 | ||
|
|
aa4ce7315f | ||
|
|
c741b83762 | ||
|
|
64387788a9 | ||
|
|
480506bd49 | ||
|
|
0d5ea7613e | ||
|
|
beb056b303 | ||
|
|
4e321ffaff | ||
|
|
6ededa42db | ||
|
|
36d16f8ee0 | ||
|
|
ab781a0cb6 | ||
|
|
19c2987eb6 | ||
|
|
b09af97686 | ||
|
|
a7b1c7732f | ||
|
|
abc64463af | ||
|
|
2e7245f5a3 | ||
|
|
f76b062e16 | ||
|
|
cc1717eaa4 | ||
|
|
c5156d952e | ||
|
|
0b2d0d7d13 | ||
|
|
b732a8cf5f | ||
|
|
a7dc451ebe | ||
|
|
1e764f463e | ||
|
|
87357fc0b8 | ||
|
|
a2c96d888d | ||
|
|
a7a0af0ca4 | ||
|
|
9a6c6b99bf | ||
|
|
033c79dff1 | ||
|
|
b362536275 | ||
|
|
aa16a28631 | ||
|
|
2757c67da2 | ||
|
|
148111ff0a | ||
|
|
3d5fd31280 | ||
|
|
c7199e62f1 | ||
|
|
0b3fc6e63b | ||
|
|
c2db9cfb52 | ||
|
|
6bc8e6b898 | ||
|
|
6eb4958989 | ||
|
|
9edf4e8157 | ||
|
|
b07a7b5daa | ||
|
|
965a1cb92e | ||
|
|
e9ad6665a5 | ||
|
|
b5855b2f32 | ||
|
|
a0bee97e55 | ||
|
|
e7076c5a80 | ||
|
|
ff22e913a3 | ||
|
|
132f25950b | ||
|
|
4ed56cba63 | ||
|
|
145878ca29 | ||
|
|
a36c30136e | ||
|
|
04d0d0accf | ||
|
|
92ad8e5c37 | ||
|
|
00df894701 | ||
|
|
630e4a6e59 | ||
|
|
bf2336f478 | ||
|
|
4f6c2bacb1 | ||
|
|
384dba6edb | ||
|
|
2c45bf2bc9 | ||
|
|
836ec0c764 | ||
|
|
5e72fb063a | ||
|
|
d9536ccffa | ||
|
|
37ce8cffcc | ||
|
|
2dc08d5f5d | ||
|
|
00b8abee61 | ||
|
|
7efebab9fd | ||
|
|
a74286d636 | ||
|
|
254cfe878e | ||
|
|
ed824195a1 | ||
|
|
22c3600e4c | ||
|
|
49f386578e | ||
|
|
7c671508bd | ||
|
|
76693ca0a3 | ||
|
|
d3fdc27aa8 | ||
|
|
4182f0ffc7 | ||
|
|
40e950aed6 | ||
|
|
0ef4ec4fd4 | ||
|
|
f868b61376 | ||
|
|
987bebaf8c | ||
|
|
65f0efe198 | ||
|
|
e77d8f2ecd | ||
|
|
f68854b4c3 | ||
|
|
c61a8ad5b0 | ||
|
|
89234b1eed | ||
|
|
2ec5ebb979 | ||
|
|
863a155451 | ||
|
|
1ddce0bebf | ||
|
|
4347c0a76d | ||
|
|
f1429a972f | ||
|
|
45bc841b22 | ||
|
|
7a111bc864 | ||
|
|
1cfd258ed6 | ||
|
|
04d7d51ea2 | ||
|
|
48d0ba4a1e | ||
|
|
0e23faec0a | ||
|
|
7590f37fd7 | ||
|
|
2906dc8601 | ||
|
|
c8d5c71af5 | ||
|
|
ff990440ee | ||
|
|
0e304b7f41 | ||
|
|
f97b4a776e | ||
|
|
b99daf76a7 | ||
|
|
8fc6cb77c5 | ||
|
|
fbe6ba81e9 | ||
|
|
b219bb8f62 | ||
|
|
2b85e23d2e | ||
|
|
026bb0b96a | ||
|
|
6424498226 | ||
|
|
0b418c7d51 | ||
|
|
13051e9316 | ||
|
|
0174c56851 | ||
|
|
3ed449e94a | ||
|
|
4f1c33b430 | ||
|
|
1334462ab3 | ||
|
|
a34f2d42b4 | ||
|
|
5dc4923359 | ||
|
|
e62991a07c | ||
|
|
52272327f3 | ||
|
|
5820d87a5f | ||
|
|
1bf955920a | ||
|
|
89b1fd98ac | ||
|
|
51d28013db | ||
|
|
ee2bf876c2 | ||
|
|
8861ba355d | ||
|
|
e44f62c2b1 | ||
|
|
9e88c82703 | ||
|
|
9d2f51c086 | ||
|
|
ad0db060b1 | ||
|
|
3547478fc8 | ||
|
|
29dc350813 | ||
|
|
342b7e0458 | ||
|
|
bc3cae7e7d | ||
|
|
96534114a3 | ||
|
|
4ecd7d2b7e | ||
|
|
9d728b8d10 | ||
|
|
37942fab51 | ||
|
|
d060fc9ff2 | ||
|
|
22e5a7935f | ||
|
|
01671ab2df | ||
|
|
36521f0150 | ||
|
|
93aeac64ce | ||
|
|
9addd9b6fb | ||
|
|
0231911dec | ||
|
|
4bb61becbb | ||
|
|
b392e52050 | ||
|
|
0858b71b41 | ||
|
|
657129f748 | ||
|
|
c710c7b3a3 | ||
|
|
ff731ae3db | ||
|
|
d9bfe4f97c | ||
|
|
dc0ed30cfe | ||
|
|
e248596bac | ||
|
|
6049399baf | ||
|
|
f763e0b5ae | ||
|
|
eb3eab20a8 | ||
|
|
6d69d74bb8 | ||
|
|
4848cbf1cf | ||
|
|
9f2027e56d | ||
|
|
4d2b407ba2 | ||
|
|
e1d51de41f | ||
|
|
81ee80ab88 | ||
|
|
7d727231b7 | ||
|
|
69740c2b3f | ||
|
|
119d1a1dd4 | ||
|
|
afe01cd3f6 | ||
|
|
70f34a5841 | ||
|
|
c2e40d0f9a | ||
|
|
0abfd60604 | ||
|
|
e5dbccc182 | ||
|
|
f8fa22d826 | ||
|
|
c393222280 | ||
|
|
631bae4723 | ||
|
|
f6bfb559f7 | ||
|
|
60fd574cdf | ||
|
|
73705abc34 | ||
|
|
12bdb64375 | ||
|
|
7bdf8eed69 | ||
|
|
bbc0ac37b0 | ||
|
|
48c832b6b7 | ||
|
|
8298632d14 | ||
|
|
f3e427f6f9 | ||
|
|
62a25c6129 | ||
|
|
8bb826ee53 | ||
|
|
ce53d920fb | ||
|
|
884b3fc23c | ||
|
|
5d1430f390 | ||
|
|
45d10efc35 | ||
|
|
db3cb0e97a | ||
|
|
41a15c4f0f | ||
|
|
fea4280a8b | ||
|
|
e852b8533f | ||
|
|
20a3439ea9 | ||
|
|
a273a2824c | ||
|
|
24c97c819d | ||
|
|
42ba5d2329 | ||
|
|
c3e6402857 | ||
|
|
0821bcd4de | ||
|
|
c3e28480d7 | ||
|
|
4a6a2032ed | ||
|
|
e72b9658f8 | ||
|
|
c01d2b974e | ||
|
|
8c04994bfe | ||
|
|
989c0f8215 | ||
|
|
b0ef321cc8 | ||
|
|
7a8c728860 | ||
|
|
4cf8f9369c | ||
|
|
6141b86a49 | ||
|
|
2950db5995 | ||
|
|
801fea5f11 | ||
|
|
da26bcb5de | ||
|
|
23fadaa084 | ||
|
|
d99382039c | ||
|
|
9c29e781a8 | ||
|
|
93acf33440 | ||
|
|
5c1fd5e316 | ||
|
|
f42a82777d | ||
|
|
0c7ceb3748 | ||
|
|
e27a259696 | ||
|
|
41e455bfc4 | ||
|
|
e54e4bcf1f | ||
|
|
fe8b77753c | ||
|
|
d5c2bc4bff | ||
|
|
59b6836ab2 | ||
|
|
61823b6a74 | ||
|
|
9fc9b55237 | ||
|
|
ab0def8152 | ||
|
|
689c6f2542 | ||
|
|
f4bfd357e5 | ||
|
|
6d2a7098d6 | ||
|
|
130db968b8 | ||
|
|
8d274837e5 | ||
|
|
5855038049 | ||
|
|
b43b9de9e4 | ||
|
|
d18685d959 | ||
|
|
9f6715d4bb | ||
|
|
ab185b6038 | ||
|
|
6286bbecef | ||
|
|
1642000707 | ||
|
|
9d14506f29 | ||
|
|
7ec40a480b | ||
|
|
aa0d4ed5fa | ||
|
|
2cf68c0b1a | ||
|
|
f7f2125522 | ||
|
|
2b61034b0b | ||
|
|
97d49cdd6f | ||
|
|
80c808b90b | ||
|
|
af1048c25c | ||
|
|
ecc5ef8793 | ||
|
|
c9a112f540 | ||
|
|
5286db697f | ||
|
|
126179aad0 | ||
|
|
f69a8aebab | ||
|
|
e22e6bf0be | ||
|
|
2ecf923286 | ||
|
|
9d10b15ef9 | ||
|
|
da30c74a27 | ||
|
|
67ea999d4a | ||
|
|
e1892f2370 | ||
|
|
fe28866d71 | ||
|
|
b7fd453675 | ||
|
|
de4ab1e629 | ||
|
|
216ddfaf6b | ||
|
|
086dd3032f | ||
|
|
20e5177105 | ||
|
|
8aa36bcac9 | ||
|
|
bb987c73a9 | ||
|
|
485e30dbe1 | ||
|
|
515ac3debb | ||
|
|
877dbcb8a0 | ||
|
|
43509de33d | ||
|
|
62d27939c2 | ||
|
|
dbaa6f91aa | ||
|
|
01b62dca25 | ||
|
|
66d68327cb | ||
|
|
ecc3d2734d | ||
|
|
11536fbac8 | ||
|
|
7cfcca8ba3 | ||
|
|
8c3c570134 | ||
|
|
0cae19f5ef | ||
|
|
97a1630e81 | ||
|
|
6be00c7e16 | ||
|
|
bf746f0f46 | ||
|
|
532d936be8 | ||
|
|
a229e3038e | ||
|
|
d88edf1447 | ||
|
|
4aca9297dc | ||
|
|
f60fc19a69 | ||
|
|
d0edffc7da | ||
|
|
b2c5960935 | ||
|
|
12dfa84310 | ||
|
|
fbdce13e5a | ||
|
|
e532a6c449 | ||
|
|
14bcdb087f | ||
|
|
b7efa56a4a | ||
|
|
8359421d90 | ||
|
|
efde5230f1 | ||
|
|
f5ffad9d1d | ||
|
|
57a68b2129 | ||
|
|
bac252a5e3 | ||
|
|
a963395a7b | ||
|
|
d8863f0bdb | ||
|
|
addb6e16a8 | ||
|
|
4d27c4c960 | ||
|
|
ed65fab910 | ||
|
|
90cc40911b | ||
|
|
134d6a44ec | ||
|
|
a7201e9a1b | ||
|
|
420eb6a306 | ||
|
|
fcd5cca418 | ||
|
|
9222bc6b4e | ||
|
|
e9ddd85965 | ||
|
|
ea28f93c2d | ||
|
|
adeb20b6b7 | ||
|
|
086b64d0d3 | ||
|
|
e6d27baf52 | ||
|
|
e7e1150706 | ||
|
|
5d727078ac | ||
|
|
108159ffcc | ||
|
|
c4d423511a | ||
|
|
b15a93a9c5 | ||
|
|
47c88d7413 | ||
|
|
630b9d70fb | ||
|
|
c4929fb841 | ||
|
|
97c2c819b3 | ||
|
|
954f3c3126 | ||
|
|
d9248e5780 | ||
|
|
0b52f89b81 | ||
|
|
528584c595 | ||
|
|
5cdf5e3308 | ||
|
|
7de4b5b060 | ||
|
|
02a00bb054 | ||
|
|
b58560b915 | ||
|
|
76d088046c | ||
|
|
83f69163fd | ||
|
|
3b4de6e4cc | ||
|
|
bdbc9b4d1a | ||
|
|
5ca3a0aa86 | ||
|
|
702be727c0 | ||
|
|
09ef94d2c9 | ||
|
|
8336cec34d | ||
|
|
3ffb8d42bc | ||
|
|
1c8415fdf3 | ||
|
|
25866e3982 | ||
|
|
3b3df98ca6 | ||
|
|
2e4a99f38b | ||
|
|
e90faddaf8 | ||
|
|
370d418a7b | ||
|
|
f1ce306f30 | ||
|
|
37b11ca78e | ||
|
|
a17af9e277 | ||
|
|
6951c23afd | ||
|
|
4aaa4f267d | ||
|
|
de421076a5 | ||
|
|
f709ffe832 | ||
|
|
bd16cd6bcc | ||
|
|
0c51600203 | ||
|
|
9e34e806a2 | ||
|
|
2d16a957e0 | ||
|
|
9850f7f6b2 | ||
|
|
131e064e4a | ||
|
|
556b8f3f77 | ||
|
|
045d3285e2 | ||
|
|
d1df5b4339 | ||
|
|
25558bf743 | ||
|
|
713147109c | ||
|
|
76ef6ac956 | ||
|
|
a842df6659 | ||
|
|
c05a7f5dfd | ||
|
|
627bd6709c | ||
|
|
fbf218b8c3 | ||
|
|
3c97bd833b | ||
|
|
abbc186bd2 | ||
|
|
de6859e442 | ||
|
|
5e8904f289 | ||
|
|
0c0788ba0a | ||
|
|
905fd45b36 | ||
|
|
c162b132eb |
@@ -15,3 +15,6 @@ cctest.a
|
||||
libcrypto.so.*
|
||||
libssl.so.*
|
||||
libcrypto.sha1
|
||||
libcrypto.a.sha1
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
115
CHANGES
115
CHANGES
@@ -2,7 +2,120 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.7e and 0.9.7f [XX xxx XXXX]
|
||||
Changes between 0.9.7g and 0.9.7h [11 Oct 2005]
|
||||
|
||||
*) Remove the functionality of SSL_OP_MSIE_SSLV2_RSA_PADDING
|
||||
(part of SSL_OP_ALL). This option used to disable the
|
||||
countermeasure against man-in-the-middle protocol-version
|
||||
rollback in the SSL 2.0 server implementation, which is a bad
|
||||
idea. (CAN-2005-2969)
|
||||
|
||||
[Bodo Moeller; problem pointed out by Yutaka Oiwa (Research Center
|
||||
for Information Security, National Institute of Advanced Industrial
|
||||
Science and Technology [AIST], Japan)]
|
||||
|
||||
*) Minimal support for X9.31 signatures and PSS padding modes. This is
|
||||
mainly for FIPS compliance and not fully integrated at this stage.
|
||||
[Steve Henson]
|
||||
|
||||
*) For DSA signing, unless DSA_FLAG_NO_EXP_CONSTTIME is set, perform
|
||||
the exponentiation using a fixed-length exponent. (Otherwise,
|
||||
the information leaked through timing could expose the secret key
|
||||
after many signatures; cf. Bleichenbacher's attack on DSA with
|
||||
biased k.)
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Make a new fixed-window mod_exp implementation the default for
|
||||
RSA, DSA, and DH private-key operations so that the sequence of
|
||||
squares and multiplies and the memory access pattern are
|
||||
independent of the particular secret key. This will mitigate
|
||||
cache-timing and potential related attacks.
|
||||
|
||||
BN_mod_exp_mont_consttime() is the new exponentiation implementation,
|
||||
and this is automatically used by BN_mod_exp_mont() if the new flag
|
||||
BN_FLG_EXP_CONSTTIME is set for the exponent. RSA, DSA, and DH
|
||||
will use this BN flag for private exponents unless the flag
|
||||
RSA_FLAG_NO_EXP_CONSTTIME, DSA_FLAG_NO_EXP_CONSTTIME, or
|
||||
DH_FLAG_NO_EXP_CONSTTIME, respectively, is set.
|
||||
|
||||
[Matthew D Wood (Intel Corp), with some changes by Bodo Moeller]
|
||||
|
||||
*) Change the client implementation for SSLv23_method() and
|
||||
SSLv23_client_method() so that is uses the SSL 3.0/TLS 1.0
|
||||
Client Hello message format if the SSL_OP_NO_SSLv2 option is set.
|
||||
(Previously, the SSL 2.0 backwards compatible Client Hello
|
||||
message format would be used even with SSL_OP_NO_SSLv2.)
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Add support for smime-type MIME parameter in S/MIME messages which some
|
||||
clients need.
|
||||
[Steve Henson]
|
||||
|
||||
*) New function BN_MONT_CTX_set_locked() to set montgomery parameters in
|
||||
a threadsafe manner. Modify rsa code to use new function and add calls
|
||||
to dsa and dh code (which had race conditions before).
|
||||
[Steve Henson]
|
||||
|
||||
*) Include the fixed error library code in the C error file definitions
|
||||
instead of fixing them up at runtime. This keeps the error code
|
||||
structures constant.
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 0.9.7f and 0.9.7g [11 Apr 2005]
|
||||
|
||||
[NB: OpenSSL 0.9.7h and later 0.9.7 patch levels were released after
|
||||
OpenSSL 0.9.8.]
|
||||
|
||||
*) Fixes for newer kerberos headers. NB: the casts are needed because
|
||||
the 'length' field is signed on one version and unsigned on another
|
||||
with no (?) obvious way to tell the difference, without these VC++
|
||||
complains. Also the "definition" of FAR (blank) is no longer included
|
||||
nor is the error ENOMEM. KRB5_PRIVATE has to be set to 1 to pick up
|
||||
some needed definitions.
|
||||
[Steve Henson]
|
||||
|
||||
*) Undo Cygwin change.
|
||||
[Ulf M<>ller]
|
||||
|
||||
*) Added support for proxy certificates according to RFC 3820.
|
||||
Because they may be a security thread to unaware applications,
|
||||
they must be explicitely allowed in run-time. See
|
||||
docs/HOWTO/proxy_certificates.txt for further information.
|
||||
[Richard Levitte]
|
||||
|
||||
Changes between 0.9.7e and 0.9.7f [22 Mar 2005]
|
||||
|
||||
*) Use (SSL_RANDOM_VALUE - 4) bytes of pseudo random data when generating
|
||||
server and client random values. Previously
|
||||
(SSL_RANDOM_VALUE - sizeof(time_t)) would be used which would result in
|
||||
less random data when sizeof(time_t) > 4 (some 64 bit platforms).
|
||||
|
||||
This change has negligible security impact because:
|
||||
|
||||
1. Server and client random values still have 24 bytes of pseudo random
|
||||
data.
|
||||
|
||||
2. Server and client random values are sent in the clear in the initial
|
||||
handshake.
|
||||
|
||||
3. The master secret is derived using the premaster secret (48 bytes in
|
||||
size for static RSA ciphersuites) as well as client server and random
|
||||
values.
|
||||
|
||||
The OpenSSL team would like to thank the UK NISCC for bringing this issue
|
||||
to our attention.
|
||||
|
||||
[Stephen Henson, reported by UK NISCC]
|
||||
|
||||
*) Use Windows randomness collection on Cygwin.
|
||||
[Ulf M<>ller]
|
||||
|
||||
*) Fix hang in EGD/PRNGD query when communication socket is closed
|
||||
prematurely by EGD/PRNGD.
|
||||
[Darren Tucker <dtucker@zip.com.au> via Lutz J<>nicke, resolves #1014]
|
||||
|
||||
*) Prompt for pass phrases when appropriate for PKCS12 input format.
|
||||
[Steve Henson]
|
||||
|
||||
*) Back-port of selected performance improvements from development
|
||||
branch, as well as improved support for PowerPC platforms.
|
||||
|
||||
113
Configure
113
Configure
@@ -169,9 +169,19 @@ my %table=(
|
||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
|
||||
# error message.
|
||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# -shared -static-libgcc might appear controversial, but modules taken
|
||||
# from static libgcc do not have relocations and linking them into our
|
||||
# shared objects doesn't have any negative side-effects. On the contrary,
|
||||
# doing so makes it possible to use gcc shared build with Sun C. Given
|
||||
# that gcc generates faster code [thanks to inline assembler], I would
|
||||
# actually recommend to consider using gcc shared build even with vendor
|
||||
# compiler:-)
|
||||
# <appro@fy.chalmers.se>
|
||||
"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o::::::asm/rc4-x86_64.o:::dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### Solaris x86 with Sun C setups
|
||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL::::::::::dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### SPARC Solaris with GNU C setups
|
||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -190,17 +200,17 @@ my %table=(
|
||||
|
||||
#### SPARC Solaris with Sun C setups
|
||||
# DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests
|
||||
"solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
|
||||
# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
|
||||
# SC5.0 note: Compiler common patch 107357-01 or later is required!
|
||||
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-KPIC:-xarch=v9:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs",
|
||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs",
|
||||
####
|
||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### SPARC Linux setups
|
||||
"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::",
|
||||
@@ -261,56 +271,56 @@ my %table=(
|
||||
#
|
||||
#!#"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
||||
# Since there is mention of this in shlib/hpux10-cc.sh
|
||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::-Wl,+cdp,../%3a,+cdp,./%3a,+s,+b,\$(INSTALLTOP)/lib -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::-Wl,+cdp,../%3a,+cdp,./%3a,+s,+b,\$(INSTALLTOP)/lib -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux-shared:+Z:+DD64 -b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# 64bit PARISC for GCC without optimization, which seems to make problems.
|
||||
# Submitted by <ross.alexander@uk.neceur.com>
|
||||
"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux-shared:-fpic:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# IA-64 targets
|
||||
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:hpux-shared:+Z:-b:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
|
||||
# with debugging of the following config.
|
||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:hpux-shared:+Z:+DD64 -b:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
||||
#
|
||||
# Chris Ruemmler <ruemmler@cup.hp.com>
|
||||
# Kevin Steves <ks@hp.se>
|
||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+cdp,../%3a,+cdp,./%3a,+s,+b,\$(INSTALLTOP)/lib -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+cdp,../%3a,+cdp,./%3a,+s,+b,\$(INSTALLTOP)/lib -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux-shared:+Z:+DD64 -b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# Isn't the line below meaningless? HP-UX cc optimizes for host by default.
|
||||
# hpux-parisc1_0-cc with +DAportable flag would make more sense. <appro>
|
||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+cdp,../%3a,+cdp,./%3a,+s,+b,\$(INSTALLTOP)/lib -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# HPUX 9.X config.
|
||||
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
|
||||
# egcs. gcc 2.8.1 is also broken.
|
||||
|
||||
"hpux-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::(unknown)::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::(unknown)::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# If hpux-cc fails (e.g. during "make test"), try the next one; otherwise,
|
||||
# please report your OS and compiler version to the openssl-bugs@openssl.org
|
||||
# mailing list.
|
||||
"hpux-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown)::-Wl,+s -ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown)::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
"hpux-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# If hpux-gcc fails, try this one:
|
||||
"hpux-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::-Wl,+s -ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# HPUX 9.X on Motorola 68k platforms with gcc
|
||||
"hpux-m68k-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):::BN_LLONG DES_PTR DES_UNROLL:::::::::::::",
|
||||
|
||||
# HPUX 10.X config. Supports threads.
|
||||
"hpux10-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux10-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# If hpux10-cc fails, try this one (if still fails, try deleting BN_LLONG):
|
||||
"hpux10-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux10-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
"hpux10-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux10-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# If hpux10-gcc fails, try this one:
|
||||
"hpux10-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT::-Wl,+s -ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux10-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT::-Wl,+s,+b,\$(INSTALLTOP)/lib -ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# HPUX 11.X from www.globus.org.
|
||||
# Only works on PA-RISC 2.0 cpus, and not optimized. Why?
|
||||
@@ -399,10 +409,9 @@ my %table=(
|
||||
"linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
|
||||
"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/ia64.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/ia64.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o::::::asm/rc4-amd64.o:::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-em64t", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o::::::asm/rc4-x86_64.o:::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -425,7 +434,9 @@ my %table=(
|
||||
"qnx6", "cc:-DL_ENDIAN -DTERMIOS::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:",
|
||||
|
||||
# Linux on ARM
|
||||
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# ARM comes in both little- and big-endian flavors. The following line is
|
||||
# endian neutral, but ./config is free to throw in -D[BL]_ENDIAN...
|
||||
"linux-elf-arm","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# SCO/Caldera targets.
|
||||
#
|
||||
@@ -518,14 +529,14 @@ my %table=(
|
||||
"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||
|
||||
# MinGW
|
||||
"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-mno-cygwin -lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32::::.dll",
|
||||
"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall -D_WIN32_WINNT=0x333:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_out_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a",
|
||||
|
||||
# UWIN
|
||||
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
|
||||
# Cygwin
|
||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:::.dll",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:cygwin-shared:-D_WINDLL::.dll.a",
|
||||
|
||||
# DJGPP
|
||||
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::",
|
||||
@@ -551,7 +562,7 @@ my %table=(
|
||||
|
||||
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
|
||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||
"darwin-ppc-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/osx_ppc32.o::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin-ppc-cc","cc:-O3 -fomit-frame-pointer -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/osx_ppc32.o:::::::::dlfcn:darwin-shared:-fPIC -fno-common::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin-i386-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
|
||||
##### A/UX
|
||||
@@ -867,7 +878,7 @@ PROCESS_ARGS:
|
||||
}
|
||||
else
|
||||
{
|
||||
die "target already defined - $target\n" if ($target ne "");
|
||||
die "target already defined - $target (offending arg: $_)\n" if ($target ne "");
|
||||
$target=$_;
|
||||
}
|
||||
unless ($_ eq $target) {
|
||||
@@ -938,8 +949,7 @@ print "Configuring for $target\n";
|
||||
|
||||
my $IsWindows=scalar grep /^$target$/,@WinTargets;
|
||||
|
||||
$exe_ext=".exe" if ($target eq "Cygwin");
|
||||
$exe_ext=".exe" if ($target eq "DJGPP");
|
||||
$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw");
|
||||
$exe_ext=".pm" if ($target eq "vos-gcc" or $target eq "debug-vos-gcc" or $target eq "vos-vcc" or $target eq "debug-vos-vcc");
|
||||
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
|
||||
$prefix=$openssldir if $prefix eq "";
|
||||
@@ -958,6 +968,7 @@ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/]
|
||||
print "IsWindows=$IsWindows\n";
|
||||
|
||||
my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||
for (@fields) { s/%([\dA-Fa-f]{2})/chr(hex($1))/eg; }
|
||||
my $cc = $fields[$idx_cc];
|
||||
my $cflags = $fields[$idx_cflags];
|
||||
my $unistd = $fields[$idx_unistd];
|
||||
@@ -1016,7 +1027,7 @@ else
|
||||
if $withargs{"krb5-dir"} eq "";
|
||||
$withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}.
|
||||
"/lib -lgssapi -lkrb5 -lcom_err"
|
||||
if $withargs{"krb5-lib"} eq "";
|
||||
if $withargs{"krb5-lib"} eq "" && !$IsWindows;
|
||||
$cflags="-DKRB5_HEIMDAL $cflags";
|
||||
}
|
||||
if ($withargs{"krb5-flavor"} =~ /^[Mm][Ii][Tt]/)
|
||||
@@ -1025,7 +1036,7 @@ else
|
||||
if $withargs{"krb5-dir"} eq "";
|
||||
$withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}.
|
||||
"/lib -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto"
|
||||
if $withargs{"krb5-lib"} eq "";
|
||||
if $withargs{"krb5-lib"} eq "" && !$IsWindows;
|
||||
$cflags="-DKRB5_MIT $cflags";
|
||||
$withargs{"krb5-flavor"} =~ s/^[Mm][Ii][Tt][._-]*//;
|
||||
if ($withargs{"krb5-flavor"} =~ /^1[._-]*[01]/)
|
||||
@@ -1044,7 +1055,7 @@ else
|
||||
}
|
||||
}
|
||||
$withargs{"krb5-lib"} .= " -lresolv"
|
||||
if ("$lresolv" ne "");
|
||||
if ("$lresolv" ne "" && !$IsWindows);
|
||||
$withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include"
|
||||
if $withargs{"krb5-include"} eq "" &&
|
||||
$withargs{"krb5-dir"} ne "";
|
||||
@@ -1140,7 +1151,7 @@ if (!$no_shared)
|
||||
{
|
||||
if ($shared_cflag ne "")
|
||||
{
|
||||
$cflags = "$shared_cflag $cflags";
|
||||
$cflags = "$shared_cflag -DOPENSSL_PIC $cflags";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1163,16 +1174,22 @@ if ($ranlib eq "")
|
||||
$bn_obj = $bn_asm unless $bn_obj ne "";
|
||||
|
||||
my $fips_des_obj;
|
||||
my $fips_aes_obj;
|
||||
my $fips_sha1_obj;
|
||||
if ($fips)
|
||||
{
|
||||
if ($des_obj =~ /\-elf\.o$/ && $no_shared) # FIPS DES module is not PIC
|
||||
if ($des_obj =~ /\-elf\.o$/)
|
||||
{
|
||||
$fips_des_obj='asm/fips-dx86-elf.o';
|
||||
$openssl_other_defines.="#define OPENSSL_FIPS_DES_ASM\n";
|
||||
$fips_aes_obj='asm/fips-ax86-elf.o';
|
||||
$openssl_other_defines.="#define OPENSSL_FIPS_AES_ASM\n";
|
||||
}
|
||||
else { $fips_des_obj=$fips_des_enc; }
|
||||
$fips_sha1_obj='asm/sx86-elf.o' if ($sha1_obj =~ /\-elf\.o$/);
|
||||
else {
|
||||
$fips_des_obj=$fips_des_enc;
|
||||
$fips_aes_obj='fips_aes_core.o';
|
||||
}
|
||||
$fips_sha1_obj='asm/fips-sx86-elf.o' if ($sha1_obj =~ /\-elf\.o$/);
|
||||
$des_obj=$sha1_obj="";
|
||||
$openssl_other_defines.="#define OPENSSL_FIPS\n";
|
||||
}
|
||||
@@ -1276,6 +1293,7 @@ while (<IN>)
|
||||
s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
|
||||
s/^DES_ENC=.*$/DES_ENC= $des_obj/;
|
||||
s/^FIPS_DES_ENC=.*$/FIPS_DES_ENC= $fips_des_obj/;
|
||||
s/^FIPS_AES_ENC=.*$/FIPS_AES_ENC= $fips_aes_obj/;
|
||||
s/^BF_ENC=.*$/BF_ENC= $bf_obj/;
|
||||
s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/;
|
||||
s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/;
|
||||
@@ -1536,7 +1554,6 @@ EOF
|
||||
} else {
|
||||
# No path for Perl known ...
|
||||
&dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
|
||||
&dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s');
|
||||
&dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
|
||||
}
|
||||
if ($depflags ne "" && !$make_depend) {
|
||||
@@ -1644,12 +1661,13 @@ sub print_table_entry
|
||||
{
|
||||
my $target = shift;
|
||||
|
||||
my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||
for (@fields) { s/%([\dA-Fa-f]{2})/chr(hex($1))/eg; }
|
||||
(my $cc,my $cflags,my $unistd,my $thread_cflag,my $sys_id,my $lflags,
|
||||
my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
|
||||
my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
|
||||
my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag,
|
||||
my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags)=
|
||||
split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||
my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags)=@fields;
|
||||
|
||||
print <<EOF
|
||||
|
||||
@@ -1692,6 +1710,7 @@ sub test_sanity
|
||||
foreach $target (sort keys %table)
|
||||
{
|
||||
@fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||
for (@fields) { s/%([\dA-Fa-f]{2})/chr(hex($1))/eg; }
|
||||
|
||||
if ($fields[$idx_dso_scheme-1] =~ /^(dl|dlfcn|win32|vms)$/)
|
||||
{
|
||||
|
||||
27
FAQ
27
FAQ
@@ -70,7 +70,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 0.9.7e was released on October 25, 2004.
|
||||
OpenSSL 0.9.7h was released on October 11, 2005.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@@ -141,8 +141,8 @@ less Unix-centric, it might have been used much earlier.
|
||||
|
||||
With version 0.9.6 OpenSSL was extended to interface to external crypto
|
||||
hardware. This was realized in a special release '0.9.6-engine'. With
|
||||
version 0.9.7 (not yet released) the changes were merged into the main
|
||||
development line, so that the special release is no longer necessary.
|
||||
version 0.9.7 the changes were merged into the main development line,
|
||||
so that the special release is no longer necessary.
|
||||
|
||||
* How do I check the authenticity of the OpenSSL distribution?
|
||||
|
||||
@@ -472,6 +472,10 @@ This will only compile sha_dgst.c with -O0, the rest with the optimization
|
||||
level chosen by the configuration process. When the above is done, do the
|
||||
test and installation and you're set.
|
||||
|
||||
3. Reconfigure the toolkit with no-sha0 option to leave out SHA0. It
|
||||
should not be used and is not used in SSL/TLS nor any other recognized
|
||||
protocol in either case.
|
||||
|
||||
|
||||
* Why does the OpenSSL compilation fail with "ar: command not found"?
|
||||
|
||||
@@ -788,9 +792,20 @@ that is allocated when an application starts up. Since such tables do not grow
|
||||
in size over time they are harmless.
|
||||
|
||||
These internal tables can be freed up when an application closes using various
|
||||
functions. Currently these include: EVP_cleanup(), ERR_remove_state(),
|
||||
ERR_free_strings(), ENGINE_cleanup(), CONF_modules_unload() and
|
||||
CRYPTO_cleanup_all_ex_data().
|
||||
functions. Currently these include following:
|
||||
|
||||
Thread-local cleanup functions:
|
||||
|
||||
ERR_remove_state()
|
||||
|
||||
Application-global cleanup functions that are aware of usage (and therefore
|
||||
thread-safe):
|
||||
|
||||
ENGINE_cleanup() and CONF_modules_unload()
|
||||
|
||||
"Brutal" (thread-unsafe) Application-global cleanup functions:
|
||||
|
||||
ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data().
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
||||
@@ -3,32 +3,45 @@
|
||||
INSTALLATION ON THE DOS PLATFORM WITH DJGPP
|
||||
-------------------------------------------
|
||||
|
||||
Openssl has been ported to DOS, but only with long filename support. If
|
||||
you wish to compile on native DOS with 8+3 filenames, you will have to
|
||||
tweak the installation yourself, including renaming files with illegal
|
||||
or duplicate names.
|
||||
OpenSSL has been ported to DJGPP, a Unix look-alike 32-bit run-time
|
||||
environment for 16-bit DOS, but only with long filename support.
|
||||
If you wish to compile on native DOS with 8+3 filenames, you will
|
||||
have to tweak the installation yourself, including renaming files
|
||||
with illegal or duplicate names.
|
||||
|
||||
You should have a full DJGPP environment installed, including the
|
||||
latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package
|
||||
requires that PERL and BC also be installed.
|
||||
|
||||
All of these can be obtained from the usual DJGPP mirror sites, such
|
||||
as "ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp". You also need to
|
||||
have the WATT-32 networking package installed before you try to compile
|
||||
openssl. This can be obtained from "http://www.bgnett.no/~giva/".
|
||||
All of these can be obtained from the usual DJGPP mirror sites or
|
||||
directly at "http://www.delorie.com/pub/djgpp". For help on which
|
||||
files to download, see the DJGPP "ZIP PICKER" page at
|
||||
"http://www.delorie.com/djgpp/zip-picker.html". You also need to have
|
||||
the WATT-32 networking package installed before you try to compile
|
||||
OpenSSL. This can be obtained from "http://www.bgnett.no/~giva/".
|
||||
The Makefile assumes that the WATT-32 code is in the directory
|
||||
specified by the environment variable WATT_ROOT. If you have watt-32
|
||||
in directory "watt32" under your main DJGPP directory, specify
|
||||
WATT_ROOT="/dev/env/DJDIR/watt32".
|
||||
|
||||
To compile openssl, start your BASH shell. Then configure for DOS by
|
||||
running "./Configure" with appropriate arguments. The basic syntax for
|
||||
DOS is:
|
||||
./Configure no-threads --prefix=/dev/env/DJDIR DJGPP
|
||||
|
||||
You may run out of DPMI selectors when running in a DOS box under
|
||||
Windows. If so, just close the BASH shell, go back to Windows, and
|
||||
restart BASH. Then run "make" again.
|
||||
To compile OpenSSL, start your BASH shell, then configure for DJGPP by
|
||||
running "./Configure" with appropriate arguments:
|
||||
|
||||
Building openssl under DJGPP has been tested with DJGPP 2.03,
|
||||
GCC 2.952, GCC 2.953, perl 5.005_02 and perl 5.006_01.
|
||||
./Configure no-threads --prefix=/dev/env/DJDIR DJGPP
|
||||
|
||||
And finally fire up "make". You may run out of DPMI selectors when
|
||||
running in a DOS box under Windows. If so, just close the BASH
|
||||
shell, go back to Windows, and restart BASH. Then run "make" again.
|
||||
|
||||
RUN-TIME CAVEAT LECTOR
|
||||
--------------
|
||||
|
||||
Quoting FAQ:
|
||||
|
||||
"Cryptographic software needs a source of unpredictable data to work
|
||||
correctly. Many open source operating systems provide a "randomness
|
||||
device" (/dev/urandom or /dev/random) that serves this purpose."
|
||||
|
||||
As of version 0.9.7f DJGPP port checks upon /dev/urandom$ for a 3rd
|
||||
party "randomness" DOS driver. One such driver, NOISE.SYS, can be
|
||||
obtained from "http://www.rahul.net/dkaufman/index.html".
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -12,7 +12,7 @@
|
||||
---------------
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
150
Makefile.org
150
Makefile.org
@@ -102,6 +102,7 @@ PROCESSOR=
|
||||
# Set DES_ENC to des_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
FIPS_DES_ENC= des_enc.o fcrypt_b.o
|
||||
FIPS_AES_ENC= fips_aes_core.o
|
||||
DES_ENC= asm/dx86-out.o asm/yx86-out.o
|
||||
#DES_ENC= des_enc.o fcrypt_b.o # C
|
||||
#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
|
||||
@@ -186,7 +187,7 @@ SDIRS= objects \
|
||||
buffer bio stack lhash rand err \
|
||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
||||
|
||||
FDIRS= sha1 rand des aes dsa rsa dh
|
||||
FDIRS= sha rand des aes dsa rsa dh hmac
|
||||
|
||||
# tests to perform. "alltests" is a special word indicating that all tests
|
||||
# should be performed.
|
||||
@@ -227,9 +228,9 @@ all: Makefile sub_all openssl.pc
|
||||
|
||||
sigs: $(SIGS)
|
||||
libcrypto.a.sha1: libcrypto.a
|
||||
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
@if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
$(RANLIB) libcrypto.a; \
|
||||
fips/sha1/fips_standalone_sha1 libcrypto.a > libcrypto.a.sha1; \
|
||||
fips/sha/fips_standalone_sha1 libcrypto.a > libcrypto.a.sha1; \
|
||||
fi
|
||||
|
||||
sub_all:
|
||||
@@ -237,7 +238,7 @@ sub_all:
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making all in $$i..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' FIPS_AES_ENC='${FIPS_AES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
|
||||
else \
|
||||
$(MAKE) $$i; \
|
||||
fi; \
|
||||
@@ -248,7 +249,7 @@ sub_target:
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making $(TARGET) in $$i..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' FIPS_AES_ENC='${FIPS_AES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \
|
||||
else \
|
||||
$(MAKE) $$i; \
|
||||
fi; \
|
||||
@@ -257,6 +258,9 @@ sub_target:
|
||||
libcrypto$(SHLIB_EXT): libcrypto.a
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
$(MAKE) SHLIBDIRS=crypto build-shared; \
|
||||
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
fips/sha/fips_standalone_sha1 -binary $@ > $@.$${HMAC_EXT:-sha1}; \
|
||||
fi; \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2; \
|
||||
fi
|
||||
@@ -309,7 +313,7 @@ do_gnu-shared:
|
||||
-Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--whole-archive lib$$i.a \
|
||||
-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
-Wl,--no-whole-archive $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
@@ -321,7 +325,8 @@ do_darwin-shared:
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS}
|
||||
--verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
|
||||
lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
|
||||
-install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
|
||||
@@ -334,11 +339,18 @@ do_cygwin-shared:
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} -shared -o cyg$$i-$(SHLIB_VERSION_NUMBER).dll \
|
||||
shlib=cyg$${i}-$(SHLIB_VERSION_NUMBER).dll; \
|
||||
[ "$(PLATFORM)" = "mingw" ] && shlib=$${i}eay32.dll; \
|
||||
[ -f apps/$$shlib ] && rm apps/$$shlib; \
|
||||
[ -f test/$$shlib ] && rm test/$$shlib; \
|
||||
base=; [ $$i = "crypto" ] && base=-Wl,--image-base,0x63000000; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared $$base -o $$shlib \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--whole-archive lib$$i.a \
|
||||
-Wl,--out-implib,lib$$i.dll.a \
|
||||
-Wl,--no-whole-archive $$libs ) || exit 1; \
|
||||
-Wl,--no-whole-archive $$libs ${EX_LIBS} ) || exit 1; \
|
||||
cp -p $$shlib apps/; cp -p $$shlib test/; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
@@ -354,7 +366,7 @@ do_alpha-osf1-shared:
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so \
|
||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
@@ -373,7 +385,7 @@ do_tru64-shared:
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -msym -o lib$$i.so \
|
||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
@@ -393,7 +405,7 @@ do_tru64-shared-rpath:
|
||||
-shared -msym -o lib$$i.so \
|
||||
-rpath ${INSTALLTOP}/lib \
|
||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
@@ -411,12 +423,12 @@ do_solaris-shared:
|
||||
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||
MINUSZ='-z '; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} -G -dy -z text \
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-Bsymbolic \
|
||||
$${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \
|
||||
$$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
$$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
@@ -479,61 +491,35 @@ do_irix-shared:
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( WHOLELIB="-all lib$$i.a -notall"; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && WHOLELIB="-Wl,-all,lib$$i.a,-notall"; \
|
||||
( WHOLELIB="-all lib$$i.a -none"; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && WHOLELIB="-Wl,-all,lib$$i.a,-none"; \
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
$${WHOLELIB} $$libs ${EX_LIBS} -lc) || exit 1; \
|
||||
$${WHOLELIB} $$libs ${EX_LIBS}) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
# HP-UX includes the full pathname of libs we depend on, so we would get
|
||||
# ./libcrypto (with ./ as path information) compiled into libssl, hence
|
||||
# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
|
||||
# anyway.
|
||||
# The object modules are loaded from lib$i.a using the undocumented -Fl
|
||||
# option.
|
||||
#
|
||||
# WARNING: Until DSO is fixed to support a search path, we support SHLIB_PATH
|
||||
# by temporarily specifying "+s"!
|
||||
#
|
||||
do_hpux-shared:
|
||||
for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
+vnocompatwarnings \
|
||||
-b -z +s \
|
||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Fl lib$$i.a -ldld -lc ) || exit 1; \
|
||||
chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||
done
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
# HP-UX includes the full pathname of libs we depend on, so we would get
|
||||
# ./libcrypto (with ./ as path information) compiled into libssl, hence
|
||||
# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
|
||||
# anyway.
|
||||
#
|
||||
# HP-UX in 64bit mode has "+s" enabled by default; it will search for
|
||||
# shared libraries along LD_LIBRARY_PATH _and_ SHLIB_PATH.
|
||||
#
|
||||
do_hpux64-shared:
|
||||
for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
if expr $(PLATFORM) : '.*ia64' > /dev/null; then \
|
||||
shlib=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||
else \
|
||||
shlib=lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||
fi; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
-b -z \
|
||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+forceload lib$$i.a -ldl -lc ) || exit 1; \
|
||||
chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||
[ -f $$shlib ] && rm -f $$shlib; \
|
||||
ALLSYMSFLAGS='-Wl,-Fl'; \
|
||||
expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-Wl,-B,symbolic,+vnocompatwarnings,-z,+h,$$shlib \
|
||||
-o $$shlib $$ALLSYMSFLAGS,lib$$i.a -ldld ) || exit 1; \
|
||||
chmod a=rx $$shlib; \
|
||||
done
|
||||
|
||||
# The following method is said to work on all platforms. Tests will
|
||||
@@ -629,7 +615,7 @@ clean: libclean
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making clean in $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
|
||||
$(MAKE) EXE_EXT='${EXE_EXT}' SDIRS='${SDIRS}' clean ) || exit 1; \
|
||||
rm -f $(LIBS); \
|
||||
fi; \
|
||||
done;
|
||||
@@ -681,20 +667,9 @@ dclean:
|
||||
|
||||
rehash: rehash.time
|
||||
rehash.time: certs
|
||||
@(OPENSSL="`pwd`/apps/openssl$(EXE_EXT)"; OPENSSL_DEBUG_MEMORY=on; \
|
||||
@(OPENSSL="`pwd`/util/opensslwrap.sh"; \
|
||||
OPENSSL_DEBUG_MEMORY=on; \
|
||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then \
|
||||
PATH="`pwd`:$$PATH"; \
|
||||
fi; \
|
||||
LD_PRELOAD="`pwd`/libssl.so `pwd`/libcrypto.so"; \
|
||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||
export LD_PRELOAD; \
|
||||
fi; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
touch rehash.time
|
||||
|
||||
@@ -703,17 +678,7 @@ test: tests
|
||||
tests: rehash
|
||||
@(cd test && echo "testing..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||
LD_PRELOAD="`pwd`/libssl.so `pwd`/libcrypto.so"; \
|
||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||
export LD_PRELOAD; \
|
||||
fi; \
|
||||
apps/openssl version -a
|
||||
util/shlib_wrap.sh apps/openssl version -a
|
||||
|
||||
report:
|
||||
@$(PERL) util/selftest.pl
|
||||
@@ -761,11 +726,15 @@ crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt c
|
||||
apps/openssl-vms.cnf: apps/openssl.cnf
|
||||
$(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
|
||||
|
||||
crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
|
||||
$(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
|
||||
|
||||
|
||||
TABLE: Configure
|
||||
(echo 'Output of `Configure TABLE'"':"; \
|
||||
$(PERL) Configure TABLE) > TABLE
|
||||
|
||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf TABLE
|
||||
update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
|
||||
|
||||
# Build distribution tar-file. As the list of files returned by "find" is
|
||||
# pretty long, on several platforms a "too many arguments" error or similar
|
||||
@@ -847,7 +816,16 @@ install_sw:
|
||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
sig="$$i.$${HMAC_EXT:-sha1}"; \
|
||||
if [ -f $$sig ]; then \
|
||||
echo installing $$sig; \
|
||||
cp $$sig $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$sig.new; \
|
||||
chmod 444 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$sig.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$sig.new \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$sig; \
|
||||
fi; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
@@ -891,7 +869,7 @@ install_docs:
|
||||
@pod2man="`cd util; ./pod2mantest $(PERL)`"; \
|
||||
here="`pwd`"; \
|
||||
filecase=; \
|
||||
if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" ]; then \
|
||||
if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
|
||||
filecase=-i; \
|
||||
fi; \
|
||||
for i in doc/apps/*.pod; do \
|
||||
@@ -904,8 +882,8 @@ install_docs:
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
grep -v $$filecase "^$$fn\$$" | \
|
||||
grep -v "[ ]" | \
|
||||
(grep -v $$filecase "^$$fn\$$"; true) | \
|
||||
(grep -v "[ ]"; true) | \
|
||||
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||
while read n; do \
|
||||
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||
@@ -921,8 +899,8 @@ install_docs:
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
grep -v $$filecase "^$$fn\$$" | \
|
||||
grep -v "[ ]" | \
|
||||
(grep -v $$filecase "^$$fn\$$"; true) | \
|
||||
(grep -v "[ ]"; true) | \
|
||||
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||
while read n; do \
|
||||
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||
|
||||
23
NEWS
23
NEWS
@@ -5,6 +5,29 @@
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h:
|
||||
|
||||
o Fix SSL 2.0 Rollback, CAN-2005-2969
|
||||
o Allow use of fixed-length exponent on DSA signing
|
||||
o Default fixed-window RSA, DSA, DH private-key operations
|
||||
|
||||
Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g:
|
||||
|
||||
o More compilation issues fixed.
|
||||
o Adaptation to more modern Kerberos API.
|
||||
o Enhanced or corrected configuration for Solaris64, Mingw and Cygwin.
|
||||
o Enhanced x86_64 assembler BIGNUM module.
|
||||
o More constification.
|
||||
o Added processing of proxy certificates (RFC 3820).
|
||||
|
||||
Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f:
|
||||
|
||||
o Several compilation issues fixed.
|
||||
o Many memory allocation failure checks added.
|
||||
o Improved comparison of X509 Name type.
|
||||
o Mandatory basic checks on certificates.
|
||||
o Performance improvements.
|
||||
|
||||
Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e:
|
||||
|
||||
o Fix race condition in CRL checking code.
|
||||
|
||||
56
PROBLEMS
56
PROBLEMS
@@ -48,20 +48,28 @@ will interfere with each other and lead to test failure.
|
||||
The solution is simple for now: don't run parallell make when testing.
|
||||
|
||||
|
||||
* Bugs in gcc 3.0 triggered
|
||||
* Bugs in gcc triggered
|
||||
|
||||
According to a problem report, there are bugs in gcc 3.0 that are
|
||||
triggered by some of the code in OpenSSL, more specifically in
|
||||
PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
|
||||
- According to a problem report, there are bugs in gcc 3.0 that are
|
||||
triggered by some of the code in OpenSSL, more specifically in
|
||||
PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
|
||||
|
||||
header+=11;
|
||||
if (*header != '4') return(0); header++;
|
||||
if (*header != ',') return(0); header++;
|
||||
|
||||
What happens is that gcc might optimize a little too agressively, and
|
||||
you end up with an extra incrementation when *header != '4'.
|
||||
What happens is that gcc might optimize a little too agressively, and
|
||||
you end up with an extra incrementation when *header != '4'.
|
||||
|
||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
|
||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
|
||||
|
||||
- According to multiple problem reports, some of our message digest
|
||||
implementations trigger bug[s] in code optimizer in gcc 3.3 for sparc64
|
||||
and gcc 2.96 for ppc. Former fails to complete RIPEMD160 test, while
|
||||
latter - SHA one.
|
||||
|
||||
The recomendation is to upgrade your compiler. This naturally applies to
|
||||
other similar cases.
|
||||
|
||||
* solaris64-sparcv9-cc SHA-1 performance with WorkShop 6 compiler.
|
||||
|
||||
@@ -120,3 +128,37 @@ Any information helping to solve this issue would be deeply
|
||||
appreciated.
|
||||
|
||||
NOTE: building non-shared doesn't come with this problem.
|
||||
|
||||
* ULTRIX build fails with shell errors, such as "bad substitution"
|
||||
and "test: argument expected"
|
||||
|
||||
The problem is caused by ULTRIX /bin/sh supporting only original
|
||||
Bourne shell syntax/semantics, and the trouble is that the vast
|
||||
majority is so accustomed to more modern syntax, that very few
|
||||
people [if any] would recognize the ancient syntax even as valid.
|
||||
This inevitably results in non-trivial scripts breaking on ULTRIX,
|
||||
and OpenSSL isn't an exclusion. Fortunately there is workaround,
|
||||
hire /bin/ksh to do the job /bin/sh fails to do.
|
||||
|
||||
1. Trick make(1) to use /bin/ksh by setting up following environ-
|
||||
ment variables *prior* you execute ./Configure and make:
|
||||
|
||||
PROG_ENV=POSIX
|
||||
MAKESHELL=/bin/ksh
|
||||
export PROG_ENV MAKESHELL
|
||||
|
||||
or if your shell is csh-compatible:
|
||||
|
||||
setenv PROG_ENV POSIX
|
||||
setenv MAKESHELL /bin/ksh
|
||||
|
||||
2. Trick /bin/sh to use alternative expression evaluator. Create
|
||||
following 'test' script for example in /tmp:
|
||||
|
||||
#!/bin/ksh
|
||||
${0##*/} "$@"
|
||||
|
||||
Then 'chmod a+x /tmp/test; ln /tmp/test /tmp/[' and *prepend*
|
||||
your $PATH with chosen location, e.g. PATH=/tmp:$PATH. Alter-
|
||||
natively just replace system /bin/test and /bin/[ with the
|
||||
above script.
|
||||
|
||||
29
README
29
README
@@ -1,7 +1,7 @@
|
||||
|
||||
OpenSSL 0.9.7e 25 Oct 2004
|
||||
OpenSSL 0.9.7h 11 Oct 2005
|
||||
|
||||
Copyright (c) 1998-2004 The OpenSSL Project
|
||||
Copyright (c) 1998-2005 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
All rights reserved.
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
protocols as well as a full-strength general purpose cryptography library.
|
||||
The project is managed by a worldwide community of volunteers that use the
|
||||
Internet to communicate, plan, and develop the OpenSSL toolkit and its
|
||||
related documentation.
|
||||
related documentation.
|
||||
|
||||
OpenSSL is based on the excellent SSLeay library developed from Eric A. Young
|
||||
and Tim J. Hudson. The OpenSSL toolkit is licensed under a dual-license (the
|
||||
OpenSSL license plus the SSLeay license) situation, which basically means
|
||||
that you are free to get and use it for commercial and non-commercial
|
||||
purposes as long as you fulfill the conditions of both licenses.
|
||||
purposes as long as you fulfill the conditions of both licenses.
|
||||
|
||||
OVERVIEW
|
||||
--------
|
||||
@@ -53,11 +53,11 @@
|
||||
MDC2 message digest. A DES based hash that is popular on smart cards.
|
||||
|
||||
Public Key
|
||||
RSA encryption/decryption/generation.
|
||||
RSA encryption/decryption/generation.
|
||||
There is no limit on the number of bits.
|
||||
DSA encryption/decryption/generation.
|
||||
DSA encryption/decryption/generation.
|
||||
There is no limit on the number of bits.
|
||||
Diffie-Hellman key-exchange/key generation.
|
||||
Diffie-Hellman key-exchange/key generation.
|
||||
There is no limit on the number of bits.
|
||||
|
||||
X.509v3 certificates
|
||||
@@ -80,16 +80,16 @@
|
||||
A simple stack.
|
||||
A Configuration loader that uses a format similar to MS .ini files.
|
||||
|
||||
openssl:
|
||||
openssl:
|
||||
A command line tool that can be used for:
|
||||
Creation of RSA, DH and DSA key parameters
|
||||
Creation of X.509 certificates, CSRs and CRLs
|
||||
Creation of X.509 certificates, CSRs and CRLs
|
||||
Calculation of Message Digests
|
||||
Encryption and Decryption with Ciphers
|
||||
SSL/TLS Client and Server Tests
|
||||
Handling of S/MIME signed or encrypted mail
|
||||
|
||||
|
||||
|
||||
PATENTS
|
||||
-------
|
||||
|
||||
@@ -104,13 +104,15 @@
|
||||
licensing conditions. Their web page is http://www.rsasecurity.com/.
|
||||
|
||||
RC4 is a trademark of RSA Security, so use of this label should perhaps
|
||||
only be used with RSA Security's permission.
|
||||
only be used with RSA Security's permission.
|
||||
|
||||
The IDEA algorithm is patented by Ascom in Austria, France, Germany, Italy,
|
||||
Japan, the Netherlands, Spain, Sweden, Switzerland, UK and the USA. They
|
||||
should be contacted if that algorithm is to be used; their web page is
|
||||
http://www.ascom.ch/.
|
||||
|
||||
The MDC2 algorithm is patented by IBM.
|
||||
|
||||
INSTALLATION
|
||||
------------
|
||||
|
||||
@@ -129,7 +131,7 @@
|
||||
or application author. We try to collect those in doc/PROBLEMS, with current
|
||||
thoughts on how they should be solved in a future of OpenSSL.
|
||||
|
||||
SUPPORT
|
||||
SUPPORT
|
||||
-------
|
||||
|
||||
If you have any problems with OpenSSL then please take the following steps
|
||||
@@ -138,7 +140,7 @@
|
||||
- Download the current snapshot from ftp://ftp.openssl.org/snapshot/
|
||||
to see if the problem has already been addressed
|
||||
- Remove ASM versions of libraries
|
||||
- Remove compiler optimisation flags
|
||||
- Remove compiler optimisation flags
|
||||
|
||||
If you wish to report a bug then please include the following information in
|
||||
any bug report:
|
||||
@@ -191,3 +193,4 @@
|
||||
# ./Configure dist; make clean
|
||||
# cd ..
|
||||
# diff -ur openssl-orig openssl-work > mydiffs.patch
|
||||
|
||||
|
||||
10
STATUS
10
STATUS
@@ -1,10 +1,16 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2004/03/17 12:01:16 $
|
||||
______________ $Date: 2005/10/11 10:10:03 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.8: Under development...
|
||||
o OpenSSL 0.9.9: Under development...
|
||||
o OpenSSL 0.9.8a: Released on October 11th, 2005
|
||||
o OpenSSL 0.9.8: Released on July 5th, 2005
|
||||
o OpenSSL 0.9.7h: Released on October 11th, 2005
|
||||
o OpenSSL 0.9.7g: Released on April 11th, 2005
|
||||
o OpenSSL 0.9.7f: Released on March 22nd, 2005
|
||||
o OpenSSL 0.9.7e: Released on October 25th, 2004
|
||||
o OpenSSL 0.9.7d: Released on March 17th, 2004
|
||||
o OpenSSL 0.9.7c: Released on September 30th, 2003
|
||||
o OpenSSL 0.9.7b: Released on April 10th, 2003
|
||||
|
||||
221
TABLE
221
TABLE
@@ -92,11 +92,11 @@ $cast_obj = asm/cx86-out.o
|
||||
$rc4_obj = asm/rx86-out.o
|
||||
$rmd160_obj = asm/rm86-out.o
|
||||
$rc5_obj = asm/r586-out.o
|
||||
$dso_scheme = win32
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= cygwin-shared
|
||||
$shared_cflag =
|
||||
$shared_cflag = -D_WINDLL
|
||||
$shared_ldflag =
|
||||
$shared_extension = .dll
|
||||
$shared_extension = .dll.a
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
@@ -1427,7 +1427,7 @@ $arflags =
|
||||
|
||||
*** darwin-ppc-cc
|
||||
$cc = cc
|
||||
$cflags = -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
|
||||
$cflags = -O3 -fomit-frame-pointer -DB_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id = MACOSX
|
||||
@@ -1442,9 +1442,9 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= darwin-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_cflag = -fPIC -fno-common
|
||||
$shared_ldflag =
|
||||
$shared_extension = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib
|
||||
$ranlib =
|
||||
@@ -1895,7 +1895,7 @@ $rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -KPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -G -dy -z text
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -1945,7 +1945,7 @@ $rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -KPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -G -dy -z text
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2231,7 +2231,7 @@ $cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2245,7 +2245,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2256,7 +2256,7 @@ $cflags = -DB_ENDIAN -DBN_DIV2W -O3
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2270,7 +2270,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -shared
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2281,7 +2281,7 @@ $cflags = -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2295,7 +2295,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2306,7 +2306,7 @@ $cflags = -DB_ENDIAN -DBN_DIV2W -O3
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2320,7 +2320,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -shared
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2331,8 +2331,8 @@ $cflags = -Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj = asm/ia64-cpp.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
@@ -2345,8 +2345,8 @@ $rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$shared_ldflag = -b
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
@@ -2381,7 +2381,7 @@ $cflags = +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD3
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+cdp,../:,+cdp,./:,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2395,7 +2395,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2406,7 +2406,7 @@ $cflags = -Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = -ldld
|
||||
$lflags = -Wl,+cdp,../:,+cdp,./:,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2420,7 +2420,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2431,7 +2431,7 @@ $cflags = -O3 -DB_ENDIAN -DBN_DIV2W
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+cdp,../:,+cdp,./:,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2445,7 +2445,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -shared
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2456,7 +2456,7 @@ $cflags = +DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -D
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+cdp,../:,+cdp,./:,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2470,7 +2470,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2481,7 +2481,7 @@ $cflags = +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -D
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+cdp,../:,+cdp,./:,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj = asm/pa-risc2.o
|
||||
$des_obj =
|
||||
@@ -2495,7 +2495,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2506,7 +2506,7 @@ $cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2520,7 +2520,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2531,7 +2531,7 @@ $cflags = -DB_ENDIAN -DBN_DIV2W -O3
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2545,7 +2545,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -shared
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2556,7 +2556,7 @@ $cflags = -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2570,7 +2570,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2581,7 +2581,7 @@ $cflags = -DB_ENDIAN -DBN_DIV2W -O3
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldld
|
||||
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2595,7 +2595,7 @@ $rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -shared
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2606,8 +2606,8 @@ $cflags = -Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj = asm/ia64-cpp.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
@@ -2618,10 +2618,10 @@ $rc4_obj = asm/rc4-ia64.o
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= hpux64-shared
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$shared_ldflag = +DD64 -b
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
@@ -2631,7 +2631,7 @@ $cflags = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2643,9 +2643,9 @@ $rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= hpux64-shared
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = +DD64 -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2656,7 +2656,7 @@ $cflags = -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2668,9 +2668,9 @@ $rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= hpux64-shared
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fpic
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -shared
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2681,7 +2681,7 @@ $cflags = +DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XAR
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj = asm/pa-risc2W.o
|
||||
$des_obj =
|
||||
@@ -2693,9 +2693,9 @@ $rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= hpux64-shared
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = +Z
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = +DD64 -b
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -2706,7 +2706,7 @@ $cflags = -O3 -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$lflags = -Wl,+s,+b,$(INSTALLTOP)/lib -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj = asm/pa-risc2W.o
|
||||
$des_obj =
|
||||
@@ -2718,9 +2718,9 @@ $rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= hpux64-shared
|
||||
$shared_cflag = -fpic
|
||||
$shared_ldflag =
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = -shared
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -3052,7 +3052,7 @@ $arflags =
|
||||
|
||||
*** linux-elf-arm
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
|
||||
$cflags = -DTERMIO -O3 -fomit-frame-pointer -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -3075,31 +3075,6 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** linux-em64t
|
||||
$cc = gcc
|
||||
$cflags = -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_obj = asm/x86_64-gcc.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = -m64
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** linux-ia64
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
|
||||
@@ -3107,7 +3082,7 @@ $unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR
|
||||
$bn_obj = asm/ia64.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
@@ -3132,7 +3107,7 @@ $unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR
|
||||
$bn_obj = asm/ia64.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
@@ -3507,14 +3482,14 @@ $unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_obj = asm/x86_64-gcc.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = asm/rc4-amd64.o
|
||||
$rc4_obj = asm/rc4-x86_64.o
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
@@ -3552,12 +3527,12 @@ $arflags =
|
||||
|
||||
*** mingw
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall
|
||||
$cflags = -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall -D_WIN32_WINNT=0x333
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id = MINGW32
|
||||
$lflags = -mno-cygwin -lwsock32 -lgdi32
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$lflags = -lwsock32 -lgdi32
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT EXPORT_VAR_AS_FN
|
||||
$bn_obj = asm/bn86-out.o asm/co86-out.o
|
||||
$des_obj = asm/dx86-out.o asm/yx86-out.o
|
||||
$bf_obj = asm/bx86-out.o
|
||||
@@ -3568,10 +3543,10 @@ $rc4_obj = asm/rx86-out.o
|
||||
$rmd160_obj = asm/rm86-out.o
|
||||
$rc5_obj = asm/r586-out.o
|
||||
$dso_scheme = win32
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension = .dll
|
||||
$shared_target= cygwin-shared
|
||||
$shared_cflag = -D_WINDLL
|
||||
$shared_ldflag = -mno-cygwin
|
||||
$shared_extension = .dll.a
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
@@ -3870,7 +3845,7 @@ $rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -KPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -G -dy -z text
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -3895,7 +3870,7 @@ $rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -KPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -G -dy -z text
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -3995,7 +3970,7 @@ $rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -KPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -G -dy -z text
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -4070,7 +4045,7 @@ $rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -KPIC
|
||||
$shared_ldflag =
|
||||
$shared_ldflag = -G -dy -z text
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
@@ -4120,7 +4095,7 @@ $rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -KPIC
|
||||
$shared_ldflag = -xarch=v9
|
||||
$shared_ldflag = -xarch=v9 -G -dy -z text
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib = /usr/ccs/bin/ar rs
|
||||
$arflags =
|
||||
@@ -4175,6 +4150,56 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** solaris64-x86_64-cc
|
||||
$cc = cc
|
||||
$cflags = -fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -KPIC
|
||||
$shared_ldflag = -xarch=amd64 -G -dy -z text
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** solaris64-x86_64-gcc
|
||||
$cc = gcc
|
||||
$cflags = -m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_obj = asm/x86_64-gcc.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = asm/rc4-x86_64.o
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = -m64 -shared -static-libgcc
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** sunos-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -mv8 -Dssize_t=int
|
||||
|
||||
@@ -4,3 +4,5 @@ der_chop
|
||||
der_chop.bak
|
||||
CA.pl
|
||||
openssl.sha1
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -36,13 +36,21 @@
|
||||
# default openssl.cnf file has setup as per the following
|
||||
# demoCA ... where everything is stored
|
||||
|
||||
my $openssl;
|
||||
if(defined $ENV{OPENSSL}) {
|
||||
$openssl = $ENV{OPENSSL};
|
||||
} else {
|
||||
$openssl = "openssl";
|
||||
$ENV{OPENSSL} = $openssl;
|
||||
}
|
||||
|
||||
$SSLEAY_CONFIG=$ENV{"SSLEAY_CONFIG"};
|
||||
$DAYS="-days 365";
|
||||
$REQ="openssl req $SSLEAY_CONFIG";
|
||||
$CA="openssl ca $SSLEAY_CONFIG";
|
||||
$VERIFY="openssl verify";
|
||||
$X509="openssl x509";
|
||||
$PKCS12="openssl pkcs12";
|
||||
$REQ="$openssl req $SSLEAY_CONFIG";
|
||||
$CA="$openssl ca $SSLEAY_CONFIG";
|
||||
$VERIFY="$openssl verify";
|
||||
$X509="$openssl x509";
|
||||
$PKCS12="$openssl pkcs12";
|
||||
|
||||
$CATOP="./demoCA";
|
||||
$CAKEY="cakey.pem";
|
||||
@@ -58,19 +66,19 @@ foreach (@ARGV) {
|
||||
exit 0;
|
||||
} elsif (/^-newcert$/) {
|
||||
# create a certificate
|
||||
system ("$REQ -new -x509 -keyout newreq.pem -out newreq.pem $DAYS");
|
||||
system ("$REQ -new -x509 -keyout newkey.pem -out newcert.pem $DAYS");
|
||||
$RET=$?;
|
||||
print "Certificate (and private key) is in newreq.pem\n"
|
||||
print "Certificate is in newcert.pem, private key is in newkey.pem\n"
|
||||
} elsif (/^-newreq$/) {
|
||||
# create a certificate request
|
||||
system ("$REQ -new -keyout newreq.pem -out newreq.pem $DAYS");
|
||||
system ("$REQ -new -keyout newkey.pem -out newreq.pem $DAYS");
|
||||
$RET=$?;
|
||||
print "Request (and private key) is in newreq.pem\n";
|
||||
print "Request is in newreq.pem, private key is in newkey.pem\n";
|
||||
} elsif (/^-newreq-nodes$/) {
|
||||
# create a certificate request
|
||||
system ("$REQ -new -nodes -keyout newreq.pem -out newreq.pem $DAYS");
|
||||
system ("$REQ -new -nodes -keyout newkey.pem -out newreq.pem $DAYS");
|
||||
$RET=$?;
|
||||
print "Request (and private key) is in newreq.pem\n";
|
||||
print "Request is in newreq.pem, private key is in newkey.pem\n";
|
||||
} elsif (/^-newca$/) {
|
||||
# if explicitly asked for or it doesn't exist then setup the
|
||||
# directory structure that Eric likes to manage things
|
||||
@@ -110,10 +118,11 @@ foreach (@ARGV) {
|
||||
} elsif (/^-pkcs12$/) {
|
||||
my $cname = $ARGV[1];
|
||||
$cname = "My Certificate" unless defined $cname;
|
||||
system ("$PKCS12 -in newcert.pem -inkey newreq.pem " .
|
||||
system ("$PKCS12 -in newcert.pem -inkey newkey.pem " .
|
||||
"-certfile ${CATOP}/$CACERT -out newcert.p12 " .
|
||||
"-export -name \"$cname\"");
|
||||
$RET=$?;
|
||||
print "PKCS #12 file is in newcert.p12\n";
|
||||
exit $RET;
|
||||
} elsif (/^-xsign$/) {
|
||||
system ("$CA -policy policy_anything -infiles newreq.pem");
|
||||
|
||||
18
apps/CA.sh
18
apps/CA.sh
@@ -30,11 +30,13 @@
|
||||
# default openssl.cnf file has setup as per the following
|
||||
# demoCA ... where everything is stored
|
||||
|
||||
if [ -z "$OPENSSL" ]; then OPENSSL=openssl; fi
|
||||
|
||||
DAYS="-days 365"
|
||||
REQ="openssl req $SSLEAY_CONFIG"
|
||||
CA="openssl ca $SSLEAY_CONFIG"
|
||||
VERIFY="openssl verify"
|
||||
X509="openssl x509"
|
||||
REQ="$OPENSSL req $SSLEAY_CONFIG"
|
||||
CA="$OPENSSL ca $SSLEAY_CONFIG"
|
||||
VERIFY="$OPENSSL verify"
|
||||
X509="$OPENSSL x509"
|
||||
|
||||
CATOP=./demoCA
|
||||
CAKEY=./cakey.pem
|
||||
@@ -49,15 +51,15 @@ case $i in
|
||||
;;
|
||||
-newcert)
|
||||
# create a certificate
|
||||
$REQ -new -x509 -keyout newreq.pem -out newreq.pem $DAYS
|
||||
$REQ -new -x509 -keyout newkey.pem -out newcert.pem $DAYS
|
||||
RET=$?
|
||||
echo "Certificate (and private key) is in newreq.pem"
|
||||
echo "Certificate is in newcert.pem, private key is in newkey.pem"
|
||||
;;
|
||||
-newreq)
|
||||
# create a certificate request
|
||||
$REQ -new -keyout newreq.pem -out newreq.pem $DAYS
|
||||
$REQ -new -keyout newkey.pem -out newreq.pem $DAYS
|
||||
RET=$?
|
||||
echo "Request (and private key) is in newreq.pem"
|
||||
echo "Request is in newreq.pem, private key is in newkey.pem"
|
||||
;;
|
||||
-newca)
|
||||
# if explicitly asked for or it doesn't exist then setup the directory
|
||||
|
||||
@@ -101,8 +101,17 @@ install:
|
||||
(echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
|
||||
done;
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
|
||||
sig="$$i.$${HMAC_EXT:-sha1}"; \
|
||||
if [ -f $$sig ]; then \
|
||||
echo installing $$sig; \
|
||||
cp $$sig $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$sig.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$sig.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$sig.new \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$sig; \
|
||||
fi; \
|
||||
) done;
|
||||
@for i in $(SCRIPTS); \
|
||||
do \
|
||||
(echo installing $$i; \
|
||||
@@ -143,29 +152,23 @@ $(DLIBCRYPTO):
|
||||
|
||||
$(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
||||
$(RM) $(EXE)
|
||||
if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
|
||||
$(CC) -o $(EXE) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
|
||||
SHARED_LIBS="$(SHARED_LIBS)"; \
|
||||
if [ "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
|
||||
SHARED_LIBS=""; \
|
||||
fi; \
|
||||
if [ -z "$(SHARED_LIBS)" ]; then \
|
||||
set -x; $${CC:-$(CC)} -o $(EXE) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
|
||||
else \
|
||||
LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
|
||||
set -x; LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
|
||||
$(CC) -o $(EXE) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
|
||||
fi
|
||||
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(EXE); \
|
||||
fi; \
|
||||
if [ -z "$$SHARED_LIBS" ]; then \
|
||||
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(EXE); \
|
||||
fi; \
|
||||
fi
|
||||
-(cd ..; \
|
||||
OPENSSL="`pwd`/apps/$(EXE)"; export OPENSSL; \
|
||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then \
|
||||
PATH="`pwd`:$$PATH"; \
|
||||
fi; \
|
||||
LD_PRELOAD="`pwd`/libssl.so `pwd`/libcrypto.so"; \
|
||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||
export LD_PRELOAD; \
|
||||
fi; \
|
||||
OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
|
||||
progs.h: progs.pl
|
||||
|
||||
102
apps/apps.c
102
apps/apps.c
@@ -330,22 +330,6 @@ void program_name(char *in, char *out, int size)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
int VMS_strcasecmp(const char *str1, const char *str2)
|
||||
{
|
||||
while (*str1 && *str2)
|
||||
{
|
||||
int res = toupper(*str1) - toupper(*str2);
|
||||
if (res) return res < 0 ? -1 : 1;
|
||||
}
|
||||
if (*str1)
|
||||
return 1;
|
||||
if (*str2)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[])
|
||||
{
|
||||
int num,len,i;
|
||||
@@ -377,10 +361,17 @@ int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[])
|
||||
/* The start of something good :-) */
|
||||
if (num >= arg->count)
|
||||
{
|
||||
arg->count+=20;
|
||||
arg->data=(char **)OPENSSL_realloc(arg->data,
|
||||
sizeof(char *)*arg->count);
|
||||
if (argc == 0) return(0);
|
||||
char **tmp_p;
|
||||
int tlen = arg->count + 20;
|
||||
tmp_p = (char **)OPENSSL_realloc(arg->data,
|
||||
sizeof(char *)*tlen);
|
||||
if (tmp_p == NULL)
|
||||
return 0;
|
||||
arg->data = tmp_p;
|
||||
arg->count = tlen;
|
||||
/* initialize newly allocated data */
|
||||
for (i = num; i < arg->count; i++)
|
||||
arg->data[i] = NULL;
|
||||
}
|
||||
arg->data[num++]=p;
|
||||
|
||||
@@ -691,6 +682,51 @@ int add_oid_section(BIO *err, CONF *conf)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int load_pkcs12(BIO *err, BIO *in, const char *desc,
|
||||
pem_password_cb *pem_cb, void *cb_data,
|
||||
EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca)
|
||||
{
|
||||
const char *pass;
|
||||
char tpass[PEM_BUFSIZE];
|
||||
int len, ret = 0;
|
||||
PKCS12 *p12;
|
||||
p12 = d2i_PKCS12_bio(in, NULL);
|
||||
if (p12 == NULL)
|
||||
{
|
||||
BIO_printf(err, "Error loading PKCS12 file for %s\n", desc);
|
||||
goto die;
|
||||
}
|
||||
/* See if an empty password will do */
|
||||
if (PKCS12_verify_mac(p12, "", 0) || PKCS12_verify_mac(p12, NULL, 0))
|
||||
pass = "";
|
||||
else
|
||||
{
|
||||
if (!pem_cb)
|
||||
pem_cb = (pem_password_cb *)password_callback;
|
||||
len = pem_cb(tpass, PEM_BUFSIZE, 0, cb_data);
|
||||
if (len < 0)
|
||||
{
|
||||
BIO_printf(err, "Passpharse callback error for %s\n",
|
||||
desc);
|
||||
goto die;
|
||||
}
|
||||
if (len < PEM_BUFSIZE)
|
||||
tpass[len] = 0;
|
||||
if (!PKCS12_verify_mac(p12, tpass, len))
|
||||
{
|
||||
BIO_printf(err,
|
||||
"Mac verify error (wrong password?) in PKCS12 file for %s\n", desc);
|
||||
goto die;
|
||||
}
|
||||
pass = tpass;
|
||||
}
|
||||
ret = PKCS12_parse(p12, pass, pkey, cert, ca);
|
||||
die:
|
||||
if (p12)
|
||||
PKCS12_free(p12);
|
||||
return ret;
|
||||
}
|
||||
|
||||
X509 *load_cert(BIO *err, const char *file, int format,
|
||||
const char *pass, ENGINE *e, const char *cert_descrip)
|
||||
{
|
||||
@@ -771,11 +807,9 @@ X509 *load_cert(BIO *err, const char *file, int format,
|
||||
(pem_password_cb *)password_callback, NULL);
|
||||
else if (format == FORMAT_PKCS12)
|
||||
{
|
||||
PKCS12 *p12 = d2i_PKCS12_bio(cert, NULL);
|
||||
|
||||
PKCS12_parse(p12, NULL, NULL, &x, NULL);
|
||||
PKCS12_free(p12);
|
||||
p12 = NULL;
|
||||
if (!load_pkcs12(err, cert,cert_descrip, NULL, NULL,
|
||||
NULL, &x, NULL))
|
||||
goto end;
|
||||
}
|
||||
else {
|
||||
BIO_printf(err,"bad input format specified for %s\n",
|
||||
@@ -854,11 +888,10 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
|
||||
#endif
|
||||
else if (format == FORMAT_PKCS12)
|
||||
{
|
||||
PKCS12 *p12 = d2i_PKCS12_bio(key, NULL);
|
||||
|
||||
PKCS12_parse(p12, pass, &pkey, NULL, NULL);
|
||||
PKCS12_free(p12);
|
||||
p12 = NULL;
|
||||
if (!load_pkcs12(err, key, key_descrip,
|
||||
(pem_password_cb *)password_callback, &cb_data,
|
||||
&pkey, NULL, NULL))
|
||||
goto end;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1565,8 +1598,9 @@ int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix)
|
||||
{
|
||||
if (errno != ENOENT
|
||||
#ifdef ENOTDIR
|
||||
&& errno != ENOTDIR)
|
||||
&& errno != ENOTDIR
|
||||
#endif
|
||||
)
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
@@ -1867,8 +1901,9 @@ int rotate_index(char *dbfile, char *new_suffix, char *old_suffix)
|
||||
{
|
||||
if (errno != ENOENT
|
||||
#ifdef ENOTDIR
|
||||
&& errno != ENOTDIR)
|
||||
&& errno != ENOTDIR
|
||||
#endif
|
||||
)
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
@@ -1903,8 +1938,9 @@ int rotate_index(char *dbfile, char *new_suffix, char *old_suffix)
|
||||
{
|
||||
if (errno != ENOENT
|
||||
#ifdef ENOTDIR
|
||||
&& errno != ENOTDIR)
|
||||
&& errno != ENOTDIR
|
||||
#endif
|
||||
)
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -182,7 +182,7 @@ int MAIN(int argc, char **argv)
|
||||
bad:
|
||||
BIO_printf(bio_err,"%s [options] <infile\n",prog);
|
||||
BIO_printf(bio_err,"where options are\n");
|
||||
BIO_printf(bio_err," -inform arg input format - one of DER TXT PEM\n");
|
||||
BIO_printf(bio_err," -inform arg input format - one of DER PEM\n");
|
||||
BIO_printf(bio_err," -in arg input file\n");
|
||||
BIO_printf(bio_err," -out arg output file (output format is always DER\n");
|
||||
BIO_printf(bio_err," -noout arg don't produce any output\n");
|
||||
|
||||
@@ -943,7 +943,6 @@ bad:
|
||||
if (verbose) BIO_printf(bio_err,
|
||||
"Done. %d entries marked as expired\n",i);
|
||||
}
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
27
apps/dgst.c
27
apps/dgst.c
@@ -78,7 +78,7 @@ static HMAC_CTX hmac_ctx;
|
||||
|
||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
|
||||
const char *file,BIO *bmd,const char *hmac_key);
|
||||
const char *file,BIO *bmd,const char *hmac_key, int non_fips_allow);
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
@@ -108,6 +108,7 @@ int MAIN(int argc, char **argv)
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
char *hmac_key=NULL;
|
||||
int non_fips_allow = 0;
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -192,6 +193,8 @@ int MAIN(int argc, char **argv)
|
||||
out_bin = 1;
|
||||
else if (strcmp(*argv,"-d") == 0)
|
||||
debug=1;
|
||||
else if (strcmp(*argv,"-non-fips-allow") == 0)
|
||||
non_fips_allow=1;
|
||||
else if (!strcmp(*argv,"-hmac"))
|
||||
{
|
||||
if (--argc < 1)
|
||||
@@ -342,10 +345,18 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (non_fips_allow)
|
||||
{
|
||||
EVP_MD_CTX *md_ctx;
|
||||
BIO_get_md_ctx(bmd,&md_ctx);
|
||||
EVP_MD_CTX_set_flags(md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
|
||||
}
|
||||
|
||||
/* we use md as a filter, reading from 'in' */
|
||||
if (!BIO_set_md(bmd,md))
|
||||
{
|
||||
BIO_printf(bio_err, "Error setting digest %s\n", pname);
|
||||
BIO_printf(bio_err, "Error setting digest %s\n",
|
||||
EVP_MD_name(md));
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
@@ -356,7 +367,7 @@ int MAIN(int argc, char **argv)
|
||||
{
|
||||
BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
||||
err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
|
||||
siglen,"","(stdin)",bmd,hmac_key);
|
||||
siglen,"","(stdin)",bmd,hmac_key, non_fips_allow);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -382,7 +393,7 @@ int MAIN(int argc, char **argv)
|
||||
else
|
||||
tmp="";
|
||||
r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
|
||||
siglen,tmp,argv[i],bmd,hmac_key);
|
||||
siglen,tmp,argv[i],bmd,hmac_key,non_fips_allow);
|
||||
if(r)
|
||||
err=r;
|
||||
if(tofree)
|
||||
@@ -409,7 +420,7 @@ end:
|
||||
|
||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
|
||||
const char *file,BIO *bmd,const char *hmac_key)
|
||||
const char *file,BIO *bmd,const char *hmac_key, int non_fips_allow)
|
||||
{
|
||||
unsigned int len;
|
||||
int i;
|
||||
@@ -420,7 +431,11 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
EVP_MD *md;
|
||||
|
||||
BIO_get_md(bmd,&md);
|
||||
HMAC_Init(&hmac_ctx,hmac_key,strlen(hmac_key),md);
|
||||
HMAC_CTX_init(&hmac_ctx);
|
||||
if (non_fips_allow)
|
||||
HMAC_CTX_set_flags(&hmac_ctx,
|
||||
EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
|
||||
HMAC_Init_ex(&hmac_ctx,hmac_key,strlen(hmac_key),md, NULL);
|
||||
BIO_get_md_ctx(bmd,&md_ctx);
|
||||
BIO_set_md_ctx(bmd,&hmac_ctx.md_ctx);
|
||||
}
|
||||
|
||||
44
apps/enc.c
44
apps/enc.c
@@ -118,6 +118,7 @@ int MAIN(int argc, char **argv)
|
||||
int enc=1,printkey=0,i,base64=0;
|
||||
int debug=0,olb64=0,nosalt=0;
|
||||
const EVP_CIPHER *cipher=NULL,*c;
|
||||
EVP_CIPHER_CTX *ctx = NULL;
|
||||
char *inf=NULL,*outf=NULL;
|
||||
BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
|
||||
#define PROG_NAME_SIZE 39
|
||||
@@ -126,6 +127,7 @@ int MAIN(int argc, char **argv)
|
||||
char *engine = NULL;
|
||||
#endif
|
||||
const EVP_MD *dgst=NULL;
|
||||
int non_fips_allow = 0;
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -260,6 +262,8 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
md= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-non-fips-allow") == 0)
|
||||
non_fips_allow = 1;
|
||||
else if ((argv[0][0] == '-') &&
|
||||
((c=EVP_get_cipherbyname(&(argv[0][1]))) != NULL))
|
||||
{
|
||||
@@ -539,13 +543,43 @@ bad:
|
||||
|
||||
if ((benc=BIO_new(BIO_f_cipher())) == NULL)
|
||||
goto end;
|
||||
BIO_set_cipher(benc,cipher,key,iv,enc);
|
||||
if (nopad)
|
||||
|
||||
/* Since we may be changing parameters work on the encryption
|
||||
* context rather than calling BIO_set_cipher().
|
||||
*/
|
||||
|
||||
BIO_get_cipher_ctx(benc, &ctx);
|
||||
if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc))
|
||||
{
|
||||
EVP_CIPHER_CTX *ctx;
|
||||
BIO_get_cipher_ctx(benc, &ctx);
|
||||
EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||
BIO_printf(bio_err, "Error setting cipher %s\n",
|
||||
EVP_CIPHER_name(cipher));
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (non_fips_allow)
|
||||
EVP_CIPHER_CTX_set_flags(ctx,
|
||||
EVP_CIPH_FLAG_NON_FIPS_ALLOW);
|
||||
|
||||
if (!EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, enc))
|
||||
{
|
||||
BIO_printf(bio_err, "Error setting cipher %s\n",
|
||||
EVP_CIPHER_name(cipher));
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (nopad)
|
||||
EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||
|
||||
if (!EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, enc))
|
||||
{
|
||||
BIO_printf(bio_err, "Error setting cipher %s\n",
|
||||
EVP_CIPHER_name(cipher));
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
BIO_set_callback(benc,BIO_debug_callback);
|
||||
|
||||
@@ -387,11 +387,15 @@ int MAIN(int argc, char **argv)
|
||||
else if (strcmp(*argv,"-pre") == 0)
|
||||
{
|
||||
argc--; argv++;
|
||||
if (argc == 0)
|
||||
goto skip_arg_loop;
|
||||
sk_push(pre_cmds,*argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-post") == 0)
|
||||
{
|
||||
argc--; argv++;
|
||||
if (argc == 0)
|
||||
goto skip_arg_loop;
|
||||
sk_push(post_cmds,*argv);
|
||||
}
|
||||
else if ((strncmp(*argv,"-h",2) == 0) ||
|
||||
|
||||
@@ -88,6 +88,9 @@ int MAIN(int argc, char **argv)
|
||||
RSA *rsa=NULL;
|
||||
int i,num=DEFBITS;
|
||||
long l;
|
||||
#ifdef OPENSSL_FIPS
|
||||
int use_x931 = 0;
|
||||
#endif
|
||||
const EVP_CIPHER *enc=NULL;
|
||||
unsigned long f4=RSA_F4;
|
||||
char *outfile=NULL;
|
||||
@@ -126,6 +129,10 @@ int MAIN(int argc, char **argv)
|
||||
f4=3;
|
||||
else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
|
||||
f4=RSA_F4;
|
||||
#ifdef OPENSSL_FIPS
|
||||
else if (strcmp(*argv,"-x931") == 0)
|
||||
use_x931 = 1;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
@@ -233,11 +240,27 @@ bad:
|
||||
|
||||
BIO_printf(bio_err,"Generating RSA private key, %d bit long modulus\n",
|
||||
num);
|
||||
rsa=RSA_generate_key(num,f4,genrsa_cb,bio_err);
|
||||
#ifdef OPENSSL_FIPS
|
||||
if (use_x931)
|
||||
{
|
||||
BIGNUM *pubexp;
|
||||
pubexp = BN_new();
|
||||
BN_set_word(pubexp, f4);
|
||||
rsa = RSA_X931_generate_key(num, pubexp, genrsa_cb, bio_err);
|
||||
BN_free(pubexp);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
rsa=RSA_generate_key(num,f4,genrsa_cb,bio_err);
|
||||
|
||||
app_RAND_write_file(NULL, bio_err);
|
||||
|
||||
if (rsa == NULL) goto err;
|
||||
if (rsa == NULL)
|
||||
{
|
||||
BIO_printf(bio_err, "Key Generation error\n");
|
||||
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* We need to do the following for when the base number size is <
|
||||
* long, esp windows 3.1 :-(. */
|
||||
|
||||
@@ -650,7 +650,7 @@ $ CCDEFS = "MONOLITH"
|
||||
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
|
||||
$ CCEXTRAFLAGS = ""
|
||||
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
|
||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX"
|
||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
|
||||
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
|
||||
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
|
||||
$!
|
||||
|
||||
@@ -258,3 +258,56 @@ basicConstraints = CA:true
|
||||
|
||||
# issuerAltName=issuer:copy
|
||||
authorityKeyIdentifier=keyid:always,issuer:always
|
||||
|
||||
[ proxy_cert_ext ]
|
||||
# These extensions should be added when creating a proxy certificate
|
||||
|
||||
# This goes against PKIX guidelines but some CAs do it and some software
|
||||
# requires this to avoid interpreting an end user certificate as a CA.
|
||||
|
||||
basicConstraints=CA:FALSE
|
||||
|
||||
# Here are some examples of the usage of nsCertType. If it is omitted
|
||||
# the certificate can be used for anything *except* object signing.
|
||||
|
||||
# This is OK for an SSL server.
|
||||
# nsCertType = server
|
||||
|
||||
# For an object signing certificate this would be used.
|
||||
# nsCertType = objsign
|
||||
|
||||
# For normal client use this is typical
|
||||
# nsCertType = client, email
|
||||
|
||||
# and for everything including object signing:
|
||||
# nsCertType = client, email, objsign
|
||||
|
||||
# This is typical in keyUsage for a client certificate.
|
||||
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
||||
|
||||
# This will be displayed in Netscape's comment listbox.
|
||||
nsComment = "OpenSSL Generated Certificate"
|
||||
|
||||
# PKIX recommendations harmless if included in all certificates.
|
||||
subjectKeyIdentifier=hash
|
||||
authorityKeyIdentifier=keyid,issuer:always
|
||||
|
||||
# This stuff is for subjectAltName and issuerAltname.
|
||||
# Import the email address.
|
||||
# subjectAltName=email:copy
|
||||
# An alternative to produce certificates that aren't
|
||||
# deprecated according to PKIX.
|
||||
# subjectAltName=email:move
|
||||
|
||||
# Copy subject details
|
||||
# issuerAltName=issuer:copy
|
||||
|
||||
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
|
||||
#nsBaseUrl
|
||||
#nsRevocationUrl
|
||||
#nsRenewalUrl
|
||||
#nsCaPolicyUrl
|
||||
#nsSslServerName
|
||||
|
||||
# This really needs to be in place for it to be a proxy certificate.
|
||||
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
|
||||
|
||||
@@ -247,11 +247,9 @@ int main(int Argc, char *Argv[])
|
||||
if (!FIPS_mode_set(1,p)) {
|
||||
ERR_load_crypto_strings();
|
||||
ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE));
|
||||
exit(1);
|
||||
EXIT(1);
|
||||
}
|
||||
in_FIPS_mode = 1;
|
||||
if (getenv("OPENSSL_FIPS_MD5"))
|
||||
FIPS_allow_md5(1);
|
||||
}
|
||||
#endif
|
||||
if (bio_err == NULL)
|
||||
|
||||
@@ -258,3 +258,56 @@ basicConstraints = CA:true
|
||||
|
||||
# issuerAltName=issuer:copy
|
||||
authorityKeyIdentifier=keyid:always,issuer:always
|
||||
|
||||
[ proxy_cert_ext ]
|
||||
# These extensions should be added when creating a proxy certificate
|
||||
|
||||
# This goes against PKIX guidelines but some CAs do it and some software
|
||||
# requires this to avoid interpreting an end user certificate as a CA.
|
||||
|
||||
basicConstraints=CA:FALSE
|
||||
|
||||
# Here are some examples of the usage of nsCertType. If it is omitted
|
||||
# the certificate can be used for anything *except* object signing.
|
||||
|
||||
# This is OK for an SSL server.
|
||||
# nsCertType = server
|
||||
|
||||
# For an object signing certificate this would be used.
|
||||
# nsCertType = objsign
|
||||
|
||||
# For normal client use this is typical
|
||||
# nsCertType = client, email
|
||||
|
||||
# and for everything including object signing:
|
||||
# nsCertType = client, email, objsign
|
||||
|
||||
# This is typical in keyUsage for a client certificate.
|
||||
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
||||
|
||||
# This will be displayed in Netscape's comment listbox.
|
||||
nsComment = "OpenSSL Generated Certificate"
|
||||
|
||||
# PKIX recommendations harmless if included in all certificates.
|
||||
subjectKeyIdentifier=hash
|
||||
authorityKeyIdentifier=keyid,issuer:always
|
||||
|
||||
# This stuff is for subjectAltName and issuerAltname.
|
||||
# Import the email address.
|
||||
# subjectAltName=email:copy
|
||||
# An alternative to produce certificates that aren't
|
||||
# deprecated according to PKIX.
|
||||
# subjectAltName=email:move
|
||||
|
||||
# Copy subject details
|
||||
# issuerAltName=issuer:copy
|
||||
|
||||
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
|
||||
#nsBaseUrl
|
||||
#nsRevocationUrl
|
||||
#nsRenewalUrl
|
||||
#nsCaPolicyUrl
|
||||
#nsSslServerName
|
||||
|
||||
# This really needs to be in place for it to be a proxy certificate.
|
||||
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
|
||||
|
||||
@@ -109,7 +109,7 @@ int MAIN(int argc, char **argv)
|
||||
int maciter = PKCS12_DEFAULT_ITER;
|
||||
int twopass = 0;
|
||||
int keytype = 0;
|
||||
int cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC;
|
||||
int cert_pbe;
|
||||
int key_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
|
||||
int ret = 1;
|
||||
int macver = 1;
|
||||
@@ -126,6 +126,13 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
apps_startup();
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
if (FIPS_mode())
|
||||
cert_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
|
||||
else
|
||||
#endif
|
||||
cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC;
|
||||
|
||||
enc = EVP_des_ede3_cbc();
|
||||
if (bio_err == NULL ) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ int MAIN(int argc, char **argv)
|
||||
char *passin = NULL, *passout = NULL;
|
||||
char *p;
|
||||
char *subj = NULL;
|
||||
const EVP_MD *md_alg=NULL,*digest=EVP_md5();
|
||||
const EVP_MD *md_alg=NULL,*digest;
|
||||
unsigned long chtype = MBSTRING_ASC;
|
||||
#ifndef MONOLITH
|
||||
char *to_free;
|
||||
@@ -197,6 +197,13 @@ int MAIN(int argc, char **argv)
|
||||
informat=FORMAT_PEM;
|
||||
outformat=FORMAT_PEM;
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
if (FIPS_mode())
|
||||
digest = EVP_sha1();
|
||||
else
|
||||
#endif
|
||||
digest = EVP_md5();
|
||||
|
||||
prog=argv[0];
|
||||
argc--;
|
||||
argv++;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* project 2000.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2000 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 2000-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -147,6 +147,7 @@ int MAIN(int argc, char **argv)
|
||||
else if(!strcmp(*argv, "-oaep")) pad = RSA_PKCS1_OAEP_PADDING;
|
||||
else if(!strcmp(*argv, "-ssl")) pad = RSA_SSLV23_PADDING;
|
||||
else if(!strcmp(*argv, "-pkcs")) pad = RSA_PKCS1_PADDING;
|
||||
else if(!strcmp(*argv, "-x931")) pad = RSA_X931_PADDING;
|
||||
else if(!strcmp(*argv, "-sign")) {
|
||||
rsa_mode = RSA_SIGN;
|
||||
need_priv = 1;
|
||||
|
||||
@@ -197,6 +197,9 @@ static void sc_usage(void)
|
||||
BIO_printf(bio_err," -pause - sleep(1) after each read(2) and write(2) system call\n");
|
||||
BIO_printf(bio_err," -showcerts - show all certificates in the chain\n");
|
||||
BIO_printf(bio_err," -debug - extra output\n");
|
||||
#ifdef WATT32
|
||||
BIO_printf(bio_err," -wdebug - WATT-32 tcp debugging\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -msg - Show protocol messages\n");
|
||||
BIO_printf(bio_err," -nbio_test - more ssl protocol testing\n");
|
||||
BIO_printf(bio_err," -state - print the 'ssl' states\n");
|
||||
@@ -348,6 +351,10 @@ int MAIN(int argc, char **argv)
|
||||
c_Pause=1;
|
||||
else if (strcmp(*argv,"-debug") == 0)
|
||||
c_debug=1;
|
||||
#ifdef WATT32
|
||||
else if (strcmp(*argv,"-wdebug") == 0)
|
||||
dbug_init();
|
||||
#endif
|
||||
else if (strcmp(*argv,"-msg") == 0)
|
||||
c_msg=1;
|
||||
else if (strcmp(*argv,"-showcerts") == 0)
|
||||
@@ -588,6 +595,8 @@ re_start:
|
||||
if (starttls_proto == 1)
|
||||
{
|
||||
BIO_read(sbio,mbuf,BUFSIZZ);
|
||||
BIO_printf(sbio,"EHLO some.host.name\r\n");
|
||||
BIO_read(sbio,mbuf,BUFSIZZ);
|
||||
BIO_printf(sbio,"STARTTLS\r\n");
|
||||
BIO_read(sbio,sbuf,BUFSIZZ);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,6 @@ static int ssl_sock_init(void)
|
||||
#ifdef WATT32
|
||||
extern int _watt_do_exit;
|
||||
_watt_do_exit = 0;
|
||||
dbug_init();
|
||||
if (sock_init())
|
||||
return (0);
|
||||
#elif defined(OPENSSL_SYS_WINDOWS)
|
||||
|
||||
@@ -1706,7 +1706,7 @@ show_res:
|
||||
k,rsa_bits[k],rsa_results[k][0],
|
||||
rsa_results[k][1]);
|
||||
else
|
||||
fprintf(stdout,"rsa %4u bits %8.4fs %8.4fs %8.1f %8.1f\n",
|
||||
fprintf(stdout,"rsa %4u bits %8.6fs %8.6fs %8.1f %8.1f\n",
|
||||
rsa_bits[k],rsa_results[k][0],rsa_results[k][1],
|
||||
1.0/rsa_results[k][0],1.0/rsa_results[k][1]);
|
||||
}
|
||||
@@ -1725,7 +1725,7 @@ show_res:
|
||||
fprintf(stdout,"+F3:%u:%u:%f:%f\n",
|
||||
k,dsa_bits[k],dsa_results[k][0],dsa_results[k][1]);
|
||||
else
|
||||
fprintf(stdout,"dsa %4u bits %8.4fs %8.4fs %8.1f %8.1f\n",
|
||||
fprintf(stdout,"dsa %4u bits %8.6fs %8.6fs %8.1f %8.1f\n",
|
||||
dsa_bits[k],dsa_results[k][0],dsa_results[k][1],
|
||||
1.0/dsa_results[k][0],1.0/dsa_results[k][1]);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ int MAIN(int argc, char **argv)
|
||||
X509_REQ *rq=NULL;
|
||||
int fingerprint=0;
|
||||
char buf[256];
|
||||
const EVP_MD *md_alg,*digest=EVP_md5();
|
||||
const EVP_MD *md_alg,*digest;
|
||||
CONF *extconf = NULL;
|
||||
char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL;
|
||||
int need_rand = 0;
|
||||
@@ -216,6 +216,13 @@ int MAIN(int argc, char **argv)
|
||||
if (ctx == NULL) goto end;
|
||||
X509_STORE_set_verify_cb_func(ctx,callb);
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
if (FIPS_mode())
|
||||
digest = EVP_sha1();
|
||||
else
|
||||
#endif
|
||||
digest = EVP_md5();
|
||||
|
||||
argc--;
|
||||
argv++;
|
||||
num=0;
|
||||
|
||||
39
argena.pem
Normal file
39
argena.pem
Normal file
@@ -0,0 +1,39 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIG0zCCBbugAwIBAgIBADANBgkqhkiG9w0BAQUFADCBzDELMAkGA1UEBhMCQVQx
|
||||
EDAOBgNVBAgTB0F1c3RyaWExDzANBgNVBAcTBlZpZW5uYTE6MDgGA1UEChMxQVJH
|
||||
RSBEQVRFTiAtIEF1c3RyaWFuIFNvY2lldHkgZm9yIERhdGEgUHJvdGVjdGlvbjEl
|
||||
MCMGA1UECxMcQS1DRVJUIENlcnRpZmljYXRpb24gU2VydmljZTEYMBYGA1UEAxMP
|
||||
QS1DRVJUIEFEVkFOQ0VEMR0wGwYJKoZIhvcNAQkBFg5pbmZvQGEtY2VydC5hdDAe
|
||||
Fw0wNDEwMjMxNDE0MTRaFw0xMTEwMjMxNDE0MTRaMIHMMQswCQYDVQQGEwJBVDEQ
|
||||
MA4GA1UECBMHQXVzdHJpYTEPMA0GA1UEBxMGVmllbm5hMTowOAYDVQQKEzFBUkdF
|
||||
IERBVEVOIC0gQXVzdHJpYW4gU29jaWV0eSBmb3IgRGF0YSBQcm90ZWN0aW9uMSUw
|
||||
IwYDVQQLExxBLUNFUlQgQ2VydGlmaWNhdGlvbiBTZXJ2aWNlMRgwFgYDVQQDEw9B
|
||||
LUNFUlQgQURWQU5DRUQxHTAbBgkqhkiG9w0BCQEWDmluZm9AYS1jZXJ0LmF0MIIB
|
||||
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3euXIy+mnf6BYKbK+QH5k679
|
||||
tUFqeT8jlZxMew8eNiHuw9KoxWBzL6KksK+5uK7Gatw+sbAYntEGE80P+Jg1hADM
|
||||
e+Fr5V0bc6QS3gkVtfUCW/RIvfMM39oxvmqJmOgPnJU7H6+nmLtsq61tv9kVJi/2
|
||||
4Y5wXW3odet72sF57EoG6s78w0BUVLNcMngS9bZZzmdG3/d6JbkGgoNF/8DcgCBJ
|
||||
W/t0JrcIzyppXIOVtUzzOrrU86zuUgT3Rtkl5kjG7DEHpFb9H0fTOY1v8+gRoaO6
|
||||
2gA0PCiysgVZjwgVeYe3KAg11nznyleDv198uK3Dc1oXIGYjJx2FpKWUvAuAEwID
|
||||
AQABo4ICvDCCArgwHQYDVR0OBBYEFDd/Pj6ZcWDKJNSRE3nQdCm0qCTYMIH5BgNV
|
||||
HSMEgfEwge6AFDd/Pj6ZcWDKJNSRE3nQdCm0qCTYoYHSpIHPMIHMMQswCQYDVQQG
|
||||
EwJBVDEQMA4GA1UECBMHQXVzdHJpYTEPMA0GA1UEBxMGVmllbm5hMTowOAYDVQQK
|
||||
EzFBUkdFIERBVEVOIC0gQXVzdHJpYW4gU29jaWV0eSBmb3IgRGF0YSBQcm90ZWN0
|
||||
aW9uMSUwIwYDVQQLExxBLUNFUlQgQ2VydGlmaWNhdGlvbiBTZXJ2aWNlMRgwFgYD
|
||||
VQQDEw9BLUNFUlQgQURWQU5DRUQxHTAbBgkqhkiG9w0BCQEWDmluZm9AYS1jZXJ0
|
||||
LmF0ggEAMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgHmMEcGA1UdJQRAMD4G
|
||||
CCsGAQUFBwMBBggrBgEFBQcDAgYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEFBQcD
|
||||
CAYKKwYBBAGCNwoDBDARBglghkgBhvhCAQEEBAMCAP8wUQYDVR0gBEowSDBGBggq
|
||||
KAAYAQEBAzA6MDgGCCsGAQUFBwIBFixodHRwOi8vd3d3LmEtY2VydC5hdC9jZXJ0
|
||||
aWZpY2F0ZS1wb2xpY3kuaHRtbDA7BglghkgBhvhCAQgELhYsaHR0cDovL3d3dy5h
|
||||
LWNlcnQuYXQvY2VydGlmaWNhdGUtcG9saWN5Lmh0bWwwGQYDVR0RBBIwEIEOaW5m
|
||||
b0BhLWNlcnQuYXQwLwYDVR0SBCgwJoEOaW5mb0BhLWNlcnQuYXSGFGh0dHA6Ly93
|
||||
d3cuYS1jZXJ0LmF0MEUGA1UdHwQ+MDwwOqA4oDaGNGh0dHBzOi8vc2VjdXJlLmEt
|
||||
Y2VydC5hdC9jZ2ktYmluL2EtY2VydC1hZHZhbmNlZC5jZ2kwDQYJKoZIhvcNAQEF
|
||||
BQADggEBACX1IvgfdG2rvfv35O48vSEvcVaEdlN8USFBHWz3JRAozgzvaBtwHkjK
|
||||
Zwt5l/BWOtjbvHfRjDt7ijlBEcxOOrNC1ffyMHwHrXpvff6YpQ5wnxmIYEQcURiG
|
||||
HMqruEX0WkuDNgSKwefsgXs27eeBauHgNGVcTYH1rmHu/ZyLpLxOyJQ2PCzA1DzW
|
||||
3rWkIX92ogJ7lTRdWrbxwUL1XGinxnnaQ74+/y0pI9JNEv7ic2tpkweRMpkedaLW
|
||||
msC1+orfKTebsg69aMaCx7o6jNONRmR/7TVaPf8/k6g52cHZ9YWjQvup22b5rWxG
|
||||
J5r5LZ4vCPmF4+T4lutjUYAa/lGuQTg=
|
||||
-----END CERTIFICATE-----
|
||||
23
argeng.pem
Normal file
23
argeng.pem
Normal file
@@ -0,0 +1,23 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDwzCCAyygAwIBAgIBADANBgkqhkiG9w0BAQQFADCBmDELMAkGA1UEBhMCQVQx
|
||||
EDAOBgNVBAgTB0F1c3RyaWExDzANBgNVBAcTBlZpZW5uYTFCMEAGA1UEChM5QXJn
|
||||
ZSBEYXRlbiBPZXN0ZXJyZWljaGlzY2hlIEdlc2VsbHNjaGFmdCBmdWVyIERhdGVu
|
||||
c2NodXR6MSIwIAYJKoZIhvcNAQkBFhNhLWNlcnRAYXJnZWRhdGVuLmF0MB4XDTAx
|
||||
MDIxMjExMzAzMFoXDTA5MDIxMjExMzAzMFowgZgxCzAJBgNVBAYTAkFUMRAwDgYD
|
||||
VQQIEwdBdXN0cmlhMQ8wDQYDVQQHEwZWaWVubmExQjBABgNVBAoTOUFyZ2UgRGF0
|
||||
ZW4gT2VzdGVycmVpY2hpc2NoZSBHZXNlbGxzY2hhZnQgZnVlciBEYXRlbnNjaHV0
|
||||
ejEiMCAGCSqGSIb3DQEJARYTYS1jZXJ0QGFyZ2VkYXRlbi5hdDCBnzANBgkqhkiG
|
||||
9w0BAQEFAAOBjQAwgYkCgYEAwgsHqoNtmmrJ86+e1I4hOVBaL4kokqKN2IPOIL+1
|
||||
XwY8vfOOUfPEdhWpaC0ldt7VYrksgDiUccgH0FROANWK2GkfKMDzjjXHysR04uEb
|
||||
Om7Kqjqn0nproOGkFG+QvBZgs+Ws+HXNFJA6V76fU4+JXq4452LSK4Lr5YcBquu3
|
||||
NJECAwEAAaOCARkwggEVMB0GA1UdDgQWBBQ0j59zH/G31zRjgK1y2P//tSAWZjCB
|
||||
xQYDVR0jBIG9MIG6gBQ0j59zH/G31zRjgK1y2P//tSAWZqGBnqSBmzCBmDELMAkG
|
||||
A1UEBhMCQVQxEDAOBgNVBAgTB0F1c3RyaWExDzANBgNVBAcTBlZpZW5uYTFCMEAG
|
||||
A1UEChM5QXJnZSBEYXRlbiBPZXN0ZXJyZWljaGlzY2hlIEdlc2VsbHNjaGFmdCBm
|
||||
dWVyIERhdGVuc2NodXR6MSIwIAYJKoZIhvcNAQkBFhNhLWNlcnRAYXJnZWRhdGVu
|
||||
LmF0ggEAMAwGA1UdEwQFMAMBAf8wCwYDVR0PBAQDAgEGMBEGCWCGSAGG+EIBAQQE
|
||||
AwICBDANBgkqhkiG9w0BAQQFAAOBgQBFuJYncqMYB6gXQS3eDOI90BEHfFTKy/dV
|
||||
AV+K7QdAYikWmqgBheRdPKddJdccPy/Zl/p3ZT7GhDyC5f3wZjcuu8AJ27BNwbCA
|
||||
x54dgxgCNcyPm79nY8MRtEdEpoRGdSsFKJemz6hpXM++MWFciyrRWIIA44XB0Gv3
|
||||
US0spjsDPQ==
|
||||
-----END CERTIFICATE-----
|
||||
82
config
82
config
@@ -337,6 +337,9 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
echo "mips-sony-newsos4"; exit 0;
|
||||
;;
|
||||
|
||||
MINGW*)
|
||||
echo "${MACHINE}-whatever-mingw"; echo 0;
|
||||
;;
|
||||
CYGWIN*)
|
||||
case "$RELEASE" in
|
||||
[bB]*|1.0|1.[12].*)
|
||||
@@ -442,7 +445,7 @@ if [ "$SYSTEM" = "SunOS" ]; then
|
||||
egrep -e '^cc: .* C [0-9]\.[0-9]' | \
|
||||
sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
|
||||
CCVER=${CCVER:-0}
|
||||
if [ $CCVER -gt 40 ]; then
|
||||
if [ $MACHINE != i86pc -a $CCVER -gt 40 ]; then
|
||||
CC=cc # overrides gcc!!!
|
||||
if [ $CCVER -eq 50 ]; then
|
||||
echo "WARNING! Detected WorkShop C 5.0. Do make sure you have"
|
||||
@@ -491,29 +494,29 @@ case "$GUESSOS" in
|
||||
OUT="irix-$CC"
|
||||
;;
|
||||
mips3-sgi-irix)
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=${CPU:-0}
|
||||
if [ $CPU -ge 5000 ]; then
|
||||
options="$options -mips4"
|
||||
else
|
||||
options="$options -mips3"
|
||||
fi
|
||||
#CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
#CPU=${CPU:-0}
|
||||
#if [ $CPU -ge 5000 ]; then
|
||||
# options="$options -mips4"
|
||||
#else
|
||||
# options="$options -mips3"
|
||||
#fi
|
||||
OUT="irix-mips3-$CC"
|
||||
;;
|
||||
mips4-sgi-irix64)
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure irix64-mips4-$CC' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=${CPU:-0}
|
||||
if [ $CPU -ge 5000 ]; then
|
||||
options="$options -mips4"
|
||||
else
|
||||
options="$options -mips3"
|
||||
fi
|
||||
#CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
#CPU=${CPU:-0}
|
||||
#if [ $CPU -ge 5000 ]; then
|
||||
# options="$options -mips4"
|
||||
#else
|
||||
# options="$options -mips3"
|
||||
#fi
|
||||
OUT="irix-mips3-$CC"
|
||||
;;
|
||||
alpha-*-linux2)
|
||||
@@ -549,9 +552,9 @@ EOF
|
||||
ppc64-*-linux2)
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure linux-ppc64' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
OUT="linux-ppc"
|
||||
;;
|
||||
@@ -565,9 +568,9 @@ EOF
|
||||
echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI"
|
||||
echo " and wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure linux64-sparcv9' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
OUT="linux-sparcv9" ;;
|
||||
sparc-*-linux2)
|
||||
@@ -598,7 +601,9 @@ EOF
|
||||
|
||||
options="$options -mschedule=$CPUSCHEDULE -march=$CPUARCH"
|
||||
OUT="linux-parisc" ;;
|
||||
arm*-*-linux2) OUT="linux-elf-arm" ;;
|
||||
arm*b-*-linux2) OUT="linux-elf-arm"; options="$options -DB_ENDIAN" ;;
|
||||
arm*l-*-linux2) OUT="linux-elf-arm"; options="$options -DL_ENDIAN" ;;
|
||||
arm*-*-linux2) OUT="linux-elf-arm" ;;
|
||||
s390-*-linux2) OUT="linux-s390" ;;
|
||||
s390x-*-linux?) OUT="linux-s390x" ;;
|
||||
x86_64-*-linux?) OUT="linux-x86_64" ;;
|
||||
@@ -622,9 +627,9 @@ EOF
|
||||
if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure solaris64-sparcv9-cc' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then
|
||||
# $GCC_ARCH denotes default ABI chosen by compiler driver
|
||||
@@ -634,17 +639,17 @@ EOF
|
||||
OUT="solaris64-sparcv9-gcc"
|
||||
echo "WARNING! If you wish to build 32-bit library, then you have to"
|
||||
echo " invoke './Configure solaris-sparcv9-gcc' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
elif [ "$GCC_ARCH" = "-m32" ]; then
|
||||
echo "NOTICE! If you *know* that your GNU C supports 64-bit/V9 ABI"
|
||||
echo " and wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure solaris64-sparcv9-gcc' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -652,7 +657,14 @@ EOF
|
||||
sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
|
||||
sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
|
||||
sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;;
|
||||
*86*-*-solaris2) OUT="solaris-x86-$CC" ;;
|
||||
*86*-*-solaris2)
|
||||
ISA64=`(isalist) 2>/dev/null | grep amd64`
|
||||
if [ "$ISA64" != "" ]; then
|
||||
OUT="solaris64-x86_64-$CC"
|
||||
else
|
||||
OUT="solaris-x86-$CC"
|
||||
fi
|
||||
;;
|
||||
*-*-sunos4) OUT="sunos-$CC" ;;
|
||||
alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
|
||||
sparc64-*-freebsd*) OUT="FreeBSD-sparc64" ;;
|
||||
@@ -720,9 +732,9 @@ EOF
|
||||
echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi."
|
||||
echo " If you wish to build 32-bit library, the you have to"
|
||||
echo " invoke './Configure hpux-ia64-cc' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
OUT="hpux64-ia64-cc"
|
||||
elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU
|
||||
@@ -732,9 +744,9 @@ EOF
|
||||
if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
|
||||
echo "WARNING! If you wish to build 64-bit library then you have to"
|
||||
echo " invoke './Configure hpux64-parisc2-cc' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
fi
|
||||
elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU
|
||||
@@ -760,9 +772,9 @@ EOF
|
||||
if [ $KERNEL_BITS -eq 64 ]; then
|
||||
echo "WARNING! If you wish to build 64-bit kit, then you have to"
|
||||
echo " invoke './Configure aix64-cc' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have ~5 seconds to press Ctrl-C to abort."
|
||||
(/bin/stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -2,3 +2,5 @@ lib
|
||||
buildinf.h
|
||||
opensslconf.h
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -94,10 +94,9 @@ lib: $(LIBOBJ)
|
||||
@touch lib
|
||||
|
||||
shared: buildinf.h lib subdirs
|
||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
if ! egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null || \
|
||||
(cd ..; $(MAKE) $(SHARED_LIB)); \
|
||||
fi \
|
||||
fi
|
||||
|
||||
libs:
|
||||
@@ -202,8 +201,8 @@ mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
|
||||
o_str.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_str.c
|
||||
o_str.o: o_str.h
|
||||
o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
|
||||
o_str.o: o_str.c o_str.h
|
||||
o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
|
||||
o_time.o: o_time.h
|
||||
tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#include <openssl/aes.h>
|
||||
#include "aes_locl.h"
|
||||
|
||||
#if !defined(OPENSSL_FIPS_AES_ASM)
|
||||
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc) {
|
||||
@@ -66,6 +67,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
unsigned long n;
|
||||
unsigned long len = length;
|
||||
unsigned char tmp[AES_BLOCK_SIZE];
|
||||
const unsigned char *iv = ivec;
|
||||
|
||||
assert(in && out && key && ivec);
|
||||
assert((AES_ENCRYPT == enc)||(AES_DECRYPT == enc));
|
||||
@@ -73,22 +75,39 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
if (AES_ENCRYPT == enc) {
|
||||
while (len >= AES_BLOCK_SIZE) {
|
||||
for(n=0; n < AES_BLOCK_SIZE; ++n)
|
||||
tmp[n] = in[n] ^ ivec[n];
|
||||
AES_encrypt(tmp, out, key);
|
||||
memcpy(ivec, out, AES_BLOCK_SIZE);
|
||||
out[n] = in[n] ^ iv[n];
|
||||
AES_encrypt(out, out, key);
|
||||
iv = out;
|
||||
len -= AES_BLOCK_SIZE;
|
||||
in += AES_BLOCK_SIZE;
|
||||
out += AES_BLOCK_SIZE;
|
||||
}
|
||||
if (len) {
|
||||
for(n=0; n < len; ++n)
|
||||
tmp[n] = in[n] ^ ivec[n];
|
||||
out[n] = in[n] ^ iv[n];
|
||||
for(n=len; n < AES_BLOCK_SIZE; ++n)
|
||||
tmp[n] = ivec[n];
|
||||
AES_encrypt(tmp, tmp, key);
|
||||
memcpy(out, tmp, AES_BLOCK_SIZE);
|
||||
memcpy(ivec, tmp, AES_BLOCK_SIZE);
|
||||
}
|
||||
out[n] = iv[n];
|
||||
AES_encrypt(out, out, key);
|
||||
iv = out;
|
||||
}
|
||||
memcpy(ivec,iv,AES_BLOCK_SIZE);
|
||||
} else if (in != out) {
|
||||
while (len >= AES_BLOCK_SIZE) {
|
||||
AES_decrypt(in, out, key);
|
||||
for(n=0; n < AES_BLOCK_SIZE; ++n)
|
||||
out[n] ^= iv[n];
|
||||
iv = in;
|
||||
len -= AES_BLOCK_SIZE;
|
||||
in += AES_BLOCK_SIZE;
|
||||
out += AES_BLOCK_SIZE;
|
||||
}
|
||||
if (len) {
|
||||
AES_decrypt(in,tmp,key);
|
||||
for(n=0; n < len; ++n)
|
||||
out[n] = tmp[n] ^ iv[n];
|
||||
iv = in;
|
||||
}
|
||||
memcpy(ivec,iv,AES_BLOCK_SIZE);
|
||||
} else {
|
||||
while (len >= AES_BLOCK_SIZE) {
|
||||
memcpy(tmp, in, AES_BLOCK_SIZE);
|
||||
@@ -102,10 +121,13 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
}
|
||||
if (len) {
|
||||
memcpy(tmp, in, AES_BLOCK_SIZE);
|
||||
AES_decrypt(tmp, tmp, key);
|
||||
AES_decrypt(tmp, out, key);
|
||||
for(n=0; n < len; ++n)
|
||||
out[n] = tmp[n] ^ ivec[n];
|
||||
out[n] ^= ivec[n];
|
||||
for(n=len; n < AES_BLOCK_SIZE; ++n)
|
||||
out[n] = tmp[n];
|
||||
memcpy(ivec, tmp, AES_BLOCK_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -158,61 +158,35 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
|
||||
/* This expects a single block of size nbits for both in and out. Note that
|
||||
it corrupts any extra bits in the last byte of out */
|
||||
/* Untested, once it is working, it will be optimised */
|
||||
void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out,
|
||||
const int nbits,const AES_KEY *key,
|
||||
unsigned char *ivec,const int enc)
|
||||
{
|
||||
int n;
|
||||
int n,rem,num;
|
||||
unsigned char ovec[AES_BLOCK_SIZE*2];
|
||||
|
||||
assert(in && out && key && ivec);
|
||||
if(enc)
|
||||
{
|
||||
if (nbits<=0 || nbits>128) return;
|
||||
|
||||
/* fill in the first half of the new IV with the current IV */
|
||||
memcpy(ovec,ivec,AES_BLOCK_SIZE);
|
||||
/* construct the new IV */
|
||||
AES_encrypt(ivec,ovec,key);
|
||||
/* encrypt the input */
|
||||
for(n=0 ; n < (nbits+7)/8 ; ++n)
|
||||
out[n]=in[n]^ovec[n];
|
||||
/* fill in the first half of the new IV with the current IV */
|
||||
memcpy(ovec,ivec,AES_BLOCK_SIZE);
|
||||
/* and put the ciphertext in the second half */
|
||||
memcpy(ovec+AES_BLOCK_SIZE,out,(nbits+7)/8);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+nbits/8,AES_BLOCK_SIZE+(nbits%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(nbits%8 != 0)
|
||||
AES_encrypt(ivec,ivec,key);
|
||||
num = (nbits+7)/8;
|
||||
if (enc) /* encrypt the input */
|
||||
for(n=0 ; n < num ; ++n)
|
||||
out[n] = (ovec[AES_BLOCK_SIZE+n] = in[n] ^ ivec[n]);
|
||||
else /* decrypt the input */
|
||||
for(n=0 ; n < num ; ++n)
|
||||
out[n] = (ovec[AES_BLOCK_SIZE+n] = in[n]) ^ ivec[n];
|
||||
/* shift ovec left... */
|
||||
rem = nbits%8;
|
||||
num = nbits/8;
|
||||
if(rem==0)
|
||||
memcpy(ivec,ovec+num,AES_BLOCK_SIZE);
|
||||
else
|
||||
for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
|
||||
{
|
||||
ovec[n]<<=nbits%8;
|
||||
ovec[n]|=ovec[n+1]>>(8-nbits%8);
|
||||
}
|
||||
/* finally, move it back into place */
|
||||
memcpy(ivec,ovec,AES_BLOCK_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* construct the new IV in the first half of ovec */
|
||||
AES_encrypt(ivec,ovec,key);
|
||||
/* decrypt the input */
|
||||
for(n=0 ; n < (nbits+7)/8 ; ++n)
|
||||
out[n]=in[n]^ovec[n];
|
||||
/* fill in the first half of the new IV with the current IV */
|
||||
memcpy(ovec,ivec,AES_BLOCK_SIZE);
|
||||
/* append the ciphertext */
|
||||
memcpy(ovec+AES_BLOCK_SIZE,in,(nbits+7)/8);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+nbits/8,AES_BLOCK_SIZE+(nbits%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(nbits%8 != 0)
|
||||
for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
|
||||
{
|
||||
ovec[n]<<=nbits%8;
|
||||
ovec[n]|=ovec[n+1]>>(8-nbits%8);
|
||||
}
|
||||
/* finally, move it back into place */
|
||||
memcpy(ivec,ovec,AES_BLOCK_SIZE);
|
||||
}
|
||||
ivec[n] = ovec[n+num]<<rem | ovec[n+num+1]>>(8-rem);
|
||||
|
||||
/* it is not necessary to cleanse ovec, since the IV is not secret */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
int ASN1_PRINTABLE_type(unsigned char *s, int len)
|
||||
int ASN1_PRINTABLE_type(const unsigned char *s, int len)
|
||||
{
|
||||
int c;
|
||||
int ia5=0;
|
||||
|
||||
@@ -71,7 +71,10 @@ int ASN1_TYPE_get(ASN1_TYPE *a)
|
||||
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value)
|
||||
{
|
||||
if (a->value.ptr != NULL)
|
||||
ASN1_primitive_free((ASN1_VALUE **)&a, NULL);
|
||||
{
|
||||
ASN1_TYPE **tmp_a = &a;
|
||||
ASN1_primitive_free((ASN1_VALUE **)tmp_a, NULL);
|
||||
}
|
||||
a->type=type;
|
||||
a->value.ptr=value;
|
||||
}
|
||||
|
||||
@@ -142,6 +142,13 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!EVP_VerifyInit_ex(&ctx,type, NULL))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
|
||||
ret=0;
|
||||
goto err;
|
||||
}
|
||||
|
||||
inl = ASN1_item_i2d(asn, &buf_in, it);
|
||||
|
||||
if (buf_in == NULL)
|
||||
@@ -150,7 +157,6 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
||||
goto err;
|
||||
}
|
||||
|
||||
EVP_VerifyInit_ex(&ctx,type, NULL);
|
||||
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
|
||||
|
||||
OPENSSL_cleanse(buf_in,(unsigned int)inl);
|
||||
|
||||
@@ -829,7 +829,7 @@ BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai,BIGNUM *bn);
|
||||
|
||||
/* General */
|
||||
/* given a string, return the correct type, max is the maximum length */
|
||||
int ASN1_PRINTABLE_type(unsigned char *s, int max);
|
||||
int ASN1_PRINTABLE_type(const unsigned char *s, int max);
|
||||
|
||||
int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
|
||||
ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp,
|
||||
@@ -962,6 +962,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_F_ASN1_DUP 111
|
||||
#define ASN1_F_ASN1_ENUMERATED_SET 112
|
||||
#define ASN1_F_ASN1_ENUMERATED_TO_BN 113
|
||||
#define ASN1_F_ASN1_FIND_END 182
|
||||
#define ASN1_F_ASN1_GENERALIZEDTIME_SET 178
|
||||
#define ASN1_F_ASN1_GET_OBJECT 114
|
||||
#define ASN1_F_ASN1_HEADER_NEW 115
|
||||
@@ -1075,6 +1076,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_R_MISSING_SECOND_NUMBER 138
|
||||
#define ASN1_R_MSTRING_NOT_UNIVERSAL 139
|
||||
#define ASN1_R_MSTRING_WRONG_TAG 140
|
||||
#define ASN1_R_NESTED_ASN1_STRING 174
|
||||
#define ASN1_R_NON_HEX_CHARACTERS 141
|
||||
#define ASN1_R_NOT_ENOUGH_DATA 142
|
||||
#define ASN1_R_NO_MATCHING_CHOICE_TYPE 143
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/asn1/asn1_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -64,169 +64,175 @@
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
|
||||
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ASN1,func,0)
|
||||
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_ASN1,0,reason)
|
||||
|
||||
static ERR_STRING_DATA ASN1_str_functs[]=
|
||||
{
|
||||
{ERR_PACK(0,ASN1_F_A2D_ASN1_OBJECT,0), "a2d_ASN1_OBJECT"},
|
||||
{ERR_PACK(0,ASN1_F_A2I_ASN1_ENUMERATED,0), "a2i_ASN1_ENUMERATED"},
|
||||
{ERR_PACK(0,ASN1_F_A2I_ASN1_INTEGER,0), "a2i_ASN1_INTEGER"},
|
||||
{ERR_PACK(0,ASN1_F_A2I_ASN1_STRING,0), "a2i_ASN1_STRING"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_BIT_STRING_SET_BIT,0), "ASN1_BIT_STRING_set_bit"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_CHECK_TLEN,0), "ASN1_CHECK_TLEN"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_COLLATE_PRIMITIVE,0), "ASN1_COLLATE_PRIMITIVE"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_COLLECT,0), "ASN1_COLLECT"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_D2I_BIO,0), "ASN1_d2i_bio"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_D2I_EX_PRIMITIVE,0), "ASN1_D2I_EX_PRIMITIVE"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_D2I_FP,0), "ASN1_d2i_fp"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_DIGEST,0), "ASN1_digest"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_DO_ADB,0), "ASN1_DO_ADB"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_DUP,0), "ASN1_dup"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_ENUMERATED_SET,0), "ASN1_ENUMERATED_set"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_ENUMERATED_TO_BN,0), "ASN1_ENUMERATED_to_BN"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_GENERALIZEDTIME_SET,0), "ASN1_GENERALIZEDTIME_set"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_GET_OBJECT,0), "ASN1_get_object"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_HEADER_NEW,0), "ASN1_HEADER_new"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_I2D_BIO,0), "ASN1_i2d_bio"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_I2D_FP,0), "ASN1_i2d_fp"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_INTEGER_SET,0), "ASN1_INTEGER_set"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_INTEGER_TO_BN,0), "ASN1_INTEGER_to_BN"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_ITEM_EX_D2I,0), "ASN1_ITEM_EX_D2I"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_ITEM_NEW,0), "ASN1_item_new"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_MBSTRING_COPY,0), "ASN1_mbstring_copy"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_OBJECT_NEW,0), "ASN1_OBJECT_new"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_PACK_STRING,0), "ASN1_pack_string"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_PBE_SET,0), "ASN1_PBE_SET"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_SEQ_PACK,0), "ASN1_seq_pack"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_SEQ_UNPACK,0), "ASN1_seq_unpack"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_SIGN,0), "ASN1_sign"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_STRING_SET,0), "ASN1_STRING_set"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_STRING_TABLE_ADD,0), "ASN1_STRING_TABLE_add"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_STRING_TYPE_NEW,0), "ASN1_STRING_type_new"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_D2I,0), "ASN1_TEMPLATE_D2I"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_EX_D2I,0), "ASN1_TEMPLATE_EX_D2I"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_NEW,0), "ASN1_TEMPLATE_NEW"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TIME_SET,0), "ASN1_TIME_set"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING,0), "ASN1_TYPE_get_int_octetstring"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_OCTETSTRING,0), "ASN1_TYPE_get_octetstring"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_UNPACK_STRING,0), "ASN1_unpack_string"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_UTCTIME_SET,0), "ASN1_UTCTIME_set"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_VERIFY,0), "ASN1_verify"},
|
||||
{ERR_PACK(0,ASN1_F_BN_TO_ASN1_ENUMERATED,0), "BN_to_ASN1_ENUMERATED"},
|
||||
{ERR_PACK(0,ASN1_F_BN_TO_ASN1_INTEGER,0), "BN_to_ASN1_INTEGER"},
|
||||
{ERR_PACK(0,ASN1_F_COLLECT_DATA,0), "COLLECT_DATA"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_BIT_STRING,0), "D2I_ASN1_BIT_STRING"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_BOOLEAN,0), "d2i_ASN1_BOOLEAN"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_BYTES,0), "d2i_ASN1_bytes"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_GENERALIZEDTIME,0), "D2I_ASN1_GENERALIZEDTIME"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_HEADER,0), "d2i_ASN1_HEADER"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_INTEGER,0), "D2I_ASN1_INTEGER"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_OBJECT,0), "d2i_ASN1_OBJECT"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_SET,0), "d2i_ASN1_SET"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_TYPE_BYTES,0), "d2i_ASN1_type_bytes"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_UINTEGER,0), "d2i_ASN1_UINTEGER"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_ASN1_UTCTIME,0), "D2I_ASN1_UTCTIME"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_NETSCAPE_RSA,0), "d2i_Netscape_RSA"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_NETSCAPE_RSA_2,0), "D2I_NETSCAPE_RSA_2"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_PRIVATEKEY,0), "d2i_PrivateKey"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_PUBLICKEY,0), "d2i_PublicKey"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_X509,0), "D2I_X509"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_X509_CINF,0), "D2I_X509_CINF"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_X509_NAME,0), "D2I_X509_NAME"},
|
||||
{ERR_PACK(0,ASN1_F_D2I_X509_PKEY,0), "d2i_X509_PKEY"},
|
||||
{ERR_PACK(0,ASN1_F_I2D_ASN1_SET,0), "i2d_ASN1_SET"},
|
||||
{ERR_PACK(0,ASN1_F_I2D_ASN1_TIME,0), "I2D_ASN1_TIME"},
|
||||
{ERR_PACK(0,ASN1_F_I2D_DSA_PUBKEY,0), "i2d_DSA_PUBKEY"},
|
||||
{ERR_PACK(0,ASN1_F_I2D_NETSCAPE_RSA,0), "i2d_Netscape_RSA"},
|
||||
{ERR_PACK(0,ASN1_F_I2D_PRIVATEKEY,0), "i2d_PrivateKey"},
|
||||
{ERR_PACK(0,ASN1_F_I2D_PUBLICKEY,0), "i2d_PublicKey"},
|
||||
{ERR_PACK(0,ASN1_F_I2D_RSA_PUBKEY,0), "i2d_RSA_PUBKEY"},
|
||||
{ERR_PACK(0,ASN1_F_LONG_C2I,0), "LONG_C2I"},
|
||||
{ERR_PACK(0,ASN1_F_OID_MODULE_INIT,0), "OID_MODULE_INIT"},
|
||||
{ERR_PACK(0,ASN1_F_PKCS5_PBE2_SET,0), "PKCS5_pbe2_set"},
|
||||
{ERR_PACK(0,ASN1_F_X509_CINF_NEW,0), "X509_CINF_NEW"},
|
||||
{ERR_PACK(0,ASN1_F_X509_CRL_ADD0_REVOKED,0), "X509_CRL_add0_revoked"},
|
||||
{ERR_PACK(0,ASN1_F_X509_INFO_NEW,0), "X509_INFO_new"},
|
||||
{ERR_PACK(0,ASN1_F_X509_NAME_NEW,0), "X509_NAME_NEW"},
|
||||
{ERR_PACK(0,ASN1_F_X509_NEW,0), "X509_NEW"},
|
||||
{ERR_PACK(0,ASN1_F_X509_PKEY_NEW,0), "X509_PKEY_new"},
|
||||
{ERR_FUNC(ASN1_F_A2D_ASN1_OBJECT), "a2d_ASN1_OBJECT"},
|
||||
{ERR_FUNC(ASN1_F_A2I_ASN1_ENUMERATED), "a2i_ASN1_ENUMERATED"},
|
||||
{ERR_FUNC(ASN1_F_A2I_ASN1_INTEGER), "a2i_ASN1_INTEGER"},
|
||||
{ERR_FUNC(ASN1_F_A2I_ASN1_STRING), "a2i_ASN1_STRING"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_BIT_STRING_SET_BIT), "ASN1_BIT_STRING_set_bit"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_CHECK_TLEN), "ASN1_CHECK_TLEN"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_COLLATE_PRIMITIVE), "ASN1_COLLATE_PRIMITIVE"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_COLLECT), "ASN1_COLLECT"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_D2I_BIO), "ASN1_d2i_bio"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_D2I_EX_PRIMITIVE), "ASN1_D2I_EX_PRIMITIVE"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_D2I_FP), "ASN1_d2i_fp"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_DIGEST), "ASN1_digest"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_DO_ADB), "ASN1_DO_ADB"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_DUP), "ASN1_dup"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_ENUMERATED_SET), "ASN1_ENUMERATED_set"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_ENUMERATED_TO_BN), "ASN1_ENUMERATED_to_BN"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_FIND_END), "ASN1_FIND_END"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_GENERALIZEDTIME_SET), "ASN1_GENERALIZEDTIME_set"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_GET_OBJECT), "ASN1_get_object"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_HEADER_NEW), "ASN1_HEADER_new"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_I2D_BIO), "ASN1_i2d_bio"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_I2D_FP), "ASN1_i2d_fp"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_INTEGER_SET), "ASN1_INTEGER_set"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_INTEGER_TO_BN), "ASN1_INTEGER_to_BN"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_EX_D2I), "ASN1_ITEM_EX_D2I"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_NEW), "ASN1_item_new"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_MBSTRING_COPY), "ASN1_mbstring_copy"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_OBJECT_NEW), "ASN1_OBJECT_new"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_PACK_STRING), "ASN1_pack_string"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_PBE_SET), "ASN1_PBE_SET"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_SEQ_PACK), "ASN1_seq_pack"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_SEQ_UNPACK), "ASN1_seq_unpack"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_SIGN), "ASN1_sign"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_STRING_SET), "ASN1_STRING_set"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_STRING_TABLE_ADD), "ASN1_STRING_TABLE_add"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_STRING_TYPE_NEW), "ASN1_STRING_type_new"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_TEMPLATE_D2I), "ASN1_TEMPLATE_D2I"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_TEMPLATE_EX_D2I), "ASN1_TEMPLATE_EX_D2I"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_TEMPLATE_NEW), "ASN1_TEMPLATE_NEW"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_TIME_SET), "ASN1_TIME_set"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING), "ASN1_TYPE_get_int_octetstring"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_TYPE_GET_OCTETSTRING), "ASN1_TYPE_get_octetstring"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_UNPACK_STRING), "ASN1_unpack_string"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_UTCTIME_SET), "ASN1_UTCTIME_set"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_VERIFY), "ASN1_verify"},
|
||||
{ERR_FUNC(ASN1_F_BN_TO_ASN1_ENUMERATED), "BN_to_ASN1_ENUMERATED"},
|
||||
{ERR_FUNC(ASN1_F_BN_TO_ASN1_INTEGER), "BN_to_ASN1_INTEGER"},
|
||||
{ERR_FUNC(ASN1_F_COLLECT_DATA), "COLLECT_DATA"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_BIT_STRING), "D2I_ASN1_BIT_STRING"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_BOOLEAN), "d2i_ASN1_BOOLEAN"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_BYTES), "d2i_ASN1_bytes"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_GENERALIZEDTIME), "D2I_ASN1_GENERALIZEDTIME"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_HEADER), "d2i_ASN1_HEADER"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_INTEGER), "D2I_ASN1_INTEGER"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_OBJECT), "d2i_ASN1_OBJECT"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_SET), "d2i_ASN1_SET"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_TYPE_BYTES), "d2i_ASN1_type_bytes"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_UINTEGER), "d2i_ASN1_UINTEGER"},
|
||||
{ERR_FUNC(ASN1_F_D2I_ASN1_UTCTIME), "D2I_ASN1_UTCTIME"},
|
||||
{ERR_FUNC(ASN1_F_D2I_NETSCAPE_RSA), "d2i_Netscape_RSA"},
|
||||
{ERR_FUNC(ASN1_F_D2I_NETSCAPE_RSA_2), "D2I_NETSCAPE_RSA_2"},
|
||||
{ERR_FUNC(ASN1_F_D2I_PRIVATEKEY), "d2i_PrivateKey"},
|
||||
{ERR_FUNC(ASN1_F_D2I_PUBLICKEY), "d2i_PublicKey"},
|
||||
{ERR_FUNC(ASN1_F_D2I_X509), "D2I_X509"},
|
||||
{ERR_FUNC(ASN1_F_D2I_X509_CINF), "D2I_X509_CINF"},
|
||||
{ERR_FUNC(ASN1_F_D2I_X509_NAME), "D2I_X509_NAME"},
|
||||
{ERR_FUNC(ASN1_F_D2I_X509_PKEY), "d2i_X509_PKEY"},
|
||||
{ERR_FUNC(ASN1_F_I2D_ASN1_SET), "i2d_ASN1_SET"},
|
||||
{ERR_FUNC(ASN1_F_I2D_ASN1_TIME), "I2D_ASN1_TIME"},
|
||||
{ERR_FUNC(ASN1_F_I2D_DSA_PUBKEY), "i2d_DSA_PUBKEY"},
|
||||
{ERR_FUNC(ASN1_F_I2D_NETSCAPE_RSA), "i2d_Netscape_RSA"},
|
||||
{ERR_FUNC(ASN1_F_I2D_PRIVATEKEY), "i2d_PrivateKey"},
|
||||
{ERR_FUNC(ASN1_F_I2D_PUBLICKEY), "i2d_PublicKey"},
|
||||
{ERR_FUNC(ASN1_F_I2D_RSA_PUBKEY), "i2d_RSA_PUBKEY"},
|
||||
{ERR_FUNC(ASN1_F_LONG_C2I), "LONG_C2I"},
|
||||
{ERR_FUNC(ASN1_F_OID_MODULE_INIT), "OID_MODULE_INIT"},
|
||||
{ERR_FUNC(ASN1_F_PKCS5_PBE2_SET), "PKCS5_pbe2_set"},
|
||||
{ERR_FUNC(ASN1_F_X509_CINF_NEW), "X509_CINF_NEW"},
|
||||
{ERR_FUNC(ASN1_F_X509_CRL_ADD0_REVOKED), "X509_CRL_add0_revoked"},
|
||||
{ERR_FUNC(ASN1_F_X509_INFO_NEW), "X509_INFO_new"},
|
||||
{ERR_FUNC(ASN1_F_X509_NAME_NEW), "X509_NAME_NEW"},
|
||||
{ERR_FUNC(ASN1_F_X509_NEW), "X509_NEW"},
|
||||
{ERR_FUNC(ASN1_F_X509_PKEY_NEW), "X509_PKEY_new"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
static ERR_STRING_DATA ASN1_str_reasons[]=
|
||||
{
|
||||
{ASN1_R_ADDING_OBJECT ,"adding object"},
|
||||
{ASN1_R_AUX_ERROR ,"aux error"},
|
||||
{ASN1_R_BAD_CLASS ,"bad class"},
|
||||
{ASN1_R_BAD_OBJECT_HEADER ,"bad object header"},
|
||||
{ASN1_R_BAD_PASSWORD_READ ,"bad password read"},
|
||||
{ASN1_R_BAD_TAG ,"bad tag"},
|
||||
{ASN1_R_BN_LIB ,"bn lib"},
|
||||
{ASN1_R_BOOLEAN_IS_WRONG_LENGTH ,"boolean is wrong length"},
|
||||
{ASN1_R_BUFFER_TOO_SMALL ,"buffer too small"},
|
||||
{ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER ,"cipher has no object identifier"},
|
||||
{ASN1_R_DATA_IS_WRONG ,"data is wrong"},
|
||||
{ASN1_R_DECODE_ERROR ,"decode error"},
|
||||
{ASN1_R_DECODING_ERROR ,"decoding error"},
|
||||
{ASN1_R_ENCODE_ERROR ,"encode error"},
|
||||
{ASN1_R_ERROR_GETTING_TIME ,"error getting time"},
|
||||
{ASN1_R_ERROR_LOADING_SECTION ,"error loading section"},
|
||||
{ASN1_R_ERROR_PARSING_SET_ELEMENT ,"error parsing set element"},
|
||||
{ASN1_R_ERROR_SETTING_CIPHER_PARAMS ,"error setting cipher params"},
|
||||
{ASN1_R_EXPECTING_AN_INTEGER ,"expecting an integer"},
|
||||
{ASN1_R_EXPECTING_AN_OBJECT ,"expecting an object"},
|
||||
{ASN1_R_EXPECTING_A_BOOLEAN ,"expecting a boolean"},
|
||||
{ASN1_R_EXPECTING_A_TIME ,"expecting a time"},
|
||||
{ASN1_R_EXPLICIT_LENGTH_MISMATCH ,"explicit length mismatch"},
|
||||
{ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED ,"explicit tag not constructed"},
|
||||
{ASN1_R_FIELD_MISSING ,"field missing"},
|
||||
{ASN1_R_FIRST_NUM_TOO_LARGE ,"first num too large"},
|
||||
{ASN1_R_HEADER_TOO_LONG ,"header too long"},
|
||||
{ASN1_R_ILLEGAL_CHARACTERS ,"illegal characters"},
|
||||
{ASN1_R_ILLEGAL_NULL ,"illegal null"},
|
||||
{ASN1_R_ILLEGAL_OPTIONAL_ANY ,"illegal optional any"},
|
||||
{ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE ,"illegal options on item template"},
|
||||
{ASN1_R_ILLEGAL_TAGGED_ANY ,"illegal tagged any"},
|
||||
{ASN1_R_INTEGER_TOO_LARGE_FOR_LONG ,"integer too large for long"},
|
||||
{ASN1_R_INVALID_BMPSTRING_LENGTH ,"invalid bmpstring length"},
|
||||
{ASN1_R_INVALID_DIGIT ,"invalid digit"},
|
||||
{ASN1_R_INVALID_SEPARATOR ,"invalid separator"},
|
||||
{ASN1_R_INVALID_TIME_FORMAT ,"invalid time format"},
|
||||
{ASN1_R_INVALID_UNIVERSALSTRING_LENGTH ,"invalid universalstring length"},
|
||||
{ASN1_R_INVALID_UTF8STRING ,"invalid utf8string"},
|
||||
{ASN1_R_IV_TOO_LARGE ,"iv too large"},
|
||||
{ASN1_R_LENGTH_ERROR ,"length error"},
|
||||
{ASN1_R_MISSING_EOC ,"missing eoc"},
|
||||
{ASN1_R_MISSING_SECOND_NUMBER ,"missing second number"},
|
||||
{ASN1_R_MSTRING_NOT_UNIVERSAL ,"mstring not universal"},
|
||||
{ASN1_R_MSTRING_WRONG_TAG ,"mstring wrong tag"},
|
||||
{ASN1_R_NON_HEX_CHARACTERS ,"non hex characters"},
|
||||
{ASN1_R_NOT_ENOUGH_DATA ,"not enough data"},
|
||||
{ASN1_R_NO_MATCHING_CHOICE_TYPE ,"no matching choice type"},
|
||||
{ASN1_R_NULL_IS_WRONG_LENGTH ,"null is wrong length"},
|
||||
{ASN1_R_ODD_NUMBER_OF_CHARS ,"odd number of chars"},
|
||||
{ASN1_R_PRIVATE_KEY_HEADER_MISSING ,"private key header missing"},
|
||||
{ASN1_R_SECOND_NUMBER_TOO_LARGE ,"second number too large"},
|
||||
{ASN1_R_SEQUENCE_LENGTH_MISMATCH ,"sequence length mismatch"},
|
||||
{ASN1_R_SEQUENCE_NOT_CONSTRUCTED ,"sequence not constructed"},
|
||||
{ASN1_R_SHORT_LINE ,"short line"},
|
||||
{ASN1_R_STRING_TOO_LONG ,"string too long"},
|
||||
{ASN1_R_STRING_TOO_SHORT ,"string too short"},
|
||||
{ASN1_R_TAG_VALUE_TOO_HIGH ,"tag value too high"},
|
||||
{ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD,"the asn1 object identifier is not known for this md"},
|
||||
{ASN1_R_TOO_LONG ,"too long"},
|
||||
{ASN1_R_TYPE_NOT_CONSTRUCTED ,"type not constructed"},
|
||||
{ASN1_R_UNABLE_TO_DECODE_RSA_KEY ,"unable to decode rsa key"},
|
||||
{ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY ,"unable to decode rsa private key"},
|
||||
{ASN1_R_UNEXPECTED_EOC ,"unexpected eoc"},
|
||||
{ASN1_R_UNKNOWN_FORMAT ,"unknown format"},
|
||||
{ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM ,"unknown message digest algorithm"},
|
||||
{ASN1_R_UNKNOWN_OBJECT_TYPE ,"unknown object type"},
|
||||
{ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE ,"unknown public key type"},
|
||||
{ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE ,"unsupported any defined by type"},
|
||||
{ASN1_R_UNSUPPORTED_CIPHER ,"unsupported cipher"},
|
||||
{ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM ,"unsupported encryption algorithm"},
|
||||
{ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE ,"unsupported public key type"},
|
||||
{ASN1_R_WRONG_TAG ,"wrong tag"},
|
||||
{ASN1_R_WRONG_TYPE ,"wrong type"},
|
||||
{ERR_REASON(ASN1_R_ADDING_OBJECT) ,"adding object"},
|
||||
{ERR_REASON(ASN1_R_AUX_ERROR) ,"aux error"},
|
||||
{ERR_REASON(ASN1_R_BAD_CLASS) ,"bad class"},
|
||||
{ERR_REASON(ASN1_R_BAD_OBJECT_HEADER) ,"bad object header"},
|
||||
{ERR_REASON(ASN1_R_BAD_PASSWORD_READ) ,"bad password read"},
|
||||
{ERR_REASON(ASN1_R_BAD_TAG) ,"bad tag"},
|
||||
{ERR_REASON(ASN1_R_BN_LIB) ,"bn lib"},
|
||||
{ERR_REASON(ASN1_R_BOOLEAN_IS_WRONG_LENGTH),"boolean is wrong length"},
|
||||
{ERR_REASON(ASN1_R_BUFFER_TOO_SMALL) ,"buffer too small"},
|
||||
{ERR_REASON(ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER),"cipher has no object identifier"},
|
||||
{ERR_REASON(ASN1_R_DATA_IS_WRONG) ,"data is wrong"},
|
||||
{ERR_REASON(ASN1_R_DECODE_ERROR) ,"decode error"},
|
||||
{ERR_REASON(ASN1_R_DECODING_ERROR) ,"decoding error"},
|
||||
{ERR_REASON(ASN1_R_ENCODE_ERROR) ,"encode error"},
|
||||
{ERR_REASON(ASN1_R_ERROR_GETTING_TIME) ,"error getting time"},
|
||||
{ERR_REASON(ASN1_R_ERROR_LOADING_SECTION),"error loading section"},
|
||||
{ERR_REASON(ASN1_R_ERROR_PARSING_SET_ELEMENT),"error parsing set element"},
|
||||
{ERR_REASON(ASN1_R_ERROR_SETTING_CIPHER_PARAMS),"error setting cipher params"},
|
||||
{ERR_REASON(ASN1_R_EXPECTING_AN_INTEGER) ,"expecting an integer"},
|
||||
{ERR_REASON(ASN1_R_EXPECTING_AN_OBJECT) ,"expecting an object"},
|
||||
{ERR_REASON(ASN1_R_EXPECTING_A_BOOLEAN) ,"expecting a boolean"},
|
||||
{ERR_REASON(ASN1_R_EXPECTING_A_TIME) ,"expecting a time"},
|
||||
{ERR_REASON(ASN1_R_EXPLICIT_LENGTH_MISMATCH),"explicit length mismatch"},
|
||||
{ERR_REASON(ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED),"explicit tag not constructed"},
|
||||
{ERR_REASON(ASN1_R_FIELD_MISSING) ,"field missing"},
|
||||
{ERR_REASON(ASN1_R_FIRST_NUM_TOO_LARGE) ,"first num too large"},
|
||||
{ERR_REASON(ASN1_R_HEADER_TOO_LONG) ,"header too long"},
|
||||
{ERR_REASON(ASN1_R_ILLEGAL_CHARACTERS) ,"illegal characters"},
|
||||
{ERR_REASON(ASN1_R_ILLEGAL_NULL) ,"illegal null"},
|
||||
{ERR_REASON(ASN1_R_ILLEGAL_OPTIONAL_ANY) ,"illegal optional any"},
|
||||
{ERR_REASON(ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE),"illegal options on item template"},
|
||||
{ERR_REASON(ASN1_R_ILLEGAL_TAGGED_ANY) ,"illegal tagged any"},
|
||||
{ERR_REASON(ASN1_R_INTEGER_TOO_LARGE_FOR_LONG),"integer too large for long"},
|
||||
{ERR_REASON(ASN1_R_INVALID_BMPSTRING_LENGTH),"invalid bmpstring length"},
|
||||
{ERR_REASON(ASN1_R_INVALID_DIGIT) ,"invalid digit"},
|
||||
{ERR_REASON(ASN1_R_INVALID_SEPARATOR) ,"invalid separator"},
|
||||
{ERR_REASON(ASN1_R_INVALID_TIME_FORMAT) ,"invalid time format"},
|
||||
{ERR_REASON(ASN1_R_INVALID_UNIVERSALSTRING_LENGTH),"invalid universalstring length"},
|
||||
{ERR_REASON(ASN1_R_INVALID_UTF8STRING) ,"invalid utf8string"},
|
||||
{ERR_REASON(ASN1_R_IV_TOO_LARGE) ,"iv too large"},
|
||||
{ERR_REASON(ASN1_R_LENGTH_ERROR) ,"length error"},
|
||||
{ERR_REASON(ASN1_R_MISSING_EOC) ,"missing eoc"},
|
||||
{ERR_REASON(ASN1_R_MISSING_SECOND_NUMBER),"missing second number"},
|
||||
{ERR_REASON(ASN1_R_MSTRING_NOT_UNIVERSAL),"mstring not universal"},
|
||||
{ERR_REASON(ASN1_R_MSTRING_WRONG_TAG) ,"mstring wrong tag"},
|
||||
{ERR_REASON(ASN1_R_NESTED_ASN1_STRING) ,"nested asn1 string"},
|
||||
{ERR_REASON(ASN1_R_NON_HEX_CHARACTERS) ,"non hex characters"},
|
||||
{ERR_REASON(ASN1_R_NOT_ENOUGH_DATA) ,"not enough data"},
|
||||
{ERR_REASON(ASN1_R_NO_MATCHING_CHOICE_TYPE),"no matching choice type"},
|
||||
{ERR_REASON(ASN1_R_NULL_IS_WRONG_LENGTH) ,"null is wrong length"},
|
||||
{ERR_REASON(ASN1_R_ODD_NUMBER_OF_CHARS) ,"odd number of chars"},
|
||||
{ERR_REASON(ASN1_R_PRIVATE_KEY_HEADER_MISSING),"private key header missing"},
|
||||
{ERR_REASON(ASN1_R_SECOND_NUMBER_TOO_LARGE),"second number too large"},
|
||||
{ERR_REASON(ASN1_R_SEQUENCE_LENGTH_MISMATCH),"sequence length mismatch"},
|
||||
{ERR_REASON(ASN1_R_SEQUENCE_NOT_CONSTRUCTED),"sequence not constructed"},
|
||||
{ERR_REASON(ASN1_R_SHORT_LINE) ,"short line"},
|
||||
{ERR_REASON(ASN1_R_STRING_TOO_LONG) ,"string too long"},
|
||||
{ERR_REASON(ASN1_R_STRING_TOO_SHORT) ,"string too short"},
|
||||
{ERR_REASON(ASN1_R_TAG_VALUE_TOO_HIGH) ,"tag value too high"},
|
||||
{ERR_REASON(ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD),"the asn1 object identifier is not known for this md"},
|
||||
{ERR_REASON(ASN1_R_TOO_LONG) ,"too long"},
|
||||
{ERR_REASON(ASN1_R_TYPE_NOT_CONSTRUCTED) ,"type not constructed"},
|
||||
{ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY),"unable to decode rsa key"},
|
||||
{ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY),"unable to decode rsa private key"},
|
||||
{ERR_REASON(ASN1_R_UNEXPECTED_EOC) ,"unexpected eoc"},
|
||||
{ERR_REASON(ASN1_R_UNKNOWN_FORMAT) ,"unknown format"},
|
||||
{ERR_REASON(ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM),"unknown message digest algorithm"},
|
||||
{ERR_REASON(ASN1_R_UNKNOWN_OBJECT_TYPE) ,"unknown object type"},
|
||||
{ERR_REASON(ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE),"unknown public key type"},
|
||||
{ERR_REASON(ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE),"unsupported any defined by type"},
|
||||
{ERR_REASON(ASN1_R_UNSUPPORTED_CIPHER) ,"unsupported cipher"},
|
||||
{ERR_REASON(ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM),"unsupported encryption algorithm"},
|
||||
{ERR_REASON(ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE),"unsupported public key type"},
|
||||
{ERR_REASON(ASN1_R_WRONG_TAG) ,"wrong tag"},
|
||||
{ERR_REASON(ASN1_R_WRONG_TYPE) ,"wrong type"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
@@ -240,8 +246,8 @@ void ERR_load_ASN1_strings(void)
|
||||
{
|
||||
init=0;
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
ERR_load_strings(ERR_LIB_ASN1,ASN1_str_functs);
|
||||
ERR_load_strings(ERR_LIB_ASN1,ASN1_str_reasons);
|
||||
ERR_load_strings(0,ASN1_str_functs);
|
||||
ERR_load_strings(0,ASN1_str_reasons);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <openssl/err.h>
|
||||
|
||||
static int asn1_check_eoc(unsigned char **in, long len);
|
||||
static int asn1_find_end(unsigned char **in, long len, char inf);
|
||||
static int asn1_collect(BUF_MEM *buf, unsigned char **in, long len, char inf, int tag, int aclass);
|
||||
static int collect_data(BUF_MEM *buf, unsigned char **p, long plen);
|
||||
static int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass, char *inf, char *cst,
|
||||
@@ -644,7 +645,7 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, unsigned char **in, long inl
|
||||
cont = *in;
|
||||
/* If indefinite length constructed find the real end */
|
||||
if(inf) {
|
||||
if(!asn1_collect(NULL, &p, plen, inf, -1, -1)) goto err;
|
||||
if(!asn1_find_end(&p, plen, inf)) goto err;
|
||||
len = p - cont;
|
||||
} else {
|
||||
len = p - cont + plen;
|
||||
@@ -807,12 +808,66 @@ int asn1_ex_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* This function finds the end of an ASN1 structure when passed its maximum
|
||||
* length, whether it is indefinite length and a pointer to the content.
|
||||
* This is more efficient than calling asn1_collect because it does not
|
||||
* recurse on each indefinite length header.
|
||||
*/
|
||||
|
||||
static int asn1_find_end(unsigned char **in, long len, char inf)
|
||||
{
|
||||
int expected_eoc;
|
||||
long plen;
|
||||
unsigned char *p = *in, *q;
|
||||
/* If not indefinite length constructed just add length */
|
||||
if (inf == 0)
|
||||
{
|
||||
*in += len;
|
||||
return 1;
|
||||
}
|
||||
expected_eoc = 1;
|
||||
/* Indefinite length constructed form. Find the end when enough EOCs
|
||||
* are found. If more indefinite length constructed headers
|
||||
* are encountered increment the expected eoc count otherwise justi
|
||||
* skip to the end of the data.
|
||||
*/
|
||||
while (len > 0)
|
||||
{
|
||||
if(asn1_check_eoc(&p, len))
|
||||
{
|
||||
expected_eoc--;
|
||||
if (expected_eoc == 0)
|
||||
break;
|
||||
len -= 2;
|
||||
continue;
|
||||
}
|
||||
q = p;
|
||||
/* Just read in a header: only care about the length */
|
||||
if(!asn1_check_tlen(&plen, NULL, NULL, &inf, NULL, &p, len,
|
||||
-1, 0, 0, NULL))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_FIND_END, ERR_R_NESTED_ASN1_ERROR);
|
||||
return 0;
|
||||
}
|
||||
if (inf)
|
||||
expected_eoc++;
|
||||
else
|
||||
p += plen;
|
||||
len -= p - q;
|
||||
}
|
||||
if (expected_eoc)
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_FIND_END, ASN1_R_MISSING_EOC);
|
||||
return 0;
|
||||
}
|
||||
*in = p;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* This function collects the asn1 data from a constructred string
|
||||
* type into a buffer. The values of 'in' and 'len' should refer
|
||||
* to the contents of the constructed type and 'inf' should be set
|
||||
* if it is indefinite length. If 'buf' is NULL then we just want
|
||||
* to find the end of the current structure: useful for indefinite
|
||||
* length constructed stuff.
|
||||
* if it is indefinite length.
|
||||
*/
|
||||
|
||||
static int asn1_collect(BUF_MEM *buf, unsigned char **in, long len, char inf, int tag, int aclass)
|
||||
@@ -822,11 +877,6 @@ static int asn1_collect(BUF_MEM *buf, unsigned char **in, long len, char inf, in
|
||||
char cst, ininf;
|
||||
p = *in;
|
||||
inf &= 1;
|
||||
/* If no buffer and not indefinite length constructed just pass over the encoded data */
|
||||
if(!buf && !inf) {
|
||||
*in += len;
|
||||
return 1;
|
||||
}
|
||||
while(len > 0) {
|
||||
q = p;
|
||||
/* Check for EOC */
|
||||
@@ -845,7 +895,13 @@ static int asn1_collect(BUF_MEM *buf, unsigned char **in, long len, char inf, in
|
||||
}
|
||||
/* If indefinite length constructed update max length */
|
||||
if(cst) {
|
||||
if(!asn1_collect(buf, &p, plen, ininf, tag, aclass)) return 0;
|
||||
#ifdef OPENSSL_ALLOW_NESTED_ASN1_STRINGS
|
||||
if (!asn1_collect(buf, &p, plen, ininf, tag, aclass))
|
||||
return 0;
|
||||
#else
|
||||
ASN1err(ASN1_F_ASN1_COLLECT, ASN1_R_NESTED_ASN1_STRING);
|
||||
return 0;
|
||||
#endif
|
||||
} else {
|
||||
if(!collect_data(buf, &p, plen)) return 0;
|
||||
}
|
||||
|
||||
@@ -160,21 +160,22 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, unsigned char **in, long len, cons
|
||||
int tag, int aclass, char opt, ASN1_TLC *ctx)
|
||||
{
|
||||
unsigned char *p = *in, *q;
|
||||
STACK *intname = NULL;
|
||||
STACK *intname = NULL, **intname_pp = &intname;
|
||||
int i, j, ret;
|
||||
X509_NAME *nm = NULL;
|
||||
X509_NAME *nm = NULL, **nm_pp = &nm;
|
||||
STACK_OF(X509_NAME_ENTRY) *entries;
|
||||
X509_NAME_ENTRY *entry;
|
||||
q = p;
|
||||
|
||||
/* Get internal representation of Name */
|
||||
ret = ASN1_item_ex_d2i((ASN1_VALUE **)&intname, &p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL),
|
||||
tag, aclass, opt, ctx);
|
||||
ret = ASN1_item_ex_d2i((ASN1_VALUE **)intname_pp,
|
||||
&p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL),
|
||||
tag, aclass, opt, ctx);
|
||||
|
||||
if(ret <= 0) return ret;
|
||||
|
||||
if(*val) x509_name_ex_free(val, NULL);
|
||||
if(!x509_name_ex_new((ASN1_VALUE **)&nm, NULL)) goto err;
|
||||
if(!x509_name_ex_new((ASN1_VALUE **)nm_pp, NULL)) goto err;
|
||||
/* We've decoded it: now cache encoding */
|
||||
if(!BUF_MEM_grow(nm->bytes, p - q)) goto err;
|
||||
memcpy(nm->bytes->data, q, p - q);
|
||||
@@ -218,7 +219,7 @@ static int x509_name_ex_i2d(ASN1_VALUE **val, unsigned char **out, const ASN1_IT
|
||||
|
||||
static int x509_name_encode(X509_NAME *a)
|
||||
{
|
||||
STACK *intname = NULL;
|
||||
STACK *intname = NULL, **intname_pp = &intname;
|
||||
int len;
|
||||
unsigned char *p;
|
||||
STACK_OF(X509_NAME_ENTRY) *entries = NULL;
|
||||
@@ -236,10 +237,12 @@ static int x509_name_encode(X509_NAME *a)
|
||||
}
|
||||
if(!sk_X509_NAME_ENTRY_push(entries, entry)) goto memerr;
|
||||
}
|
||||
len = ASN1_item_ex_i2d((ASN1_VALUE **)&intname, NULL, ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1);
|
||||
len = ASN1_item_ex_i2d((ASN1_VALUE **)intname_pp, NULL,
|
||||
ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1);
|
||||
if (!BUF_MEM_grow(a->bytes,len)) goto memerr;
|
||||
p=(unsigned char *)a->bytes->data;
|
||||
ASN1_item_ex_i2d((ASN1_VALUE **)&intname, &p, ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1);
|
||||
ASN1_item_ex_i2d((ASN1_VALUE **)intname_pp,
|
||||
&p, ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1);
|
||||
sk_pop_free(intname, sk_internal_free);
|
||||
a->modified = 0;
|
||||
return len;
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -109,5 +109,8 @@ bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h
|
||||
bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c
|
||||
bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_skey.o: ../../include/openssl/opensslconf.h bf_locl.h bf_pi.h bf_skey.c
|
||||
bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/crypto.h
|
||||
bf_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/fips.h
|
||||
bf_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
bf_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
bf_skey.o: ../../include/openssl/symhacks.h bf_locl.h bf_pi.h bf_skey.c
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
bx86unix.cpp
|
||||
bx86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -58,11 +58,13 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/blowfish.h>
|
||||
#include <openssl/fips.h>
|
||||
#include "bf_locl.h"
|
||||
#include "bf_pi.h"
|
||||
|
||||
void BF_set_key(BF_KEY *key, int len, const unsigned char *data)
|
||||
FIPS_NON_FIPS_VCIPHER_Init(BF)
|
||||
{
|
||||
int i;
|
||||
BF_LONG *p,ri,in[2];
|
||||
|
||||
@@ -104,7 +104,10 @@ typedef struct bf_key_st
|
||||
BF_LONG S[4*256];
|
||||
} BF_KEY;
|
||||
|
||||
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data);
|
||||
#endif
|
||||
void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
|
||||
|
||||
void BF_encrypt(BF_LONG *data,const BF_KEY *key);
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -576,7 +576,7 @@ abs_val(LDOUBLE value)
|
||||
}
|
||||
|
||||
static LDOUBLE
|
||||
pow10(int in_exp)
|
||||
pow_10(int in_exp)
|
||||
{
|
||||
LDOUBLE result = 1;
|
||||
while (in_exp) {
|
||||
@@ -639,11 +639,11 @@ fmtfp(
|
||||
|
||||
/* we "cheat" by converting the fractional part to integer by
|
||||
multiplying by a factor of 10 */
|
||||
fracpart = roundv((pow10(max)) * (ufvalue - intpart));
|
||||
fracpart = roundv((pow_10(max)) * (ufvalue - intpart));
|
||||
|
||||
if (fracpart >= (long)pow10(max)) {
|
||||
if (fracpart >= (long)pow_10(max)) {
|
||||
intpart++;
|
||||
fracpart -= (long)pow10(max);
|
||||
fracpart -= (long)pow_10(max);
|
||||
}
|
||||
|
||||
/* convert integer part */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/bio/bio_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -64,73 +64,77 @@
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
|
||||
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BIO,func,0)
|
||||
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_BIO,0,reason)
|
||||
|
||||
static ERR_STRING_DATA BIO_str_functs[]=
|
||||
{
|
||||
{ERR_PACK(0,BIO_F_ACPT_STATE,0), "ACPT_STATE"},
|
||||
{ERR_PACK(0,BIO_F_BIO_ACCEPT,0), "BIO_accept"},
|
||||
{ERR_PACK(0,BIO_F_BIO_BER_GET_HEADER,0), "BIO_BER_GET_HEADER"},
|
||||
{ERR_PACK(0,BIO_F_BIO_CTRL,0), "BIO_ctrl"},
|
||||
{ERR_PACK(0,BIO_F_BIO_GETHOSTBYNAME,0), "BIO_gethostbyname"},
|
||||
{ERR_PACK(0,BIO_F_BIO_GETS,0), "BIO_gets"},
|
||||
{ERR_PACK(0,BIO_F_BIO_GET_ACCEPT_SOCKET,0), "BIO_get_accept_socket"},
|
||||
{ERR_PACK(0,BIO_F_BIO_GET_HOST_IP,0), "BIO_get_host_ip"},
|
||||
{ERR_PACK(0,BIO_F_BIO_GET_PORT,0), "BIO_get_port"},
|
||||
{ERR_PACK(0,BIO_F_BIO_MAKE_PAIR,0), "BIO_MAKE_PAIR"},
|
||||
{ERR_PACK(0,BIO_F_BIO_NEW,0), "BIO_new"},
|
||||
{ERR_PACK(0,BIO_F_BIO_NEW_FILE,0), "BIO_new_file"},
|
||||
{ERR_PACK(0,BIO_F_BIO_NEW_MEM_BUF,0), "BIO_new_mem_buf"},
|
||||
{ERR_PACK(0,BIO_F_BIO_NREAD,0), "BIO_nread"},
|
||||
{ERR_PACK(0,BIO_F_BIO_NREAD0,0), "BIO_nread0"},
|
||||
{ERR_PACK(0,BIO_F_BIO_NWRITE,0), "BIO_nwrite"},
|
||||
{ERR_PACK(0,BIO_F_BIO_NWRITE0,0), "BIO_nwrite0"},
|
||||
{ERR_PACK(0,BIO_F_BIO_PUTS,0), "BIO_puts"},
|
||||
{ERR_PACK(0,BIO_F_BIO_READ,0), "BIO_read"},
|
||||
{ERR_PACK(0,BIO_F_BIO_SOCK_INIT,0), "BIO_sock_init"},
|
||||
{ERR_PACK(0,BIO_F_BIO_WRITE,0), "BIO_write"},
|
||||
{ERR_PACK(0,BIO_F_BUFFER_CTRL,0), "BUFFER_CTRL"},
|
||||
{ERR_PACK(0,BIO_F_CONN_CTRL,0), "CONN_CTRL"},
|
||||
{ERR_PACK(0,BIO_F_CONN_STATE,0), "CONN_STATE"},
|
||||
{ERR_PACK(0,BIO_F_FILE_CTRL,0), "FILE_CTRL"},
|
||||
{ERR_PACK(0,BIO_F_FILE_READ,0), "FILE_READ"},
|
||||
{ERR_PACK(0,BIO_F_LINEBUFFER_CTRL,0), "LINEBUFFER_CTRL"},
|
||||
{ERR_PACK(0,BIO_F_MEM_READ,0), "MEM_READ"},
|
||||
{ERR_PACK(0,BIO_F_MEM_WRITE,0), "MEM_WRITE"},
|
||||
{ERR_PACK(0,BIO_F_SSL_NEW,0), "SSL_new"},
|
||||
{ERR_PACK(0,BIO_F_WSASTARTUP,0), "WSASTARTUP"},
|
||||
{ERR_FUNC(BIO_F_ACPT_STATE), "ACPT_STATE"},
|
||||
{ERR_FUNC(BIO_F_BIO_ACCEPT), "BIO_accept"},
|
||||
{ERR_FUNC(BIO_F_BIO_BER_GET_HEADER), "BIO_BER_GET_HEADER"},
|
||||
{ERR_FUNC(BIO_F_BIO_CTRL), "BIO_ctrl"},
|
||||
{ERR_FUNC(BIO_F_BIO_GETHOSTBYNAME), "BIO_gethostbyname"},
|
||||
{ERR_FUNC(BIO_F_BIO_GETS), "BIO_gets"},
|
||||
{ERR_FUNC(BIO_F_BIO_GET_ACCEPT_SOCKET), "BIO_get_accept_socket"},
|
||||
{ERR_FUNC(BIO_F_BIO_GET_HOST_IP), "BIO_get_host_ip"},
|
||||
{ERR_FUNC(BIO_F_BIO_GET_PORT), "BIO_get_port"},
|
||||
{ERR_FUNC(BIO_F_BIO_MAKE_PAIR), "BIO_MAKE_PAIR"},
|
||||
{ERR_FUNC(BIO_F_BIO_NEW), "BIO_new"},
|
||||
{ERR_FUNC(BIO_F_BIO_NEW_FILE), "BIO_new_file"},
|
||||
{ERR_FUNC(BIO_F_BIO_NEW_MEM_BUF), "BIO_new_mem_buf"},
|
||||
{ERR_FUNC(BIO_F_BIO_NREAD), "BIO_nread"},
|
||||
{ERR_FUNC(BIO_F_BIO_NREAD0), "BIO_nread0"},
|
||||
{ERR_FUNC(BIO_F_BIO_NWRITE), "BIO_nwrite"},
|
||||
{ERR_FUNC(BIO_F_BIO_NWRITE0), "BIO_nwrite0"},
|
||||
{ERR_FUNC(BIO_F_BIO_PUTS), "BIO_puts"},
|
||||
{ERR_FUNC(BIO_F_BIO_READ), "BIO_read"},
|
||||
{ERR_FUNC(BIO_F_BIO_SOCK_INIT), "BIO_sock_init"},
|
||||
{ERR_FUNC(BIO_F_BIO_WRITE), "BIO_write"},
|
||||
{ERR_FUNC(BIO_F_BUFFER_CTRL), "BUFFER_CTRL"},
|
||||
{ERR_FUNC(BIO_F_CONN_CTRL), "CONN_CTRL"},
|
||||
{ERR_FUNC(BIO_F_CONN_STATE), "CONN_STATE"},
|
||||
{ERR_FUNC(BIO_F_FILE_CTRL), "FILE_CTRL"},
|
||||
{ERR_FUNC(BIO_F_FILE_READ), "FILE_READ"},
|
||||
{ERR_FUNC(BIO_F_LINEBUFFER_CTRL), "LINEBUFFER_CTRL"},
|
||||
{ERR_FUNC(BIO_F_MEM_READ), "MEM_READ"},
|
||||
{ERR_FUNC(BIO_F_MEM_WRITE), "MEM_WRITE"},
|
||||
{ERR_FUNC(BIO_F_SSL_NEW), "SSL_new"},
|
||||
{ERR_FUNC(BIO_F_WSASTARTUP), "WSASTARTUP"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
static ERR_STRING_DATA BIO_str_reasons[]=
|
||||
{
|
||||
{BIO_R_ACCEPT_ERROR ,"accept error"},
|
||||
{BIO_R_BAD_FOPEN_MODE ,"bad fopen mode"},
|
||||
{BIO_R_BAD_HOSTNAME_LOOKUP ,"bad hostname lookup"},
|
||||
{BIO_R_BROKEN_PIPE ,"broken pipe"},
|
||||
{BIO_R_CONNECT_ERROR ,"connect error"},
|
||||
{BIO_R_EOF_ON_MEMORY_BIO ,"EOF on memory BIO"},
|
||||
{BIO_R_ERROR_SETTING_NBIO ,"error setting nbio"},
|
||||
{BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET,"error setting nbio on accepted socket"},
|
||||
{BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET,"error setting nbio on accept socket"},
|
||||
{BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET ,"gethostbyname addr is not af inet"},
|
||||
{BIO_R_INVALID_ARGUMENT ,"invalid argument"},
|
||||
{BIO_R_INVALID_IP_ADDRESS ,"invalid ip address"},
|
||||
{BIO_R_IN_USE ,"in use"},
|
||||
{BIO_R_KEEPALIVE ,"keepalive"},
|
||||
{BIO_R_NBIO_CONNECT_ERROR ,"nbio connect error"},
|
||||
{BIO_R_NO_ACCEPT_PORT_SPECIFIED ,"no accept port specified"},
|
||||
{BIO_R_NO_HOSTNAME_SPECIFIED ,"no hostname specified"},
|
||||
{BIO_R_NO_PORT_DEFINED ,"no port defined"},
|
||||
{BIO_R_NO_PORT_SPECIFIED ,"no port specified"},
|
||||
{BIO_R_NO_SUCH_FILE ,"no such file"},
|
||||
{BIO_R_NULL_PARAMETER ,"null parameter"},
|
||||
{BIO_R_TAG_MISMATCH ,"tag mismatch"},
|
||||
{BIO_R_UNABLE_TO_BIND_SOCKET ,"unable to bind socket"},
|
||||
{BIO_R_UNABLE_TO_CREATE_SOCKET ,"unable to create socket"},
|
||||
{BIO_R_UNABLE_TO_LISTEN_SOCKET ,"unable to listen socket"},
|
||||
{BIO_R_UNINITIALIZED ,"uninitialized"},
|
||||
{BIO_R_UNSUPPORTED_METHOD ,"unsupported method"},
|
||||
{BIO_R_WRITE_TO_READ_ONLY_BIO ,"write to read only BIO"},
|
||||
{BIO_R_WSASTARTUP ,"WSAStartup"},
|
||||
{ERR_REASON(BIO_R_ACCEPT_ERROR) ,"accept error"},
|
||||
{ERR_REASON(BIO_R_BAD_FOPEN_MODE) ,"bad fopen mode"},
|
||||
{ERR_REASON(BIO_R_BAD_HOSTNAME_LOOKUP) ,"bad hostname lookup"},
|
||||
{ERR_REASON(BIO_R_BROKEN_PIPE) ,"broken pipe"},
|
||||
{ERR_REASON(BIO_R_CONNECT_ERROR) ,"connect error"},
|
||||
{ERR_REASON(BIO_R_EOF_ON_MEMORY_BIO) ,"EOF on memory BIO"},
|
||||
{ERR_REASON(BIO_R_ERROR_SETTING_NBIO) ,"error setting nbio"},
|
||||
{ERR_REASON(BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET),"error setting nbio on accepted socket"},
|
||||
{ERR_REASON(BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET),"error setting nbio on accept socket"},
|
||||
{ERR_REASON(BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET),"gethostbyname addr is not af inet"},
|
||||
{ERR_REASON(BIO_R_INVALID_ARGUMENT) ,"invalid argument"},
|
||||
{ERR_REASON(BIO_R_INVALID_IP_ADDRESS) ,"invalid ip address"},
|
||||
{ERR_REASON(BIO_R_IN_USE) ,"in use"},
|
||||
{ERR_REASON(BIO_R_KEEPALIVE) ,"keepalive"},
|
||||
{ERR_REASON(BIO_R_NBIO_CONNECT_ERROR) ,"nbio connect error"},
|
||||
{ERR_REASON(BIO_R_NO_ACCEPT_PORT_SPECIFIED),"no accept port specified"},
|
||||
{ERR_REASON(BIO_R_NO_HOSTNAME_SPECIFIED) ,"no hostname specified"},
|
||||
{ERR_REASON(BIO_R_NO_PORT_DEFINED) ,"no port defined"},
|
||||
{ERR_REASON(BIO_R_NO_PORT_SPECIFIED) ,"no port specified"},
|
||||
{ERR_REASON(BIO_R_NO_SUCH_FILE) ,"no such file"},
|
||||
{ERR_REASON(BIO_R_NULL_PARAMETER) ,"null parameter"},
|
||||
{ERR_REASON(BIO_R_TAG_MISMATCH) ,"tag mismatch"},
|
||||
{ERR_REASON(BIO_R_UNABLE_TO_BIND_SOCKET) ,"unable to bind socket"},
|
||||
{ERR_REASON(BIO_R_UNABLE_TO_CREATE_SOCKET),"unable to create socket"},
|
||||
{ERR_REASON(BIO_R_UNABLE_TO_LISTEN_SOCKET),"unable to listen socket"},
|
||||
{ERR_REASON(BIO_R_UNINITIALIZED) ,"uninitialized"},
|
||||
{ERR_REASON(BIO_R_UNSUPPORTED_METHOD) ,"unsupported method"},
|
||||
{ERR_REASON(BIO_R_WRITE_TO_READ_ONLY_BIO),"write to read only BIO"},
|
||||
{ERR_REASON(BIO_R_WSASTARTUP) ,"WSAStartup"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
@@ -144,8 +148,8 @@ void ERR_load_BIO_strings(void)
|
||||
{
|
||||
init=0;
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
ERR_load_strings(ERR_LIB_BIO,BIO_str_functs);
|
||||
ERR_load_strings(ERR_LIB_BIO,BIO_str_reasons);
|
||||
ERR_load_strings(0,BIO_str_functs);
|
||||
ERR_load_strings(0,BIO_str_reasons);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
break;
|
||||
case BIO_C_DO_STATE_MACHINE:
|
||||
/* use this one to start the connection */
|
||||
if (!data->state != BIO_CONN_S_OK)
|
||||
if (!(data->state != BIO_CONN_S_OK))
|
||||
ret=(long)conn_state(b,data);
|
||||
else
|
||||
ret=1;
|
||||
|
||||
@@ -266,7 +266,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
ret=0;
|
||||
break;
|
||||
}
|
||||
#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_OS2)
|
||||
#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_WIN32_CYGWIN)
|
||||
if (!(num & BIO_FP_TEXT))
|
||||
strcat(p,"b");
|
||||
else
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -31,12 +31,12 @@ LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
|
||||
bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
|
||||
bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
|
||||
bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c
|
||||
bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_x931p.c
|
||||
|
||||
LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
|
||||
bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
|
||||
bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
|
||||
bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o
|
||||
bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_x931p.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
@@ -118,6 +118,7 @@ asm/ia64-cpp.o: asm/ia64.S
|
||||
rm -f /tmp/ia64.$$$$.s
|
||||
|
||||
asm/x86_64-gcc.o: asm/x86_64-gcc.c
|
||||
$(CC) $(ASFLAGS) -c -o $@ $<
|
||||
|
||||
asm/pa-risc2W.o: asm/pa-risc2W.s
|
||||
/usr/ccs/bin/as -o asm/pa-risc2W.o asm/pa-risc2W.s
|
||||
|
||||
@@ -2,3 +2,5 @@ bn86unix.cpp
|
||||
co86unix.cpp
|
||||
bn86-elf.s
|
||||
co86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -116,7 +116,7 @@ if ($opf =~ /32\.s/) {
|
||||
$UDIV= "divwu"; # unsigned divide
|
||||
$UCMPI= "cmplwi"; # unsigned compare with immediate
|
||||
$UCMP= "cmplw"; # unsigned compare
|
||||
$COUNTZ="cntlzw"; # count leading zeros
|
||||
$CNTLZ= "cntlzw"; # count leading zeros
|
||||
$SHL= "slw"; # shift left
|
||||
$SHR= "srw"; # unsigned shift right
|
||||
$SHRI= "srwi"; # unsigned shift right by immediate
|
||||
@@ -124,6 +124,7 @@ if ($opf =~ /32\.s/) {
|
||||
$CLRU= "clrlwi"; # clear upper bits
|
||||
$INSR= "insrwi"; # insert right
|
||||
$ROTL= "rotlwi"; # rotate left by immediate
|
||||
$TR= "tw"; # conditional trap
|
||||
} elsif ($opf =~ /64\.s/) {
|
||||
$BITS= 64;
|
||||
$BNSZ= $BITS/8;
|
||||
@@ -139,7 +140,7 @@ if ($opf =~ /32\.s/) {
|
||||
$UDIV= "divdu"; # unsigned divide
|
||||
$UCMPI= "cmpldi"; # unsigned compare with immediate
|
||||
$UCMP= "cmpld"; # unsigned compare
|
||||
$COUNTZ="cntlzd"; # count leading zeros
|
||||
$CNTLZ= "cntlzd"; # count leading zeros
|
||||
$SHL= "sld"; # shift left
|
||||
$SHR= "srd"; # unsigned shift right
|
||||
$SHRI= "srdi"; # unsigned shift right by immediate
|
||||
@@ -147,6 +148,7 @@ if ($opf =~ /32\.s/) {
|
||||
$CLRU= "clrldi"; # clear upper bits
|
||||
$INSR= "insrdi"; # insert right
|
||||
$ROTL= "rotldi"; # rotate left by immediate
|
||||
$TR= "td"; # conditional trap
|
||||
} else { die "nonsense $opf"; }
|
||||
|
||||
( defined shift || open STDOUT,">$opf" ) || die "can't open $opf: $!";
|
||||
@@ -1710,17 +1712,12 @@ Lppcasm_add_adios:
|
||||
bclr BO_ALWAYS,CR0_LT
|
||||
Lppcasm_div1:
|
||||
xor r0,r0,r0 #r0=0
|
||||
$COUNTZ r7,r5 #r7 = num leading 0s in d.
|
||||
subfic r8,r7,$BITS #r8 = BN_num_bits_word(d)
|
||||
cmpi 0,0,r8,$BITS #
|
||||
bc BO_IF,CR0_EQ,Lppcasm_div2 #proceed if (r8==$BITS)
|
||||
li r9,1 # r9=1
|
||||
$SHL r10,r9,r8 # r9<<=r8
|
||||
$UCMP 0,r3,r10 #
|
||||
bc BO_IF,CR0_GT,Lppcasm_div2 #or if (h > (1<<r8))
|
||||
$UDIV r3,r3,r0 #if not assert(0) divide by 0!
|
||||
#that's how we signal overflow
|
||||
bclr BO_ALWAYS,CR0_LT #return. NEVER REACHED.
|
||||
li r8,$BITS
|
||||
$CNTLZ. r7,r5 #r7 = num leading 0s in d.
|
||||
bc BO_IF,CR0_EQ,Lppcasm_div2 #proceed if no leading zeros
|
||||
subf r8,r7,r8 #r8 = BN_num_bits_word(d)
|
||||
$SHR. r9,r3,r8 #are there any bits above r8'th?
|
||||
$TR 16,r9,r0 #if there're, signal to dump core...
|
||||
Lppcasm_div2:
|
||||
$UCMP 0,r3,r5 #h>=d?
|
||||
bc BO_IF,CR0_LT,Lppcasm_div3 #goto Lppcasm_div3 if not
|
||||
|
||||
@@ -13,20 +13,42 @@
|
||||
* A. Well, that's because this code is basically a quick-n-dirty
|
||||
* proof-of-concept hack. As you can see it's implemented with
|
||||
* inline assembler, which means that you're bound to GCC and that
|
||||
* there must be a room for fine-tuning.
|
||||
* there might be enough room for further improvement.
|
||||
*
|
||||
* Q. Why inline assembler?
|
||||
* A. x86_64 features own ABI I'm not familiar with. Which is why
|
||||
* I decided to let the compiler take care of subroutine
|
||||
* prologue/epilogue as well as register allocation.
|
||||
* A. x86_64 features own ABI which I'm not familiar with. This is
|
||||
* why I decided to let the compiler take care of subroutine
|
||||
* prologue/epilogue as well as register allocation. For reference.
|
||||
* Win64 implements different ABI for AMD64, different from Linux.
|
||||
*
|
||||
* Q. How much faster does it get?
|
||||
* A. Unfortunately people sitting on x86_64 hardware are prohibited
|
||||
* to disclose the performance numbers, so they (SuSE labs to be
|
||||
* specific) wouldn't tell me. However! Very similar coding technique
|
||||
* (reaching out for 128-bit result from 64x64-bit multiplication)
|
||||
* results in >3 times performance improvement on MIPS and I see no
|
||||
* reason why gain on x86_64 would be so much different:-)
|
||||
* A. 'apps/openssl speed rsa dsa' output with no-asm:
|
||||
*
|
||||
* sign verify sign/s verify/s
|
||||
* rsa 512 bits 0.0006s 0.0001s 1683.8 18456.2
|
||||
* rsa 1024 bits 0.0028s 0.0002s 356.0 6407.0
|
||||
* rsa 2048 bits 0.0172s 0.0005s 58.0 1957.8
|
||||
* rsa 4096 bits 0.1155s 0.0018s 8.7 555.6
|
||||
* sign verify sign/s verify/s
|
||||
* dsa 512 bits 0.0005s 0.0006s 2100.8 1768.3
|
||||
* dsa 1024 bits 0.0014s 0.0018s 692.3 559.2
|
||||
* dsa 2048 bits 0.0049s 0.0061s 204.7 165.0
|
||||
*
|
||||
* 'apps/openssl speed rsa dsa' output with this module:
|
||||
*
|
||||
* sign verify sign/s verify/s
|
||||
* rsa 512 bits 0.0004s 0.0000s 2767.1 33297.9
|
||||
* rsa 1024 bits 0.0012s 0.0001s 867.4 14674.7
|
||||
* rsa 2048 bits 0.0061s 0.0002s 164.0 5270.0
|
||||
* rsa 4096 bits 0.0384s 0.0006s 26.1 1650.8
|
||||
* sign verify sign/s verify/s
|
||||
* dsa 512 bits 0.0002s 0.0003s 4442.2 3786.3
|
||||
* dsa 1024 bits 0.0005s 0.0007s 1835.1 1497.4
|
||||
* dsa 2048 bits 0.0016s 0.0020s 620.4 504.6
|
||||
*
|
||||
* For the reference. IA-32 assembler implementation performs
|
||||
* very much like 64-bit code compiled with no-asm on the same
|
||||
* machine.
|
||||
*/
|
||||
|
||||
#define BN_ULONG unsigned long
|
||||
@@ -151,7 +173,7 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
|
||||
}
|
||||
|
||||
BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
{ BN_ULONG ret,i;
|
||||
{ BN_ULONG ret=0,i=0;
|
||||
|
||||
if (n <= 0) return 0;
|
||||
|
||||
@@ -164,7 +186,7 @@ BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n"
|
||||
: "+a"(ret),"+c"(n),"+r"(i)
|
||||
: "=&a"(ret),"+c"(n),"=&r"(i)
|
||||
: "r"(rp),"r"(ap),"r"(bp)
|
||||
: "cc"
|
||||
);
|
||||
@@ -174,7 +196,7 @@ BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
|
||||
#ifndef SIMICS
|
||||
BN_ULONG bn_sub_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
{ BN_ULONG ret,i;
|
||||
{ BN_ULONG ret=0,i=0;
|
||||
|
||||
if (n <= 0) return 0;
|
||||
|
||||
@@ -187,7 +209,7 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n"
|
||||
: "+a"(ret),"+c"(n),"+r"(i)
|
||||
: "=&a"(ret),"+c"(n),"=&r"(i)
|
||||
: "r"(rp),"r"(ap),"r"(bp)
|
||||
: "cc"
|
||||
);
|
||||
@@ -318,7 +340,6 @@ BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
|
||||
|
||||
void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
|
||||
{
|
||||
BN_ULONG bl,bh;
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
|
||||
@@ -423,7 +444,6 @@ void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
|
||||
|
||||
void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
|
||||
{
|
||||
BN_ULONG bl,bh;
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
|
||||
@@ -464,7 +484,6 @@ void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
|
||||
|
||||
void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a)
|
||||
{
|
||||
BN_ULONG bl,bh;
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
|
||||
@@ -541,7 +560,6 @@ void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a)
|
||||
|
||||
void bn_sqr_comba4(BN_ULONG *r, BN_ULONG *a)
|
||||
{
|
||||
BN_ULONG bl,bh;
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
|
||||
|
||||
@@ -225,10 +225,23 @@ extern "C" {
|
||||
|
||||
#define BN_FLG_MALLOCED 0x01
|
||||
#define BN_FLG_STATIC_DATA 0x02
|
||||
#define BN_FLG_EXP_CONSTTIME 0x04 /* avoid leaking exponent information through timings
|
||||
* (BN_mod_exp_mont() will call BN_mod_exp_mont_consttime) */
|
||||
#define BN_FLG_FREE 0x8000 /* used for debuging */
|
||||
#define BN_set_flags(b,n) ((b)->flags|=(n))
|
||||
#define BN_get_flags(b,n) ((b)->flags&(n))
|
||||
|
||||
/* get a clone of a BIGNUM with changed flags, for *temporary* use only
|
||||
* (the two BIGNUMs cannot not be used in parallel!) */
|
||||
#define BN_with_flags(dest,b,n) ((dest)->d=(b)->d, \
|
||||
(dest)->top=(b)->top, \
|
||||
(dest)->dmax=(b)->dmax, \
|
||||
(dest)->neg=(b)->neg, \
|
||||
(dest)->flags=(((dest)->flags & BN_FLG_MALLOCED) \
|
||||
| ((b)->flags & ~BN_FLG_MALLOCED) \
|
||||
| BN_FLG_STATIC_DATA \
|
||||
| (n)))
|
||||
|
||||
typedef struct bignum_st
|
||||
{
|
||||
BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */
|
||||
@@ -378,6 +391,8 @@ int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m,BN_CTX *ctx);
|
||||
int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont);
|
||||
int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
|
||||
@@ -423,6 +438,19 @@ int BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
|
||||
void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg,
|
||||
int do_trial_division);
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
int BN_X931_derive_prime(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
|
||||
void (*cb)(int, int, void *), void *cb_arg,
|
||||
const BIGNUM *Xp, const BIGNUM *Xp1, const BIGNUM *Xp2,
|
||||
const BIGNUM *e, BN_CTX *ctx);
|
||||
int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
|
||||
int BN_X931_generate_prime(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
|
||||
BIGNUM *Xp1, BIGNUM *Xp2,
|
||||
const BIGNUM *Xp,
|
||||
const BIGNUM *e, BN_CTX *ctx,
|
||||
void (*cb)(int, int, void *), void *cb_arg);
|
||||
#endif
|
||||
|
||||
BN_MONT_CTX *BN_MONT_CTX_new(void );
|
||||
void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
|
||||
int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,
|
||||
@@ -434,6 +462,8 @@ int BN_from_montgomery(BIGNUM *r,const BIGNUM *a,
|
||||
void BN_MONT_CTX_free(BN_MONT_CTX *mont);
|
||||
int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx);
|
||||
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to,BN_MONT_CTX *from);
|
||||
BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
|
||||
const BIGNUM *mod, BN_CTX *ctx);
|
||||
|
||||
BN_BLINDING *BN_BLINDING_new(BIGNUM *A,BIGNUM *Ai,BIGNUM *mod);
|
||||
void BN_BLINDING_free(BN_BLINDING *b);
|
||||
@@ -510,11 +540,15 @@ void ERR_load_BN_strings(void);
|
||||
#define BN_F_BN_CTX_GET 116
|
||||
#define BN_F_BN_CTX_NEW 106
|
||||
#define BN_F_BN_DIV 107
|
||||
#define BN_F_BN_EXP 123
|
||||
#define BN_F_BN_EXPAND2 108
|
||||
#define BN_F_BN_EXPAND_INTERNAL 120
|
||||
#define BN_F_BN_MOD_EXP2_MONT 118
|
||||
#define BN_F_BN_MOD_EXP_MONT 109
|
||||
#define BN_F_BN_MOD_EXP_MONT_CONSTTIME 124
|
||||
#define BN_F_BN_MOD_EXP_MONT_WORD 117
|
||||
#define BN_F_BN_MOD_EXP_RECP 125
|
||||
#define BN_F_BN_MOD_EXP_SIMPLE 126
|
||||
#define BN_F_BN_MOD_INVERSE 110
|
||||
#define BN_F_BN_MOD_LSHIFT_QUICK 119
|
||||
#define BN_F_BN_MOD_MUL_RECIPROCAL 111
|
||||
|
||||
@@ -237,7 +237,7 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
|
||||
if (d == 0) return(BN_MASK2);
|
||||
|
||||
i=BN_num_bits_word(d);
|
||||
assert((i == BN_BITS2) || (h > (BN_ULONG)1<<i));
|
||||
assert((i == BN_BITS2) || (h <= (BN_ULONG)1<<i));
|
||||
|
||||
i=BN_BITS2-i;
|
||||
if (h >= d) h-=d;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/bn/bn_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -64,52 +64,60 @@
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
|
||||
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BN,func,0)
|
||||
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_BN,0,reason)
|
||||
|
||||
static ERR_STRING_DATA BN_str_functs[]=
|
||||
{
|
||||
{ERR_PACK(0,BN_F_BN_BLINDING_CONVERT,0), "BN_BLINDING_convert"},
|
||||
{ERR_PACK(0,BN_F_BN_BLINDING_INVERT,0), "BN_BLINDING_invert"},
|
||||
{ERR_PACK(0,BN_F_BN_BLINDING_NEW,0), "BN_BLINDING_new"},
|
||||
{ERR_PACK(0,BN_F_BN_BLINDING_UPDATE,0), "BN_BLINDING_update"},
|
||||
{ERR_PACK(0,BN_F_BN_BN2DEC,0), "BN_bn2dec"},
|
||||
{ERR_PACK(0,BN_F_BN_BN2HEX,0), "BN_bn2hex"},
|
||||
{ERR_PACK(0,BN_F_BN_CTX_GET,0), "BN_CTX_get"},
|
||||
{ERR_PACK(0,BN_F_BN_CTX_NEW,0), "BN_CTX_new"},
|
||||
{ERR_PACK(0,BN_F_BN_DIV,0), "BN_div"},
|
||||
{ERR_PACK(0,BN_F_BN_EXPAND2,0), "bn_expand2"},
|
||||
{ERR_PACK(0,BN_F_BN_EXPAND_INTERNAL,0), "BN_EXPAND_INTERNAL"},
|
||||
{ERR_PACK(0,BN_F_BN_MOD_EXP2_MONT,0), "BN_mod_exp2_mont"},
|
||||
{ERR_PACK(0,BN_F_BN_MOD_EXP_MONT,0), "BN_mod_exp_mont"},
|
||||
{ERR_PACK(0,BN_F_BN_MOD_EXP_MONT_WORD,0), "BN_mod_exp_mont_word"},
|
||||
{ERR_PACK(0,BN_F_BN_MOD_INVERSE,0), "BN_mod_inverse"},
|
||||
{ERR_PACK(0,BN_F_BN_MOD_LSHIFT_QUICK,0), "BN_mod_lshift_quick"},
|
||||
{ERR_PACK(0,BN_F_BN_MOD_MUL_RECIPROCAL,0), "BN_mod_mul_reciprocal"},
|
||||
{ERR_PACK(0,BN_F_BN_MOD_SQRT,0), "BN_mod_sqrt"},
|
||||
{ERR_PACK(0,BN_F_BN_MPI2BN,0), "BN_mpi2bn"},
|
||||
{ERR_PACK(0,BN_F_BN_NEW,0), "BN_new"},
|
||||
{ERR_PACK(0,BN_F_BN_RAND,0), "BN_rand"},
|
||||
{ERR_PACK(0,BN_F_BN_RAND_RANGE,0), "BN_rand_range"},
|
||||
{ERR_PACK(0,BN_F_BN_USUB,0), "BN_usub"},
|
||||
{ERR_FUNC(BN_F_BN_BLINDING_CONVERT), "BN_BLINDING_convert"},
|
||||
{ERR_FUNC(BN_F_BN_BLINDING_INVERT), "BN_BLINDING_invert"},
|
||||
{ERR_FUNC(BN_F_BN_BLINDING_NEW), "BN_BLINDING_new"},
|
||||
{ERR_FUNC(BN_F_BN_BLINDING_UPDATE), "BN_BLINDING_update"},
|
||||
{ERR_FUNC(BN_F_BN_BN2DEC), "BN_bn2dec"},
|
||||
{ERR_FUNC(BN_F_BN_BN2HEX), "BN_bn2hex"},
|
||||
{ERR_FUNC(BN_F_BN_CTX_GET), "BN_CTX_get"},
|
||||
{ERR_FUNC(BN_F_BN_CTX_NEW), "BN_CTX_new"},
|
||||
{ERR_FUNC(BN_F_BN_DIV), "BN_div"},
|
||||
{ERR_FUNC(BN_F_BN_EXP), "BN_exp"},
|
||||
{ERR_FUNC(BN_F_BN_EXPAND2), "bn_expand2"},
|
||||
{ERR_FUNC(BN_F_BN_EXPAND_INTERNAL), "BN_EXPAND_INTERNAL"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_EXP2_MONT), "BN_mod_exp2_mont"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_EXP_MONT), "BN_mod_exp_mont"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_EXP_MONT_CONSTTIME), "BN_mod_exp_mont_consttime"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_EXP_MONT_WORD), "BN_mod_exp_mont_word"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_EXP_RECP), "BN_mod_exp_recp"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_EXP_SIMPLE), "BN_mod_exp_simple"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_INVERSE), "BN_mod_inverse"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_LSHIFT_QUICK), "BN_mod_lshift_quick"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_MUL_RECIPROCAL), "BN_mod_mul_reciprocal"},
|
||||
{ERR_FUNC(BN_F_BN_MOD_SQRT), "BN_mod_sqrt"},
|
||||
{ERR_FUNC(BN_F_BN_MPI2BN), "BN_mpi2bn"},
|
||||
{ERR_FUNC(BN_F_BN_NEW), "BN_new"},
|
||||
{ERR_FUNC(BN_F_BN_RAND), "BN_rand"},
|
||||
{ERR_FUNC(BN_F_BN_RAND_RANGE), "BN_rand_range"},
|
||||
{ERR_FUNC(BN_F_BN_USUB), "BN_usub"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
static ERR_STRING_DATA BN_str_reasons[]=
|
||||
{
|
||||
{BN_R_ARG2_LT_ARG3 ,"arg2 lt arg3"},
|
||||
{BN_R_BAD_RECIPROCAL ,"bad reciprocal"},
|
||||
{BN_R_BIGNUM_TOO_LONG ,"bignum too long"},
|
||||
{BN_R_CALLED_WITH_EVEN_MODULUS ,"called with even modulus"},
|
||||
{BN_R_DIV_BY_ZERO ,"div by zero"},
|
||||
{BN_R_ENCODING_ERROR ,"encoding error"},
|
||||
{BN_R_EXPAND_ON_STATIC_BIGNUM_DATA ,"expand on static bignum data"},
|
||||
{BN_R_INPUT_NOT_REDUCED ,"input not reduced"},
|
||||
{BN_R_INVALID_LENGTH ,"invalid length"},
|
||||
{BN_R_INVALID_RANGE ,"invalid range"},
|
||||
{BN_R_NOT_A_SQUARE ,"not a square"},
|
||||
{BN_R_NOT_INITIALIZED ,"not initialized"},
|
||||
{BN_R_NO_INVERSE ,"no inverse"},
|
||||
{BN_R_P_IS_NOT_PRIME ,"p is not prime"},
|
||||
{BN_R_TOO_MANY_ITERATIONS ,"too many iterations"},
|
||||
{BN_R_TOO_MANY_TEMPORARY_VARIABLES ,"too many temporary variables"},
|
||||
{ERR_REASON(BN_R_ARG2_LT_ARG3) ,"arg2 lt arg3"},
|
||||
{ERR_REASON(BN_R_BAD_RECIPROCAL) ,"bad reciprocal"},
|
||||
{ERR_REASON(BN_R_BIGNUM_TOO_LONG) ,"bignum too long"},
|
||||
{ERR_REASON(BN_R_CALLED_WITH_EVEN_MODULUS),"called with even modulus"},
|
||||
{ERR_REASON(BN_R_DIV_BY_ZERO) ,"div by zero"},
|
||||
{ERR_REASON(BN_R_ENCODING_ERROR) ,"encoding error"},
|
||||
{ERR_REASON(BN_R_EXPAND_ON_STATIC_BIGNUM_DATA),"expand on static bignum data"},
|
||||
{ERR_REASON(BN_R_INPUT_NOT_REDUCED) ,"input not reduced"},
|
||||
{ERR_REASON(BN_R_INVALID_LENGTH) ,"invalid length"},
|
||||
{ERR_REASON(BN_R_INVALID_RANGE) ,"invalid range"},
|
||||
{ERR_REASON(BN_R_NOT_A_SQUARE) ,"not a square"},
|
||||
{ERR_REASON(BN_R_NOT_INITIALIZED) ,"not initialized"},
|
||||
{ERR_REASON(BN_R_NO_INVERSE) ,"no inverse"},
|
||||
{ERR_REASON(BN_R_P_IS_NOT_PRIME) ,"p is not prime"},
|
||||
{ERR_REASON(BN_R_TOO_MANY_ITERATIONS) ,"too many iterations"},
|
||||
{ERR_REASON(BN_R_TOO_MANY_TEMPORARY_VARIABLES),"too many temporary variables"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
@@ -123,8 +131,8 @@ void ERR_load_BN_strings(void)
|
||||
{
|
||||
init=0;
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
ERR_load_strings(ERR_LIB_BN,BN_str_functs);
|
||||
ERR_load_strings(ERR_LIB_BN,BN_str_reasons);
|
||||
ERR_load_strings(0,BN_str_functs);
|
||||
ERR_load_strings(0,BN_str_reasons);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -113,6 +113,7 @@
|
||||
#include "cryptlib.h"
|
||||
#include "bn_lcl.h"
|
||||
|
||||
/* maximum precomputation table size for *variable* sliding windows */
|
||||
#define TABLE_SIZE 32
|
||||
|
||||
/* this one works - simple but works */
|
||||
@@ -121,6 +122,13 @@ int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
|
||||
int i,bits,ret=0;
|
||||
BIGNUM *v,*rr;
|
||||
|
||||
if (BN_get_flags(p, BN_FLG_EXP_CONSTTIME) != 0)
|
||||
{
|
||||
/* BN_FLG_EXP_CONSTTIME only supported by BN_mod_exp_mont() */
|
||||
BNerr(BN_F_BN_EXP,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
BN_CTX_start(ctx);
|
||||
if ((r == a) || (r == p))
|
||||
rr = BN_CTX_get(ctx);
|
||||
@@ -204,7 +212,7 @@ int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
|
||||
if (BN_is_odd(m))
|
||||
{
|
||||
# ifdef MONT_EXP_WORD
|
||||
if (a->top == 1 && !a->neg)
|
||||
if (a->top == 1 && !a->neg && (BN_get_flags(p, BN_FLG_EXP_CONSTTIME) == 0))
|
||||
{
|
||||
BN_ULONG A = a->d[0];
|
||||
ret=BN_mod_exp_mont_word(r,A,p,m,ctx,NULL);
|
||||
@@ -234,6 +242,13 @@ int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
BIGNUM val[TABLE_SIZE];
|
||||
BN_RECP_CTX recp;
|
||||
|
||||
if (BN_get_flags(p, BN_FLG_EXP_CONSTTIME) != 0)
|
||||
{
|
||||
/* BN_FLG_EXP_CONSTTIME only supported by BN_mod_exp_mont() */
|
||||
BNerr(BN_F_BN_MOD_EXP_RECP,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
bits=BN_num_bits(p);
|
||||
|
||||
if (bits == 0)
|
||||
@@ -361,6 +376,11 @@ int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
|
||||
BIGNUM val[TABLE_SIZE];
|
||||
BN_MONT_CTX *mont=NULL;
|
||||
|
||||
if (BN_get_flags(p, BN_FLG_EXP_CONSTTIME) != 0)
|
||||
{
|
||||
return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
|
||||
}
|
||||
|
||||
bn_check_top(a);
|
||||
bn_check_top(p);
|
||||
bn_check_top(m);
|
||||
@@ -493,6 +513,212 @@ err:
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
/* BN_mod_exp_mont_consttime() stores the precomputed powers in a specific layout
|
||||
* so that accessing any of these table values shows the same access pattern as far
|
||||
* as cache lines are concerned. The following functions are used to transfer a BIGNUM
|
||||
* from/to that table. */
|
||||
|
||||
static int MOD_EXP_CTIME_COPY_TO_PREBUF(BIGNUM *b, int top, unsigned char *buf, int idx, int width)
|
||||
{
|
||||
size_t i, j;
|
||||
|
||||
if (bn_wexpand(b, top) == NULL)
|
||||
return 0;
|
||||
while (b->top < top)
|
||||
{
|
||||
b->d[b->top++] = 0;
|
||||
}
|
||||
|
||||
for (i = 0, j=idx; i < top * sizeof b->d[0]; i++, j+=width)
|
||||
{
|
||||
buf[j] = ((unsigned char*)b->d)[i];
|
||||
}
|
||||
|
||||
bn_fix_top(b);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, unsigned char *buf, int idx, int width)
|
||||
{
|
||||
size_t i, j;
|
||||
|
||||
if (bn_wexpand(b, top) == NULL)
|
||||
return 0;
|
||||
|
||||
for (i=0, j=idx; i < top * sizeof b->d[0]; i++, j+=width)
|
||||
{
|
||||
((unsigned char*)b->d)[i] = buf[j];
|
||||
}
|
||||
|
||||
b->top = top;
|
||||
bn_fix_top(b);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Given a pointer value, compute the next address that is a cache line multiple. */
|
||||
#define MOD_EXP_CTIME_ALIGN(x_) \
|
||||
((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ULONG)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
|
||||
|
||||
/* This variant of BN_mod_exp_mont() uses fixed windows and the special
|
||||
* precomputation memory layout to limit data-dependency to a minimum
|
||||
* to protect secret exponents (cf. the hyper-threading timing attacks
|
||||
* pointed out by Colin Percival,
|
||||
* http://www.daemonology.net/hyperthreading-considered-harmful/)
|
||||
*/
|
||||
int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
|
||||
{
|
||||
int i,bits,ret=0,idx,window,wvalue;
|
||||
int top;
|
||||
BIGNUM *r;
|
||||
const BIGNUM *aa;
|
||||
BN_MONT_CTX *mont=NULL;
|
||||
|
||||
int numPowers;
|
||||
unsigned char *powerbufFree=NULL;
|
||||
int powerbufLen = 0;
|
||||
unsigned char *powerbuf=NULL;
|
||||
BIGNUM *computeTemp=NULL, *am=NULL;
|
||||
|
||||
bn_check_top(a);
|
||||
bn_check_top(p);
|
||||
bn_check_top(m);
|
||||
|
||||
top = m->top;
|
||||
|
||||
if (!(m->d[0] & 1))
|
||||
{
|
||||
BNerr(BN_F_BN_MOD_EXP_MONT_CONSTTIME,BN_R_CALLED_WITH_EVEN_MODULUS);
|
||||
return(0);
|
||||
}
|
||||
bits=BN_num_bits(p);
|
||||
if (bits == 0)
|
||||
{
|
||||
ret = BN_one(rr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Initialize BIGNUM context and allocate intermediate result */
|
||||
BN_CTX_start(ctx);
|
||||
r = BN_CTX_get(ctx);
|
||||
if (r == NULL) goto err;
|
||||
|
||||
/* Allocate a montgomery context if it was not supplied by the caller.
|
||||
* If this is not done, things will break in the montgomery part.
|
||||
*/
|
||||
if (in_mont != NULL)
|
||||
mont=in_mont;
|
||||
else
|
||||
{
|
||||
if ((mont=BN_MONT_CTX_new()) == NULL) goto err;
|
||||
if (!BN_MONT_CTX_set(mont,m,ctx)) goto err;
|
||||
}
|
||||
|
||||
/* Get the window size to use with size of p. */
|
||||
window = BN_window_bits_for_ctime_exponent_size(bits);
|
||||
|
||||
/* Allocate a buffer large enough to hold all of the pre-computed
|
||||
* powers of a.
|
||||
*/
|
||||
numPowers = 1 << window;
|
||||
powerbufLen = sizeof(m->d[0])*top*numPowers;
|
||||
if ((powerbufFree=(unsigned char*)OPENSSL_malloc(powerbufLen+MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH)) == NULL)
|
||||
goto err;
|
||||
|
||||
powerbuf = MOD_EXP_CTIME_ALIGN(powerbufFree);
|
||||
memset(powerbuf, 0, powerbufLen);
|
||||
|
||||
/* Initialize the intermediate result. Do this early to save double conversion,
|
||||
* once each for a^0 and intermediate result.
|
||||
*/
|
||||
if (!BN_to_montgomery(r,BN_value_one(),mont,ctx)) goto err;
|
||||
if (!MOD_EXP_CTIME_COPY_TO_PREBUF(r, top, powerbuf, 0, numPowers)) goto err;
|
||||
|
||||
/* Initialize computeTemp as a^1 with montgomery precalcs */
|
||||
computeTemp = BN_CTX_get(ctx);
|
||||
am = BN_CTX_get(ctx);
|
||||
if (computeTemp==NULL || am==NULL) goto err;
|
||||
|
||||
if (a->neg || BN_ucmp(a,m) >= 0)
|
||||
{
|
||||
if (!BN_mod(am,a,m,ctx))
|
||||
goto err;
|
||||
aa= am;
|
||||
}
|
||||
else
|
||||
aa=a;
|
||||
if (!BN_to_montgomery(am,aa,mont,ctx)) goto err;
|
||||
if (!BN_copy(computeTemp, am)) goto err;
|
||||
if (!MOD_EXP_CTIME_COPY_TO_PREBUF(am, top, powerbuf, 1, numPowers)) goto err;
|
||||
|
||||
/* If the window size is greater than 1, then calculate
|
||||
* val[i=2..2^winsize-1]. Powers are computed as a*a^(i-1)
|
||||
* (even powers could instead be computed as (a^(i/2))^2
|
||||
* to use the slight performance advantage of sqr over mul).
|
||||
*/
|
||||
if (window > 1)
|
||||
{
|
||||
for (i=2; i<numPowers; i++)
|
||||
{
|
||||
/* Calculate a^i = a^(i-1) * a */
|
||||
if (!BN_mod_mul_montgomery(computeTemp,am,computeTemp,mont,ctx))
|
||||
goto err;
|
||||
if (!MOD_EXP_CTIME_COPY_TO_PREBUF(computeTemp, top, powerbuf, i, numPowers)) goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/* Adjust the number of bits up to a multiple of the window size.
|
||||
* If the exponent length is not a multiple of the window size, then
|
||||
* this pads the most significant bits with zeros to normalize the
|
||||
* scanning loop to there's no special cases.
|
||||
*
|
||||
* * NOTE: Making the window size a power of two less than the native
|
||||
* * word size ensures that the padded bits won't go past the last
|
||||
* * word in the internal BIGNUM structure. Going past the end will
|
||||
* * still produce the correct result, but causes a different branch
|
||||
* * to be taken in the BN_is_bit_set function.
|
||||
*/
|
||||
bits = ((bits+window-1)/window)*window;
|
||||
idx=bits-1; /* The top bit of the window */
|
||||
|
||||
/* Scan the exponent one window at a time starting from the most
|
||||
* significant bits.
|
||||
*/
|
||||
while (idx >= 0)
|
||||
{
|
||||
wvalue=0; /* The 'value' of the window */
|
||||
|
||||
/* Scan the window, squaring the result as we go */
|
||||
for (i=0; i<window; i++,idx--)
|
||||
{
|
||||
if (!BN_mod_mul_montgomery(r,r,r,mont,ctx)) goto err;
|
||||
wvalue = (wvalue<<1)+BN_is_bit_set(p,idx);
|
||||
}
|
||||
|
||||
/* Fetch the appropriate pre-computed value from the pre-buf */
|
||||
if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(computeTemp, top, powerbuf, wvalue, numPowers)) goto err;
|
||||
|
||||
/* Multiply the result into the intermediate result */
|
||||
if (!BN_mod_mul_montgomery(r,r,computeTemp,mont,ctx)) goto err;
|
||||
}
|
||||
|
||||
/* Convert the final result from montgomery to standard format */
|
||||
if (!BN_from_montgomery(rr,r,mont,ctx)) goto err;
|
||||
ret=1;
|
||||
err:
|
||||
if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont);
|
||||
if (powerbuf!=NULL)
|
||||
{
|
||||
OPENSSL_cleanse(powerbuf,powerbufLen);
|
||||
OPENSSL_free(powerbufFree);
|
||||
}
|
||||
if (am!=NULL) BN_clear(am);
|
||||
if (computeTemp!=NULL) BN_clear(computeTemp);
|
||||
BN_CTX_end(ctx);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
|
||||
{
|
||||
@@ -517,6 +743,13 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
|
||||
#define BN_TO_MONTGOMERY_WORD(r, w, mont) \
|
||||
(BN_set_word(r, (w)) && BN_to_montgomery(r, r, (mont), ctx))
|
||||
|
||||
if (BN_get_flags(p, BN_FLG_EXP_CONSTTIME) != 0)
|
||||
{
|
||||
/* BN_FLG_EXP_CONSTTIME only supported by BN_mod_exp_mont() */
|
||||
BNerr(BN_F_BN_MOD_EXP_MONT_WORD,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
bn_check_top(p);
|
||||
bn_check_top(m);
|
||||
|
||||
@@ -644,6 +877,13 @@ int BN_mod_exp_simple(BIGNUM *r,
|
||||
BIGNUM *d;
|
||||
BIGNUM val[TABLE_SIZE];
|
||||
|
||||
if (BN_get_flags(p, BN_FLG_EXP_CONSTTIME) != 0)
|
||||
{
|
||||
/* BN_FLG_EXP_CONSTTIME only supported by BN_mod_exp_mont() */
|
||||
BNerr(BN_F_BN_MOD_EXP_SIMPLE,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
bits=BN_num_bits(p);
|
||||
|
||||
if (bits == 0)
|
||||
|
||||
@@ -177,6 +177,45 @@ struct bignum_ctx
|
||||
|
||||
|
||||
|
||||
/* BN_mod_exp_mont_conttime is based on the assumption that the
|
||||
* L1 data cache line width of the target processor is at least
|
||||
* the following value.
|
||||
*/
|
||||
#define MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH ( 64 )
|
||||
#define MOD_EXP_CTIME_MIN_CACHE_LINE_MASK (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - 1)
|
||||
|
||||
/* Window sizes optimized for fixed window size modular exponentiation
|
||||
* algorithm (BN_mod_exp_mont_consttime).
|
||||
*
|
||||
* To achieve the security goals of BN_mode_exp_mont_consttime, the
|
||||
* maximum size of the window must not exceed
|
||||
* log_2(MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH).
|
||||
*
|
||||
* Window size thresholds are defined for cache line sizes of 32 and 64,
|
||||
* cache line sizes where log_2(32)=5 and log_2(64)=6 respectively. A
|
||||
* window size of 7 should only be used on processors that have a 128
|
||||
* byte or greater cache line size.
|
||||
*/
|
||||
#if MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH == 64
|
||||
|
||||
# define BN_window_bits_for_ctime_exponent_size(b) \
|
||||
((b) > 937 ? 6 : \
|
||||
(b) > 306 ? 5 : \
|
||||
(b) > 89 ? 4 : \
|
||||
(b) > 22 ? 3 : 1)
|
||||
# define BN_MAX_WINDOW_BITS_FOR_CTIME_EXPONENT_SIZE (6)
|
||||
|
||||
#elif MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH == 32
|
||||
|
||||
# define BN_window_bits_for_ctime_exponent_size(b) \
|
||||
((b) > 306 ? 5 : \
|
||||
(b) > 89 ? 4 : \
|
||||
(b) > 22 ? 3 : 1)
|
||||
# define BN_MAX_WINDOW_BITS_FOR_CTIME_EXPONENT_SIZE (5)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Pentium pro 16,16,16,32,64 */
|
||||
/* Alpha 16,16,16,16.64 */
|
||||
#define BN_MULL_SIZE_NORMAL (16) /* 32 */
|
||||
|
||||
@@ -347,3 +347,23 @@ BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from)
|
||||
return(to);
|
||||
}
|
||||
|
||||
BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
|
||||
const BIGNUM *mod, BN_CTX *ctx)
|
||||
{
|
||||
if (*pmont)
|
||||
return *pmont;
|
||||
CRYPTO_w_lock(lock);
|
||||
if (!*pmont)
|
||||
{
|
||||
*pmont = BN_MONT_CTX_new();
|
||||
if (*pmont && !BN_MONT_CTX_set(*pmont, mod, ctx))
|
||||
{
|
||||
BN_MONT_CTX_free(*pmont);
|
||||
*pmont = NULL;
|
||||
}
|
||||
}
|
||||
CRYPTO_w_unlock(lock);
|
||||
return *pmont;
|
||||
}
|
||||
|
||||
|
||||
|
||||
282
crypto/bn/bn_x931p.c
Normal file
282
crypto/bn/bn_x931p.c
Normal file
@@ -0,0 +1,282 @@
|
||||
/* bn_x931p.c */
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project 2005.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* licensing@OpenSSL.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
|
||||
/* X9.31 routines for prime derivation */
|
||||
|
||||
|
||||
/* X9.31 prime derivation. This is used to generate the primes pi
|
||||
* (p1, p2, q1, q2) from a parameter Xpi by checking successive odd
|
||||
* integers.
|
||||
*/
|
||||
|
||||
static int bn_x931_derive_pi(BIGNUM *pi, const BIGNUM *Xpi, BN_CTX *ctx,
|
||||
void (*cb)(int, int, void *), void *cb_arg)
|
||||
{
|
||||
int i = 0;
|
||||
if (!BN_copy(pi, Xpi))
|
||||
return 0;
|
||||
if (!BN_is_odd(pi) && !BN_add_word(pi, 1))
|
||||
return 0;
|
||||
for(;;)
|
||||
{
|
||||
i++;
|
||||
if (cb)
|
||||
cb(0, i, cb_arg);
|
||||
/* NB 27 MR is specificed in X9.31 */
|
||||
if (BN_is_prime_fasttest(pi, 27, cb, ctx, cb_arg, 1))
|
||||
break;
|
||||
if (!BN_add_word(pi, 2))
|
||||
return 0;
|
||||
}
|
||||
if (cb)
|
||||
cb(2, i, cb_arg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* This is the main X9.31 prime derivation function. From parameters
|
||||
* Xp1, Xp2 and Xp derive the prime p. If the parameters p1 or p2 are
|
||||
* not NULL they will be returned too: this is needed for testing.
|
||||
*/
|
||||
|
||||
int BN_X931_derive_prime(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
|
||||
void (*cb)(int, int, void *), void *cb_arg,
|
||||
const BIGNUM *Xp, const BIGNUM *Xp1, const BIGNUM *Xp2,
|
||||
const BIGNUM *e, BN_CTX *ctx)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
BIGNUM *t, *p1p2, *pm1;
|
||||
|
||||
/* Only even e supported */
|
||||
if (!BN_is_odd(e))
|
||||
return 0;
|
||||
|
||||
BN_CTX_start(ctx);
|
||||
if (!p1)
|
||||
p1 = BN_CTX_get(ctx);
|
||||
|
||||
if (!p2)
|
||||
p2 = BN_CTX_get(ctx);
|
||||
|
||||
t = BN_CTX_get(ctx);
|
||||
|
||||
p1p2 = BN_CTX_get(ctx);
|
||||
|
||||
pm1 = BN_CTX_get(ctx);
|
||||
|
||||
if (!bn_x931_derive_pi(p1, Xp1, ctx, cb, cb_arg))
|
||||
goto err;
|
||||
|
||||
if (!bn_x931_derive_pi(p2, Xp2, ctx, cb, cb_arg))
|
||||
goto err;
|
||||
|
||||
if (!BN_mul(p1p2, p1, p2, ctx))
|
||||
goto err;
|
||||
|
||||
/* First set p to value of Rp */
|
||||
|
||||
if (!BN_mod_inverse(p, p2, p1, ctx))
|
||||
goto err;
|
||||
|
||||
if (!BN_mul(p, p, p2, ctx))
|
||||
goto err;
|
||||
|
||||
if (!BN_mod_inverse(t, p1, p2, ctx))
|
||||
goto err;
|
||||
|
||||
if (!BN_mul(t, t, p1, ctx))
|
||||
goto err;
|
||||
|
||||
if (!BN_sub(p, p, t))
|
||||
goto err;
|
||||
|
||||
if (p->neg && !BN_add(p, p, p1p2))
|
||||
goto err;
|
||||
|
||||
/* p now equals Rp */
|
||||
|
||||
if (!BN_mod_sub(p, p, Xp, p1p2, ctx))
|
||||
goto err;
|
||||
|
||||
if (!BN_add(p, p, Xp))
|
||||
goto err;
|
||||
|
||||
/* p now equals Yp0 */
|
||||
|
||||
for (;;)
|
||||
{
|
||||
int i = 1;
|
||||
if (cb)
|
||||
cb(0, i++, cb_arg);
|
||||
if (!BN_copy(pm1, p))
|
||||
goto err;
|
||||
if (!BN_sub_word(pm1, 1))
|
||||
goto err;
|
||||
if (!BN_gcd(t, pm1, e, ctx))
|
||||
goto err;
|
||||
if (BN_is_one(t)
|
||||
/* X9.31 specifies 8 MR and 1 Lucas test or any prime test
|
||||
* offering similar or better guarantees 50 MR is considerably
|
||||
* better.
|
||||
*/
|
||||
&& BN_is_prime_fasttest(p, 50, cb, ctx, cb_arg, 1))
|
||||
break;
|
||||
if (!BN_add(p, p, p1p2))
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (cb)
|
||||
cb(3, 0, cb_arg);
|
||||
|
||||
ret = 1;
|
||||
|
||||
err:
|
||||
|
||||
BN_CTX_end(ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Generate pair of paramters Xp, Xq for X9.31 prime generation.
|
||||
* Note: nbits paramter is sum of number of bits in both.
|
||||
*/
|
||||
|
||||
int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx)
|
||||
{
|
||||
BIGNUM *t;
|
||||
int i;
|
||||
/* Number of bits for each prime is of the form
|
||||
* 512+128s for s = 0, 1, ...
|
||||
*/
|
||||
if ((nbits < 1024) || (nbits & 0xff))
|
||||
return 0;
|
||||
nbits >>= 1;
|
||||
/* The random value Xp must be between sqrt(2) * 2^(nbits-1) and
|
||||
* 2^nbits - 1. By setting the top two bits we ensure that the lower
|
||||
* bound is exceeded.
|
||||
*/
|
||||
if (!BN_rand(Xp, nbits, 1, 0))
|
||||
return 0;
|
||||
|
||||
BN_CTX_start(ctx);
|
||||
t = BN_CTX_get(ctx);
|
||||
|
||||
for (i = 0; i < 1000; i++)
|
||||
{
|
||||
if (!BN_rand(Xq, nbits, 1, 0))
|
||||
return 0;
|
||||
/* Check that |Xp - Xq| > 2^(nbits - 100) */
|
||||
BN_sub(t, Xp, Xq);
|
||||
if (BN_num_bits(t) > (nbits - 100))
|
||||
break;
|
||||
}
|
||||
|
||||
BN_CTX_end(ctx);
|
||||
|
||||
if (i < 1000)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/* Generate primes using X9.31 algorithm. Of the values p, p1, p2, Xp1
|
||||
* and Xp2 only 'p' needs to be non-NULL. If any of the others are not NULL
|
||||
* the relevant parameter will be stored in it.
|
||||
*
|
||||
* Due to the fact that |Xp - Xq| > 2^(nbits - 100) must be satisfied Xp and Xq
|
||||
* are generated using the previous function and supplied as input.
|
||||
*/
|
||||
|
||||
int BN_X931_generate_prime(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
|
||||
BIGNUM *Xp1, BIGNUM *Xp2,
|
||||
const BIGNUM *Xp,
|
||||
const BIGNUM *e, BN_CTX *ctx,
|
||||
void (*cb)(int, int, void *), void *cb_arg)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
BN_CTX_start(ctx);
|
||||
if (!Xp1)
|
||||
Xp1 = BN_CTX_get(ctx);
|
||||
if (!Xp2)
|
||||
Xp2 = BN_CTX_get(ctx);
|
||||
|
||||
if (!BN_rand(Xp1, 101, 0, 0))
|
||||
goto error;
|
||||
if (!BN_rand(Xp2, 101, 0, 0))
|
||||
goto error;
|
||||
if (!BN_X931_derive_prime(p, p1, p2, cb, cb_arg,
|
||||
Xp, Xp1, Xp2, e, ctx))
|
||||
goto error;
|
||||
|
||||
ret = 1;
|
||||
|
||||
error:
|
||||
BN_CTX_end(ctx);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -86,6 +86,7 @@ int test_mont(BIO *bp,BN_CTX *ctx);
|
||||
int test_mod(BIO *bp,BN_CTX *ctx);
|
||||
int test_mod_mul(BIO *bp,BN_CTX *ctx);
|
||||
int test_mod_exp(BIO *bp,BN_CTX *ctx);
|
||||
int test_mod_exp_mont_consttime(BIO *bp,BN_CTX *ctx);
|
||||
int test_exp(BIO *bp,BN_CTX *ctx);
|
||||
int test_kron(BIO *bp,BN_CTX *ctx);
|
||||
int test_sqrt(BIO *bp,BN_CTX *ctx);
|
||||
@@ -213,6 +214,10 @@ int main(int argc, char *argv[])
|
||||
if (!test_mod_exp(out,ctx)) goto err;
|
||||
BIO_flush(out);
|
||||
|
||||
message(out,"BN_mod_exp_mont_consttime");
|
||||
if (!test_mod_exp_mont_consttime(out,ctx)) goto err;
|
||||
BIO_flush(out);
|
||||
|
||||
message(out,"BN_exp");
|
||||
if (!test_exp(out,ctx)) goto err;
|
||||
BIO_flush(out);
|
||||
@@ -813,6 +818,57 @@ int test_mod_exp(BIO *bp, BN_CTX *ctx)
|
||||
return(1);
|
||||
}
|
||||
|
||||
int test_mod_exp_mont_consttime(BIO *bp, BN_CTX *ctx)
|
||||
{
|
||||
BIGNUM *a,*b,*c,*d,*e;
|
||||
int i;
|
||||
|
||||
a=BN_new();
|
||||
b=BN_new();
|
||||
c=BN_new();
|
||||
d=BN_new();
|
||||
e=BN_new();
|
||||
|
||||
BN_bntest_rand(c,30,0,1); /* must be odd for montgomery */
|
||||
for (i=0; i<num2; i++)
|
||||
{
|
||||
BN_bntest_rand(a,20+i*5,0,0); /**/
|
||||
BN_bntest_rand(b,2+i,0,0); /**/
|
||||
|
||||
if (!BN_mod_exp_mont_consttime(d,a,b,c,ctx,NULL))
|
||||
return(00);
|
||||
|
||||
if (bp != NULL)
|
||||
{
|
||||
if (!results)
|
||||
{
|
||||
BN_print(bp,a);
|
||||
BIO_puts(bp," ^ ");
|
||||
BN_print(bp,b);
|
||||
BIO_puts(bp," % ");
|
||||
BN_print(bp,c);
|
||||
BIO_puts(bp," - ");
|
||||
}
|
||||
BN_print(bp,d);
|
||||
BIO_puts(bp,"\n");
|
||||
}
|
||||
BN_exp(e,a,b,ctx);
|
||||
BN_sub(e,e,d);
|
||||
BN_div(a,b,e,c,ctx);
|
||||
if(!BN_is_zero(b))
|
||||
{
|
||||
fprintf(stderr,"Modulo exponentiation test failed!\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
BN_free(a);
|
||||
BN_free(b);
|
||||
BN_free(c);
|
||||
BN_free(d);
|
||||
BN_free(e);
|
||||
return(1);
|
||||
}
|
||||
|
||||
int test_exp(BIO *bp, BN_CTX *ctx)
|
||||
{
|
||||
BIGNUM *a,*b,*d,*e,*one;
|
||||
|
||||
@@ -321,7 +321,7 @@ void do_mul_exp(BIGNUM *r, BIGNUM *a, BIGNUM *b, BIGNUM *c, BN_CTX *ctx)
|
||||
#else /* TEST_SQRT */
|
||||
"2*sqrt [prime == %d (mod 64)] %4d %4d mod %4d"
|
||||
#endif
|
||||
" -> %8.3fms %5.1f (%ld)\n",
|
||||
" -> %8.6fms %5.1f (%ld)\n",
|
||||
#ifdef TEST_SQRT
|
||||
P_MOD_64,
|
||||
#endif
|
||||
|
||||
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
||||
BIO *out=NULL;
|
||||
int i,ret;
|
||||
unsigned char c;
|
||||
BIGNUM *r_mont,*r_recp,*r_simple,*a,*b,*m;
|
||||
BIGNUM *r_mont,*r_mont_const,*r_recp,*r_simple,*a,*b,*m;
|
||||
|
||||
RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_rand may fail, and we don't
|
||||
* even check its return value
|
||||
@@ -88,6 +88,7 @@ int main(int argc, char *argv[])
|
||||
ctx=BN_CTX_new();
|
||||
if (ctx == NULL) EXIT(1);
|
||||
r_mont=BN_new();
|
||||
r_mont_const=BN_new();
|
||||
r_recp=BN_new();
|
||||
r_simple=BN_new();
|
||||
a=BN_new();
|
||||
@@ -143,8 +144,17 @@ int main(int argc, char *argv[])
|
||||
EXIT(1);
|
||||
}
|
||||
|
||||
ret=BN_mod_exp_mont_consttime(r_mont_const,a,b,m,ctx,NULL);
|
||||
if (ret <= 0)
|
||||
{
|
||||
printf("BN_mod_exp_mont_consttime() problems\n");
|
||||
ERR_print_errors(out);
|
||||
EXIT(1);
|
||||
}
|
||||
|
||||
if (BN_cmp(r_simple, r_mont) == 0
|
||||
&& BN_cmp(r_simple,r_recp) == 0)
|
||||
&& BN_cmp(r_simple,r_recp) == 0
|
||||
&& BN_cmp(r_simple,r_mont_const) == 0)
|
||||
{
|
||||
printf(".");
|
||||
fflush(stdout);
|
||||
@@ -153,6 +163,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
if (BN_cmp(r_simple,r_mont) != 0)
|
||||
printf("\nsimple and mont results differ\n");
|
||||
if (BN_cmp(r_simple,r_mont) != 0)
|
||||
printf("\nsimple and mont const time results differ\n");
|
||||
if (BN_cmp(r_simple,r_recp) != 0)
|
||||
printf("\nsimple and recp results differ\n");
|
||||
|
||||
@@ -162,11 +174,13 @@ int main(int argc, char *argv[])
|
||||
printf("\nsimple ="); BN_print(out,r_simple);
|
||||
printf("\nrecp ="); BN_print(out,r_recp);
|
||||
printf("\nmont ="); BN_print(out,r_mont);
|
||||
printf("\nmont_ct ="); BN_print(out,r_mont_const);
|
||||
printf("\n");
|
||||
EXIT(1);
|
||||
}
|
||||
}
|
||||
BN_free(r_mont);
|
||||
BN_free(r_mont_const);
|
||||
BN_free(r_recp);
|
||||
BN_free(r_simple);
|
||||
BN_free(a);
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/buffer/buf_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -64,11 +64,15 @@
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
|
||||
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_BUF,func,0)
|
||||
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_BUF,0,reason)
|
||||
|
||||
static ERR_STRING_DATA BUF_str_functs[]=
|
||||
{
|
||||
{ERR_PACK(0,BUF_F_BUF_MEM_GROW,0), "BUF_MEM_grow"},
|
||||
{ERR_PACK(0,BUF_F_BUF_MEM_NEW,0), "BUF_MEM_new"},
|
||||
{ERR_PACK(0,BUF_F_BUF_STRDUP,0), "BUF_strdup"},
|
||||
{ERR_FUNC(BUF_F_BUF_MEM_GROW), "BUF_MEM_grow"},
|
||||
{ERR_FUNC(BUF_F_BUF_MEM_NEW), "BUF_MEM_new"},
|
||||
{ERR_FUNC(BUF_F_BUF_STRDUP), "BUF_strdup"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
@@ -87,8 +91,8 @@ void ERR_load_BUF_strings(void)
|
||||
{
|
||||
init=0;
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
ERR_load_strings(ERR_LIB_BUF,BUF_str_functs);
|
||||
ERR_load_strings(ERR_LIB_BUF,BUF_str_reasons);
|
||||
ERR_load_strings(0,BUF_str_functs);
|
||||
ERR_load_strings(0,BUF_str_reasons);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -114,5 +114,8 @@ c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h
|
||||
c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
c_ofb64.o: c_ofb64.c cast_lcl.h
|
||||
c_skey.o: ../../e_os.h ../../include/openssl/cast.h
|
||||
c_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
c_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
c_skey.o: ../../include/openssl/fips.h ../../include/openssl/opensslconf.h
|
||||
c_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
c_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
c_skey.o: c_skey.c cast_lcl.h cast_s.h
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
cx86unix.cpp
|
||||
cx86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -56,7 +56,10 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/fips.h>
|
||||
#include <openssl/cast.h>
|
||||
|
||||
#include "cast_lcl.h"
|
||||
#include "cast_s.h"
|
||||
|
||||
@@ -72,7 +75,7 @@
|
||||
#define S6 CAST_S_table6
|
||||
#define S7 CAST_S_table7
|
||||
|
||||
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data)
|
||||
FIPS_NON_FIPS_VCIPHER_Init(CAST)
|
||||
{
|
||||
CAST_LONG x[16];
|
||||
CAST_LONG z[16];
|
||||
|
||||
@@ -81,7 +81,10 @@ typedef struct cast_key_st
|
||||
int short_key; /* Use reduced rounds for short key */
|
||||
} CAST_KEY;
|
||||
|
||||
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
|
||||
#endif
|
||||
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
|
||||
void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key,
|
||||
int enc);
|
||||
|
||||
@@ -64,11 +64,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
||||
# undef OPENSSL_EXTERN
|
||||
# define OPENSSL_EXTERN OPENSSL_EXPORT
|
||||
#endif
|
||||
|
||||
#undef c2l
|
||||
#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
|
||||
l|=((unsigned long)(*((c)++)))<< 8L, \
|
||||
@@ -222,11 +217,11 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
OPENSSL_EXTERN const CAST_LONG CAST_S_table0[256];
|
||||
OPENSSL_EXTERN const CAST_LONG CAST_S_table1[256];
|
||||
OPENSSL_EXTERN const CAST_LONG CAST_S_table2[256];
|
||||
OPENSSL_EXTERN const CAST_LONG CAST_S_table3[256];
|
||||
OPENSSL_EXTERN const CAST_LONG CAST_S_table4[256];
|
||||
OPENSSL_EXTERN const CAST_LONG CAST_S_table5[256];
|
||||
OPENSSL_EXTERN const CAST_LONG CAST_S_table6[256];
|
||||
OPENSSL_EXTERN const CAST_LONG CAST_S_table7[256];
|
||||
extern const CAST_LONG CAST_S_table0[256];
|
||||
extern const CAST_LONG CAST_S_table1[256];
|
||||
extern const CAST_LONG CAST_S_table2[256];
|
||||
extern const CAST_LONG CAST_S_table3[256];
|
||||
extern const CAST_LONG CAST_S_table4[256];
|
||||
extern const CAST_LONG CAST_S_table5[256];
|
||||
extern const CAST_LONG CAST_S_table6[256];
|
||||
extern const CAST_LONG CAST_S_table7[256];
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -90,6 +90,7 @@ c_rle.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h c_rle.c
|
||||
c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
c_zlib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h
|
||||
c_zlib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
c_zlib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
c_zlib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
c_zlib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
c_zlib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <string.h>
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/comp.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
COMP_METHOD *COMP_zlib(void );
|
||||
|
||||
@@ -52,7 +53,9 @@ static COMP_METHOD zlib_method={
|
||||
# include <windows.h>
|
||||
|
||||
# define Z_CALLCONV _stdcall
|
||||
# define ZLIB_SHARED
|
||||
# ifndef ZLIB_SHARED
|
||||
# define ZLIB_SHARED
|
||||
# endif
|
||||
#else
|
||||
# define Z_CALLCONV
|
||||
#endif /* !(OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32) */
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -613,13 +613,13 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from)
|
||||
e++;
|
||||
}
|
||||
/* So at this point we have
|
||||
* ns which is the start of the name string which is
|
||||
* np which is the start of the name string which is
|
||||
* '\0' terminated.
|
||||
* cs which is the start of the section string which is
|
||||
* cp which is the start of the section string which is
|
||||
* '\0' terminated.
|
||||
* e is the 'next point after'.
|
||||
* r and s are the chars replaced by the '\0'
|
||||
* rp and sp is where 'r' and 's' came from.
|
||||
* r and rr are the chars replaced by the '\0'
|
||||
* rp and rrp is where 'r' and 'rr' came from.
|
||||
*/
|
||||
p=_CONF_get_string(conf,cp,np);
|
||||
if (rrp != NULL) *rrp=rr;
|
||||
@@ -638,6 +638,11 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from)
|
||||
points at. /RL */
|
||||
len -= e-from;
|
||||
from=e;
|
||||
|
||||
/* In case there were no braces or parenthesis around
|
||||
the variable reference, we have to put back the
|
||||
character that was replaced with a '\0'. /RL */
|
||||
*rp = r;
|
||||
}
|
||||
else
|
||||
buf->data[to++]= *(from++);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/conf/conf_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -64,47 +64,51 @@
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
|
||||
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_CONF,func,0)
|
||||
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_CONF,0,reason)
|
||||
|
||||
static ERR_STRING_DATA CONF_str_functs[]=
|
||||
{
|
||||
{ERR_PACK(0,CONF_F_CONF_DUMP_FP,0), "CONF_dump_fp"},
|
||||
{ERR_PACK(0,CONF_F_CONF_LOAD,0), "CONF_load"},
|
||||
{ERR_PACK(0,CONF_F_CONF_LOAD_BIO,0), "CONF_load_bio"},
|
||||
{ERR_PACK(0,CONF_F_CONF_LOAD_FP,0), "CONF_load_fp"},
|
||||
{ERR_PACK(0,CONF_F_CONF_MODULES_LOAD,0), "CONF_modules_load"},
|
||||
{ERR_PACK(0,CONF_F_MODULE_INIT,0), "MODULE_INIT"},
|
||||
{ERR_PACK(0,CONF_F_MODULE_LOAD_DSO,0), "MODULE_LOAD_DSO"},
|
||||
{ERR_PACK(0,CONF_F_MODULE_RUN,0), "MODULE_RUN"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_DUMP_BIO,0), "NCONF_dump_bio"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_DUMP_FP,0), "NCONF_dump_fp"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_GET_NUMBER,0), "NCONF_get_number"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_GET_NUMBER_E,0), "NCONF_get_number_e"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_GET_SECTION,0), "NCONF_get_section"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_GET_STRING,0), "NCONF_get_string"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_LOAD,0), "NCONF_load"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_LOAD_BIO,0), "NCONF_load_bio"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_LOAD_FP,0), "NCONF_load_fp"},
|
||||
{ERR_PACK(0,CONF_F_NCONF_NEW,0), "NCONF_new"},
|
||||
{ERR_PACK(0,CONF_F_STR_COPY,0), "STR_COPY"},
|
||||
{ERR_FUNC(CONF_F_CONF_DUMP_FP), "CONF_dump_fp"},
|
||||
{ERR_FUNC(CONF_F_CONF_LOAD), "CONF_load"},
|
||||
{ERR_FUNC(CONF_F_CONF_LOAD_BIO), "CONF_load_bio"},
|
||||
{ERR_FUNC(CONF_F_CONF_LOAD_FP), "CONF_load_fp"},
|
||||
{ERR_FUNC(CONF_F_CONF_MODULES_LOAD), "CONF_modules_load"},
|
||||
{ERR_FUNC(CONF_F_MODULE_INIT), "MODULE_INIT"},
|
||||
{ERR_FUNC(CONF_F_MODULE_LOAD_DSO), "MODULE_LOAD_DSO"},
|
||||
{ERR_FUNC(CONF_F_MODULE_RUN), "MODULE_RUN"},
|
||||
{ERR_FUNC(CONF_F_NCONF_DUMP_BIO), "NCONF_dump_bio"},
|
||||
{ERR_FUNC(CONF_F_NCONF_DUMP_FP), "NCONF_dump_fp"},
|
||||
{ERR_FUNC(CONF_F_NCONF_GET_NUMBER), "NCONF_get_number"},
|
||||
{ERR_FUNC(CONF_F_NCONF_GET_NUMBER_E), "NCONF_get_number_e"},
|
||||
{ERR_FUNC(CONF_F_NCONF_GET_SECTION), "NCONF_get_section"},
|
||||
{ERR_FUNC(CONF_F_NCONF_GET_STRING), "NCONF_get_string"},
|
||||
{ERR_FUNC(CONF_F_NCONF_LOAD), "NCONF_load"},
|
||||
{ERR_FUNC(CONF_F_NCONF_LOAD_BIO), "NCONF_load_bio"},
|
||||
{ERR_FUNC(CONF_F_NCONF_LOAD_FP), "NCONF_load_fp"},
|
||||
{ERR_FUNC(CONF_F_NCONF_NEW), "NCONF_new"},
|
||||
{ERR_FUNC(CONF_F_STR_COPY), "STR_COPY"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
static ERR_STRING_DATA CONF_str_reasons[]=
|
||||
{
|
||||
{CONF_R_ERROR_LOADING_DSO ,"error loading dso"},
|
||||
{CONF_R_MISSING_CLOSE_SQUARE_BRACKET ,"missing close square bracket"},
|
||||
{CONF_R_MISSING_EQUAL_SIGN ,"missing equal sign"},
|
||||
{CONF_R_MISSING_FINISH_FUNCTION ,"missing finish function"},
|
||||
{CONF_R_MISSING_INIT_FUNCTION ,"missing init function"},
|
||||
{CONF_R_MODULE_INITIALIZATION_ERROR ,"module initialization error"},
|
||||
{CONF_R_NO_CLOSE_BRACE ,"no close brace"},
|
||||
{CONF_R_NO_CONF ,"no conf"},
|
||||
{CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE ,"no conf or environment variable"},
|
||||
{CONF_R_NO_SECTION ,"no section"},
|
||||
{CONF_R_NO_SUCH_FILE ,"no such file"},
|
||||
{CONF_R_NO_VALUE ,"no value"},
|
||||
{CONF_R_UNABLE_TO_CREATE_NEW_SECTION ,"unable to create new section"},
|
||||
{CONF_R_UNKNOWN_MODULE_NAME ,"unknown module name"},
|
||||
{CONF_R_VARIABLE_HAS_NO_VALUE ,"variable has no value"},
|
||||
{ERR_REASON(CONF_R_ERROR_LOADING_DSO) ,"error loading dso"},
|
||||
{ERR_REASON(CONF_R_MISSING_CLOSE_SQUARE_BRACKET),"missing close square bracket"},
|
||||
{ERR_REASON(CONF_R_MISSING_EQUAL_SIGN) ,"missing equal sign"},
|
||||
{ERR_REASON(CONF_R_MISSING_FINISH_FUNCTION),"missing finish function"},
|
||||
{ERR_REASON(CONF_R_MISSING_INIT_FUNCTION),"missing init function"},
|
||||
{ERR_REASON(CONF_R_MODULE_INITIALIZATION_ERROR),"module initialization error"},
|
||||
{ERR_REASON(CONF_R_NO_CLOSE_BRACE) ,"no close brace"},
|
||||
{ERR_REASON(CONF_R_NO_CONF) ,"no conf"},
|
||||
{ERR_REASON(CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE),"no conf or environment variable"},
|
||||
{ERR_REASON(CONF_R_NO_SECTION) ,"no section"},
|
||||
{ERR_REASON(CONF_R_NO_SUCH_FILE) ,"no such file"},
|
||||
{ERR_REASON(CONF_R_NO_VALUE) ,"no value"},
|
||||
{ERR_REASON(CONF_R_UNABLE_TO_CREATE_NEW_SECTION),"unable to create new section"},
|
||||
{ERR_REASON(CONF_R_UNKNOWN_MODULE_NAME) ,"unknown module name"},
|
||||
{ERR_REASON(CONF_R_VARIABLE_HAS_NO_VALUE),"variable has no value"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
@@ -118,8 +122,8 @@ void ERR_load_CONF_strings(void)
|
||||
{
|
||||
init=0;
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
ERR_load_strings(ERR_LIB_CONF,CONF_str_functs);
|
||||
ERR_load_strings(ERR_LIB_CONF,CONF_str_reasons);
|
||||
ERR_load_strings(0,CONF_str_functs);
|
||||
ERR_load_strings(0,CONF_str_reasons);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/cpt_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -64,23 +64,27 @@
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
|
||||
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_CRYPTO,func,0)
|
||||
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_CRYPTO,0,reason)
|
||||
|
||||
static ERR_STRING_DATA CRYPTO_str_functs[]=
|
||||
{
|
||||
{ERR_PACK(0,CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,0), "CRYPTO_get_ex_new_index"},
|
||||
{ERR_PACK(0,CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,0), "CRYPTO_get_new_dynlockid"},
|
||||
{ERR_PACK(0,CRYPTO_F_CRYPTO_GET_NEW_LOCKID,0), "CRYPTO_get_new_lockid"},
|
||||
{ERR_PACK(0,CRYPTO_F_CRYPTO_SET_EX_DATA,0), "CRYPTO_set_ex_data"},
|
||||
{ERR_PACK(0,CRYPTO_F_DEF_ADD_INDEX,0), "DEF_ADD_INDEX"},
|
||||
{ERR_PACK(0,CRYPTO_F_DEF_GET_CLASS,0), "DEF_GET_CLASS"},
|
||||
{ERR_PACK(0,CRYPTO_F_INT_DUP_EX_DATA,0), "INT_DUP_EX_DATA"},
|
||||
{ERR_PACK(0,CRYPTO_F_INT_FREE_EX_DATA,0), "INT_FREE_EX_DATA"},
|
||||
{ERR_PACK(0,CRYPTO_F_INT_NEW_EX_DATA,0), "INT_NEW_EX_DATA"},
|
||||
{ERR_FUNC(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX), "CRYPTO_get_ex_new_index"},
|
||||
{ERR_FUNC(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID), "CRYPTO_get_new_dynlockid"},
|
||||
{ERR_FUNC(CRYPTO_F_CRYPTO_GET_NEW_LOCKID), "CRYPTO_get_new_lockid"},
|
||||
{ERR_FUNC(CRYPTO_F_CRYPTO_SET_EX_DATA), "CRYPTO_set_ex_data"},
|
||||
{ERR_FUNC(CRYPTO_F_DEF_ADD_INDEX), "DEF_ADD_INDEX"},
|
||||
{ERR_FUNC(CRYPTO_F_DEF_GET_CLASS), "DEF_GET_CLASS"},
|
||||
{ERR_FUNC(CRYPTO_F_INT_DUP_EX_DATA), "INT_DUP_EX_DATA"},
|
||||
{ERR_FUNC(CRYPTO_F_INT_FREE_EX_DATA), "INT_FREE_EX_DATA"},
|
||||
{ERR_FUNC(CRYPTO_F_INT_NEW_EX_DATA), "INT_NEW_EX_DATA"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
static ERR_STRING_DATA CRYPTO_str_reasons[]=
|
||||
{
|
||||
{CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK ,"no dynlock create callback"},
|
||||
{ERR_REASON(CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK),"no dynlock create callback"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
@@ -94,8 +98,8 @@ void ERR_load_CRYPTO_strings(void)
|
||||
{
|
||||
init=0;
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
ERR_load_strings(ERR_LIB_CRYPTO,CRYPTO_str_functs);
|
||||
ERR_load_strings(ERR_LIB_CRYPTO,CRYPTO_str_reasons);
|
||||
ERR_load_strings(0,CRYPTO_str_functs);
|
||||
ERR_load_strings(0,CRYPTO_str_reasons);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -480,18 +480,34 @@ const char *CRYPTO_get_lock_name(int type)
|
||||
return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS));
|
||||
}
|
||||
|
||||
#ifdef _DLL
|
||||
#ifdef OPENSSL_SYS_WIN32
|
||||
int OPENSSL_NONPIC_relocated=0;
|
||||
|
||||
#if defined(_WIN32) && defined(_WINDLL)
|
||||
|
||||
/* All we really need to do is remove the 'error' state when a thread
|
||||
* detaches */
|
||||
|
||||
BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
LPVOID lpvReserved)
|
||||
{
|
||||
switch(fdwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
#if defined(_WIN32_WINNT)
|
||||
{
|
||||
IMAGE_DOS_HEADER *dos_header = (IMAGE_DOS_HEADER *)hinstDLL;
|
||||
IMAGE_NT_HEADERS *nt_headers;
|
||||
|
||||
if (dos_header->e_magic==IMAGE_DOS_SIGNATURE)
|
||||
{
|
||||
nt_headers = (IMAGE_NT_HEADERS *)((char *)dos_header
|
||||
+ dos_header->e_lfanew);
|
||||
if (nt_headers->Signature==IMAGE_NT_SIGNATURE &&
|
||||
hinstDLL!=(HINSTANCE)(nt_headers->OptionalHeader.ImageBase))
|
||||
OPENSSL_NONPIC_relocated=1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
break;
|
||||
@@ -505,20 +521,160 @@ BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <tchar.h>
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
|
||||
static int IsService(void)
|
||||
{ HWINSTA h;
|
||||
DWORD len;
|
||||
WCHAR *name;
|
||||
|
||||
(void)GetDesktopWindow(); /* return value is ignored */
|
||||
|
||||
h = GetProcessWindowStation();
|
||||
if (h==NULL) return -1;
|
||||
|
||||
if (GetUserObjectInformationW (h,UOI_NAME,NULL,0,&len) ||
|
||||
GetLastError() != ERROR_INSUFFICIENT_BUFFER)
|
||||
return -1;
|
||||
|
||||
if (len>512) return -1; /* paranoia */
|
||||
len++,len&=~1; /* paranoia */
|
||||
#ifdef _MSC_VER
|
||||
name=(WCHAR *)_alloca(len+sizeof(WCHAR));
|
||||
#else
|
||||
name=(WCHAR *)alloca(len+sizeof(WCHAR));
|
||||
#endif
|
||||
if (!GetUserObjectInformationW (h,UOI_NAME,name,len,&len))
|
||||
return -1;
|
||||
|
||||
len++,len&=~1; /* paranoia */
|
||||
name[len/sizeof(WCHAR)]=L'\0'; /* paranoia */
|
||||
#if 1
|
||||
/* This doesn't cover "interactive" services [working with real
|
||||
* WinSta0's] nor programs started non-interactively by Task
|
||||
* Scheduler [those are working with SAWinSta]. */
|
||||
if (wcsstr(name,L"Service-0x")) return 1;
|
||||
#else
|
||||
/* This covers all non-interactive programs such as services. */
|
||||
if (!wcsstr(name,L"WinSta0")) return 1;
|
||||
#endif
|
||||
else return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void OPENSSL_showfatal (const char *fmta,...)
|
||||
{ va_list ap;
|
||||
TCHAR buf[256];
|
||||
const TCHAR *fmt;
|
||||
HANDLE h;
|
||||
|
||||
if ((h=GetStdHandle(STD_ERROR_HANDLE)) != NULL &&
|
||||
GetFileType(h)!=FILE_TYPE_UNKNOWN)
|
||||
{ /* must be console application */
|
||||
va_start (ap,fmta);
|
||||
vfprintf (stderr,fmta,ap);
|
||||
va_end (ap);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sizeof(TCHAR)==sizeof(char))
|
||||
fmt=(const TCHAR *)fmta;
|
||||
else do
|
||||
{ int keepgoing;
|
||||
size_t len_0=strlen(fmta)+1,i;
|
||||
WCHAR *fmtw;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
fmtw = (WCHAR *)_alloca (len_0*sizeof(WCHAR));
|
||||
#else
|
||||
fmtw = (WCHAR *)alloca (len_0*sizeof(WCHAR));
|
||||
#endif
|
||||
if (fmtw == NULL) { fmt=(const TCHAR *)L"no stack?"; break; }
|
||||
|
||||
#ifndef OPENSSL_NO_MULTIBYTE
|
||||
if (!MultiByteToWideChar(CP_ACP,0,fmta,len_0,fmtw,len_0))
|
||||
#endif
|
||||
for (i=0;i<len_0;i++) fmtw[i]=(WCHAR)fmta[i];
|
||||
|
||||
for (i=0;i<len_0;i++)
|
||||
{ if (fmtw[i]==L'%') do
|
||||
{ keepgoing=0;
|
||||
switch (fmtw[i+1])
|
||||
{ case L'0': case L'1': case L'2': case L'3': case L'4':
|
||||
case L'5': case L'6': case L'7': case L'8': case L'9':
|
||||
case L'.': case L'*':
|
||||
case L'-': i++; keepgoing=1; break;
|
||||
case L's': fmtw[i+1]=L'S'; break;
|
||||
case L'S': fmtw[i+1]=L's'; break;
|
||||
case L'c': fmtw[i+1]=L'C'; break;
|
||||
case L'C': fmtw[i+1]=L'c'; break;
|
||||
}
|
||||
} while (keepgoing);
|
||||
}
|
||||
fmt = (const TCHAR *)fmtw;
|
||||
} while (0);
|
||||
|
||||
va_start (ap,fmta);
|
||||
_vsntprintf (buf,sizeof(buf)/sizeof(TCHAR)-1,fmt,ap);
|
||||
buf [sizeof(buf)/sizeof(TCHAR)-1] = _T('\0');
|
||||
va_end (ap);
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
|
||||
/* this -------------v--- guards NT-specific calls */
|
||||
if (GetVersion() < 0x80000000 && IsService())
|
||||
{ HANDLE h = RegisterEventSource(0,_T("OPENSSL"));
|
||||
const TCHAR *pmsg=buf;
|
||||
ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{ MSGBOXPARAMS m;
|
||||
|
||||
m.cbSize = sizeof(m);
|
||||
m.hwndOwner = NULL;
|
||||
m.lpszCaption = _T("OpenSSL: FATAL");
|
||||
m.dwStyle = MB_OK;
|
||||
m.hInstance = NULL;
|
||||
m.lpszIcon = IDI_ERROR;
|
||||
m.dwContextHelpId = 0;
|
||||
m.lpfnMsgBoxCallback = NULL;
|
||||
m.dwLanguageId = MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US);
|
||||
m.lpszText = buf;
|
||||
|
||||
MessageBoxIndirect (&m);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void OPENSSL_showfatal (const char *fmta,...)
|
||||
{ va_list ap;
|
||||
|
||||
va_start (ap,fmta);
|
||||
vfprintf (stderr,fmta,ap);
|
||||
va_end (ap);
|
||||
}
|
||||
#endif
|
||||
|
||||
void OpenSSLDie(const char *file,int line,const char *assertion)
|
||||
{
|
||||
fprintf(stderr,
|
||||
OPENSSL_showfatal(
|
||||
"%s(%d): OpenSSL internal error, assertion failed: %s\n",
|
||||
file,line,assertion);
|
||||
abort();
|
||||
}
|
||||
|
||||
void *OPENSSL_stderr(void) { return stderr; }
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
|
||||
void fips_w_lock(void) { CRYPTO_w_lock(CRYPTO_LOCK_FIPS); }
|
||||
void fips_w_unlock(void) { CRYPTO_w_unlock(CRYPTO_LOCK_FIPS); }
|
||||
void fips_r_lock(void) { CRYPTO_r_lock(CRYPTO_LOCK_FIPS); }
|
||||
void fips_r_unlock(void) { CRYPTO_r_unlock(CRYPTO_LOCK_FIPS); }
|
||||
|
||||
static int fips_started = 0;
|
||||
static int fips_mode = 0;
|
||||
static void *fips_rand_check = 0;
|
||||
static unsigned long fips_thread = 0;
|
||||
|
||||
void fips_set_started(void)
|
||||
@@ -578,58 +734,5 @@ int fips_clear_owning_thread(void)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fips_set_mode(int onoff)
|
||||
{
|
||||
int owning_thread = fips_is_owning_thread();
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
if (!owning_thread) CRYPTO_w_lock(CRYPTO_LOCK_FIPS);
|
||||
fips_mode = onoff;
|
||||
if (!owning_thread) CRYPTO_w_unlock(CRYPTO_LOCK_FIPS);
|
||||
}
|
||||
}
|
||||
|
||||
void fips_set_rand_check(void *rand_check)
|
||||
{
|
||||
int owning_thread = fips_is_owning_thread();
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
if (!owning_thread) CRYPTO_w_lock(CRYPTO_LOCK_FIPS);
|
||||
fips_rand_check = rand_check;
|
||||
if (!owning_thread) CRYPTO_w_unlock(CRYPTO_LOCK_FIPS);
|
||||
}
|
||||
}
|
||||
|
||||
int FIPS_mode(void)
|
||||
{
|
||||
int ret = 0;
|
||||
int owning_thread = fips_is_owning_thread();
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS);
|
||||
ret = fips_mode;
|
||||
if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void *FIPS_rand_check(void)
|
||||
{
|
||||
void *ret = 0;
|
||||
int owning_thread = fips_is_owning_thread();
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS);
|
||||
ret = fips_rand_check;
|
||||
if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* OPENSSL_FIPS */
|
||||
|
||||
|
||||
@@ -93,6 +93,10 @@ extern "C" {
|
||||
#define DECIMAL_SIZE(type) ((sizeof(type)*8+2)/3+1)
|
||||
#define HEX_SIZE(type) (sizeof(type)*2)
|
||||
|
||||
void OPENSSL_showfatal(const char *,...);
|
||||
void *OPENSSL_stderr(void);
|
||||
extern int OPENSSL_NONPIC_relocated;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -184,10 +184,10 @@ $ IF F$TRNLNM("OPENSSL_NO_ASM").OR.ARCH.EQS."AXP" THEN LIB_BN_ASM = "bn_asm"
|
||||
$ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ -
|
||||
"bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ -
|
||||
"bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ -
|
||||
"bn_recp,bn_mont,bn_mpi,bn_exp2"
|
||||
"bn_recp,bn_mont,bn_mpi,bn_exp2,bn_x931p"
|
||||
$ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ -
|
||||
"rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ -
|
||||
"rsa_asn1"
|
||||
"rsa_pss,rsa_x931,rsa_asn1"
|
||||
$ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_recp,ecp_nist,ec_cvt,ec_mult,"+ -
|
||||
"ec_err"
|
||||
$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,dsa_err,dsa_ossl"
|
||||
@@ -247,7 +247,7 @@ $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ -
|
||||
$ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ -
|
||||
"v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ -
|
||||
"v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info,"+ -
|
||||
"v3_ocsp,v3_akeya"
|
||||
"v3_ocsp,v3_akeya,v3_pcia,v3_pci"
|
||||
$ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def,conf_mod,conf_mall,conf_sap"
|
||||
$ LIB_TXT_DB = "txt_db"
|
||||
$ LIB_PKCS7 = "pk7_asn1,pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,"+ -
|
||||
@@ -960,7 +960,7 @@ $ CCDEFS = "TCPIP_TYPE_''P4',DSO_VMS"
|
||||
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
|
||||
$ CCEXTRAFLAGS = ""
|
||||
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
|
||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX"
|
||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
|
||||
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
|
||||
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
|
||||
$!
|
||||
|
||||
@@ -434,11 +434,60 @@ void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
|
||||
|
||||
/* die if we have to */
|
||||
void OpenSSLDie(const char *file,int line,const char *assertion);
|
||||
#define OPENSSL_assert(e) ((e) ? (void)0 : OpenSSLDie(__FILE__, __LINE__, #e))
|
||||
#define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1))
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
int FIPS_mode(void);
|
||||
void *FIPS_rand_check(void);
|
||||
#define FIPS_ERROR_IGNORED(alg) OpenSSLDie(__FILE__, __LINE__, \
|
||||
alg " previous FIPS forbidden algorithm error ignored");
|
||||
|
||||
#define FIPS_BAD_ABORT(alg) OpenSSLDie(__FILE__, __LINE__, \
|
||||
#alg " Algorithm forbidden in FIPS mode");
|
||||
|
||||
#ifdef OPENSSL_FIPS_STRICT
|
||||
#define FIPS_BAD_ALGORITHM(alg) FIPS_BAD_ABORT(alg)
|
||||
#else
|
||||
#define FIPS_BAD_ALGORITHM(alg) \
|
||||
{ \
|
||||
FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_NON_FIPS_METHOD); \
|
||||
ERR_add_error_data(2, "Algorithm=", #alg); \
|
||||
return 0; \
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Low level digest API blocking macro */
|
||||
|
||||
#define FIPS_NON_FIPS_MD_Init(alg) \
|
||||
int alg##_Init(alg##_CTX *c) \
|
||||
{ \
|
||||
if (FIPS_mode()) \
|
||||
FIPS_BAD_ALGORITHM(alg) \
|
||||
return private_##alg##_Init(c); \
|
||||
} \
|
||||
int private_##alg##_Init(alg##_CTX *c)
|
||||
|
||||
/* For ciphers the API often varies from cipher to cipher and each needs to
|
||||
* be treated as a special case. Variable key length ciphers (Blowfish, RC4,
|
||||
* CAST) however are very similar and can use a blocking macro.
|
||||
*/
|
||||
|
||||
#define FIPS_NON_FIPS_VCIPHER_Init(alg) \
|
||||
void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data) \
|
||||
{ \
|
||||
if (FIPS_mode()) \
|
||||
FIPS_BAD_ABORT(alg) \
|
||||
private_##alg##_set_key(key, len, data); \
|
||||
} \
|
||||
void private_##alg##_set_key(alg##_KEY *key, int len, \
|
||||
const unsigned char *data)
|
||||
|
||||
#else
|
||||
|
||||
#define FIPS_NON_FIPS_VCIPHER_Init(alg) \
|
||||
void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data)
|
||||
|
||||
#define FIPS_NON_FIPS_MD_Init(alg) \
|
||||
int alg##_Init(alg##_CTX *c)
|
||||
|
||||
#endif /* def OPENSSL_FIPS */
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
lib
|
||||
Makefile.save
|
||||
des
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -3,3 +3,5 @@ yx86unix.cpp
|
||||
des_enc-sparc.S
|
||||
dx86-elf.s
|
||||
yx86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
PERM_OP(l,r,tt, 4,0x0f0f0f0fL); \
|
||||
}
|
||||
|
||||
OPENSSL_EXTERN const DES_LONG DES_SPtrans[8][64];
|
||||
extern const DES_LONG DES_SPtrans[8][64];
|
||||
|
||||
void fcrypt_body(DES_LONG *out,DES_key_schedule *ks,
|
||||
DES_LONG Eswap0, DES_LONG Eswap1);
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -70,7 +70,14 @@
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/ossl_typ.h>
|
||||
|
||||
#define DH_FLAG_CACHE_MONT_P 0x01
|
||||
#define DH_FLAG_CACHE_MONT_P 0x01
|
||||
#define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH
|
||||
* implementation now uses constant time
|
||||
* modular exponentiation for secret exponents
|
||||
* by default. This flag causes the
|
||||
* faster variable sliding window method to
|
||||
* be used for all exponents.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/dh/dh_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -64,21 +64,25 @@
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
|
||||
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DH,func,0)
|
||||
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_DH,0,reason)
|
||||
|
||||
static ERR_STRING_DATA DH_str_functs[]=
|
||||
{
|
||||
{ERR_PACK(0,DH_F_DHPARAMS_PRINT,0), "DHparams_print"},
|
||||
{ERR_PACK(0,DH_F_DHPARAMS_PRINT_FP,0), "DHparams_print_fp"},
|
||||
{ERR_PACK(0,DH_F_DH_COMPUTE_KEY,0), "DH_compute_key"},
|
||||
{ERR_PACK(0,DH_F_DH_GENERATE_KEY,0), "DH_generate_key"},
|
||||
{ERR_PACK(0,DH_F_DH_GENERATE_PARAMETERS,0), "DH_generate_parameters"},
|
||||
{ERR_PACK(0,DH_F_DH_NEW_METHOD,0), "DH_new_method"},
|
||||
{ERR_FUNC(DH_F_DHPARAMS_PRINT), "DHparams_print"},
|
||||
{ERR_FUNC(DH_F_DHPARAMS_PRINT_FP), "DHparams_print_fp"},
|
||||
{ERR_FUNC(DH_F_DH_COMPUTE_KEY), "DH_compute_key"},
|
||||
{ERR_FUNC(DH_F_DH_GENERATE_KEY), "DH_generate_key"},
|
||||
{ERR_FUNC(DH_F_DH_GENERATE_PARAMETERS), "DH_generate_parameters"},
|
||||
{ERR_FUNC(DH_F_DH_NEW_METHOD), "DH_new_method"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
static ERR_STRING_DATA DH_str_reasons[]=
|
||||
{
|
||||
{DH_R_BAD_GENERATOR ,"bad generator"},
|
||||
{DH_R_NO_PRIVATE_VALUE ,"no private value"},
|
||||
{ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"},
|
||||
{ERR_REASON(DH_R_NO_PRIVATE_VALUE) ,"no private value"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
@@ -92,8 +96,8 @@ void ERR_load_DH_strings(void)
|
||||
{
|
||||
init=0;
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
ERR_load_strings(ERR_LIB_DH,DH_str_functs);
|
||||
ERR_load_strings(ERR_LIB_DH,DH_str_reasons);
|
||||
ERR_load_strings(0,DH_str_functs);
|
||||
ERR_load_strings(0,DH_str_reasons);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user