Compare commits
1442 Commits
OpenSSL-fi
...
OpenSSL_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d99382039c | ||
|
|
9c29e781a8 | ||
|
|
93acf33440 | ||
|
|
5c1fd5e316 | ||
|
|
f42a82777d | ||
|
|
0c7ceb3748 | ||
|
|
e54e4bcf1f | ||
|
|
fe8b77753c | ||
|
|
d5c2bc4bff | ||
|
|
61823b6a74 | ||
|
|
ab0def8152 | ||
|
|
6d2a7098d6 | ||
|
|
b43b9de9e4 | ||
|
|
6286bbecef | ||
|
|
9d14506f29 | ||
|
|
7ec40a480b | ||
|
|
aa0d4ed5fa | ||
|
|
2cf68c0b1a | ||
|
|
97d49cdd6f | ||
|
|
126179aad0 | ||
|
|
e22e6bf0be | ||
|
|
2ecf923286 | ||
|
|
b7fd453675 | ||
|
|
086dd3032f | ||
|
|
20e5177105 | ||
|
|
bb987c73a9 | ||
|
|
515ac3debb | ||
|
|
43509de33d | ||
|
|
dbaa6f91aa | ||
|
|
01b62dca25 | ||
|
|
66d68327cb | ||
|
|
ecc3d2734d | ||
|
|
11536fbac8 | ||
|
|
7cfcca8ba3 | ||
|
|
0cae19f5ef | ||
|
|
6be00c7e16 | ||
|
|
532d936be8 | ||
|
|
d88edf1447 | ||
|
|
f60fc19a69 | ||
|
|
d0edffc7da | ||
|
|
12dfa84310 | ||
|
|
134d6a44ec | ||
|
|
420eb6a306 | ||
|
|
e9ddd85965 | ||
|
|
ea28f93c2d | ||
|
|
adeb20b6b7 | ||
|
|
086b64d0d3 | ||
|
|
47c88d7413 | ||
|
|
630b9d70fb | ||
|
|
c4929fb841 | ||
|
|
97c2c819b3 | ||
|
|
954f3c3126 | ||
|
|
528584c595 | ||
|
|
5cdf5e3308 | ||
|
|
b58560b915 | ||
|
|
76d088046c | ||
|
|
83f69163fd | ||
|
|
5ca3a0aa86 | ||
|
|
702be727c0 | ||
|
|
8336cec34d | ||
|
|
1c8415fdf3 | ||
|
|
370d418a7b | ||
|
|
4aaa4f267d | ||
|
|
f709ffe832 | ||
|
|
9e34e806a2 | ||
|
|
2d16a957e0 | ||
|
|
fe707c3260 | ||
|
|
fb39cd850c | ||
|
|
560f01fff9 | ||
|
|
15bbc1574f | ||
|
|
1acf071cd0 | ||
|
|
3ae613e34f | ||
|
|
37ece6156a | ||
|
|
965574039b | ||
|
|
535178f415 | ||
|
|
a4a88eea03 | ||
|
|
a661c1728f | ||
|
|
13e387c3fe | ||
|
|
3dd16fb7fd | ||
|
|
ab09133881 | ||
|
|
90ec459be0 | ||
|
|
3d5d6f9658 | ||
|
|
bd5a2195de | ||
|
|
5868130e7a | ||
|
|
a4c9668f3c | ||
|
|
f1ca15dd69 | ||
|
|
3d4c78e7f5 | ||
|
|
95f5b1fdae | ||
|
|
c78b389cb3 | ||
|
|
b0ab906524 | ||
|
|
ec46cd8bb8 | ||
|
|
da8534693c | ||
|
|
b56b02dc75 | ||
|
|
c98175bf88 | ||
|
|
3384bdd6fe | ||
|
|
8db8893cd7 | ||
|
|
3010b1730e | ||
|
|
f670069a19 | ||
|
|
575dbdc965 | ||
|
|
2e1366366e | ||
|
|
fda344ece8 | ||
|
|
280e3bd2c9 | ||
|
|
41191d14ce | ||
|
|
62c19d2dd9 | ||
|
|
2d1a37bc9f | ||
|
|
24e85c3dee | ||
|
|
fa032a6941 | ||
|
|
d133618ce2 | ||
|
|
cd52956357 | ||
|
|
6826d26ea7 | ||
|
|
18ad97bbe7 | ||
|
|
ee3f520276 | ||
|
|
9199bd0cd7 | ||
|
|
4443f44012 | ||
|
|
dfcf822c65 | ||
|
|
14c8986f75 | ||
|
|
6237528c82 | ||
|
|
2b354390b8 | ||
|
|
1ec0d15e54 | ||
|
|
ce165addd2 | ||
|
|
b207a73ca6 | ||
|
|
22a7a3b91b | ||
|
|
ced27cc681 | ||
|
|
ffec31f1ac | ||
|
|
e510c62a38 | ||
|
|
671c1bcfce | ||
|
|
28a896f7fe | ||
|
|
f6549efa61 | ||
|
|
4ae135eb0d | ||
|
|
9262f5a3fa | ||
|
|
f94481196c | ||
|
|
17f847af21 | ||
|
|
a2617f727d | ||
|
|
15aa44d230 | ||
|
|
3955a76946 | ||
|
|
ee478901b0 | ||
|
|
a28e18219b | ||
|
|
871080b94b | ||
|
|
c133cb8974 | ||
|
|
2f547d2c1c | ||
|
|
bfb7bac83b | ||
|
|
ac4fb4a138 | ||
|
|
75f7141ab4 | ||
|
|
23a6dd83b5 | ||
|
|
450b38c05b | ||
|
|
0286cccbc1 | ||
|
|
dc26d1193a | ||
|
|
64892df03e | ||
|
|
9e57ab615c | ||
|
|
b16fee0aa7 | ||
|
|
70bfcc895e | ||
|
|
8de8bcbe2c | ||
|
|
14e21742d5 | ||
|
|
44963e4af7 | ||
|
|
125a86113f | ||
|
|
d06db8ad9e | ||
|
|
ffa8e7b74c | ||
|
|
85e8decc16 | ||
|
|
3216de1ee5 | ||
|
|
8f349c58f7 | ||
|
|
cfafb6a73d | ||
|
|
818c0b2e42 | ||
|
|
aef8807e76 | ||
|
|
4157fae6fe | ||
|
|
15902f8341 | ||
|
|
8bcd746e84 | ||
|
|
56fe40191d | ||
|
|
97c802588c | ||
|
|
8c172bce1c | ||
|
|
4fa9664f5e | ||
|
|
483b312391 | ||
|
|
1033449613 | ||
|
|
f992081682 | ||
|
|
5ad93a12b2 | ||
|
|
efeb352163 | ||
|
|
44dd6865b9 | ||
|
|
bb82123707 | ||
|
|
eb7bb58471 | ||
|
|
7f9c37457a | ||
|
|
86022a79a5 | ||
|
|
88a8ae6aee | ||
|
|
b58e24ac57 | ||
|
|
496c4e1033 | ||
|
|
0b948f3677 | ||
|
|
7f911c668d | ||
|
|
e81ef01a0a | ||
|
|
d2033156c5 | ||
|
|
e4c1c03c5b | ||
|
|
5edd0f51e3 | ||
|
|
1ecb88b95a | ||
|
|
03ecfadf3d | ||
|
|
64c6865427 | ||
|
|
43894f9c0d | ||
|
|
40007ad24d | ||
|
|
c6e27dcf31 | ||
|
|
a47e836efe | ||
|
|
370358dfb4 | ||
|
|
a77b16abd4 | ||
|
|
061c8f977d | ||
|
|
d70f5891da | ||
|
|
901959c945 | ||
|
|
a857495d17 | ||
|
|
b1640e47e4 | ||
|
|
5358bc44f4 | ||
|
|
a7f14cb4c6 | ||
|
|
531b538df5 | ||
|
|
49ede900fa | ||
|
|
7c6cf1b176 | ||
|
|
fa5cea169a | ||
|
|
83f22920c2 | ||
|
|
bec15f2109 | ||
|
|
43c0d77296 | ||
|
|
46b7624b8e | ||
|
|
9e356100d0 | ||
|
|
7ca482062f | ||
|
|
ef4c5802ec | ||
|
|
fee38dcb9a | ||
|
|
c116de76ad | ||
|
|
6069bdbe27 | ||
|
|
871fe9107d | ||
|
|
2663f39ff9 | ||
|
|
9f0856208b | ||
|
|
fb4de3deed | ||
|
|
4d4716dc03 | ||
|
|
b5e4469150 | ||
|
|
3e00d6c4bb | ||
|
|
5e86220660 | ||
|
|
4313847660 | ||
|
|
3844adbf58 | ||
|
|
d8e2073449 | ||
|
|
e9f7ebd674 | ||
|
|
5affe206e1 | ||
|
|
1f4eccaaa5 | ||
|
|
07bf82a71d | ||
|
|
43d6233a22 | ||
|
|
736ce650c6 | ||
|
|
a8bb3d0e15 | ||
|
|
f27a152f69 | ||
|
|
63d494b22c | ||
|
|
9ac9a29407 | ||
|
|
bdb4a7e092 | ||
|
|
0163602573 | ||
|
|
bac2e26a9e | ||
|
|
10eae14f9b | ||
|
|
745c7356c2 | ||
|
|
e31c121315 | ||
|
|
dbf2ac31c9 | ||
|
|
4108d365bf | ||
|
|
03ef2c333c | ||
|
|
7922ba2feb | ||
|
|
d94b22235f | ||
|
|
72d75ee206 | ||
|
|
49bc4c1023 | ||
|
|
0e92f7738a | ||
|
|
d529f2a8f7 | ||
|
|
141a64faff | ||
|
|
035dcd3724 | ||
|
|
3e9c37a386 | ||
|
|
00a59641ee | ||
|
|
90cce79346 | ||
|
|
4eeaf52ed9 | ||
|
|
3642f632d3 | ||
|
|
aaa16d0001 | ||
|
|
3b8ba6b610 | ||
|
|
535aef9def | ||
|
|
6e308baf5a | ||
|
|
5a9d2d9081 | ||
|
|
688791b22b | ||
|
|
8e94e99ccb | ||
|
|
e20db94948 | ||
|
|
462a286eeb | ||
|
|
a110d01771 | ||
|
|
7ef7a1b3de | ||
|
|
f36f469430 | ||
|
|
5cf7908a86 | ||
|
|
b7e3c73d7c | ||
|
|
e6784a47e9 | ||
|
|
a0cac0ff75 | ||
|
|
817089b66d | ||
|
|
50f482374d | ||
|
|
ff60944b28 | ||
|
|
00294d0df7 | ||
|
|
fba03c479f | ||
|
|
27bf518087 | ||
|
|
96a99d63c2 | ||
|
|
a9d9b07167 | ||
|
|
494593845c | ||
|
|
82d63d3028 | ||
|
|
8e6a84e730 | ||
|
|
95475b1c7a | ||
|
|
86f941c936 | ||
|
|
387fd00c47 | ||
|
|
00b9c1be7d | ||
|
|
051bb5c457 | ||
|
|
931a031916 | ||
|
|
be21fe59aa | ||
|
|
ef3565aed2 | ||
|
|
01fc051e8a | ||
|
|
ae43f344af | ||
|
|
0902c559fb | ||
|
|
58b6a165a5 | ||
|
|
641c55342b | ||
|
|
e390f5d684 | ||
|
|
078a97791d | ||
|
|
4d6b383680 | ||
|
|
489885cf84 | ||
|
|
850be8f18d | ||
|
|
a22d40dde2 | ||
|
|
ee121033dc | ||
|
|
4090b56b4d | ||
|
|
33ad6eca7a | ||
|
|
dd10343e75 | ||
|
|
ad55502092 | ||
|
|
31edde3edc | ||
|
|
381a693c39 | ||
|
|
86cb571e28 | ||
|
|
319a2c5f65 | ||
|
|
9d0e895120 | ||
|
|
44ee32ed30 | ||
|
|
5922128732 | ||
|
|
cb37947a71 | ||
|
|
4668056fc9 | ||
|
|
de23af982a | ||
|
|
3a5a176ea0 | ||
|
|
a1d37a96df | ||
|
|
6bff79629e | ||
|
|
db452cdba0 | ||
|
|
d435752b0a | ||
|
|
c8b14ca177 | ||
|
|
8ba5c63de9 | ||
|
|
3a0ede0ffd | ||
|
|
9cde81c2dd | ||
|
|
62bd487421 | ||
|
|
4ef740a632 | ||
|
|
7f36acd8fe | ||
|
|
09d7c42a7c | ||
|
|
3fbbd1e1d7 | ||
|
|
faa9c5cbdc | ||
|
|
d2c786db37 | ||
|
|
3e786f4b0d | ||
|
|
4b66e713de | ||
|
|
90dd4d34bb | ||
|
|
2d6452cdf9 | ||
|
|
cc056d6395 | ||
|
|
394178c94c | ||
|
|
61590d8945 | ||
|
|
ec2a595627 | ||
|
|
8f5c833f3c | ||
|
|
ffe966b0fa | ||
|
|
bb3de147b3 | ||
|
|
95ec1a717b | ||
|
|
325829a9bc | ||
|
|
b0ea8b160c | ||
|
|
bb569f97b9 | ||
|
|
31670c94bc | ||
|
|
67e5d33dd7 | ||
|
|
da17495b65 | ||
|
|
b64614adfe | ||
|
|
6a6a08cbea | ||
|
|
753cbc2857 | ||
|
|
9d68b289a0 | ||
|
|
eb5f555ffb | ||
|
|
04dc4edb44 | ||
|
|
d161f5a9b2 | ||
|
|
28474e26f4 | ||
|
|
85421c7148 | ||
|
|
77cc150b61 | ||
|
|
890b2abf19 | ||
|
|
6b051c4ebc | ||
|
|
a601df36f3 | ||
|
|
2d4b834926 | ||
|
|
c22e6753ef | ||
|
|
db5b10fab5 | ||
|
|
fa5846e58b | ||
|
|
79e4022a33 | ||
|
|
80986c9ced | ||
|
|
ede7c28eb7 | ||
|
|
c9d3957986 | ||
|
|
05e962ddf8 | ||
|
|
d680c13060 | ||
|
|
a510e9e4fc | ||
|
|
1a9e663b20 | ||
|
|
0dd675509c | ||
|
|
144aa3c56e | ||
|
|
202892dfd6 | ||
|
|
0c6fa13fee | ||
|
|
68f0bcfbc3 | ||
|
|
662ede2370 | ||
|
|
d0edf6e593 | ||
|
|
c93f908f7f | ||
|
|
16d2a7caef | ||
|
|
b7b5cd6132 | ||
|
|
71583fb0d7 | ||
|
|
058f86e9e0 | ||
|
|
4509102cb9 | ||
|
|
87c99c59bd | ||
|
|
732d1bf43a | ||
|
|
88fd7424f6 | ||
|
|
30a452ab32 | ||
|
|
9c90f27dac | ||
|
|
ec4e600da6 | ||
|
|
4097dce455 | ||
|
|
c9b552534e | ||
|
|
f0ad5fc2ab | ||
|
|
5f444c8fcd | ||
|
|
62afa8bd58 | ||
|
|
2689b8f326 | ||
|
|
bd69ac5c93 | ||
|
|
33ed371ec9 | ||
|
|
3b07c32fe7 | ||
|
|
9cc513a000 | ||
|
|
cac32e5acd | ||
|
|
0e9edc98d4 | ||
|
|
27bd937cc0 | ||
|
|
f56c451143 | ||
|
|
05a1f76093 | ||
|
|
4ed9388e5d | ||
|
|
94a1183fab | ||
|
|
30e4269241 | ||
|
|
59315df637 | ||
|
|
3659df7d15 | ||
|
|
16f1fdbc8b | ||
|
|
98c1a4900c | ||
|
|
2541f58309 | ||
|
|
6b063f32d9 | ||
|
|
693f2e3625 | ||
|
|
afab06d3f5 | ||
|
|
8fb97c9acd | ||
|
|
7312a38d9e | ||
|
|
475e8d3d1d | ||
|
|
c5f070d5d5 | ||
|
|
1b9e855744 | ||
|
|
f3b2ea53e2 | ||
|
|
ed71769948 | ||
|
|
e1c0a9c416 | ||
|
|
0b8c5413a4 | ||
|
|
c473d53898 | ||
|
|
e8f8249319 | ||
|
|
e2ced802b4 | ||
|
|
9163658aa8 | ||
|
|
d3a15e132d | ||
|
|
47954f114c | ||
|
|
3ef747c8b6 | ||
|
|
75622f1ece | ||
|
|
a052dd6532 | ||
|
|
5cc2658cff | ||
|
|
2f4335ec2b | ||
|
|
2ab0740785 | ||
|
|
82f676c633 | ||
|
|
5f24adda77 | ||
|
|
900f062d1f | ||
|
|
ba64c2cc8f | ||
|
|
29e62e487f | ||
|
|
ec28f9c12c | ||
|
|
4e6480faf8 | ||
|
|
00dc2d7551 | ||
|
|
27346c53b1 | ||
|
|
e2491c45ab | ||
|
|
398cd7276f | ||
|
|
873ddf7c0c | ||
|
|
4aae637f6c | ||
|
|
705d0f5c8d | ||
|
|
844df66895 | ||
|
|
0d5b4f594d | ||
|
|
8c2786fff7 | ||
|
|
66ce343361 | ||
|
|
1b9f21fdc8 | ||
|
|
f3031b106d | ||
|
|
6e260c4093 | ||
|
|
f19d064087 | ||
|
|
25a1259911 | ||
|
|
f63f51dc22 | ||
|
|
4eebab0d22 | ||
|
|
bc63a2ee0e | ||
|
|
476f09712c | ||
|
|
fe0444b17e | ||
|
|
16c9148220 | ||
|
|
9d92486cfb | ||
|
|
bb41fdb5ec | ||
|
|
3410aa1aa8 | ||
|
|
f50b911a3f | ||
|
|
2a948bd306 | ||
|
|
d4e35514ba | ||
|
|
3fd6b9f6d4 | ||
|
|
a598524ad6 | ||
|
|
828ce10ce7 | ||
|
|
8939adbad9 | ||
|
|
ff160dba54 | ||
|
|
fb5b7317a7 | ||
|
|
457f692eab | ||
|
|
e077b5452f | ||
|
|
a9cfd20da7 | ||
|
|
22e6c2524e | ||
|
|
6d8cbdcb53 | ||
|
|
54a7ea6f36 | ||
|
|
0e2f5ec2d2 | ||
|
|
8c5e375c8e | ||
|
|
ce8a202831 | ||
|
|
0ece1d304d | ||
|
|
7f0f9f1934 | ||
|
|
8f09a154e3 | ||
|
|
4e7566579e | ||
|
|
fba1cfa06d | ||
|
|
110c6f72ec | ||
|
|
27f7d430ce | ||
|
|
5964e95c0a | ||
|
|
f78ae9c0f2 | ||
|
|
e072e16e92 | ||
|
|
7a79b5601a | ||
|
|
74b0c41e47 | ||
|
|
bbfbd4b270 | ||
|
|
88ec5a637f | ||
|
|
75fcbb43a7 | ||
|
|
e4e049e489 | ||
|
|
225e35bd36 | ||
|
|
9f81f23742 | ||
|
|
0ae4ad9e9f | ||
|
|
a157379adc | ||
|
|
1ed3815650 | ||
|
|
27310553b1 | ||
|
|
78490b9cc2 | ||
|
|
86ccb91ddb | ||
|
|
8e4552ed30 | ||
|
|
bc4a5ed341 | ||
|
|
d5157a6244 | ||
|
|
d07e7c32c2 | ||
|
|
8f35294c1b | ||
|
|
2bdcfbd7a3 | ||
|
|
46b695d850 | ||
|
|
6076f21f5e | ||
|
|
be34231656 | ||
|
|
54e73364f1 | ||
|
|
c6b220d933 | ||
|
|
d1c5c168b5 | ||
|
|
931756b833 | ||
|
|
39e76bc454 | ||
|
|
961b565690 | ||
|
|
142cdf5ec9 | ||
|
|
1e2b14e9ca | ||
|
|
4fe70c7812 | ||
|
|
21eb91c79e | ||
|
|
9d80973ea1 | ||
|
|
e4fb312330 | ||
|
|
1296e72d1d | ||
|
|
f077cf68af | ||
|
|
a69cc10af1 | ||
|
|
2dd060d94e | ||
|
|
546490c00e | ||
|
|
409a5de586 | ||
|
|
84b1e84af1 | ||
|
|
5250725ba5 | ||
|
|
84d5ad6181 | ||
|
|
96c15b8aad | ||
|
|
4fc2bf07b5 | ||
|
|
2007fe63f8 | ||
|
|
ee435c0d9c | ||
|
|
3f691235da | ||
|
|
86a925b27e | ||
|
|
954d8e4f79 | ||
|
|
b575dff21a | ||
|
|
b35ca7b257 | ||
|
|
0102bb94cb | ||
|
|
57bc7769b7 | ||
|
|
0461b8c90b | ||
|
|
bd8e228d60 | ||
|
|
bad99f6a9d | ||
|
|
5600a9cba1 | ||
|
|
607ae30be8 | ||
|
|
37d9503a67 | ||
|
|
a1033894d7 | ||
|
|
0480574310 | ||
|
|
dab0aaa612 | ||
|
|
6fcf1dbc50 | ||
|
|
352df99302 | ||
|
|
a3063b37ef | ||
|
|
cf13eaf1a1 | ||
|
|
cc811b1d7e | ||
|
|
a81d9af7f7 | ||
|
|
1dc94d4dcc | ||
|
|
5a2485ce12 | ||
|
|
142398d3a7 | ||
|
|
6c0118ee8e | ||
|
|
765ca5ea06 | ||
|
|
97333eaff7 | ||
|
|
b088a2d3f9 | ||
|
|
b9447ec1bc | ||
|
|
73bec6d4b7 | ||
|
|
e4b95737f0 | ||
|
|
c13eba970c | ||
|
|
4309b740ce | ||
|
|
c0d4f622eb | ||
|
|
a004b06237 | ||
|
|
98eab43915 | ||
|
|
ef03883edd | ||
|
|
636631cdd5 | ||
|
|
02ff8c1b66 | ||
|
|
0b0be7a381 | ||
|
|
83df7b20c4 | ||
|
|
90c60eee9d | ||
|
|
8e1e238219 | ||
|
|
88c1fec923 | ||
|
|
981469c80d | ||
|
|
b5a4fd98a5 | ||
|
|
bd573ee31a | ||
|
|
20dc821092 | ||
|
|
6d85cd36e2 | ||
|
|
10ac28e26d | ||
|
|
8f94b2010f | ||
|
|
d48e6a47bd | ||
|
|
40b676aa4f | ||
|
|
7e4e392b07 | ||
|
|
30e3c99d9f | ||
|
|
0f618d0576 | ||
|
|
624feae8af | ||
|
|
246f2b016b | ||
|
|
118204f9a7 | ||
|
|
60d16c258a | ||
|
|
c56dbabcfd | ||
|
|
30167ace51 | ||
|
|
b01db3b279 | ||
|
|
2af5880cfd | ||
|
|
ff3fa159d0 | ||
|
|
c440333535 | ||
|
|
5322333b7b | ||
|
|
e98823d847 | ||
|
|
d87a127837 | ||
|
|
0062e618f0 | ||
|
|
282382cc14 | ||
|
|
0a3aece096 | ||
|
|
bc35d57932 | ||
|
|
dd1a3c26ba | ||
|
|
5f988984e4 | ||
|
|
0748cdc7f1 | ||
|
|
b2c71c489d | ||
|
|
2ce906cee7 | ||
|
|
23b1ff0970 | ||
|
|
c2777386fc | ||
|
|
7a48984dd5 | ||
|
|
96f2552c8a | ||
|
|
e5658b9331 | ||
|
|
ac2336adb0 | ||
|
|
5da8738fea | ||
|
|
f9f6c92c52 | ||
|
|
98753dd088 | ||
|
|
881cb8b108 | ||
|
|
66bca12856 | ||
|
|
256c5769b4 | ||
|
|
b36ea7636b | ||
|
|
1f7238a434 | ||
|
|
2944c9c665 | ||
|
|
129bd04329 | ||
|
|
a6816db813 | ||
|
|
1d76d78858 | ||
|
|
fb70607064 | ||
|
|
959ba907df | ||
|
|
dfc3b51e78 | ||
|
|
7f2e024e78 | ||
|
|
193e764c0b | ||
|
|
6b20c70b52 | ||
|
|
69c5d47bd4 | ||
|
|
daf5fafced | ||
|
|
fa47b4d8b8 | ||
|
|
661ef5eead | ||
|
|
d38ef273cc | ||
|
|
85ca752e33 | ||
|
|
17244d193b | ||
|
|
df77232bdc | ||
|
|
2ae5bd9bb6 | ||
|
|
8ce7348625 | ||
|
|
3f1cbad2e7 | ||
|
|
e78a012305 | ||
|
|
4d1e5535b2 | ||
|
|
1954767b45 | ||
|
|
0bc81d5135 | ||
|
|
6983b4615c | ||
|
|
339e4dd3ef | ||
|
|
d57084f235 | ||
|
|
4a2e36b19e | ||
|
|
1c2018f37f | ||
|
|
04572965ea | ||
|
|
1832f5e751 | ||
|
|
d3f56a69fb | ||
|
|
bfbc667397 | ||
|
|
cb284033f5 | ||
|
|
ef9d3a10c3 | ||
|
|
20c9a50710 | ||
|
|
5b9aa0e474 | ||
|
|
475cc45a61 | ||
|
|
21fa937c9f | ||
|
|
bae500aa21 | ||
|
|
5534b7f133 | ||
|
|
163d6401c5 | ||
|
|
fc24169eaf | ||
|
|
0c78046356 | ||
|
|
4b8e01a22f | ||
|
|
a882c80e6f | ||
|
|
5de00c254d | ||
|
|
d7b612e737 | ||
|
|
d95b69b32c | ||
|
|
1dbfa26b5a | ||
|
|
342a584c2b | ||
|
|
718d8a931d | ||
|
|
39db27cb83 | ||
|
|
cc81432b5b | ||
|
|
c71414b3a9 | ||
|
|
542e010aa5 | ||
|
|
84ce9aa177 | ||
|
|
4c94c028a7 | ||
|
|
88a908e50d | ||
|
|
d7de7bcf3e | ||
|
|
cbdda5cc87 | ||
|
|
4e356d9876 | ||
|
|
ff3ab1699b | ||
|
|
8eeefabf32 | ||
|
|
214b8b998a | ||
|
|
2ef9e7efe6 | ||
|
|
449598e723 | ||
|
|
5201cb5acb | ||
|
|
ab79ac44d5 | ||
|
|
e286dfe6ed | ||
|
|
17e3b273e6 | ||
|
|
c93c8d1123 | ||
|
|
d5bf2e06b3 | ||
|
|
bbd6c8bd16 | ||
|
|
00f76ad0df | ||
|
|
4b70367430 | ||
|
|
ce9cbfc815 | ||
|
|
a92a9f02fb | ||
|
|
b65d3741b3 | ||
|
|
fcf8f4d453 | ||
|
|
13617646da | ||
|
|
7a3565009e | ||
|
|
9f3864fde3 | ||
|
|
db186beee4 | ||
|
|
1f1a32541f | ||
|
|
0465313e70 | ||
|
|
8d2563f136 | ||
|
|
21996c6d8e | ||
|
|
fcc5349156 | ||
|
|
1a07628209 | ||
|
|
814af7e175 | ||
|
|
bf683ec609 | ||
|
|
e851895f04 | ||
|
|
a2049ba394 | ||
|
|
a8239afc86 | ||
|
|
bb38cd49e4 | ||
|
|
1cbdbcd587 | ||
|
|
7e201e9f73 | ||
|
|
9fc866c5eb | ||
|
|
b0e88fb11b | ||
|
|
04c71cd725 | ||
|
|
d64b16ab25 | ||
|
|
f30b793779 | ||
|
|
94ea9c84c5 | ||
|
|
5c72869563 | ||
|
|
712419b73a | ||
|
|
7627efc92f | ||
|
|
cd7f458e28 | ||
|
|
ea01493df0 | ||
|
|
323edf1908 | ||
|
|
ba9cf37d59 | ||
|
|
2581aacd52 | ||
|
|
533a0c4ce7 | ||
|
|
93f3decc4f | ||
|
|
1c799131ae | ||
|
|
b1d4b48d39 | ||
|
|
bed4559052 | ||
|
|
7f87c1c0fc | ||
|
|
aaf7b47abe | ||
|
|
af0b30e77c | ||
|
|
9494e3cc40 | ||
|
|
a272f7eb08 | ||
|
|
b3dd9f3bb5 | ||
|
|
bb9104f0ee | ||
|
|
ae0b7667a9 | ||
|
|
fabf7d3a67 | ||
|
|
54307ce955 | ||
|
|
2589b74fd8 | ||
|
|
d9090acdfb | ||
|
|
72951df799 | ||
|
|
a9b41af71c | ||
|
|
a0ed612fef | ||
|
|
afdec73ca5 | ||
|
|
2e70cb6506 | ||
|
|
1794904a4a | ||
|
|
fd28279a62 | ||
|
|
6b27ae1d94 | ||
|
|
a6ee8fe26a | ||
|
|
e758ce69a3 | ||
|
|
38b085902f | ||
|
|
27498a3330 | ||
|
|
49cd4b7316 | ||
|
|
a067cba35b | ||
|
|
2905015c6e | ||
|
|
610abd4c52 | ||
|
|
ddc6ea162f | ||
|
|
b8804bf15d | ||
|
|
d03ad453a5 | ||
|
|
3f71579dfc | ||
|
|
f217439ee2 | ||
|
|
9d8f3cfb7f | ||
|
|
d5c79928ef | ||
|
|
37529750e2 | ||
|
|
c9ea7400b4 | ||
|
|
9fa15b6ff8 | ||
|
|
9c44ebc1e2 | ||
|
|
75e3026a14 | ||
|
|
0a3af9a403 | ||
|
|
3a08cf3bfb | ||
|
|
8826087a97 | ||
|
|
8aa09a245c | ||
|
|
a5fd84de41 | ||
|
|
dc199cfaa2 | ||
|
|
b81ef84227 | ||
|
|
91203a9482 | ||
|
|
134fea9d0f | ||
|
|
a153c46d7f | ||
|
|
8faad520ae | ||
|
|
8f89ae928b | ||
|
|
782ded56e5 | ||
|
|
8e458d52b5 | ||
|
|
1f475c1f6f | ||
|
|
bc9867e672 | ||
|
|
412fd4708d | ||
|
|
273c624442 | ||
|
|
8b591c2f8e | ||
|
|
8f4a23e3b7 | ||
|
|
c83d8e2ba6 | ||
|
|
6afc70be84 | ||
|
|
f503c2c9e6 | ||
|
|
7656893d51 | ||
|
|
ff38d68237 | ||
|
|
aff3e60754 | ||
|
|
8196d87371 | ||
|
|
61b1ad197a | ||
|
|
293bb4b1b8 | ||
|
|
29ca164513 | ||
|
|
97d58eadbf | ||
|
|
8cdeec9f54 | ||
|
|
082cd4e564 | ||
|
|
2115a89212 | ||
|
|
af3ec1e24e | ||
|
|
f275683ae8 | ||
|
|
da91e37d37 | ||
|
|
2758c44398 | ||
|
|
4e056a2894 | ||
|
|
f60b017da8 | ||
|
|
08634f1156 | ||
|
|
a50d6a801f | ||
|
|
0439a5a8a7 | ||
|
|
8ffe66b4ce | ||
|
|
d62ec8362a | ||
|
|
259b33d5a3 | ||
|
|
6393c09cda | ||
|
|
9421f1ab9c | ||
|
|
5bf0d0ea1e | ||
|
|
769f74b818 | ||
|
|
64051a3a71 | ||
|
|
8260eded07 | ||
|
|
402b4a784d | ||
|
|
651e7ddf7e | ||
|
|
40bace2da6 | ||
|
|
e89c82f549 | ||
|
|
812d100d06 | ||
|
|
b759742352 | ||
|
|
475e4d23bd | ||
|
|
bf4ae6dcfa | ||
|
|
17d4f07658 | ||
|
|
5ec797f263 | ||
|
|
5b1aea7afe | ||
|
|
327e113775 | ||
|
|
58f3009aba | ||
|
|
b193f29a9b | ||
|
|
7ab58bf012 | ||
|
|
cd10ba9c39 | ||
|
|
96a3369c4a | ||
|
|
e8ad570e3f | ||
|
|
ad1ddf413c | ||
|
|
e2c2152be9 | ||
|
|
919b2a9673 | ||
|
|
024a20905d | ||
|
|
69ba8a00ad | ||
|
|
f6a0c4f853 | ||
|
|
040ade9bee | ||
|
|
46ce790727 | ||
|
|
9831d941ca | ||
|
|
707ceb29e0 | ||
|
|
3d470fc7b7 | ||
|
|
edb7b28a00 | ||
|
|
c4efde7403 | ||
|
|
a1edc87664 | ||
|
|
9cbc3356e7 | ||
|
|
9161c2ff51 | ||
|
|
21f8cf65e6 | ||
|
|
8bcc049399 | ||
|
|
95900b8592 | ||
|
|
20a50cb517 | ||
|
|
a71a482250 | ||
|
|
8b6ee018c2 | ||
|
|
ddab3c9327 | ||
|
|
6a9a7ff259 | ||
|
|
f7cd5462c9 | ||
|
|
d268511c84 | ||
|
|
190467767e | ||
|
|
8d699c8c93 | ||
|
|
e2a93e38d6 | ||
|
|
41c2fb962c | ||
|
|
455bacd4d3 | ||
|
|
e85cbdad7a | ||
|
|
c752563e43 | ||
|
|
0eae6cd5f2 | ||
|
|
0bf707e346 | ||
|
|
96a2c35d91 | ||
|
|
f9fde13590 | ||
|
|
74174b9d05 | ||
|
|
89eda1fc01 | ||
|
|
bbec79a0c1 | ||
|
|
6f7ba4be1f | ||
|
|
2ccb522c5b | ||
|
|
0bf76767b0 | ||
|
|
732c9fe179 | ||
|
|
4f99ab58f7 | ||
|
|
339abc9bd9 | ||
|
|
4407fbc2d4 | ||
|
|
27f08d6d48 | ||
|
|
a9e0953900 | ||
|
|
9597027693 | ||
|
|
78f41a4e89 | ||
|
|
76dcae8020 | ||
|
|
190ef122b2 | ||
|
|
dc74e7d5d7 | ||
|
|
3d76ceddff | ||
|
|
b963f807be | ||
|
|
005bbb52ff | ||
|
|
a690102da2 | ||
|
|
09db11783d | ||
|
|
f6733ae577 | ||
|
|
2d2ca3aab1 | ||
|
|
cfc7620572 | ||
|
|
9a01bc0732 | ||
|
|
dbcc560717 | ||
|
|
449d39f41c | ||
|
|
84236041c1 | ||
|
|
8d44d96ec3 | ||
|
|
707e098687 | ||
|
|
88de74ad83 | ||
|
|
97b8718f15 | ||
|
|
388a6f937f | ||
|
|
a61050ad96 | ||
|
|
baaeac3036 | ||
|
|
d19370b617 | ||
|
|
8376acbf7f | ||
|
|
12a2ff9625 | ||
|
|
292a217b51 | ||
|
|
104117c5e7 | ||
|
|
7ab3c662e3 | ||
|
|
4fd5e85a18 | ||
|
|
e9a9211e75 | ||
|
|
d438845ac8 | ||
|
|
b1d495b2c4 | ||
|
|
6b7a46b721 | ||
|
|
ff90d659e6 | ||
|
|
8f841c70c4 | ||
|
|
052c0f276e | ||
|
|
1e7e392419 | ||
|
|
e11b82c337 | ||
|
|
04ad43af9e | ||
|
|
227aec9a0f | ||
|
|
b0165ce439 | ||
|
|
3c8756f024 | ||
|
|
1801bc0658 | ||
|
|
ebbad107bf | ||
|
|
fc0ab2eac2 | ||
|
|
64cb996206 | ||
|
|
413f2b2247 | ||
|
|
fbf4c7b4f1 | ||
|
|
99542d8763 | ||
|
|
b3c1d18d03 | ||
|
|
6c8aec60ca | ||
|
|
c0ca52952e | ||
|
|
39d727d0c3 | ||
|
|
6319853811 | ||
|
|
6b3a385f85 | ||
|
|
27a80b7906 | ||
|
|
4e33db9a3f | ||
|
|
ca9a114f7a | ||
|
|
ce1dc2e9b2 | ||
|
|
b4b62004a6 | ||
|
|
f7eb95852c | ||
|
|
12a296edfc | ||
|
|
e696a05791 | ||
|
|
4a13e4b36c | ||
|
|
b7fb041f31 | ||
|
|
a98beb3a2d | ||
|
|
f627c159b1 | ||
|
|
535cedf136 | ||
|
|
3a00964dd3 | ||
|
|
a69d50b02d | ||
|
|
ed7443661c | ||
|
|
3d2aa62cb6 | ||
|
|
9925249ba5 | ||
|
|
d7041ea5de | ||
|
|
68a9ee13e8 | ||
|
|
a64f08f3dd | ||
|
|
384897f46b | ||
|
|
08e60fc0ff | ||
|
|
ea050a6eb3 | ||
|
|
bde63f803a | ||
|
|
e73308638a | ||
|
|
1ac3419ef6 | ||
|
|
1e9858a28b | ||
|
|
8f4a09e531 | ||
|
|
3b2f77d88e | ||
|
|
52ccf9e1c1 | ||
|
|
5e947727a9 | ||
|
|
d7bd58cf36 | ||
|
|
b84e473d63 | ||
|
|
4aecd67d04 | ||
|
|
74a25e9cd9 | ||
|
|
d020139db7 | ||
|
|
f84acec8ea | ||
|
|
d3b282e01f | ||
|
|
85d9e2f2f0 | ||
|
|
04ed3994e2 | ||
|
|
6100502726 | ||
|
|
a1f09ea8f8 | ||
|
|
bce625987d | ||
|
|
3c1a6f441b | ||
|
|
97d640e1f0 | ||
|
|
ddf7602425 | ||
|
|
d3c32ffbcc | ||
|
|
1d2a3fe246 | ||
|
|
00c8546d21 | ||
|
|
31e441a805 | ||
|
|
c4a28caa32 | ||
|
|
c3eb0c1e7f | ||
|
|
d18f681310 | ||
|
|
ea5214328b | ||
|
|
0833a40d13 | ||
|
|
ab1a01e9b2 | ||
|
|
f1e1d6d6af | ||
|
|
b012127a99 | ||
|
|
265a9e2c5d | ||
|
|
b0b3b11dbf | ||
|
|
c578208d63 | ||
|
|
038461a61b | ||
|
|
716c94492a | ||
|
|
a4f335ba3e | ||
|
|
90832c891e | ||
|
|
dc2ab9f4fa | ||
|
|
162d858a90 | ||
|
|
13ac37d01a | ||
|
|
c2decc56b0 | ||
|
|
1649d5fee1 | ||
|
|
f8279b8ea3 | ||
|
|
76b8f839c2 | ||
|
|
8d37f07e09 | ||
|
|
450c73d98b | ||
|
|
2ead4a5df6 | ||
|
|
addafc08a5 | ||
|
|
e970fa0022 | ||
|
|
458bb156bf | ||
|
|
bca9dc2a51 | ||
|
|
3720ea24f0 | ||
|
|
72a37c03be | ||
|
|
93d1969c78 | ||
|
|
6178bb8fe9 | ||
|
|
5b195b5a0e | ||
|
|
4289131ae6 | ||
|
|
b721e1e239 | ||
|
|
6cf2012a4d | ||
|
|
e459ebaed1 | ||
|
|
e9e3ce40c5 | ||
|
|
56d84db1d4 | ||
|
|
16758de0a2 | ||
|
|
f19b6474fe | ||
|
|
2f6f2970c4 | ||
|
|
f227a1af7d | ||
|
|
4408572079 | ||
|
|
31b5b999c7 | ||
|
|
f8bcfb5d5a | ||
|
|
44e9c2617a | ||
|
|
b61739874e | ||
|
|
73957bd323 | ||
|
|
81f1338613 | ||
|
|
90baf2a92d | ||
|
|
13793a0ddf | ||
|
|
b334853d72 | ||
|
|
4b5d50e26b | ||
|
|
6d454e6ab2 | ||
|
|
4f0e09aa67 | ||
|
|
e921bbf9f6 | ||
|
|
205a4a9571 | ||
|
|
44279d4638 | ||
|
|
9f1c3d7392 | ||
|
|
362be34a2f | ||
|
|
ec7f13d375 | ||
|
|
ec27c2ac97 | ||
|
|
b97c854e15 | ||
|
|
bdbbf930aa | ||
|
|
5254b53e97 | ||
|
|
8adc3e5db7 | ||
|
|
4810644f65 | ||
|
|
d24d873e17 | ||
|
|
7728770623 | ||
|
|
279c36564f | ||
|
|
50d1c3fd85 | ||
|
|
ed712101ea | ||
|
|
015eb65963 | ||
|
|
afafa3e15c | ||
|
|
150f2d8d24 | ||
|
|
a6545f0566 | ||
|
|
5fc041cca0 | ||
|
|
089cd046af | ||
|
|
7e8852c549 | ||
|
|
4064a85205 | ||
|
|
3a9fef60a1 | ||
|
|
be9419edf4 | ||
|
|
a729d47d41 | ||
|
|
6abf827f25 | ||
|
|
5af9fcaf35 | ||
|
|
5736d40dad | ||
|
|
0dfd83b9f4 | ||
|
|
8e10dea8ec | ||
|
|
a69e8ea1a1 | ||
|
|
1f656724f6 | ||
|
|
ca55c617e5 | ||
|
|
9063e375e8 | ||
|
|
97c9760f61 | ||
|
|
df60710ea8 | ||
|
|
5d2edd2659 | ||
|
|
a558ae9496 | ||
|
|
d58a949aae | ||
|
|
00e608c89d | ||
|
|
b4dfd76a4c | ||
|
|
ea9a52d124 | ||
|
|
75cc5e05ad | ||
|
|
84ae14d754 | ||
|
|
a9e897adc3 | ||
|
|
fc0f3ad254 | ||
|
|
a1fbe27123 | ||
|
|
1c45b1fef3 | ||
|
|
e003386793 | ||
|
|
a533b89c9f | ||
|
|
a2ffad81c8 | ||
|
|
081cdf3f63 | ||
|
|
dbf5b18a99 | ||
|
|
0b3f7afaed | ||
|
|
d6e8f6ae2b | ||
|
|
af629a19d7 | ||
|
|
9a3eaa1117 | ||
|
|
7a68e6aad1 | ||
|
|
f27fa54388 | ||
|
|
48acb9e08a | ||
|
|
e5706ccbde | ||
|
|
9a82ef5255 | ||
|
|
4a1dcb2d03 | ||
|
|
ef92312b41 | ||
|
|
4673461789 | ||
|
|
2f8275c52d | ||
|
|
39ebb51bba | ||
|
|
d7227da9a8 | ||
|
|
ab805194a6 | ||
|
|
4fac53a757 | ||
|
|
11198b78a2 | ||
|
|
573a568dd0 | ||
|
|
ff3dd00370 | ||
|
|
2028c2800a | ||
|
|
fd8766b67e | ||
|
|
7d210e5194 | ||
|
|
2e674fc611 | ||
|
|
5cfd3419c6 | ||
|
|
9efd4fb891 | ||
|
|
b2e85f9d93 | ||
|
|
f10581829d | ||
|
|
78af3b274f | ||
|
|
facd9a2024 | ||
|
|
461f00dd53 | ||
|
|
22f03eaedf | ||
|
|
d467c74954 | ||
|
|
c4c745ccb8 | ||
|
|
3b66e34e74 | ||
|
|
2250f475fc | ||
|
|
ed703912b2 | ||
|
|
2cddcd1dbb | ||
|
|
231360a3b7 | ||
|
|
65ac3faff6 | ||
|
|
778252741e | ||
|
|
96e40d97cc | ||
|
|
4b3743c85a | ||
|
|
5795665a7d | ||
|
|
88f1be140c | ||
|
|
fc16b228fd | ||
|
|
a5b2ccaaad | ||
|
|
5dd352c916 | ||
|
|
3c204aaf50 | ||
|
|
3ae184d31f | ||
|
|
3e975124f3 | ||
|
|
74c467f9f2 | ||
|
|
1b97c938e9 | ||
|
|
b3e2acac4e | ||
|
|
403fa0dc53 | ||
|
|
f918c330a9 | ||
|
|
7f52f77efe | ||
|
|
90b480f2af | ||
|
|
578c33c010 | ||
|
|
d6a821b9d7 | ||
|
|
7d8b5c530f | ||
|
|
2033da0b23 | ||
|
|
c4ac954c59 | ||
|
|
2640aec227 | ||
|
|
a1037ce3bc | ||
|
|
249737e53d | ||
|
|
c70573dee1 | ||
|
|
6c98ed520d | ||
|
|
37ceea7333 | ||
|
|
374b227226 | ||
|
|
8c4a5016ce | ||
|
|
1056275825 | ||
|
|
9634acedaf | ||
|
|
3a4b0bed49 | ||
|
|
84f4e33ea3 | ||
|
|
b093ef7445 | ||
|
|
405ac901c9 | ||
|
|
721ccb6cf5 | ||
|
|
ba05727773 | ||
|
|
f9332da521 | ||
|
|
156516ce44 | ||
|
|
157e44a799 | ||
|
|
7d2ff3f081 | ||
|
|
25a87e82d4 | ||
|
|
e400753ed8 | ||
|
|
0984fcf118 | ||
|
|
18cc99ac17 | ||
|
|
1522c23470 | ||
|
|
2341e303da | ||
|
|
dca142029c | ||
|
|
7448f5e5ed | ||
|
|
45caf9c50c | ||
|
|
ace2ca484b | ||
|
|
7dc584ed91 | ||
|
|
855f0b4f2f | ||
|
|
2bf30d6b47 | ||
|
|
685e7d7225 | ||
|
|
38dbcb2248 | ||
|
|
bb3a69f801 | ||
|
|
55db40d3e0 | ||
|
|
f1fbf15116 | ||
|
|
9bdbdda261 | ||
|
|
ad2057500a | ||
|
|
d0e3726ca4 | ||
|
|
75a46764e5 | ||
|
|
4eceda658b | ||
|
|
1c511bdb7c | ||
|
|
f9bd76e4f7 | ||
|
|
e74e0dedcd | ||
|
|
dcf6eb2a9e | ||
|
|
7d2980f09e | ||
|
|
f1fe6fa6e4 | ||
|
|
ecb7a9c73a | ||
|
|
aebe0396e9 | ||
|
|
4e9a77cf26 | ||
|
|
14ef32631c | ||
|
|
500f07c8de | ||
|
|
ae936dae90 | ||
|
|
67166dc05c | ||
|
|
aa9fed8cc2 | ||
|
|
442eb8a4c3 | ||
|
|
46805f696d | ||
|
|
29f6a99432 | ||
|
|
1f13793b1a | ||
|
|
08130eb158 | ||
|
|
b27dfeacc9 | ||
|
|
fb0f53b2e0 | ||
|
|
baa521bef5 | ||
|
|
7bcf65a125 | ||
|
|
306009bb6a | ||
|
|
dfc5336975 | ||
|
|
4cea95a547 | ||
|
|
b23b3272dc | ||
|
|
1696aa1891 | ||
|
|
52407725c9 | ||
|
|
81da3c3319 | ||
|
|
7729bc2634 | ||
|
|
69a305d434 | ||
|
|
ab5b1cf86b | ||
|
|
c33387749b | ||
|
|
c9ca65b469 | ||
|
|
8e078f45e0 | ||
|
|
f84ffd0130 | ||
|
|
300e3d7c73 | ||
|
|
365c6e4661 | ||
|
|
1dc03ef706 | ||
|
|
d4a67e3186 | ||
|
|
18e10315e5 | ||
|
|
e9caaa4ad9 | ||
|
|
a6198b9ed1 | ||
|
|
a7be294ed7 | ||
|
|
617f461c9d | ||
|
|
1dcb6c994f | ||
|
|
a9ab63c01c | ||
|
|
f89db4020f | ||
|
|
393c09659e | ||
|
|
2d96549cd0 | ||
|
|
b48892d403 | ||
|
|
7b907f0bb5 | ||
|
|
9dfcad117c | ||
|
|
7018feed88 | ||
|
|
9be529f12d | ||
|
|
f5e5277908 | ||
|
|
c991c6e710 | ||
|
|
e1f4319279 | ||
|
|
2826fcc851 | ||
|
|
37562f753a | ||
|
|
248252682c | ||
|
|
cc3586028e | ||
|
|
f60df86c89 | ||
|
|
bc7a3a9e99 | ||
|
|
d3cbf7d86a | ||
|
|
313bf45e42 | ||
|
|
ce34d0ac09 | ||
|
|
4e9dd6b0f5 | ||
|
|
b6ccbffe2b | ||
|
|
1aecc34e9e | ||
|
|
75b9c0044c | ||
|
|
600b77a93f | ||
|
|
39335c356b | ||
|
|
a3c62bb737 | ||
|
|
2f6263a696 | ||
|
|
35748f40d6 | ||
|
|
ed62478192 | ||
|
|
9e7733a743 | ||
|
|
fc0bdd1aa8 | ||
|
|
e9dad4048f | ||
|
|
ddba94214f | ||
|
|
e9f970891d | ||
|
|
a89cf50c59 | ||
|
|
f90c544039 | ||
|
|
afcf54a5c9 | ||
|
|
3671e38af4 | ||
|
|
4fc3946111 | ||
|
|
59a941e4a4 | ||
|
|
a7cd5f3f38 | ||
|
|
0bdbc5a86e | ||
|
|
abecef77cf | ||
|
|
b74dfe6e8e | ||
|
|
d80f6e0f8c | ||
|
|
13962f0b15 | ||
|
|
2fc1f3dd48 | ||
|
|
f2cbb15468 | ||
|
|
e38e8b29f8 | ||
|
|
c03ceadfbd | ||
|
|
e50baf58ab | ||
|
|
1750ec5c52 | ||
|
|
c77bd28775 | ||
|
|
1619add90c | ||
|
|
a1a4e8b6bb | ||
|
|
25f350a058 | ||
|
|
121cb9ee38 | ||
|
|
bc173b9fb0 | ||
|
|
4fd9c70f06 | ||
|
|
91aeab0de3 | ||
|
|
c913cf446f | ||
|
|
a88f39457b | ||
|
|
2bbaab4a24 | ||
|
|
1a8f4b57a9 | ||
|
|
022b31a8c8 | ||
|
|
dd6b494eb3 | ||
|
|
c9bea5bad3 | ||
|
|
296324ea03 | ||
|
|
fa41e86a28 | ||
|
|
9e77b7075a | ||
|
|
5c7f9a627f | ||
|
|
bc3e3472c1 | ||
|
|
66bd86e2c2 | ||
|
|
487fe20490 | ||
|
|
80d9b1ccd7 | ||
|
|
69c48301e0 | ||
|
|
2be9b88135 | ||
|
|
98fa4fce09 | ||
|
|
1ec1d17e16 | ||
|
|
1e11df0dc3 | ||
|
|
421d474332 | ||
|
|
58060fa11b | ||
|
|
cea698f19c | ||
|
|
48781ef7f7 | ||
|
|
6d1a837df7 | ||
|
|
21f422ca5e | ||
|
|
291ae60b52 | ||
|
|
3b79d2789d | ||
|
|
bb9dcc99cf | ||
|
|
3d59821134 | ||
|
|
cae111287b | ||
|
|
e36e473859 | ||
|
|
d7fb66aa82 | ||
|
|
344b3b5ce1 | ||
|
|
3f7cf29124 | ||
|
|
63dc69fef6 | ||
|
|
cfe1c195c4 | ||
|
|
0cd8572b2d | ||
|
|
7c2831ac90 | ||
|
|
de603b75fc | ||
|
|
1244be2eda | ||
|
|
9f0a373b51 | ||
|
|
b0701709c1 | ||
|
|
34aa216a65 | ||
|
|
a76a29f233 | ||
|
|
4e06ab75e8 | ||
|
|
26147fb954 | ||
|
|
bd53a054b1 | ||
|
|
211b8685d3 | ||
|
|
9c75b2d931 | ||
|
|
54d11e6057 | ||
|
|
3d7ba69a05 | ||
|
|
58133d22a8 | ||
|
|
330e5c5460 | ||
|
|
ab519c8262 | ||
|
|
65f29a78b2 | ||
|
|
c363b5a62f | ||
|
|
60ed0f94ed | ||
|
|
f38f8d94a9 | ||
|
|
679eb352e0 | ||
|
|
80bbb6578e | ||
|
|
19cc0f0ab4 | ||
|
|
14e14ea68c | ||
|
|
834d37ed86 | ||
|
|
adcc235ef6 | ||
|
|
86a0d0234d | ||
|
|
4598be561a | ||
|
|
af5db47e99 | ||
|
|
fb67f40f04 | ||
|
|
48033c3242 | ||
|
|
aa1f5b3581 | ||
|
|
d9d3a69595 | ||
|
|
f9adfa6d4e | ||
|
|
85b1fce1ef | ||
|
|
da566db150 | ||
|
|
be37dc73f6 | ||
|
|
976b2c9c2f | ||
|
|
b74d2cda28 | ||
|
|
cc5dd9f14e | ||
|
|
fbfcdc4cef |
@@ -1,5 +1,5 @@
|
||||
openssl.pc
|
||||
Makefile.ssl
|
||||
Makefile
|
||||
MINFO
|
||||
makefile.one
|
||||
tmp
|
||||
@@ -14,3 +14,4 @@ cctest.c
|
||||
cctest.a
|
||||
libcrypto.so.*
|
||||
libssl.so.*
|
||||
libcrypto.sha1
|
||||
|
||||
775
CHANGES
775
CHANGES
@@ -2,749 +2,44 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.7e and 0.9.8 [xx XXX xxxx]
|
||||
Changes between 0.9.7e and 0.9.7f [22 Mar 2005]
|
||||
|
||||
*) RC4 performance overhaul on modern architectures/implementations, such
|
||||
as Intel P4, IA-64 and AMD64.
|
||||
*) 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.
|
||||
[Andy Polyakov]
|
||||
|
||||
*) New utility extract-section.pl. This can be used specify an alternative
|
||||
section number in a pod file instead of having to treat each file as
|
||||
a separate case in Makefile. This can be done by adding two lines to the
|
||||
pod file:
|
||||
|
||||
=for comment openssl_section:XXX
|
||||
|
||||
The blank line is mandatory.
|
||||
|
||||
[Steve Henson]
|
||||
|
||||
*) New arguments -certform, -keyform and -pass for s_client and s_server
|
||||
to allow alternative format key and certificate files and passphrase
|
||||
sources.
|
||||
[Steve Henson]
|
||||
|
||||
*) New structure X509_VERIFY_PARAM which combines current verify parameters,
|
||||
update associated structures and add various utility functions.
|
||||
|
||||
Add new policy related verify parameters, include policy checking in
|
||||
standard verify code. Enhance 'smime' application with extra parameters
|
||||
to support policy checking and print out.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add a new engine to support VIA PadLock ACE extensions in the VIA C3
|
||||
Nehemiah processors. These extensions support AES encryption in hardware
|
||||
as well as RNG (though RNG support is currently disabled).
|
||||
[Michal Ludvig <michal@logix.cz>, with help from Andy Polyakov]
|
||||
|
||||
*) Deprecate BN_[get|set]_params() functions (they were ignored internally).
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) New FIPS 180-2 algorithms, SHA-224/-256/-384/-512 are implemented.
|
||||
[Andy Polyakov and a number of other people]
|
||||
|
||||
*) Improved PowerPC platform support. Most notably BIGNUM assembler
|
||||
implementation contributed by IBM.
|
||||
[Suresh Chari, Peter Waltenberg, Andy Polyakov]
|
||||
|
||||
*) The new 'RSA_generate_key_ex' function now takes a BIGNUM for the public
|
||||
exponent rather than 'unsigned long'. There is a corresponding change to
|
||||
the new 'rsa_keygen' element of the RSA_METHOD structure.
|
||||
[Jelte Jansen, Geoff Thorpe]
|
||||
|
||||
*) Functionality for creating the initial serial number file is now
|
||||
moved from CA.pl to the 'ca' utility with a new option -create_serial.
|
||||
|
||||
(Before OpenSSL 0.9.7e, CA.pl used to initialize the serial
|
||||
number file to 1, which is bound to cause problems. To avoid
|
||||
the problems while respecting compatibility between different 0.9.7
|
||||
patchlevels, 0.9.7e employed 'openssl x509 -next_serial' in
|
||||
CA.pl for serial number initialization. With the new release 0.9.8,
|
||||
we can fix the problem directly in the 'ca' utility.)
|
||||
[Steve Henson]
|
||||
|
||||
*) Reduced header interdepencies by declaring more opaque objects in
|
||||
ossl_typ.h. As a consequence, including some headers (eg. engine.h) will
|
||||
give fewer recursive includes, which could break lazy source code - so
|
||||
this change is covered by the OPENSSL_NO_DEPRECATED symbol. As always,
|
||||
developers should define this symbol when building and using openssl to
|
||||
ensure they track the recommended behaviour, interfaces, [etc], but
|
||||
backwards-compatible behaviour prevails when this isn't defined.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) New function X509_POLICY_NODE_print() which prints out policy nodes.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add new EVP function EVP_CIPHER_CTX_rand_key and associated functionality.
|
||||
This will generate a random key of the appropriate length based on the
|
||||
cipher context. The EVP_CIPHER can provide its own random key generation
|
||||
routine to support keys of a specific form. This is used in the des and
|
||||
3des routines to generate a key of the correct parity. Update S/MIME
|
||||
code to use new functions and hence generate correct parity DES keys.
|
||||
Add EVP_CHECK_DES_KEY #define to return an error if the key is not
|
||||
valid (weak or incorrect parity).
|
||||
[Steve Henson]
|
||||
|
||||
*) Add a local set of CRLs that can be used by X509_verify_cert() as well
|
||||
as looking them up. This is useful when the verified structure may contain
|
||||
CRLs, for example PKCS#7 signedData. Modify PKCS7_verify() to use any CRLs
|
||||
present unless the new PKCS7_NO_CRL flag is asserted.
|
||||
[Steve Henson]
|
||||
|
||||
*) Extend ASN1 oid configuration module. It now additionally accepts the
|
||||
syntax:
|
||||
|
||||
shortName = some long name, 1.2.3.4
|
||||
[Steve Henson]
|
||||
|
||||
*) Reimplemented the BN_CTX implementation. There is now no more static
|
||||
limitation on the number of variables it can handle nor the depth of the
|
||||
"stack" handling for BN_CTX_start()/BN_CTX_end() pairs. The stack
|
||||
information can now expand as required, and rather than having a single
|
||||
static array of bignums, BN_CTX now uses a linked-list of such arrays
|
||||
allowing it to expand on demand whilst maintaining the usefulness of
|
||||
BN_CTX's "bundling".
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Add a missing BN_CTX parameter to the 'rsa_mod_exp' callback in RSA_METHOD
|
||||
to allow all RSA operations to function using a single BN_CTX.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Preliminary support for certificate policy evaluation and checking. This
|
||||
is initially intended to pass the tests outlined in "Conformance Testing
|
||||
of Relying Party Client Certificate Path Processing Logic" v1.07.
|
||||
[Steve Henson]
|
||||
|
||||
*) bn_dup_expand() has been deprecated, it was introduced in 0.9.7 and
|
||||
remained unused and not that useful. A variety of other little bignum
|
||||
tweaks and fixes have also been made continuing on from the audit (see
|
||||
below).
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Constify all or almost all d2i, c2i, s2i and r2i functions, along with
|
||||
associated ASN1, EVP and SSL functions and old ASN1 macros.
|
||||
[Richard Levitte]
|
||||
|
||||
*) BN_zero() only needs to set 'top' and 'neg' to zero for correct results,
|
||||
and this should never fail. So the return value from the use of
|
||||
BN_set_word() (which can fail due to needless expansion) is now deprecated;
|
||||
if OPENSSL_NO_DEPRECATED is defined, BN_zero() is a void macro.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) BN_CTX_get() should return zero-valued bignums, providing the same
|
||||
initialised value as BN_new().
|
||||
[Geoff Thorpe, suggested by Ulf M<>ller]
|
||||
|
||||
*) Support for inhibitAnyPolicy certificate extension.
|
||||
[Steve Henson]
|
||||
|
||||
*) An audit of the BIGNUM code is underway, for which debugging code is
|
||||
enabled when BN_DEBUG is defined. This makes stricter enforcements on what
|
||||
is considered valid when processing BIGNUMs, and causes execution to
|
||||
assert() when a problem is discovered. If BN_DEBUG_RAND is defined,
|
||||
further steps are taken to deliberately pollute unused data in BIGNUM
|
||||
structures to try and expose faulty code further on. For now, openssl will
|
||||
(in its default mode of operation) continue to tolerate the inconsistent
|
||||
forms that it has tolerated in the past, but authors and packagers should
|
||||
consider trying openssl and their own applications when compiled with
|
||||
these debugging symbols defined. It will help highlight potential bugs in
|
||||
their own code, and will improve the test coverage for OpenSSL itself. At
|
||||
some point, these tighter rules will become openssl's default to improve
|
||||
maintainability, though the assert()s and other overheads will remain only
|
||||
in debugging configurations. See bn.h for more details.
|
||||
[Geoff Thorpe, Nils Larsch, Ulf M<>ller]
|
||||
|
||||
*) BN_CTX_init() has been deprecated, as BN_CTX is an opaque structure
|
||||
that can only be obtained through BN_CTX_new() (which implicitly
|
||||
initialises it). The presence of this function only made it possible
|
||||
to overwrite an existing structure (and cause memory leaks).
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Because of the callback-based approach for implementing LHASH as a
|
||||
template type, lh_insert() adds opaque objects to hash-tables and
|
||||
lh_doall() or lh_doall_arg() are typically used with a destructor callback
|
||||
to clean up those corresponding objects before destroying the hash table
|
||||
(and losing the object pointers). So some over-zealous constifications in
|
||||
LHASH have been relaxed so that lh_insert() does not take (nor store) the
|
||||
objects as "const" and the lh_doall[_arg] callback wrappers are not
|
||||
prototyped to have "const" restrictions on the object pointers they are
|
||||
given (and so aren't required to cast them away any more).
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) The tmdiff.h API was so ugly and minimal that our own timing utility
|
||||
(speed) prefers to use its own implementation. The two implementations
|
||||
haven't been consolidated as yet (volunteers?) but the tmdiff API has had
|
||||
its object type properly exposed (MS_TM) instead of casting to/from "char
|
||||
*". This may still change yet if someone realises MS_TM and "ms_time_***"
|
||||
aren't necessarily the greatest nomenclatures - but this is what was used
|
||||
internally to the implementation so I've used that for now.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Ensure that deprecated functions do not get compiled when
|
||||
OPENSSL_NO_DEPRECATED is defined. Some "openssl" subcommands and a few of
|
||||
the self-tests were still using deprecated key-generation functions so
|
||||
these have been updated also.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Reorganise PKCS#7 code to separate the digest location functionality
|
||||
into PKCS7_find_digest(), digest addtion into PKCS7_bio_add_digest().
|
||||
New function PKCS7_set_digest() to set the digest type for PKCS#7
|
||||
digestedData type. Add additional code to correctly generate the
|
||||
digestedData type and add support for this type in PKCS7 initialization
|
||||
functions.
|
||||
[Steve Henson]
|
||||
|
||||
*) New function PKCS7_set0_type_other() this initializes a PKCS7
|
||||
structure of type "other".
|
||||
[Steve Henson]
|
||||
|
||||
*) Fix prime generation loop in crypto/bn/bn_prime.pl by making
|
||||
sure the loop does correctly stop and breaking ("division by zero")
|
||||
modulus operations are not performed. The (pre-generated) prime
|
||||
table crypto/bn/bn_prime.h was already correct, but it could not be
|
||||
re-generated on some platforms because of the "division by zero"
|
||||
situation in the script.
|
||||
[Ralf S. Engelschall]
|
||||
|
||||
*) Update support for ECC-based TLS ciphersuites according to
|
||||
draft-ietf-tls-ecc-03.txt: the KDF1 key derivation function with
|
||||
SHA-1 now is only used for "small" curves (where the
|
||||
representation of a field element takes up to 24 bytes); for
|
||||
larger curves, the field element resulting from ECDH is directly
|
||||
used as premaster secret.
|
||||
[Douglas Stebila (Sun Microsystems Laboratories)]
|
||||
|
||||
*) Add code for kP+lQ timings to crypto/ec/ectest.c, and add SEC2
|
||||
curve secp160r1 to the tests.
|
||||
[Douglas Stebila (Sun Microsystems Laboratories)]
|
||||
|
||||
*) Add the possibility to load symbols globally with DSO.
|
||||
[G<>tz Babin-Ebell <babin-ebell@trustcenter.de> via Richard Levitte]
|
||||
|
||||
*) Add the functions ERR_set_mark() and ERR_pop_to_mark() for better
|
||||
control of the error stack.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add support for STORE in ENGINE.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add the STORE type. The intention is to provide a common interface
|
||||
to certificate and key stores, be they simple file-based stores, or
|
||||
HSM-type store, or LDAP stores, or...
|
||||
NOTE: The code is currently UNTESTED and isn't really used anywhere.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add a generic structure called OPENSSL_ITEM. This can be used to
|
||||
pass a list of arguments to any function as well as provide a way
|
||||
for a function to pass data back to the caller.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add the functions BUF_strndup() and BUF_memdup(). BUF_strndup()
|
||||
works like BUF_strdup() but can be used to duplicate a portion of
|
||||
a string. The copy gets NUL-terminated. BUF_memdup() duplicates
|
||||
a memory area.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add the function sk_find_ex() which works like sk_find(), but will
|
||||
return an index to an element even if an exact match couldn't be
|
||||
found. The index is guaranteed to point at the element where the
|
||||
searched-for key would be inserted to preserve sorting order.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add the function OBJ_bsearch_ex() which works like OBJ_bsearch() but
|
||||
takes an extra flags argument for optional functionality. Currently,
|
||||
the following flags are defined:
|
||||
|
||||
OBJ_BSEARCH_VALUE_ON_NOMATCH
|
||||
This one gets OBJ_bsearch_ex() to return a pointer to the first
|
||||
element where the comparing function returns a negative or zero
|
||||
number.
|
||||
|
||||
OBJ_BSEARCH_FIRST_VALUE_ON_MATCH
|
||||
This one gets OBJ_bsearch_ex() to return a pointer to the first
|
||||
element where the comparing function returns zero. This is useful
|
||||
if there are more than one element where the comparing function
|
||||
returns zero.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Make it possible to create self-signed certificates with 'openssl ca'
|
||||
in such a way that the self-signed certificate becomes part of the
|
||||
CA database and uses the same mechanisms for serial number generation
|
||||
as all other certificate signing. The new flag '-selfsign' enables
|
||||
this functionality. Adapt CA.sh and CA.pl.in.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add functionality to check the public key of a certificate request
|
||||
against a given private. This is useful to check that a certificate
|
||||
request can be signed by that key (self-signing).
|
||||
[Richard Levitte]
|
||||
|
||||
*) Make it possible to have multiple active certificates with the same
|
||||
subject in the CA index file. This is done only if the keyword
|
||||
'unique_subject' is set to 'no' in the main CA section (default
|
||||
if 'CA_default') of the configuration file. The value is saved
|
||||
with the database itself in a separate index attribute file,
|
||||
named like the index file with '.attr' appended to the name.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Generate muti valued AVAs using '+' notation in config files for
|
||||
req and dirName.
|
||||
[Steve Henson]
|
||||
|
||||
*) Support for nameConstraints certificate extension.
|
||||
[Steve Henson]
|
||||
|
||||
*) Support for policyConstraints certificate extension.
|
||||
[Steve Henson]
|
||||
|
||||
*) Support for policyMappings certificate extension.
|
||||
[Steve Henson]
|
||||
|
||||
*) Make sure the default DSA_METHOD implementation only uses its
|
||||
dsa_mod_exp() and/or bn_mod_exp() handlers if they are non-NULL,
|
||||
and change its own handlers to be NULL so as to remove unnecessary
|
||||
indirection. This lets alternative implementations fallback to the
|
||||
default implementation more easily.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Support for directoryName in GeneralName related extensions
|
||||
in config files.
|
||||
[Steve Henson]
|
||||
|
||||
*) Make it possible to link applications using Makefile.shared.
|
||||
Make that possible even when linking against static libraries!
|
||||
[Richard Levitte]
|
||||
|
||||
*) Support for single pass processing for S/MIME signing. This now
|
||||
means that S/MIME signing can be done from a pipe, in addition
|
||||
cleartext signing (multipart/signed type) is effectively streaming
|
||||
and the signed data does not need to be all held in memory.
|
||||
|
||||
This is done with a new flag PKCS7_STREAM. When this flag is set
|
||||
PKCS7_sign() only initializes the PKCS7 structure and the actual signing
|
||||
is done after the data is output (and digests calculated) in
|
||||
SMIME_write_PKCS7().
|
||||
[Steve Henson]
|
||||
|
||||
*) Add full support for -rpath/-R, both in shared libraries and
|
||||
applications, at least on the platforms where it's known how
|
||||
to do it.
|
||||
[Richard Levitte]
|
||||
|
||||
*) In crypto/ec/ec_mult.c, implement fast point multiplication with
|
||||
precomputation, based on wNAF splitting: EC_GROUP_precompute_mult()
|
||||
will now compute a table of multiples of the generator that
|
||||
makes subsequent invocations of EC_POINTs_mul() or EC_POINT_mul()
|
||||
faster (notably in the case of a single point multiplication,
|
||||
scalar * generator).
|
||||
[Nils Larsch, Bodo Moeller]
|
||||
|
||||
*) IPv6 support for certificate extensions. The various extensions
|
||||
which use the IP:a.b.c.d can now take IPv6 addresses using the
|
||||
formats of RFC1884 2.2 . IPv6 addresses are now also displayed
|
||||
correctly.
|
||||
[Steve Henson]
|
||||
|
||||
*) Added an ENGINE that implements RSA by performing private key
|
||||
exponentiations with the GMP library. The conversions to and from
|
||||
GMP's mpz_t format aren't optimised nor are any montgomery forms
|
||||
cached, and on x86 it appears OpenSSL's own performance has caught up.
|
||||
However there are likely to be other architectures where GMP could
|
||||
provide a boost. This ENGINE is not built in by default, but it can be
|
||||
specified at Configure time and should be accompanied by the necessary
|
||||
linker additions, eg;
|
||||
./config -DOPENSSL_USE_GMP -lgmp
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) "openssl engine" will not display ENGINE/DSO load failure errors when
|
||||
testing availability of engines with "-t" - the old behaviour is
|
||||
produced by increasing the feature's verbosity with "-tt".
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) ECDSA routines: under certain error conditions uninitialized BN objects
|
||||
could be freed. Solution: make sure initialization is performed early
|
||||
enough. (Reported and fix supplied by Nils Larsch <nla@trustcenter.de>
|
||||
via PR#459)
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) Key-generation can now be implemented in RSA_METHOD, DSA_METHOD
|
||||
and DH_METHOD (eg. by ENGINE implementations) to override the normal
|
||||
software implementations. For DSA and DH, parameter generation can
|
||||
also be overriden by providing the appropriate method callbacks.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Change the "progress" mechanism used in key-generation and
|
||||
primality testing to functions that take a new BN_GENCB pointer in
|
||||
place of callback/argument pairs. The new API functions have "_ex"
|
||||
postfixes and the older functions are reimplemented as wrappers for
|
||||
the new ones. The OPENSSL_NO_DEPRECATED symbol can be used to hide
|
||||
declarations of the old functions to help (graceful) attempts to
|
||||
migrate to the new functions. Also, the new key-generation API
|
||||
functions operate on a caller-supplied key-structure and return
|
||||
success/failure rather than returning a key or NULL - this is to
|
||||
help make "keygen" another member function of RSA_METHOD etc.
|
||||
|
||||
Example for using the new callback interface:
|
||||
|
||||
int (*my_callback)(int a, int b, BN_GENCB *cb) = ...;
|
||||
void *my_arg = ...;
|
||||
BN_GENCB my_cb;
|
||||
|
||||
BN_GENCB_set(&my_cb, my_callback, my_arg);
|
||||
|
||||
return BN_is_prime_ex(some_bignum, BN_prime_checks, NULL, &cb);
|
||||
/* For the meaning of a, b in calls to my_callback(), see the
|
||||
* documentation of the function that calls the callback.
|
||||
* cb will point to my_cb; my_arg can be retrieved as cb->arg.
|
||||
* my_callback should return 1 if it wants BN_is_prime_ex()
|
||||
* to continue, or 0 to stop.
|
||||
*/
|
||||
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Change the ZLIB compression method to be stateful, and make it
|
||||
available to TLS with the number defined in
|
||||
draft-ietf-tls-compression-04.txt.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add the ASN.1 structures and functions for CertificatePair, which
|
||||
is defined as follows (according to X.509_4thEditionDraftV6.pdf):
|
||||
|
||||
CertificatePair ::= SEQUENCE {
|
||||
forward [0] Certificate OPTIONAL,
|
||||
reverse [1] Certificate OPTIONAL,
|
||||
-- at least one of the pair shall be present -- }
|
||||
|
||||
Also implement the PEM functions to read and write certificate
|
||||
pairs, and defined the PEM tag as "CERTIFICATE PAIR".
|
||||
|
||||
This needed to be defined, mostly for the sake of the LDAP
|
||||
attribute crossCertificatePair, but may prove useful elsewhere as
|
||||
well.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Make it possible to inhibit symlinking of shared libraries in
|
||||
Makefile.shared, for Cygwin's sake.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Extend the BIGNUM API by creating new macros that behave like
|
||||
functions
|
||||
|
||||
void BN_set_sign(BIGNUM *a, int neg);
|
||||
int BN_get_sign(const BIGNUM *a);
|
||||
|
||||
and avoid the need to access 'a->neg' directly in applications.
|
||||
[Nils Larsch <nla@trustcenter.de>]
|
||||
|
||||
*) Implement fast modular reduction for pseudo-Mersenne primes
|
||||
used in NIST curves (crypto/bn/bn_nist.c, crypto/ec/ecp_nist.c).
|
||||
EC_GROUP_new_curve_GFp() will now automatically use this
|
||||
if applicable.
|
||||
[Nils Larsch <nla@trustcenter.de>]
|
||||
|
||||
*) Add new lock type (CRYPTO_LOCK_BN).
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Change the ENGINE framework to automatically load engines
|
||||
dynamically from specific directories unless they could be
|
||||
found to already be built in or loaded. Move all the
|
||||
current engines except for the cryptodev one to a new
|
||||
directory engines/.
|
||||
The engines in engines/ are built as shared libraries if
|
||||
the "shared" options was given to ./Configure or ./config.
|
||||
Otherwise, they are inserted in libcrypto.a.
|
||||
/usr/local/ssl/engines is the default directory for dynamic
|
||||
engines, but that can be overriden at configure time through
|
||||
the usual use of --prefix and/or --openssldir, and at run
|
||||
time with the environment variable OPENSSL_ENGINES.
|
||||
[Geoff Thorpe and Richard Levitte]
|
||||
|
||||
*) Add Makefile.shared, a helper makefile to build shared
|
||||
libraries. Addapt Makefile.org.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add version info to Win32 DLLs.
|
||||
[Peter 'Luna' Runestig" <peter@runestig.com>]
|
||||
|
||||
*) Add new 'medium level' PKCS#12 API. Certificates and keys
|
||||
can be added using this API to created arbitrary PKCS#12
|
||||
files while avoiding the low level API.
|
||||
|
||||
New options to PKCS12_create(), key or cert can be NULL and
|
||||
will then be omitted from the output file. The encryption
|
||||
algorithm NIDs can be set to -1 for no encryption, the mac
|
||||
iteration count can be set to 0 to omit the mac.
|
||||
|
||||
Enhance pkcs12 utility by making the -nokeys and -nocerts
|
||||
options work when creating a PKCS#12 file. New option -nomac
|
||||
to omit the mac, NONE can be set for an encryption algorithm.
|
||||
New code is modified to use the enhanced PKCS12_create()
|
||||
instead of the low level API.
|
||||
[Steve Henson]
|
||||
|
||||
*) Extend ASN1 encoder to support indefinite length constructed
|
||||
encoding. This can output sequences tags and octet strings in
|
||||
this form. Modify pk7_asn1.c to support indefinite length
|
||||
encoding. This is experimental and needs additional code to
|
||||
be useful, such as an ASN1 bio and some enhanced streaming
|
||||
PKCS#7 code.
|
||||
|
||||
Extend template encode functionality so that tagging is passed
|
||||
down to the template encoder.
|
||||
[Steve Henson]
|
||||
|
||||
*) Let 'openssl req' fail if an argument to '-newkey' is not
|
||||
recognized instead of using RSA as a default.
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Add support for ECC-based ciphersuites from draft-ietf-tls-ecc-01.txt.
|
||||
As these are not official, they are not included in "ALL";
|
||||
the "ECCdraft" ciphersuite group alias can be used to select them.
|
||||
[Vipul Gupta and Sumit Gupta (Sun Microsystems Laboratories)]
|
||||
|
||||
*) Add ECDH engine support.
|
||||
[Nils Gura and Douglas Stebila (Sun Microsystems Laboratories)]
|
||||
|
||||
*) Add ECDH in new directory crypto/ecdh/.
|
||||
[Douglas Stebila (Sun Microsystems Laboratories)]
|
||||
|
||||
*) Let BN_rand_range() abort with an error after 100 iterations
|
||||
without success (which indicates a broken PRNG).
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Change BN_mod_sqrt() so that it verifies that the input value
|
||||
is really the square of the return value. (Previously,
|
||||
BN_mod_sqrt would show GIGO behaviour.)
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Add named elliptic curves over binary fields from X9.62, SECG,
|
||||
and WAP/WTLS; add OIDs that were still missing.
|
||||
|
||||
[Sheueling Chang Shantz and Douglas Stebila
|
||||
(Sun Microsystems Laboratories)]
|
||||
|
||||
*) Extend the EC library for elliptic curves over binary fields
|
||||
(new files ec2_smpl.c, ec2_smpt.c, ec2_mult.c in crypto/ec/).
|
||||
New EC_METHOD:
|
||||
|
||||
EC_GF2m_simple_method
|
||||
|
||||
New API functions:
|
||||
|
||||
EC_GROUP_new_curve_GF2m
|
||||
EC_GROUP_set_curve_GF2m
|
||||
EC_GROUP_get_curve_GF2m
|
||||
EC_POINT_set_affine_coordinates_GF2m
|
||||
EC_POINT_get_affine_coordinates_GF2m
|
||||
EC_POINT_set_compressed_coordinates_GF2m
|
||||
|
||||
Point compression for binary fields is disabled by default for
|
||||
patent reasons (compile with OPENSSL_EC_BIN_PT_COMP defined to
|
||||
enable it).
|
||||
|
||||
As binary polynomials are represented as BIGNUMs, various members
|
||||
of the EC_GROUP and EC_POINT data structures can be shared
|
||||
between the implementations for prime fields and binary fields;
|
||||
the above ..._GF2m functions (except for EX_GROUP_new_curve_GF2m)
|
||||
are essentially identical to their ..._GFp counterparts.
|
||||
(For simplicity, the '..._GFp' prefix has been dropped from
|
||||
various internal method names.)
|
||||
|
||||
An internal 'field_div' method (similar to 'field_mul' and
|
||||
'field_sqr') has been added; this is used only for binary fields.
|
||||
|
||||
[Sheueling Chang Shantz and Douglas Stebila
|
||||
(Sun Microsystems Laboratories)]
|
||||
|
||||
*) Optionally dispatch EC_POINT_mul(), EC_POINT_precompute_mult()
|
||||
through methods ('mul', 'precompute_mult').
|
||||
|
||||
The generic implementations (now internally called 'ec_wNAF_mul'
|
||||
and 'ec_wNAF_precomputed_mult') remain the default if these
|
||||
methods are undefined.
|
||||
|
||||
[Sheueling Chang Shantz and Douglas Stebila
|
||||
(Sun Microsystems Laboratories)]
|
||||
|
||||
*) New function EC_GROUP_get_degree, which is defined through
|
||||
EC_METHOD. For curves over prime fields, this returns the bit
|
||||
length of the modulus.
|
||||
|
||||
[Sheueling Chang Shantz and Douglas Stebila
|
||||
(Sun Microsystems Laboratories)]
|
||||
|
||||
*) New functions EC_GROUP_dup, EC_POINT_dup.
|
||||
(These simply call ..._new and ..._copy).
|
||||
|
||||
[Sheueling Chang Shantz and Douglas Stebila
|
||||
(Sun Microsystems Laboratories)]
|
||||
|
||||
*) Add binary polynomial arithmetic software in crypto/bn/bn_gf2m.c.
|
||||
Polynomials are represented as BIGNUMs (where the sign bit is not
|
||||
used) in the following functions [macros]:
|
||||
|
||||
BN_GF2m_add
|
||||
BN_GF2m_sub [= BN_GF2m_add]
|
||||
BN_GF2m_mod [wrapper for BN_GF2m_mod_arr]
|
||||
BN_GF2m_mod_mul [wrapper for BN_GF2m_mod_mul_arr]
|
||||
BN_GF2m_mod_sqr [wrapper for BN_GF2m_mod_sqr_arr]
|
||||
BN_GF2m_mod_inv
|
||||
BN_GF2m_mod_exp [wrapper for BN_GF2m_mod_exp_arr]
|
||||
BN_GF2m_mod_sqrt [wrapper for BN_GF2m_mod_sqrt_arr]
|
||||
BN_GF2m_mod_solve_quad [wrapper for BN_GF2m_mod_solve_quad_arr]
|
||||
BN_GF2m_cmp [= BN_ucmp]
|
||||
|
||||
(Note that only the 'mod' functions are actually for fields GF(2^m).
|
||||
BN_GF2m_add() is misnomer, but this is for the sake of consistency.)
|
||||
|
||||
For some functions, an the irreducible polynomial defining a
|
||||
field can be given as an 'unsigned int[]' with strictly
|
||||
decreasing elements giving the indices of those bits that are set;
|
||||
i.e., p[] represents the polynomial
|
||||
f(t) = t^p[0] + t^p[1] + ... + t^p[k]
|
||||
where
|
||||
p[0] > p[1] > ... > p[k] = 0.
|
||||
This applies to the following functions:
|
||||
|
||||
BN_GF2m_mod_arr
|
||||
BN_GF2m_mod_mul_arr
|
||||
BN_GF2m_mod_sqr_arr
|
||||
BN_GF2m_mod_inv_arr [wrapper for BN_GF2m_mod_inv]
|
||||
BN_GF2m_mod_div_arr [wrapper for BN_GF2m_mod_div]
|
||||
BN_GF2m_mod_exp_arr
|
||||
BN_GF2m_mod_sqrt_arr
|
||||
BN_GF2m_mod_solve_quad_arr
|
||||
BN_GF2m_poly2arr
|
||||
BN_GF2m_arr2poly
|
||||
|
||||
Conversion can be performed by the following functions:
|
||||
|
||||
BN_GF2m_poly2arr
|
||||
BN_GF2m_arr2poly
|
||||
|
||||
bntest.c has additional tests for binary polynomial arithmetic.
|
||||
|
||||
Two implementations for BN_GF2m_mod_div() are available.
|
||||
The default algorithm simply uses BN_GF2m_mod_inv() and
|
||||
BN_GF2m_mod_mul(). The alternative algorithm is compiled in only
|
||||
if OPENSSL_SUN_GF2M_DIV is defined (patent pending; read the
|
||||
copyright notice in crypto/bn/bn_gf2m.c before enabling it).
|
||||
|
||||
[Sheueling Chang Shantz and Douglas Stebila
|
||||
(Sun Microsystems Laboratories)]
|
||||
|
||||
*) Add new error code 'ERR_R_DISABLED' that can be used when some
|
||||
functionality is disabled at compile-time.
|
||||
[Douglas Stebila <douglas.stebila@sun.com>]
|
||||
|
||||
*) Change default behaviour of 'openssl asn1parse' so that more
|
||||
information is visible when viewing, e.g., a certificate:
|
||||
|
||||
Modify asn1_parse2 (crypto/asn1/asn1_par.c) so that in non-'dump'
|
||||
mode the content of non-printable OCTET STRINGs is output in a
|
||||
style similar to INTEGERs, but with '[HEX DUMP]' prepended to
|
||||
avoid the appearance of a printable string.
|
||||
[Nils Larsch <nla@trustcenter.de>]
|
||||
|
||||
*) Add 'asn1_flag' and 'asn1_form' member to EC_GROUP with access
|
||||
functions
|
||||
EC_GROUP_set_asn1_flag()
|
||||
EC_GROUP_get_asn1_flag()
|
||||
EC_GROUP_set_point_conversion_form()
|
||||
EC_GROUP_get_point_conversion_form()
|
||||
These control ASN1 encoding details:
|
||||
- Curves (i.e., groups) are encoded explicitly unless asn1_flag
|
||||
has been set to OPENSSL_EC_NAMED_CURVE.
|
||||
- Points are encoded in uncompressed form by default; options for
|
||||
asn1_for are as for point2oct, namely
|
||||
POINT_CONVERSION_COMPRESSED
|
||||
POINT_CONVERSION_UNCOMPRESSED
|
||||
POINT_CONVERSION_HYBRID
|
||||
|
||||
Also add 'seed' and 'seed_len' members to EC_GROUP with access
|
||||
functions
|
||||
EC_GROUP_set_seed()
|
||||
EC_GROUP_get0_seed()
|
||||
EC_GROUP_get_seed_len()
|
||||
This is used only for ASN1 purposes (so far).
|
||||
[Nils Larsch <nla@trustcenter.de>]
|
||||
|
||||
*) Add 'field_type' member to EC_METHOD, which holds the NID
|
||||
of the appropriate field type OID. The new function
|
||||
EC_METHOD_get_field_type() returns this value.
|
||||
[Nils Larsch <nla@trustcenter.de>]
|
||||
|
||||
*) Add functions
|
||||
EC_POINT_point2bn()
|
||||
EC_POINT_bn2point()
|
||||
EC_POINT_point2hex()
|
||||
EC_POINT_hex2point()
|
||||
providing useful interfaces to EC_POINT_point2oct() and
|
||||
EC_POINT_oct2point().
|
||||
[Nils Larsch <nla@trustcenter.de>]
|
||||
|
||||
*) Change internals of the EC library so that the functions
|
||||
EC_GROUP_set_generator()
|
||||
EC_GROUP_get_generator()
|
||||
EC_GROUP_get_order()
|
||||
EC_GROUP_get_cofactor()
|
||||
are implemented directly in crypto/ec/ec_lib.c and not dispatched
|
||||
to methods, which would lead to unnecessary code duplication when
|
||||
adding different types of curves.
|
||||
[Nils Larsch <nla@trustcenter.de> with input by Bodo Moeller]
|
||||
|
||||
*) Implement compute_wNAF (crypto/ec/ec_mult.c) without BIGNUM
|
||||
arithmetic, and such that modified wNAFs are generated
|
||||
(which avoid length expansion in many cases).
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Add a function EC_GROUP_check_discriminant() (defined via
|
||||
EC_METHOD) that verifies that the curve discriminant is non-zero.
|
||||
|
||||
Add a function EC_GROUP_check() that makes some sanity tests
|
||||
on a EC_GROUP, its generator and order. This includes
|
||||
EC_GROUP_check_discriminant().
|
||||
[Nils Larsch <nla@trustcenter.de>]
|
||||
|
||||
*) Add ECDSA in new directory crypto/ecdsa/.
|
||||
|
||||
Add applications 'openssl ecparam' and 'openssl ecdsa'
|
||||
(these are based on 'openssl dsaparam' and 'openssl dsa').
|
||||
|
||||
ECDSA support is also included in various other files across the
|
||||
library. Most notably,
|
||||
- 'openssl req' now has a '-newkey ecdsa:file' option;
|
||||
- EVP_PKCS82PKEY (crypto/evp/evp_pkey.c) now can handle ECDSA;
|
||||
- X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and
|
||||
d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make
|
||||
them suitable for ECDSA where domain parameters must be
|
||||
extracted before the specific public key;
|
||||
- ECDSA engine support has been added.
|
||||
[Nils Larsch <nla@trustcenter.de>]
|
||||
|
||||
*) Include some named elliptic curves, and add OIDs from X9.62,
|
||||
SECG, and WAP/WTLS. Each curve can be obtained from the new
|
||||
function
|
||||
EC_GROUP_new_by_nid(),
|
||||
and the list of available named curves can be obtained with
|
||||
EC_get_builtin_curves().
|
||||
Also add a 'curve_name' member to EC_GROUP objects, which can be
|
||||
accessed via
|
||||
EC_GROUP_set_nid()
|
||||
EC_GROUP_get_nid()
|
||||
[Nils Larsch <nla@trustcenter.de, Bodo Moeller]
|
||||
|
||||
*) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there
|
||||
was actually never needed) and in BN_mul(). The removal in BN_mul()
|
||||
required a small change in bn_mul_part_recursive() and the addition
|
||||
of the functions bn_cmp_part_words(), bn_sub_part_words() and
|
||||
bn_add_part_words(), which do the same thing as bn_cmp_words(),
|
||||
bn_sub_words() and bn_add_words() except they take arrays with
|
||||
differing sizes.
|
||||
[Richard Levitte]
|
||||
|
||||
Changes between 0.9.7e and 0.9.7f [XX xxx XXXX]
|
||||
|
||||
*) Add lots of checks for memory allocation failure, error codes to indicate
|
||||
failure and freeing up memory if a failure occurs.
|
||||
[Nauticus Networks SSL Team <openssl@nauticusnet.com>, Steve Henson]
|
||||
|
||||
33
FAQ
33
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.7f was released on March 22, 2005.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@@ -152,8 +152,7 @@ Use MD5 to check that a tarball from a mirror site is identical:
|
||||
md5sum TARBALL | awk '{print $1;}' | cmp - TARBALL.md5
|
||||
|
||||
You can check authenticity using pgp or gpg. You need the OpenSSL team
|
||||
member public key used to sign it (download it from a key server, see a
|
||||
list of keys at <URL: http://www.openssl.org/about/>). Then
|
||||
member public key used to sign it (download it from a key server). Then
|
||||
just do:
|
||||
|
||||
pgp TARBALL.asc
|
||||
@@ -463,7 +462,7 @@ get the best result from OpenSSL. A bit more complicated solution is the
|
||||
following:
|
||||
|
||||
----- snip:start -----
|
||||
make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \
|
||||
make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile | \
|
||||
sed -e 's/ -O[0-9] / -O0 /'`"
|
||||
rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
|
||||
make
|
||||
@@ -473,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"?
|
||||
|
||||
@@ -652,26 +655,26 @@ built OpenSSL with /MD your application must use /MD and cannot use /MDd.
|
||||
* How do I read or write a DER encoded buffer using the ASN1 functions?
|
||||
|
||||
You have two options. You can either use a memory BIO in conjunction
|
||||
with the i2d_*_bio() or d2i_*_bio() functions or you can use the
|
||||
i2d_*(), d2i_*() functions directly. Since these are often the
|
||||
with the i2d_XXX_bio() or d2i_XXX_bio() functions or you can use the
|
||||
i2d_XXX(), d2i_XXX() functions directly. Since these are often the
|
||||
cause of grief here are some code fragments using PKCS7 as an example:
|
||||
|
||||
unsigned char *buf, *p;
|
||||
int len;
|
||||
unsigned char *buf, *p;
|
||||
int len;
|
||||
|
||||
len = i2d_PKCS7(p7, NULL);
|
||||
buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */
|
||||
p = buf;
|
||||
i2d_PKCS7(p7, &p);
|
||||
len = i2d_PKCS7(p7, NULL);
|
||||
buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */
|
||||
p = buf;
|
||||
i2d_PKCS7(p7, &p);
|
||||
|
||||
At this point buf contains the len bytes of the DER encoding of
|
||||
p7.
|
||||
|
||||
The opposite assumes we already have len bytes in buf:
|
||||
|
||||
unsigned char *p;
|
||||
p = buf;
|
||||
p7 = d2i_PKCS7(NULL, &p, len);
|
||||
unsigned char *p;
|
||||
p = buf;
|
||||
p7 = d2i_PKCS7(NULL, &p, len);
|
||||
|
||||
At this point p7 contains a valid PKCS7 structure of NULL if an error
|
||||
occurred. If an error occurred ERR_print_errors(bio) should give more
|
||||
|
||||
10
INSTALL
10
INSTALL
@@ -2,10 +2,8 @@
|
||||
INSTALLATION ON THE UNIX PLATFORM
|
||||
---------------------------------
|
||||
|
||||
[Installation on DOS (with djgpp), Windows, OpenVMS, MacOS (before MacOS X)
|
||||
and NetWare is described in INSTALL.DJGPP, INSTALL.W32, INSTALL.VMS,
|
||||
INSTALL.MacOS and INSTALL.NW.
|
||||
|
||||
[Installation on DOS (with djgpp), Windows, OpenVMS and MacOS (before MacOS X)
|
||||
is described in INSTALL.DJGPP, INSTALL.W32, INSTALL.VMS and INSTALL.MacOS.
|
||||
This document describes installation on operating systems in the Unix
|
||||
family.]
|
||||
|
||||
@@ -125,7 +123,7 @@
|
||||
generic configurations "cc" or "gcc" should usually work on 32 bit
|
||||
systems.
|
||||
|
||||
Configure creates the file Makefile.ssl from Makefile.org and
|
||||
Configure creates the file Makefile from Makefile.org and
|
||||
defines various macros in crypto/opensslconf.h (generated from
|
||||
crypto/opensslconf.h.in).
|
||||
|
||||
@@ -161,7 +159,7 @@
|
||||
the failure that isn't a problem in OpenSSL itself (like a missing
|
||||
or malfunctioning bc). If it is a problem with OpenSSL itself,
|
||||
try removing any compiler optimization flags from the CFLAG line
|
||||
in Makefile.ssl and run "make clean; make". Please send a bug
|
||||
in Makefile and run "make clean; make". Please send a bug
|
||||
report to <openssl-bugs@openssl.org>, including the output of
|
||||
"make report" in order to be added to the request tracker at
|
||||
http://www.openssl.org/support/rt2.html.
|
||||
|
||||
@@ -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".
|
||||
|
||||
436
INSTALL.NW
436
INSTALL.NW
@@ -1,436 +0,0 @@
|
||||
|
||||
INSTALLATION ON THE NETWARE PLATFORM
|
||||
------------------------------------
|
||||
|
||||
Notes about building OpenSSL for NetWare.
|
||||
|
||||
|
||||
BUILD PLATFORM:
|
||||
---------------
|
||||
The build scripts (batch files, perl scripts, etc) have been developed and
|
||||
tested on W2K. The scripts should run fine on other Windows
|
||||
platforms (NT, Win9x, WinXP) but they haven't been tested. They may require
|
||||
some modifications.
|
||||
|
||||
|
||||
Supported NetWare Platforms - NetWare 5.x, NetWare 6.x:
|
||||
------------------------------------------
|
||||
OpenSSL uses the WinSock interfaces introduced in NetWare 5. Therefore,
|
||||
previous versions of NetWare, 4.x and 3.x, are not supported.
|
||||
|
||||
On NetWare there are two c-runtime libraries. There is the legacy CLIB
|
||||
interfaces and the newer LibC interfaces. Being ANSI-C libraries, the
|
||||
functionality in CLIB and LibC is similar but the LibC interfaces are built
|
||||
using Novell Kernal Services (NKS) which is designed to leverage
|
||||
multi-processor environments.
|
||||
|
||||
The NetWare port of OpenSSL can configured to build using CLIB or LibC. The
|
||||
CLIB build was developed and tested using NetWare 5.0 sp6.0a. The LibC
|
||||
build was developed and tested using the NetWare 6.0 FCS.
|
||||
|
||||
The necessary LibC functionality ships with NetWare 6. However, earlier
|
||||
NetWare 5.x versions will require updates in order to run the OpenSSL LibC
|
||||
build.
|
||||
|
||||
|
||||
REQUIRED TOOLS:
|
||||
---------------
|
||||
Based upon the configuration and build options used, some or all of the
|
||||
following tools may be required:
|
||||
|
||||
|
||||
* Perl for Win32 - required (http://www.activestate.com/ActivePerl)
|
||||
Used to run the various perl scripts on the build platform.
|
||||
|
||||
|
||||
* Perl 5.8.0 for NetWare v3.20 (or later) - required
|
||||
(http://developer.novell.com) Used to run the test script on NetWare
|
||||
after building.
|
||||
|
||||
|
||||
* Metrowerks CodeWarrior PDK 2.1 (or later) for NetWare - required:
|
||||
Provides command line tools used for building.
|
||||
|
||||
Tools:
|
||||
mwccnlm.exe - C/C++ Compiler for NetWare
|
||||
mwldnlm.exe - Linker for NetWare
|
||||
mwasmnlm.exe - x86 assembler for NetWare (if using assembly option)
|
||||
|
||||
|
||||
* Assemblers - optional:
|
||||
If you intend to build using the assembly options you will need an
|
||||
assembler. Work has been completed to support two assemblers, Metrowerks
|
||||
and NASM. However, during development, a bug was found in the Metrowerks
|
||||
assembler which generates incorrect code. Until this problem is fixed,
|
||||
the Metrowerks assembler cannot be used.
|
||||
|
||||
mwasmnlm.exe - Metrowerks x86 assembler - part of CodeWarrior tools.
|
||||
(version 2.2 Built Aug 23, 1999 - not useable due to code
|
||||
generation bug)
|
||||
|
||||
nasmw.exe - Netwide Assembler NASM
|
||||
version 0.98 was used in development and testing
|
||||
|
||||
* Make Tool - required:
|
||||
In order to build you will need a make tool. Two make tools are
|
||||
supported, GNU make (gmake.exe) or Microsoft nmake.exe.
|
||||
|
||||
gmake.exe - GNU make for Windows (version 3.75 used for development)
|
||||
http://www.gnu.org/software/make/make.html
|
||||
|
||||
nmake.exe - Microsoft make (Version 6.00.8168.0 used for development)
|
||||
|
||||
|
||||
* Novell Developer Kit (NDK) - required: (http://developer.novell.com)
|
||||
|
||||
CLIB - BUILDS:
|
||||
|
||||
WinSock2 Developer Components for NetWare:
|
||||
For initial development, the October 27, 2000 version was used.
|
||||
However, future versions should also work.
|
||||
|
||||
NOTE: The WinSock2 components include headers & import files for
|
||||
NetWare, but you will also need the winsock2.h and supporting
|
||||
headers (pshpack4.h, poppack.h, qos.h) delivered in the
|
||||
Microsoft SDK. Note: The winsock2.h support headers may change
|
||||
with various versions of winsock2.h. Check the dependencies
|
||||
section on the NDK WinSock2 download page for the latest
|
||||
information on dependencies.
|
||||
|
||||
|
||||
NLM and NetWare libraries for C (including CLIB and XPlat):
|
||||
If you are going to build a CLIB version of OpenSSL, you will
|
||||
need the CLIB headers and imports. The March, 2001 NDK release or
|
||||
later is recommended.
|
||||
|
||||
Earlier versions should work but haven't been tested. In recent
|
||||
versions the import files have been consolidated and function
|
||||
names moved. This means you may run into link problems
|
||||
(undefined symbols) when using earlier versions. The functions
|
||||
are available in earlier versions, but you will have to modifiy
|
||||
the make files to include additional import files (see
|
||||
openssl\util\pl\netware.pl).
|
||||
|
||||
|
||||
LIBC - BUILDS:
|
||||
|
||||
Libraries for C (LibC) - LibC headers and import files
|
||||
If you are going to build a LibC version of OpenSSL, you will
|
||||
need the LibC headers and imports. The March 14, 2002 NDK release or
|
||||
later is required.
|
||||
|
||||
NOTE: The LibC SDK includes the necessary WinSock2 support. It
|
||||
It is not necessary to download the WinSock2 Developer when building
|
||||
for LibC.
|
||||
|
||||
|
||||
BUILDING:
|
||||
---------
|
||||
Before building, you will need to set a few environment variables. You can
|
||||
set them manually or you can modify the "netware\set_env.bat" file.
|
||||
|
||||
The set_env.bat file is a template you can use to set up the path
|
||||
and environment variables you will need to build. Modify the
|
||||
various lines to point to YOUR tools and run set_env.bat.
|
||||
|
||||
netware\set_env.bat [target]
|
||||
|
||||
target - "netware-clib" - CLib NetWare build
|
||||
- "netware-libc" - LibC NetWare build
|
||||
|
||||
If you don't use set_env.bat, you will need to set up the following
|
||||
environment variables:
|
||||
|
||||
path - Set path to point to the tools you will use.
|
||||
|
||||
MWCIncludes - The location of the NDK include files.
|
||||
|
||||
CLIB ex: set MWCIncludes=c:\ndk\nwsdk\include\nlm
|
||||
LibC ex: set MWCIncludes=c:\ndk\libc\include
|
||||
|
||||
PRELUDE - The absolute path of the prelude object to link with. For
|
||||
a CLIB build it is recommended you use the "clibpre.o" files shipped
|
||||
with the Metrowerks PDK for NetWare. For a LibC build you should
|
||||
use the "libcpre.o" file delivered with the LibC NDK components.
|
||||
|
||||
CLIB ex: set PRELUDE=c:\ndk\nwsdk\imports\clibpre.o
|
||||
LibC ex: set PRELUDE=c:\ndk\libc\imports\libcpre.o
|
||||
|
||||
IMPORTS - The locaton of the NDK import files.
|
||||
|
||||
CLIB ex: set IMPORTS=c:\ndk\nwsdk\imports
|
||||
LibC ex: set IMPORTS=c:\ndk\libc\imports
|
||||
|
||||
|
||||
In order to build, you need to run the Perl scripts to configure the build
|
||||
process and generate a make file. There is a batch file,
|
||||
"netware\build.bat", to automate the process.
|
||||
|
||||
Build.bat runs the build configuration scripts and generates a make file.
|
||||
If an assembly option is specified, it also runs the scripts to generate
|
||||
the assembly code. Always run build.bat from the "openssl" directory.
|
||||
|
||||
netware\build [target] [debug opts] [assembly opts] [configure opts]
|
||||
|
||||
target - "netware-clib" - CLib NetWare build
|
||||
- "netware-libc" - LibC NetWare build
|
||||
|
||||
debug opts - "debug" - build debug
|
||||
|
||||
assembly opts - "nw-mwasm" - use Metrowerks assembler
|
||||
"nw-nasm" - use NASM assembler
|
||||
"no-asm" - don't use assembly
|
||||
|
||||
configure opts- all unrecognized arguments are passed to the
|
||||
perl configure script
|
||||
|
||||
examples:
|
||||
|
||||
CLIB build, debug, without assembly:
|
||||
netware\build.bat netware-clib debug no-asm
|
||||
|
||||
LibC build, non-debug, using NASM assembly:
|
||||
netware\build.bat netware-libc nw-nasm
|
||||
|
||||
Running build.bat generates a make file to be processed by your make
|
||||
tool (gmake or nmake):
|
||||
|
||||
CLIB ex: gmake -f netware\nlm_clib.mak
|
||||
LibC ex: gmake -f netware\nlm_libc.mak
|
||||
|
||||
|
||||
You can also run the build scripts manually if you do not want to use the
|
||||
build.bat file. Run the following scripts in the "\openssl"
|
||||
subdirectory (in the order listed below):
|
||||
|
||||
perl configure no-asm [other config opts] [netware-clib|netware-libc]
|
||||
configures no assembly build for specified netware environment
|
||||
(CLIB or LibC).
|
||||
|
||||
perl util\mkfiles.pl >MINFO
|
||||
generates a listing of source files (used by mk1mf)
|
||||
|
||||
perl util\mk1mf.pl no-asm [other config opts] [netware-clib|netware-libc >netware\nlm.mak
|
||||
generates the makefile for NetWare
|
||||
|
||||
gmake -f netware\nlm.mak
|
||||
build with the make tool (nmake.exe also works)
|
||||
|
||||
NOTE: If you are building using the assembly option, you must also run the
|
||||
various Perl scripts to generate the assembly files. See build.bat
|
||||
for an example of running the various assembly scripts. You must use the
|
||||
"no-asm" option to build without assembly. The configure and mk1mf scripts
|
||||
also have various other options. See the scripts for more information.
|
||||
|
||||
|
||||
The output from the build is placed in the following directories:
|
||||
|
||||
CLIB Debug build:
|
||||
out_nw_clib.dbg - static libs & test nlm(s)
|
||||
tmp_nw_clib.dbg - temporary build files
|
||||
outinc_nw_clib - necessary include files
|
||||
|
||||
CLIB Non-debug build:
|
||||
out_nw_clib - static libs & test nlm(s)
|
||||
tmp_nw_clib - temporary build files
|
||||
outinc_nw_clib - necesary include files
|
||||
|
||||
LibC Debug build:
|
||||
out_nw_libc.dbg - static libs & test nlm(s)
|
||||
tmp_nw_libc.dbg - temporary build files
|
||||
outinc_nw_libc - necessary include files
|
||||
|
||||
LibC Non-debug build:
|
||||
out_nw_libc - static libs & test nlm(s)
|
||||
tmp_nw_libc - temporary build files
|
||||
outinc_nw_libc - necesary include files
|
||||
|
||||
|
||||
TESTING:
|
||||
--------
|
||||
The build process creates the OpenSSL static libs ( crypto.lib, ssl.lib,
|
||||
rsaglue.lib ) and several test programs. You should copy the test programs
|
||||
to your NetWare server and run the tests.
|
||||
|
||||
The batch file "netware\cpy_tests.bat" will copy all the necessary files
|
||||
to your server for testing. In order to run the batch file, you need a
|
||||
drive mapped to your target server. It will create an "OpenSSL" directory
|
||||
on the drive and copy the test files to it. CAUTION: If a directory with the
|
||||
name of "OpenSSL" already exists, it will be deleted.
|
||||
|
||||
To run cpy_tests.bat:
|
||||
|
||||
netware\cpy_tests [output directory] [NetWare drive]
|
||||
|
||||
output directory - "out_nw_clib.dbg", "out_nw_libc", etc.
|
||||
NetWare drive - drive letter of mapped drive
|
||||
|
||||
CLIB ex: netware\cpy_tests out_nw_clib m:
|
||||
LibC ex: netware\cpy_tests out_nw_libc m:
|
||||
|
||||
|
||||
The Perl script, "do_tests.pl", in the "OpenSSL" directory on the server
|
||||
should be used to execute the tests. Before running the script, make sure
|
||||
your SEARCH PATH includes the "OpenSSL" directory. For example, if you
|
||||
copied the files to the "sys:" volume you use the command:
|
||||
|
||||
SEARCH ADD SYS:\OPENSSL
|
||||
|
||||
|
||||
To run do_tests.pl type (at the console prompt):
|
||||
|
||||
perl \openssl\do_tests.pl [options]
|
||||
|
||||
options:
|
||||
-p - pause after executing each test
|
||||
|
||||
The do_tests.pl script generates a log file "\openssl\test_out\tests.log"
|
||||
which should be reviewed for errors. Any errors will be denoted by the word
|
||||
"ERROR" in the log.
|
||||
|
||||
NOTE: Currently (11/2002), the LibC test nlms report an error while loading
|
||||
when launched from the perl script (do_tests.pl). The problems are
|
||||
being addressed by the LibC development team and should be fixed in the
|
||||
next release. Until the problems are corrected, the LibC test nlms
|
||||
will have to be executed manually.
|
||||
|
||||
|
||||
DEVELOPING WITH THE OPENSSL SDK:
|
||||
--------------------------------
|
||||
Now that everything is built and tested, you are ready to use the OpenSSL
|
||||
libraries in your development.
|
||||
|
||||
There is no real installation procedure, just copy the static libs and
|
||||
headers to your build location. The libs (crypto.lib & ssl.lib) are
|
||||
located in the appropriate "out_nw_XXXX" directory
|
||||
(out_nw_clib, out_nw_libc, etc).
|
||||
|
||||
The headers are located in the appropriate "outinc_nw_XXX" directory
|
||||
(outinc_nw_clib, outinc_nw_libc).
|
||||
|
||||
One suggestion is to create the following directory
|
||||
structure for the OpenSSL SDK:
|
||||
|
||||
\openssl
|
||||
|- bin
|
||||
| |- openssl.nlm
|
||||
| |- (other tests you want)
|
||||
|
|
||||
|- lib
|
||||
| | - crypto.lib
|
||||
| | - ssl.lib
|
||||
|
|
||||
|- include
|
||||
| | - openssl
|
||||
| | | - (all the headers in "outinc_nw\openssl")
|
||||
|
||||
|
||||
The program "openssl.nlm" can be very useful. It has dozens of
|
||||
options and you may want to keep it handy for debugging, testing, etc.
|
||||
|
||||
When building your apps using OpenSSL, define "NETWARE". It is needed by
|
||||
some of the OpenSSL headers. One way to do this is with a compile option,
|
||||
for example "-DNETWARE".
|
||||
|
||||
|
||||
|
||||
NOTES:
|
||||
------
|
||||
|
||||
Resource leaks in Tests
|
||||
------------------------
|
||||
Some OpenSSL tests do not clean up resources and NetWare reports
|
||||
the resource leaks when the tests unload. If this really bugs you,
|
||||
you can stop the messages by setting the developer option off at the console
|
||||
prompt (set developer option = off). Or better yet, fix the tests to
|
||||
clean up the resources!
|
||||
|
||||
|
||||
Multi-threaded Development
|
||||
---------------------------
|
||||
The NetWare version of OpenSSL is thread-safe however, multi-threaded
|
||||
applications must provide the necessary locking function callbacks. This
|
||||
is described in doc\threads.doc. The file "openssl\crypto\threads\mttest.c"
|
||||
is a multi-threaded test program and demonstrates the locking functions.
|
||||
|
||||
|
||||
What is openssl2.nlm?
|
||||
---------------------
|
||||
The openssl program has numerous options and can be used for many different
|
||||
things. Many of the options operate in an interactive mode requiring the
|
||||
user to enter data. Because of this, a default screen is created for the
|
||||
program. However, when running the test script it is not desirable to
|
||||
have a seperate screen. Therefore, the build also creates openssl2.nlm.
|
||||
Openssl2.nlm is functionally identical but uses the console screen.
|
||||
Openssl2 can be used when a non-interactive mode is desired.
|
||||
|
||||
NOTE: There are may other possibilities (command line options, etc)
|
||||
which could have been used to address the screen issue. The openssl2.nlm
|
||||
option was chosen because it impacted only the build not the code.
|
||||
|
||||
|
||||
Why only static libraries?
|
||||
--------------------------
|
||||
Globals, globals, and more globals. The OpenSSL code uses many global
|
||||
variables that are allocated and initialized when used for the first time.
|
||||
|
||||
On NetWare, most applications (at least historically) run in the kernel.
|
||||
When running in the kernel, there is one instance of global variables.
|
||||
For regular application type NLM(s) this isn't a problem because they are
|
||||
the only ones using the globals. However, for a library NLM (an NLM which
|
||||
exposes functions and has no threads of execution), the globals cause
|
||||
problems. Applications could inadvertently step on each other if they
|
||||
change some globals. Even worse, the first application that triggers a
|
||||
global to be allocated and initialized has the allocated memory charged to
|
||||
itself. Now when that application unloads, NetWare will clean up all the
|
||||
applicaton's memory. The global pointer variables inside OpenSSL now
|
||||
point to freed memory. An abend waiting to happen!
|
||||
|
||||
To work correctly in the kernel, library NLM(s) that use globals need to
|
||||
provide a set of globals (instance data) for each application. Another
|
||||
option is to require the library only be loaded in a protected address
|
||||
space along with the application using it.
|
||||
|
||||
Modifying the OpenSSL code to provide a set of globals (instance data) for
|
||||
each application isn't technically difficult, but due to the large number
|
||||
globals it would require substantial code changes and it wasn't done. Hence,
|
||||
the build currently only builds static libraries which are then linked
|
||||
into each application.
|
||||
|
||||
NOTE: If you are building a library NLM that uses the OpenSSL static
|
||||
libraries, you will still have to deal with the global variable issue.
|
||||
This is because when you link in the OpenSSL code you bring in all the
|
||||
globals. One possible solution for the global pointer variables is to
|
||||
register memory functions with OpenSSL which allocate memory and charge it
|
||||
to your library NLM (see the function CRYPTO_set_mem_functions). However,
|
||||
be aware that now all memory allocated by OpenSSL is charged to your NLM.
|
||||
|
||||
|
||||
CodeWarrior Tools and W2K
|
||||
---------------------------
|
||||
There have been problems reported with the CodeWarrior Linker
|
||||
(mwldnlm.exe) in the PDK 2.1 for NetWare when running on Windows 2000. The
|
||||
problems cause the link step to fail. The only work around is to obtain an
|
||||
updated linker from Metrowerks. It is expected Metrowerks will release
|
||||
PDK 3.0 (in beta testing at this time - May, 2001) in the near future which
|
||||
will fix these problems.
|
||||
|
||||
|
||||
Makefile "vclean"
|
||||
------------------
|
||||
The generated makefile has a "vclean" target which cleans up the build
|
||||
directories. If you have been building successfully and suddenly
|
||||
experience problems, use "vclean" (gmake -f netware\nlm.mak vclean) and retry.
|
||||
|
||||
|
||||
"Undefined Symbol" Linker errors
|
||||
--------------------------------
|
||||
There have been linker errors reported when doing a CLIB build. The problems
|
||||
occur because some versions of the CLIB SDK import files inadvertently
|
||||
left out some symbols. One symbol in particular is "_lrotl". The missing
|
||||
functions are actually delivered in the binaries, but they were left out of
|
||||
the import files. The issues should be fixed in the September 2001 release
|
||||
of the NDK. If you experience the problems you can temporarily
|
||||
work around it by manually adding the missing symbols to your version of
|
||||
"clib.imp".
|
||||
|
||||
13
INSTALL.W32
13
INSTALL.W32
@@ -46,12 +46,13 @@
|
||||
http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
|
||||
The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
|
||||
|
||||
Firstly you should run Configure:
|
||||
Firstly you should run Configure (to build a FIPS-certified variant of
|
||||
OpenSSL, add the option "fips"):
|
||||
|
||||
> perl Configure VC-WIN32
|
||||
|
||||
Next you need to build the Makefiles and optionally the assembly language
|
||||
files:
|
||||
files (to build a FIPS-certified variant of OpenSSL, add the argument "fips"):
|
||||
|
||||
- If you are using MASM then run:
|
||||
|
||||
@@ -100,10 +101,12 @@
|
||||
Borland C++ builder 5
|
||||
---------------------
|
||||
|
||||
* Configure for building with Borland Builder:
|
||||
* Configure for building with Borland Builder (to build a FIPS-certified
|
||||
variant of OpenSSL, add the option "fips"):
|
||||
> perl Configure BC-32
|
||||
|
||||
* Create the appropriate makefile
|
||||
* Create the appropriate makefile (to build a FIPS-certified variant of
|
||||
OpenSSL, add the argument "fips")
|
||||
> ms\do_nasm
|
||||
|
||||
* Build
|
||||
@@ -194,6 +197,8 @@
|
||||
occur, try
|
||||
> ms\mingw32 no-asm
|
||||
instead.
|
||||
If you want to build a FIPS-certified variant of OpenSSL, add the argument
|
||||
"fips"
|
||||
|
||||
libcrypto.a and libssl.a are the static libraries. To use the DLLs,
|
||||
link with libeay32.a and libssl32.a instead.
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -12,7 +12,7 @@
|
||||
---------------
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1998-2004 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
|
||||
|
||||
579
Makefile.org
579
Makefile.org
@@ -80,13 +80,6 @@ MAKEDEPPROG=makedepend
|
||||
AS=$(CC) -c
|
||||
ASFLAG=$(CFLAG)
|
||||
|
||||
# For x86 assembler: Set PROCESSOR to 386 if you want to support
|
||||
# the 80386.
|
||||
PROCESSOR=
|
||||
|
||||
# CPUID module collects small commonly used assembler snippets
|
||||
CPUID_OBJ=
|
||||
|
||||
# Set BN_ASM to bn_asm.o if you want to use the C version
|
||||
BN_ASM= bn_asm.o
|
||||
#BN_ASM= bn_asm.o
|
||||
@@ -102,8 +95,13 @@ BN_ASM= bn_asm.o
|
||||
#BN_ASM= asm/x86w16.o # 16 bit code for Windows 3.1/DOS
|
||||
#BN_ASM= asm/x86w32.o # 32 bit code for Windows 3.1
|
||||
|
||||
# For x86 assembler: Set PROCESSOR to 386 if you want to support
|
||||
# the 80386.
|
||||
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
|
||||
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
|
||||
@@ -111,8 +109,6 @@ DES_ENC= asm/dx86-out.o asm/yx86-out.o
|
||||
#DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD
|
||||
#DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi
|
||||
|
||||
AES_ASM_OBJ=
|
||||
|
||||
# Set BF_ENC to bf_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
BF_ENC= asm/bx86-out.o
|
||||
@@ -158,6 +154,7 @@ MD5_ASM_OBJ= asm/mx86-out.o
|
||||
|
||||
# Also need SHA1_ASM defined
|
||||
SHA1_ASM_OBJ= asm/sx86-out.o
|
||||
FIPS_SHA1_ASM_OBJ= asm/sx86-out.o
|
||||
#SHA1_ASM_OBJ= asm/sx86-elf.o # elf
|
||||
#SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
|
||||
#SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
|
||||
@@ -174,26 +171,28 @@ RMD160_ASM_OBJ= asm/rm86-out.o
|
||||
KRB5_INCLUDES=
|
||||
LIBKRB5=
|
||||
|
||||
DIRS= crypto ssl engines apps test tools
|
||||
# When we're prepared to use shared libraries in the programs we link here
|
||||
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
||||
SHLIB_MARK=
|
||||
|
||||
DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools
|
||||
SHLIBDIRS= crypto ssl
|
||||
|
||||
# dirs in crypto to build
|
||||
SDIRS= \
|
||||
objects \
|
||||
SDIRS= objects \
|
||||
md2 md4 md5 sha mdc2 hmac ripemd \
|
||||
des rc2 rc4 rc5 idea bf cast \
|
||||
bn ec rsa dsa ecdsa dh ecdh dso engine aes \
|
||||
bn ec rsa dsa dh dso engine aes \
|
||||
buffer bio stack lhash rand err \
|
||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
|
||||
store
|
||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
||||
|
||||
FDIRS= sha1 rand des aes dsa rsa dh
|
||||
|
||||
# tests to perform. "alltests" is a special word indicating that all tests
|
||||
# should be performed.
|
||||
TESTS = alltests
|
||||
|
||||
MAKEFILE= Makefile.ssl
|
||||
NEWMAKE= make
|
||||
MAKE= $(NEWMAKE) -f Makefile.ssl
|
||||
MAKEFILE= Makefile
|
||||
|
||||
MANDIR=$(OPENSSLDIR)/man
|
||||
MAN1=1
|
||||
@@ -206,6 +205,7 @@ ONEDIRS=out tmp
|
||||
EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
||||
WDIRS= windows
|
||||
LIBS= libcrypto.a libssl.a
|
||||
SIGS= libcrypto.a.sha1
|
||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||
SHARED_LIBS=
|
||||
@@ -220,63 +220,45 @@ WTARFILE= $(NAME)-win.tar
|
||||
EXHEADER= e_os2.h
|
||||
HEADER= e_os.h
|
||||
|
||||
all: Makefile.ssl build_all openssl.pc
|
||||
# When we're prepared to use shared libraries in the programs we link here
|
||||
# we might remove 'clean-shared' from the targets to perform at this stage
|
||||
|
||||
BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
|
||||
SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' \
|
||||
CC='${CC}' CFLAG='${CFLAG}' \
|
||||
AS='${CC}' ASFLAG='${CFLAG} -c' \
|
||||
AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}' \
|
||||
LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
|
||||
KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' \
|
||||
EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' \
|
||||
SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' \
|
||||
PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' \
|
||||
CPUID_OBJ='${CPUID_OBJ}' \
|
||||
BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' \
|
||||
AES_ASM_OBJ='${AES_ASM_OBJ}' \
|
||||
BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' \
|
||||
RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' \
|
||||
SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \
|
||||
MD5_ASM_OBJ='${MD5_ASM_OBJ}' \
|
||||
RMD160_ASM_OBJ='${RMD160_ASM_OBJ}'
|
||||
all: Makefile sub_all openssl.pc
|
||||
|
||||
BUILD_CMD=if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
|
||||
if [ -d "$$dir" ]; then \
|
||||
(cd $$dir && echo "making $$target in $$dir..." && \
|
||||
$(MAKE) $(BUILDENV) $$target ) || exit 1; \
|
||||
sigs: $(SIGS)
|
||||
libcrypto.a.sha1: libcrypto.a
|
||||
@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; \
|
||||
fi
|
||||
|
||||
sub_all:
|
||||
@for i in $(DIRS); \
|
||||
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; \
|
||||
else \
|
||||
$(MAKE) $$dir; \
|
||||
fi; fi
|
||||
$(MAKE) $$i; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
sub_all: build_all
|
||||
build_all: build_libs build_apps build_tests build_tools
|
||||
|
||||
build_libs: build_crypto build_ssl build_engines
|
||||
|
||||
build_crypto:
|
||||
@dir=crypto; target=all; $(BUILD_CMD)
|
||||
build_ssl:
|
||||
@dir=ssl; target=all; $(BUILD_CMD)
|
||||
build_engines:
|
||||
@dir=engines; target=all; $(BUILD_CMD)
|
||||
build_apps:
|
||||
@dir=apps; target=all; $(BUILD_CMD)
|
||||
build_tests:
|
||||
@dir=test; target=all; $(BUILD_CMD)
|
||||
build_tools:
|
||||
@dir=tools; target=all; $(BUILD_CMD)
|
||||
|
||||
all_testapps: build_libs build_testapps
|
||||
build_testapps:
|
||||
@dir=crypto; target=testapps; $(BUILD_CMD)
|
||||
sub_target:
|
||||
@for i in $(DIRS); \
|
||||
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; \
|
||||
else \
|
||||
$(MAKE) $$i; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
libcrypto$(SHLIB_EXT): libcrypto.a
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
$(MAKE) SHLIBDIRS=crypto build-shared; \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
|
||||
@@ -284,11 +266,10 @@ libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
|
||||
$(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
clean-shared:
|
||||
@set -e; for i in $(SHLIBDIRS); do \
|
||||
@for i in $(SHLIBDIRS); do \
|
||||
if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
|
||||
tmp="$(SHARED_LIBS_LINK_EXTS)"; \
|
||||
for j in $${tmp:-x}; do \
|
||||
@@ -297,37 +278,348 @@ clean-shared:
|
||||
fi; \
|
||||
( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then \
|
||||
( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
|
||||
( set -x; rm -f cyg$$i-$(SHLIB_VERSION_NUMBER)$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
link-shared:
|
||||
@ set -e; for i in ${SHLIBDIRS}; do \
|
||||
$(NEWMAKE) -f $(HERE)/Makefile.shared \
|
||||
LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
|
||||
symlink.$(SHLIB_TARGET); \
|
||||
libs="$$libs -l$$i"; \
|
||||
@if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
|
||||
tmp="$(SHARED_LIBS_LINK_EXTS)"; \
|
||||
for i in $(SHLIBDIRS); do \
|
||||
prev=lib$$i$(SHLIB_EXT); \
|
||||
for j in $${tmp:-x}; do \
|
||||
( set -x; \
|
||||
rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
|
||||
prev=lib$$i$$j; \
|
||||
done; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
|
||||
|
||||
do_bsd-gcc-shared: do_gnu-shared
|
||||
do_linux-shared: do_gnu-shared
|
||||
do_gnu-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-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; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
build-shared: do_$(SHLIB_TARGET) link-shared
|
||||
DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
|
||||
|
||||
do_$(SHLIB_TARGET):
|
||||
@ set -e; libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
# For Darwin AKA Mac OS/X (dyld)
|
||||
do_darwin-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} --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; \
|
||||
libs="-l`basename $$i${SHLIB_EXT} .dylib` $$libs"; \
|
||||
echo "" ; \
|
||||
done
|
||||
|
||||
do_cygwin-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
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,0xFE00000; \
|
||||
( 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 ${EX_LIBS} ) || exit 1; \
|
||||
cp -p $$shlib apps/; cp -p $$shlib test/; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
do_alpha-osf1-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
$(NEWMAKE) -f Makefile.shared \
|
||||
$(BUILDENV) \
|
||||
LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
|
||||
LIBDEPS="$$libs $(EX_LIBS)" \
|
||||
LIBRPATH="$(INSTALLTOP)/lib" \
|
||||
link_a.$(SHLIB_TARGET); \
|
||||
( 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; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
# The difference between alpha-osf1-shared and tru64-shared is the `-msym'
|
||||
# option passed to the linker.
|
||||
do_tru64-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( 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; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
# The difference between tru64-shared and tru64-shared-rpath is the
|
||||
# -rpath ${INSTALLTOP}/lib passed to the linker.
|
||||
do_tru64-shared-rpath:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-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; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
do_solaris-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( 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 \
|
||||
-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="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# OpenServer 5 native compilers used
|
||||
do_svr3-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||
find . -name "*.o" -print > allobjs ; \
|
||||
OBJS= ; export OBJS ; \
|
||||
for obj in `ar t lib$$i.a` ; do \
|
||||
OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
|
||||
done ; \
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# UnixWare 7 and OpenUNIX 8 native compilers used
|
||||
do_svr5-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||
SHARE_FLAG='-G'; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
|
||||
find . -name "*.o" -print > allobjs ; \
|
||||
OBJS= ; export OBJS ; \
|
||||
for obj in `ar t lib$$i.a` ; do \
|
||||
OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
|
||||
done ; \
|
||||
set -x; LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
|
||||
${CC} ${SHARED_LDFLAGS} \
|
||||
$${SHARE_FLAG} -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
do_irix-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( 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; \
|
||||
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; \
|
||||
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; \
|
||||
[ -f $$shlib ] && rm -f $$shlib; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
+vnocompatwarnings \
|
||||
-b -z +s \
|
||||
-o $$shlib +h $$shlib \
|
||||
-Fl lib$$i.a -ldld -lc ) || exit 1; \
|
||||
chmod a=rx $$shlib; \
|
||||
done
|
||||
|
||||
openssl.pc: Makefile.ssl
|
||||
# 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"; \
|
||||
fi; \
|
||||
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; \
|
||||
[ -f $$shlib ] && rm -f $$shlib; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
-b -z \
|
||||
-o $$shlib +h $$shlib \
|
||||
+forceload lib$$i.a -ldl -lc ) || exit 1; \
|
||||
chmod a=rx $$shlib; \
|
||||
done
|
||||
|
||||
# The following method is said to work on all platforms. Tests will
|
||||
# determine if that's how it's gong to be used.
|
||||
# This assumes that for all but GNU systems, GNU utilities are *not* used.
|
||||
# ALLSYMSFLAGS would be:
|
||||
# GNU systems: --whole-archive
|
||||
# Tru64 Unix: -all
|
||||
# Solaris: -z allextract
|
||||
# Irix: -all
|
||||
# HP/UX-32bit: -Fl
|
||||
# HP/UX-64bit: +forceload
|
||||
# AIX: -bnogc
|
||||
# SHAREDFLAGS would be:
|
||||
# GNU systems: -shared -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# Tru64 Unix: -shared \
|
||||
# -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}"
|
||||
# Solaris: -G -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# Irix: -shared -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# HP/UX-32bit: +vnocompatwarnings -b -z +s \
|
||||
# +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# HP/UX-64bit: -b -z +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# AIX: -G -bE:lib$$i.exp -bM:SRE
|
||||
# SHAREDCMD would be:
|
||||
# GNU systems: $(CC)
|
||||
# Tru64 Unix: $(CC)
|
||||
# Solaris: $(CC)
|
||||
# Irix: $(CC)
|
||||
# HP/UX-32bit: /usr/ccs/bin/ld
|
||||
# HP/UX-64bit: /usr/ccs/bin/ld
|
||||
# AIX: $(CC)
|
||||
ALLSYMSFLAG=-bnogc
|
||||
SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
|
||||
SHAREDCMD=$(CC)
|
||||
do_aix-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; \
|
||||
OBJECT_MODE=`expr x${SHARED_LDFLAGS} : 'x\-[a-z]\([0-9]*\)'`; \
|
||||
OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \
|
||||
ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \
|
||||
( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
|
||||
$(SHAREDCMD) $(SHAREDFLAGS) \
|
||||
-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib$$i.o \
|
||||
$$libs ${EX_LIBS} ) ) \
|
||||
|| exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
do_reliantunix-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
tmpdir=/tmp/openssl.$$$$ ; rm -rf $$tmpdir ; \
|
||||
( set -x; \
|
||||
( Opwd=`pwd` ; mkdir $$tmpdir || exit 1; \
|
||||
cd $$tmpdir || exit 1 ; ar x $$Opwd/lib$$i.a ; \
|
||||
${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} *.o \
|
||||
) || exit 1; \
|
||||
cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \
|
||||
) || exit 1; \
|
||||
rm -rf $$tmpdir ; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
openssl.pc: Makefile
|
||||
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
||||
echo 'exec_prefix=$${prefix}'; \
|
||||
echo 'libdir=$${exec_prefix}/lib'; \
|
||||
@@ -337,11 +629,11 @@ openssl.pc: Makefile.ssl
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||
|
||||
Makefile.ssl: Makefile.org
|
||||
@echo "Makefile.ssl is older than Makefile.org."
|
||||
Makefile: Makefile.org
|
||||
@echo "Makefile is older than Makefile.org."
|
||||
@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
||||
@false
|
||||
|
||||
@@ -350,18 +642,18 @@ libclean:
|
||||
|
||||
clean: libclean
|
||||
rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
|
||||
@set -e; for i in $(DIRS) ;\
|
||||
@for i in $(DIRS) ;\
|
||||
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;
|
||||
rm -f openssl.pc
|
||||
rm -f speed.* .pure
|
||||
rm -f $(TARFILE)
|
||||
@set -e; for i in $(ONEDIRS) ;\
|
||||
@for i in $(ONEDIRS) ;\
|
||||
do \
|
||||
rm -fr $$i/*; \
|
||||
done
|
||||
@@ -371,8 +663,8 @@ makefile.one: files
|
||||
sh util/do_ms.sh
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
|
||||
@set -e; for i in $(DIRS) ;\
|
||||
$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making 'files' in $$i..." && \
|
||||
@@ -381,18 +673,22 @@ files:
|
||||
done;
|
||||
|
||||
links:
|
||||
@$(TOP)/util/point.sh Makefile.ssl Makefile
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
|
||||
@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
|
||||
@set -e; target=links; for dir in $(DIRS); do $(BUILD_CMD); done
|
||||
@for i in $(DIRS); do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making links in $$i..." && \
|
||||
$(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}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
gentests:
|
||||
@(cd test && echo "generating dummy tests (if needed)..." && \
|
||||
$(MAKE) $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
|
||||
$(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 generate );
|
||||
|
||||
dclean:
|
||||
rm -f *.bak
|
||||
@set -e; for i in $(DIRS) ;\
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making dclean in $$i..." && \
|
||||
@@ -402,20 +698,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
|
||||
|
||||
@@ -423,33 +708,23 @@ test: tests
|
||||
|
||||
tests: rehash
|
||||
@(cd test && echo "testing..." && \
|
||||
$(MAKE) $(BUILDENV) 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
|
||||
$(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 );
|
||||
util/shlib_wrap.sh apps/openssl version -a
|
||||
|
||||
report:
|
||||
@$(PERL) util/selftest.pl
|
||||
|
||||
depend:
|
||||
@set -e; for i in $(DIRS) ;\
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making dependencies $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' CFLAG='-DOPENSSL_NO_DEPRECATED ${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \
|
||||
$(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
lint:
|
||||
@set -e; for i in $(DIRS) ;\
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making lint $$i..." && \
|
||||
@@ -458,17 +733,12 @@ lint:
|
||||
done;
|
||||
|
||||
tags:
|
||||
@set -e; for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making tags $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
rm -f TAGS
|
||||
find . -name '[^.]*.[ch]' | xargs etags -a
|
||||
|
||||
errors:
|
||||
$(PERL) util/mkerr.pl -recurse -write
|
||||
(cd engines; $(MAKE) PERL=$(PERL) errors)
|
||||
(cd crypto/engine; $(MAKE) PERL=$(PERL) errors)
|
||||
|
||||
stacks:
|
||||
$(PERL) util/mkstack.pl -write
|
||||
@@ -526,42 +796,45 @@ dist:
|
||||
@$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
|
||||
|
||||
dist_pem_h:
|
||||
(cd crypto/pem; $(MAKE) $(BUILDENV) pem.h; $(MAKE) clean)
|
||||
(cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
|
||||
|
||||
install: all install_docs install_sw
|
||||
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/private
|
||||
@set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
|
||||
@headerlist="$(EXHEADER)"; for i in $$headerlist ;\
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
@set -e; for i in $(DIRS) ;\
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i; echo "installing $$i..."; \
|
||||
$(MAKE) $(BUILDENV) INSTALL_PREFIX='${INSTALL_PREFIX}' OPENSSLDIR='${OPENSSLDIR}' install ); \
|
||||
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
|
||||
fi; \
|
||||
done
|
||||
@set -e; for i in $(LIBS) ;\
|
||||
@for i in $(LIBS) ;\
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
: ; \
|
||||
else \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
fi; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi; \
|
||||
done;
|
||||
@set -e; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
tmp="$(SHARED_LIBS)"; \
|
||||
for i in $${tmp:-x}; \
|
||||
do \
|
||||
@@ -572,7 +845,7 @@ install_sw:
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib/cyg/'`; \
|
||||
c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
@@ -584,7 +857,8 @@ install_sw:
|
||||
done; \
|
||||
( here="`pwd`"; \
|
||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
$(NEWMAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
|
||||
set $(MAKE); \
|
||||
$$1 -f $$here/Makefile link-shared ); \
|
||||
if [ "$(INSTALLTOP)" != "/usr" ]; then \
|
||||
echo 'OpenSSL shared libraries have been installed in:'; \
|
||||
echo ' $(INSTALLTOP)'; \
|
||||
@@ -592,6 +866,15 @@ install_sw:
|
||||
sed -e '1,/^$$/d' doc/openssl-shared.txt; \
|
||||
fi; \
|
||||
fi
|
||||
@for i in $(SIGS) ;\
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi; \
|
||||
done;
|
||||
cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
|
||||
|
||||
@@ -604,12 +887,12 @@ 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; \
|
||||
set -e; for i in doc/apps/*.pod; do \
|
||||
for i in doc/apps/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
|
||||
if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
@@ -624,9 +907,9 @@ install_docs:
|
||||
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||
done); \
|
||||
done; \
|
||||
set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||
for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
|
||||
if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
|
||||
791
Makefile.shared
791
Makefile.shared
@@ -1,791 +0,0 @@
|
||||
#
|
||||
# Helper makefile to link shared libraries in a portable way.
|
||||
# This is much simpler than libtool, and hopefully not too error-prone.
|
||||
#
|
||||
# The following variables need to be set on the command line to build
|
||||
# properly
|
||||
|
||||
# CC contains the current compiler. This one MUST be defined
|
||||
CC=cc
|
||||
# LDFLAGS contains flags to be used when temporary object files (when building
|
||||
# shared libraries) are created, or when an application is linked.
|
||||
# SHARED_LDFLAGS contains flags to be used when the shared library is created.
|
||||
LDFLAGS=
|
||||
SHARED_LDFLAGS=
|
||||
|
||||
# LIBNAME contains just the name of the library, without prefix ("lib"
|
||||
# on Unix, "cyg" for certain forms under Cygwin...) or suffix (.a, .so,
|
||||
# .dll, ...). This one MUST have a value when using this makefile to
|
||||
# build shared libraries.
|
||||
# For example, to build libfoo.so, you need to do the following:
|
||||
#LIBNAME=foo
|
||||
LIBNAME=
|
||||
|
||||
# APPNAME contains just the name of the application, without suffix (""
|
||||
# on Unix, ".exe" on Windows, ...). This one MUST have a value when using
|
||||
# this makefile to build applications.
|
||||
# For example, to build foo, you need to do the following:
|
||||
#APPNAME=foo
|
||||
APPNAME=
|
||||
|
||||
# OBJECTS contains all the object files to link together into the application.
|
||||
# This must contain at least one object file.
|
||||
#OBJECTS=foo.o
|
||||
OBJECTS=
|
||||
|
||||
# LIBEXTRAS contains extra modules to link together with the library.
|
||||
# For example, if a second library, say libbar.a needs to be linked into
|
||||
# libfoo.so, you need to do the following:
|
||||
#LIBEXTRAS=libbar.a
|
||||
# Note that this MUST be used when using the link_o targets, to hold the
|
||||
# names of all object files that go into the target library.
|
||||
LIBEXTRAS=
|
||||
|
||||
# LIBVERSION contains the current version of the library.
|
||||
# For example, to build libfoo.so.1.2, you need to do the following:
|
||||
#LIBVERSION=1.2
|
||||
LIBVERSION=
|
||||
|
||||
# LIBCOMPATVERSIONS contains the compatibility versions (a list) of
|
||||
# the library. They MUST be in decreasing order.
|
||||
# For example, if libfoo.so.1.2.1 is backward compatible with libfoo.so.1.2
|
||||
# and libfoo.so.1, you need to do the following:
|
||||
#LIBCOMPATVERSIONS=1.2 1
|
||||
# Note that on systems that use sonames, the last number will appear as
|
||||
# part of it.
|
||||
# It's also possible, for systems that support it (Tru64, for example),
|
||||
# to add extra compatibility info with more precision, by adding a second
|
||||
# list of versions, separated from the first with a semicolon, like this:
|
||||
#LIBCOMPATVERSIONS=1.2 1;1.2.0 1.1.2 1.1.1 1.1.0 1.0.0
|
||||
LIBCOMPATVERSIONS=
|
||||
|
||||
# LIBDEPS contains all the flags necessary to cover all necessary
|
||||
# dependencies to other libraries.
|
||||
LIBDEPS=
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# The rest is private to this makefile.
|
||||
|
||||
#DEBUG=:
|
||||
DEBUG=set -x
|
||||
|
||||
top:
|
||||
echo "Trying to use this makefile interactively? Don't."
|
||||
|
||||
CALC_VERSIONS= \
|
||||
SHLIB_COMPAT=; SHLIB_SOVER=; \
|
||||
if [ -n "$(LIBVERSION)$(LIBCOMPATVERSIONS)" ]; then \
|
||||
prev=""; \
|
||||
for v in `echo "$(LIBVERSION) $(LIBCOMPATVERSIONS)" | cut -d';' -f1`; do \
|
||||
SHLIB_SOVER_NODOT=$$v; \
|
||||
SHLIB_SOVER=.$$v; \
|
||||
if [ -n "$$prev" ]; then \
|
||||
SHLIB_COMPAT="$$SHLIB_COMPAT .$$prev"; \
|
||||
fi; \
|
||||
prev=$$v; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
LINK_APP= \
|
||||
( $(DEBUG); \
|
||||
LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
$$LDCMD $(LDFLAGS) $$LDFLAGS -o $$APPNAME $(OBJECTS) $$LIBDEPS )
|
||||
|
||||
LINK_SO= \
|
||||
( $(DEBUG); \
|
||||
nm -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' ' > lib$(LIBNAME).exp; \
|
||||
LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
$$SHAREDCMD $(SHARED_LDFLAGS) $$SHAREDFLAGS -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
|
||||
$$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS ) && \
|
||||
$(SYMLINK_SO); ( $(DEBUG); rm -f lib$(LIBNAME).exp )
|
||||
SYMLINK_SO= \
|
||||
if [ -n "$$INHIBIT_SYMLINKS" ]; then :; else \
|
||||
prev=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
|
||||
if [ -n "$$SHLIB_COMPAT" ]; then \
|
||||
for x in $$SHLIB_COMPAT; do \
|
||||
( $(DEBUG); rm -f $$SHLIB$$x$$SHLIB_SUFFIX; \
|
||||
ln -s $$prev $$SHLIB$$x$$SHLIB_SUFFIX ); \
|
||||
prev=$$SHLIB$$x$$SHLIB_SUFFIX; \
|
||||
done; \
|
||||
fi; \
|
||||
if [ -n "$$SHLIB_SOVER" ]; then \
|
||||
( $(DEBUG); rm -f $$SHLIB$$SHLIB_SUFFIX; \
|
||||
ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
LINK_SO_A= SHOBJECTS="lib$(LIBNAME).a $(LIBEXTRAS)"; $(LINK_SO)
|
||||
LINK_SO_O= SHOBJECTS="$(LIBEXTRAS)"; $(LINK_SO)
|
||||
LINK_SO_A_VIA_O= \
|
||||
SHOBJECTS=lib$(LIBNAME).o; \
|
||||
ALL=$$ALLSYMSFLAGS; ALLSYMSFLAGS=; NOALLSYMSFLAGS=; \
|
||||
( $(DEBUG); \
|
||||
ld $(LDFLAGS) -r -o lib$(LIBNAME).o $$ALL lib$(LIBNAME).a $(LIBEXTRAS) ); \
|
||||
$(LINK_SO) && rm -f $(LIBNAME).o
|
||||
LINK_SO_A_UNPACKED= \
|
||||
UNPACKDIR=link_tmp.$$$$; rm -rf $$UNPACKDIR; mkdir $$UNPACKDIR; \
|
||||
(cd $$UNPACKDIR; ar x ../lib$(LIBNAME).a) && \
|
||||
([ -z "$(LIBEXTRAS)" ] || cp $(LIBEXTRAS) $$UNPACKDIR) && \
|
||||
SHOBJECTS=$$UNPACKDIR/*.o; \
|
||||
$(LINK_SO) && rm -rf $$UNPACKDIR
|
||||
|
||||
DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
|
||||
|
||||
DO_GNU_SO=$(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS='-Wl,--whole-archive'; \
|
||||
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
|
||||
SHAREDFLAGS="-shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'
|
||||
DO_GNU_APP=LDCMD=$(CC);\
|
||||
LDFLAGS="-Wl,-rpath,$(LIBRPATH)"; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME=$(APPNAME)
|
||||
|
||||
#This is rather special. It's a special target with which one can link
|
||||
#applications without bothering with any features that have anything to
|
||||
#do with shared libraries, for example when linking against static
|
||||
#libraries. It's mostly here to avoid a lot of conditionals everywhere
|
||||
#else...
|
||||
link_app.:
|
||||
LDCMD=$(CC); \
|
||||
LDFLAGS=""; \
|
||||
LIBDEPS="$(LIBDEPS)"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
$(LINK_APP)
|
||||
|
||||
link_o.gnu:
|
||||
@ $(DO_GNU_SO); $(LINK_SO_O)
|
||||
link_a.gnu:
|
||||
@ $(DO_GNU_SO); $(LINK_SO_A)
|
||||
link_app.gnu:
|
||||
@ $(DO_GNU_APP); $(LINK_APP)
|
||||
|
||||
link_o.bsd:
|
||||
@if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS=; \
|
||||
ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
|
||||
NOALLSYMSFLAGS=; \
|
||||
SHAREDFLAGS="-shared -nostdlib"; \
|
||||
SHAREDCMD=$(CC); \
|
||||
fi; $(LINK_SO_O)
|
||||
link_a.bsd:
|
||||
@if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS=; \
|
||||
ALLSYMSFLAGS="-Wl,-Bforcearchive"; \
|
||||
NOALLSYMSFLAGS=; \
|
||||
SHAREDFLAGS="-shared -nostdlib"; \
|
||||
SHAREDCMD=$(CC); \
|
||||
fi; $(LINK_SO_A)
|
||||
link_app.bsd:
|
||||
@if ${DETECT_GNU_LD}; then $(DO_GNU_APP); else \
|
||||
LDCMD=$(CC); \
|
||||
LDFLAGS="-Wl,-rpath,$(LIBPATH)"; \
|
||||
LIBDEPS="$(LIBDEPS)"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
fi; $(LINK_APP)
|
||||
|
||||
# For Darwin AKA Mac OS/X (dyld)
|
||||
link_o.darwin:
|
||||
@ $(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME); \
|
||||
SHLIB_SUFFIX=.dylib; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS='-all_load'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS="-dynamiclib"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
if [ -n "$(LIBVERSION)" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -current_version $(LIBVERSION)"; \
|
||||
fi; \
|
||||
if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
|
||||
fi; \
|
||||
$(LINK_SO_O)
|
||||
link_a.darwin:
|
||||
@ $(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME); \
|
||||
SHLIB_SUFFIX=.dylib; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS='-all_load'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS="-dynamiclib"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
if [ -n "$(LIBVERSION)" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -current_version $(LIBVERSION)"; \
|
||||
fi; \
|
||||
if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -compatibility_version $$SHLIB_SOVER_NODOT"; \
|
||||
fi; \
|
||||
$(LINK_SO_A)
|
||||
link_app.darwin:
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS=""; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
$(LINK_APP)
|
||||
|
||||
link_o.cygwin:
|
||||
@ $(CALC_VERSIONS); \
|
||||
INHIBIT_SYMLINKS=yes; \
|
||||
SHLIB=cyg$(LIBNAME); \
|
||||
expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
|
||||
SHLIB_SUFFIX=.dll; \
|
||||
LIBDEPS="$(LIBDEPS)"; \
|
||||
SHLIB_SOVER=-$(LIBVERSION); \
|
||||
ALLSYMSFLAGS='-Wl,--whole-archive'; \
|
||||
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
|
||||
SHAREDFLAGS="-Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
|
||||
SHAREDCMD='${CC}'; \
|
||||
$(LINK_SO_O)
|
||||
link_a.cygwin:
|
||||
@ $(CALC_VERSIONS); \
|
||||
INHIBIT_SYMLINKS=yes; \
|
||||
SHLIB=cyg$(LIBNAME); \
|
||||
expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
|
||||
SHLIB_SUFFIX=.dll; \
|
||||
LIBDEPS="$(LIBDEPS)"; \
|
||||
SHLIB_SOVER=; \
|
||||
ALLSYMSFLAGS='-Wl,--whole-archive'; \
|
||||
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
|
||||
SHAREDFLAGS="-Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
|
||||
SHAREDCMD='${CC}'; \
|
||||
$(LINK_SO_A)
|
||||
link_app.cygwin:
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS=""; \
|
||||
LIBDEPS="$(LIBDEPS)"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
$(LINK_APP)
|
||||
|
||||
link_o.alpha-osf1:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
|
||||
else \
|
||||
SHLIB_HIST="$(LIBVERSION)"; \
|
||||
fi; \
|
||||
SHLIB_SOVER=; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS='-none'; \
|
||||
SHAREDFLAGS="-shared"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
|
||||
fi; \
|
||||
fi; \
|
||||
$(LINK_SO_O)
|
||||
link_a.alpha-osf1:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
|
||||
else \
|
||||
SHLIB_HIST="$(LIBVERSION)"; \
|
||||
fi; \
|
||||
SHLIB_SOVER=; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS='-none'; \
|
||||
SHAREDFLAGS="-shared"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
|
||||
fi; \
|
||||
fi; \
|
||||
$(LINK_SO_A)
|
||||
link_app.alpha-osf1:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_APP); \
|
||||
else \
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS=""; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"
|
||||
fi; \
|
||||
$(LINK_APP)
|
||||
|
||||
# The difference between alpha-osf1-shared and tru64-shared is the `-msym'
|
||||
# option passed to the linker.
|
||||
link_o.tru64:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
|
||||
else \
|
||||
SHLIB_HIST="$(LIBVERSION)"; \
|
||||
fi; \
|
||||
SHLIB_SOVER=; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS='-none'; \
|
||||
SHAREDFLAGS="-shared -msym -rpath $(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
|
||||
fi; \
|
||||
fi; \
|
||||
$(LINK_SO_O)
|
||||
link_a.tru64:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
|
||||
else \
|
||||
SHLIB_HIST="$(LIBVERSION)"; \
|
||||
fi; \
|
||||
SHLIB_SOVER=; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS='-none'; \
|
||||
SHAREDFLAGS="-shared -msym -rpath $(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
|
||||
fi; \
|
||||
fi; \
|
||||
$(LINK_SO_A)
|
||||
link_app.tru64:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_APP); \
|
||||
else \
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS="-rpath $(LIBRPATH)"; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
fi; \
|
||||
$(LINK_APP)
|
||||
|
||||
# The difference between tru64-shared and tru64-shared-rpath is the
|
||||
# -rpath ${LIBRPATH} passed to the linker.
|
||||
link_o.tru64-rpath:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
|
||||
else \
|
||||
SHLIB_HIST="$(LIBVERSION)"; \
|
||||
fi; \
|
||||
SHLIB_SOVER=; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS='-none'; \
|
||||
SHAREDFLAGS="-shared -msym -rpath $(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
|
||||
fi; \
|
||||
fi; \
|
||||
$(LINK_SO_O)
|
||||
link_a.tru64-rpath:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHLIB_HIST="$${SHLIB_HIST}:$(LIBVERSION)"; \
|
||||
else \
|
||||
SHLIB_HIST="$(LIBVERSION)"; \
|
||||
fi; \
|
||||
SHLIB_SOVER=; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS='-none'; \
|
||||
SHAREDFLAGS="-shared -msym -rpath $(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
if [ -n "$$SHLIB_HIST" ]; then \
|
||||
SHAREDFLAGS="$$SHAREDFLAGS -set_version \"$$SHLIB_HIST\""; \
|
||||
fi; \
|
||||
fi; \
|
||||
$(LINK_SO_A)
|
||||
link_app.tru64-rpath:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_APP); \
|
||||
else \
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS="-rpath $(LIBRPATH)"; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
fi; \
|
||||
$(LINK_APP)
|
||||
|
||||
link_o.solaris:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
$(CALC_VERSIONS); \
|
||||
MINUSZ='-z '; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS="$${MINUSZ}allextract"; \
|
||||
NOALLSYMSFLAGS="$${MINUSZ}defaultextract"; \
|
||||
SHAREDFLAGS="-G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -R $(LIBRPATH) -Wl,-Bsymbolic"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
$(LINK_SO_O)
|
||||
link_a.solaris:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
$(CALC_VERSIONS); \
|
||||
MINUSZ='-z '; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=;\
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS="$${MINUSZ}allextract"; \
|
||||
NOALLSYMSFLAGS="$${MINUSZ}defaultextract"; \
|
||||
SHAREDFLAGS="-G -dy -z text -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -R $(LIBRPATH) -Wl,-Bsymbolic"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
$(LINK_SO_A)
|
||||
link_app.solaris:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_APP); \
|
||||
else \
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS="-R $(LIBRPATH)"; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
fi; \
|
||||
$(LINK_APP)
|
||||
|
||||
# OpenServer 5 native compilers used
|
||||
link_o.svr3:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS=''; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS="-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
$(LINK_SO_O)
|
||||
link_a.svr3:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS=''; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS="-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
$(LINK_SO_A_UNPACKED)
|
||||
link_app.svr3:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_APP); \
|
||||
else \
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS=""; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
fi; \
|
||||
$(LINK_APP)
|
||||
|
||||
# UnixWare 7 and OpenUNIX 8 native compilers used
|
||||
link_o.svr5:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHARE_FLAG='-G'; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS=''; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS="$${SHARE_FLAG} -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
$(LINK_SO_O)
|
||||
link_a.svr5:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHARE_FLAG='-G'; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS=''; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS="$${SHARE_FLAG} -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
$(LINK_SO_A_UNPACKED)
|
||||
link_app.svr5:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_APP); \
|
||||
else \
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS=""; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
fi; \
|
||||
$(LINK_APP)
|
||||
|
||||
link_o.irix:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
MINUSWL=""; \
|
||||
($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
|
||||
ALLSYMSFLAGS="$${MINUSWL}-all"; \
|
||||
NOALLSYMSFLAGS="$${MINUSWL}-notall"; \
|
||||
SHAREDFLAGS="-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
$(LINK_SO_O)
|
||||
link_a.irix:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_SO); \
|
||||
else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
MINUSWL=""; \
|
||||
($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
|
||||
ALLSYMSFLAGS="$${MINUSWL}-all"; \
|
||||
NOALLSYMSFLAGS="$${MINUSWL}-notall"; \
|
||||
SHAREDFLAGS="-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
$(LINK_SO_A)
|
||||
link_app.irix:
|
||||
@ if ${DETECT_GNU_LD}; then \
|
||||
$(DO_GNU_APP); \
|
||||
else \
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS="-Wl,-rpath,$(LIBRPATH)"; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
fi; \
|
||||
$(LINK_APP)
|
||||
|
||||
# 32-bit PA-RISC HP-UX embeds the -L pathname of libs we link with, so
|
||||
# we compensate for it with +cdp ../: and +cdp ./:. Yes, these rewrite
|
||||
# rules imply that we can only link one level down in catalog structure,
|
||||
# but that's what takes place for the moment of this writing. +cdp option
|
||||
# was introduced in HP-UX 11.x and applies in 32-bit PA-RISC link
|
||||
# editor context only [it's simply ignored in other cases, which are all
|
||||
# ELFs by the way].
|
||||
#
|
||||
link_o.hpux:
|
||||
@if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).sl; \
|
||||
expr $(PLATFORM) : '.*ia64' > /dev/null && SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS)"; \
|
||||
ALLSYMSFLAGS='-Wl,-Fl'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
|
||||
SHAREDFLAGS="-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+b,$(LIBRPATH)"; \
|
||||
SHAREDCMD=$(CC); \
|
||||
fi; \
|
||||
$(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
|
||||
link_a.hpux:
|
||||
@if ${DETECT_GNU_LD}; then $(DO_GNU_SO); else \
|
||||
$(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).sl; \
|
||||
expr $(PLATFORM) : '.*ia64' > /dev/null && SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS)"; \
|
||||
ALLSYMSFLAGS='-Wl,-Fl'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
expr $(PLATFORM) : 'hpux64' > /dev/null && ALLSYMSFLAGS='-Wl,+forceload'; \
|
||||
SHAREDFLAGS="-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:,+h,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,+b,$(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
$(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
|
||||
link_app.hpux:
|
||||
@if ${DETECT_GNU_LD}; then $(DO_GNU_APP); else \
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS="-Wl,+s,+cdp,../:,+cdp,./:,+b,$(LIBRPATH)"; \
|
||||
LIBDEPS="$(LIBDEPS)"; \
|
||||
APPNAME="$(APPNAME)"; \
|
||||
fi; \
|
||||
$(LINK_APP)
|
||||
|
||||
link_o.aix:
|
||||
@ $(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS='-bnogc'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS='-G -bE:lib$(LIBNAME).exp -bM:SRE -blibpath:$(LIBRPATH)'; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
$(LINK_SO_O)
|
||||
link_a.aix:
|
||||
@ $(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS='-bnogc'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS='-G -bE:lib$(LIBNAME).exp -bM:SRE -blibpath:$(LIBRPATH)'; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
$(LINK_SO_A_VIA_O)
|
||||
link_app.aix:
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS="-blibpath:$(LIBRPATH)"; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"
|
||||
$(LINK_APP)
|
||||
|
||||
link_o.reliantunix:
|
||||
@ $(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS=; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS='-G'; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
$(LINK_SO_O)
|
||||
link_a.reliantunix:
|
||||
@ $(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS=; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
SHAREDFLAGS='-G'; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
$(LINK_SO_A_UNPACKED)
|
||||
link_app.reliantunix:
|
||||
LDCMD=$(CC);\
|
||||
LDFLAGS=""; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
APPNAME="$(APPNAME)"
|
||||
$(LINK_APP)
|
||||
|
||||
# Targets to build symbolic links when needed
|
||||
symlink.gnu symlink.solaris symlink.svr3 symlink.svr5 symlink.irix \
|
||||
symlink.aix symlink.reliantunix:
|
||||
@ $(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
$(SYMLINK_SO)
|
||||
symlink.darwin:
|
||||
@ $(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME); \
|
||||
SHLIB_SUFFIX=.dylib; \
|
||||
$(SYMLINK_SO)
|
||||
symlink.hpux:
|
||||
@ $(CALC_VERSIONS); \
|
||||
SHLIB=lib$(LIBNAME).sl; \
|
||||
expr $(PLATFORM) : '.*ia64' > /dev/null && SHLIB=lib$(LIBNAME).so; \
|
||||
$(SYMLINK_SO)
|
||||
# The following lines means those specific architectures do no symlinks
|
||||
symlink.cygwin symlib.alpha-osf1 symlink.tru64 symlink.tru64-rpath:
|
||||
|
||||
# Compatibility targets
|
||||
link_o.bsd-gcc-shared link_o.linux-shared link_o.gnu-shared: link_o.gnu
|
||||
link_a.bsd-gcc-shared link_a.linux-shared link_a.gnu-shared: link_a.gnu
|
||||
link_app.bsd-gcc-shared link_app.linux-shared link_app.gnu-shared: link_app.gnu
|
||||
symlink.bsd-gcc-shared symlink.bsd-shared symlink.linux-shared symlink.gnu-shared: symlink.gnu
|
||||
link_o.bsd-shared: link_o.bsd
|
||||
link_a.bsd-shared: link_a.bsd
|
||||
link_app.bsd-shared: link_app.bsd
|
||||
link_o.darwin-shared: link_o.darwin
|
||||
link_a.darwin-shared: link_a.darwin
|
||||
link_app.darwin-shared: link_app.darwin
|
||||
symlink.darwin-shared: symlink.darwin
|
||||
link_o.cygwin-shared: link_o.cygwin
|
||||
link_a.cygwin-shared: link_a.cygwin
|
||||
link_app.cygwin-shared: link_app.cygwin
|
||||
symlink.cygwin-shared: symlink.cygwin
|
||||
link_o.alpha-osf1-shared: link_o.alpha-osf1
|
||||
link_a.alpha-osf1-shared: link_a.alpha-osf1
|
||||
link_app.alpha-osf1-shared: link_app.alpha-osf1
|
||||
symlink.alpha-osf1-shared: symlink.alpha-osf1
|
||||
link_o.tru64-shared: link_o.tru64
|
||||
link_a.tru64-shared: link_a.tru64
|
||||
link_app.tru64-shared: link_app.tru64
|
||||
symlink.tru64-shared: symlink.tru64
|
||||
link_o.tru64-shared-rpath: link_o.tru64-rpath
|
||||
link_a.tru64-shared-rpath: link_a.tru64-rpath
|
||||
link_app.tru64-shared-rpath: link_app.tru64-rpath
|
||||
symlink.tru64-shared-rpath: symlink.tru64-rpath
|
||||
link_o.solaris-shared: link_o.solaris
|
||||
link_a.solaris-shared: link_a.solaris
|
||||
link_app.solaris-shared: link_app.solaris
|
||||
symlink.solaris-shared: symlink.solaris
|
||||
link_o.svr3-shared: link_o.svr3
|
||||
link_a.svr3-shared: link_a.svr3
|
||||
link_app.svr3-shared: link_app.svr3
|
||||
symlink.svr3-shared: symlink.svr3
|
||||
link_o.svr5-shared: link_o.svr5
|
||||
link_a.svr5-shared: link_a.svr5
|
||||
link_app.svr5-shared: link_app.svr5
|
||||
symlink.svr5-shared: symlink.svr5
|
||||
link_o.irix-shared: link_o.irix
|
||||
link_a.irix-shared: link_a.irix
|
||||
link_app.irix-shared: link_app.irix
|
||||
symlink.irix-shared: symlink.irix
|
||||
link_o.hpux-shared: link_o.hpux
|
||||
link_a.hpux-shared: link_a.hpux
|
||||
link_app.hpux-shared: link_app.hpux
|
||||
symlink.hpux-shared: symlink.hpux
|
||||
link_o.aix-shared: link_o.aix
|
||||
link_a.aix-shared: link_a.aix
|
||||
link_app.aix-shared: link_app.aix
|
||||
symlink.aix-shared: symlink.aix
|
||||
link_o.reliantunix-shared: link_o.reliantunix
|
||||
link_a.reliantunix-shared: link_a.reliantunix
|
||||
link_app.reliantunix-shared: link_app.reliantunix
|
||||
symlink.reliantunix-shared: symlink.reliantunix
|
||||
8
NEWS
8
NEWS
@@ -5,6 +5,14 @@
|
||||
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.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.
|
||||
|
||||
@@ -1,204 +0,0 @@
|
||||
@echo off
|
||||
|
||||
rem ========================================================================
|
||||
rem Batch file to automate building OpenSSL for NetWare.
|
||||
rem
|
||||
rem usage:
|
||||
rem build [target] [debug opts] [assembly opts] [configure opts]
|
||||
rem
|
||||
rem target - "netware-clib" - CLib NetWare build
|
||||
rem - "netware-libc" - LibC NKS NetWare build
|
||||
rem
|
||||
rem debug opts - "debug" - build debug
|
||||
rem
|
||||
rem assembly opts - "nw-mwasm" - use Metrowerks assembler
|
||||
rem "nw-nasm" - use NASM assembler
|
||||
rem "no-asm" - don't use assembly
|
||||
rem
|
||||
rem configure opts- all unrecognized arguments are passed to the
|
||||
rem perl configure script
|
||||
rem
|
||||
rem If no arguments are specified the default is to build non-debug with
|
||||
rem no assembly. NOTE: there is no default BLD_TARGET.
|
||||
rem
|
||||
|
||||
|
||||
|
||||
rem No assembly is the default - Uncomment section below to change
|
||||
rem the assembler default
|
||||
set ASM_MODE=
|
||||
set ASSEMBLER=
|
||||
set NO_ASM=no-asm
|
||||
|
||||
rem Uncomment to default to the Metrowerks assembler
|
||||
rem set ASM_MODE=nw-mwasm
|
||||
rem set ASSEMBLER=Metrowerks
|
||||
rem set NO_ASM=
|
||||
|
||||
rem Uncomment to default to the NASM assembler
|
||||
rem set ASM_MODE=nw-nasm
|
||||
rem set ASSEMBLER=NASM
|
||||
rem set NO_ASM=
|
||||
|
||||
rem No default Bld target
|
||||
set BLD_TARGET=no_target
|
||||
rem set BLD_TARGET=netware-clib
|
||||
rem set BLD_TARGET=netware-libc
|
||||
|
||||
|
||||
rem Default to build non-debug
|
||||
set DEBUG=
|
||||
|
||||
rem Uncomment to default to debug build
|
||||
rem set DEBUG=debug
|
||||
|
||||
|
||||
set CONFIG_OPTS=
|
||||
set ARG_PROCESSED=NO
|
||||
|
||||
|
||||
rem Process command line args
|
||||
:opts
|
||||
if "a%1" == "a" goto endopt
|
||||
if "%1" == "no-asm" set NO_ASM=no-asm
|
||||
if "%1" == "no-asm" set ARG_PROCESSED=YES
|
||||
if "%1" == "debug" set DEBUG=debug
|
||||
if "%1" == "debug" set ARG_PROCESSED=YES
|
||||
if "%1" == "nw-nasm" set ASM_MODE=nw-nasm
|
||||
if "%1" == "nw-nasm" set ASSEMBLER=NASM
|
||||
if "%1" == "nw-nasm" set NO_ASM=
|
||||
if "%1" == "nw-nasm" set ARG_PROCESSED=YES
|
||||
if "%1" == "nw-mwasm" set ASM_MODE=nw-mwasm
|
||||
if "%1" == "nw-mwasm" set ASSEMBLER=Metrowerks
|
||||
if "%1" == "nw-mwasm" set NO_ASM=
|
||||
if "%1" == "nw-mwasm" set ARG_PROCESSED=YES
|
||||
if "%1" == "netware-clib" set BLD_TARGET=netware-clib
|
||||
if "%1" == "netware-clib" set ARG_PROCESSED=YES
|
||||
if "%1" == "netware-libc" set BLD_TARGET=netware-libc
|
||||
if "%1" == "netware-libc" set ARG_PROCESSED=YES
|
||||
|
||||
rem If we didn't recognize the argument, consider it an option for config
|
||||
if "%ARG_PROCESSED%" == "NO" set CONFIG_OPTS=%CONFIG_OPTS% %1
|
||||
if "%ARG_PROCESSED%" == "YES" set ARG_PROCESSED=NO
|
||||
|
||||
shift
|
||||
goto opts
|
||||
:endopt
|
||||
|
||||
rem make sure a valid BLD_TARGET was specified
|
||||
if "%BLD_TARGET%" == "no_target" goto no_target
|
||||
|
||||
rem build the nlm make file name which includes target and debug info
|
||||
set NLM_MAKE=
|
||||
if "%BLD_TARGET%" == "netware-clib" set NLM_MAKE=netware\nlm_clib
|
||||
if "%BLD_TARGET%" == "netware-libc" set NLM_MAKE=netware\nlm_libc
|
||||
if "%DEBUG%" == "" set NLM_MAKE=%NLM_MAKE%.mak
|
||||
if "%DEBUG%" == "debug" set NLM_MAKE=%NLM_MAKE%_dbg.mak
|
||||
|
||||
if "%NO_ASM%" == "no-asm" set ASM_MODE=
|
||||
if "%NO_ASM%" == "no-asm" set ASSEMBLER=
|
||||
if "%NO_ASM%" == "no-asm" set CONFIG_OPTS=%CONFIG_OPTS% no-asm
|
||||
if "%NO_ASM%" == "no-asm" goto do_config
|
||||
|
||||
|
||||
rem ==================================================
|
||||
echo Generating x86 for %ASSEMBLER% assembler
|
||||
|
||||
echo Bignum
|
||||
cd crypto\bn\asm
|
||||
perl x86.pl %ASM_MODE% > bn-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
echo DES
|
||||
cd crypto\des\asm
|
||||
perl des-586.pl %ASM_MODE% > d-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
echo "crypt(3)"
|
||||
|
||||
cd crypto\des\asm
|
||||
perl crypt586.pl %ASM_MODE% > y-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
echo Blowfish
|
||||
|
||||
cd crypto\bf\asm
|
||||
perl bf-586.pl %ASM_MODE% > b-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
echo CAST5
|
||||
cd crypto\cast\asm
|
||||
perl cast-586.pl %ASM_MODE% > c-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
echo RC4
|
||||
cd crypto\rc4\asm
|
||||
perl rc4-586.pl %ASM_MODE% > r4-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
echo MD5
|
||||
cd crypto\md5\asm
|
||||
perl md5-586.pl %ASM_MODE% > m5-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
echo SHA1
|
||||
cd crypto\sha\asm
|
||||
perl sha1-586.pl %ASM_MODE% > s1-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
echo RIPEMD160
|
||||
cd crypto\ripemd\asm
|
||||
perl rmd-586.pl %ASM_MODE% > rm-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
echo RC5\32
|
||||
cd crypto\rc5\asm
|
||||
perl rc5-586.pl %ASM_MODE% > r5-nw.asm
|
||||
cd ..\..\..
|
||||
|
||||
rem ===============================================================
|
||||
rem
|
||||
:do_config
|
||||
|
||||
echo .
|
||||
echo configure options: %CONFIG_OPTS% %BLD_TARGET%
|
||||
echo .
|
||||
perl configure %CONFIG_OPTS% %BLD_TARGET%
|
||||
|
||||
perl util\mkfiles.pl >MINFO
|
||||
|
||||
echo .
|
||||
echo mk1mf.pl options: %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET%
|
||||
echo .
|
||||
perl util\mk1mf.pl %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET% >%NLM_MAKE%
|
||||
|
||||
echo The makefile "%NLM_MAKE%" has been created use your maketool to
|
||||
echo build (ex: gmake -f %NLM_MAKE%)
|
||||
goto end
|
||||
|
||||
rem ===============================================================
|
||||
rem
|
||||
:no_target
|
||||
echo .
|
||||
echo . No build target specified!!!
|
||||
echo .
|
||||
echo . usage: build [target] [debug opts] [assembly opts] [configure opts]
|
||||
echo .
|
||||
echo . target - "netware-clib" - CLib NetWare build
|
||||
echo . - "netware-libc" - LibC NKS NetWare build
|
||||
echo .
|
||||
echo . debug opts - "debug" - build debug
|
||||
echo .
|
||||
echo . assembly opts - "nw-mwasm" - use Metrowerks assembler
|
||||
echo . "nw-nasm" - use NASM assembler
|
||||
echo . "no-asm" - don't use assembly
|
||||
echo .
|
||||
echo . configure opts- all unrecognized arguments are passed to the
|
||||
echo . perl configure script
|
||||
echo .
|
||||
echo . If no debug or assembly opts are specified the default is to build
|
||||
echo . non-debug without assembly
|
||||
echo .
|
||||
|
||||
|
||||
:end
|
||||
@@ -1,112 +0,0 @@
|
||||
@echo off
|
||||
|
||||
rem Batch file to copy OpenSSL stuff to a NetWare server for testing
|
||||
|
||||
rem This batch file will create an "opensssl" directory at the root of the
|
||||
rem specified NetWare drive and copy the required files to run the tests.
|
||||
rem It should be run from inside the "openssl\netware" subdirectory.
|
||||
|
||||
rem Usage:
|
||||
rem cpy_tests.bat <test subdirectory> <NetWare drive>
|
||||
rem <test subdirectory> - out_nw.dbg | out_nw
|
||||
rem <NetWare drive> - any mapped drive letter
|
||||
rem
|
||||
rem example ( copy from debug build to m: dirve ):
|
||||
rem cpy_tests.bat out_nw.dbg m:
|
||||
rem
|
||||
rem CAUTION: If a directory named OpenSSL exists on the target drive
|
||||
rem it will be deleted first.
|
||||
|
||||
|
||||
if "%1" == "" goto usage
|
||||
if "%2" == "" goto usage
|
||||
|
||||
rem Assume running in \openssl directory unless cpy_tests.bat exists then
|
||||
rem it must be the \openssl\netware directory
|
||||
set loc=.
|
||||
if exist cpy_tests.bat set loc=..
|
||||
|
||||
rem make sure the local build subdirectory specified is valid
|
||||
if not exist %loc%\%1\NUL goto invalid_dir
|
||||
|
||||
rem make sure target drive is valid
|
||||
if not exist %2\NUL goto invalid_drive
|
||||
|
||||
rem If an OpenSSL directory exists on the target drive, remove it
|
||||
if exist %2\openssl\NUL goto remove_openssl
|
||||
goto do_copy
|
||||
|
||||
:remove_openssl
|
||||
echo .
|
||||
echo OpenSSL directory exists on %2 - it will be removed!
|
||||
pause
|
||||
rmdir %2\openssl /s /q
|
||||
|
||||
:do_copy
|
||||
rem make an "openssl" directory and others at the root of the NetWare drive
|
||||
mkdir %2\openssl
|
||||
mkdir %2\openssl\test_out
|
||||
mkdir %2\openssl\apps
|
||||
mkdir %2\openssl\certs
|
||||
mkdir %2\openssl\test
|
||||
|
||||
|
||||
rem copy the test nlms
|
||||
copy %loc%\%1\*.nlm %2\openssl\
|
||||
|
||||
rem copy the test perl script
|
||||
copy %loc%\netware\do_tests.pl %2\openssl\
|
||||
|
||||
rem copy the certs directory stuff
|
||||
xcopy %loc%\certs\*.* %2\openssl\certs\ /s
|
||||
|
||||
rem copy the test directory stuff
|
||||
copy %loc%\test\CAss.cnf %2\openssl\test\
|
||||
copy %loc%\test\Uss.cnf %2\openssl\test\
|
||||
copy %loc%\test\pkcs7.pem %2\openssl\test\
|
||||
copy %loc%\test\pkcs7-1.pem %2\openssl\test\
|
||||
copy %loc%\test\testcrl.pem %2\openssl\test\
|
||||
copy %loc%\test\testp7.pem %2\openssl\test\
|
||||
copy %loc%\test\testreq2.pem %2\openssl\test\
|
||||
copy %loc%\test\testrsa.pem %2\openssl\test\
|
||||
copy %loc%\test\testsid.pem %2\openssl\test\
|
||||
copy %loc%\test\testx509.pem %2\openssl\test\
|
||||
copy %loc%\test\v3-cert1.pem %2\openssl\test\
|
||||
copy %loc%\test\v3-cert2.pem %2\openssl\test\
|
||||
|
||||
rem copy the apps directory stuff
|
||||
copy %loc%\apps\client.pem %2\openssl\apps\
|
||||
copy %loc%\apps\server.pem %2\openssl\apps\
|
||||
copy %loc%\apps\openssl.cnf %2\openssl\apps\
|
||||
|
||||
echo .
|
||||
echo Tests copied
|
||||
echo Run the test script at the console by typing:
|
||||
echo "Perl \openssl\do_tests.pl"
|
||||
echo .
|
||||
echo Make sure the Search path includes the OpenSSL subdirectory
|
||||
|
||||
goto end
|
||||
|
||||
:invalid_dir
|
||||
echo.
|
||||
echo Invalid build directory specified: %1
|
||||
echo.
|
||||
goto usage
|
||||
|
||||
:invalid_drive
|
||||
echo.
|
||||
echo Invalid drive: %2
|
||||
echo.
|
||||
goto usage
|
||||
|
||||
:usage
|
||||
echo.
|
||||
echo usage: cpy_tests.bat [test subdirectory] [NetWare drive]
|
||||
echo [test subdirectory] - out_nw_clib.dbg, out_nw_libc.dbg, etc.
|
||||
echo [NetWare drive] - any mapped drive letter
|
||||
echo.
|
||||
echo example: cpy_test out_nw_clib.dbg M:
|
||||
echo (copy from clib debug build area to M: drive)
|
||||
|
||||
:end
|
||||
@@ -1,585 +0,0 @@
|
||||
# perl script to run OpenSSL tests
|
||||
|
||||
|
||||
my $base_path = "\\openssl";
|
||||
|
||||
my $output_path = "$base_path\\test_out";
|
||||
my $cert_path = "$base_path\\certs";
|
||||
my $test_path = "$base_path\\test";
|
||||
my $app_path = "$base_path\\apps";
|
||||
|
||||
my $tmp_cert = "$output_path\\cert.tmp";
|
||||
my $OpenSSL_config = "$app_path\\openssl.cnf";
|
||||
my $log_file = "$output_path\\tests.log";
|
||||
|
||||
my $pause = 0;
|
||||
|
||||
|
||||
# process the command line args to see if they wanted us to pause
|
||||
# between executing each command
|
||||
foreach $i (@ARGV)
|
||||
{
|
||||
if ($i =~ /^-p$/)
|
||||
{ $pause=1; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
main();
|
||||
|
||||
|
||||
############################################################################
|
||||
sub main()
|
||||
{
|
||||
# delete all the output files in the output directory
|
||||
unlink <$output_path\\*.*>;
|
||||
|
||||
# open the main log file
|
||||
open(OUT, ">$log_file") || die "unable to open $log_file\n";
|
||||
|
||||
|
||||
algorithm_tests();
|
||||
encryption_tests();
|
||||
pem_tests();
|
||||
verify_tests();
|
||||
ssl_tests();
|
||||
ca_tests();
|
||||
|
||||
close(OUT);
|
||||
|
||||
print("\nCompleted running tests.\n\n");
|
||||
print("Check log file for errors: $log_file\n");
|
||||
}
|
||||
|
||||
############################################################################
|
||||
sub algorithm_tests
|
||||
{
|
||||
my $i;
|
||||
my $outFile;
|
||||
my @tests = ( rsa_test, destest, ideatest, bftest, shatest, sha1test,
|
||||
md5test, dsatest, md2test, mdc2test, rc2test, rc4test, randtest,
|
||||
dhtest, exptest );
|
||||
|
||||
print( "\nRUNNING CRYPTO ALGORITHM TESTS:\n\n");
|
||||
|
||||
print( OUT "\n========================================================\n");
|
||||
print( OUT "CRYPTO ALGORITHM TESTS:\n\n");
|
||||
|
||||
foreach $i (@tests)
|
||||
{
|
||||
$outFile = "$output_path\\$i.out";
|
||||
system("$i > $outFile");
|
||||
log_desc("Test: $i\.nlm:");
|
||||
log_output("", $outFile );
|
||||
}
|
||||
}
|
||||
|
||||
############################################################################
|
||||
sub encryption_tests
|
||||
{
|
||||
my $i;
|
||||
my $outFile;
|
||||
my @enc_tests = ( "enc", "rc4", "des-cfb", "des-ede-cfb", "des-ede3-cfb",
|
||||
"des-ofb", "des-ede-ofb", "des-ede3-ofb",
|
||||
"des-ecb", "des-ede", "des-ede3", "des-cbc",
|
||||
"des-ede-cbc", "des-ede3-cbc", "idea-ecb", "idea-cfb",
|
||||
"idea-ofb", "idea-cbc", "rc2-ecb", "rc2-cfb",
|
||||
"rc2-ofb", "rc2-cbc", "bf-ecb", "bf-cfb",
|
||||
"bf-ofb", "bf-cbc" );
|
||||
|
||||
my $input = "$base_path\\do_tests.pl";
|
||||
my $cipher = "$output_path\\cipher.out";
|
||||
my $clear = "$output_path\\clear.out";
|
||||
|
||||
print( "\nRUNNING ENCRYPTION & DECRYPTION TESTS:\n\n");
|
||||
|
||||
print( OUT "\n========================================================\n");
|
||||
print( OUT "FILE ENCRYPTION & DECRYPTION TESTS:\n\n");
|
||||
|
||||
foreach $i (@enc_tests)
|
||||
{
|
||||
log_desc("Testing: $i");
|
||||
|
||||
# do encryption
|
||||
$outFile = "$output_path\\enc.out";
|
||||
system("openssl2 $i -e -bufsize 113 -k test -in $input -out $cipher > $outFile" );
|
||||
log_output("Encrypting: $input --> $cipher", $outFile);
|
||||
|
||||
# do decryption
|
||||
$outFile = "$output_path\\dec.out";
|
||||
system("openssl2 $i -d -bufsize 157 -k test -in $cipher -out $clear > $outFile");
|
||||
log_output("Decrypting: $cipher --> $clear", $outFile);
|
||||
|
||||
# compare files
|
||||
$x = compare_files( $input, $clear, 1);
|
||||
if ( $x == 0 )
|
||||
{
|
||||
print( "SUCCESS - files match: $input, $clear\n");
|
||||
print( OUT "SUCCESS - files match: $input, $clear\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
print( "ERROR: files don't match\n");
|
||||
print( OUT "ERROR: files don't match\n");
|
||||
}
|
||||
|
||||
do_wait();
|
||||
|
||||
# Now do the same encryption but use Base64
|
||||
|
||||
# do encryption B64
|
||||
$outFile = "$output_path\\B64enc.out";
|
||||
system("openssl2 $i -a -e -bufsize 113 -k test -in $input -out $cipher > $outFile");
|
||||
log_output("Encrypting(B64): $cipher --> $clear", $outFile);
|
||||
|
||||
# do decryption B64
|
||||
$outFile = "$output_path\\B64dec.out";
|
||||
system("openssl2 $i -a -d -bufsize 157 -k test -in $cipher -out $clear > $outFile");
|
||||
log_output("Decrypting(B64): $cipher --> $clear", $outFile);
|
||||
|
||||
# compare files
|
||||
$x = compare_files( $input, $clear, 1);
|
||||
if ( $x == 0 )
|
||||
{
|
||||
print( "SUCCESS - files match: $input, $clear\n");
|
||||
print( OUT "SUCCESS - files match: $input, $clear\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
print( "ERROR: files don't match\n");
|
||||
print( OUT "ERROR: files don't match\n");
|
||||
}
|
||||
|
||||
do_wait();
|
||||
|
||||
} # end foreach
|
||||
|
||||
# delete the temporary files
|
||||
unlink($cipher);
|
||||
unlink($clear);
|
||||
}
|
||||
|
||||
|
||||
############################################################################
|
||||
sub pem_tests
|
||||
{
|
||||
my $i;
|
||||
my $tmp_out;
|
||||
my $outFile = "$output_path\\pem.out";
|
||||
|
||||
my %pem_tests = (
|
||||
"crl" => "testcrl.pem",
|
||||
"pkcs7" => "testp7.pem",
|
||||
"req" => "testreq2.pem",
|
||||
"rsa" => "testrsa.pem",
|
||||
"x509" => "testx509.pem",
|
||||
"x509" => "v3-cert1.pem",
|
||||
"sess_id" => "testsid.pem" );
|
||||
|
||||
|
||||
print( "\nRUNNING PEM TESTS:\n\n");
|
||||
|
||||
print( OUT "\n========================================================\n");
|
||||
print( OUT "PEM TESTS:\n\n");
|
||||
|
||||
foreach $i (keys(%pem_tests))
|
||||
{
|
||||
log_desc( "Testing: $i");
|
||||
|
||||
my $input = "$test_path\\$pem_tests{$i}";
|
||||
|
||||
$tmp_out = "$output_path\\$pem_tests{$i}";
|
||||
|
||||
if ($i ne "req" )
|
||||
{
|
||||
system("openssl2 $i -in $input -out $tmp_out > $outFile");
|
||||
log_output( "openssl2 $i -in $input -out $tmp_out", $outFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
system("openssl2 $i -in $input -out $tmp_out -config $OpenSSL_config > $outFile");
|
||||
log_output( "openssl2 $i -in $input -out $tmp_out -config $OpenSSL_config", $outFile );
|
||||
}
|
||||
|
||||
$x = compare_files( $input, $tmp_out);
|
||||
if ( $x == 0 )
|
||||
{
|
||||
print( "SUCCESS - files match: $input, $tmp_out\n");
|
||||
print( OUT "SUCCESS - files match: $input, $tmp_out\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
print( "ERROR: files don't match\n");
|
||||
print( OUT "ERROR: files don't match\n");
|
||||
}
|
||||
do_wait();
|
||||
|
||||
} # end foreach
|
||||
}
|
||||
|
||||
|
||||
############################################################################
|
||||
sub verify_tests
|
||||
{
|
||||
my $i;
|
||||
my $outFile = "$output_path\\verify.out";
|
||||
|
||||
my @cert_files = <$cert_path\\*.pem>;
|
||||
|
||||
print( "\nRUNNING VERIFY TESTS:\n\n");
|
||||
|
||||
print( OUT "\n========================================================\n");
|
||||
print( OUT "VERIFY TESTS:\n\n");
|
||||
|
||||
make_tmp_cert_file();
|
||||
|
||||
foreach $i (@cert_files)
|
||||
{
|
||||
system("openssl2 verify -CAfile $tmp_cert $i >$outFile");
|
||||
log_desc("Verifying cert: $i");
|
||||
log_output("openssl2 verify -CAfile $tmp_cert $i", $outFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
############################################################################
|
||||
sub ssl_tests
|
||||
{
|
||||
my $outFile = "$output_path\\ssl_tst.out";
|
||||
|
||||
print( "\nRUNNING SSL TESTS:\n\n");
|
||||
|
||||
print( OUT "\n========================================================\n");
|
||||
print( OUT "SSL TESTS:\n\n");
|
||||
|
||||
make_tmp_cert_file();
|
||||
|
||||
system("ssltest -ssl2 >$outFile");
|
||||
log_desc("Testing sslv2:");
|
||||
log_output("ssltest -ssl2", $outFile);
|
||||
|
||||
system("ssltest -ssl2 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2 with server authentication:");
|
||||
log_output("ssltest -ssl2 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -ssl2 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2 with client authentication:");
|
||||
log_output("ssltest -ssl2 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -ssl2 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2 with both client and server authentication:");
|
||||
log_output("ssltest -ssl2 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -ssl3 >$outFile");
|
||||
log_desc("Testing sslv3:");
|
||||
log_output("ssltest -ssl3", $outFile);
|
||||
|
||||
system("ssltest -ssl3 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv3 with server authentication:");
|
||||
log_output("ssltest -ssl3 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -ssl3 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv3 with client authentication:");
|
||||
log_output("ssltest -ssl3 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -ssl3 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv3 with both client and server authentication:");
|
||||
log_output("ssltest -ssl3 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest >$outFile");
|
||||
log_desc("Testing sslv2/sslv3:");
|
||||
log_output("ssltest", $outFile);
|
||||
|
||||
system("ssltest -server_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with server authentication:");
|
||||
log_output("ssltest -server_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with client authentication:");
|
||||
log_output("ssltest -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with both client and server authentication:");
|
||||
log_output("ssltest -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 >$outFile");
|
||||
log_desc("Testing sslv2 via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -dhe1024dsa -v >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with 1024 bit DHE via BIO pair:");
|
||||
log_output("ssltest -bio_pair -dhe1024dsa -v", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2 with server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2 with client authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2 with both client and server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 >$outFile");
|
||||
log_desc("Testing sslv3 via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv3 with server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv3 with client authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv3 with both client and server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -bio_pair >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 via BIO pair:");
|
||||
log_output("ssltest -bio_pair", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -server_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -server_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with client authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -client_auth -CAfile $tmp_cert", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with both client and server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
}
|
||||
|
||||
|
||||
############################################################################
|
||||
sub ca_tests
|
||||
{
|
||||
my $outFile = "$output_path\\ca_tst.out";
|
||||
|
||||
my($CAkey) = "$output_path\\keyCA.ss";
|
||||
my($CAcert) = "$output_path\\certCA.ss";
|
||||
my($CAserial) = "$output_path\\certCA.srl";
|
||||
my($CAreq) = "$output_path\\reqCA.ss";
|
||||
my($CAreq2) = "$output_path\\req2CA.ss";
|
||||
|
||||
my($CAconf) = "$test_path\\CAss.cnf";
|
||||
|
||||
my($Uconf) = "$test_path\\Uss.cnf";
|
||||
|
||||
my($Ukey) = "$output_path\\keyU.ss";
|
||||
my($Ureq) = "$output_path\\reqU.ss";
|
||||
my($Ucert) = "$output_path\\certU.ss";
|
||||
|
||||
print( "\nRUNNING CA TESTS:\n\n");
|
||||
|
||||
print( OUT "\n========================================================\n");
|
||||
print( OUT "CA TESTS:\n");
|
||||
|
||||
system("openssl2 req -config $CAconf -out $CAreq -keyout $CAkey -new >$outFile");
|
||||
log_desc("Make a certificate request using req:");
|
||||
log_output("openssl2 req -config $CAconf -out $CAreq -keyout $CAkey -new", $outFile);
|
||||
|
||||
system("openssl2 x509 -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey >$outFile");
|
||||
log_desc("Convert the certificate request into a self signed certificate using x509:");
|
||||
log_output("openssl2 x509 -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey", $outFile);
|
||||
|
||||
system("openssl2 x509 -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2 >$outFile");
|
||||
log_desc("Convert a certificate into a certificate request using 'x509':");
|
||||
log_output("openssl2 x509 -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2", $outFile);
|
||||
|
||||
system("openssl2 req -config $OpenSSL_config -verify -in $CAreq -noout >$outFile");
|
||||
log_output("openssl2 req -config $OpenSSL_config -verify -in $CAreq -noout", $outFile);
|
||||
|
||||
system("openssl2 req -config $OpenSSL_config -verify -in $CAreq2 -noout >$outFile");
|
||||
log_output( "openssl2 req -config $OpenSSL_config -verify -in $CAreq2 -noout", $outFile);
|
||||
|
||||
system("openssl2 verify -CAfile $CAcert $CAcert >$outFile");
|
||||
log_output("openssl2 verify -CAfile $CAcert $CAcert", $outFile);
|
||||
|
||||
system("openssl2 req -config $Uconf -out $Ureq -keyout $Ukey -new >$outFile");
|
||||
log_desc("Make another certificate request using req:");
|
||||
log_output("openssl2 req -config $Uconf -out $Ureq -keyout $Ukey -new", $outFile);
|
||||
|
||||
system("openssl2 x509 -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey -CAserial $CAserial >$outFile");
|
||||
log_desc("Sign certificate request with the just created CA via x509:");
|
||||
log_output("openssl2 x509 -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey -CAserial $CAserial", $outFile);
|
||||
|
||||
system("openssl2 verify -CAfile $CAcert $Ucert >$outFile");
|
||||
log_output("openssl2 verify -CAfile $CAcert $Ucert", $outFile);
|
||||
|
||||
system("openssl2 x509 -subject -issuer -startdate -enddate -noout -in $Ucert >$outFile");
|
||||
log_desc("Certificate details");
|
||||
log_output("openssl2 x509 -subject -issuer -startdate -enddate -noout -in $Ucert", $outFile);
|
||||
|
||||
print(OUT "-- \n");
|
||||
print(OUT "The generated CA certificate is $CAcert\n");
|
||||
print(OUT "The generated CA private key is $CAkey\n");
|
||||
print(OUT "The current CA signing serial number is in $CAserial\n");
|
||||
|
||||
print(OUT "The generated user certificate is $Ucert\n");
|
||||
print(OUT "The generated user private key is $Ukey\n");
|
||||
print(OUT "--\n");
|
||||
}
|
||||
|
||||
############################################################################
|
||||
sub log_output( $ $ )
|
||||
{
|
||||
my( $desc, $file ) = @_;
|
||||
my($error) = 0;
|
||||
my($key);
|
||||
my($msg);
|
||||
|
||||
if ($desc)
|
||||
{
|
||||
print("$desc\n");
|
||||
print(OUT "$desc\n");
|
||||
}
|
||||
|
||||
# loop waiting for test program to complete
|
||||
while ( stat($file) == 0)
|
||||
{ print(". "); sleep(1); }
|
||||
|
||||
|
||||
# copy test output to log file
|
||||
open(IN, "<$file");
|
||||
while (<IN>)
|
||||
{
|
||||
print(OUT $_);
|
||||
if ( $_ =~ /ERROR/ )
|
||||
{
|
||||
$error = 1;
|
||||
}
|
||||
}
|
||||
# close and delete the temporary test output file
|
||||
close(IN);
|
||||
unlink($file);
|
||||
|
||||
if ( $error == 0 )
|
||||
{
|
||||
$msg = "Test Succeeded";
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = "Test Failed";
|
||||
}
|
||||
|
||||
print(OUT "$msg\n");
|
||||
|
||||
if ($pause)
|
||||
{
|
||||
print("$msg - press ENTER to continue...");
|
||||
$key = getc;
|
||||
print("\n");
|
||||
}
|
||||
|
||||
# Several of the testing scripts run a loop loading the
|
||||
# same NLM with different options.
|
||||
# On slow NetWare machines there appears to be some delay in the
|
||||
# OS actually unloading the test nlms and the OS complains about.
|
||||
# the NLM already being loaded. This additional pause is to
|
||||
# to help provide a little more time for unloading before trying to
|
||||
# load again.
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
|
||||
############################################################################
|
||||
sub log_desc( $ )
|
||||
{
|
||||
my( $desc ) = @_;
|
||||
|
||||
print("\n");
|
||||
print("$desc\n");
|
||||
|
||||
print(OUT "\n");
|
||||
print(OUT "$desc\n");
|
||||
print(OUT "======================================\n");
|
||||
}
|
||||
|
||||
############################################################################
|
||||
sub compare_files( $ $ $ )
|
||||
{
|
||||
my( $file1, $file2, $binary ) = @_;
|
||||
my( $n1, $n2, $b1, $b2 );
|
||||
my($ret) = 1;
|
||||
|
||||
open(IN0, $file1) || die "\nunable to open $file1\n";
|
||||
open(IN1, $file2) || die "\nunable to open $file2\n";
|
||||
|
||||
if ($binary)
|
||||
{
|
||||
binmode IN0;
|
||||
binmode IN1;
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
$n1 = read(IN0, $b1, 512);
|
||||
$n2 = read(IN1, $b2, 512);
|
||||
|
||||
if ($n1 != $n2) {last;}
|
||||
if ($b1 != $b2) {last;}
|
||||
|
||||
if ($n1 == 0)
|
||||
{
|
||||
$ret = 0;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(IN0);
|
||||
close(IN1);
|
||||
return($ret);
|
||||
}
|
||||
|
||||
############################################################################
|
||||
sub do_wait()
|
||||
{
|
||||
my($key);
|
||||
|
||||
if ($pause)
|
||||
{
|
||||
print("Press ENTER to continue...");
|
||||
$key = getc;
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
############################################################################
|
||||
sub make_tmp_cert_file()
|
||||
{
|
||||
my @cert_files = <$cert_path\\*.pem>;
|
||||
|
||||
# delete the file if it already exists
|
||||
unlink($tmp_cert);
|
||||
|
||||
open( TMP_CERT, ">$tmp_cert") || die "\nunable to open $tmp_cert\n";
|
||||
|
||||
print("building temporary cert file\n");
|
||||
|
||||
# create a temporary cert file that contains all the certs
|
||||
foreach $i (@cert_files)
|
||||
{
|
||||
open( IN_CERT, $i ) || die "\nunable to open $i\n";
|
||||
|
||||
for(;;)
|
||||
{
|
||||
$n = sysread(IN_CERT, $data, 1024);
|
||||
|
||||
if ($n == 0)
|
||||
{
|
||||
close(IN_CERT);
|
||||
last;
|
||||
};
|
||||
|
||||
syswrite(TMP_CERT, $data, $n);
|
||||
}
|
||||
}
|
||||
|
||||
close( TMP_CERT );
|
||||
}
|
||||
@@ -1,254 +0,0 @@
|
||||
An initial review of the OpenSSL code was done to determine how many
|
||||
global variables where present. The idea was to determine the amount of
|
||||
work required to pull the globals into an instance data structure in
|
||||
order to build a Library NLM for NetWare. This file contains the results
|
||||
of the review. Each file is listed along with the globals in the file.
|
||||
The initial review was done very quickly so this list is probably
|
||||
not a comprehensive list.
|
||||
|
||||
|
||||
cryptlib.c
|
||||
===========================================
|
||||
|
||||
static STACK *app_locks=NULL;
|
||||
|
||||
static STACK_OF(CRYPTO_dynlock) *dyn_locks=NULL;
|
||||
|
||||
static void (MS_FAR *locking_callback)(int mode,int type,
|
||||
const char *file,int line)=NULL;
|
||||
static int (MS_FAR *add_lock_callback)(int *pointer,int amount,
|
||||
int type,const char *file,int line)=NULL;
|
||||
static unsigned long (MS_FAR *id_callback)(void)=NULL;
|
||||
static struct CRYPTO_dynlock_value *(MS_FAR *dynlock_create_callback)
|
||||
(const char *file,int line)=NULL;
|
||||
static void (MS_FAR *dynlock_lock_callback)(int mode,
|
||||
struct CRYPTO_dynlock_value *l, const char *file,int line)=NULL;
|
||||
static void (MS_FAR *dynlock_destroy_callback)(struct CRYPTO_dynlock_value *l,
|
||||
const char *file,int line)=NULL;
|
||||
|
||||
|
||||
mem.c
|
||||
===========================================
|
||||
static int allow_customize = 1; /* we provide flexible functions for */
|
||||
static int allow_customize_debug = 1;/* exchanging memory-related functions at
|
||||
|
||||
/* may be changed as long as `allow_customize' is set */
|
||||
static void *(*malloc_locked_func)(size_t) = malloc;
|
||||
static void (*free_locked_func)(void *) = free;
|
||||
static void *(*malloc_func)(size_t) = malloc;
|
||||
static void *(*realloc_func)(void *, size_t)= realloc;
|
||||
static void (*free_func)(void *) = free;
|
||||
|
||||
/* use default functions from mem_dbg.c */
|
||||
static void (*malloc_debug_func)(void *,int,const char *,int,int)
|
||||
= CRYPTO_dbg_malloc;
|
||||
static void (*realloc_debug_func)(void *,void *,int,const char *,int,int)
|
||||
= CRYPTO_dbg_realloc;
|
||||
static void (*free_debug_func)(void *,int) = CRYPTO_dbg_free;
|
||||
static void (*set_debug_options_func)(long) = CRYPTO_dbg_set_options;
|
||||
static long (*get_debug_options_func)(void) = CRYPTO_dbg_get_options;
|
||||
|
||||
|
||||
mem_dbg.c
|
||||
===========================================
|
||||
static int mh_mode=CRYPTO_MEM_CHECK_OFF;
|
||||
static unsigned long order = 0; /* number of memory requests */
|
||||
static LHASH *mh=NULL; /* hash-table of memory requests (address as key) */
|
||||
|
||||
static LHASH *amih=NULL; /* hash-table with those app_mem_info_st's */
|
||||
static long options = /* extra information to be recorded */
|
||||
static unsigned long disabling_thread = 0;
|
||||
|
||||
|
||||
err.c
|
||||
===========================================
|
||||
static LHASH *error_hash=NULL;
|
||||
static LHASH *thread_hash=NULL;
|
||||
|
||||
several files have routines with static "init" to track if error strings
|
||||
have been loaded ( may not want seperate error strings for each process )
|
||||
The "init" variable can't be left "global" because the error has is a ptr
|
||||
that is malloc'ed. The malloc'ed error has is dependant on the "init"
|
||||
vars.
|
||||
|
||||
files:
|
||||
pem_err.c
|
||||
cpt_err.c
|
||||
pk12err.c
|
||||
asn1_err.c
|
||||
bio_err.c
|
||||
bn_err.c
|
||||
buf_err.c
|
||||
comp_err.c
|
||||
conf_err.c
|
||||
cpt_err.c
|
||||
dh_err.c
|
||||
dsa_err.c
|
||||
dso_err.c
|
||||
evp_err.c
|
||||
obj_err.c
|
||||
pkcs7err.c
|
||||
rand_err.c
|
||||
rsa_err.c
|
||||
rsar_err.c
|
||||
ssl_err.c
|
||||
x509_err.c
|
||||
v3err.c
|
||||
err.c
|
||||
|
||||
These file have similar "init" globals but they are for other stuff not
|
||||
error strings:
|
||||
|
||||
bn_lib.c
|
||||
ecc_enc.c
|
||||
s23_clnt.c
|
||||
s23_meth.c
|
||||
s23_srvr.c
|
||||
s2_clnt.c
|
||||
s2_lib.c
|
||||
s2_meth.c
|
||||
s2_srvr.c
|
||||
s3_clnt.c
|
||||
s3_lib.c
|
||||
s3_srvr.c
|
||||
t1_clnt.c
|
||||
t1_meth.c
|
||||
t1_srvr.c
|
||||
|
||||
rand_lib.c
|
||||
===========================================
|
||||
static RAND_METHOD *rand_meth= &rand_ssleay_meth;
|
||||
|
||||
md_rand.c
|
||||
===========================================
|
||||
static int state_num=0,state_index=0;
|
||||
static unsigned char state[STATE_SIZE+MD_DIGEST_LENGTH];
|
||||
static unsigned char md[MD_DIGEST_LENGTH];
|
||||
static long md_count[2]={0,0};
|
||||
static double entropy=0;
|
||||
static int initialized=0;
|
||||
|
||||
/* This should be set to 1 only when ssleay_rand_add() is called inside
|
||||
an already locked state, so it doesn't try to lock and thereby cause
|
||||
a hang. And it should always be reset back to 0 before unlocking. */
|
||||
static int add_do_not_lock=0;
|
||||
|
||||
obj_dat.c
|
||||
============================================
|
||||
static int new_nid=NUM_NID;
|
||||
static LHASH *added=NULL;
|
||||
|
||||
b_sock.c
|
||||
===========================================
|
||||
static unsigned long BIO_ghbn_hits=0L;
|
||||
static unsigned long BIO_ghbn_miss=0L;
|
||||
static struct ghbn_cache_st
|
||||
{
|
||||
char name[129];
|
||||
struct hostent *ent;
|
||||
unsigned long order;
|
||||
} ghbn_cache[GHBN_NUM];
|
||||
|
||||
static int wsa_init_done=0;
|
||||
|
||||
|
||||
bio_lib.c
|
||||
===========================================
|
||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *bio_meth=NULL;
|
||||
static int bio_meth_num=0;
|
||||
|
||||
|
||||
bn_lib.c
|
||||
========================================
|
||||
static int bn_limit_bits=0;
|
||||
static int bn_limit_num=8; /* (1<<bn_limit_bits) */
|
||||
static int bn_limit_bits_low=0;
|
||||
static int bn_limit_num_low=8; /* (1<<bn_limit_bits_low) */
|
||||
static int bn_limit_bits_high=0;
|
||||
static int bn_limit_num_high=8; /* (1<<bn_limit_bits_high) */
|
||||
static int bn_limit_bits_mont=0;
|
||||
static int bn_limit_num_mont=8; /* (1<<bn_limit_bits_mont) */
|
||||
|
||||
conf_lib.c
|
||||
========================================
|
||||
static CONF_METHOD *default_CONF_method=NULL;
|
||||
|
||||
dh_lib.c
|
||||
========================================
|
||||
static DH_METHOD *default_DH_method;
|
||||
static int dh_meth_num = 0;
|
||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dh_meth = NULL;
|
||||
|
||||
dsa_lib.c
|
||||
========================================
|
||||
static DSA_METHOD *default_DSA_method;
|
||||
static int dsa_meth_num = 0;
|
||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dsa_meth = NULL;
|
||||
|
||||
dso_lib.c
|
||||
========================================
|
||||
static DSO_METHOD *default_DSO_meth = NULL;
|
||||
|
||||
rsa_lib.c
|
||||
========================================
|
||||
static RSA_METHOD *default_RSA_meth=NULL;
|
||||
static int rsa_meth_num=0;
|
||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *rsa_meth=NULL;
|
||||
|
||||
x509_trs.c
|
||||
=======================================
|
||||
static int (*default_trust)(int id, X509 *x, int flags) = obj_trust;
|
||||
static STACK_OF(X509_TRUST) *trtable = NULL;
|
||||
|
||||
x509_req.c
|
||||
=======================================
|
||||
static int *ext_nids = ext_nid_list;
|
||||
|
||||
o_names.c
|
||||
======================================
|
||||
static LHASH *names_lh=NULL;
|
||||
static STACK_OF(NAME_FUNCS) *name_funcs_stack;
|
||||
static int free_type;
|
||||
static int names_type_num=OBJ_NAME_TYPE_NUM;
|
||||
|
||||
|
||||
th-lock.c - NEED to add support for locking for NetWare
|
||||
==============================================
|
||||
static long *lock_count;
|
||||
(other platform specific globals)
|
||||
|
||||
x_x509.c
|
||||
==============================================
|
||||
static int x509_meth_num = 0;
|
||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_meth = NULL;
|
||||
|
||||
|
||||
evp_pbe.c
|
||||
============================================
|
||||
static STACK *pbe_algs;
|
||||
|
||||
evp_key.c
|
||||
============================================
|
||||
static char prompt_string[80];
|
||||
|
||||
ssl_ciph.c
|
||||
============================================
|
||||
static STACK_OF(SSL_COMP) *ssl_comp_methods=NULL;
|
||||
|
||||
ssl_lib.c
|
||||
=============================================
|
||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_meth=NULL;
|
||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_ctx_meth=NULL;
|
||||
static int ssl_meth_num=0;
|
||||
static int ssl_ctx_meth_num=0;
|
||||
|
||||
ssl_sess.c
|
||||
=============================================
|
||||
static int ssl_session_num=0;
|
||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_session_meth=NULL;
|
||||
|
||||
x509_vfy.c
|
||||
============================================
|
||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_ctx_method=NULL;
|
||||
static int x509_store_ctx_num=0;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
|
||||
Contents of the openssl\netware directory
|
||||
==========================================
|
||||
|
||||
Regular files:
|
||||
|
||||
readme.txt - this file
|
||||
do_tests.pl - perl script used to run the OpenSSL tests on NetWare
|
||||
cpy_tests.bat - batch to to copy test stuff to NetWare server
|
||||
build.bat - batch file to help with builds
|
||||
set_env.bat - batch file to help setup build environments
|
||||
globals.txt - results of initial code review to identify OpenSSL global variables
|
||||
|
||||
|
||||
The following files are generated by the various scripts. They are
|
||||
recreated each time and it is okay to delete them.
|
||||
|
||||
*.def - command files used by Metrowerks linker
|
||||
*.mak - make files generated by mk1mf.pl
|
||||
@@ -1,90 +0,0 @@
|
||||
@echo off
|
||||
|
||||
rem ========================================================================
|
||||
rem Batch file to assist in setting up the necessary enviroment for
|
||||
rem building OpenSSL for NetWare.
|
||||
rem
|
||||
rem usage:
|
||||
rem set_env [target]
|
||||
rem
|
||||
rem target - "netware-clib" - Clib build
|
||||
rem - "netware-libc" - LibC build
|
||||
rem
|
||||
rem
|
||||
|
||||
if "a%1" == "a" goto usage
|
||||
|
||||
set LIBC_BUILD=
|
||||
set CLIB_BUILD=
|
||||
|
||||
if "%1" == "netware-clib" set CLIB_BUILD=Y
|
||||
if "%1" == "netware-clib" set LIBC_BUILD=
|
||||
|
||||
if "%1" == "netware-libc" set LIBC_BUILD=Y
|
||||
if "%1" == "netware-libc" set CLIB_BUILD=
|
||||
|
||||
rem Location of tools (compiler, linker, etc)
|
||||
set TOOLS=d:\i_drive\tools
|
||||
|
||||
rem If Perl for Win32 is not already in your path, add it here
|
||||
set PERL_PATH=
|
||||
|
||||
rem Define path to the Metrowerks command line tools
|
||||
rem ( compiler, assembler, linker)
|
||||
set METROWERKS_PATH=%TOOLS%\codewar\pdk_21\tools\command line tools
|
||||
rem set METROWERKS_PATH=%TOOLS%\codewar\PDK_40\Other Metrowerks Tools\Command Line Tools
|
||||
|
||||
rem If using gnu make define path to utility
|
||||
set GNU_MAKE_PATH=%TOOLS%\gnu
|
||||
|
||||
rem If using ms nmake define path to nmake
|
||||
set MS_NMAKE_PATH=%TOOLS%\msvc\600\bin
|
||||
|
||||
rem If using NASM assembler define path
|
||||
set NASM_PATH=%TOOLS%\nasm
|
||||
|
||||
rem Update path to include tool paths
|
||||
set path=%path%;%METROWERKS_PATH%
|
||||
if not "%GNU_MAKE_PATH%" == "" set path=%path%;%GNU_MAKE_PATH%
|
||||
if not "%MS_NMAKE_PATH%" == "" set path=%path%;%MS_NMAKE_PATH%
|
||||
if not "%NASM_PATH%" == "" set path=%path%;%NASM_PATH%
|
||||
if not "%PERL_PATH%" == "" set path=%path%;%PERL_PATH%
|
||||
|
||||
rem Set MWCIncludes to location of Novell NDK includes
|
||||
if "%LIBC_BUILD%" == "Y" set MWCIncludes=%TOOLS%\ndk\libc\include;%TOOLS%\ndk\libc\include\winsock;.\engines
|
||||
if "%CLIB_BUILD%" == "Y" set MWCIncludes=%TOOLS%\ndk\nwsdk\include\nlm;.\engines
|
||||
set include=
|
||||
|
||||
rem Set Imports to location of Novell NDK import files
|
||||
if "%LIBC_BUILD%" == "Y" set IMPORTS=%TOOLS%\ndk\libc\imports
|
||||
if "%CLIB_BUILD%" == "Y" set IMPORTS=%TOOLS%\ndk\nwsdk\imports
|
||||
|
||||
rem Set PRELUDE to the absolute path of the prelude object to link with in
|
||||
rem the Metrowerks NetWare PDK - NOTE: for Clib builds "clibpre.o" is
|
||||
rem recommended, for LibC NKS builds libcpre.o must be used
|
||||
if "%LIBC_BUILD%" == "Y" set PRELUDE=%IMPORTS%\libcpre.o
|
||||
if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\clibpre.o
|
||||
|
||||
|
||||
if "%LIBC_BUILD%" == "Y" echo Enviroment configured for LibC build
|
||||
if "%LIBC_BUILD%" == "Y" echo use "netware\build.bat netware-libc ..."
|
||||
|
||||
if "%CLIB_BUILD%" == "Y" echo Enviroment configured for CLib build
|
||||
if "%CLIB_BUILD%" == "Y" echo use "netware\build.bat netware-clib ..."
|
||||
goto end
|
||||
|
||||
:usage
|
||||
rem ===============================================================
|
||||
echo .
|
||||
echo . No target build specified!
|
||||
echo .
|
||||
echo . usage: set_env [target]
|
||||
echo .
|
||||
echo . target - "netware-clib" - Clib build
|
||||
echo . - "netware-libc" - LibC build
|
||||
echo .
|
||||
|
||||
|
||||
|
||||
:end
|
||||
|
||||
13
PROBLEMS
13
PROBLEMS
@@ -12,8 +12,8 @@ along the whole library path before it bothers looking for .a libraries. This
|
||||
means that -L switches won't matter unless OpenSSL is built with shared
|
||||
library support.
|
||||
|
||||
The workaround may be to change the following lines in apps/Makefile.ssl and
|
||||
test/Makefile.ssl:
|
||||
The workaround may be to change the following lines in apps/Makefile and
|
||||
test/Makefile:
|
||||
|
||||
LIBCRYPTO=-L.. -lcrypto
|
||||
LIBSSL=-L.. -lssl
|
||||
@@ -90,15 +90,6 @@ failures in other parts of the code.
|
||||
|
||||
Workaround: modify the target to +O2 when building with no-asm.
|
||||
|
||||
* Poor support for AIX shared builds.
|
||||
|
||||
do_aix-shared rule is not flexible enough to parameterize through a
|
||||
config-line. './Configure aix43-cc shared' is working, but not
|
||||
'./Configure aix64-gcc shared'. In latter case make fails to create shared
|
||||
libraries. It's possible to build 64-bit shared libraries by running
|
||||
'env OBJECT_MODE=64 make', but we need more elegant solution. Preferably one
|
||||
supporting even gcc shared builds. See RT#463 for background information.
|
||||
|
||||
* Problems building shared libraries on SCO OpenServer Release 5.0.6
|
||||
with gcc 2.95.3
|
||||
|
||||
|
||||
17
README
17
README
@@ -1,7 +1,7 @@
|
||||
|
||||
OpenSSL 0.9.8-dev XX xxx XXXX
|
||||
OpenSSL 0.9.7f 22 March 2005
|
||||
|
||||
Copyright (c) 1998-2002 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
|
||||
@@ -154,7 +154,7 @@
|
||||
- Stack Traceback (if the application dumps core)
|
||||
|
||||
Report the bug to the OpenSSL project via the Request Tracker
|
||||
(http://www.openssl.org/rt2.html) by mail to:
|
||||
(http://www.openssl.org/support/rt2.html) by mail to:
|
||||
|
||||
openssl-bugs@openssl.org
|
||||
|
||||
@@ -191,4 +191,3 @@
|
||||
# ./Configure dist; make clean
|
||||
# cd ..
|
||||
# diff -ur openssl-orig openssl-work > mydiffs.patch
|
||||
|
||||
|
||||
19
STATUS
19
STATUS
@@ -1,12 +1,21 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2003/02/28 15:17:45 $
|
||||
______________ $Date: 2005/03/22 18:17:22 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.8: Under development...
|
||||
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
|
||||
o OpenSSL 0.9.7a: Released on February 19th, 2003
|
||||
o OpenSSL 0.9.7: Released on December 31st, 2002
|
||||
o OpenSSL 0.9.6m: Released on March 17th, 2004
|
||||
o OpenSSL 0.9.6l: Released on November 4th, 2003
|
||||
o OpenSSL 0.9.6k: Released on September 30th, 2003
|
||||
o OpenSSL 0.9.6j: Released on April 10th, 2003
|
||||
o OpenSSL 0.9.6i: Released on February 19th, 2003
|
||||
o OpenSSL 0.9.6h: Released on December 5th, 2002
|
||||
o OpenSSL 0.9.6g: Released on August 9th, 2002
|
||||
@@ -54,17 +63,9 @@
|
||||
Shared library support for VMS.
|
||||
Kerberos 5 authentication (Heimdal)
|
||||
Constification
|
||||
Compression
|
||||
Attribute Certificate support
|
||||
Certificate Pair support
|
||||
Storage Engines (primarly an LDAP storage engine)
|
||||
Certificate chain validation with full RFC 3280 compatibility
|
||||
|
||||
NEEDS PATCH
|
||||
|
||||
o 0.9.8-dev: COMPLEMENTOFALL and COMPLEMENTOFDEFAULT do not
|
||||
handle ECCdraft cipher suites correctly.
|
||||
|
||||
o apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
|
||||
|
||||
o "OpenSSL STATUS" is never up-to-date.
|
||||
|
||||
@@ -266,6 +266,14 @@ $ falsesum = falsesum + 1
|
||||
$ endif
|
||||
$ if plat_entry .eqs. "VMS" then truesum = truesum + 1
|
||||
$ if plat_entry .eqs. "!VMS" then falsesum = falsesum + 1
|
||||
$ if f$trnlnm("OPENSSL_FIPS") .nes. ""
|
||||
$ then
|
||||
$ if plat_entry .eqs. "OPENSSL_FIPS" then truesum = truesum + 1
|
||||
$ if plat_entry .eqs. "!OPENSSL_FIPS" then falsesum = falsesum + 1
|
||||
$ else
|
||||
$ if plat_entry .eqs. "OPENSSL_FIPS" then falsesum = falsesum + 1
|
||||
$ if plat_entry .eqs. "!OPENSSL_FIPS" then truesum = truesum + 1
|
||||
$ endif
|
||||
$ goto loop1
|
||||
$ endif
|
||||
$ endloop1:
|
||||
@@ -285,7 +293,6 @@ $ if alg_entry .eqs. "" then goto loop2
|
||||
$ if alg_entry .nes. ","
|
||||
$ then
|
||||
$ if alg_entry .eqs. "KRB5" then goto loop ! Special for now
|
||||
$ if alg_entry .eqs. "STATIC_ENGINE" then goto loop ! Special for now
|
||||
$ if f$trnlnm("OPENSSL_NO_"+alg_entry) .nes. "" then goto loop
|
||||
$ goto loop2
|
||||
$ endif
|
||||
|
||||
1
VMS/tcpip_shr_decc.opt
Normal file
1
VMS/tcpip_shr_decc.opt
Normal file
@@ -0,0 +1 @@
|
||||
sys$share:tcpip$ipc_shr.exe/share
|
||||
@@ -3,3 +3,4 @@ Makefile.save
|
||||
der_chop
|
||||
der_chop.bak
|
||||
CA.pl
|
||||
openssl.sha1
|
||||
|
||||
@@ -36,18 +36,24 @@
|
||||
# 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"; # 1 year
|
||||
$CADAYS="-days 1095"; # 3 years
|
||||
$REQ="openssl req $SSLEAY_CONFIG";
|
||||
$CA="openssl ca $SSLEAY_CONFIG";
|
||||
$VERIFY="openssl verify";
|
||||
$X509="openssl x509";
|
||||
$PKCS12="openssl pkcs12";
|
||||
$DAYS="-days 365";
|
||||
$REQ="$openssl req $SSLEAY_CONFIG";
|
||||
$CA="$openssl ca $SSLEAY_CONFIG";
|
||||
$VERIFY="$openssl verify";
|
||||
$X509="$openssl x509";
|
||||
$PKCS12="$openssl pkcs12";
|
||||
|
||||
$CATOP="./demoCA";
|
||||
$CAKEY="cakey.pem";
|
||||
$CAREQ="careq.pem";
|
||||
$CACERT="cacert.pem";
|
||||
|
||||
$DIRMODE = 0777;
|
||||
@@ -100,15 +106,15 @@ foreach (@ARGV) {
|
||||
$RET=$?;
|
||||
} else {
|
||||
print "Making CA certificate ...\n";
|
||||
system ("$REQ -new -keyout " .
|
||||
"${CATOP}/private/$CAKEY -out ${CATOP}/$CAREQ");
|
||||
system ("$CA -create_serial " .
|
||||
"-out ${CATOP}/$CACERT $CADAYS -batch " .
|
||||
"-keyfile ${CATOP}/private/$CAKEY -selfsign " .
|
||||
"-infiles ${CATOP}/$CAREQ ");
|
||||
system ("$REQ -new -x509 -keyout " .
|
||||
"${CATOP}/private/$CAKEY -out ${CATOP}/$CACERT $DAYS");
|
||||
$RET=$?;
|
||||
}
|
||||
}
|
||||
if (! -f "${CATOP}/serial" ) {
|
||||
system ("$X509 -in ${CATOP}/$CACERT -noout "
|
||||
. "-next_serial -out ${CATOP}/serial");
|
||||
}
|
||||
} elsif (/^-pkcs12$/) {
|
||||
my $cname = $ARGV[1];
|
||||
$cname = "My Certificate" unless defined $cname;
|
||||
|
||||
23
apps/CA.sh
23
apps/CA.sh
@@ -30,16 +30,16 @@
|
||||
# default openssl.cnf file has setup as per the following
|
||||
# demoCA ... where everything is stored
|
||||
|
||||
DAYS="-days 365" # 1 year
|
||||
CADAYS="-days 1095" # 3 years
|
||||
REQ="openssl req $SSLEAY_CONFIG"
|
||||
CA="openssl ca $SSLEAY_CONFIG"
|
||||
VERIFY="openssl verify"
|
||||
X509="openssl x509"
|
||||
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"
|
||||
|
||||
CATOP=./demoCA
|
||||
CAKEY=./cakey.pem
|
||||
CAREQ=./careq.pem
|
||||
CACERT=./cacert.pem
|
||||
|
||||
for i
|
||||
@@ -72,7 +72,7 @@ case $i in
|
||||
mkdir ${CATOP}/crl
|
||||
mkdir ${CATOP}/newcerts
|
||||
mkdir ${CATOP}/private
|
||||
echo "00" > ${CATOP}/serial
|
||||
echo "01" > ${CATOP}/serial
|
||||
touch ${CATOP}/index.txt
|
||||
fi
|
||||
if [ ! -f ${CATOP}/private/$CAKEY ]; then
|
||||
@@ -85,11 +85,8 @@ case $i in
|
||||
RET=$?
|
||||
else
|
||||
echo "Making CA certificate ..."
|
||||
$REQ -new -keyout ${CATOP}/private/$CAKEY \
|
||||
-out ${CATOP}/$CAREQ
|
||||
$CA -out ${CATOP}/$CACERT $CADAYS -batch \
|
||||
-keyfile ${CATOP}/private/$CAKEY -selfsign \
|
||||
-infiles ${CATOP}/$CAREQ
|
||||
$REQ -new -x509 -keyout ${CATOP}/private/$CAKEY \
|
||||
-out ${CATOP}/$CACERT $DAYS
|
||||
RET=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
1168
apps/Makefile
Normal file
1168
apps/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,887 +0,0 @@
|
||||
#
|
||||
# apps/Makefile.ssl
|
||||
#
|
||||
|
||||
DIR= apps
|
||||
TOP= ..
|
||||
CC= cc
|
||||
INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES)
|
||||
CFLAG= -g -static
|
||||
INSTALL_PREFIX=
|
||||
INSTALLTOP= /usr/local/ssl
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
NEWMAKE= make
|
||||
MAKE= $(NEWMAKE) -f Makefile.ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile.ssl
|
||||
PERL= perl
|
||||
RM= rm -f
|
||||
# KRB5 stuff
|
||||
KRB5_INCLUDES=
|
||||
LIBKRB5=
|
||||
|
||||
PEX_LIBS=
|
||||
EX_LIBS=
|
||||
EXE_EXT=
|
||||
|
||||
SHLIB_TARGET=
|
||||
|
||||
CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile makeapps.com install.com
|
||||
|
||||
DLIBCRYPTO=../libcrypto.a
|
||||
DLIBSSL=../libssl.a
|
||||
LIBCRYPTO=-L.. -lcrypto
|
||||
LIBSSL=-L.. -lssl
|
||||
|
||||
PROGRAM= openssl
|
||||
|
||||
SCRIPTS=CA.sh CA.pl
|
||||
|
||||
EXE= $(PROGRAM)$(EXE_EXT)
|
||||
|
||||
E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \
|
||||
ca crl rsa rsautl dsa dsaparam ec ecparam \
|
||||
x509 genrsa gendsa s_server s_client speed \
|
||||
s_time version pkcs7 crl2pkcs7 sess_id ciphers nseq pkcs12 \
|
||||
pkcs8 spkac smime rand engine ocsp
|
||||
|
||||
PROGS= $(PROGRAM).c
|
||||
|
||||
A_OBJ=apps.o
|
||||
A_SRC=apps.c
|
||||
S_OBJ= s_cb.o s_socket.o
|
||||
S_SRC= s_cb.c s_socket.c
|
||||
RAND_OBJ=app_rand.o
|
||||
RAND_SRC=app_rand.c
|
||||
|
||||
E_OBJ= verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o \
|
||||
ca.o pkcs7.o crl2p7.o crl.o \
|
||||
rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o \
|
||||
x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o \
|
||||
s_time.o $(A_OBJ) $(S_OBJ) $(RAND_OBJ) version.o sess_id.o \
|
||||
ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o \
|
||||
ocsp.o
|
||||
|
||||
E_SRC= verify.c asn1pars.c req.c dgst.c dh.c enc.c passwd.c gendh.c errstr.c ca.c \
|
||||
pkcs7.c crl2p7.c crl.c \
|
||||
rsa.c rsautl.c dsa.c dsaparam.c ec.c ecparam.c \
|
||||
x509.c genrsa.c gendsa.c s_server.c s_client.c speed.c \
|
||||
s_time.c $(A_SRC) $(S_SRC) $(RAND_SRC) version.c sess_id.c \
|
||||
ciphers.c nseq.c pkcs12.c pkcs8.c spkac.c smime.c rand.c engine.c \
|
||||
ocsp.c
|
||||
|
||||
SRC=$(E_SRC)
|
||||
|
||||
EXHEADER=
|
||||
HEADER= apps.h progs.h s_apps.h \
|
||||
testdsa.h testrsa.h \
|
||||
$(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
@(cd ..; $(MAKE) DIRS=$(DIR) all)
|
||||
|
||||
all: exe
|
||||
|
||||
exe: $(EXE)
|
||||
|
||||
req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
|
||||
shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
shlib_target="$(SHLIB_TARGET)"; \
|
||||
fi; \
|
||||
$(NEWMAKE) -f $(TOP)/Makefile.shared \
|
||||
APPNAME=req LDFLAGS="$(CFLAG)" \
|
||||
OBJECTS="sreq.o $(A_OBJ) $(RAND_OBJ)" \
|
||||
LIBDEPS="$(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)" \
|
||||
LIBRPATH=$(INSTALLTOP)/lib \
|
||||
link_app.$${shlib_target}
|
||||
|
||||
sreq.o: req.c
|
||||
$(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
||||
|
||||
install:
|
||||
@set -e; for i in $(EXE); \
|
||||
do \
|
||||
(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;
|
||||
@set -e; for i in $(SCRIPTS); \
|
||||
do \
|
||||
(echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
|
||||
done
|
||||
@cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
links:
|
||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
|
||||
rm -f req
|
||||
|
||||
$(DLIBSSL):
|
||||
(cd ..; $(MAKE) DIRS=ssl all)
|
||||
|
||||
$(DLIBCRYPTO):
|
||||
(cd ..; $(MAKE) DIRS=crypto all)
|
||||
|
||||
$(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
||||
$(RM) $(EXE)
|
||||
shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
shlib_target="$(SHLIB_TARGET)"; \
|
||||
fi; \
|
||||
if [ "$${shlib_target}" = "darwin-shared" ] ; then \
|
||||
LIBRARIES="$(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO)" ; \
|
||||
else \
|
||||
LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \
|
||||
fi; \
|
||||
$(NEWMAKE) -f $(TOP)/Makefile.shared \
|
||||
APPNAME=$(EXE) LDFLAGS="$(CFLAG)" \
|
||||
OBJECTS="$(PROGRAM).o $(E_OBJ)" \
|
||||
LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
|
||||
LIBRPATH=$(INSTALLTOP)/lib \
|
||||
link_app.$${shlib_target}
|
||||
-(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; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
|
||||
progs.h: progs.pl
|
||||
$(PERL) progs.pl $(E_EXE) >progs.h
|
||||
$(RM) $(PROGRAM).o
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
app_rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
app_rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
app_rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
app_rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
app_rand.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
app_rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
app_rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
app_rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
|
||||
app_rand.o: ../include/openssl/rand.h ../include/openssl/safestack.h
|
||||
app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
app_rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h app_rand.c
|
||||
app_rand.o: apps.h
|
||||
apps.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
apps.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
apps.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
apps.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
apps.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
apps.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
apps.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
|
||||
apps.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
|
||||
apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
apps.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
apps.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
|
||||
apps.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
apps.o: ../include/openssl/x509v3.h apps.c apps.h
|
||||
asn1pars.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
asn1pars.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
asn1pars.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
asn1pars.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
asn1pars.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
asn1pars.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
asn1pars.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
asn1pars.o: asn1pars.c
|
||||
ca.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
ca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
ca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
ca.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
ca.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
ca.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
|
||||
ca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
ca.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
ca.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
ca.o: ../include/openssl/x509v3.h apps.h ca.c
|
||||
ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ciphers.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
ciphers.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
ciphers.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
ciphers.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
ciphers.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ciphers.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
ciphers.o: ../include/openssl/x509_vfy.h apps.h ciphers.c
|
||||
crl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
crl.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
crl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
crl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
crl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
crl.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
crl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
crl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
crl.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
crl.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
crl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
crl.o: ../include/openssl/x509v3.h apps.h crl.c
|
||||
crl2p7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
crl2p7.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
crl2p7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
crl2p7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
crl2p7.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
crl2p7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
crl2p7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
crl2p7.o: crl2p7.c
|
||||
dgst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
dgst.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
dgst.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
dgst.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
dgst.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
dgst.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
dgst.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
dgst.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
dgst.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
dgst.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dgst.c
|
||||
dh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
dh.o: ../include/openssl/dh.h ../include/openssl/e_os2.h
|
||||
dh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
dh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
dh.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
dh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
dh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
dh.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
dh.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
dh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dh.c
|
||||
dsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
dsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
dsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
dsa.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
dsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
dsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
dsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
dsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dsa.c
|
||||
dsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
dsaparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
dsaparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
dsaparam.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
dsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
dsaparam.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
dsaparam.o: ../include/openssl/stack.h ../include/openssl/store.h
|
||||
dsaparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
dsaparam.o: ../include/openssl/ui.h ../include/openssl/x509.h
|
||||
dsaparam.o: ../include/openssl/x509_vfy.h apps.h dsaparam.c
|
||||
ec.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ec.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
ec.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
ec.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
ec.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
ec.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
ec.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
ec.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
ec.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
ec.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
ec.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
ec.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
ec.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
ec.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h ec.c
|
||||
ecparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ecparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ecparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
ecparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
ecparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
ecparam.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
ecparam.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
ecparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
ecparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ecparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
ecparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
ecparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
ecparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
ecparam.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
ecparam.o: ../include/openssl/x509_vfy.h apps.h ecparam.c
|
||||
enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
enc.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
enc.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
enc.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
enc.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
enc.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
enc.o: ../include/openssl/x509_vfy.h apps.h enc.c
|
||||
engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
engine.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
engine.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
engine.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
engine.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
engine.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
engine.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
engine.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
engine.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
engine.o: ../include/openssl/x509_vfy.h apps.h engine.c
|
||||
errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
errstr.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
errstr.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
errstr.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
errstr.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
errstr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
errstr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
errstr.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
errstr.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
errstr.o: ../include/openssl/x509_vfy.h apps.h errstr.c
|
||||
gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
gendh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
gendh.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
gendh.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
gendh.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
gendh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
gendh.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
gendh.o: ../include/openssl/stack.h ../include/openssl/store.h
|
||||
gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
gendh.o: ../include/openssl/ui.h ../include/openssl/x509.h
|
||||
gendh.o: ../include/openssl/x509_vfy.h apps.h gendh.c
|
||||
gendsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
gendsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
gendsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
gendsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
gendsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
gendsa.o: gendsa.c
|
||||
genrsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
genrsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
genrsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
genrsa.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
genrsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
genrsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
genrsa.o: ../include/openssl/stack.h ../include/openssl/store.h
|
||||
genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
genrsa.o: ../include/openssl/ui.h ../include/openssl/x509.h
|
||||
genrsa.o: ../include/openssl/x509_vfy.h apps.h genrsa.c
|
||||
nseq.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
nseq.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
nseq.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
nseq.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
nseq.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
nseq.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
nseq.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
nseq.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
nseq.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
nseq.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h nseq.c
|
||||
ocsp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ocsp.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
ocsp.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
ocsp.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
ocsp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
ocsp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
ocsp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
|
||||
ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
ocsp.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ocsp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c
|
||||
openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
openssl.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
openssl.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
openssl.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
openssl.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
openssl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
openssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
openssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
openssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
openssl.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
openssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
openssl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
openssl.o: ../include/openssl/x509_vfy.h apps.h openssl.c progs.h s_apps.h
|
||||
passwd.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
passwd.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
passwd.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
|
||||
passwd.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
passwd.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
passwd.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
passwd.o: ../include/openssl/lhash.h ../include/openssl/md5.h
|
||||
passwd.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
passwd.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
passwd.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
|
||||
passwd.o: ../include/openssl/rand.h ../include/openssl/safestack.h
|
||||
passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
passwd.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
passwd.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
|
||||
passwd.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
passwd.o: passwd.c
|
||||
pkcs12.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
pkcs12.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
pkcs12.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
pkcs12.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
pkcs12.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
pkcs12.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
pkcs12.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
pkcs12.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
pkcs12.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
pkcs12.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
pkcs12.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
|
||||
pkcs12.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
pkcs12.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
pkcs12.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
pkcs12.o: ../include/openssl/x509_vfy.h apps.h pkcs12.c
|
||||
pkcs7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
pkcs7.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
pkcs7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
pkcs7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
pkcs7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
pkcs7.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
pkcs7.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
pkcs7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
pkcs7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
pkcs7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
pkcs7.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
pkcs7.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
pkcs7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
pkcs7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h pkcs7.c
|
||||
pkcs8.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
pkcs8.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
pkcs8.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
pkcs8.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
pkcs8.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
pkcs8.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
pkcs8.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
pkcs8.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
pkcs8.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
pkcs8.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
pkcs8.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
|
||||
pkcs8.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
pkcs8.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
pkcs8.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
pkcs8.o: ../include/openssl/x509_vfy.h apps.h pkcs8.c
|
||||
rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
rand.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
rand.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
rand.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
rand.o: ../include/openssl/x509_vfy.h apps.h rand.c
|
||||
req.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
req.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
req.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
req.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
req.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
req.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
req.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
req.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
req.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
req.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
req.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
req.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
req.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
req.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
req.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
req.o: ../include/openssl/store.h ../include/openssl/symhacks.h
|
||||
req.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
|
||||
req.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
req.o: ../include/openssl/x509v3.h apps.h req.c
|
||||
rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
rsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
rsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
rsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
rsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
rsa.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
rsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
rsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
rsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
rsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
rsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
rsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h rsa.c
|
||||
rsautl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
rsautl.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
rsautl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
rsautl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
rsautl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
rsautl.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
rsautl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
rsautl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
rsautl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
rsautl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
rsautl.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
|
||||
rsautl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
rsautl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
rsautl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
rsautl.o: ../include/openssl/x509_vfy.h apps.h rsautl.c
|
||||
s_cb.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_cb.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_cb.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
s_cb.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s_cb.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s_cb.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
s_cb.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s_cb.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s_cb.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s_cb.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_cb.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_cb.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
s_cb.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_cb.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s_cb.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s_cb.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_cb.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
s_cb.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_cb.c
|
||||
s_client.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_client.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_client.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
s_client.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s_client.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s_client.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
s_client.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s_client.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s_client.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s_client.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_client.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
s_client.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_client.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_client.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_client.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s_client.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
s_client.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
s_client.o: s_apps.h s_client.c
|
||||
s_server.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_server.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s_server.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_server.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
s_server.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
s_server.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s_server.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
s_server.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s_server.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s_server.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s_server.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_server.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_server.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_server.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
s_server.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_server.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_server.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_server.o: ../include/openssl/stack.h ../include/openssl/store.h
|
||||
s_server.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_server.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
|
||||
s_server.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
s_server.o: s_apps.h s_server.c
|
||||
s_socket.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_socket.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_socket.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
s_socket.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s_socket.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s_socket.o: ../include/openssl/engine.h ../include/openssl/evp.h
|
||||
s_socket.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s_socket.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s_socket.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_socket.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_socket.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_socket.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_socket.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_socket.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_socket.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s_socket.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
s_socket.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
s_socket.o: s_apps.h s_socket.c
|
||||
s_time.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_time.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_time.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
s_time.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s_time.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s_time.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
s_time.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s_time.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s_time.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s_time.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_time.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_time.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
s_time.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_time.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s_time.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s_time.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_time.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
s_time.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_time.c
|
||||
sess_id.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
sess_id.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
sess_id.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
sess_id.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
sess_id.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
sess_id.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
sess_id.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
sess_id.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
sess_id.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
sess_id.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
sess_id.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
sess_id.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
sess_id.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
sess_id.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
sess_id.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
sess_id.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
sess_id.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
sess_id.o: ../include/openssl/x509_vfy.h apps.h sess_id.c
|
||||
smime.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
smime.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
smime.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
smime.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
smime.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
smime.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
smime.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
smime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
smime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
smime.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
smime.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
smime.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
smime.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
smime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
smime.o: ../include/openssl/x509v3.h apps.h smime.c
|
||||
speed.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
|
||||
speed.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
|
||||
speed.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
speed.o: ../include/openssl/cast.h ../include/openssl/conf.h
|
||||
speed.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
speed.o: ../include/openssl/des_old.h ../include/openssl/dsa.h
|
||||
speed.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
speed.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
speed.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
speed.o: ../include/openssl/evp.h ../include/openssl/hmac.h
|
||||
speed.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
speed.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||
speed.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||
speed.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
speed.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
|
||||
speed.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
||||
speed.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||
speed.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||
speed.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
speed.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
speed.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
|
||||
speed.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
|
||||
speed.o: ../include/openssl/x509_vfy.h apps.h speed.c testdsa.h testrsa.h
|
||||
spkac.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
spkac.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
spkac.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
spkac.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
spkac.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
spkac.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
spkac.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
spkac.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
spkac.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
spkac.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
spkac.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
spkac.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
spkac.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
spkac.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h spkac.c
|
||||
verify.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
verify.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
verify.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
verify.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
verify.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
verify.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
verify.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
verify.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
verify.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
verify.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
verify.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
verify.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
verify.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
verify.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
verify.o: ../include/openssl/x509v3.h apps.h verify.c
|
||||
version.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
version.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
version.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
version.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
version.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
|
||||
version.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
version.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
version.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
version.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||
version.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
version.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
version.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
|
||||
version.o: ../include/openssl/rc4.h ../include/openssl/safestack.h
|
||||
version.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
version.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
version.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
|
||||
version.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
version.o: version.c
|
||||
x509.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
x509.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
x509.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
x509.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
x509.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
x509.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
x509.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
x509.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
x509.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
x509.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
x509.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
x509.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
|
||||
x509.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
x509.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
x509.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
x509.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h x509.c
|
||||
401
apps/apps.c
401
apps/apps.c
@@ -125,8 +125,6 @@
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
#define NON_MAIN
|
||||
#include "apps.h"
|
||||
@@ -252,7 +250,7 @@ int str2fmt(char *s)
|
||||
return(FORMAT_UNDEF);
|
||||
}
|
||||
|
||||
#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
|
||||
void program_name(char *in, char *out, int size)
|
||||
{
|
||||
int i,n;
|
||||
@@ -271,23 +269,12 @@ void program_name(char *in, char *out, int size)
|
||||
if (p == NULL)
|
||||
p=in;
|
||||
n=strlen(p);
|
||||
|
||||
#if defined(OPENSSL_SYS_NETWARE)
|
||||
/* strip off trailing .nlm if present. */
|
||||
if ((n > 4) && (p[n-4] == '.') &&
|
||||
((p[n-3] == 'n') || (p[n-3] == 'N')) &&
|
||||
((p[n-2] == 'l') || (p[n-2] == 'L')) &&
|
||||
((p[n-1] == 'm') || (p[n-1] == 'M')))
|
||||
n-=4;
|
||||
#else
|
||||
/* strip off trailing .exe if present. */
|
||||
if ((n > 4) && (p[n-4] == '.') &&
|
||||
((p[n-3] == 'e') || (p[n-3] == 'E')) &&
|
||||
((p[n-2] == 'x') || (p[n-2] == 'X')) &&
|
||||
((p[n-1] == 'e') || (p[n-1] == 'E')))
|
||||
n-=4;
|
||||
#endif
|
||||
|
||||
if (n > size-1)
|
||||
n=size-1;
|
||||
|
||||
@@ -688,6 +675,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)
|
||||
{
|
||||
@@ -722,7 +754,7 @@ X509 *load_cert(BIO *err, const char *file, int format,
|
||||
x=d2i_X509_bio(cert,NULL);
|
||||
else if (format == FORMAT_NETSCAPE)
|
||||
{
|
||||
const unsigned char *p,*op;
|
||||
unsigned char *p,*op;
|
||||
int size=0,i;
|
||||
|
||||
/* We sort of have to do it this way because it is sort of nice
|
||||
@@ -768,11 +800,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",
|
||||
@@ -851,11 +881,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
|
||||
{
|
||||
@@ -1694,10 +1723,23 @@ CA_DB *load_index(char *dbfile, DB_ATTR *db_attr)
|
||||
char *p = NCONF_get_string(dbattr_conf,NULL,"unique_subject");
|
||||
if (p)
|
||||
{
|
||||
#ifdef RL_DEBUG
|
||||
BIO_printf(bio_err, "DEBUG[load_index]: unique_subject = \"%s\"\n", p);
|
||||
#endif
|
||||
retdb->attributes.unique_subject = parse_yesno(p,1);
|
||||
switch(*p)
|
||||
{
|
||||
case 'f': /* false */
|
||||
case 'F': /* FALSE */
|
||||
case 'n': /* no */
|
||||
case 'N': /* NO */
|
||||
retdb->attributes.unique_subject = 0;
|
||||
break;
|
||||
case 't': /* true */
|
||||
case 'T': /* TRUE */
|
||||
case 'y': /* yes */
|
||||
case 'Y': /* YES */
|
||||
default:
|
||||
retdb->attributes.unique_subject = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1937,171 +1979,6 @@ void free_index(CA_DB *db)
|
||||
}
|
||||
}
|
||||
|
||||
int parse_yesno(char *str, int def)
|
||||
{
|
||||
int ret = def;
|
||||
if (str)
|
||||
{
|
||||
switch (*str)
|
||||
{
|
||||
case 'f': /* false */
|
||||
case 'F': /* FALSE */
|
||||
case 'n': /* no */
|
||||
case 'N': /* NO */
|
||||
case '0': /* 0 */
|
||||
ret = 0;
|
||||
break;
|
||||
case 't': /* true */
|
||||
case 'T': /* TRUE */
|
||||
case 'y': /* yes */
|
||||
case 'Y': /* YES */
|
||||
case '1': /* 1 */
|
||||
ret = 0;
|
||||
break;
|
||||
default:
|
||||
ret = def;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* subject is expected to be in the format /type0=value0/type1=value1/type2=...
|
||||
* where characters may be escaped by \
|
||||
*/
|
||||
X509_NAME *parse_name(char *subject, long chtype, int multirdn)
|
||||
{
|
||||
size_t buflen = strlen(subject)+1; /* to copy the types and values into. due to escaping, the copy can only become shorter */
|
||||
char *buf = OPENSSL_malloc(buflen);
|
||||
size_t max_ne = buflen / 2 + 1; /* maximum number of name elements */
|
||||
char **ne_types = OPENSSL_malloc(max_ne * sizeof (char *));
|
||||
char **ne_values = OPENSSL_malloc(max_ne * sizeof (char *));
|
||||
int *mval = OPENSSL_malloc (max_ne * sizeof (int));
|
||||
|
||||
char *sp = subject, *bp = buf;
|
||||
int i, ne_num = 0;
|
||||
|
||||
X509_NAME *n = NULL;
|
||||
int nid;
|
||||
|
||||
if (!buf || !ne_types || !ne_values)
|
||||
{
|
||||
BIO_printf(bio_err, "malloc error\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (*subject != '/')
|
||||
{
|
||||
BIO_printf(bio_err, "Subject does not start with '/'.\n");
|
||||
goto error;
|
||||
}
|
||||
sp++; /* skip leading / */
|
||||
|
||||
/* no multivalued RDN by default */
|
||||
mval[ne_num] = 0;
|
||||
|
||||
while (*sp)
|
||||
{
|
||||
/* collect type */
|
||||
ne_types[ne_num] = bp;
|
||||
while (*sp)
|
||||
{
|
||||
if (*sp == '\\') /* is there anything to escape in the type...? */
|
||||
{
|
||||
if (*++sp)
|
||||
*bp++ = *sp++;
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "escape character at end of string\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else if (*sp == '=')
|
||||
{
|
||||
sp++;
|
||||
*bp++ = '\0';
|
||||
break;
|
||||
}
|
||||
else
|
||||
*bp++ = *sp++;
|
||||
}
|
||||
if (!*sp)
|
||||
{
|
||||
BIO_printf(bio_err, "end of string encountered while processing type of subject name element #%d\n", ne_num);
|
||||
goto error;
|
||||
}
|
||||
ne_values[ne_num] = bp;
|
||||
while (*sp)
|
||||
{
|
||||
if (*sp == '\\')
|
||||
{
|
||||
if (*++sp)
|
||||
*bp++ = *sp++;
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "escape character at end of string\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else if (*sp == '/')
|
||||
{
|
||||
sp++;
|
||||
/* no multivalued RDN by default */
|
||||
mval[ne_num+1] = 0;
|
||||
break;
|
||||
}
|
||||
else if (*sp == '+' && multirdn)
|
||||
{
|
||||
/* a not escaped + signals a mutlivalued RDN */
|
||||
sp++;
|
||||
mval[ne_num+1] = -1;
|
||||
break;
|
||||
}
|
||||
else
|
||||
*bp++ = *sp++;
|
||||
}
|
||||
*bp++ = '\0';
|
||||
ne_num++;
|
||||
}
|
||||
|
||||
if (!(n = X509_NAME_new()))
|
||||
goto error;
|
||||
|
||||
for (i = 0; i < ne_num; i++)
|
||||
{
|
||||
if ((nid=OBJ_txt2nid(ne_types[i])) == NID_undef)
|
||||
{
|
||||
BIO_printf(bio_err, "Subject Attribute %s has no known NID, skipped\n", ne_types[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!*ne_values[i])
|
||||
{
|
||||
BIO_printf(bio_err, "No value provided for Subject Attribute %s, skipped\n", ne_types[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!X509_NAME_add_entry_by_NID(n, nid, chtype, (unsigned char*)ne_values[i], -1,-1,mval[i]))
|
||||
goto error;
|
||||
}
|
||||
|
||||
OPENSSL_free(ne_values);
|
||||
OPENSSL_free(ne_types);
|
||||
OPENSSL_free(buf);
|
||||
return n;
|
||||
|
||||
error:
|
||||
X509_NAME_free(n);
|
||||
if (ne_values)
|
||||
OPENSSL_free(ne_values);
|
||||
if (ne_types)
|
||||
OPENSSL_free(ne_types);
|
||||
if (buf)
|
||||
OPENSSL_free(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* This code MUST COME AFTER anything that uses rename() */
|
||||
#ifdef OPENSSL_SYS_WIN32
|
||||
int WIN32_rename(char *from, char *to)
|
||||
@@ -2140,141 +2017,3 @@ int WIN32_rename(char *from, char *to)
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
int args_verify(char ***pargs, int *pargc,
|
||||
int *badarg, BIO *err, X509_VERIFY_PARAM **pm)
|
||||
{
|
||||
ASN1_OBJECT *otmp = NULL;
|
||||
unsigned long flags = 0;
|
||||
int i;
|
||||
int purpose = 0;
|
||||
char **oldargs = *pargs;
|
||||
char *arg = **pargs, *argn = (*pargs)[1];
|
||||
if (!strcmp(arg, "-policy"))
|
||||
{
|
||||
if (!argn)
|
||||
*badarg = 1;
|
||||
else
|
||||
{
|
||||
otmp = OBJ_txt2obj(argn, 0);
|
||||
if (!otmp)
|
||||
{
|
||||
BIO_printf(err, "Invalid Policy \"%s\"\n",
|
||||
argn);
|
||||
*badarg = 1;
|
||||
}
|
||||
}
|
||||
(*pargs)++;
|
||||
}
|
||||
else if (strcmp(arg,"-purpose") == 0)
|
||||
{
|
||||
X509_PURPOSE *xptmp;
|
||||
if (!argn)
|
||||
*badarg = 1;
|
||||
else
|
||||
{
|
||||
i = X509_PURPOSE_get_by_sname(argn);
|
||||
if(i < 0)
|
||||
{
|
||||
BIO_printf(err, "unrecognized purpose\n");
|
||||
*badarg = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
xptmp = X509_PURPOSE_get0(i);
|
||||
purpose = X509_PURPOSE_get_id(xptmp);
|
||||
}
|
||||
}
|
||||
(*pargs)++;
|
||||
}
|
||||
else if (!strcmp(arg, "-ignore_critical"))
|
||||
flags |= X509_V_FLAG_IGNORE_CRITICAL;
|
||||
else if (!strcmp(arg, "-issuer_checks"))
|
||||
flags |= X509_V_FLAG_CB_ISSUER_CHECK;
|
||||
else if (!strcmp(arg, "-crl_check"))
|
||||
flags |= X509_V_FLAG_CRL_CHECK;
|
||||
else if (!strcmp(arg, "-crl_check_all"))
|
||||
flags |= X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL;
|
||||
else if (!strcmp(arg, "-policy_check"))
|
||||
flags |= X509_V_FLAG_POLICY_CHECK;
|
||||
else if (!strcmp(arg, "-explicit_policy"))
|
||||
flags |= X509_V_FLAG_EXPLICIT_POLICY;
|
||||
else if (!strcmp(arg, "-x509_strict"))
|
||||
flags |= X509_V_FLAG_X509_STRICT;
|
||||
else if (!strcmp(arg, "-policy_print"))
|
||||
flags |= X509_V_FLAG_NOTIFY_POLICY;
|
||||
else
|
||||
return 0;
|
||||
|
||||
if (*badarg)
|
||||
{
|
||||
if (*pm)
|
||||
X509_VERIFY_PARAM_free(*pm);
|
||||
*pm = NULL;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!*pm && !(*pm = X509_VERIFY_PARAM_new()))
|
||||
{
|
||||
*badarg = 1;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (otmp)
|
||||
X509_VERIFY_PARAM_add0_policy(*pm, otmp);
|
||||
if (flags)
|
||||
X509_VERIFY_PARAM_set_flags(*pm, flags);
|
||||
|
||||
if (purpose)
|
||||
X509_VERIFY_PARAM_set_purpose(*pm, purpose);
|
||||
|
||||
end:
|
||||
|
||||
(*pargs)++;
|
||||
|
||||
if (pargc)
|
||||
*pargc -= *pargs - oldargs;
|
||||
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
static void nodes_print(BIO *out, char *name, STACK_OF(X509_POLICY_NODE) *nodes)
|
||||
{
|
||||
X509_POLICY_NODE *node;
|
||||
int i;
|
||||
BIO_printf(out, "%s Policies:", name);
|
||||
if (nodes)
|
||||
{
|
||||
BIO_puts(out, "\n");
|
||||
for (i = 0; i < sk_X509_POLICY_NODE_num(nodes); i++)
|
||||
{
|
||||
node = sk_X509_POLICY_NODE_value(nodes, i);
|
||||
X509_POLICY_NODE_print(out, node, 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
BIO_puts(out, " <empty>\n");
|
||||
}
|
||||
|
||||
void policies_print(BIO *out, X509_STORE_CTX *ctx)
|
||||
{
|
||||
X509_POLICY_TREE *tree;
|
||||
int explicit_policy;
|
||||
int free_out = 0;
|
||||
if (out == NULL)
|
||||
{
|
||||
out = BIO_new_fp(stderr, BIO_NOCLOSE);
|
||||
free_out = 1;
|
||||
}
|
||||
tree = X509_STORE_CTX_get0_policy_tree(ctx);
|
||||
explicit_policy = X509_STORE_CTX_get_explicit_policy(ctx);
|
||||
|
||||
BIO_printf(out, "Require explicit Policy: %s\n",
|
||||
explicit_policy ? "True" : "False");
|
||||
|
||||
nodes_print(out, "Authority", X509_policy_tree_get0_policies(tree));
|
||||
nodes_print(out, "User", X509_policy_tree_get0_user_policies(tree));
|
||||
if (free_out)
|
||||
BIO_free(out);
|
||||
}
|
||||
|
||||
13
apps/apps.h
13
apps/apps.h
@@ -114,7 +114,9 @@
|
||||
|
||||
#include "e_os.h"
|
||||
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/conf.h>
|
||||
@@ -146,9 +148,11 @@ int WIN32_rename(char *oldname,char *newname);
|
||||
#ifndef NON_MAIN
|
||||
CONF *config=NULL;
|
||||
BIO *bio_err=NULL;
|
||||
int in_FIPS_mode=0;
|
||||
#else
|
||||
extern CONF *config;
|
||||
extern BIO *bio_err;
|
||||
extern int in_FIPS_mode;
|
||||
#endif
|
||||
|
||||
#else
|
||||
@@ -157,12 +161,11 @@ extern BIO *bio_err;
|
||||
extern CONF *config;
|
||||
extern char *default_config_file;
|
||||
extern BIO *bio_err;
|
||||
extern int in_FIPS_mode;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_SYS_NETWARE
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#ifdef SIGPIPE
|
||||
#define do_pipe_sig() signal(SIGPIPE,SIG_IGN)
|
||||
@@ -314,12 +317,8 @@ int save_index(char *dbfile, char *suffix, CA_DB *db);
|
||||
int rotate_index(char *dbfile, char *new_suffix, char *old_suffix);
|
||||
void free_index(CA_DB *db);
|
||||
int index_name_cmp(const char **a, const char **b);
|
||||
int parse_yesno(char *str, int def);
|
||||
|
||||
X509_NAME *parse_name(char *str, long chtype, int multirdn);
|
||||
int args_verify(char ***pargs, int *pargc,
|
||||
int *badarg, BIO *err, X509_VERIFY_PARAM **pm);
|
||||
void policies_print(BIO *out, X509_STORE_CTX *ctx);
|
||||
X509_NAME *do_subject(char *str, long chtype);
|
||||
|
||||
#define FORMAT_UNDEF 0
|
||||
#define FORMAT_ASN1 1
|
||||
|
||||
121
apps/asn1pars.c
121
apps/asn1pars.c
@@ -82,8 +82,6 @@
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
static int do_generate(BIO *bio, char *genstr, char *genconf, BUF_MEM *buf);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
int i,badops=0,offset=0,ret=1,j;
|
||||
@@ -92,9 +90,7 @@ int MAIN(int argc, char **argv)
|
||||
BIO *in=NULL,*out=NULL,*b64=NULL, *derout = NULL;
|
||||
int informat,indent=0, noout = 0, dump = 0;
|
||||
char *infile=NULL,*str=NULL,*prog,*oidfile=NULL, *derfile=NULL;
|
||||
char *genstr=NULL, *genconf=NULL;
|
||||
unsigned char *tmpbuf;
|
||||
const unsigned char *ctmpbuf;
|
||||
BUF_MEM *buf=NULL;
|
||||
STACK *osk=NULL;
|
||||
ASN1_TYPE *at=NULL;
|
||||
@@ -171,16 +167,6 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
sk_push(osk,*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-genstr") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
genstr= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-genconf") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
genconf= *(++argv);
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||
@@ -209,8 +195,6 @@ bad:
|
||||
BIO_printf(bio_err," -strparse offset\n");
|
||||
BIO_printf(bio_err," a series of these can be used to 'dig' into multiple\n");
|
||||
BIO_printf(bio_err," ASN1 blob wrappings\n");
|
||||
BIO_printf(bio_err," -genstr str string to generate ASN1 structure from\n");
|
||||
BIO_printf(bio_err," -genconf file file to generate ASN1 structure from\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -264,39 +248,25 @@ bad:
|
||||
if ((buf=BUF_MEM_new()) == NULL) goto end;
|
||||
if (!BUF_MEM_grow(buf,BUFSIZ*8)) goto end; /* Pre-allocate :-) */
|
||||
|
||||
if (genstr || genconf)
|
||||
if (informat == FORMAT_PEM)
|
||||
{
|
||||
num = do_generate(bio_err, genstr, genconf, buf);
|
||||
if (num < 0)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
BIO *tmp;
|
||||
|
||||
if ((b64=BIO_new(BIO_f_base64())) == NULL)
|
||||
goto end;
|
||||
}
|
||||
BIO_push(b64,in);
|
||||
tmp=in;
|
||||
in=b64;
|
||||
b64=tmp;
|
||||
}
|
||||
|
||||
else
|
||||
num=0;
|
||||
for (;;)
|
||||
{
|
||||
|
||||
if (informat == FORMAT_PEM)
|
||||
{
|
||||
BIO *tmp;
|
||||
|
||||
if ((b64=BIO_new(BIO_f_base64())) == NULL)
|
||||
goto end;
|
||||
BIO_push(b64,in);
|
||||
tmp=in;
|
||||
in=b64;
|
||||
b64=tmp;
|
||||
}
|
||||
|
||||
num=0;
|
||||
for (;;)
|
||||
{
|
||||
if (!BUF_MEM_grow(buf,(int)num+BUFSIZ)) goto end;
|
||||
i=BIO_read(in,&(buf->data[num]),BUFSIZ);
|
||||
if (i <= 0) break;
|
||||
num+=i;
|
||||
}
|
||||
if (!BUF_MEM_grow(buf,(int)num+BUFSIZ)) goto end;
|
||||
i=BIO_read(in,&(buf->data[num]),BUFSIZ);
|
||||
if (i <= 0) break;
|
||||
num+=i;
|
||||
}
|
||||
str=buf->data;
|
||||
|
||||
@@ -308,8 +278,8 @@ bad:
|
||||
tmplen=num;
|
||||
for (i=0; i<sk_num(osk); i++)
|
||||
{
|
||||
ASN1_TYPE *atmp;
|
||||
int typ;
|
||||
ASN1_TYPE *atmp;
|
||||
j=atoi(sk_value(osk,i));
|
||||
if (j == 0)
|
||||
{
|
||||
@@ -319,8 +289,7 @@ bad:
|
||||
tmpbuf+=j;
|
||||
tmplen-=j;
|
||||
atmp = at;
|
||||
ctmpbuf = tmpbuf;
|
||||
at = d2i_ASN1_TYPE(NULL,&ctmpbuf,tmplen);
|
||||
at = d2i_ASN1_TYPE(NULL,&tmpbuf,tmplen);
|
||||
ASN1_TYPE_free(atmp);
|
||||
if(!at)
|
||||
{
|
||||
@@ -384,61 +353,3 @@ end:
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static int do_generate(BIO *bio, char *genstr, char *genconf, BUF_MEM *buf)
|
||||
{
|
||||
CONF *cnf = NULL;
|
||||
int len;
|
||||
long errline;
|
||||
unsigned char *p;
|
||||
ASN1_TYPE *atyp = NULL;
|
||||
|
||||
if (genconf)
|
||||
{
|
||||
cnf = NCONF_new(NULL);
|
||||
if (!NCONF_load(cnf, genconf, &errline))
|
||||
goto conferr;
|
||||
if (!genstr)
|
||||
genstr = NCONF_get_string(cnf, "default", "asn1");
|
||||
if (!genstr)
|
||||
{
|
||||
BIO_printf(bio, "Can't find 'asn1' in '%s'\n", genconf);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
atyp = ASN1_generate_nconf(genstr, cnf);
|
||||
NCONF_free(cnf);
|
||||
|
||||
if (!atyp)
|
||||
return -1;
|
||||
|
||||
len = i2d_ASN1_TYPE(atyp, NULL);
|
||||
|
||||
if (len <= 0)
|
||||
goto err;
|
||||
|
||||
if (!BUF_MEM_grow(buf,len))
|
||||
goto err;
|
||||
|
||||
p=(unsigned char *)buf->data;
|
||||
|
||||
i2d_ASN1_TYPE(atyp, &p);
|
||||
|
||||
ASN1_TYPE_free(atyp);
|
||||
return len;
|
||||
|
||||
conferr:
|
||||
|
||||
if (errline > 0)
|
||||
BIO_printf(bio, "Error on line %ld of config file '%s'\n",
|
||||
errline, genconf);
|
||||
else
|
||||
BIO_printf(bio, "Error loading config file '%s'\n", genconf);
|
||||
|
||||
err:
|
||||
NCONF_free(cnf);
|
||||
ASN1_TYPE_free(atyp);
|
||||
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
295
apps/ca.c
295
apps/ca.c
@@ -83,7 +83,7 @@
|
||||
# else
|
||||
# include <unixlib.h>
|
||||
# endif
|
||||
# elif !defined(OPENSSL_SYS_VXWORKS) && !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_NETWARE)
|
||||
# elif !defined(OPENSSL_SYS_VXWORKS) && !defined(OPENSSL_SYS_WINDOWS)
|
||||
# include <sys/file.h>
|
||||
# endif
|
||||
#endif
|
||||
@@ -131,7 +131,6 @@
|
||||
#define ENV_NAMEOPT "name_opt"
|
||||
#define ENV_CERTOPT "cert_opt"
|
||||
#define ENV_EXTCOPY "copy_extensions"
|
||||
#define ENV_UNIQUE_SUBJECT "unique_subject"
|
||||
|
||||
#define ENV_DATABASE "database"
|
||||
|
||||
@@ -161,7 +160,6 @@ static char *ca_usage[]={
|
||||
" -keyform arg - private key file format (PEM or ENGINE)\n",
|
||||
" -key arg - key to decode the private key if it is encrypted\n",
|
||||
" -cert file - The CA certificate\n",
|
||||
" -selfsign - sign a certificate with the key associated with it\n",
|
||||
" -in file - The input PEM encoded certificate request(s)\n",
|
||||
" -out file - Where to put the output file(s)\n",
|
||||
" -outdir dir - Where to put output certificates\n",
|
||||
@@ -174,7 +172,6 @@ static char *ca_usage[]={
|
||||
" -msie_hack - msie modifications to handle all those universal strings\n",
|
||||
" -revoke file - Revoke a certificate (given in file)\n",
|
||||
" -subj arg - Use arg instead of request's subject\n",
|
||||
" -multivalue-rdn - enable support for multivalued RDNs\n",
|
||||
" -extensions .. - Extension section (override value in config file)\n",
|
||||
" -extfile file - Configuration file with X509v3 extentions to add\n",
|
||||
" -crlexts .. - CRL extension section (override value in config file)\n",
|
||||
@@ -195,31 +192,31 @@ extern int EF_ALIGNMENT;
|
||||
static void lookup_fail(char *name,char *tag);
|
||||
static int certify(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
|
||||
const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,CA_DB *db,
|
||||
BIGNUM *serial, char *subj, int multirdn, int email_dn, char *startdate,
|
||||
BIGNUM *serial, char *subj, int email_dn, char *startdate,
|
||||
char *enddate, long days, int batch, char *ext_sect, CONF *conf,
|
||||
int verbose, unsigned long certopt, unsigned long nameopt,
|
||||
int default_op, int ext_copy, int selfsign);
|
||||
int default_op, int ext_copy);
|
||||
static int certify_cert(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
|
||||
const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,
|
||||
CA_DB *db, BIGNUM *serial, char *subj, int multirdn, int email_dn,
|
||||
CA_DB *db, BIGNUM *serial, char *subj, int email_dn,
|
||||
char *startdate, char *enddate, long days, int batch,
|
||||
char *ext_sect, CONF *conf,int verbose, unsigned long certopt,
|
||||
unsigned long nameopt, int default_op, int ext_copy,
|
||||
ENGINE *e);
|
||||
static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
|
||||
const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,
|
||||
CA_DB *db, BIGNUM *serial,char *subj, int multirdn, int email_dn,
|
||||
CA_DB *db, BIGNUM *serial,char *subj, int email_dn,
|
||||
char *startdate, char *enddate, long days, char *ext_sect,
|
||||
CONF *conf, int verbose, unsigned long certopt,
|
||||
unsigned long nameopt, int default_op, int ext_copy);
|
||||
static int fix_data(int nid, int *type);
|
||||
static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext);
|
||||
static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||
STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial,char *subj, int multirdn,
|
||||
STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial,char *subj,
|
||||
int email_dn, char *startdate, char *enddate, long days, int batch,
|
||||
int verbose, X509_REQ *req, char *ext_sect, CONF *conf,
|
||||
unsigned long certopt, unsigned long nameopt, int default_op,
|
||||
int ext_copy, int selfsign);
|
||||
int ext_copy);
|
||||
static int do_revoke(X509 *x509, CA_DB *db, int ext, char *extval);
|
||||
static int get_certificate_status(const char *ser_status, CA_DB *db);
|
||||
static int do_updatedb(CA_DB *db);
|
||||
@@ -275,7 +272,6 @@ int MAIN(int argc, char **argv)
|
||||
char *extensions=NULL;
|
||||
char *extfile=NULL;
|
||||
char *subj=NULL;
|
||||
int multirdn = 0;
|
||||
char *tmp_email_dn=NULL;
|
||||
char *crl_ext=NULL;
|
||||
int rev_type = REV_NONE;
|
||||
@@ -290,8 +286,7 @@ int MAIN(int argc, char **argv)
|
||||
unsigned long nameopt = 0, certopt = 0;
|
||||
int default_op = 1;
|
||||
int ext_copy = EXT_COPY_NONE;
|
||||
int selfsign = 0;
|
||||
X509 *x509=NULL, *x509p = NULL;
|
||||
X509 *x509=NULL;
|
||||
X509 *x=NULL;
|
||||
BIO *in=NULL,*out=NULL,*Sout=NULL,*Cout=NULL;
|
||||
char *dbfile=NULL;
|
||||
@@ -355,10 +350,6 @@ EF_ALIGNMENT=0;
|
||||
subj= *(++argv);
|
||||
/* preserve=1; */
|
||||
}
|
||||
else if (strcmp(*argv,"-create_serial") == 0)
|
||||
create_ser = 1;
|
||||
else if (strcmp(*argv,"-multivalue-rdn") == 0)
|
||||
multirdn=1;
|
||||
else if (strcmp(*argv,"-startdate") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -409,8 +400,6 @@ EF_ALIGNMENT=0;
|
||||
if (--argc < 1) goto bad;
|
||||
certfile= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-selfsign") == 0)
|
||||
selfsign=1;
|
||||
else if (strcmp(*argv,"-in") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -645,13 +634,28 @@ bad:
|
||||
app_RAND_load_file(randfile, bio_err, 0);
|
||||
|
||||
db_attr.unique_subject = 1;
|
||||
p = NCONF_get_string(conf, section, ENV_UNIQUE_SUBJECT);
|
||||
p = NCONF_get_string(conf, section, "unique_subject");
|
||||
if (p)
|
||||
{
|
||||
#ifdef RL_DEBUG
|
||||
BIO_printf(bio_err, "DEBUG: unique_subject = \"%s\"\n", p);
|
||||
#endif
|
||||
db_attr.unique_subject = parse_yesno(p,1);
|
||||
switch(*p)
|
||||
{
|
||||
case 'f': /* false */
|
||||
case 'F': /* FALSE */
|
||||
case 'n': /* no */
|
||||
case 'N': /* NO */
|
||||
db_attr.unique_subject = 0;
|
||||
break;
|
||||
case 't': /* true */
|
||||
case 'T': /* TRUE */
|
||||
case 'y': /* yes */
|
||||
case 'Y': /* YES */
|
||||
default:
|
||||
db_attr.unique_subject = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
ERR_clear_error();
|
||||
@@ -695,7 +699,7 @@ bad:
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/* we definitely need a private key, so let's get it */
|
||||
/* we definitely need a public key, so let's get it */
|
||||
|
||||
if ((keyfile == NULL) && ((keyfile=NCONF_get_string(conf,
|
||||
section,ENV_PRIVATE_KEY)) == NULL))
|
||||
@@ -723,27 +727,22 @@ bad:
|
||||
|
||||
/*****************************************************************/
|
||||
/* we need a certificate */
|
||||
if (!selfsign || spkac_file || ss_cert_file || gencrl)
|
||||
if ((certfile == NULL) && ((certfile=NCONF_get_string(conf,
|
||||
section,ENV_CERTIFICATE)) == NULL))
|
||||
{
|
||||
if ((certfile == NULL)
|
||||
&& ((certfile=NCONF_get_string(conf,
|
||||
section,ENV_CERTIFICATE)) == NULL))
|
||||
{
|
||||
lookup_fail(section,ENV_CERTIFICATE);
|
||||
goto err;
|
||||
}
|
||||
x509=load_cert(bio_err, certfile, FORMAT_PEM, NULL, e,
|
||||
"CA certificate");
|
||||
if (x509 == NULL)
|
||||
goto err;
|
||||
|
||||
if (!X509_check_private_key(x509,pkey))
|
||||
{
|
||||
BIO_printf(bio_err,"CA certificate and CA private key do not match\n");
|
||||
goto err;
|
||||
}
|
||||
lookup_fail(section,ENV_CERTIFICATE);
|
||||
goto err;
|
||||
}
|
||||
x509=load_cert(bio_err, certfile, FORMAT_PEM, NULL, e,
|
||||
"CA certificate");
|
||||
if (x509 == NULL)
|
||||
goto err;
|
||||
|
||||
if (!X509_check_private_key(x509,pkey))
|
||||
{
|
||||
BIO_printf(bio_err,"CA certificate and CA private key do not match\n");
|
||||
goto err;
|
||||
}
|
||||
if (!selfsign) x509p = x509;
|
||||
|
||||
f=NCONF_get_string(conf,BASE_SECTION,ENV_PRESERVE);
|
||||
if (f == NULL)
|
||||
@@ -1134,7 +1133,7 @@ bad:
|
||||
{
|
||||
total++;
|
||||
j=certify_spkac(&x,spkac_file,pkey,x509,dgst,attribs,db,
|
||||
serial,subj,multirdn,email_dn,startdate,enddate,days,extensions,
|
||||
serial,subj,email_dn,startdate,enddate,days,extensions,
|
||||
conf,verbose,certopt,nameopt,default_op,ext_copy);
|
||||
if (j < 0) goto err;
|
||||
if (j > 0)
|
||||
@@ -1158,7 +1157,7 @@ bad:
|
||||
{
|
||||
total++;
|
||||
j=certify_cert(&x,ss_cert_file,pkey,x509,dgst,attribs,
|
||||
db,serial,subj,multirdn,email_dn,startdate,enddate,days,batch,
|
||||
db,serial,subj,email_dn,startdate,enddate,days,batch,
|
||||
extensions,conf,verbose, certopt, nameopt,
|
||||
default_op, ext_copy, e);
|
||||
if (j < 0) goto err;
|
||||
@@ -1177,10 +1176,10 @@ bad:
|
||||
if (infile != NULL)
|
||||
{
|
||||
total++;
|
||||
j=certify(&x,infile,pkey,x509p,dgst,attribs,db,
|
||||
serial,subj,multirdn,email_dn,startdate,enddate,days,batch,
|
||||
j=certify(&x,infile,pkey,x509,dgst,attribs,db,
|
||||
serial,subj,email_dn,startdate,enddate,days,batch,
|
||||
extensions,conf,verbose, certopt, nameopt,
|
||||
default_op, ext_copy, selfsign);
|
||||
default_op, ext_copy);
|
||||
if (j < 0) goto err;
|
||||
if (j > 0)
|
||||
{
|
||||
@@ -1197,10 +1196,10 @@ bad:
|
||||
for (i=0; i<argc; i++)
|
||||
{
|
||||
total++;
|
||||
j=certify(&x,argv[i],pkey,x509p,dgst,attribs,db,
|
||||
serial,subj,multirdn,email_dn,startdate,enddate,days,batch,
|
||||
j=certify(&x,argv[i],pkey,x509,dgst,attribs,db,
|
||||
serial,subj,email_dn,startdate,enddate,days,batch,
|
||||
extensions,conf,verbose, certopt, nameopt,
|
||||
default_op, ext_copy, selfsign);
|
||||
default_op, ext_copy);
|
||||
if (j < 0) goto err;
|
||||
if (j > 0)
|
||||
{
|
||||
@@ -1401,11 +1400,6 @@ bad:
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
if (pkey->type == EVP_PKEY_DSA)
|
||||
dgst=EVP_dss1();
|
||||
else
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
if (pkey->type == EVP_PKEY_EC)
|
||||
dgst=EVP_ecdsa();
|
||||
#endif
|
||||
|
||||
/* Add any extensions asked for */
|
||||
@@ -1493,7 +1487,7 @@ err:
|
||||
BN_free(serial);
|
||||
free_index(db);
|
||||
EVP_PKEY_free(pkey);
|
||||
if (x509) X509_free(x509);
|
||||
X509_free(x509);
|
||||
X509_CRL_free(crl);
|
||||
NCONF_free(conf);
|
||||
OBJ_cleanup();
|
||||
@@ -1508,10 +1502,10 @@ static void lookup_fail(char *name, char *tag)
|
||||
|
||||
static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db,
|
||||
BIGNUM *serial, char *subj, int multirdn, int email_dn, char *startdate, char *enddate,
|
||||
BIGNUM *serial, char *subj, int email_dn, char *startdate, char *enddate,
|
||||
long days, int batch, char *ext_sect, CONF *lconf, int verbose,
|
||||
unsigned long certopt, unsigned long nameopt, int default_op,
|
||||
int ext_copy, int selfsign)
|
||||
int ext_copy)
|
||||
{
|
||||
X509_REQ *req=NULL;
|
||||
BIO *in=NULL;
|
||||
@@ -1536,12 +1530,6 @@ static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
|
||||
BIO_printf(bio_err,"Check that the request matches the signature\n");
|
||||
|
||||
if (selfsign && !X509_REQ_check_private_key(req,pkey))
|
||||
{
|
||||
BIO_printf(bio_err,"Certificate request and CA private key do not match\n");
|
||||
ok=0;
|
||||
goto err;
|
||||
}
|
||||
if ((pktmp=X509_REQ_get_pubkey(req)) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"error unpacking public key\n");
|
||||
@@ -1564,9 +1552,9 @@ static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
else
|
||||
BIO_printf(bio_err,"Signature ok\n");
|
||||
|
||||
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj, multirdn, email_dn,
|
||||
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj, email_dn,
|
||||
startdate,enddate,days,batch,verbose,req,ext_sect,lconf,
|
||||
certopt, nameopt, default_op, ext_copy, selfsign);
|
||||
certopt, nameopt, default_op, ext_copy);
|
||||
|
||||
err:
|
||||
if (req != NULL) X509_REQ_free(req);
|
||||
@@ -1576,7 +1564,7 @@ err:
|
||||
|
||||
static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db,
|
||||
BIGNUM *serial, char *subj, int multirdn, int email_dn, char *startdate, char *enddate,
|
||||
BIGNUM *serial, char *subj, int email_dn, char *startdate, char *enddate,
|
||||
long days, int batch, char *ext_sect, CONF *lconf, int verbose,
|
||||
unsigned long certopt, unsigned long nameopt, int default_op,
|
||||
int ext_copy, ENGINE *e)
|
||||
@@ -1618,9 +1606,9 @@ static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
if ((rreq=X509_to_X509_REQ(req,NULL,EVP_md5())) == NULL)
|
||||
goto err;
|
||||
|
||||
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,multirdn,email_dn,startdate,enddate,
|
||||
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,email_dn,startdate,enddate,
|
||||
days,batch,verbose,rreq,ext_sect,lconf, certopt, nameopt, default_op,
|
||||
ext_copy, 0);
|
||||
ext_copy);
|
||||
|
||||
err:
|
||||
if (rreq != NULL) X509_REQ_free(rreq);
|
||||
@@ -1630,11 +1618,10 @@ err:
|
||||
|
||||
static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||
STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj,
|
||||
int multirdn,
|
||||
int email_dn, char *startdate, char *enddate, long days, int batch,
|
||||
int verbose, X509_REQ *req, char *ext_sect, CONF *lconf,
|
||||
unsigned long certopt, unsigned long nameopt, int default_op,
|
||||
int ext_copy, int selfsign)
|
||||
int ext_copy)
|
||||
{
|
||||
X509_NAME *name=NULL,*CAname=NULL,*subject=NULL, *dn_subject=NULL;
|
||||
ASN1_UTCTIME *tm,*tmptm;
|
||||
@@ -1663,7 +1650,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||
|
||||
if (subj)
|
||||
{
|
||||
X509_NAME *n = parse_name(subj, MBSTRING_ASC, multirdn);
|
||||
X509_NAME *n = do_subject(subj, MBSTRING_ASC);
|
||||
|
||||
if (!n)
|
||||
{
|
||||
@@ -1738,10 +1725,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||
}
|
||||
|
||||
/* take a copy of the issuer name before we mess with it. */
|
||||
if (selfsign)
|
||||
CAname=X509_NAME_dup(name);
|
||||
else
|
||||
CAname=X509_NAME_dup(x509->cert_info->subject);
|
||||
CAname=X509_NAME_dup(x509->cert_info->subject);
|
||||
if (CAname == NULL) goto err;
|
||||
str=str2=NULL;
|
||||
|
||||
@@ -1953,16 +1937,8 @@ again2:
|
||||
|
||||
if (BN_to_ASN1_INTEGER(serial,ci->serialNumber) == NULL)
|
||||
goto err;
|
||||
if (selfsign)
|
||||
{
|
||||
if (!X509_set_issuer_name(ret,subject))
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!X509_set_issuer_name(ret,X509_get_subject_name(x509)))
|
||||
goto err;
|
||||
}
|
||||
if (!X509_set_issuer_name(ret,X509_get_subject_name(x509)))
|
||||
goto err;
|
||||
|
||||
if (strcmp(startdate,"today") == 0)
|
||||
X509_gmtime_adj(X509_get_notBefore(ret),0);
|
||||
@@ -1997,10 +1973,7 @@ again2:
|
||||
ci->extensions = NULL;
|
||||
|
||||
/* Initialize the context structure */
|
||||
if (selfsign)
|
||||
X509V3_set_ctx(&ctx, ret, ret, req, NULL, 0);
|
||||
else
|
||||
X509V3_set_ctx(&ctx, x509, ret, req, NULL, 0);
|
||||
X509V3_set_ctx(&ctx, x509, ret, req, NULL, 0);
|
||||
|
||||
if (extconf)
|
||||
{
|
||||
@@ -2067,7 +2040,7 @@ again2:
|
||||
|
||||
BIO_printf(bio_err,"Certificate is to be certified until ");
|
||||
ASN1_UTCTIME_print(bio_err,X509_get_notAfter(ret));
|
||||
if (days) BIO_printf(bio_err," (%ld days)",days);
|
||||
if (days) BIO_printf(bio_err," (%d days)",days);
|
||||
BIO_printf(bio_err, "\n");
|
||||
|
||||
if (!batch)
|
||||
@@ -2094,16 +2067,6 @@ again2:
|
||||
EVP_PKEY_copy_parameters(pktmp,pkey);
|
||||
EVP_PKEY_free(pktmp);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
if (pkey->type == EVP_PKEY_EC)
|
||||
dgst = EVP_ecdsa();
|
||||
pktmp = X509_get_pubkey(ret);
|
||||
if (EVP_PKEY_missing_parameters(pktmp) &&
|
||||
!EVP_PKEY_missing_parameters(pkey))
|
||||
EVP_PKEY_copy_parameters(pktmp, pkey);
|
||||
EVP_PKEY_free(pktmp);
|
||||
#endif
|
||||
|
||||
|
||||
if (!X509_sign(ret,pkey,dgst))
|
||||
goto err;
|
||||
@@ -2200,7 +2163,7 @@ static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext)
|
||||
|
||||
static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db,
|
||||
BIGNUM *serial, char *subj, int multirdn, int email_dn, char *startdate, char *enddate,
|
||||
BIGNUM *serial, char *subj, int email_dn, char *startdate, char *enddate,
|
||||
long days, char *ext_sect, CONF *lconf, int verbose, unsigned long certopt,
|
||||
unsigned long nameopt, int default_op, int ext_copy)
|
||||
{
|
||||
@@ -2341,9 +2304,9 @@ static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
|
||||
X509_REQ_set_pubkey(req,pktmp);
|
||||
EVP_PKEY_free(pktmp);
|
||||
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,multirdn,email_dn,startdate,enddate,
|
||||
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,email_dn,startdate,enddate,
|
||||
days,1,verbose,req,ext_sect,lconf, certopt, nameopt, default_op,
|
||||
ext_copy, 0);
|
||||
ext_copy);
|
||||
err:
|
||||
if (req != NULL) X509_REQ_free(req);
|
||||
if (parms != NULL) CONF_free(parms);
|
||||
@@ -2830,6 +2793,129 @@ int make_revoked(X509_REVOKED *rev, char *str)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* subject is expected to be in the format /type0=value0/type1=value1/type2=...
|
||||
* where characters may be escaped by \
|
||||
*/
|
||||
X509_NAME *do_subject(char *subject, long chtype)
|
||||
{
|
||||
size_t buflen = strlen(subject)+1; /* to copy the types and values into. due to escaping, the copy can only become shorter */
|
||||
char *buf = OPENSSL_malloc(buflen);
|
||||
size_t max_ne = buflen / 2 + 1; /* maximum number of name elements */
|
||||
char **ne_types = OPENSSL_malloc(max_ne * sizeof (char *));
|
||||
char **ne_values = OPENSSL_malloc(max_ne * sizeof (char *));
|
||||
|
||||
char *sp = subject, *bp = buf;
|
||||
int i, ne_num = 0;
|
||||
|
||||
X509_NAME *n = NULL;
|
||||
int nid;
|
||||
|
||||
if (!buf || !ne_types || !ne_values)
|
||||
{
|
||||
BIO_printf(bio_err, "malloc error\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (*subject != '/')
|
||||
{
|
||||
BIO_printf(bio_err, "Subject does not start with '/'.\n");
|
||||
goto error;
|
||||
}
|
||||
sp++; /* skip leading / */
|
||||
|
||||
while (*sp)
|
||||
{
|
||||
/* collect type */
|
||||
ne_types[ne_num] = bp;
|
||||
while (*sp)
|
||||
{
|
||||
if (*sp == '\\') /* is there anything to escape in the type...? */
|
||||
{
|
||||
if (*++sp)
|
||||
*bp++ = *sp++;
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "escape character at end of string\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else if (*sp == '=')
|
||||
{
|
||||
sp++;
|
||||
*bp++ = '\0';
|
||||
break;
|
||||
}
|
||||
else
|
||||
*bp++ = *sp++;
|
||||
}
|
||||
if (!*sp)
|
||||
{
|
||||
BIO_printf(bio_err, "end of string encountered while processing type of subject name element #%d\n", ne_num);
|
||||
goto error;
|
||||
}
|
||||
ne_values[ne_num] = bp;
|
||||
while (*sp)
|
||||
{
|
||||
if (*sp == '\\')
|
||||
{
|
||||
if (*++sp)
|
||||
*bp++ = *sp++;
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "escape character at end of string\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else if (*sp == '/')
|
||||
{
|
||||
sp++;
|
||||
break;
|
||||
}
|
||||
else
|
||||
*bp++ = *sp++;
|
||||
}
|
||||
*bp++ = '\0';
|
||||
ne_num++;
|
||||
}
|
||||
|
||||
if (!(n = X509_NAME_new()))
|
||||
goto error;
|
||||
|
||||
for (i = 0; i < ne_num; i++)
|
||||
{
|
||||
if ((nid=OBJ_txt2nid(ne_types[i])) == NID_undef)
|
||||
{
|
||||
BIO_printf(bio_err, "Subject Attribute %s has no known NID, skipped\n", ne_types[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!*ne_values[i])
|
||||
{
|
||||
BIO_printf(bio_err, "No value provided for Subject Attribute %s, skipped\n", ne_types[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!X509_NAME_add_entry_by_NID(n, nid, chtype, (unsigned char*)ne_values[i], -1,-1,0))
|
||||
goto error;
|
||||
}
|
||||
|
||||
OPENSSL_free(ne_values);
|
||||
OPENSSL_free(ne_types);
|
||||
OPENSSL_free(buf);
|
||||
return n;
|
||||
|
||||
error:
|
||||
X509_NAME_free(n);
|
||||
if (ne_values)
|
||||
OPENSSL_free(ne_values);
|
||||
if (ne_types)
|
||||
OPENSSL_free(ne_types);
|
||||
if (buf)
|
||||
OPENSSL_free(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int old_entry_print(BIO *bp, ASN1_OBJECT *obj, ASN1_STRING *str)
|
||||
{
|
||||
char buf[25],*pbuf, *p;
|
||||
@@ -2874,8 +2960,7 @@ int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_G
|
||||
char *tmp = NULL;
|
||||
char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
|
||||
int reason_code = -1;
|
||||
int ret = 0;
|
||||
unsigned int i;
|
||||
int i, ret = 0;
|
||||
ASN1_OBJECT *hold = NULL;
|
||||
ASN1_GENERALIZEDTIME *comp_time = NULL;
|
||||
tmp = BUF_strdup(str);
|
||||
|
||||
75
apps/dgst.c
75
apps/dgst.c
@@ -66,6 +66,7 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/hmac.h>
|
||||
|
||||
#undef BUFSIZE
|
||||
#define BUFSIZE 1024*8
|
||||
@@ -73,9 +74,11 @@
|
||||
#undef PROG
|
||||
#define PROG dgst_main
|
||||
|
||||
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);
|
||||
const char *file,BIO *bmd,const char *hmac_key, int non_fips_allow);
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
@@ -104,6 +107,8 @@ int MAIN(int argc, char **argv)
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
char *hmac_key=NULL;
|
||||
int non_fips_allow = 0;
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -188,6 +193,14 @@ 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)
|
||||
break;
|
||||
hmac_key=*++argv;
|
||||
}
|
||||
else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
|
||||
md=m;
|
||||
else
|
||||
@@ -229,20 +242,10 @@ int MAIN(int argc, char **argv)
|
||||
LN_md4,LN_md4);
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
LN_md2,LN_md2);
|
||||
#ifndef OPENSSL_NO_SHA
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
LN_sha1,LN_sha1);
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
LN_sha,LN_sha);
|
||||
#ifndef OPENSSL_NO_SHA256
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
LN_sha256,LN_sha256);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SHA512
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
LN_sha512,LN_sha512);
|
||||
#endif
|
||||
#endif
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
LN_mdc2,LN_mdc2);
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
|
||||
@@ -252,7 +255,7 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
in=BIO_new(BIO_s_file());
|
||||
@@ -341,13 +344,19 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -358,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)");
|
||||
siglen,"","(stdin)",bmd,hmac_key, non_fips_allow);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -376,14 +385,15 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
if(!out_bin)
|
||||
{
|
||||
size_t len = strlen(name)+strlen(argv[i])+5;
|
||||
size_t len = strlen(name)+strlen(argv[i])+(hmac_key ? 5 : 0)+5;
|
||||
tmp=tofree=OPENSSL_malloc(len);
|
||||
BIO_snprintf(tmp,len,"%s(%s)= ",name,argv[i]);
|
||||
BIO_snprintf(tmp,len,"%s%s(%s)= ",
|
||||
hmac_key ? "HMAC-" : "",name,argv[i]);
|
||||
}
|
||||
else
|
||||
tmp="";
|
||||
r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
|
||||
siglen,tmp,argv[i]);
|
||||
siglen,tmp,argv[i],bmd,hmac_key,non_fips_allow);
|
||||
if(r)
|
||||
err=r;
|
||||
if(tofree)
|
||||
@@ -410,11 +420,25 @@ 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)
|
||||
const char *file,BIO *bmd,const char *hmac_key, int non_fips_allow)
|
||||
{
|
||||
int len;
|
||||
unsigned int len;
|
||||
int i;
|
||||
EVP_MD_CTX *md_ctx;
|
||||
|
||||
if (hmac_key)
|
||||
{
|
||||
EVP_MD *md;
|
||||
|
||||
BIO_get_md(bmd,&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);
|
||||
}
|
||||
for (;;)
|
||||
{
|
||||
i=BIO_read(bp,(char *)buf,BUFSIZE);
|
||||
@@ -457,6 +481,11 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if(hmac_key)
|
||||
{
|
||||
HMAC_Final(&hmac_ctx,buf,&len);
|
||||
HMAC_CTX_cleanup(&hmac_ctx);
|
||||
}
|
||||
else
|
||||
len=BIO_gets(bp,(char *)buf,BUFSIZE);
|
||||
|
||||
@@ -464,7 +493,7 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
else
|
||||
{
|
||||
BIO_write(out,title,strlen(title));
|
||||
for (i=0; i<len; i++)
|
||||
for (i=0; (unsigned int)i<len; i++)
|
||||
{
|
||||
if (sep && (i != 0))
|
||||
BIO_printf(out, ":");
|
||||
@@ -472,6 +501,10 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
}
|
||||
BIO_printf(out, "\n");
|
||||
}
|
||||
if (hmac_key)
|
||||
{
|
||||
BIO_set_md_ctx(bmd,md_ctx);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
* -C
|
||||
*/
|
||||
|
||||
static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb);
|
||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg);
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
@@ -294,8 +294,6 @@ bad:
|
||||
|
||||
if(num) {
|
||||
|
||||
BN_GENCB cb;
|
||||
BN_GENCB_set(&cb, dh_cb, bio_err);
|
||||
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"warning, not much extra random data, consider using the -rand option\n");
|
||||
@@ -307,13 +305,12 @@ bad:
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
if (dsaparam)
|
||||
{
|
||||
DSA *dsa = DSA_new();
|
||||
DSA *dsa;
|
||||
|
||||
BIO_printf(bio_err,"Generating DSA parameters, %d bit long prime\n",num);
|
||||
if(!dsa || !DSA_generate_parameters_ex(dsa, num,
|
||||
NULL, 0, NULL, NULL, &cb))
|
||||
dsa = DSA_generate_parameters(num, NULL, 0, NULL, NULL, dh_cb, bio_err);
|
||||
if (dsa == NULL)
|
||||
{
|
||||
if(dsa) DSA_free(dsa);
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
@@ -329,12 +326,12 @@ bad:
|
||||
else
|
||||
#endif
|
||||
{
|
||||
dh = DH_new();
|
||||
BIO_printf(bio_err,"Generating DH parameters, %d bit long safe prime, generator %d\n",num,g);
|
||||
BIO_printf(bio_err,"This is going to take a long time\n");
|
||||
if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb))
|
||||
dh=DH_generate_parameters(num,g,dh_cb,bio_err);
|
||||
|
||||
if (dh == NULL)
|
||||
{
|
||||
if(dh) DH_free(dh);
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
@@ -537,7 +534,7 @@ end:
|
||||
}
|
||||
|
||||
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
|
||||
static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
|
||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
|
||||
{
|
||||
char c='*';
|
||||
|
||||
@@ -545,12 +542,11 @@ static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
|
||||
if (p == 1) c='+';
|
||||
if (p == 2) c='*';
|
||||
if (p == 3) c='\n';
|
||||
BIO_write(cb->arg,&c,1);
|
||||
(void)BIO_flush(cb->arg);
|
||||
BIO_write((BIO *)arg,&c,1);
|
||||
(void)BIO_flush((BIO *)arg);
|
||||
#ifdef LINT
|
||||
p=n;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
#undef PROG
|
||||
#define PROG dsa_main
|
||||
|
||||
@@ -56,12 +56,6 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
|
||||
* deprecated functions for openssl-internal code */
|
||||
#ifdef OPENSSL_NO_DEPRECATED
|
||||
#undef OPENSSL_NO_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
@@ -88,23 +82,9 @@
|
||||
* -C
|
||||
* -noout
|
||||
* -genkey
|
||||
* #ifdef GENCB_TEST
|
||||
* -timebomb n - interrupt keygen after <n> seconds
|
||||
* #endif
|
||||
*/
|
||||
|
||||
#ifdef GENCB_TEST
|
||||
|
||||
static int stop_keygen_flag = 0;
|
||||
|
||||
static void timebomb_sigalarm(int foo)
|
||||
{
|
||||
stop_keygen_flag = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb);
|
||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg);
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
@@ -123,9 +103,6 @@ int MAIN(int argc, char **argv)
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
#ifdef GENCB_TEST
|
||||
int timebomb=0;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -172,13 +149,6 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
engine = *(++argv);
|
||||
}
|
||||
#endif
|
||||
#ifdef GENCB_TEST
|
||||
else if(strcmp(*argv, "-timebomb") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
timebomb = atoi(*(++argv));
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-text") == 0)
|
||||
text=1;
|
||||
@@ -229,9 +199,6 @@ bad:
|
||||
BIO_printf(bio_err," -rand files to use for random number input\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
#ifdef GENCB_TEST
|
||||
BIO_printf(bio_err," -timebomb n interrupt keygen after <n> seconds\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," number number of bits to use for generating private key\n");
|
||||
goto end;
|
||||
@@ -290,47 +257,10 @@ bad:
|
||||
|
||||
if (numbits > 0)
|
||||
{
|
||||
BN_GENCB cb;
|
||||
BN_GENCB_set(&cb, dsa_cb, bio_err);
|
||||
assert(need_rand);
|
||||
dsa = DSA_new();
|
||||
if(!dsa)
|
||||
{
|
||||
BIO_printf(bio_err,"Error allocating DSA object\n");
|
||||
goto end;
|
||||
}
|
||||
BIO_printf(bio_err,"Generating DSA parameters, %d bit long prime\n",num);
|
||||
BIO_printf(bio_err,"This could take some time\n");
|
||||
#ifdef GENCB_TEST
|
||||
if(timebomb > 0)
|
||||
{
|
||||
struct sigaction act;
|
||||
act.sa_handler = timebomb_sigalarm;
|
||||
act.sa_flags = 0;
|
||||
BIO_printf(bio_err,"(though I'll stop it if not done within %d secs)\n",
|
||||
timebomb);
|
||||
if(sigaction(SIGALRM, &act, NULL) != 0)
|
||||
{
|
||||
BIO_printf(bio_err,"Error, couldn't set SIGALRM handler\n");
|
||||
goto end;
|
||||
}
|
||||
alarm(timebomb);
|
||||
}
|
||||
#endif
|
||||
if(!DSA_generate_parameters_ex(dsa,num,NULL,0,NULL,NULL, &cb))
|
||||
{
|
||||
#ifdef GENCB_TEST
|
||||
if(stop_keygen_flag)
|
||||
{
|
||||
BIO_printf(bio_err,"DSA key generation time-stopped\n");
|
||||
/* This is an asked-for behaviour! */
|
||||
ret = 0;
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
BIO_printf(bio_err,"Error, DSA key generation failed\n");
|
||||
goto end;
|
||||
}
|
||||
dsa=DSA_generate_parameters(num,NULL,0,NULL,NULL, dsa_cb,bio_err);
|
||||
}
|
||||
else if (informat == FORMAT_ASN1)
|
||||
dsa=d2i_DSAparams_bio(in,NULL);
|
||||
@@ -455,7 +385,7 @@ end:
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb)
|
||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
|
||||
{
|
||||
char c='*';
|
||||
|
||||
@@ -463,15 +393,10 @@ static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb)
|
||||
if (p == 1) c='+';
|
||||
if (p == 2) c='*';
|
||||
if (p == 3) c='\n';
|
||||
BIO_write(cb->arg,&c,1);
|
||||
(void)BIO_flush(cb->arg);
|
||||
BIO_write(arg,&c,1);
|
||||
(void)BIO_flush(arg);
|
||||
#ifdef LINT
|
||||
p=n;
|
||||
#endif
|
||||
#ifdef GENCB_TEST
|
||||
if(stop_keygen_flag)
|
||||
return 0;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
399
apps/ec.c
399
apps/ec.c
@@ -1,399 +0,0 @@
|
||||
/* apps/ec.c */
|
||||
/*
|
||||
* Written by Nils Larsch for the OpenSSL project.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2002 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
|
||||
* openssl-core@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).
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "apps.h"
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
#undef PROG
|
||||
#define PROG ec_main
|
||||
|
||||
/* -inform arg - input format - default PEM (one of DER, NET or PEM)
|
||||
* -outform arg - output format - default PEM
|
||||
* -in arg - input file - default stdin
|
||||
* -out arg - output file - default stdout
|
||||
* -des - encrypt output if PEM format with DES in cbc mode
|
||||
* -text - print a text version
|
||||
* -param_out - print the elliptic curve parameters
|
||||
* -conv_form arg - specifies the point encoding form
|
||||
* -param_enc arg - specifies the parameter encoding
|
||||
*/
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
int ret = 1;
|
||||
EC_KEY *eckey = NULL;
|
||||
int i, badops = 0;
|
||||
const EVP_CIPHER *enc = NULL;
|
||||
BIO *in = NULL, *out = NULL;
|
||||
int informat, outformat, text=0, noout=0;
|
||||
int pubin = 0, pubout = 0, param_out = 0;
|
||||
char *infile, *outfile, *prog, *engine;
|
||||
char *passargin = NULL, *passargout = NULL;
|
||||
char *passin = NULL, *passout = NULL;
|
||||
point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED;
|
||||
int new_form = 0;
|
||||
int asn1_flag = OPENSSL_EC_NAMED_CURVE;
|
||||
int new_asn1_flag = 0;
|
||||
|
||||
apps_startup();
|
||||
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err, stderr, BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
|
||||
if (!load_config(bio_err, NULL))
|
||||
goto end;
|
||||
|
||||
engine = NULL;
|
||||
infile = NULL;
|
||||
outfile = NULL;
|
||||
informat = FORMAT_PEM;
|
||||
outformat = FORMAT_PEM;
|
||||
|
||||
prog = argv[0];
|
||||
argc--;
|
||||
argv++;
|
||||
while (argc >= 1)
|
||||
{
|
||||
if (strcmp(*argv,"-inform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
informat=str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-outform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
outformat=str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-in") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
infile= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-out") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
outfile= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-passin") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
passargin= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-passout") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
passargout= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv, "-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv, "-noout") == 0)
|
||||
noout = 1;
|
||||
else if (strcmp(*argv, "-text") == 0)
|
||||
text = 1;
|
||||
else if (strcmp(*argv, "-conv_form") == 0)
|
||||
{
|
||||
if (--argc < 1)
|
||||
goto bad;
|
||||
++argv;
|
||||
new_form = 1;
|
||||
if (strcmp(*argv, "compressed") == 0)
|
||||
form = POINT_CONVERSION_COMPRESSED;
|
||||
else if (strcmp(*argv, "uncompressed") == 0)
|
||||
form = POINT_CONVERSION_UNCOMPRESSED;
|
||||
else if (strcmp(*argv, "hybrid") == 0)
|
||||
form = POINT_CONVERSION_HYBRID;
|
||||
else
|
||||
goto bad;
|
||||
}
|
||||
else if (strcmp(*argv, "-param_enc") == 0)
|
||||
{
|
||||
if (--argc < 1)
|
||||
goto bad;
|
||||
++argv;
|
||||
new_asn1_flag = 1;
|
||||
if (strcmp(*argv, "named_curve") == 0)
|
||||
asn1_flag = OPENSSL_EC_NAMED_CURVE;
|
||||
else if (strcmp(*argv, "explicit") == 0)
|
||||
asn1_flag = 0;
|
||||
else
|
||||
goto bad;
|
||||
}
|
||||
else if (strcmp(*argv, "-param_out") == 0)
|
||||
param_out = 1;
|
||||
else if (strcmp(*argv, "-pubin") == 0)
|
||||
pubin=1;
|
||||
else if (strcmp(*argv, "-pubout") == 0)
|
||||
pubout=1;
|
||||
else if ((enc=EVP_get_cipherbyname(&(argv[0][1]))) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err, "unknown option %s\n", *argv);
|
||||
badops=1;
|
||||
break;
|
||||
}
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
|
||||
if (badops)
|
||||
{
|
||||
bad:
|
||||
BIO_printf(bio_err, "%s [options] <infile >outfile\n", prog);
|
||||
BIO_printf(bio_err, "where options are\n");
|
||||
BIO_printf(bio_err, " -inform arg input format - "
|
||||
"DER or PEM\n");
|
||||
BIO_printf(bio_err, " -outform arg output format - "
|
||||
"DER or PEM\n");
|
||||
BIO_printf(bio_err, " -in arg input file\n");
|
||||
BIO_printf(bio_err, " -passin arg input file pass "
|
||||
"phrase source\n");
|
||||
BIO_printf(bio_err, " -out arg output file\n");
|
||||
BIO_printf(bio_err, " -passout arg output file pass "
|
||||
"phrase source\n");
|
||||
BIO_printf(bio_err, " -engine e use engine e, "
|
||||
"possibly a hardware device.\n");
|
||||
BIO_printf(bio_err, " -des encrypt PEM output, "
|
||||
"instead of 'des' every other \n"
|
||||
" cipher "
|
||||
"supported by OpenSSL can be used\n");
|
||||
BIO_printf(bio_err, " -text print the key\n");
|
||||
BIO_printf(bio_err, " -noout don't print key out\n");
|
||||
BIO_printf(bio_err, " -param_out print the elliptic "
|
||||
"curve parameters\n");
|
||||
BIO_printf(bio_err, " -conv_form arg specifies the "
|
||||
"point conversion form \n");
|
||||
BIO_printf(bio_err, " possible values:"
|
||||
" compressed\n");
|
||||
BIO_printf(bio_err, " "
|
||||
" uncompressed (default)\n");
|
||||
BIO_printf(bio_err, " "
|
||||
" hybrid\n");
|
||||
BIO_printf(bio_err, " -param_enc arg specifies the way"
|
||||
" the ec parameters are encoded\n");
|
||||
BIO_printf(bio_err, " in the asn1 der "
|
||||
"encoding\n");
|
||||
BIO_printf(bio_err, " possilbe values:"
|
||||
" named_curve (default)\n");
|
||||
BIO_printf(bio_err," "
|
||||
"explicit\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout))
|
||||
{
|
||||
BIO_printf(bio_err, "Error getting passwords\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
in = BIO_new(BIO_s_file());
|
||||
out = BIO_new(BIO_s_file());
|
||||
if ((in == NULL) || (out == NULL))
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (infile == NULL)
|
||||
BIO_set_fp(in, stdin, BIO_NOCLOSE);
|
||||
else
|
||||
{
|
||||
if (BIO_read_filename(in, infile) <= 0)
|
||||
{
|
||||
perror(infile);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
BIO_printf(bio_err, "read EC key\n");
|
||||
if (informat == FORMAT_ASN1)
|
||||
{
|
||||
if (pubin)
|
||||
eckey = d2i_EC_PUBKEY_bio(in, NULL);
|
||||
else
|
||||
eckey = d2i_ECPrivateKey_bio(in, NULL);
|
||||
}
|
||||
else if (informat == FORMAT_PEM)
|
||||
{
|
||||
if (pubin)
|
||||
eckey = PEM_read_bio_EC_PUBKEY(in, NULL, NULL,
|
||||
NULL);
|
||||
else
|
||||
eckey = PEM_read_bio_ECPrivateKey(in, NULL, NULL,
|
||||
passin);
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "bad input format specified for key\n");
|
||||
goto end;
|
||||
}
|
||||
if (eckey == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"unable to load Key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (outfile == NULL)
|
||||
{
|
||||
BIO_set_fp(out, stdout, BIO_NOCLOSE);
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
{
|
||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||
out = BIO_push(tmpbio, out);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BIO_write_filename(out, outfile) <= 0)
|
||||
{
|
||||
perror(outfile);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (new_form)
|
||||
{
|
||||
EC_GROUP_set_point_conversion_form(eckey->group, form);
|
||||
eckey->conv_form = form;
|
||||
}
|
||||
|
||||
if (new_asn1_flag)
|
||||
EC_GROUP_set_asn1_flag(eckey->group, asn1_flag);
|
||||
|
||||
if (text)
|
||||
if (!EC_KEY_print(out, eckey, 0))
|
||||
{
|
||||
perror(outfile);
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (noout)
|
||||
goto end;
|
||||
|
||||
BIO_printf(bio_err, "writing EC key\n");
|
||||
if (outformat == FORMAT_ASN1)
|
||||
{
|
||||
if (param_out)
|
||||
i = i2d_ECPKParameters_bio(out, eckey->group);
|
||||
else if (pubin || pubout)
|
||||
i = i2d_EC_PUBKEY_bio(out, eckey);
|
||||
else
|
||||
i = i2d_ECPrivateKey_bio(out, eckey);
|
||||
}
|
||||
else if (outformat == FORMAT_PEM)
|
||||
{
|
||||
if (param_out)
|
||||
i = PEM_write_bio_ECPKParameters(out, eckey->group);
|
||||
else if (pubin || pubout)
|
||||
i = PEM_write_bio_EC_PUBKEY(out, eckey);
|
||||
else
|
||||
i = PEM_write_bio_ECPrivateKey(out, eckey, enc,
|
||||
NULL, 0, NULL, passout);
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "bad output format specified for "
|
||||
"outfile\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!i)
|
||||
{
|
||||
BIO_printf(bio_err, "unable to write private key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
}
|
||||
else
|
||||
ret=0;
|
||||
end:
|
||||
if (in)
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free_all(out);
|
||||
if (eckey)
|
||||
EC_KEY_free(eckey);
|
||||
if (passin)
|
||||
OPENSSL_free(passin);
|
||||
if (passout)
|
||||
OPENSSL_free(passout);
|
||||
apps_shutdown();
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#endif
|
||||
728
apps/ecparam.c
728
apps/ecparam.c
@@ -1,728 +0,0 @@
|
||||
/* apps/ecparam.c */
|
||||
/*
|
||||
* Written by Nils Larsch for the OpenSSL project.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2002 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
|
||||
* openssl-core@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).
|
||||
*
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
|
||||
*
|
||||
* Portions of the attached software ("Contribution") are developed by
|
||||
* SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
|
||||
*
|
||||
* The Contribution is licensed pursuant to the OpenSSL open source
|
||||
* license provided above.
|
||||
*
|
||||
* The elliptic curve binary polynomial software is originally written by
|
||||
* Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include "apps.h"
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/ec.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
#undef PROG
|
||||
#define PROG ecparam_main
|
||||
|
||||
/* -inform arg - input format - default PEM (DER or PEM)
|
||||
* -outform arg - output format - default PEM
|
||||
* -in arg - input file - default stdin
|
||||
* -out arg - output file - default stdout
|
||||
* -noout - do not print the ec parameter
|
||||
* -text - print the ec parameters in text form
|
||||
* -check - validate the ec parameters
|
||||
* -C - print a 'C' function creating the parameters
|
||||
* -name arg - use the ec parameters with 'short name' name
|
||||
* -list_curves - prints a list of all currently available curve 'short names'
|
||||
* -conv_form arg - specifies the point conversion form
|
||||
* - possible values: compressed
|
||||
* uncompressed (default)
|
||||
* hybrid
|
||||
* -param_enc arg - specifies the way the ec parameters are encoded
|
||||
* in the asn1 der encoding
|
||||
* possible values: named_curve (default)
|
||||
* explicit
|
||||
* -no_seed - if 'explicit' parameters are choosen do not use the seed
|
||||
* -genkey - generate ec key
|
||||
* -rand file - files to use for random number input
|
||||
* -engine e - use engine e, possibly a hardware device
|
||||
*/
|
||||
|
||||
|
||||
static int ecparam_print_var(BIO *,BIGNUM *,const char *,int,unsigned char *);
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
EC_GROUP *group = NULL;
|
||||
point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED;
|
||||
int new_form = 0;
|
||||
int asn1_flag = OPENSSL_EC_NAMED_CURVE;
|
||||
int new_asn1_flag = 0;
|
||||
char *curve_name = NULL, *inrand = NULL;
|
||||
int list_curves = 0, no_seed = 0, check = 0,
|
||||
badops = 0, text = 0, i, need_rand = 0, genkey = 0;
|
||||
char *infile = NULL, *outfile = NULL, *prog;
|
||||
BIO *in = NULL, *out = NULL;
|
||||
int informat, outformat, noout = 0, C = 0, ret = 1;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
char *engine = NULL;
|
||||
|
||||
BIGNUM *ec_p = NULL, *ec_a = NULL, *ec_b = NULL,
|
||||
*ec_gen = NULL, *ec_order = NULL, *ec_cofactor = NULL;
|
||||
unsigned char *buffer = NULL;
|
||||
|
||||
apps_startup();
|
||||
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
|
||||
if (!load_config(bio_err, NULL))
|
||||
goto end;
|
||||
|
||||
informat=FORMAT_PEM;
|
||||
outformat=FORMAT_PEM;
|
||||
|
||||
prog=argv[0];
|
||||
argc--;
|
||||
argv++;
|
||||
while (argc >= 1)
|
||||
{
|
||||
if (strcmp(*argv,"-inform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
informat=str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-outform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
outformat=str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-in") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
infile= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-out") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
outfile= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-text") == 0)
|
||||
text = 1;
|
||||
else if (strcmp(*argv,"-C") == 0)
|
||||
C = 1;
|
||||
else if (strcmp(*argv,"-check") == 0)
|
||||
check = 1;
|
||||
else if (strcmp (*argv, "-name") == 0)
|
||||
{
|
||||
if (--argc < 1)
|
||||
goto bad;
|
||||
curve_name = *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv, "-list_curves") == 0)
|
||||
list_curves = 1;
|
||||
else if (strcmp(*argv, "-conv_form") == 0)
|
||||
{
|
||||
if (--argc < 1)
|
||||
goto bad;
|
||||
++argv;
|
||||
new_form = 1;
|
||||
if (strcmp(*argv, "compressed") == 0)
|
||||
form = POINT_CONVERSION_COMPRESSED;
|
||||
else if (strcmp(*argv, "uncompressed") == 0)
|
||||
form = POINT_CONVERSION_UNCOMPRESSED;
|
||||
else if (strcmp(*argv, "hybrid") == 0)
|
||||
form = POINT_CONVERSION_HYBRID;
|
||||
else
|
||||
goto bad;
|
||||
}
|
||||
else if (strcmp(*argv, "-param_enc") == 0)
|
||||
{
|
||||
if (--argc < 1)
|
||||
goto bad;
|
||||
++argv;
|
||||
new_asn1_flag = 1;
|
||||
if (strcmp(*argv, "named_curve") == 0)
|
||||
asn1_flag = OPENSSL_EC_NAMED_CURVE;
|
||||
else if (strcmp(*argv, "explicit") == 0)
|
||||
asn1_flag = 0;
|
||||
else
|
||||
goto bad;
|
||||
}
|
||||
else if (strcmp(*argv, "-no_seed") == 0)
|
||||
no_seed = 1;
|
||||
else if (strcmp(*argv, "-noout") == 0)
|
||||
noout=1;
|
||||
else if (strcmp(*argv,"-genkey") == 0)
|
||||
{
|
||||
genkey=1;
|
||||
need_rand=1;
|
||||
}
|
||||
else if (strcmp(*argv, "-rand") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
inrand= *(++argv);
|
||||
need_rand=1;
|
||||
}
|
||||
else if(strcmp(*argv, "-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine = *(++argv);
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||
badops=1;
|
||||
break;
|
||||
}
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
|
||||
if (badops)
|
||||
{
|
||||
bad:
|
||||
BIO_printf(bio_err, "%s [options] <infile >outfile\n",prog);
|
||||
BIO_printf(bio_err, "where options are\n");
|
||||
BIO_printf(bio_err, " -inform arg input format - "
|
||||
"default PEM (DER or PEM)\n");
|
||||
BIO_printf(bio_err, " -outform arg output format - "
|
||||
"default PEM\n");
|
||||
BIO_printf(bio_err, " -in arg input file - "
|
||||
"default stdin\n");
|
||||
BIO_printf(bio_err, " -out arg output file - "
|
||||
"default stdout\n");
|
||||
BIO_printf(bio_err, " -noout do not print the "
|
||||
"ec parameter\n");
|
||||
BIO_printf(bio_err, " -text print the ec "
|
||||
"parameters in text form\n");
|
||||
BIO_printf(bio_err, " -check validate the ec "
|
||||
"parameters\n");
|
||||
BIO_printf(bio_err, " -C print a 'C' "
|
||||
"function creating the parameters\n");
|
||||
BIO_printf(bio_err, " -name arg use the "
|
||||
"ec parameters with 'short name' name\n");
|
||||
BIO_printf(bio_err, " -list_curves prints a list of "
|
||||
"all currently available curve 'short names'\n");
|
||||
BIO_printf(bio_err, " -conv_form arg specifies the "
|
||||
"point conversion form \n");
|
||||
BIO_printf(bio_err, " possible values:"
|
||||
" compressed\n");
|
||||
BIO_printf(bio_err, " "
|
||||
" uncompressed (default)\n");
|
||||
BIO_printf(bio_err, " "
|
||||
" hybrid\n");
|
||||
BIO_printf(bio_err, " -param_enc arg specifies the way"
|
||||
" the ec parameters are encoded\n");
|
||||
BIO_printf(bio_err, " in the asn1 der "
|
||||
"encoding\n");
|
||||
BIO_printf(bio_err, " possible values:"
|
||||
" named_curve (default)\n");
|
||||
BIO_printf(bio_err, " "
|
||||
" explicit\n");
|
||||
BIO_printf(bio_err, " -no_seed if 'explicit'"
|
||||
" parameters are choosen do not"
|
||||
" use the seed\n");
|
||||
BIO_printf(bio_err, " -genkey generate ec"
|
||||
" key\n");
|
||||
BIO_printf(bio_err, " -rand file files to use for"
|
||||
" random number input\n");
|
||||
BIO_printf(bio_err, " -engine e use engine e, "
|
||||
"possibly a hardware device\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
in=BIO_new(BIO_s_file());
|
||||
out=BIO_new(BIO_s_file());
|
||||
if ((in == NULL) || (out == NULL))
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (infile == NULL)
|
||||
BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
||||
else
|
||||
{
|
||||
if (BIO_read_filename(in,infile) <= 0)
|
||||
{
|
||||
perror(infile);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
if (outfile == NULL)
|
||||
{
|
||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
{
|
||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||
out = BIO_push(tmpbio, out);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BIO_write_filename(out,outfile) <= 0)
|
||||
{
|
||||
perror(outfile);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (list_curves)
|
||||
{
|
||||
EC_builtin_curve *curves = NULL;
|
||||
size_t crv_len = 0;
|
||||
size_t n = 0;
|
||||
|
||||
crv_len = EC_get_builtin_curves(NULL, 0);
|
||||
|
||||
curves = OPENSSL_malloc(sizeof(EC_builtin_curve) * crv_len);
|
||||
|
||||
if (curves == NULL)
|
||||
goto end;
|
||||
|
||||
if (!EC_get_builtin_curves(curves, crv_len))
|
||||
{
|
||||
OPENSSL_free(curves);
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
for (n = 0; n < crv_len; n++)
|
||||
{
|
||||
const char *comment;
|
||||
const char *sname;
|
||||
comment = curves[n].comment;
|
||||
sname = OBJ_nid2sn(curves[n].nid);
|
||||
if (comment == NULL)
|
||||
comment = "CURVE DESCRIPTION NOT AVAILABLE";
|
||||
if (sname == NULL)
|
||||
sname = "";
|
||||
|
||||
BIO_printf(out, " %-10s: ", sname);
|
||||
BIO_printf(out, "%s\n", comment);
|
||||
}
|
||||
|
||||
OPENSSL_free(curves);
|
||||
ret = 0;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (curve_name != NULL)
|
||||
{
|
||||
int nid;
|
||||
|
||||
/* workaround for the SECG curve names secp192r1
|
||||
* and secp256r1 (which are the same as the curves
|
||||
* prime192v1 and prime256v1 defined in X9.62)
|
||||
*/
|
||||
if (!strcmp(curve_name, "secp192r1"))
|
||||
{
|
||||
BIO_printf(bio_err, "using curve name prime192v1 "
|
||||
"instead of secp192r1\n");
|
||||
nid = NID_X9_62_prime192v1;
|
||||
}
|
||||
else if (!strcmp(curve_name, "secp256r1"))
|
||||
{
|
||||
BIO_printf(bio_err, "using curve name prime256v1 "
|
||||
"instead of secp256r1\n");
|
||||
nid = NID_X9_62_prime256v1;
|
||||
}
|
||||
else
|
||||
nid = OBJ_sn2nid(curve_name);
|
||||
|
||||
if (nid == 0)
|
||||
{
|
||||
BIO_printf(bio_err, "unknown curve name (%s)\n",
|
||||
curve_name);
|
||||
goto end;
|
||||
}
|
||||
|
||||
group = EC_GROUP_new_by_nid(nid);
|
||||
if (group == NULL)
|
||||
{
|
||||
BIO_printf(bio_err, "unable to create curve (%s)\n",
|
||||
curve_name);
|
||||
goto end;
|
||||
}
|
||||
EC_GROUP_set_asn1_flag(group, asn1_flag);
|
||||
EC_GROUP_set_point_conversion_form(group, form);
|
||||
}
|
||||
else if (informat == FORMAT_ASN1)
|
||||
{
|
||||
group = d2i_ECPKParameters_bio(in, NULL);
|
||||
}
|
||||
else if (informat == FORMAT_PEM)
|
||||
{
|
||||
group = PEM_read_bio_ECPKParameters(in,NULL,NULL,NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "bad input format specified\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (group == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,
|
||||
"unable to load elliptic curve parameters\n");
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (new_form)
|
||||
EC_GROUP_set_point_conversion_form(group, form);
|
||||
|
||||
if (new_asn1_flag)
|
||||
EC_GROUP_set_asn1_flag(group, asn1_flag);
|
||||
|
||||
if (no_seed)
|
||||
{
|
||||
EC_GROUP_set_seed(group, NULL, 0);
|
||||
}
|
||||
|
||||
if (text)
|
||||
{
|
||||
if (!ECPKParameters_print(out, group, 0))
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (check)
|
||||
{
|
||||
if (group == NULL)
|
||||
BIO_printf(bio_err, "no elliptic curve parameters\n");
|
||||
BIO_printf(bio_err, "checking elliptic curve parameters: ");
|
||||
if (!EC_GROUP_check(group, NULL))
|
||||
{
|
||||
BIO_printf(bio_err, "failed\n");
|
||||
ERR_print_errors(bio_err);
|
||||
}
|
||||
else
|
||||
BIO_printf(bio_err, "ok\n");
|
||||
|
||||
}
|
||||
|
||||
if (C)
|
||||
{
|
||||
size_t buf_len = 0, tmp_len = 0;
|
||||
const EC_POINT *point;
|
||||
int is_prime, len = 0;
|
||||
const EC_METHOD *meth = EC_GROUP_method_of(group);
|
||||
|
||||
if ((ec_p = BN_new()) == NULL || (ec_a = BN_new()) == NULL ||
|
||||
(ec_b = BN_new()) == NULL || (ec_gen = BN_new()) == NULL ||
|
||||
(ec_order = BN_new()) == NULL ||
|
||||
(ec_cofactor = BN_new()) == NULL )
|
||||
{
|
||||
perror("OPENSSL_malloc");
|
||||
goto end;
|
||||
}
|
||||
|
||||
is_prime = (EC_METHOD_get_field_type(meth) ==
|
||||
NID_X9_62_prime_field);
|
||||
|
||||
if (is_prime)
|
||||
{
|
||||
if (!EC_GROUP_get_curve_GFp(group, ec_p, ec_a,
|
||||
ec_b, NULL))
|
||||
goto end;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO */
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((point = EC_GROUP_get0_generator(group)) == NULL)
|
||||
goto end;
|
||||
if (!EC_POINT_point2bn(group, point,
|
||||
EC_GROUP_get_point_conversion_form(group), ec_gen,
|
||||
NULL))
|
||||
goto end;
|
||||
if (!EC_GROUP_get_order(group, ec_order, NULL))
|
||||
goto end;
|
||||
if (!EC_GROUP_get_cofactor(group, ec_cofactor, NULL))
|
||||
goto end;
|
||||
|
||||
if (!ec_p || !ec_a || !ec_b || !ec_gen ||
|
||||
!ec_order || !ec_cofactor)
|
||||
goto end;
|
||||
|
||||
len = BN_num_bits(ec_order);
|
||||
|
||||
if ((tmp_len = (size_t)BN_num_bytes(ec_p)) > buf_len)
|
||||
buf_len = tmp_len;
|
||||
if ((tmp_len = (size_t)BN_num_bytes(ec_a)) > buf_len)
|
||||
buf_len = tmp_len;
|
||||
if ((tmp_len = (size_t)BN_num_bytes(ec_b)) > buf_len)
|
||||
buf_len = tmp_len;
|
||||
if ((tmp_len = (size_t)BN_num_bytes(ec_gen)) > buf_len)
|
||||
buf_len = tmp_len;
|
||||
if ((tmp_len = (size_t)BN_num_bytes(ec_order)) > buf_len)
|
||||
buf_len = tmp_len;
|
||||
if ((tmp_len = (size_t)BN_num_bytes(ec_cofactor)) > buf_len)
|
||||
buf_len = tmp_len;
|
||||
|
||||
buffer = (unsigned char *)OPENSSL_malloc(buf_len);
|
||||
|
||||
if (buffer == NULL)
|
||||
{
|
||||
perror("OPENSSL_malloc");
|
||||
goto end;
|
||||
}
|
||||
|
||||
ecparam_print_var(out, ec_p, "ec_p", len, buffer);
|
||||
ecparam_print_var(out, ec_a, "ec_a", len, buffer);
|
||||
ecparam_print_var(out, ec_b, "ec_b", len, buffer);
|
||||
ecparam_print_var(out, ec_gen, "ec_gen", len, buffer);
|
||||
ecparam_print_var(out, ec_order, "ec_order", len, buffer);
|
||||
ecparam_print_var(out, ec_cofactor, "ec_cofactor", len,
|
||||
buffer);
|
||||
|
||||
BIO_printf(out, "\n\n");
|
||||
|
||||
BIO_printf(out, "EC_GROUP *get_ec_group_%d(void)\n\t{\n", len);
|
||||
BIO_printf(out, "\tint ok=0;\n");
|
||||
BIO_printf(out, "\tEC_GROUP *group = NULL;\n");
|
||||
BIO_printf(out, "\tEC_POINT *point = NULL;\n");
|
||||
BIO_printf(out, "\tBIGNUM *tmp_1 = NULL, *tmp_2 = NULL, "
|
||||
"*tmp_3 = NULL;\n\n");
|
||||
BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_p_%d, "
|
||||
"sizeof(ec_p_%d), NULL)) == NULL)\n\t\t"
|
||||
"goto err;\n", len, len);
|
||||
BIO_printf(out, "\tif ((tmp_2 = BN_bin2bn(ec_a_%d, "
|
||||
"sizeof(ec_a_%d), NULL)) == NULL)\n\t\t"
|
||||
"goto err;\n", len, len);
|
||||
BIO_printf(out, "\tif ((tmp_3 = BN_bin2bn(ec_b_%d, "
|
||||
"sizeof(ec_b_%d), NULL)) == NULL)\n\t\t"
|
||||
"goto err;\n", len, len);
|
||||
if (is_prime)
|
||||
{
|
||||
BIO_printf(out, "\tif ((group = EC_GROUP_new_curve_"
|
||||
"GFp(tmp_1, tmp_2, tmp_3, NULL)) == NULL)"
|
||||
"\n\t\tgoto err;\n\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO */
|
||||
goto end;
|
||||
}
|
||||
BIO_printf(out, "\t/* build generator */\n");
|
||||
BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_gen_%d, "
|
||||
"sizeof(ec_gen_%d), tmp_1)) == NULL)"
|
||||
"\n\t\tgoto err;\n", len, len);
|
||||
BIO_printf(out, "\tpoint = EC_POINT_bn2point(group, tmp_1, "
|
||||
"NULL, NULL);\n");
|
||||
BIO_printf(out, "\tif (point == NULL)\n\t\tgoto err;\n");
|
||||
BIO_printf(out, "\tif ((tmp_2 = BN_bin2bn(ec_order_%d, "
|
||||
"sizeof(ec_order_%d), tmp_2)) == NULL)"
|
||||
"\n\t\tgoto err;\n", len, len);
|
||||
BIO_printf(out, "\tif ((tmp_3 = BN_bin2bn(ec_cofactor_%d, "
|
||||
"sizeof(ec_cofactor_%d), tmp_3)) == NULL)"
|
||||
"\n\t\tgoto err;\n", len, len);
|
||||
BIO_printf(out, "\tif (!EC_GROUP_set_generator(group, point,"
|
||||
" tmp_2, tmp_3))\n\t\tgoto err;\n");
|
||||
BIO_printf(out, "\n\tok=1;\n");
|
||||
BIO_printf(out, "err:\n");
|
||||
BIO_printf(out, "\tif (tmp_1)\n\t\tBN_free(tmp_1);\n");
|
||||
BIO_printf(out, "\tif (tmp_2)\n\t\tBN_free(tmp_2);\n");
|
||||
BIO_printf(out, "\tif (tmp_3)\n\t\tBN_free(tmp_3);\n");
|
||||
BIO_printf(out, "\tif (point)\n\t\tEC_POINT_free(point);\n");
|
||||
BIO_printf(out, "\tif (!ok)\n");
|
||||
BIO_printf(out, "\t\t{\n");
|
||||
BIO_printf(out, "\t\tEC_GROUP_free(group);\n");
|
||||
BIO_printf(out, "\t\tgroup = NULL;\n");
|
||||
BIO_printf(out, "\t\t}\n");
|
||||
BIO_printf(out, "\treturn(group);\n\t}\n");
|
||||
}
|
||||
|
||||
if (!noout)
|
||||
{
|
||||
if (outformat == FORMAT_ASN1)
|
||||
i = i2d_ECPKParameters_bio(out, group);
|
||||
else if (outformat == FORMAT_PEM)
|
||||
i = PEM_write_bio_ECPKParameters(out, group);
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err,"bad output format specified for"
|
||||
" outfile\n");
|
||||
goto end;
|
||||
}
|
||||
if (!i)
|
||||
{
|
||||
BIO_printf(bio_err, "unable to write elliptic "
|
||||
"curve parameters\n");
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (need_rand)
|
||||
{
|
||||
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
|
||||
if (inrand != NULL)
|
||||
BIO_printf(bio_err,"%ld semi-random bytes loaded\n",
|
||||
app_RAND_load_files(inrand));
|
||||
}
|
||||
|
||||
if (genkey)
|
||||
{
|
||||
EC_KEY *eckey = EC_KEY_new();
|
||||
|
||||
if (eckey == NULL)
|
||||
goto end;
|
||||
|
||||
assert(need_rand);
|
||||
|
||||
eckey->group = group;
|
||||
|
||||
if (!EC_KEY_generate_key(eckey))
|
||||
{
|
||||
eckey->group = NULL;
|
||||
EC_KEY_free(eckey);
|
||||
goto end;
|
||||
}
|
||||
if (outformat == FORMAT_ASN1)
|
||||
i = i2d_ECPrivateKey_bio(out, eckey);
|
||||
else if (outformat == FORMAT_PEM)
|
||||
i = PEM_write_bio_ECPrivateKey(out, eckey, NULL,
|
||||
NULL, 0, NULL, NULL);
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "bad output format specified "
|
||||
"for outfile\n");
|
||||
eckey->group = NULL;
|
||||
EC_KEY_free(eckey);
|
||||
goto end;
|
||||
}
|
||||
eckey->group = NULL;
|
||||
EC_KEY_free(eckey);
|
||||
}
|
||||
|
||||
if (need_rand)
|
||||
app_RAND_write_file(NULL, bio_err);
|
||||
|
||||
ret=0;
|
||||
end:
|
||||
if (ec_p)
|
||||
BN_free(ec_p);
|
||||
if (ec_a)
|
||||
BN_free(ec_a);
|
||||
if (ec_b)
|
||||
BN_free(ec_b);
|
||||
if (ec_gen)
|
||||
BN_free(ec_gen);
|
||||
if (ec_order)
|
||||
BN_free(ec_order);
|
||||
if (ec_cofactor)
|
||||
BN_free(ec_cofactor);
|
||||
if (buffer)
|
||||
OPENSSL_free(buffer);
|
||||
if (in != NULL)
|
||||
BIO_free(in);
|
||||
if (out != NULL)
|
||||
BIO_free_all(out);
|
||||
if (group != NULL)
|
||||
EC_GROUP_free(group);
|
||||
apps_shutdown();
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static int ecparam_print_var(BIO *out, BIGNUM *in, const char *var,
|
||||
int len, unsigned char *buffer)
|
||||
{
|
||||
BIO_printf(out, "static unsigned char %s_%d[] = {", var, len);
|
||||
if (BN_is_zero(in))
|
||||
BIO_printf(out, "\n\t0x00");
|
||||
else
|
||||
{
|
||||
int i, l;
|
||||
|
||||
l = BN_bn2bin(in, buffer);
|
||||
for (i=0; i<l-1; i++)
|
||||
{
|
||||
if ((i%12) == 0)
|
||||
BIO_printf(out, "\n\t");
|
||||
BIO_printf(out, "0x%02X,", buffer[i]);
|
||||
}
|
||||
if ((i%12) == 0)
|
||||
BIO_printf(out, "\n\t");
|
||||
BIO_printf(out, "0x%02X", buffer[i]);
|
||||
}
|
||||
BIO_printf(out, "\n\t};\n\n");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
75
apps/enc.c
75
apps/enc.c
@@ -114,9 +114,11 @@ int MAIN(int argc, char **argv)
|
||||
unsigned char salt[PKCS5_SALT_LEN];
|
||||
char *str=NULL, *passarg = NULL, *pass = NULL;
|
||||
char *hkey=NULL,*hiv=NULL,*hsalt = NULL;
|
||||
char *md=NULL;
|
||||
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
|
||||
@@ -124,6 +126,8 @@ int MAIN(int argc, char **argv)
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine = NULL;
|
||||
#endif
|
||||
const EVP_MD *dgst=NULL;
|
||||
int non_fips_allow = 0;
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -253,6 +257,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
hiv= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-md") == 0)
|
||||
{
|
||||
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))
|
||||
{
|
||||
@@ -271,8 +282,10 @@ bad:
|
||||
BIO_printf(bio_err,"%-14s encrypt\n","-e");
|
||||
BIO_printf(bio_err,"%-14s decrypt\n","-d");
|
||||
BIO_printf(bio_err,"%-14s base64 encode/decode, depending on encryption flag\n","-a/-base64");
|
||||
BIO_printf(bio_err,"%-14s key is the next argument\n","-k");
|
||||
BIO_printf(bio_err,"%-14s key is the first line of the file argument\n","-kfile");
|
||||
BIO_printf(bio_err,"%-14s passphrase is the next argument\n","-k");
|
||||
BIO_printf(bio_err,"%-14s passphrase is the first line of the file argument\n","-kfile");
|
||||
BIO_printf(bio_err,"%-14s the next argument is the md to use to create a key\n","-md");
|
||||
BIO_printf(bio_err,"%-14s from a passphrase. One of md2, md5, sha or sha1\n","");
|
||||
BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv");
|
||||
BIO_printf(bio_err,"%-14s print the iv/key (then exit if -P)\n","-[pP]");
|
||||
BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>");
|
||||
@@ -296,6 +309,20 @@ bad:
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (md && (dgst=EVP_get_digestbyname(md)) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"%s is an unsupported message digest type\n",md);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (dgst == NULL)
|
||||
{
|
||||
if (in_FIPS_mode)
|
||||
dgst = EVP_sha1();
|
||||
else
|
||||
dgst = EVP_md5();
|
||||
}
|
||||
|
||||
if (bufsize != NULL)
|
||||
{
|
||||
unsigned long n;
|
||||
@@ -483,7 +510,7 @@ bad:
|
||||
sptr = salt;
|
||||
}
|
||||
|
||||
EVP_BytesToKey(cipher,EVP_md5(),sptr,
|
||||
EVP_BytesToKey(cipher,dgst,sptr,
|
||||
(unsigned char *)str,
|
||||
strlen(str),1,key,iv);
|
||||
/* zero the complete buffer or the string
|
||||
@@ -516,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);
|
||||
@@ -534,7 +591,7 @@ bad:
|
||||
if (!nosalt)
|
||||
{
|
||||
printf("salt=");
|
||||
for (i=0; i<(int)sizeof(salt); i++)
|
||||
for (i=0; i<sizeof salt; i++)
|
||||
printf("%02X",salt[i]);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
@@ -79,8 +79,7 @@ static char *engine_usage[]={
|
||||
" -vvv will also add the input flags for each command\n",
|
||||
" -vvvv will also show internal input flags\n",
|
||||
" -c - for each engine, also list the capabilities\n",
|
||||
" -t[t] - for each engine, check that they are really available\n",
|
||||
" -tt will display error trace for unavailable engines\n",
|
||||
" -t - for each engine, check that they are really available\n",
|
||||
" -pre <cmd> - runs command 'cmd' against the ENGINE before any attempts\n",
|
||||
" to load it (if -t is used)\n",
|
||||
" -post <cmd> - runs command 'cmd' against the ENGINE after loading it\n",
|
||||
@@ -345,7 +344,7 @@ int MAIN(int argc, char **argv)
|
||||
{
|
||||
int ret=1,i;
|
||||
char **pp;
|
||||
int verbose=0, list_cap=0, test_avail=0, test_avail_noise = 0;
|
||||
int verbose=0, list_cap=0, test_avail=0;
|
||||
ENGINE *e;
|
||||
STACK *engines = sk_new_null();
|
||||
STACK *pre_cmds = sk_new_null();
|
||||
@@ -383,14 +382,8 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
else if (strcmp(*argv,"-c") == 0)
|
||||
list_cap=1;
|
||||
else if (strncmp(*argv,"-t",2) == 0)
|
||||
{
|
||||
else if (strcmp(*argv,"-t") == 0)
|
||||
test_avail=1;
|
||||
if(strspn(*argv + 1, "t") < strlen(*argv + 1))
|
||||
goto skip_arg_loop;
|
||||
if((test_avail_noise = strlen(*argv + 1) - 1) > 1)
|
||||
goto skip_arg_loop;
|
||||
}
|
||||
else if (strcmp(*argv,"-pre") == 0)
|
||||
{
|
||||
argc--; argv++;
|
||||
@@ -505,8 +498,7 @@ skip_digests:
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_out, "[ unavailable ]\n");
|
||||
if(test_avail_noise)
|
||||
ERR_print_errors_fp(stdout);
|
||||
ERR_print_errors_fp(stdout);
|
||||
ERR_clear_error();
|
||||
}
|
||||
}
|
||||
@@ -520,7 +512,6 @@ skip_digests:
|
||||
|
||||
ret=0;
|
||||
end:
|
||||
|
||||
ERR_print_errors(bio_err);
|
||||
sk_pop_free(engines, identity);
|
||||
sk_pop_free(pre_cmds, identity);
|
||||
|
||||
23
apps/gendh.c
23
apps/gendh.c
@@ -57,12 +57,6 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
|
||||
* deprecated functions for openssl-internal code */
|
||||
#ifdef OPENSSL_NO_DEPRECATED
|
||||
#undef OPENSSL_NO_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -81,13 +75,12 @@
|
||||
#undef PROG
|
||||
#define PROG gendh_main
|
||||
|
||||
static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb);
|
||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg);
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
BN_GENCB cb;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
@@ -103,7 +96,6 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
apps_startup();
|
||||
|
||||
BN_GENCB_set(&cb, dh_cb, bio_err);
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
@@ -201,10 +193,10 @@ bad:
|
||||
|
||||
BIO_printf(bio_err,"Generating DH parameters, %d bit long safe prime, generator %d\n",num,g);
|
||||
BIO_printf(bio_err,"This is going to take a long time\n");
|
||||
|
||||
if(((dh = DH_new()) == NULL) || !DH_generate_parameters_ex(dh, num, g, &cb))
|
||||
goto end;
|
||||
dh=DH_generate_parameters(num,g,dh_cb,bio_err);
|
||||
|
||||
if (dh == NULL) goto end;
|
||||
|
||||
app_RAND_write_file(NULL, bio_err);
|
||||
|
||||
if (!PEM_write_bio_DHparams(out,dh))
|
||||
@@ -219,7 +211,7 @@ end:
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
|
||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
|
||||
{
|
||||
char c='*';
|
||||
|
||||
@@ -227,11 +219,10 @@ static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
|
||||
if (p == 1) c='+';
|
||||
if (p == 2) c='*';
|
||||
if (p == 3) c='\n';
|
||||
BIO_write(cb->arg,&c,1);
|
||||
(void)BIO_flush(cb->arg);
|
||||
BIO_write((BIO *)arg,&c,1);
|
||||
(void)BIO_flush((BIO *)arg);
|
||||
#ifdef LINT
|
||||
p=n;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -56,12 +56,6 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
|
||||
* deprecated functions for openssl-internal code */
|
||||
#ifdef OPENSSL_NO_DEPRECATED
|
||||
#undef OPENSSL_NO_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -81,17 +75,17 @@
|
||||
#undef PROG
|
||||
#define PROG genrsa_main
|
||||
|
||||
static int MS_CALLBACK genrsa_cb(int p, int n, BN_GENCB *cb);
|
||||
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg);
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
BN_GENCB cb;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
int ret=1;
|
||||
RSA *rsa=NULL;
|
||||
int i,num=DEFBITS;
|
||||
long l;
|
||||
const EVP_CIPHER *enc=NULL;
|
||||
@@ -103,13 +97,8 @@ int MAIN(int argc, char **argv)
|
||||
#endif
|
||||
char *inrand=NULL;
|
||||
BIO *out=NULL;
|
||||
BIGNUM *bn = BN_new();
|
||||
RSA *rsa = RSA_new();
|
||||
|
||||
if(!bn || !rsa) goto err;
|
||||
|
||||
apps_startup();
|
||||
BN_GENCB_set(&cb, genrsa_cb, bio_err);
|
||||
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
@@ -244,12 +233,12 @@ bad:
|
||||
|
||||
BIO_printf(bio_err,"Generating RSA private key, %d bit long modulus\n",
|
||||
num);
|
||||
|
||||
if(!BN_set_word(bn, f4) || !RSA_generate_key_ex(rsa, num, bn, &cb))
|
||||
goto err;
|
||||
rsa=RSA_generate_key(num,f4,genrsa_cb,bio_err);
|
||||
|
||||
app_RAND_write_file(NULL, bio_err);
|
||||
|
||||
if (rsa == NULL) goto err;
|
||||
|
||||
/* We need to do the following for when the base number size is <
|
||||
* long, esp windows 3.1 :-(. */
|
||||
l=0L;
|
||||
@@ -273,9 +262,8 @@ bad:
|
||||
|
||||
ret=0;
|
||||
err:
|
||||
if (bn) BN_free(bn);
|
||||
if (rsa) RSA_free(rsa);
|
||||
if (out) BIO_free_all(out);
|
||||
if (rsa != NULL) RSA_free(rsa);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
if (ret != 0)
|
||||
ERR_print_errors(bio_err);
|
||||
@@ -283,7 +271,7 @@ err:
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static int MS_CALLBACK genrsa_cb(int p, int n, BN_GENCB *cb)
|
||||
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
|
||||
{
|
||||
char c='*';
|
||||
|
||||
@@ -291,12 +279,11 @@ static int MS_CALLBACK genrsa_cb(int p, int n, BN_GENCB *cb)
|
||||
if (p == 1) c='+';
|
||||
if (p == 2) c='*';
|
||||
if (p == 3) c='\n';
|
||||
BIO_write(cb->arg,&c,1);
|
||||
(void)BIO_flush(cb->arg);
|
||||
BIO_write((BIO *)arg,&c,1);
|
||||
(void)BIO_flush((BIO *)arg);
|
||||
#ifdef LINT
|
||||
p=n;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
#else /* !OPENSSL_NO_RSA */
|
||||
|
||||
|
||||
@@ -139,16 +139,16 @@ $! Define The Application Files.
|
||||
$!
|
||||
$ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+-
|
||||
"CA;PKCS7;CRL2P7;CRL;"+-
|
||||
"RSA;RSAUTL;DSA;DSAPARAM;EC;ECPARAM;"+-
|
||||
"RSA;RSAUTL;DSA;DSAPARAM;"+-
|
||||
"X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+-
|
||||
"S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+-
|
||||
"CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP"
|
||||
"CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP;PRIME"
|
||||
$ APP_FILES := OPENSSL,'OBJ_DIR'VERIFY.OBJ,ASN1PARS.OBJ,REQ.OBJ,DGST.OBJ,DH.OBJ,DHPARAM.OBJ,ENC.OBJ,PASSWD.OBJ,GENDH.OBJ,ERRSTR.OBJ,-
|
||||
CA.OBJ,PKCS7.OBJ,CRL2P7.OBJ,CRL.OBJ,-
|
||||
RSA.OBJ,RSAUTL.OBJ,DSA.OBJ,DSAPARAM.OBJ,EC.OBJ,ECPARAM.OBJ,-
|
||||
RSA.OBJ,RSAUTL.OBJ,DSA.OBJ,DSAPARAM.OBJ,-
|
||||
X509.OBJ,GENRSA.OBJ,GENDSA.OBJ,S_SERVER.OBJ,S_CLIENT.OBJ,SPEED.OBJ,-
|
||||
S_TIME.OBJ,APPS.OBJ,S_CB.OBJ,S_SOCKET.OBJ,APP_RAND.OBJ,VERSION.OBJ,SESS_ID.OBJ,-
|
||||
CIPHERS.OBJ,NSEQ.OBJ,PKCS12.OBJ,PKCS8.OBJ,SPKAC.OBJ,SMIME.OBJ,RAND.OBJ,ENGINE.OBJ,OCSP.OBJ
|
||||
CIPHERS.OBJ,NSEQ.OBJ,PKCS12.OBJ,PKCS8.OBJ,SPKAC.OBJ,SMIME.OBJ,RAND.OBJ,ENGINE.OBJ,OCSP.OBJ,PRIME.OBJ
|
||||
$ TCPIP_PROGRAMS = ",,"
|
||||
$ IF COMPILER .EQS. "VAXC" THEN -
|
||||
TCPIP_PROGRAMS = ",OPENSSL,"
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
#include <openssl/ocsp.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
/* Maximum leeway in validity period: default 5 minutes */
|
||||
#define MAX_VALIDITY_PERIOD (5 * 60)
|
||||
@@ -785,7 +784,7 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
if (i != OCSP_RESPONSE_STATUS_SUCCESSFUL)
|
||||
{
|
||||
BIO_printf(out, "Responder Error: %s (%d)\n",
|
||||
BIO_printf(out, "Responder Error: %s (%ld)\n",
|
||||
OCSP_response_status_str(i), i);
|
||||
if (ignore_err)
|
||||
goto redo_accept;
|
||||
@@ -851,7 +850,7 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
if(i <= 0)
|
||||
{
|
||||
BIO_printf(bio_err, "Response Verify Failure\n");
|
||||
BIO_printf(bio_err, "Response Verify Failure\n", i);
|
||||
ERR_print_errors(bio_err);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -44,8 +44,8 @@ new_certs_dir = $dir.newcerts] # default place for new certs.
|
||||
|
||||
certificate = $dir]cacert.pem # The CA certificate
|
||||
serial = $dir]serial. # The current serial number
|
||||
crlnumber = $dir]crlnumber. # the current crl number
|
||||
# must be commented out to leave a V1 CRL
|
||||
#crlnumber = $dir]crlnumber. # the current crl number must be
|
||||
# commented out to leave a V1 CRL
|
||||
crl = $dir]crl.pem # The current CRL
|
||||
private_key = $dir.private]cakey.pem# The private key
|
||||
RANDFILE = $dir.private].rand # private random number file
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
#include "progs.h"
|
||||
#include "s_apps.h"
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/fips.h>
|
||||
|
||||
/* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the
|
||||
* base prototypes (we cast each variable inside the function to the required
|
||||
@@ -147,6 +148,7 @@ char *default_config_file=NULL;
|
||||
#ifdef MONOLITH
|
||||
CONF *config=NULL;
|
||||
BIO *bio_err=NULL;
|
||||
int in_FIPS_mode=0;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -227,10 +229,31 @@ int main(int Argc, char *Argv[])
|
||||
char **argv,*p;
|
||||
LHASH *prog=NULL;
|
||||
long errline;
|
||||
|
||||
|
||||
arg.data=NULL;
|
||||
arg.count=0;
|
||||
|
||||
in_FIPS_mode = 0;
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
if(getenv("OPENSSL_FIPS")) {
|
||||
#if defined(_WIN32)
|
||||
char filename[MAX_PATH] = "";
|
||||
GetModuleFileNameA( NULL, filename, MAX_PATH) ;
|
||||
p = filename;
|
||||
#else
|
||||
p = Argv[0];
|
||||
#endif
|
||||
if (!FIPS_mode_set(1,p)) {
|
||||
ERR_load_crypto_strings();
|
||||
ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE));
|
||||
EXIT(1);
|
||||
}
|
||||
in_FIPS_mode = 1;
|
||||
if (getenv("OPENSSL_FIPS_MD5"))
|
||||
FIPS_allow_md5(1);
|
||||
}
|
||||
#endif
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
|
||||
@@ -44,8 +44,8 @@ new_certs_dir = $dir/newcerts # default place for new certs.
|
||||
|
||||
certificate = $dir/cacert.pem # The CA certificate
|
||||
serial = $dir/serial # The current serial number
|
||||
crlnumber = $dir/crlnumber # the current crl number
|
||||
# must be commented out to leave a V1 CRL
|
||||
#crlnumber = $dir/crlnumber # the current crl number must be
|
||||
# commented out to leave a V1 CRL
|
||||
crl = $dir/crl.pem # The current CRL
|
||||
private_key = $dir/private/cakey.pem# The private key
|
||||
RANDFILE = $dir/private/.rand # private random number file
|
||||
|
||||
@@ -312,8 +312,7 @@ static char *md5crypt(const char *passwd, const char *magic, const char *salt)
|
||||
static char out_buf[6 + 9 + 24 + 2]; /* "$apr1$..salt..$.......md5hash..........\0" */
|
||||
unsigned char buf[MD5_DIGEST_LENGTH];
|
||||
char *salt_out;
|
||||
int n;
|
||||
unsigned int i;
|
||||
int n, i;
|
||||
EVP_MD_CTX md,md2;
|
||||
size_t passwd_len, salt_len;
|
||||
|
||||
|
||||
257
apps/pkcs12.c
257
apps/pkcs12.c
@@ -2,10 +2,10 @@
|
||||
#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
|
||||
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project.
|
||||
* project 1999.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999 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
|
||||
@@ -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);
|
||||
|
||||
@@ -166,14 +173,10 @@ int MAIN(int argc, char **argv)
|
||||
maciter = PKCS12_DEFAULT_ITER;
|
||||
else if (!strcmp (*args, "-nomaciter"))
|
||||
maciter = 1;
|
||||
else if (!strcmp (*args, "-nomac"))
|
||||
maciter = -1;
|
||||
else if (!strcmp (*args, "-nodes")) enc=NULL;
|
||||
else if (!strcmp (*args, "-certpbe")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
if (!strcmp(*args, "NONE"))
|
||||
cert_pbe = -1;
|
||||
cert_pbe=OBJ_txt2nid(*args);
|
||||
if(cert_pbe == NID_undef) {
|
||||
BIO_printf(bio_err,
|
||||
@@ -184,10 +187,7 @@ int MAIN(int argc, char **argv)
|
||||
} else if (!strcmp (*args, "-keypbe")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
if (!strcmp(*args, "NONE"))
|
||||
key_pbe = -1;
|
||||
else
|
||||
key_pbe=OBJ_txt2nid(*args);
|
||||
key_pbe=OBJ_txt2nid(*args);
|
||||
if(key_pbe == NID_undef) {
|
||||
BIO_printf(bio_err,
|
||||
"Unknown PBE algorithm %s\n", *args);
|
||||
@@ -372,6 +372,24 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (certfile) {
|
||||
if(!(certsin = BIO_new_file(certfile, "r"))) {
|
||||
BIO_printf(bio_err, "Can't open certificate file %s\n", certfile);
|
||||
perror (certfile);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyname) {
|
||||
if(!(inkey = BIO_new_file(keyname, "r"))) {
|
||||
BIO_printf(bio_err, "Can't key certificate file %s\n", keyname);
|
||||
perror (keyname);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("write files");
|
||||
@@ -408,31 +426,27 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
if (export_cert) {
|
||||
EVP_PKEY *key = NULL;
|
||||
X509 *ucert = NULL, *x = NULL;
|
||||
STACK_OF(PKCS12_SAFEBAG) *bags = NULL;
|
||||
STACK_OF(PKCS7) *safes = NULL;
|
||||
PKCS12_SAFEBAG *bag = NULL;
|
||||
PKCS8_PRIV_KEY_INFO *p8 = NULL;
|
||||
PKCS7 *authsafe = NULL;
|
||||
X509 *ucert = NULL;
|
||||
STACK_OF(X509) *certs=NULL;
|
||||
unsigned char *catmp = NULL;
|
||||
char *catmp = NULL;
|
||||
int i;
|
||||
|
||||
if ((options & (NOCERTS|NOKEYS)) == (NOCERTS|NOKEYS))
|
||||
{
|
||||
BIO_printf(bio_err, "Nothing to do!\n");
|
||||
goto export_end;
|
||||
}
|
||||
|
||||
if (options & NOCERTS)
|
||||
chain = 0;
|
||||
unsigned char keyid[EVP_MAX_MD_SIZE];
|
||||
unsigned int keyidlen = 0;
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_push_info("process -export_cert");
|
||||
CRYPTO_push_info("reading private key");
|
||||
#endif
|
||||
if (!(options & NOKEYS))
|
||||
{
|
||||
key = load_key(bio_err, keyname ? keyname : infile,
|
||||
FORMAT_PEM, 1, passin, e, "private key");
|
||||
if (!key)
|
||||
goto export_end;
|
||||
}
|
||||
key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM, 1,
|
||||
passin, e, "private key");
|
||||
if (!key) {
|
||||
goto export_end;
|
||||
}
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
@@ -440,62 +454,50 @@ int MAIN(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
/* Load in all certs in input file */
|
||||
if(!(options & NOCERTS))
|
||||
{
|
||||
certs = load_certs(bio_err, infile, FORMAT_PEM, NULL, e,
|
||||
"certificates");
|
||||
if (!certs)
|
||||
goto export_end;
|
||||
|
||||
if (key)
|
||||
{
|
||||
/* Look for matching private key */
|
||||
for(i = 0; i < sk_X509_num(certs); i++)
|
||||
{
|
||||
x = sk_X509_value(certs, i);
|
||||
if(X509_check_private_key(x, key))
|
||||
{
|
||||
ucert = x;
|
||||
/* Zero keyid and alias */
|
||||
X509_keyid_set1(ucert, NULL, 0);
|
||||
X509_alias_set1(ucert, NULL, 0);
|
||||
/* Remove from list */
|
||||
sk_X509_delete(certs, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!ucert)
|
||||
{
|
||||
BIO_printf(bio_err, "No certificate matches private key\n");
|
||||
goto export_end;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(!(certs = load_certs(bio_err, infile, FORMAT_PEM, NULL, e,
|
||||
"certificates"))) {
|
||||
goto export_end;
|
||||
}
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("reading certs from input 2");
|
||||
#endif
|
||||
|
||||
/* Add any more certificates asked for */
|
||||
if(certfile)
|
||||
{
|
||||
STACK_OF(X509) *morecerts=NULL;
|
||||
if(!(morecerts = load_certs(bio_err, certfile, FORMAT_PEM,
|
||||
NULL, e,
|
||||
"certificates from certfile")))
|
||||
goto export_end;
|
||||
while(sk_X509_num(morecerts) > 0)
|
||||
sk_X509_push(certs, sk_X509_shift(morecerts));
|
||||
sk_X509_free(morecerts);
|
||||
}
|
||||
|
||||
for(i = 0; i < sk_X509_num(certs); i++) {
|
||||
ucert = sk_X509_value(certs, i);
|
||||
if(X509_check_private_key(ucert, key)) {
|
||||
X509_digest(ucert, EVP_sha1(), keyid, &keyidlen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!keyidlen) {
|
||||
ucert = NULL;
|
||||
BIO_printf(bio_err, "No certificate matches private key\n");
|
||||
goto export_end;
|
||||
}
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("reading certs from certfile");
|
||||
#endif
|
||||
|
||||
bags = sk_PKCS12_SAFEBAG_new_null ();
|
||||
|
||||
/* Add any more certificates asked for */
|
||||
if (certfile) {
|
||||
STACK_OF(X509) *morecerts=NULL;
|
||||
if(!(morecerts = load_certs(bio_err, certfile, FORMAT_PEM,
|
||||
NULL, e,
|
||||
"certificates from certfile"))) {
|
||||
goto export_end;
|
||||
}
|
||||
while(sk_X509_num(morecerts) > 0) {
|
||||
sk_X509_push(certs, sk_X509_shift(morecerts));
|
||||
}
|
||||
sk_X509_free(morecerts);
|
||||
}
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("building chain");
|
||||
@@ -531,51 +533,100 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
/* Add any CA names */
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("building bags");
|
||||
#endif
|
||||
|
||||
for (i = 0; i < sk_num(canames); i++)
|
||||
{
|
||||
catmp = (unsigned char *)sk_value(canames, i);
|
||||
X509_alias_set1(sk_X509_value(certs, i), catmp, -1);
|
||||
}
|
||||
|
||||
/* We now have loads of certificates: include them all */
|
||||
for(i = 0; i < sk_X509_num(certs); i++) {
|
||||
X509 *cert = NULL;
|
||||
cert = sk_X509_value(certs, i);
|
||||
bag = PKCS12_x5092certbag(cert);
|
||||
/* If it matches private key set id */
|
||||
if(cert == ucert) {
|
||||
if(name) PKCS12_add_friendlyname(bag, name, -1);
|
||||
PKCS12_add_localkeyid(bag, keyid, keyidlen);
|
||||
} else if((catmp = sk_shift(canames)))
|
||||
PKCS12_add_friendlyname(bag, catmp, -1);
|
||||
sk_PKCS12_SAFEBAG_push(bags, bag);
|
||||
}
|
||||
sk_X509_pop_free(certs, X509_free);
|
||||
certs = NULL;
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("reading password");
|
||||
CRYPTO_push_info("encrypting bags");
|
||||
#endif
|
||||
|
||||
if(!noprompt &&
|
||||
EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1))
|
||||
{
|
||||
BIO_printf (bio_err, "Can't read Password\n");
|
||||
goto export_end;
|
||||
}
|
||||
EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1)) {
|
||||
BIO_printf (bio_err, "Can't read Password\n");
|
||||
goto export_end;
|
||||
}
|
||||
if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass);
|
||||
/* Turn certbags into encrypted authsafe */
|
||||
authsafe = PKCS12_pack_p7encdata(cert_pbe, cpass, -1, NULL, 0,
|
||||
iter, bags);
|
||||
sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
|
||||
bags = NULL;
|
||||
|
||||
if (!authsafe) {
|
||||
ERR_print_errors (bio_err);
|
||||
goto export_end;
|
||||
}
|
||||
|
||||
safes = sk_PKCS7_new_null ();
|
||||
sk_PKCS7_push (safes, authsafe);
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("creating PKCS#12 structure");
|
||||
CRYPTO_push_info("building shrouded key bag");
|
||||
#endif
|
||||
|
||||
p12 = PKCS12_create(cpass, name, key, ucert, certs,
|
||||
key_pbe, cert_pbe, iter, -1, keytype);
|
||||
/* Make a shrouded key bag */
|
||||
p8 = EVP_PKEY2PKCS8 (key);
|
||||
if(keytype) PKCS8_add_keyusage(p8, keytype);
|
||||
bag = PKCS12_MAKE_SHKEYBAG(key_pbe, cpass, -1, NULL, 0, iter, p8);
|
||||
PKCS8_PRIV_KEY_INFO_free(p8);
|
||||
p8 = NULL;
|
||||
if (name) PKCS12_add_friendlyname (bag, name, -1);
|
||||
if(csp_name) PKCS12_add_CSPName_asc(bag, csp_name, -1);
|
||||
PKCS12_add_localkeyid (bag, keyid, keyidlen);
|
||||
bags = sk_PKCS12_SAFEBAG_new_null();
|
||||
sk_PKCS12_SAFEBAG_push (bags, bag);
|
||||
|
||||
if (!p12)
|
||||
{
|
||||
ERR_print_errors (bio_err);
|
||||
goto export_end;
|
||||
}
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("encrypting shrouded key bag");
|
||||
#endif
|
||||
|
||||
if (maciter != -1)
|
||||
PKCS12_set_mac(p12, mpass, -1, NULL, 0, maciter, NULL);
|
||||
/* Turn it into unencrypted safe bag */
|
||||
authsafe = PKCS12_pack_p7data (bags);
|
||||
sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
|
||||
bags = NULL;
|
||||
sk_PKCS7_push (safes, authsafe);
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("building pkcs12");
|
||||
#endif
|
||||
|
||||
p12 = PKCS12_init(NID_pkcs7_data);
|
||||
|
||||
PKCS12_pack_authsafes(p12, safes);
|
||||
|
||||
sk_PKCS7_pop_free(safes, PKCS7_free);
|
||||
safes = NULL;
|
||||
|
||||
PKCS12_set_mac (p12, mpass, -1, NULL, 0, maciter, NULL);
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
CRYPTO_push_info("writing pkcs12");
|
||||
#endif
|
||||
|
||||
i2d_PKCS12_bio(out, p12);
|
||||
i2d_PKCS12_bio (out, p12);
|
||||
|
||||
ret = 0;
|
||||
|
||||
@@ -588,7 +639,8 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
if (key) EVP_PKEY_free(key);
|
||||
if (certs) sk_X509_pop_free(certs, X509_free);
|
||||
if (ucert) X509_free(ucert);
|
||||
if (safes) sk_PKCS7_pop_free(safes, PKCS7_free);
|
||||
if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
@@ -818,12 +870,11 @@ err:
|
||||
int alg_print (BIO *x, X509_ALGOR *alg)
|
||||
{
|
||||
PBEPARAM *pbe;
|
||||
const unsigned char *p;
|
||||
unsigned char *p;
|
||||
p = alg->parameter->value.sequence->data;
|
||||
pbe = d2i_PBEPARAM (NULL, &p, alg->parameter->value.sequence->length);
|
||||
BIO_printf (bio_err, "%s, Iteration %ld\n",
|
||||
OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)),
|
||||
ASN1_INTEGER_get(pbe->iter));
|
||||
BIO_printf (bio_err, "%s, Iteration %d\n",
|
||||
OBJ_nid2ln(OBJ_obj2nid(alg->algorithm)), ASN1_INTEGER_get(pbe->iter));
|
||||
PBEPARAM_free (pbe);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
/* crypto/o_dir.c -*- mode:C; c-file-style: "eay" -*- */
|
||||
/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
|
||||
* project 2004.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2004 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
@@ -48,36 +44,85 @@
|
||||
* 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 <errno.h>
|
||||
#include <e_os.h>
|
||||
#include <string.h>
|
||||
|
||||
/* The routines really come from the Levitte Programming, so to make
|
||||
life simple, let's just use the raw files and hack the symbols to
|
||||
fit our namespace. */
|
||||
#define LP_DIR_CTX OPENSSL_DIR_CTX
|
||||
#define LP_dir_context_st OPENSSL_dir_context_st
|
||||
#define LP_find_file OPENSSL_DIR_read
|
||||
#define LP_find_file_end OPENSSL_DIR_end
|
||||
#include "apps.h"
|
||||
#include <openssl/bn.h>
|
||||
|
||||
#include "o_dir.h"
|
||||
|
||||
#define LPDIR_H
|
||||
#if defined OPENSSL_SYS_UNIX || defined DJGPP
|
||||
#include "LPdir_unix.c"
|
||||
#elif defined OPENSSL_SYS_VMS
|
||||
#include "LPdir_vms.c"
|
||||
#elif defined OPENSSL_SYS_WIN32
|
||||
#include "LPdir_win32.c"
|
||||
#elif defined OPENSSL_SYS_WINCE
|
||||
#include "LPdir_wince.c"
|
||||
#else
|
||||
#include "LPdir_nyi.c"
|
||||
#undef PROG
|
||||
#define PROG prime_main
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
int hex=0;
|
||||
int checks=20;
|
||||
BIGNUM *bn=NULL;
|
||||
BIO *bio_out;
|
||||
|
||||
apps_startup();
|
||||
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
|
||||
--argc;
|
||||
++argv;
|
||||
while (argc >= 1 && **argv == '-')
|
||||
{
|
||||
if(!strcmp(*argv,"-hex"))
|
||||
hex=1;
|
||||
else if(!strcmp(*argv,"-checks"))
|
||||
if(--argc < 1)
|
||||
goto bad;
|
||||
else
|
||||
checks=atoi(*++argv);
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err,"Unknown option '%s'\n",*argv);
|
||||
goto bad;
|
||||
}
|
||||
--argc;
|
||||
++argv;
|
||||
}
|
||||
|
||||
if (argv[0] == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"No prime specified\n");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
|
||||
{
|
||||
BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
{
|
||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||
bio_out = BIO_push(tmpbio, bio_out);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if(hex)
|
||||
BN_hex2bn(&bn,argv[0]);
|
||||
else
|
||||
BN_dec2bn(&bn,argv[0]);
|
||||
|
||||
BN_print(bio_out,bn);
|
||||
BIO_printf(bio_out," is %sprime\n",
|
||||
BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not ");
|
||||
|
||||
BN_free(bn);
|
||||
BIO_free_all(bio_out);
|
||||
|
||||
return 0;
|
||||
|
||||
bad:
|
||||
BIO_printf(bio_err,"options are\n");
|
||||
BIO_printf(bio_err,"%-14s hex\n","-hex");
|
||||
BIO_printf(bio_err,"%-14s number of checks\n","-checks <n>");
|
||||
return 1;
|
||||
}
|
||||
10
apps/progs.h
10
apps/progs.h
@@ -17,8 +17,6 @@ extern int rsa_main(int argc,char *argv[]);
|
||||
extern int rsautl_main(int argc,char *argv[]);
|
||||
extern int dsa_main(int argc,char *argv[]);
|
||||
extern int dsaparam_main(int argc,char *argv[]);
|
||||
extern int ec_main(int argc,char *argv[]);
|
||||
extern int ecparam_main(int argc,char *argv[]);
|
||||
extern int x509_main(int argc,char *argv[]);
|
||||
extern int genrsa_main(int argc,char *argv[]);
|
||||
extern int gendsa_main(int argc,char *argv[]);
|
||||
@@ -37,6 +35,7 @@ extern int pkcs8_main(int argc,char *argv[]);
|
||||
extern int spkac_main(int argc,char *argv[]);
|
||||
extern int smime_main(int argc,char *argv[]);
|
||||
extern int rand_main(int argc,char *argv[]);
|
||||
extern int prime_main(int argc,char *argv[]);
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
extern int engine_main(int argc,char *argv[]);
|
||||
#endif
|
||||
@@ -82,12 +81,6 @@ FUNCTION functions[] = {
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
{FUNC_TYPE_GENERAL,"dsaparam",dsaparam_main},
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_EC
|
||||
{FUNC_TYPE_GENERAL,"ec",ec_main},
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_EC
|
||||
{FUNC_TYPE_GENERAL,"ecparam",ecparam_main},
|
||||
#endif
|
||||
{FUNC_TYPE_GENERAL,"x509",x509_main},
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
@@ -123,6 +116,7 @@ FUNCTION functions[] = {
|
||||
{FUNC_TYPE_GENERAL,"spkac",spkac_main},
|
||||
{FUNC_TYPE_GENERAL,"smime",smime_main},
|
||||
{FUNC_TYPE_GENERAL,"rand",rand_main},
|
||||
{FUNC_TYPE_GENERAL,"prime",prime_main},
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
{FUNC_TYPE_GENERAL,"engine",engine_main},
|
||||
#endif
|
||||
|
||||
@@ -33,8 +33,6 @@ foreach (@ARGV)
|
||||
{ print "#ifndef OPENSSL_NO_RSA\n${str}#endif\n"; }
|
||||
elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/))
|
||||
{ print "#ifndef OPENSSL_NO_DSA\n${str}#endif\n"; }
|
||||
elsif ( ($_ =~ /^ec$/) || ($_ =~ /^ecparam$/))
|
||||
{ print "#ifndef OPENSSL_NO_EC\n${str}#endif\n";}
|
||||
elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/) || ($_ =~ /^dhparam$/))
|
||||
{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
|
||||
elsif ( ($_ =~ /^pkcs12$/))
|
||||
|
||||
@@ -205,7 +205,7 @@ int MAIN(int argc, char **argv)
|
||||
int chunk;
|
||||
|
||||
chunk = num;
|
||||
if (chunk > (int)sizeof(buf))
|
||||
if (chunk > sizeof buf)
|
||||
chunk = sizeof buf;
|
||||
r = RAND_bytes(buf, chunk);
|
||||
if (r <= 0)
|
||||
|
||||
188
apps/req.c
188
apps/req.c
@@ -56,12 +56,6 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
|
||||
* deprecated functions for openssl-internal code */
|
||||
#ifdef OPENSSL_NO_DEPRECATED
|
||||
#undef OPENSSL_NO_DEPRECATED
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
@@ -119,10 +113,9 @@
|
||||
* require. This format is wrong
|
||||
*/
|
||||
|
||||
static int make_REQ(X509_REQ *req,EVP_PKEY *pkey,char *dn,int mutlirdn,
|
||||
int attribs,unsigned long chtype);
|
||||
static int build_subject(X509_REQ *req, char *subj, unsigned long chtype,
|
||||
int multirdn);
|
||||
static int make_REQ(X509_REQ *req,EVP_PKEY *pkey,char *dn,int attribs,
|
||||
unsigned long chtype);
|
||||
static int build_subject(X509_REQ *req, char *subj, unsigned long chtype);
|
||||
static int prompt_info(X509_REQ *req,
|
||||
STACK_OF(CONF_VALUE) *dn_sk, char *dn_sect,
|
||||
STACK_OF(CONF_VALUE) *attr_sk, char *attr_sect, int attribs,
|
||||
@@ -134,9 +127,9 @@ static int add_attribute_object(X509_REQ *req, char *text,
|
||||
char *def, char *value, int nid, int n_min,
|
||||
int n_max, unsigned long chtype);
|
||||
static int add_DN_object(X509_NAME *n, char *text, char *def, char *value,
|
||||
int nid,int n_min,int n_max, unsigned long chtype, int mval);
|
||||
int nid,int n_min,int n_max, unsigned long chtype);
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
static int MS_CALLBACK req_cb(int p, int n, BN_GENCB *cb);
|
||||
static void MS_CALLBACK req_cb(int p,int n,void *arg);
|
||||
#endif
|
||||
static int req_check_len(int len,int n_min,int n_max);
|
||||
static int check_end(char *str, char *end);
|
||||
@@ -149,7 +142,6 @@ static int batch=0;
|
||||
#define TYPE_RSA 1
|
||||
#define TYPE_DSA 2
|
||||
#define TYPE_DH 3
|
||||
#define TYPE_EC 4
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
@@ -158,9 +150,6 @@ int MAIN(int argc, char **argv)
|
||||
ENGINE *e = NULL;
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
DSA *dsa_params=NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
EC_KEY *ec_params = NULL;
|
||||
#endif
|
||||
unsigned long nmflag = 0, reqflag = 0;
|
||||
int ex=1,x509=0,days=30;
|
||||
@@ -186,8 +175,7 @@ int MAIN(int argc, char **argv)
|
||||
char *passin = NULL, *passout = NULL;
|
||||
char *p;
|
||||
char *subj = NULL;
|
||||
int multirdn = 0;
|
||||
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;
|
||||
@@ -209,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++;
|
||||
@@ -334,59 +329,11 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
BIO_free(in);
|
||||
in=NULL;
|
||||
newkey=BN_num_bits(dsa_params->p);
|
||||
in=NULL;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
if (strncmp("ec:",p,3) == 0)
|
||||
{
|
||||
X509 *xtmp=NULL;
|
||||
EVP_PKEY *dtmp;
|
||||
|
||||
pkey_type=TYPE_EC;
|
||||
p+=3;
|
||||
if ((in=BIO_new_file(p,"r")) == NULL)
|
||||
{
|
||||
perror(p);
|
||||
goto end;
|
||||
}
|
||||
if ((ec_params = EC_KEY_new()) == NULL)
|
||||
goto end;
|
||||
if ((ec_params->group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL)) == NULL)
|
||||
{
|
||||
if (ec_params)
|
||||
EC_KEY_free(ec_params);
|
||||
ERR_clear_error();
|
||||
(void)BIO_reset(in);
|
||||
if ((xtmp=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"unable to load EC parameters from file\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((dtmp=X509_get_pubkey(xtmp))==NULL)
|
||||
goto end;
|
||||
if (dtmp->type == EVP_PKEY_EC)
|
||||
ec_params = ECParameters_dup(dtmp->pkey.eckey);
|
||||
EVP_PKEY_free(dtmp);
|
||||
X509_free(xtmp);
|
||||
if (ec_params == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"Certificate does not contain EC parameters\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
BIO_free(in);
|
||||
in=NULL;
|
||||
|
||||
newkey = EC_GROUP_get_degree(ec_params->group);
|
||||
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DH
|
||||
if (strncmp("dh:",p,4) == 0)
|
||||
{
|
||||
@@ -395,9 +342,7 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
goto bad;
|
||||
}
|
||||
pkey_type=TYPE_RSA;
|
||||
|
||||
newreq=1;
|
||||
}
|
||||
@@ -442,8 +387,6 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
subj= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-multivalue-rdn") == 0)
|
||||
multirdn=1;
|
||||
else if (strcmp(*argv,"-days") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -509,13 +452,9 @@ bad:
|
||||
BIO_printf(bio_err," the random number generator\n");
|
||||
BIO_printf(bio_err," -newkey rsa:bits generate a new RSA key of 'bits' in size\n");
|
||||
BIO_printf(bio_err," -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n");
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
BIO_printf(bio_err," -newkey ec:file generate a new EC key, parameters taken from CA in 'file'\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -[digest] Digest to sign with (md5, sha1, md2, mdc2, md4)\n");
|
||||
BIO_printf(bio_err," -config file request template file.\n");
|
||||
BIO_printf(bio_err," -subj arg set or modify request subject\n");
|
||||
BIO_printf(bio_err," -multivalue-rdn enable support for multivalued RDNs\n");
|
||||
BIO_printf(bio_err," -new new request.\n");
|
||||
BIO_printf(bio_err," -batch do not ask anything during request generation\n");
|
||||
BIO_printf(bio_err," -x509 output a x509 structure instead of a cert. req.\n");
|
||||
@@ -708,8 +647,7 @@ bad:
|
||||
message */
|
||||
goto end;
|
||||
}
|
||||
if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA ||
|
||||
EVP_PKEY_type(pkey->type) == EVP_PKEY_EC)
|
||||
if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA)
|
||||
{
|
||||
char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
|
||||
if (randfile == NULL)
|
||||
@@ -720,7 +658,6 @@ bad:
|
||||
|
||||
if (newreq && (pkey == NULL))
|
||||
{
|
||||
BN_GENCB cb;
|
||||
char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
|
||||
if (randfile == NULL)
|
||||
ERR_clear_error();
|
||||
@@ -734,33 +671,24 @@ bad:
|
||||
newkey=DEFAULT_KEY_LENGTH;
|
||||
}
|
||||
|
||||
if (newkey < MIN_KEY_LENGTH && (pkey_type == TYPE_RSA || pkey_type == TYPE_DSA))
|
||||
if (newkey < MIN_KEY_LENGTH)
|
||||
{
|
||||
BIO_printf(bio_err,"private key length is too short,\n");
|
||||
BIO_printf(bio_err,"it needs to be at least %d bits, not %ld\n",MIN_KEY_LENGTH,newkey);
|
||||
BIO_printf(bio_err,"it needs to be at least %d bits, not %d\n",MIN_KEY_LENGTH,newkey);
|
||||
goto end;
|
||||
}
|
||||
BIO_printf(bio_err,"Generating a %ld bit %s private key\n",
|
||||
newkey,(pkey_type == TYPE_RSA)?"RSA":
|
||||
(pkey_type == TYPE_DSA)?"DSA":"EC");
|
||||
BIO_printf(bio_err,"Generating a %d bit %s private key\n",
|
||||
newkey,(pkey_type == TYPE_RSA)?"RSA":"DSA");
|
||||
|
||||
if ((pkey=EVP_PKEY_new()) == NULL) goto end;
|
||||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
BN_GENCB_set(&cb, req_cb, bio_err);
|
||||
if (pkey_type == TYPE_RSA)
|
||||
{
|
||||
RSA *rsa = RSA_new();
|
||||
BIGNUM *bn = BN_new();
|
||||
if(!bn || !rsa || !BN_set_word(bn, 0x10001) ||
|
||||
!RSA_generate_key_ex(rsa, newkey, bn, &cb) ||
|
||||
!EVP_PKEY_assign_RSA(pkey, rsa))
|
||||
{
|
||||
if(bn) BN_free(bn);
|
||||
if(rsa) RSA_free(rsa);
|
||||
if (!EVP_PKEY_assign_RSA(pkey,
|
||||
RSA_generate_key(newkey,0x10001,
|
||||
req_cb,bio_err)))
|
||||
goto end;
|
||||
}
|
||||
BN_free(bn);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@@ -772,15 +700,6 @@ bad:
|
||||
dsa_params=NULL;
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
if (pkey_type == TYPE_EC)
|
||||
{
|
||||
if (!EC_KEY_generate_key(ec_params)) goto end;
|
||||
if (!EVP_PKEY_assign_EC_KEY(pkey, ec_params))
|
||||
goto end;
|
||||
ec_params = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
app_RAND_write_file(randfile, bio_err);
|
||||
|
||||
@@ -886,10 +805,6 @@ loop:
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
if (pkey->type == EVP_PKEY_DSA)
|
||||
digest=EVP_dss1();
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
if (pkey->type == EVP_PKEY_EC)
|
||||
digest=EVP_ecdsa();
|
||||
#endif
|
||||
if (req == NULL)
|
||||
{
|
||||
@@ -899,7 +814,7 @@ loop:
|
||||
goto end;
|
||||
}
|
||||
|
||||
i=make_REQ(req,pkey,subj,multirdn,!x509, chtype);
|
||||
i=make_REQ(req,pkey,subj,!x509, chtype);
|
||||
subj=NULL; /* done processing '-subj' option */
|
||||
if ((kludge > 0) && !sk_X509_ATTRIBUTE_num(req->req_info->attributes))
|
||||
{
|
||||
@@ -994,7 +909,7 @@ loop:
|
||||
print_name(bio_err, "old subject=", X509_REQ_get_subject_name(req), nmflag);
|
||||
}
|
||||
|
||||
if (build_subject(req, subj, chtype, multirdn) == 0)
|
||||
if (build_subject(req, subj, chtype) == 0)
|
||||
{
|
||||
BIO_printf(bio_err, "ERROR: cannot modify subject\n");
|
||||
ex=1;
|
||||
@@ -1177,16 +1092,13 @@ end:
|
||||
OBJ_cleanup();
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
if (dsa_params != NULL) DSA_free(dsa_params);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
if (ec_params != NULL) EC_KEY_free(ec_params);
|
||||
#endif
|
||||
apps_shutdown();
|
||||
OPENSSL_EXIT(ex);
|
||||
}
|
||||
|
||||
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int multirdn,
|
||||
int attribs, unsigned long chtype)
|
||||
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int attribs,
|
||||
unsigned long chtype)
|
||||
{
|
||||
int ret=0,i;
|
||||
char no_prompt = 0;
|
||||
@@ -1236,7 +1148,7 @@ static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int multirdn,
|
||||
else
|
||||
{
|
||||
if (subj)
|
||||
i = build_subject(req, subj, chtype, multirdn);
|
||||
i = build_subject(req, subj, chtype);
|
||||
else
|
||||
i = prompt_info(req, dn_sk, dn_sect, attr_sk, attr_sect, attribs, chtype);
|
||||
}
|
||||
@@ -1253,11 +1165,11 @@ err:
|
||||
* subject is expected to be in the format /type0=value0/type1=value1/type2=...
|
||||
* where characters may be escaped by \
|
||||
*/
|
||||
static int build_subject(X509_REQ *req, char *subject, unsigned long chtype, int multirdn)
|
||||
static int build_subject(X509_REQ *req, char *subject, unsigned long chtype)
|
||||
{
|
||||
X509_NAME *n;
|
||||
|
||||
if (!(n = parse_name(subject, chtype, multirdn)))
|
||||
if (!(n = do_subject(subject, chtype)))
|
||||
return 0;
|
||||
|
||||
if (!X509_REQ_set_subject_name(req, n))
|
||||
@@ -1278,7 +1190,7 @@ static int prompt_info(X509_REQ *req,
|
||||
int i;
|
||||
char *p,*q;
|
||||
char buf[100];
|
||||
int nid, mval;
|
||||
int nid;
|
||||
long n_min,n_max;
|
||||
char *type,*def,*value;
|
||||
CONF_VALUE *v;
|
||||
@@ -1321,17 +1233,10 @@ start: for (;;)
|
||||
if(*p) type = p;
|
||||
break;
|
||||
}
|
||||
if (*type == '+')
|
||||
{
|
||||
mval = -1;
|
||||
type++;
|
||||
}
|
||||
else
|
||||
mval = 0;
|
||||
/* If OBJ not recognised ignore it */
|
||||
if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
|
||||
if (BIO_snprintf(buf,sizeof buf,"%s_default",v->name)
|
||||
>= (int)sizeof(buf))
|
||||
>= sizeof buf)
|
||||
{
|
||||
BIO_printf(bio_err,"Name '%s' too long\n",v->name);
|
||||
return 0;
|
||||
@@ -1365,7 +1270,7 @@ start: for (;;)
|
||||
}
|
||||
|
||||
if (!add_DN_object(subj,v->value,def,value,nid,
|
||||
n_min,n_max, chtype, mval))
|
||||
n_min,n_max, chtype))
|
||||
return 0;
|
||||
}
|
||||
if (X509_NAME_entry_count(subj) == 0)
|
||||
@@ -1396,7 +1301,7 @@ start2: for (;;)
|
||||
goto start2;
|
||||
|
||||
if (BIO_snprintf(buf,sizeof buf,"%s_default",type)
|
||||
>= (int)sizeof(buf))
|
||||
>= sizeof buf)
|
||||
{
|
||||
BIO_printf(bio_err,"Name '%s' too long\n",v->name);
|
||||
return 0;
|
||||
@@ -1455,7 +1360,6 @@ static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk,
|
||||
|
||||
for (i = 0; i < sk_CONF_VALUE_num(dn_sk); i++)
|
||||
{
|
||||
int mval;
|
||||
v=sk_CONF_VALUE_value(dn_sk,i);
|
||||
p=q=NULL;
|
||||
type=v->name;
|
||||
@@ -1472,19 +1376,8 @@ static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk,
|
||||
if(*p) type = p;
|
||||
break;
|
||||
}
|
||||
#ifndef CHARSET_EBCDIC
|
||||
if (*p == '+')
|
||||
#else
|
||||
if (*p == os_toascii['+'])
|
||||
#endif
|
||||
{
|
||||
p++;
|
||||
mval = -1;
|
||||
}
|
||||
else
|
||||
mval = 0;
|
||||
if (!X509_NAME_add_entry_by_txt(subj,type, chtype,
|
||||
(unsigned char *) v->value,-1,-1,mval)) return 0;
|
||||
(unsigned char *) v->value,-1,-1,0)) return 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -1507,7 +1400,7 @@ static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk,
|
||||
|
||||
|
||||
static int add_DN_object(X509_NAME *n, char *text, char *def, char *value,
|
||||
int nid, int n_min, int n_max, unsigned long chtype, int mval)
|
||||
int nid, int n_min, int n_max, unsigned long chtype)
|
||||
{
|
||||
int i,ret=0;
|
||||
MS_STATIC char buf[1024];
|
||||
@@ -1556,7 +1449,7 @@ start:
|
||||
#endif
|
||||
if(!req_check_len(i, n_min, n_max)) goto start;
|
||||
if (!X509_NAME_add_entry_by_NID(n,nid, chtype,
|
||||
(unsigned char *) buf, -1,-1,mval)) goto err;
|
||||
(unsigned char *) buf, -1,-1,0)) goto err;
|
||||
ret=1;
|
||||
err:
|
||||
return(ret);
|
||||
@@ -1627,7 +1520,7 @@ err:
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
static int MS_CALLBACK req_cb(int p, int n, BN_GENCB *cb)
|
||||
static void MS_CALLBACK req_cb(int p, int n, void *arg)
|
||||
{
|
||||
char c='*';
|
||||
|
||||
@@ -1635,12 +1528,11 @@ static int MS_CALLBACK req_cb(int p, int n, BN_GENCB *cb)
|
||||
if (p == 1) c='+';
|
||||
if (p == 2) c='*';
|
||||
if (p == 3) c='\n';
|
||||
BIO_write(cb->arg,&c,1);
|
||||
(void)BIO_flush(cb->arg);
|
||||
BIO_write((BIO *)arg,&c,1);
|
||||
(void)BIO_flush((BIO *)arg);
|
||||
#ifdef LINT
|
||||
p=n;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
#undef PROG
|
||||
#define PROG rsa_main
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
#include <string.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
#define RSA_SIGN 1
|
||||
#define RSA_VERIFY 2
|
||||
|
||||
@@ -108,9 +108,8 @@
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
#if !defined(OPENSSL_SYS_NETWARE) /* conflicts with winsock2 stuff on netware */
|
||||
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
@@ -154,14 +153,13 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx);
|
||||
#endif
|
||||
#ifdef HEADER_SSL_H
|
||||
int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file);
|
||||
int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key);
|
||||
#endif
|
||||
int init_client(int *sock, char *server, int port);
|
||||
int should_retry(int i);
|
||||
int extract_port(char *str, short *port_ptr);
|
||||
int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p);
|
||||
|
||||
long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp,
|
||||
long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp,
|
||||
int argi, long argl, long ret);
|
||||
|
||||
#ifdef HEADER_SSL_H
|
||||
|
||||
38
apps/s_cb.c
38
apps/s_cb.c
@@ -229,34 +229,8 @@ int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file)
|
||||
return(1);
|
||||
}
|
||||
|
||||
int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key)
|
||||
{
|
||||
if (SSL_CTX_use_certificate(ctx,cert) <= 0)
|
||||
{
|
||||
BIO_printf(bio_err,"error setting certificate\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return 0;
|
||||
}
|
||||
if (SSL_CTX_use_PrivateKey(ctx,key) <= 0)
|
||||
{
|
||||
BIO_printf(bio_err,"error setting private key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Now we know that a key and cert have been set against
|
||||
* the SSL context */
|
||||
if (!SSL_CTX_check_private_key(ctx))
|
||||
{
|
||||
BIO_printf(bio_err,"Private key does not match the certificate public key\n");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp,
|
||||
int argi, long argl, long ret)
|
||||
long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp, int argi,
|
||||
long argl, long ret)
|
||||
{
|
||||
BIO *out;
|
||||
|
||||
@@ -265,15 +239,15 @@ long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp,
|
||||
|
||||
if (cmd == (BIO_CB_READ|BIO_CB_RETURN))
|
||||
{
|
||||
BIO_printf(out,"read from %p [%p] (%d bytes => %ld (0x%lX))\n",
|
||||
(void *)bio,argp,argi,ret,ret);
|
||||
BIO_printf(out,"read from %08X [%08lX] (%d bytes => %ld (0x%X))\n",
|
||||
bio,argp,argi,ret,ret);
|
||||
BIO_dump(out,argp,(int)ret);
|
||||
return(ret);
|
||||
}
|
||||
else if (cmd == (BIO_CB_WRITE|BIO_CB_RETURN))
|
||||
{
|
||||
BIO_printf(out,"write to %p [%p] (%d bytes => %ld (0x%lX))\n",
|
||||
(void *)bio,argp,argi,ret,ret);
|
||||
BIO_printf(out,"write to %08X [%08lX] (%d bytes => %ld (0x%X))\n",
|
||||
bio,argp,argi,ret,ret);
|
||||
BIO_dump(out,argp,(int)ret);
|
||||
}
|
||||
return(ret);
|
||||
|
||||
@@ -189,17 +189,17 @@ static void sc_usage(void)
|
||||
|
||||
BIO_printf(bio_err," -verify arg - turn on peer certificate verification\n");
|
||||
BIO_printf(bio_err," -cert arg - certificate file to use, PEM format assumed\n");
|
||||
BIO_printf(bio_err," -certform arg - certificate format (PEM or DER) PEM default\n");
|
||||
BIO_printf(bio_err," -key arg - Private key file to use, in cert file if\n");
|
||||
BIO_printf(bio_err," -key arg - Private key file to use, PEM format assumed, in cert file if\n");
|
||||
BIO_printf(bio_err," not specified but cert file is.\n");
|
||||
BIO_printf(bio_err," -keyform arg - key format (PEM or DER) PEM default\n");
|
||||
BIO_printf(bio_err," -pass arg - private key file pass phrase source\n");
|
||||
BIO_printf(bio_err," -CApath arg - PEM format directory of CA's\n");
|
||||
BIO_printf(bio_err," -CAfile arg - PEM format file of CA's\n");
|
||||
BIO_printf(bio_err," -reconnect - Drop and re-make the connection with the same Session-ID\n");
|
||||
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");
|
||||
@@ -244,10 +244,6 @@ int MAIN(int argc, char **argv)
|
||||
int full_log=1;
|
||||
char *host=SSL_HOST_NAME;
|
||||
char *cert_file=NULL,*key_file=NULL;
|
||||
int cert_format = FORMAT_PEM, key_format = FORMAT_PEM;
|
||||
char *passarg = NULL, *pass = NULL;
|
||||
X509 *cert = NULL;
|
||||
EVP_PKEY *key = NULL;
|
||||
char *CApath=NULL,*CAfile=NULL,*cipher=NULL;
|
||||
int reconnect=0,badop=0,verify=SSL_VERIFY_NONE,bugs=0;
|
||||
int crlf=0;
|
||||
@@ -263,7 +259,7 @@ int MAIN(int argc, char **argv)
|
||||
char *engine_id=NULL;
|
||||
ENGINE *e=NULL;
|
||||
#endif
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
struct timeval tv;
|
||||
#endif
|
||||
|
||||
@@ -336,11 +332,6 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
cert_file= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-certform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
cert_format = str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-crl_check") == 0)
|
||||
vflags |= X509_V_FLAG_CRL_CHECK;
|
||||
else if (strcmp(*argv,"-crl_check_all") == 0)
|
||||
@@ -360,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)
|
||||
@@ -382,16 +377,6 @@ int MAIN(int argc, char **argv)
|
||||
#endif
|
||||
else if (strcmp(*argv,"-bugs") == 0)
|
||||
bugs=1;
|
||||
else if (strcmp(*argv,"-keyform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
key_format = str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-pass") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
passarg = *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-key") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -473,31 +458,6 @@ bad:
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine_id, 1);
|
||||
#endif
|
||||
if (!app_passwd(bio_err, passarg, NULL, &pass, NULL))
|
||||
{
|
||||
BIO_printf(bio_err, "Error getting password\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (key_file == NULL)
|
||||
key_file = cert_file;
|
||||
|
||||
key = load_key(bio_err, key_file, key_format, 0, pass, e,
|
||||
"client certificate private key file");
|
||||
if (!key)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
cert = load_cert(bio_err,cert_file,cert_format,
|
||||
NULL, e, "client certificate file");
|
||||
|
||||
if (!cert)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
|
||||
&& !RAND_status())
|
||||
@@ -546,7 +506,7 @@ bad:
|
||||
#endif
|
||||
|
||||
SSL_CTX_set_verify(ctx,verify,verify_callback);
|
||||
if (!set_cert_key_stuff(ctx,cert,key))
|
||||
if (!set_cert_stuff(ctx,cert_file,key_file))
|
||||
goto end;
|
||||
|
||||
if ((!SSL_CTX_load_verify_locations(ctx,CAfile,CApath)) ||
|
||||
@@ -605,7 +565,7 @@ re_start:
|
||||
if (c_debug)
|
||||
{
|
||||
con->debug=1;
|
||||
BIO_set_callback(sbio,bio_dump_callback);
|
||||
BIO_set_callback(sbio,bio_dump_cb);
|
||||
BIO_set_callback_arg(sbio,bio_c_out);
|
||||
}
|
||||
if (c_msg)
|
||||
@@ -635,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);
|
||||
}
|
||||
@@ -687,7 +649,7 @@ re_start:
|
||||
|
||||
if (!ssl_pending)
|
||||
{
|
||||
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_NETWARE)
|
||||
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
|
||||
if (tty_on)
|
||||
{
|
||||
if (read_tty) FD_SET(fileno(stdin),&readfds);
|
||||
@@ -737,16 +699,6 @@ re_start:
|
||||
} else i=select(width,(void *)&readfds,(void *)&writefds,
|
||||
NULL,NULL);
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
if(!write_tty) {
|
||||
if(read_tty) {
|
||||
tv.tv_sec = 1;
|
||||
tv.tv_usec = 0;
|
||||
i=select(width,(void *)&readfds,(void *)&writefds,
|
||||
NULL,&tv);
|
||||
} else i=select(width,(void *)&readfds,(void *)&writefds,
|
||||
NULL,NULL);
|
||||
}
|
||||
#else
|
||||
i=select(width,(void *)&readfds,(void *)&writefds,
|
||||
NULL,NULL);
|
||||
@@ -827,7 +779,7 @@ re_start:
|
||||
goto shut;
|
||||
}
|
||||
}
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
/* Assume Windows/DOS can always write */
|
||||
else if (!ssl_pending && write_tty)
|
||||
#else
|
||||
@@ -914,8 +866,6 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
|
||||
#else
|
||||
else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
|
||||
#endif
|
||||
#elif defined (OPENSSL_SYS_NETWARE)
|
||||
else if (_kbhit())
|
||||
#else
|
||||
else if (FD_ISSET(fileno(stdin),&readfds))
|
||||
#endif
|
||||
@@ -979,12 +929,6 @@ end:
|
||||
if (con != NULL) SSL_free(con);
|
||||
if (con2 != NULL) SSL_free(con2);
|
||||
if (ctx != NULL) SSL_CTX_free(ctx);
|
||||
if (cert)
|
||||
X509_free(cert);
|
||||
if (key)
|
||||
EVP_PKEY_free(key);
|
||||
if (pass)
|
||||
OPENSSL_free(pass);
|
||||
if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); }
|
||||
if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); }
|
||||
if (mbuf != NULL) { OPENSSL_cleanse(mbuf,BUFSIZZ); OPENSSL_free(mbuf); }
|
||||
@@ -1009,7 +953,6 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
||||
SSL_CIPHER *c;
|
||||
X509_NAME *xn;
|
||||
int j,i;
|
||||
const COMP_METHOD *comp, *expansion;
|
||||
|
||||
if (full)
|
||||
{
|
||||
@@ -1112,12 +1055,6 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
||||
EVP_PKEY_bits(pktmp));
|
||||
EVP_PKEY_free(pktmp);
|
||||
}
|
||||
comp=SSL_get_current_compression(s);
|
||||
expansion=SSL_get_current_expansion(s);
|
||||
BIO_printf(bio,"Compression: %s\n",
|
||||
comp ? SSL_COMP_get_name(comp) : "NONE");
|
||||
BIO_printf(bio,"Expansion: %s\n",
|
||||
expansion ? SSL_COMP_get_name(expansion) : "NONE");
|
||||
SSL_SESSION_print(bio,SSL_get_session(s));
|
||||
BIO_printf(bio,"---\n");
|
||||
if (peer != NULL)
|
||||
|
||||
260
apps/s_server.c
260
apps/s_server.c
@@ -108,33 +108,18 @@
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
|
||||
* ECC cipher suite support in OpenSSL originally developed by
|
||||
* SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
|
||||
*/
|
||||
|
||||
/* Until the key-gen callbacks are modified to use newer prototypes, we allow
|
||||
* deprecated functions for openssl-internal code */
|
||||
#ifdef OPENSSL_NO_DEPRECATED
|
||||
#undef OPENSSL_NO_DEPRECATED
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <openssl/e_os2.h>
|
||||
#ifdef OPENSSL_NO_STDIO
|
||||
#define APPS_WIN16
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_SYS_NETWARE) /* conflicts with winsock2 stuff on netware */
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* With IPv6, it looks like Digital has mixed up the proper order of
|
||||
recursive header file inclusion, resulting in the compiler complaining
|
||||
that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
|
||||
@@ -183,7 +168,6 @@ static int generate_session_id(const SSL *ssl, unsigned char *id,
|
||||
static DH *load_dh_param(char *dhfile);
|
||||
static DH *get_dh512(void);
|
||||
#endif
|
||||
|
||||
#ifdef MONOLITH
|
||||
static void s_server_init(void);
|
||||
#endif
|
||||
@@ -222,7 +206,6 @@ static DH *get_dh512(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* static int load_CA(SSL_CTX *ctx, char *file);*/
|
||||
|
||||
#undef BUFSIZZ
|
||||
@@ -296,25 +279,14 @@ static void sv_usage(void)
|
||||
BIO_printf(bio_err," -context arg - set session ID context\n");
|
||||
BIO_printf(bio_err," -verify arg - turn on peer certificate verification\n");
|
||||
BIO_printf(bio_err," -Verify arg - turn on peer certificate verification, must have a cert.\n");
|
||||
BIO_printf(bio_err," -cert arg - certificate file to use\n");
|
||||
BIO_printf(bio_err," -cert arg - certificate file to use, PEM format assumed\n");
|
||||
BIO_printf(bio_err," (default is %s)\n",TEST_CERT);
|
||||
BIO_printf(bio_err," -certform arg - certificate format (PEM or DER) PEM default\n");
|
||||
BIO_printf(bio_err," -key arg - Private Key file to use, in cert file if\n");
|
||||
BIO_printf(bio_err," -key arg - Private Key file to use, PEM format assumed, in cert file if\n");
|
||||
BIO_printf(bio_err," not specified (default is %s)\n",TEST_CERT);
|
||||
BIO_printf(bio_err," -keyform arg - key format (PEM, DER or ENGINE) PEM default\n");
|
||||
BIO_printf(bio_err," -pass arg - private key file pass phrase source\n");
|
||||
BIO_printf(bio_err," -dcert arg - second certificate file to use (usually for DSA)\n");
|
||||
BIO_printf(bio_err," -dcertform x - second certificate format (PEM or DER) PEM default\n");
|
||||
BIO_printf(bio_err," -dkey arg - second private key file to use (usually for DSA)\n");
|
||||
BIO_printf(bio_err," -dkeyform arg - second key format (PEM, DER or ENGINE) PEM default\n");
|
||||
BIO_printf(bio_err," -dpass arg - second private key file pass phrase source\n");
|
||||
BIO_printf(bio_err," -dhparam arg - DH parameter file to use, in cert file if not specified\n");
|
||||
BIO_printf(bio_err," or a default set of parameters is used\n");
|
||||
#ifndef OPENSSL_NO_ECDH
|
||||
BIO_printf(bio_err," -named_curve arg - Elliptic curve name to use for ephemeral ECDH keys.\n" \
|
||||
" Use \"openssl ecparam -list_curves\" for all names\n" \
|
||||
" (default is sect163r2).\n");
|
||||
#endif
|
||||
#ifdef FIONBIO
|
||||
BIO_printf(bio_err," -nbio - Run with non-blocking IO\n");
|
||||
#endif
|
||||
@@ -338,9 +310,6 @@ static void sv_usage(void)
|
||||
BIO_printf(bio_err," -no_tls1 - Just disable TLSv1\n");
|
||||
#ifndef OPENSSL_NO_DH
|
||||
BIO_printf(bio_err," -no_dhe - Disable ephemeral DH\n");
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDH
|
||||
BIO_printf(bio_err," -no_ecdhe - Disable ephemeral ECDH\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -bugs - Turn on SSL bug compatibility\n");
|
||||
BIO_printf(bio_err," -www - Respond to a 'GET /' with a status page\n");
|
||||
@@ -517,23 +486,16 @@ int MAIN(int argc, char *argv[])
|
||||
char *CApath=NULL,*CAfile=NULL;
|
||||
char *context = NULL;
|
||||
char *dhfile = NULL;
|
||||
char *named_curve = NULL;
|
||||
int badop=0,bugs=0;
|
||||
int ret=1;
|
||||
int off=0;
|
||||
int no_tmp_rsa=0,no_dhe=0,no_ecdhe=0,nocert=0;
|
||||
int no_tmp_rsa=0,no_dhe=0,nocert=0;
|
||||
int state=0;
|
||||
SSL_METHOD *meth=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e=NULL;
|
||||
#endif
|
||||
char *inrand=NULL;
|
||||
int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM;
|
||||
char *passarg = NULL, *pass = NULL;
|
||||
char *dpassarg = NULL, *dpass = NULL;
|
||||
int s_dcert_format = FORMAT_PEM, s_dkey_format = FORMAT_PEM;
|
||||
X509 *s_cert = NULL, *s_dcert = NULL;
|
||||
EVP_PKEY *s_key = NULL, *s_dkey = NULL;
|
||||
|
||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
||||
meth=SSLv23_server_method();
|
||||
@@ -600,58 +562,21 @@ int MAIN(int argc, char *argv[])
|
||||
if (--argc < 1) goto bad;
|
||||
s_cert_file= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-certform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
s_cert_format = str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-key") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
s_key_file= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-keyform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
s_key_format = str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-pass") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
passarg = *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-dhparam") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
dhfile = *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ECDH
|
||||
else if (strcmp(*argv,"-named_curve") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
named_curve = *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-dcertform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
s_dcert_format = str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-dcert") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
s_dcert_file= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-dkeyform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
s_dkey_format = str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-dpass") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
dpassarg = *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-dkey") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -715,8 +640,6 @@ int MAIN(int argc, char *argv[])
|
||||
{ no_tmp_rsa=1; }
|
||||
else if (strcmp(*argv,"-no_dhe") == 0)
|
||||
{ no_dhe=1; }
|
||||
else if (strcmp(*argv,"-no_ecdhe") == 0)
|
||||
{ no_ecdhe=1; }
|
||||
else if (strcmp(*argv,"-www") == 0)
|
||||
{ www=1; }
|
||||
else if (strcmp(*argv,"-WWW") == 0)
|
||||
@@ -781,59 +704,6 @@ bad:
|
||||
e = setup_engine(bio_err, engine_id, 1);
|
||||
#endif
|
||||
|
||||
if (!app_passwd(bio_err, passarg, dpassarg, &pass, &dpass))
|
||||
{
|
||||
BIO_printf(bio_err, "Error getting password\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
if (s_key_file == NULL)
|
||||
s_key_file = s_cert_file;
|
||||
|
||||
s_key = load_key(bio_err, s_key_file, s_key_format, 0, pass, e,
|
||||
"server certificate private key file");
|
||||
if (!s_key)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
s_cert = load_cert(bio_err,s_cert_file,s_cert_format,
|
||||
NULL, e, "server certificate file");
|
||||
|
||||
if (!s_cert)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (s_dcert_file)
|
||||
{
|
||||
|
||||
if (s_dkey_file == NULL)
|
||||
s_dkey_file = s_dcert_file;
|
||||
|
||||
s_dkey = load_key(bio_err, s_dkey_file, s_dkey_format,
|
||||
0, dpass, e,
|
||||
"second certificate private key file");
|
||||
if (!s_dkey)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
s_dcert = load_cert(bio_err,s_dcert_file,s_dcert_format,
|
||||
NULL, e, "second server certificate file");
|
||||
|
||||
if (!s_dcert)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
|
||||
&& !RAND_status())
|
||||
{
|
||||
@@ -856,7 +726,7 @@ bad:
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_ECDSA)
|
||||
#if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA)
|
||||
if (nocert)
|
||||
#endif
|
||||
{
|
||||
@@ -944,65 +814,12 @@ bad:
|
||||
DH_free(dh);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_ECDH
|
||||
if (!no_ecdhe)
|
||||
{
|
||||
EC_KEY *ecdh=NULL;
|
||||
|
||||
ecdh = EC_KEY_new();
|
||||
if (ecdh == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"Could not create ECDH struct.\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (named_curve)
|
||||
{
|
||||
int nid = OBJ_sn2nid(named_curve);
|
||||
|
||||
if (nid == 0)
|
||||
{
|
||||
BIO_printf(bio_err, "unknown curve name (%s)\n",
|
||||
named_curve);
|
||||
goto end;
|
||||
}
|
||||
|
||||
ecdh->group = EC_GROUP_new_by_nid(nid);
|
||||
if (ecdh->group == NULL)
|
||||
{
|
||||
BIO_printf(bio_err, "unable to create curve (%s)\n",
|
||||
named_curve);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (ecdh->group != NULL)
|
||||
{
|
||||
BIO_printf(bio_s_out,"Setting temp ECDH parameters\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_s_out,"Using default temp ECDH parameters\n");
|
||||
ecdh->group=EC_GROUP_new_by_nid(NID_sect163r2);
|
||||
if (ecdh->group == NULL)
|
||||
{
|
||||
BIO_printf(bio_err, "unable to create curve (sect163r2)\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
(void)BIO_flush(bio_s_out);
|
||||
|
||||
SSL_CTX_set_tmp_ecdh(ctx,ecdh);
|
||||
EC_KEY_free(ecdh);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!set_cert_key_stuff(ctx,s_cert,s_key))
|
||||
if (!set_cert_stuff(ctx,s_cert_file,s_key_file))
|
||||
goto end;
|
||||
if (s_dcert != NULL)
|
||||
if (s_dcert_file != NULL)
|
||||
{
|
||||
if (!set_cert_key_stuff(ctx,s_dcert,s_dkey))
|
||||
if (!set_cert_stuff(ctx,s_dcert_file,s_dkey_file))
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -1053,18 +870,6 @@ bad:
|
||||
ret=0;
|
||||
end:
|
||||
if (ctx != NULL) SSL_CTX_free(ctx);
|
||||
if (s_cert)
|
||||
X509_free(s_cert);
|
||||
if (s_dcert)
|
||||
X509_free(s_dcert);
|
||||
if (s_key)
|
||||
EVP_PKEY_free(s_key);
|
||||
if (s_dkey)
|
||||
EVP_PKEY_free(s_dkey);
|
||||
if (pass)
|
||||
OPENSSL_free(pass);
|
||||
if (dpass)
|
||||
OPENSSL_free(dpass);
|
||||
if (bio_s_out != NULL)
|
||||
{
|
||||
BIO_free(bio_s_out);
|
||||
@@ -1078,23 +883,23 @@ static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
|
||||
{
|
||||
BIO_printf(bio,"%4ld items in the session cache\n",
|
||||
SSL_CTX_sess_number(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld client connects (SSL_connect())\n",
|
||||
BIO_printf(bio,"%4d client connects (SSL_connect())\n",
|
||||
SSL_CTX_sess_connect(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld client renegotiates (SSL_connect())\n",
|
||||
BIO_printf(bio,"%4d client renegotiates (SSL_connect())\n",
|
||||
SSL_CTX_sess_connect_renegotiate(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld client connects that finished\n",
|
||||
BIO_printf(bio,"%4d client connects that finished\n",
|
||||
SSL_CTX_sess_connect_good(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld server accepts (SSL_accept())\n",
|
||||
BIO_printf(bio,"%4d server accepts (SSL_accept())\n",
|
||||
SSL_CTX_sess_accept(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld server renegotiates (SSL_accept())\n",
|
||||
BIO_printf(bio,"%4d server renegotiates (SSL_accept())\n",
|
||||
SSL_CTX_sess_accept_renegotiate(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld server accepts that finished\n",
|
||||
BIO_printf(bio,"%4d server accepts that finished\n",
|
||||
SSL_CTX_sess_accept_good(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld session cache hits\n",SSL_CTX_sess_hits(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld session cache misses\n",SSL_CTX_sess_misses(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld session cache timeouts\n",SSL_CTX_sess_timeouts(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld callback cache hits\n",SSL_CTX_sess_cb_hits(ssl_ctx));
|
||||
BIO_printf(bio,"%4ld cache full overflows (%ld allowed)\n",
|
||||
BIO_printf(bio,"%4d session cache hits\n",SSL_CTX_sess_hits(ssl_ctx));
|
||||
BIO_printf(bio,"%4d session cache misses\n",SSL_CTX_sess_misses(ssl_ctx));
|
||||
BIO_printf(bio,"%4d session cache timeouts\n",SSL_CTX_sess_timeouts(ssl_ctx));
|
||||
BIO_printf(bio,"%4d callback cache hits\n",SSL_CTX_sess_cb_hits(ssl_ctx));
|
||||
BIO_printf(bio,"%4d cache full overflows (%d allowed)\n",
|
||||
SSL_CTX_sess_cache_full(ssl_ctx),
|
||||
SSL_CTX_sess_get_cache_size(ssl_ctx));
|
||||
}
|
||||
@@ -1108,7 +913,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
unsigned long l;
|
||||
SSL *con=NULL;
|
||||
BIO *sbio;
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
struct timeval tv;
|
||||
#endif
|
||||
|
||||
@@ -1161,7 +966,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
if (s_debug)
|
||||
{
|
||||
con->debug=1;
|
||||
BIO_set_callback(SSL_get_rbio(con),bio_dump_callback);
|
||||
BIO_set_callback(SSL_get_rbio(con),bio_dump_cb);
|
||||
BIO_set_callback_arg(SSL_get_rbio(con),bio_s_out);
|
||||
}
|
||||
if (s_msg)
|
||||
@@ -1182,7 +987,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
if (!read_from_sslcon)
|
||||
{
|
||||
FD_ZERO(&readfds);
|
||||
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_NETWARE)
|
||||
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
|
||||
FD_SET(fileno(stdin),&readfds);
|
||||
#endif
|
||||
FD_SET(s,&readfds);
|
||||
@@ -1192,7 +997,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
* the compiler: if you do have a cast then you can either
|
||||
* go for (int *) or (void *).
|
||||
*/
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
/* Under DOS (non-djgpp) and Windows we can't select on stdin: only
|
||||
* on sockets. As a workaround we timeout the select every
|
||||
* second and check for any keypress. In a proper Windows
|
||||
@@ -1564,7 +1369,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
if (s_debug)
|
||||
{
|
||||
con->debug=1;
|
||||
BIO_set_callback(SSL_get_rbio(con),bio_dump_callback);
|
||||
BIO_set_callback(SSL_get_rbio(con),bio_dump_cb);
|
||||
BIO_set_callback_arg(SSL_get_rbio(con),bio_s_out);
|
||||
}
|
||||
if (s_msg)
|
||||
@@ -1612,9 +1417,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_s_out,"read R BLOCK\n");
|
||||
#if defined(OPENSSL_SYS_NETWARE)
|
||||
delay(1000);
|
||||
#elif !defined(OPENSSL_SYS_MSDOS) && !defined(__DJGPP__)
|
||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(__DJGPP__)
|
||||
sleep(1);
|
||||
#endif
|
||||
continue;
|
||||
@@ -1889,30 +1692,21 @@ err:
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength)
|
||||
{
|
||||
BIGNUM *bn = NULL;
|
||||
static RSA *rsa_tmp=NULL;
|
||||
|
||||
if (!rsa_tmp && ((bn = BN_new()) == NULL))
|
||||
BIO_printf(bio_err,"Allocation error in generating RSA key\n");
|
||||
if (!rsa_tmp && bn)
|
||||
if (rsa_tmp == NULL)
|
||||
{
|
||||
if (!s_quiet)
|
||||
{
|
||||
BIO_printf(bio_err,"Generating temp (%d bit) RSA key...",keylength);
|
||||
(void)BIO_flush(bio_err);
|
||||
}
|
||||
if(!BN_set_word(bn, RSA_F4) || ((rsa_tmp = RSA_new()) == NULL) ||
|
||||
!RSA_generate_key_ex(rsa_tmp, keylength, bn, NULL))
|
||||
{
|
||||
if(rsa_tmp) RSA_free(rsa_tmp);
|
||||
rsa_tmp = NULL;
|
||||
}
|
||||
rsa_tmp=RSA_generate_key(keylength,RSA_F4,NULL,NULL);
|
||||
if (!s_quiet)
|
||||
{
|
||||
BIO_printf(bio_err,"\n");
|
||||
(void)BIO_flush(bio_err);
|
||||
}
|
||||
BN_free(bn);
|
||||
}
|
||||
return(rsa_tmp);
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <openssl/e_os2.h>
|
||||
|
||||
/* With IPv6, it looks like Digital has mixed up the proper order of
|
||||
recursive header file inclusion, resulting in the compiler complaining
|
||||
that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
|
||||
@@ -79,16 +81,8 @@ typedef unsigned int u_int;
|
||||
#include "s_apps.h"
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
#ifdef FLAT_INC
|
||||
#include "e_os.h"
|
||||
#else
|
||||
#include "../e_os.h"
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
|
||||
static struct hostent *GetHostByName(char *name);
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
static void ssl_sock_cleanup(void);
|
||||
#endif
|
||||
static int ssl_sock_init(void);
|
||||
@@ -104,10 +98,6 @@ static int host_ip(char *str, unsigned char ip[4]);
|
||||
#define SOCKET_PROTOCOL IPPROTO_TCP
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_NETWARE
|
||||
static int wsa_init_done=0;
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
static struct WSAData wsa_state;
|
||||
static int wsa_init_done=0;
|
||||
@@ -156,15 +146,6 @@ static void ssl_sock_cleanup(void)
|
||||
WSACleanup();
|
||||
}
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
static void sock_cleanup(void)
|
||||
{
|
||||
if (wsa_init_done)
|
||||
{
|
||||
wsa_init_done=0;
|
||||
WSACleanup();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ssl_sock_init(void)
|
||||
@@ -172,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)
|
||||
@@ -200,27 +180,6 @@ static int ssl_sock_init(void)
|
||||
SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
|
||||
#endif /* OPENSSL_SYS_WIN16 */
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
WORD wVerReq;
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
|
||||
if (!wsa_init_done)
|
||||
{
|
||||
|
||||
# ifdef SIGINT
|
||||
signal(SIGINT,(void (*)(int))sock_cleanup);
|
||||
# endif
|
||||
|
||||
wsa_init_done=1;
|
||||
wVerReq = MAKEWORD( 2, 0 );
|
||||
err = WSAStartup(wVerReq,&wsaData);
|
||||
if (err != 0)
|
||||
{
|
||||
BIO_printf(bio_err,"unable to start WINSOCK2, error code=%d\n",err);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
#endif /* OPENSSL_SYS_WINDOWS */
|
||||
return(1);
|
||||
}
|
||||
@@ -382,7 +341,7 @@ redoit:
|
||||
ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len);
|
||||
if (ret == INVALID_SOCKET)
|
||||
{
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
i=WSAGetLastError();
|
||||
BIO_printf(bio_err,"accept error %d\n",i);
|
||||
#else
|
||||
@@ -593,5 +552,3 @@ static struct hostent *GetHostByName(char *name)
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
#include OPENSSL_UNISTD
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_SYS_NETWARE) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
|
||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
|
||||
#define TIMES
|
||||
#endif
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
#undef TIMES
|
||||
#endif
|
||||
|
||||
#if !defined(TIMES) && !defined(OPENSSL_SYS_VXWORKS) && !defined(OPENSSL_SYS_NETWARE)
|
||||
#if !defined(TIMES) && !defined(OPENSSL_SYS_VXWORKS)
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
@@ -384,20 +384,6 @@ static double tm_Time_F(int s)
|
||||
ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;
|
||||
return((ret == 0.0)?1e-6:ret);
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
static clock_t tstart,tend;
|
||||
|
||||
if (s == START)
|
||||
{
|
||||
tstart=clock();
|
||||
return(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
tend=clock();
|
||||
ret=(double)((double)(tend)-(double)(tstart));
|
||||
return((ret < 0.001)?0.001:ret);
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_VXWORKS)
|
||||
{
|
||||
static unsigned long tick_start, tick_end;
|
||||
|
||||
547
apps/smime.c
547
apps/smime.c
@@ -1,9 +1,9 @@
|
||||
/* smime.c */
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project.
|
||||
* project 1999.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999 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,13 +64,10 @@
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/x509_vfy.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
#undef PROG
|
||||
#define PROG smime_main
|
||||
static int save_certs(char *signerfile, STACK_OF(X509) *signers);
|
||||
static int smime_cb(int ok, X509_STORE_CTX *ctx);
|
||||
|
||||
#define SMIME_OP 0x10
|
||||
#define SMIME_ENCRYPT (1 | SMIME_OP)
|
||||
@@ -82,7 +79,7 @@ static int smime_cb(int ok, X509_STORE_CTX *ctx);
|
||||
int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
{
|
||||
ENGINE *e = NULL;
|
||||
int operation = 0;
|
||||
int ret = 0;
|
||||
@@ -99,7 +96,7 @@ int MAIN(int argc, char **argv)
|
||||
STACK_OF(X509) *encerts = NULL, *other = NULL;
|
||||
BIO *in = NULL, *out = NULL, *indata = NULL;
|
||||
int badarg = 0;
|
||||
int flags = PKCS7_DETACHED;
|
||||
int flags = PKCS7_DETACHED, store_flags = 0;
|
||||
char *to = NULL, *from = NULL, *subject = NULL;
|
||||
char *CAfile = NULL, *CApath = NULL;
|
||||
char *passargin = NULL, *passin = NULL;
|
||||
@@ -111,34 +108,24 @@ int MAIN(int argc, char **argv)
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
X509_VERIFY_PARAM *vpm = NULL;
|
||||
|
||||
args = argv + 1;
|
||||
ret = 1;
|
||||
|
||||
apps_startup();
|
||||
|
||||
if (bio_err == NULL)
|
||||
{
|
||||
if ((bio_err = BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err, stderr, BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
}
|
||||
|
||||
if (!load_config(bio_err, NULL))
|
||||
goto end;
|
||||
|
||||
while (!badarg && *args && *args[0] == '-')
|
||||
{
|
||||
if (!strcmp (*args, "-encrypt"))
|
||||
operation = SMIME_ENCRYPT;
|
||||
else if (!strcmp (*args, "-decrypt"))
|
||||
operation = SMIME_DECRYPT;
|
||||
else if (!strcmp (*args, "-sign"))
|
||||
operation = SMIME_SIGN;
|
||||
else if (!strcmp (*args, "-verify"))
|
||||
operation = SMIME_VERIFY;
|
||||
else if (!strcmp (*args, "-pk7out"))
|
||||
operation = SMIME_PK7OUT;
|
||||
while (!badarg && *args && *args[0] == '-') {
|
||||
if (!strcmp (*args, "-encrypt")) operation = SMIME_ENCRYPT;
|
||||
else if (!strcmp (*args, "-decrypt")) operation = SMIME_DECRYPT;
|
||||
else if (!strcmp (*args, "-sign")) operation = SMIME_SIGN;
|
||||
else if (!strcmp (*args, "-verify")) operation = SMIME_VERIFY;
|
||||
else if (!strcmp (*args, "-pk7out")) operation = SMIME_PK7OUT;
|
||||
#ifndef OPENSSL_NO_DES
|
||||
else if (!strcmp (*args, "-des3"))
|
||||
cipher = EVP_des_ede3_cbc();
|
||||
@@ -185,225 +172,127 @@ int MAIN(int argc, char **argv)
|
||||
flags |= PKCS7_NOOLDMIMETYPE;
|
||||
else if (!strcmp (*args, "-crlfeol"))
|
||||
flags |= PKCS7_CRLFEOL;
|
||||
else if (!strcmp(*args,"-rand"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
else if (!strcmp (*args, "-crl_check"))
|
||||
store_flags |= X509_V_FLAG_CRL_CHECK;
|
||||
else if (!strcmp (*args, "-crl_check_all"))
|
||||
store_flags |= X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL;
|
||||
else if (!strcmp(*args,"-rand")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
inrand = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
} else badarg = 1;
|
||||
need_rand = 1;
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (!strcmp(*args,"-engine"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else if (!strcmp(*args,"-engine")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
engine = *args;
|
||||
}
|
||||
else badarg = 1;
|
||||
}
|
||||
} else badarg = 1;
|
||||
#endif
|
||||
else if (!strcmp(*args,"-passin"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else if (!strcmp(*args,"-passin")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
passargin = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-to"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-to")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
to = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-from"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-from")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
from = *args;
|
||||
}
|
||||
else badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-subject"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-subject")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
subject = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-signer"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-signer")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
signerfile = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-recip"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-recip")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
recipfile = *args;
|
||||
}
|
||||
else badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-inkey"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-inkey")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
keyfile = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-keyform"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-keyform")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
keyform = str2fmt(*args);
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-certfile"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-certfile")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
certfile = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-CAfile"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-CAfile")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
CAfile = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-CApath"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-CApath")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
CApath = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-in"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-in")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
infile = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-inform"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-inform")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
informat = str2fmt(*args);
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-outform"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-outform")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
outformat = str2fmt(*args);
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-out"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-out")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
outfile = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-content"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-content")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
contfile = *args;
|
||||
}
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (args_verify(&args, NULL, &badarg, bio_err, &vpm))
|
||||
continue;
|
||||
else
|
||||
badarg = 1;
|
||||
} else badarg = 1;
|
||||
} else badarg = 1;
|
||||
args++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (operation == SMIME_SIGN)
|
||||
{
|
||||
if (!signerfile)
|
||||
{
|
||||
if(operation == SMIME_SIGN) {
|
||||
if(!signerfile) {
|
||||
BIO_printf(bio_err, "No signer certificate specified\n");
|
||||
badarg = 1;
|
||||
}
|
||||
need_rand = 1;
|
||||
}
|
||||
else if (operation == SMIME_DECRYPT)
|
||||
{
|
||||
if (!recipfile)
|
||||
{
|
||||
need_rand = 1;
|
||||
} else if(operation == SMIME_DECRYPT) {
|
||||
if(!recipfile) {
|
||||
BIO_printf(bio_err, "No recipient certificate and key specified\n");
|
||||
badarg = 1;
|
||||
}
|
||||
}
|
||||
else if (operation == SMIME_ENCRYPT)
|
||||
{
|
||||
if (!*args)
|
||||
{
|
||||
} else if(operation == SMIME_ENCRYPT) {
|
||||
if(!*args) {
|
||||
BIO_printf(bio_err, "No recipient(s) certificate(s) specified\n");
|
||||
badarg = 1;
|
||||
}
|
||||
need_rand = 1;
|
||||
}
|
||||
else if (!operation)
|
||||
badarg = 1;
|
||||
need_rand = 1;
|
||||
} else if(!operation) badarg = 1;
|
||||
|
||||
if (badarg)
|
||||
{
|
||||
if (badarg) {
|
||||
BIO_printf (bio_err, "Usage smime [options] cert.pem ...\n");
|
||||
BIO_printf (bio_err, "where options are\n");
|
||||
BIO_printf (bio_err, "-encrypt encrypt message\n");
|
||||
@@ -458,155 +347,121 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err, " the random number generator\n");
|
||||
BIO_printf (bio_err, "cert.pem recipient certificate(s) for encryption\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (!app_passwd(bio_err, passargin, NULL, &passin, NULL))
|
||||
{
|
||||
if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
|
||||
BIO_printf(bio_err, "Error getting password\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (need_rand)
|
||||
{
|
||||
if (need_rand) {
|
||||
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
|
||||
if (inrand != NULL)
|
||||
BIO_printf(bio_err,"%ld semi-random bytes loaded\n",
|
||||
app_RAND_load_files(inrand));
|
||||
}
|
||||
}
|
||||
|
||||
ret = 2;
|
||||
|
||||
if (operation != SMIME_SIGN)
|
||||
flags &= ~PKCS7_DETACHED;
|
||||
if(operation != SMIME_SIGN) flags &= ~PKCS7_DETACHED;
|
||||
|
||||
if (operation & SMIME_OP)
|
||||
{
|
||||
if (flags & PKCS7_BINARY)
|
||||
inmode = "rb";
|
||||
if (outformat == FORMAT_ASN1)
|
||||
outmode = "wb";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flags & PKCS7_BINARY)
|
||||
outmode = "wb";
|
||||
if (informat == FORMAT_ASN1)
|
||||
inmode = "rb";
|
||||
}
|
||||
if(operation & SMIME_OP) {
|
||||
if(flags & PKCS7_BINARY) inmode = "rb";
|
||||
if(outformat == FORMAT_ASN1) outmode = "wb";
|
||||
} else {
|
||||
if(flags & PKCS7_BINARY) outmode = "wb";
|
||||
if(informat == FORMAT_ASN1) inmode = "rb";
|
||||
}
|
||||
|
||||
if (operation == SMIME_ENCRYPT)
|
||||
{
|
||||
if (!cipher)
|
||||
{
|
||||
if(operation == SMIME_ENCRYPT) {
|
||||
if (!cipher) {
|
||||
#ifndef OPENSSL_NO_RC2
|
||||
cipher = EVP_rc2_40_cbc();
|
||||
#else
|
||||
BIO_printf(bio_err, "No cipher selected\n");
|
||||
goto end;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
encerts = sk_X509_new_null();
|
||||
while (*args)
|
||||
{
|
||||
if (!(cert = load_cert(bio_err,*args,FORMAT_PEM,
|
||||
NULL, e, "recipient certificate file")))
|
||||
{
|
||||
while (*args) {
|
||||
if(!(cert = load_cert(bio_err,*args,FORMAT_PEM,
|
||||
NULL, e, "recipient certificate file"))) {
|
||||
#if 0 /* An appropriate message is already printed */
|
||||
BIO_printf(bio_err, "Can't read recipient certificate file %s\n", *args);
|
||||
#endif
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
sk_X509_push(encerts, cert);
|
||||
cert = NULL;
|
||||
args++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (signerfile && (operation == SMIME_SIGN))
|
||||
{
|
||||
if (!(signer = load_cert(bio_err,signerfile,FORMAT_PEM, NULL,
|
||||
e, "signer certificate")))
|
||||
{
|
||||
if(signerfile && (operation == SMIME_SIGN)) {
|
||||
if(!(signer = load_cert(bio_err,signerfile,FORMAT_PEM, NULL,
|
||||
e, "signer certificate"))) {
|
||||
#if 0 /* An appropri message has already been printed */
|
||||
BIO_printf(bio_err, "Can't read signer certificate file %s\n", signerfile);
|
||||
#endif
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (certfile)
|
||||
{
|
||||
if (!(other = load_certs(bio_err,certfile,FORMAT_PEM, NULL,
|
||||
e, "certificate file")))
|
||||
{
|
||||
if(certfile) {
|
||||
if(!(other = load_certs(bio_err,certfile,FORMAT_PEM, NULL,
|
||||
e, "certificate file"))) {
|
||||
#if 0 /* An appropriate message has already been printed */
|
||||
BIO_printf(bio_err, "Can't read certificate file %s\n", certfile);
|
||||
#endif
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (recipfile && (operation == SMIME_DECRYPT))
|
||||
{
|
||||
if (!(recip = load_cert(bio_err,recipfile,FORMAT_PEM,NULL,
|
||||
e, "recipient certificate file")))
|
||||
{
|
||||
if(recipfile && (operation == SMIME_DECRYPT)) {
|
||||
if(!(recip = load_cert(bio_err,recipfile,FORMAT_PEM,NULL,
|
||||
e, "recipient certificate file"))) {
|
||||
#if 0 /* An appropriate message has alrady been printed */
|
||||
BIO_printf(bio_err, "Can't read recipient certificate file %s\n", recipfile);
|
||||
#endif
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (operation == SMIME_DECRYPT)
|
||||
{
|
||||
if (!keyfile)
|
||||
keyfile = recipfile;
|
||||
}
|
||||
else if (operation == SMIME_SIGN)
|
||||
{
|
||||
if (!keyfile)
|
||||
keyfile = signerfile;
|
||||
}
|
||||
else keyfile = NULL;
|
||||
if(operation == SMIME_DECRYPT) {
|
||||
if(!keyfile) keyfile = recipfile;
|
||||
} else if(operation == SMIME_SIGN) {
|
||||
if(!keyfile) keyfile = signerfile;
|
||||
} else keyfile = NULL;
|
||||
|
||||
if (keyfile)
|
||||
{
|
||||
if(keyfile) {
|
||||
key = load_key(bio_err, keyfile, keyform, 0, passin, e,
|
||||
"signing key file");
|
||||
if (!key)
|
||||
if (!key) {
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (infile)
|
||||
{
|
||||
if (!(in = BIO_new_file(infile, inmode)))
|
||||
{
|
||||
if (infile) {
|
||||
if (!(in = BIO_new_file(infile, inmode))) {
|
||||
BIO_printf (bio_err,
|
||||
"Can't open input file %s\n", infile);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
else
|
||||
in = BIO_new_fp(stdin, BIO_NOCLOSE);
|
||||
} else in = BIO_new_fp(stdin, BIO_NOCLOSE);
|
||||
|
||||
if (outfile)
|
||||
{
|
||||
if (!(out = BIO_new_file(outfile, outmode)))
|
||||
{
|
||||
if (outfile) {
|
||||
if (!(out = BIO_new_file(outfile, outmode))) {
|
||||
BIO_printf (bio_err,
|
||||
"Can't open output file %s\n", outfile);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
{
|
||||
@@ -614,133 +469,100 @@ int MAIN(int argc, char **argv)
|
||||
out = BIO_push(tmpbio, out);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (operation == SMIME_VERIFY)
|
||||
{
|
||||
if (!(store = setup_verify(bio_err, CAfile, CApath)))
|
||||
goto end;
|
||||
X509_STORE_set_verify_cb_func(store, smime_cb);
|
||||
if (vpm)
|
||||
X509_STORE_set1_param(store, vpm);
|
||||
}
|
||||
if(operation == SMIME_VERIFY) {
|
||||
if(!(store = setup_verify(bio_err, CAfile, CApath))) goto end;
|
||||
X509_STORE_set_flags(store, store_flags);
|
||||
}
|
||||
|
||||
|
||||
ret = 3;
|
||||
|
||||
if (operation == SMIME_ENCRYPT)
|
||||
if(operation == SMIME_ENCRYPT) {
|
||||
p7 = PKCS7_encrypt(encerts, in, cipher, flags);
|
||||
else if (operation == SMIME_SIGN)
|
||||
{
|
||||
/* If detached data and SMIME output enable partial
|
||||
* signing.
|
||||
*/
|
||||
if ((flags & PKCS7_DETACHED) && (outformat == FORMAT_SMIME))
|
||||
flags |= PKCS7_STREAM;
|
||||
} else if(operation == SMIME_SIGN) {
|
||||
p7 = PKCS7_sign(signer, key, other, in, flags);
|
||||
/* Don't need to rewind for partial signing */
|
||||
if (!(flags & PKCS7_STREAM) && (BIO_reset(in) != 0))
|
||||
{
|
||||
BIO_printf(bio_err, "Can't rewind input file\n");
|
||||
goto end;
|
||||
}
|
||||
if (BIO_reset(in) != 0 && (flags & PKCS7_DETACHED)) {
|
||||
BIO_printf(bio_err, "Can't rewind input file\n");
|
||||
goto end;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (informat == FORMAT_SMIME)
|
||||
} else {
|
||||
if(informat == FORMAT_SMIME)
|
||||
p7 = SMIME_read_PKCS7(in, &indata);
|
||||
else if (informat == FORMAT_PEM)
|
||||
else if(informat == FORMAT_PEM)
|
||||
p7 = PEM_read_bio_PKCS7(in, NULL, NULL, NULL);
|
||||
else if (informat == FORMAT_ASN1)
|
||||
else if(informat == FORMAT_ASN1)
|
||||
p7 = d2i_PKCS7_bio(in, NULL);
|
||||
else
|
||||
{
|
||||
else {
|
||||
BIO_printf(bio_err, "Bad input format for PKCS#7 file\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (!p7)
|
||||
{
|
||||
if(!p7) {
|
||||
BIO_printf(bio_err, "Error reading S/MIME message\n");
|
||||
goto end;
|
||||
}
|
||||
if (contfile)
|
||||
{
|
||||
}
|
||||
if(contfile) {
|
||||
BIO_free(indata);
|
||||
if (!(indata = BIO_new_file(contfile, "rb")))
|
||||
{
|
||||
if(!(indata = BIO_new_file(contfile, "rb"))) {
|
||||
BIO_printf(bio_err, "Can't read content file %s\n", contfile);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!p7)
|
||||
{
|
||||
if(!p7) {
|
||||
BIO_printf(bio_err, "Error creating PKCS#7 structure\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
ret = 4;
|
||||
if (operation == SMIME_DECRYPT)
|
||||
{
|
||||
if (!PKCS7_decrypt(p7, key, recip, out, flags))
|
||||
{
|
||||
if(operation == SMIME_DECRYPT) {
|
||||
if(!PKCS7_decrypt(p7, key, recip, out, flags)) {
|
||||
BIO_printf(bio_err, "Error decrypting PKCS#7 structure\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
else if (operation == SMIME_VERIFY)
|
||||
{
|
||||
} else if(operation == SMIME_VERIFY) {
|
||||
STACK_OF(X509) *signers;
|
||||
if (PKCS7_verify(p7, other, store, indata, out, flags))
|
||||
if(PKCS7_verify(p7, other, store, indata, out, flags)) {
|
||||
BIO_printf(bio_err, "Verification successful\n");
|
||||
else
|
||||
{
|
||||
} else {
|
||||
BIO_printf(bio_err, "Verification failure\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
signers = PKCS7_get0_signers(p7, other, flags);
|
||||
if (!save_certs(signerfile, signers))
|
||||
{
|
||||
if(!save_certs(signerfile, signers)) {
|
||||
BIO_printf(bio_err, "Error writing signers to %s\n",
|
||||
signerfile);
|
||||
ret = 5;
|
||||
goto end;
|
||||
}
|
||||
sk_X509_free(signers);
|
||||
}
|
||||
else if (operation == SMIME_PK7OUT)
|
||||
sk_X509_free(signers);
|
||||
} else if(operation == SMIME_PK7OUT) {
|
||||
PEM_write_bio_PKCS7(out, p7);
|
||||
else
|
||||
{
|
||||
if (to)
|
||||
BIO_printf(out, "To: %s\n", to);
|
||||
if (from)
|
||||
BIO_printf(out, "From: %s\n", from);
|
||||
if (subject)
|
||||
BIO_printf(out, "Subject: %s\n", subject);
|
||||
if (outformat == FORMAT_SMIME)
|
||||
} else {
|
||||
if(to) BIO_printf(out, "To: %s\n", to);
|
||||
if(from) BIO_printf(out, "From: %s\n", from);
|
||||
if(subject) BIO_printf(out, "Subject: %s\n", subject);
|
||||
if(outformat == FORMAT_SMIME)
|
||||
SMIME_write_PKCS7(out, p7, in, flags);
|
||||
else if (outformat == FORMAT_PEM)
|
||||
else if(outformat == FORMAT_PEM)
|
||||
PEM_write_bio_PKCS7(out,p7);
|
||||
else if (outformat == FORMAT_ASN1)
|
||||
else if(outformat == FORMAT_ASN1)
|
||||
i2d_PKCS7_bio(out,p7);
|
||||
else
|
||||
{
|
||||
else {
|
||||
BIO_printf(bio_err, "Bad output format for PKCS#7 file\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = 0;
|
||||
end:
|
||||
if (need_rand)
|
||||
app_RAND_write_file(NULL, bio_err);
|
||||
if (ret) ERR_print_errors(bio_err);
|
||||
if(ret) ERR_print_errors(bio_err);
|
||||
sk_X509_pop_free(encerts, X509_free);
|
||||
sk_X509_pop_free(other, X509_free);
|
||||
if (vpm)
|
||||
X509_VERIFY_PARAM_free(vpm);
|
||||
X509_STORE_free(store);
|
||||
X509_free(cert);
|
||||
X509_free(recip);
|
||||
@@ -750,39 +572,20 @@ end:
|
||||
BIO_free(in);
|
||||
BIO_free(indata);
|
||||
BIO_free_all(out);
|
||||
if (passin) OPENSSL_free(passin);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
static int save_certs(char *signerfile, STACK_OF(X509) *signers)
|
||||
{
|
||||
{
|
||||
int i;
|
||||
BIO *tmp;
|
||||
if (!signerfile)
|
||||
return 1;
|
||||
if(!signerfile) return 1;
|
||||
tmp = BIO_new_file(signerfile, "w");
|
||||
if (!tmp) return 0;
|
||||
if(!tmp) return 0;
|
||||
for(i = 0; i < sk_X509_num(signers); i++)
|
||||
PEM_write_bio_X509(tmp, sk_X509_value(signers, i));
|
||||
BIO_free(tmp);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Minimal callback just to output policy info (if any) */
|
||||
|
||||
static int smime_cb(int ok, X509_STORE_CTX *ctx)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = X509_STORE_CTX_get_error(ctx);
|
||||
|
||||
if ((error != X509_V_ERR_NO_EXPLICIT_POLICY)
|
||||
&& ((error != X509_V_OK) || (ok != 2)))
|
||||
return ok;
|
||||
|
||||
policies_print(NULL, ctx);
|
||||
|
||||
return ok;
|
||||
|
||||
}
|
||||
|
||||
787
apps/speed.c
787
apps/speed.c
File diff suppressed because it is too large
Load Diff
@@ -79,14 +79,13 @@ int MAIN(int, char **);
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
ENGINE *e = NULL;
|
||||
int i,ret=1, badarg = 0;
|
||||
int i,ret=1;
|
||||
int purpose = -1;
|
||||
char *CApath=NULL,*CAfile=NULL;
|
||||
char *untfile = NULL, *trustfile = NULL;
|
||||
STACK_OF(X509) *untrusted = NULL, *trusted = NULL;
|
||||
X509_STORE *cert_ctx=NULL;
|
||||
X509_LOOKUP *lookup=NULL;
|
||||
X509_VERIFY_PARAM *vpm = NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
@@ -122,12 +121,18 @@ int MAIN(int argc, char **argv)
|
||||
if (argc-- < 1) goto end;
|
||||
CAfile= *(++argv);
|
||||
}
|
||||
else if (args_verify(&argv, &argc, &badarg, bio_err,
|
||||
&vpm))
|
||||
else if (strcmp(*argv,"-purpose") == 0)
|
||||
{
|
||||
if (badarg)
|
||||
X509_PURPOSE *xptmp;
|
||||
if (argc-- < 1) goto end;
|
||||
i = X509_PURPOSE_get_by_sname(*(++argv));
|
||||
if(i < 0)
|
||||
{
|
||||
BIO_printf(bio_err, "unrecognized purpose\n");
|
||||
goto end;
|
||||
continue;
|
||||
}
|
||||
xptmp = X509_PURPOSE_get0(i);
|
||||
purpose = X509_PURPOSE_get_id(xptmp);
|
||||
}
|
||||
else if (strcmp(*argv,"-untrusted") == 0)
|
||||
{
|
||||
@@ -148,6 +153,14 @@ int MAIN(int argc, char **argv)
|
||||
#endif
|
||||
else if (strcmp(*argv,"-help") == 0)
|
||||
goto end;
|
||||
else if (strcmp(*argv,"-ignore_critical") == 0)
|
||||
vflags |= X509_V_FLAG_IGNORE_CRITICAL;
|
||||
else if (strcmp(*argv,"-issuer_checks") == 0)
|
||||
vflags |= X509_V_FLAG_CB_ISSUER_CHECK;
|
||||
else if (strcmp(*argv,"-crl_check") == 0)
|
||||
vflags |= X509_V_FLAG_CRL_CHECK;
|
||||
else if (strcmp(*argv,"-crl_check_all") == 0)
|
||||
vflags |= X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL;
|
||||
else if (strcmp(*argv,"-verbose") == 0)
|
||||
v_verbose=1;
|
||||
else if (argv[0][0] == '-')
|
||||
@@ -165,9 +178,6 @@ int MAIN(int argc, char **argv)
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (vpm)
|
||||
X509_STORE_set1_param(cert_ctx, vpm);
|
||||
|
||||
lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file());
|
||||
if (lookup == NULL) abort();
|
||||
if (CAfile) {
|
||||
@@ -228,7 +238,6 @@ end:
|
||||
X509_PURPOSE_get0_name(ptmp));
|
||||
}
|
||||
}
|
||||
if (vpm) X509_VERIFY_PARAM_free(vpm);
|
||||
if (cert_ctx != NULL) X509_STORE_free(cert_ctx);
|
||||
sk_X509_pop_free(untrusted, X509_free);
|
||||
sk_X509_pop_free(trusted, X509_free);
|
||||
@@ -330,13 +339,10 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
if (ctx->current_cert)
|
||||
{
|
||||
X509_NAME_oneline(
|
||||
X509_NAME_oneline(
|
||||
X509_get_subject_name(ctx->current_cert),buf,
|
||||
sizeof buf);
|
||||
printf("%s\n",buf);
|
||||
}
|
||||
printf("%s\n",buf);
|
||||
printf("error %d at %d depth lookup:%s\n",ctx->error,
|
||||
ctx->error_depth,
|
||||
X509_verify_cert_error_string(ctx->error));
|
||||
@@ -355,14 +361,7 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
|
||||
if (ctx->error == X509_V_ERR_CRL_HAS_EXPIRED) ok=1;
|
||||
if (ctx->error == X509_V_ERR_CRL_NOT_YET_VALID) ok=1;
|
||||
if (ctx->error == X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION) ok=1;
|
||||
|
||||
if (ctx->error == X509_V_ERR_NO_EXPLICIT_POLICY)
|
||||
policies_print(NULL, ctx);
|
||||
return ok;
|
||||
|
||||
}
|
||||
if ((ctx->error == X509_V_OK) && (ok == 2))
|
||||
policies_print(NULL, ctx);
|
||||
if (!v_verbose)
|
||||
ERR_clear_error();
|
||||
return(ok);
|
||||
|
||||
@@ -115,7 +115,6 @@
|
||||
#include "apps.h"
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/bn.h>
|
||||
#ifndef OPENSSL_NO_MD2
|
||||
# include <openssl/md2.h>
|
||||
#endif
|
||||
@@ -173,19 +172,7 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (version)
|
||||
{
|
||||
if (SSLeay() == SSLEAY_VERSION_NUMBER)
|
||||
{
|
||||
printf("%s\n",SSLeay_version(SSLEAY_VERSION));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%s (Library: %s)\n",
|
||||
OPENSSL_VERSION_TEXT,
|
||||
SSLeay_version(SSLEAY_VERSION));
|
||||
}
|
||||
}
|
||||
if (version) printf("%s\n",SSLeay_version(SSLEAY_VERSION));
|
||||
if (date) printf("%s\n",SSLeay_version(SSLEAY_BUILT_ON));
|
||||
if (platform) printf("%s\n",SSLeay_version(SSLEAY_PLATFORM));
|
||||
if (options)
|
||||
|
||||
48
apps/x509.c
48
apps/x509.c
@@ -73,8 +73,6 @@
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/dsa.h>
|
||||
|
||||
#undef PROG
|
||||
#define PROG x509_main
|
||||
@@ -94,9 +92,7 @@ static char *x509_usage[]={
|
||||
" -out arg - output file - default stdout\n",
|
||||
" -passin arg - private key password source\n",
|
||||
" -serial - print serial number value\n",
|
||||
" -subject_hash - print subject hash value\n",
|
||||
" -issuer_hash - print issuer hash value\n",
|
||||
" -hash - synonym for -subject_hash\n",
|
||||
" -hash - print hash value\n",
|
||||
" -subject - print subject DN\n",
|
||||
" -issuer - print issuer DN\n",
|
||||
" -email - print email address(es)\n",
|
||||
@@ -171,9 +167,8 @@ int MAIN(int argc, char **argv)
|
||||
char *infile=NULL,*outfile=NULL,*keyfile=NULL,*CAfile=NULL;
|
||||
char *CAkeyfile=NULL,*CAserial=NULL;
|
||||
char *alias=NULL;
|
||||
int text=0,serial=0,subject=0,issuer=0,startdate=0,enddate=0;
|
||||
int next_serial=0;
|
||||
int subject_hash=0,issuer_hash=0,ocspid=0;
|
||||
int text=0,serial=0,hash=0,subject=0,issuer=0,startdate=0,enddate=0;
|
||||
int next_serial=0,ocspid=0;
|
||||
int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0,email=0;
|
||||
int trustout=0,clrtrust=0,clrreject=0,aliasout=0,clrext=0;
|
||||
int C=0;
|
||||
@@ -184,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;
|
||||
@@ -221,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;
|
||||
@@ -386,11 +388,8 @@ int MAIN(int argc, char **argv)
|
||||
x509req= ++num;
|
||||
else if (strcmp(*argv,"-text") == 0)
|
||||
text= ++num;
|
||||
else if (strcmp(*argv,"-hash") == 0
|
||||
|| strcmp(*argv,"-subject_hash") == 0)
|
||||
subject_hash= ++num;
|
||||
else if (strcmp(*argv,"-issuer_hash") == 0)
|
||||
issuer_hash= ++num;
|
||||
else if (strcmp(*argv,"-hash") == 0)
|
||||
hash= ++num;
|
||||
else if (strcmp(*argv,"-subject") == 0)
|
||||
subject= ++num;
|
||||
else if (strcmp(*argv,"-issuer") == 0)
|
||||
@@ -705,8 +704,7 @@ bad:
|
||||
else if (serial == i)
|
||||
{
|
||||
BIO_printf(STDout,"serial=");
|
||||
i2a_ASN1_INTEGER(STDout,
|
||||
X509_get_serialNumber(x));
|
||||
i2a_ASN1_INTEGER(STDout,x->cert_info->serialNumber);
|
||||
BIO_printf(STDout,"\n");
|
||||
}
|
||||
else if (next_serial == i)
|
||||
@@ -743,14 +741,10 @@ bad:
|
||||
if (alstr) BIO_printf(STDout,"%s\n", alstr);
|
||||
else BIO_puts(STDout,"<No Alias>\n");
|
||||
}
|
||||
else if (subject_hash == i)
|
||||
else if (hash == i)
|
||||
{
|
||||
BIO_printf(STDout,"%08lx\n",X509_subject_name_hash(x));
|
||||
}
|
||||
else if (issuer_hash == i)
|
||||
{
|
||||
BIO_printf(STDout,"%08lx\n",X509_issuer_name_hash(x));
|
||||
}
|
||||
else if (pprint == i)
|
||||
{
|
||||
X509_PURPOSE *ptmp;
|
||||
@@ -912,10 +906,6 @@ bad:
|
||||
if (Upkey->type == EVP_PKEY_DSA)
|
||||
digest=EVP_dss1();
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
if (Upkey->type == EVP_PKEY_EC)
|
||||
digest=EVP_ecdsa();
|
||||
#endif
|
||||
|
||||
assert(need_rand);
|
||||
if (!sign(x,Upkey,days,clrext,digest,
|
||||
@@ -936,10 +926,6 @@ bad:
|
||||
if (CApkey->type == EVP_PKEY_DSA)
|
||||
digest=EVP_dss1();
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
if (CApkey->type == EVP_PKEY_EC)
|
||||
digest = EVP_ecdsa();
|
||||
#endif
|
||||
|
||||
assert(need_rand);
|
||||
if (!x509_certify(ctx,CAfile,digest,x,xca,
|
||||
@@ -971,10 +957,6 @@ bad:
|
||||
if (pk->type == EVP_PKEY_DSA)
|
||||
digest=EVP_dss1();
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ECDSA
|
||||
if (pk->type == EVP_PKEY_EC)
|
||||
digest=EVP_ecdsa();
|
||||
#endif
|
||||
|
||||
rq=X509_to_X509_REQ(x,pk,digest);
|
||||
EVP_PKEY_free(pk);
|
||||
|
||||
143
config
143
config
@@ -82,7 +82,7 @@ if [ "x$XREL" != "x" ]; then
|
||||
esac
|
||||
;;
|
||||
4.2)
|
||||
echo "whatever-whatever-unixware1"; exit 0
|
||||
echo "i386-whatever-unixware1"; exit 0
|
||||
;;
|
||||
5)
|
||||
case "x${VERSION}" in
|
||||
@@ -111,12 +111,16 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
echo "m68k-apple-aux3"; exit 0
|
||||
;;
|
||||
|
||||
AIX:[3-9]:4:*)
|
||||
echo "${MACHINE}-ibm-aix"; exit 0
|
||||
;;
|
||||
|
||||
AIX:*:[5-9]:*)
|
||||
echo "${MACHINE}-ibm-aix5"; exit 0
|
||||
echo "${MACHINE}-ibm-aix"; exit 0
|
||||
;;
|
||||
|
||||
AIX:*)
|
||||
echo "${MACHINE}-ibm-aix"; exit 0
|
||||
echo "${MACHINE}-ibm-aix3"; exit 0
|
||||
;;
|
||||
|
||||
dgux:*)
|
||||
@@ -487,29 +491,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)
|
||||
@@ -542,7 +546,15 @@ EOF
|
||||
${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
|
||||
rm dummy dummy.c
|
||||
;;
|
||||
ppc64-*-linux2) OUT="linux-ppc64" ;;
|
||||
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" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
OUT="linux-ppc"
|
||||
;;
|
||||
ppc-*-linux2) OUT="linux-ppc" ;;
|
||||
m68k-*-linux*) OUT="linux-m68k" ;;
|
||||
ia64-*-linux?) OUT="linux-ia64" ;;
|
||||
@@ -553,9 +565,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)
|
||||
@@ -586,7 +598,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" ;;
|
||||
@@ -610,9 +624,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
|
||||
@@ -622,17 +636,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
|
||||
@@ -663,8 +677,8 @@ EOF
|
||||
hppa*-*-openbsd) OUT="OpenBSD-hppa" ;;
|
||||
*-*-openbsd) OUT="OpenBSD" ;;
|
||||
*86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
|
||||
*-*-osf) OUT="osf1-alpha-cc" ;;
|
||||
*-*-tru64) OUT="tru64-alpha-cc" ;;
|
||||
*-*-osf) OUT="alphaold-cc" ;;
|
||||
*-*-tru64) OUT="alpha-cc" ;;
|
||||
*-*-OpenUNIX*)
|
||||
if [ "$CC" = "gcc" ]; then
|
||||
OUT="OpenUNIX-8-gcc"
|
||||
@@ -689,8 +703,15 @@ EOF
|
||||
RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
|
||||
*-siemens-sysv4) OUT="SINIX" ;;
|
||||
*-hpux1*)
|
||||
if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then
|
||||
if [ $CC = "gcc" ];
|
||||
then
|
||||
if [ $GCC_BITS = "64" ]; then
|
||||
OUT="hpux64-parisc2-gcc"
|
||||
else
|
||||
OUT="hpux-parisc-gcc"
|
||||
fi
|
||||
else
|
||||
OUT="hpux-parisc-$CC"
|
||||
fi
|
||||
KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
|
||||
KERNEL_BITS=${KERNEL_BITS:-32}
|
||||
@@ -701,61 +722,54 @@ 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
|
||||
OUT=${OUT:-"hpux-parisc2-${CC}"}
|
||||
if [ "$CC" = "cc" ]; then
|
||||
OUT="hpux-parisc2-cc" # can't we have hpux-parisc2-gcc?
|
||||
fi
|
||||
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
|
||||
OUT="hpux-parisc-${CC}
|
||||
:
|
||||
elif [ $CPU_VERSION -ge 523 ]; then # PA-RISC 1.0 CPU
|
||||
OUT="hpux-parisc-${CC}
|
||||
:
|
||||
else # Motorola(?) CPU
|
||||
OUT="hpux-$CC"
|
||||
fi
|
||||
options="$options -D_REENTRANT" ;;
|
||||
*-hpux) OUT="hpux-parisc-$CC" ;;
|
||||
*-aix5)
|
||||
*-aix)
|
||||
KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null`
|
||||
KERNEL_BITS=${KERNEL_BITS:-32}
|
||||
if [ $KERNEL_BITS -eq 64 ]; then
|
||||
# we default to 64-bit because PKI performance is >3x better...
|
||||
OBJECT_MODE=${OBJECT_MODE:-$KERNEL_BITS}
|
||||
else
|
||||
OBJECT_MODE=32
|
||||
fi
|
||||
OUT="aix-cc"
|
||||
if [ "$CC" = "cc" -a $OBJECT_MODE -eq 64 ]; then
|
||||
OUT="aix64-cc"
|
||||
echo "WARNING! If you wish to build 32-bit kit, then you have to"
|
||||
echo " invoke './Configure aix-cc' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
echo " You have ~5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
fi
|
||||
elif [ "$CC" = "gcc" ]; then
|
||||
OUT="aix-gcc"
|
||||
fi
|
||||
;;
|
||||
*-aix)
|
||||
OBJECT_MODE=${OBJECT_MODE:-32}
|
||||
if [ "$CC" = "gcc" ]; then
|
||||
OUT="aix-gcc"
|
||||
elif [ $OBJECT_MODE -eq 64 ]; then
|
||||
echo 'Your $OBJECT_MODE was found to be set to 64'
|
||||
OUT="aix64-cc"
|
||||
else
|
||||
OUT="aix43-cc"
|
||||
OUT="aix-cc"
|
||||
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" -a -t 1 ]; then
|
||||
echo " You have ~5 seconds to press Ctrl-C to abort."
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
# these are all covered by the catchall below
|
||||
# *-aix) OUT="aix-$CC" ;;
|
||||
# *-dgux) OUT="dgux" ;;
|
||||
mips-sony-newsos4) OUT="newsos4-gcc" ;;
|
||||
*-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
|
||||
@@ -781,10 +795,9 @@ esac
|
||||
# gcc < 2.8 does not support -mcpu=ultrasparc
|
||||
if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
|
||||
then
|
||||
echo "WARNING! Falling down to 'solaris-sparcv8-gcc'."
|
||||
echo " Upgrade to gcc-2.8 or later."
|
||||
echo "WARNING! Do consider upgrading to gcc-2.8 or later."
|
||||
sleep 5
|
||||
OUT=solaris-sparcv8-gcc
|
||||
OUT=solaris-sparcv9-gcc27
|
||||
fi
|
||||
if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
|
||||
then
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/* $LP: LPlib/source/LPdir_win.c,v 1.1 2004/06/14 10:07:56 _cvs_levitte Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS 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 REGENTS OR 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.
|
||||
*/
|
||||
|
||||
#ifndef LPDIR_H
|
||||
#include "LPdir.h"
|
||||
#endif
|
||||
|
||||
struct LP_dir_context_st { void *dummy; };
|
||||
const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
int LP_find_file_end(LP_DIR_CTX **ctx)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
/* $LP: LPlib/source/LPdir_unix.c,v 1.11 2004/09/23 22:07:22 _cvs_levitte Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS 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 COPYRIGHT
|
||||
* OWNER OR 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.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#ifndef LPDIR_H
|
||||
#include "LPdir.h"
|
||||
#endif
|
||||
|
||||
/* The POSIXly macro for the maximum number of characters in a file path
|
||||
is NAME_MAX. However, some operating systems use PATH_MAX instead.
|
||||
Therefore, it seems natural to first check for PATH_MAX and use that,
|
||||
and if it doesn't exist, use NAME_MAX. */
|
||||
#if defined(PATH_MAX)
|
||||
# define LP_ENTRY_SIZE PATH_MAX
|
||||
#elif defined(NAME_MAX)
|
||||
# define LP_ENTRY_SIZE NAME_MAX
|
||||
#endif
|
||||
|
||||
/* Of course, there's the possibility that neither PATH_MAX nor NAME_MAX
|
||||
exist. It's also possible that NAME_MAX exists but is define to a
|
||||
very small value (HP-UX offers 14), so we need to check if we got a
|
||||
result, and if it meets a minimum standard, and create or change it
|
||||
if not. */
|
||||
#if !defined(LP_ENTRY_SIZE) || LP_ENTRY_SIZE<255
|
||||
# undef LP_ENTRY_SIZE
|
||||
# define LP_ENTRY_SIZE 255
|
||||
#endif
|
||||
|
||||
struct LP_dir_context_st
|
||||
{
|
||||
DIR *dir;
|
||||
char entry_name[LP_ENTRY_SIZE+1];
|
||||
};
|
||||
|
||||
const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
||||
{
|
||||
struct dirent *direntry = NULL;
|
||||
|
||||
if (ctx == NULL || directory == NULL)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
if (*ctx == NULL)
|
||||
{
|
||||
*ctx = (LP_DIR_CTX *)malloc(sizeof(LP_DIR_CTX));
|
||||
if (*ctx == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
memset(*ctx, '\0', sizeof(LP_DIR_CTX));
|
||||
|
||||
(*ctx)->dir = opendir(directory);
|
||||
if ((*ctx)->dir == NULL)
|
||||
{
|
||||
int save_errno = errno; /* Probably not needed, but I'm paranoid */
|
||||
free(*ctx);
|
||||
*ctx = NULL;
|
||||
errno = save_errno;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
direntry = readdir((*ctx)->dir);
|
||||
if (direntry == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
strncpy((*ctx)->entry_name, direntry->d_name, sizeof((*ctx)->entry_name) - 1);
|
||||
(*ctx)->entry_name[sizeof((*ctx)->entry_name) - 1] = '\0';
|
||||
return (*ctx)->entry_name;
|
||||
}
|
||||
|
||||
int LP_find_file_end(LP_DIR_CTX **ctx)
|
||||
{
|
||||
if (ctx != NULL && *ctx != NULL)
|
||||
{
|
||||
int ret = closedir((*ctx)->dir);
|
||||
|
||||
free(*ctx);
|
||||
switch (ret)
|
||||
{
|
||||
case 0:
|
||||
return 1;
|
||||
case -1:
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
@@ -1,199 +0,0 @@
|
||||
/* $LP: LPlib/source/LPdir_vms.c,v 1.20 2004/08/26 13:36:05 _cvs_levitte Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS 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 COPYRIGHT
|
||||
* OWNER OR 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.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <descrip.h>
|
||||
#include <namdef.h>
|
||||
#include <rmsdef.h>
|
||||
#include <libfildef.h>
|
||||
#include <lib$routines.h>
|
||||
#include <strdef.h>
|
||||
#include <str$routines.h>
|
||||
#include <stsdef.h>
|
||||
#ifndef LPDIR_H
|
||||
#include "LPdir.h"
|
||||
#endif
|
||||
|
||||
/* Because some compiler options hide this macor */
|
||||
#ifndef EVMSERR
|
||||
#define EVMSERR 65535 /* error for non-translatable VMS errors */
|
||||
#endif
|
||||
|
||||
struct LP_dir_context_st
|
||||
{
|
||||
unsigned long VMS_context;
|
||||
#ifdef NAML$C_MAXRSS
|
||||
char filespec[NAML$C_MAXRSS+1];
|
||||
char result[NAML$C_MAXRSS+1];
|
||||
#else
|
||||
char filespec[256];
|
||||
char result[256];
|
||||
#endif
|
||||
struct dsc$descriptor_d filespec_dsc;
|
||||
struct dsc$descriptor_d result_dsc;
|
||||
};
|
||||
|
||||
const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
||||
{
|
||||
int status;
|
||||
char *p, *r;
|
||||
size_t l;
|
||||
unsigned long flags = 0;
|
||||
#ifdef NAML$C_MAXRSS
|
||||
flags |= LIB$M_FIL_LONG_NAMES;
|
||||
#endif
|
||||
|
||||
if (ctx == NULL || directory == NULL)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
if (*ctx == NULL)
|
||||
{
|
||||
size_t filespeclen = strlen(directory);
|
||||
char *filespec = NULL;
|
||||
|
||||
/* MUST be a VMS directory specification! Let's estimate if it is. */
|
||||
if (directory[filespeclen-1] != ']'
|
||||
&& directory[filespeclen-1] != '>'
|
||||
&& directory[filespeclen-1] != ':')
|
||||
{
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
filespeclen += 4; /* "*.*;" */
|
||||
|
||||
if (filespeclen >
|
||||
#ifdef NAML$C_MAXRSS
|
||||
NAML$C_MAXRSS
|
||||
#else
|
||||
255
|
||||
#endif
|
||||
)
|
||||
{
|
||||
errno = ENAMETOOLONG;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*ctx = (LP_DIR_CTX *)malloc(sizeof(LP_DIR_CTX));
|
||||
if (*ctx == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
memset(*ctx, '\0', sizeof(LP_DIR_CTX));
|
||||
|
||||
strcpy((*ctx)->filespec,directory);
|
||||
strcat((*ctx)->filespec,"*.*;");
|
||||
(*ctx)->filespec_dsc.dsc$w_length = filespeclen;
|
||||
(*ctx)->filespec_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||
(*ctx)->filespec_dsc.dsc$b_class = DSC$K_CLASS_S;
|
||||
(*ctx)->filespec_dsc.dsc$a_pointer = (*ctx)->filespec;
|
||||
(*ctx)->result_dsc.dsc$w_length = 0;
|
||||
(*ctx)->result_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||
(*ctx)->result_dsc.dsc$b_class = DSC$K_CLASS_D;
|
||||
(*ctx)->result_dsc.dsc$a_pointer = 0;
|
||||
}
|
||||
|
||||
(*ctx)->result_dsc.dsc$w_length = 0;
|
||||
(*ctx)->result_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||
(*ctx)->result_dsc.dsc$b_class = DSC$K_CLASS_D;
|
||||
(*ctx)->result_dsc.dsc$a_pointer = 0;
|
||||
|
||||
status = lib$find_file(&(*ctx)->filespec_dsc, &(*ctx)->result_dsc,
|
||||
&(*ctx)->VMS_context, 0, 0, 0, &flags);
|
||||
|
||||
if (status == RMS$_NMF)
|
||||
{
|
||||
errno = 0;
|
||||
vaxc$errno = status;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(!$VMS_STATUS_SUCCESS(status))
|
||||
{
|
||||
errno = EVMSERR;
|
||||
vaxc$errno = status;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Quick, cheap and dirty way to discard any device and directory,
|
||||
since we only want file names */
|
||||
l = (*ctx)->result_dsc.dsc$w_length;
|
||||
p = (*ctx)->result_dsc.dsc$a_pointer;
|
||||
r = p;
|
||||
for (; *p; p++)
|
||||
{
|
||||
if (*p == '^' && p[1] != '\0') /* Take care of ODS-5 escapes */
|
||||
{
|
||||
p++;
|
||||
}
|
||||
else if (*p == ':' || *p == '>' || *p == ']')
|
||||
{
|
||||
l -= p + 1 - r;
|
||||
r = p + 1;
|
||||
}
|
||||
else if (*p == ';')
|
||||
{
|
||||
l = p - r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
strncpy((*ctx)->result, r, l);
|
||||
(*ctx)->result[l] = '\0';
|
||||
str$free1_dx(&(*ctx)->result_dsc);
|
||||
|
||||
return (*ctx)->result;
|
||||
}
|
||||
|
||||
int LP_find_file_end(LP_DIR_CTX **ctx)
|
||||
{
|
||||
if (ctx != NULL && *ctx != NULL)
|
||||
{
|
||||
int status = lib$find_file_end(&(*ctx)->VMS_context);
|
||||
|
||||
free(*ctx);
|
||||
|
||||
if(!$VMS_STATUS_SUCCESS(status))
|
||||
{
|
||||
errno = EVMSERR;
|
||||
vaxc$errno = status;
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
/* $LP: LPlib/source/LPdir_win.c,v 1.10 2004/08/26 13:36:05 _cvs_levitte Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS 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 COPYRIGHT
|
||||
* OWNER OR 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.
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#ifndef LPDIR_H
|
||||
#include "LPdir.h"
|
||||
#endif
|
||||
|
||||
/* We're most likely overcautious here, but let's reserve for
|
||||
broken WinCE headers and explicitly opt for UNICODE call.
|
||||
Keep in mind that our WinCE builds are compiled with -DUNICODE
|
||||
[as well as -D_UNICODE]. */
|
||||
#if defined(LP_SYS_WINCE) && !defined(FindFirstFile)
|
||||
# define FindFirstFile FindFirstFileW
|
||||
#endif
|
||||
#if defined(LP_SYS_WINCE) && !defined(FindFirstFile)
|
||||
# define FindNextFile FindNextFileW
|
||||
#endif
|
||||
|
||||
#ifndef NAME_MAX
|
||||
#define NAME_MAX 255
|
||||
#endif
|
||||
|
||||
struct LP_dir_context_st
|
||||
{
|
||||
WIN32_FIND_DATA ctx;
|
||||
HANDLE handle;
|
||||
char entry_name[NAME_MAX+1];
|
||||
};
|
||||
|
||||
const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
||||
{
|
||||
struct dirent *direntry = NULL;
|
||||
|
||||
if (ctx == NULL || directory == NULL)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
if (*ctx == NULL)
|
||||
{
|
||||
*ctx = (LP_DIR_CTX *)malloc(sizeof(LP_DIR_CTX));
|
||||
if (*ctx == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
memset(*ctx, '\0', sizeof(LP_DIR_CTX));
|
||||
|
||||
if (sizeof(TCHAR) != sizeof(char))
|
||||
{
|
||||
TCHAR *wdir = NULL;
|
||||
/* len_0 denotes string length *with* trailing 0 */
|
||||
size_t index = 0,len_0 = strlen(directory) + 1;
|
||||
|
||||
wdir = (TCHAR *)malloc(len_0 * sizeof(TCHAR));
|
||||
if (wdir == NULL)
|
||||
{
|
||||
free(*ctx);
|
||||
*ctx = NULL;
|
||||
errno = ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef LP_MULTIBYTE_AVAILABLE
|
||||
if (!MultiByteToWideChar(CP_ACP, 0, directory, len_0, (WCHAR *)wdir, len_0))
|
||||
#endif
|
||||
for (index = 0; index < len_0; index++)
|
||||
wdir[index] = (TCHAR)directory[index];
|
||||
|
||||
(*ctx)->handle = FindFirstFile(wdir, &(*ctx)->ctx);
|
||||
|
||||
free(wdir);
|
||||
}
|
||||
else
|
||||
(*ctx)->handle = FindFirstFile((TCHAR *)directory, &(*ctx)->ctx);
|
||||
|
||||
if ((*ctx)->handle == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
free(*ctx);
|
||||
*ctx = NULL;
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FindNextFile((*ctx)->handle, &(*ctx)->ctx) == FALSE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof(TCHAR) != sizeof(char))
|
||||
{
|
||||
TCHAR *wdir = (*ctx)->ctx.cFileName;
|
||||
size_t index, len_0 = 0;
|
||||
|
||||
while (wdir[len_0] && len_0 < (sizeof((*ctx)->entry_name) - 1)) len_0++;
|
||||
len_0++;
|
||||
|
||||
#ifdef LP_MULTIBYTE_AVAILABLE
|
||||
if (!WideCharToMultiByte(CP_ACP, 0, (WCHAR *)wdir, len_0, (*ctx)->entry_name,
|
||||
sizeof((*ctx)->entry_name), NULL, 0))
|
||||
#endif
|
||||
for (index = 0; index < len_0; index++)
|
||||
(*ctx)->entry_name[index] = (char)wdir[index];
|
||||
}
|
||||
else
|
||||
strncpy((*ctx)->entry_name, (const char *)(*ctx)->ctx.cFileName,
|
||||
sizeof((*ctx)->entry_name)-1);
|
||||
|
||||
(*ctx)->entry_name[sizeof((*ctx)->entry_name)-1] = '\0';
|
||||
|
||||
return (*ctx)->entry_name;
|
||||
}
|
||||
|
||||
int LP_find_file_end(LP_DIR_CTX **ctx)
|
||||
{
|
||||
if (ctx != NULL && *ctx != NULL)
|
||||
{
|
||||
FindClose((*ctx)->handle);
|
||||
free(*ctx);
|
||||
*ctx = NULL;
|
||||
return 1;
|
||||
}
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/* $LP: LPlib/source/LPdir_win32.c,v 1.3 2004/08/26 13:36:05 _cvs_levitte Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS 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 COPYRIGHT
|
||||
* OWNER OR 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.
|
||||
*/
|
||||
|
||||
#define LP_SYS_WIN32
|
||||
#define LP_MULTIBYTE_AVAILABLE
|
||||
#include "LPdir_win.c"
|
||||
@@ -1,31 +0,0 @@
|
||||
/* $LP: LPlib/source/LPdir_wince.c,v 1.3 2004/08/26 13:36:05 _cvs_levitte Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS 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 COPYRIGHT
|
||||
* OWNER OR 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.
|
||||
*/
|
||||
|
||||
#define LP_SYS_WINCE
|
||||
/* We might want to define LP_MULTIBYTE_AVAILABLE here. It's currently
|
||||
under investigation what the exact conditions would be */
|
||||
#include "LPdir_win.c"
|
||||
@@ -11,10 +11,9 @@ CFLAG= -g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP= /usr/local/ssl
|
||||
MAKE= make -f Makefile.ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile.ssl
|
||||
MAKEFILE= Makefile
|
||||
RM= rm -f
|
||||
AR= ar r
|
||||
|
||||
@@ -22,31 +21,28 @@ PEX_LIBS=
|
||||
EX_LIBS=
|
||||
|
||||
CFLAGS= $(INCLUDE) $(CFLAG)
|
||||
ASFLAGS= $(INCLUDE) $(ASFLAG)
|
||||
AFLAGS=$(ASFLAGS)
|
||||
|
||||
|
||||
LIBS=
|
||||
|
||||
SDIRS= objects \
|
||||
md2 md4 md5 sha mdc2 hmac ripemd \
|
||||
SDIRS= md2 md5 sha mdc2 hmac ripemd \
|
||||
des rc2 rc4 rc5 idea bf cast \
|
||||
bn ec rsa dsa ecdsa ecdh dh dso engine aes \
|
||||
buffer bio stack lhash rand err \
|
||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
|
||||
store
|
||||
bn ec rsa dsa dh dso engine aes \
|
||||
buffer bio stack lhash rand err objects \
|
||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
||||
|
||||
GENERAL=Makefile README crypto-lib.com install.com
|
||||
|
||||
LIB= $(TOP)/libcrypto.a
|
||||
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
||||
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c o_dir.c
|
||||
LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o o_dir.o $(CPUID_OBJ)
|
||||
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c
|
||||
LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
|
||||
ossl_typ.h
|
||||
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h $(EXHEADER)
|
||||
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
@@ -55,31 +51,18 @@ top:
|
||||
|
||||
all: shared
|
||||
|
||||
buildinf.h: ../Makefile.ssl
|
||||
buildinf.h: ../Makefile
|
||||
( echo "#ifndef MK1MF_BUILD"; \
|
||||
echo ' /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
|
||||
echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
|
||||
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
|
||||
echo ' #define PLATFORM "$(PLATFORM)"'; \
|
||||
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
||||
echo '#endif' ) >buildinf.h
|
||||
|
||||
x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
|
||||
$(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
|
||||
x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
|
||||
$(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
|
||||
x86cpuid-out.s: x86cpuid.pl perlasm/x86asm.pl
|
||||
$(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) > $@
|
||||
|
||||
amd64cpuid.s: amd64cpuid.pl
|
||||
$(PERL) amd64cpuid.pl $@
|
||||
ia64cpuid.s: ia64cpuid.S
|
||||
$(CC) $(CFLAGS) -E ia64cpuid.S > $@
|
||||
|
||||
testapps:
|
||||
if echo ${SDIRS} | fgrep ' des '; \
|
||||
then cd des && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' des; fi
|
||||
if echo ${SDIRS} | fgrep ' pkcs7 '; \
|
||||
then cd pkcs7 && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps; fi
|
||||
cd pkcs7 && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps
|
||||
|
||||
subdirs:
|
||||
@for i in $(SDIRS) ;\
|
||||
@@ -89,7 +72,7 @@ subdirs:
|
||||
done;
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making 'files' in crypto/$$i..." && \
|
||||
@@ -97,11 +80,9 @@ files:
|
||||
done;
|
||||
|
||||
links:
|
||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
|
||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
||||
@for i in $(SDIRS); do \
|
||||
(cd $$i && echo "making links in crypto/$$i..." && \
|
||||
$(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \
|
||||
@@ -113,7 +94,8 @@ lib: $(LIBOBJ)
|
||||
@touch lib
|
||||
|
||||
shared: buildinf.h lib subdirs
|
||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null || \
|
||||
(cd ..; $(MAKE) $(SHARED_LIB)); \
|
||||
fi
|
||||
|
||||
@@ -161,7 +143,7 @@ depend:
|
||||
done;
|
||||
|
||||
clean:
|
||||
rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making clean in crypto/$$i..." && \
|
||||
@@ -182,63 +164,55 @@ dclean:
|
||||
cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
|
||||
cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
|
||||
cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
cpt_err.o: ../include/openssl/symhacks.h cpt_err.c
|
||||
cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
|
||||
cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cpt_err.c
|
||||
cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c
|
||||
cryptlib.o: cryptlib.h
|
||||
cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
cryptlib.o: ../include/openssl/symhacks.h cryptlib.c cryptlib.h
|
||||
cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
|
||||
cversion.o: cryptlib.h cversion.c
|
||||
cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c
|
||||
ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
|
||||
ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
|
||||
ex_data.o: ex_data.c
|
||||
ex_data.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
ex_data.o: ../include/openssl/symhacks.h cryptlib.h ex_data.c
|
||||
mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
|
||||
mem.o: mem.c
|
||||
mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c
|
||||
mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c
|
||||
mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
mem_clr.o: ../include/openssl/symhacks.h mem_clr.c
|
||||
mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
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/ossl_typ.h ../include/openssl/safestack.h
|
||||
mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
|
||||
mem_dbg.o: mem_dbg.c
|
||||
o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
|
||||
o_dir.o: LPdir_unix.c o_dir.c o_dir.h
|
||||
o_str.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_str.c
|
||||
o_str.o: o_str.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: ../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
|
||||
tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
tmdiff.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
tmdiff.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h tmdiff.c
|
||||
tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
tmdiff.o: ../include/openssl/symhacks.h ../include/openssl/tmdiff.h cryptlib.h
|
||||
tmdiff.o: tmdiff.c
|
||||
uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c
|
||||
uid.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
uid.o: ../include/openssl/symhacks.h uid.c
|
||||
@@ -11,16 +11,13 @@ CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP= /usr/local/ssl
|
||||
MAKE= make -f Makefile.ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile.ssl
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
AES_ASM_OBJ=
|
||||
|
||||
# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
ASFLAGS= $(INCLUDES) $(ASFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
#TEST=aestest.c
|
||||
@@ -29,7 +26,7 @@ APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c aes_ctr.c
|
||||
LIBOBJ=aes_core.o aes_misc.o aes_ecb.o aes_cbc.o aes_cfb.o aes_ofb.o aes_ctr.o $(AES_ASM_OBJ)
|
||||
LIBOBJ=aes_core.o aes_misc.o aes_ecb.o aes_cbc.o aes_cfb.o aes_ofb.o aes_ctr.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
@@ -50,14 +47,10 @@ lib: $(LIBOBJ)
|
||||
|
||||
$(LIBOBJ): $(LIBSRC)
|
||||
|
||||
asm/aes-ia64.s: asm/aes-ia64.S
|
||||
$(CC) $(CFLAGS) -E asm/aes-ia64.S > $@
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
@@ -87,16 +80,18 @@ dclean:
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f asm/*.[so] *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c aes_locl.h
|
||||
aes_cfb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_cfb.o: ../../include/openssl/opensslconf.h aes_cfb.c aes_locl.h
|
||||
aes_cfb.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
aes_cfb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
aes_cfb.o: aes_cfb.c aes_locl.h
|
||||
aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_core.o: ../../include/openssl/opensslconf.h aes_core.c aes_locl.h
|
||||
aes_core.o: ../../include/openssl/fips.h ../../include/openssl/opensslconf.h
|
||||
aes_core.o: aes_core.c aes_locl.h
|
||||
aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.h
|
||||
aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
@@ -52,7 +52,7 @@
|
||||
#ifndef HEADER_AES_H
|
||||
#define HEADER_AES_H
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/e_os2.h>
|
||||
|
||||
#ifdef OPENSSL_NO_AES
|
||||
#error AES is disabled.
|
||||
@@ -66,6 +66,10 @@
|
||||
#define AES_MAXNR 14
|
||||
#define AES_BLOCK_SIZE 16
|
||||
|
||||
#if defined(OPENSSL_FIPS)
|
||||
#define FIPS_AES_SIZE_T int
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -66,6 +66,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 +74,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 +120,12 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <openssl/aes.h>
|
||||
#include <openssl/fips.h>
|
||||
#include "aes_locl.h"
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
|
||||
/*
|
||||
Te0[x] = S [x].[02, 01, 01, 03];
|
||||
Te1[x] = S [x].[03, 02, 01, 01];
|
||||
@@ -873,7 +876,6 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef AES_ASM
|
||||
/*
|
||||
* Encrypt a single block
|
||||
* in and out can overlap
|
||||
@@ -1256,4 +1258,4 @@ void AES_decrypt(const unsigned char *in, unsigned char *out,
|
||||
PUTU32(out + 12, s3);
|
||||
}
|
||||
|
||||
#endif /* AES_ASM */
|
||||
#endif /* ndef OPENSSL_FIPS */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,139 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
$output=shift;
|
||||
$win64a=1 if ($output =~ /win64a\.[s|asm]/);
|
||||
open STDOUT,">$output" || die "can't open $output: $!";
|
||||
|
||||
print<<___ if(defined($win64a));
|
||||
_TEXT SEGMENT
|
||||
PUBLIC OPENSSL_rdtsc
|
||||
ALIGN 16
|
||||
OPENSSL_rdtsc PROC
|
||||
rdtsc
|
||||
shl rdx,32
|
||||
or rax,rdx
|
||||
ret
|
||||
OPENSSL_rdtsc ENDP
|
||||
|
||||
PUBLIC OPENSSL_atomic_add
|
||||
ALIGN 16
|
||||
OPENSSL_atomic_add PROC
|
||||
mov eax,DWORD PTR[rcx]
|
||||
\$Lspin: lea r8,DWORD PTR[rdx+rax]
|
||||
lock cmpxchg DWORD PTR[rcx],r8d
|
||||
jne \$Lspin
|
||||
mov eax,r8d
|
||||
cdqe
|
||||
ret
|
||||
OPENSSL_atomic_add ENDP
|
||||
|
||||
PUBLIC OPENSSL_wipe_cpu
|
||||
ALIGN 16
|
||||
OPENSSL_wipe_cpu PROC
|
||||
pxor xmm0,xmm0
|
||||
pxor xmm1,xmm1
|
||||
pxor xmm2,xmm2
|
||||
pxor xmm3,xmm3
|
||||
pxor xmm4,xmm4
|
||||
pxor xmm5,xmm5
|
||||
xor rcx,rcx
|
||||
xor rdx,rdx
|
||||
xor r8,r8
|
||||
xor r9,r9
|
||||
xor r10,r10
|
||||
xor r11,r11
|
||||
lea rax,QWORD PTR[rsp+8]
|
||||
ret
|
||||
OPENSSL_wipe_cpu ENDP
|
||||
|
||||
OPENSSL_ia32_cpuid PROC
|
||||
mov r8,rbx
|
||||
mov eax,1
|
||||
cpuid
|
||||
shl rcx,32
|
||||
mov eax,edx
|
||||
mov rbx,r8
|
||||
or rax,rcx
|
||||
ret
|
||||
OPENSSL_ia32_cpuid ENDP
|
||||
_TEXT ENDS
|
||||
|
||||
CRT\$XIU SEGMENT
|
||||
EXTRN OPENSSL_cpuid_setup:PROC
|
||||
DQ OPENSSL_cpuid_setup
|
||||
CRT\$XIU ENDS
|
||||
END
|
||||
___
|
||||
print<<___ if(!defined($win64a));
|
||||
.text
|
||||
.globl OPENSSL_rdtsc
|
||||
.align 16
|
||||
OPENSSL_rdtsc:
|
||||
rdtsc
|
||||
shl \$32,%rdx
|
||||
or %rdx,%rax
|
||||
ret
|
||||
.size OPENSSL_rdtsc,.-OPENSSL_rdtsc
|
||||
|
||||
.globl OPENSSL_atomic_add
|
||||
.type OPENSSL_atomic_add,\@function
|
||||
.align 16
|
||||
OPENSSL_atomic_add:
|
||||
movl (%rdi),%eax
|
||||
.Lspin: lea (%rsi,%rax),%r8
|
||||
lock; cmpxchg %r8d,(%rdi)
|
||||
jne .Lspin
|
||||
mov %r8d,%eax
|
||||
cdqe
|
||||
ret
|
||||
.size OPENSSL_atomic_add,.-OPENSSL_atomic_add
|
||||
|
||||
.globl OPENSSL_wipe_cpu
|
||||
.type OPENSSL_wipe_cpu,\@function
|
||||
.align 16
|
||||
OPENSSL_wipe_cpu:
|
||||
pxor %xmm0,%xmm0
|
||||
pxor %xmm1,%xmm1
|
||||
pxor %xmm2,%xmm2
|
||||
pxor %xmm3,%xmm3
|
||||
pxor %xmm4,%xmm4
|
||||
pxor %xmm5,%xmm5
|
||||
pxor %xmm6,%xmm6
|
||||
pxor %xmm7,%xmm7
|
||||
pxor %xmm8,%xmm8
|
||||
pxor %xmm9,%xmm9
|
||||
pxor %xmm10,%xmm10
|
||||
pxor %xmm11,%xmm11
|
||||
pxor %xmm12,%xmm12
|
||||
pxor %xmm13,%xmm13
|
||||
pxor %xmm14,%xmm14
|
||||
pxor %xmm15,%xmm15
|
||||
xor %rcx,%rcx
|
||||
xor %rdx,%rdx
|
||||
xor %rsi,%rsi
|
||||
xor %rdi,%rdi
|
||||
xor %r8,%r8
|
||||
xor %r9,%r9
|
||||
xor %r10,%r10
|
||||
xor %r11,%r11
|
||||
lea 8(%rsp),%rax
|
||||
ret
|
||||
.size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
|
||||
|
||||
.globl OPENSSL_ia32_cpuid
|
||||
.align 16
|
||||
OPENSSL_ia32_cpuid:
|
||||
mov %rbx,%r8
|
||||
mov \$1,%eax
|
||||
cpuid
|
||||
shl \$32,%rcx
|
||||
mov %edx,%eax
|
||||
mov %r8,%rbx
|
||||
or %rcx,%rax
|
||||
ret
|
||||
.size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid
|
||||
|
||||
.section .init
|
||||
call OPENSSL_cpuid_setup
|
||||
.align 16
|
||||
___
|
||||
1150
crypto/asn1/Makefile
Normal file
1150
crypto/asn1/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,873 +0,0 @@
|
||||
#
|
||||
# SSLeay/crypto/asn1/Makefile
|
||||
#
|
||||
|
||||
DIR= asn1
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKE= make -f Makefile.ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile.ssl
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile README
|
||||
TEST=
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= a_object.c a_bitstr.c a_utctm.c a_gentm.c a_time.c a_int.c a_octet.c \
|
||||
a_print.c a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c \
|
||||
a_enum.c a_utf8.c a_sign.c a_digest.c a_verify.c a_mbstr.c a_strex.c \
|
||||
x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_bignum.c \
|
||||
x_long.c x_name.c x_x509.c x_x509a.c x_crl.c x_info.c x_spki.c nsseq.c \
|
||||
d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c\
|
||||
t_req.c t_x509.c t_x509a.c t_crl.c t_pkey.c t_spki.c t_bitst.c \
|
||||
tasn_new.c tasn_fre.c tasn_enc.c tasn_dec.c tasn_utl.c tasn_typ.c \
|
||||
f_int.c f_string.c n_pkey.c \
|
||||
f_enum.c a_hdr.c x_pkey.c a_bool.c x_exten.c \
|
||||
asn1_gen.c asn1_par.c asn1_lib.c asn1_err.c a_meth.c a_bytes.c a_strnid.c \
|
||||
evp_asn1.c asn_pack.c p5_pbe.c p5_pbev2.c p8_pkey.c asn_moid.c
|
||||
LIBOBJ= a_object.o a_bitstr.o a_utctm.o a_gentm.o a_time.o a_int.o a_octet.o \
|
||||
a_print.o a_type.o a_set.o a_dup.o a_d2i_fp.o a_i2d_fp.o \
|
||||
a_enum.o a_utf8.o a_sign.o a_digest.o a_verify.o a_mbstr.o a_strex.o \
|
||||
x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o x_bignum.o \
|
||||
x_long.o x_name.o x_x509.o x_x509a.o x_crl.o x_info.o x_spki.o nsseq.o \
|
||||
d2i_pu.o d2i_pr.o i2d_pu.o i2d_pr.o \
|
||||
t_req.o t_x509.o t_x509a.o t_crl.o t_pkey.o t_spki.o t_bitst.o \
|
||||
tasn_new.o tasn_fre.o tasn_enc.o tasn_dec.o tasn_utl.o tasn_typ.o \
|
||||
f_int.o f_string.o n_pkey.o \
|
||||
f_enum.o a_hdr.o x_pkey.o a_bool.o x_exten.o \
|
||||
asn1_gen.o asn1_par.o asn1_lib.o asn1_err.o a_meth.o a_bytes.o a_strnid.o \
|
||||
evp_asn1.o asn_pack.o p5_pbe.o p5_pbev2.o p8_pkey.o asn_moid.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= asn1.h asn1_mac.h asn1t.h
|
||||
HEADER= $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
test: test.c
|
||||
cc -g -I../../include -c test.c
|
||||
cc -g -I../../include -o test test.o -L../.. -lcrypto
|
||||
|
||||
pk: pk.c
|
||||
cc -g -I../../include -c pk.c
|
||||
cc -g -I../../include -o pk pk.o -L../.. -lcrypto
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
a_bitstr.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_bitstr.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_bitstr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_bitstr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_bitstr.o: ../../include/openssl/opensslconf.h
|
||||
a_bitstr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_bitstr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_bitstr.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bitstr.c
|
||||
a_bool.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_bool.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
a_bool.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_bool.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
a_bool.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
a_bool.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_bool.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_bool.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bool.c
|
||||
a_bytes.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_bytes.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_bytes.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_bytes.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_bytes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_bytes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
a_bytes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_bytes.o: ../cryptlib.h a_bytes.c
|
||||
a_d2i_fp.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_d2i_fp.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
|
||||
a_d2i_fp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_d2i_fp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
a_d2i_fp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_d2i_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_d2i_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_d2i_fp.c
|
||||
a_digest.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_digest.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_digest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
a_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
a_digest.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
a_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
a_digest.o: ../../include/openssl/opensslconf.h
|
||||
a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
a_digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
a_digest.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
a_digest.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_digest.c
|
||||
a_dup.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
a_dup.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_dup.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
a_dup.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
a_dup.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_dup.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_dup.o: ../../include/openssl/symhacks.h ../cryptlib.h a_dup.c
|
||||
a_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
a_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
a_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_enum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_enum.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
a_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_enum.o: ../cryptlib.h a_enum.c
|
||||
a_gentm.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_gentm.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_gentm.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_gentm.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_gentm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_gentm.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
a_gentm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_gentm.o: ../cryptlib.h ../o_time.h a_gentm.c
|
||||
a_hdr.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_hdr.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
|
||||
a_hdr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_hdr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
a_hdr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
a_hdr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_hdr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_hdr.o: ../../include/openssl/symhacks.h ../cryptlib.h a_hdr.c
|
||||
a_i2d_fp.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_i2d_fp.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_i2d_fp.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_i2d_fp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_i2d_fp.o: ../../include/openssl/opensslconf.h
|
||||
a_i2d_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_i2d_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_i2d_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_i2d_fp.c
|
||||
a_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
a_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
a_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_int.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
a_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_int.o: ../cryptlib.h a_int.c
|
||||
a_mbstr.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_mbstr.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_mbstr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_mbstr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_mbstr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_mbstr.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
a_mbstr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_mbstr.o: ../cryptlib.h a_mbstr.c
|
||||
a_meth.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
a_meth.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_meth.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
a_meth.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
a_meth.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_meth.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_meth.o: ../../include/openssl/symhacks.h ../cryptlib.h a_meth.c
|
||||
a_object.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_object.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_object.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_object.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_object.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
a_object.o: ../../include/openssl/opensslconf.h
|
||||
a_object.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_object.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_object.o: ../../include/openssl/symhacks.h ../cryptlib.h a_object.c
|
||||
a_octet.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_octet.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_octet.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_octet.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_octet.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_octet.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
a_octet.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_octet.o: ../cryptlib.h a_octet.c
|
||||
a_print.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_print.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_print.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_print.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_print.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_print.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
a_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_print.o: ../cryptlib.h a_print.c
|
||||
a_set.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_set.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
|
||||
a_set.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_set.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
a_set.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
a_set.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_set.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_set.o: ../../include/openssl/symhacks.h ../cryptlib.h a_set.c
|
||||
a_sign.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
a_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
a_sign.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
a_sign.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
a_sign.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
a_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
a_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_sign.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
a_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
a_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
a_sign.o: ../cryptlib.h a_sign.c
|
||||
a_strex.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_strex.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_strex.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_strex.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
a_strex.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
a_strex.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
a_strex.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
a_strex.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_strex.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
a_strex.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
a_strex.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_strex.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
a_strex.o: ../cryptlib.h a_strex.c charmap.h
|
||||
a_strnid.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_strnid.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_strnid.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_strnid.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_strnid.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
a_strnid.o: ../../include/openssl/opensslconf.h
|
||||
a_strnid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_strnid.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_strnid.o: ../../include/openssl/symhacks.h ../cryptlib.h a_strnid.c
|
||||
a_time.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_time.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
a_time.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_time.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
a_time.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
a_time.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_time.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_time.o: ../../include/openssl/symhacks.h ../cryptlib.h ../o_time.h a_time.c
|
||||
a_type.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_type.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
a_type.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_type.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
a_type.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
a_type.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_type.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_type.o: ../../include/openssl/symhacks.h ../cryptlib.h a_type.c
|
||||
a_utctm.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_utctm.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
a_utctm.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
a_utctm.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
a_utctm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
a_utctm.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
a_utctm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
a_utctm.o: ../cryptlib.h ../o_time.h a_utctm.c
|
||||
a_utf8.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
a_utf8.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_utf8.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
a_utf8.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
a_utf8.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_utf8.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
a_utf8.o: ../../include/openssl/symhacks.h ../cryptlib.h a_utf8.c
|
||||
a_verify.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
a_verify.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
a_verify.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
a_verify.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
a_verify.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
a_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
a_verify.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
a_verify.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
a_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
a_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
a_verify.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
a_verify.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_verify.c
|
||||
asn1_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
asn1_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
asn1_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
asn1_err.o: ../../include/openssl/opensslconf.h
|
||||
asn1_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
asn1_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
asn1_err.o: ../../include/openssl/symhacks.h asn1_err.c
|
||||
asn1_gen.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
asn1_gen.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
asn1_gen.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
asn1_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
asn1_gen.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
asn1_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
asn1_gen.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
asn1_gen.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
asn1_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
asn1_gen.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
asn1_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
asn1_gen.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
asn1_gen.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
asn1_gen.o: ../cryptlib.h asn1_gen.c
|
||||
asn1_lib.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
asn1_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
|
||||
asn1_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
asn1_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
asn1_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
asn1_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
asn1_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
asn1_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_lib.c
|
||||
asn1_par.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
asn1_par.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
asn1_par.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
asn1_par.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
asn1_par.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
asn1_par.o: ../../include/openssl/opensslconf.h
|
||||
asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
asn1_par.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
asn1_par.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c
|
||||
asn_moid.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
asn_moid.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
asn_moid.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
asn_moid.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
asn_moid.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
asn_moid.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
asn_moid.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
asn_moid.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
asn_moid.o: ../../include/openssl/opensslconf.h
|
||||
asn_moid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
asn_moid.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
asn_moid.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
asn_moid.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
asn_moid.o: ../../include/openssl/x509_vfy.h ../cryptlib.h asn_moid.c
|
||||
asn_pack.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
asn_pack.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
asn_pack.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
asn_pack.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
asn_pack.o: ../../include/openssl/opensslconf.h
|
||||
asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
asn_pack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
asn_pack.o: ../../include/openssl/symhacks.h ../cryptlib.h asn_pack.c
|
||||
d2i_pr.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
d2i_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
d2i_pr.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
|
||||
d2i_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
d2i_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
d2i_pr.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
d2i_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
d2i_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
d2i_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
d2i_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
d2i_pr.o: ../cryptlib.h d2i_pr.c
|
||||
d2i_pu.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
d2i_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
d2i_pu.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
|
||||
d2i_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
d2i_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
d2i_pu.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
d2i_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
d2i_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
d2i_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
d2i_pu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
d2i_pu.o: ../cryptlib.h d2i_pu.c
|
||||
evp_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
evp_asn1.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
|
||||
evp_asn1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
evp_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
evp_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
evp_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
evp_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
evp_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_asn1.c
|
||||
f_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
f_enum.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
f_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
f_enum.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
f_enum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
f_enum.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
f_enum.o: ../../include/openssl/symhacks.h ../cryptlib.h f_enum.c
|
||||
f_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
f_int.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
f_int.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
f_int.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
f_int.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
f_int.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
f_int.o: ../../include/openssl/symhacks.h ../cryptlib.h f_int.c
|
||||
f_string.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
f_string.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
f_string.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
f_string.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
f_string.o: ../../include/openssl/opensslconf.h
|
||||
f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
f_string.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
f_string.o: ../../include/openssl/symhacks.h ../cryptlib.h f_string.c
|
||||
i2d_pr.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
i2d_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
i2d_pr.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
|
||||
i2d_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
i2d_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
i2d_pr.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
i2d_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
i2d_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
i2d_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
i2d_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
i2d_pr.o: ../cryptlib.h i2d_pr.c
|
||||
i2d_pu.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
i2d_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
i2d_pu.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
|
||||
i2d_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
i2d_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
i2d_pu.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
i2d_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
i2d_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
i2d_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
i2d_pu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
i2d_pu.o: ../cryptlib.h i2d_pu.c
|
||||
n_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
n_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h
|
||||
n_pkey.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
n_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
n_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
n_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
n_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
n_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
n_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
n_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
n_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
n_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
n_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h n_pkey.c
|
||||
nsseq.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||
nsseq.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
nsseq.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
nsseq.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
nsseq.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h
|
||||
nsseq.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
nsseq.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
nsseq.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
nsseq.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
nsseq.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
nsseq.o: ../../include/openssl/x509_vfy.h nsseq.c
|
||||
p5_pbe.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
p5_pbe.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
p5_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
p5_pbe.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
p5_pbe.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
p5_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
p5_pbe.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
p5_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
p5_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
p5_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
|
||||
p5_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
p5_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
p5_pbe.o: ../cryptlib.h p5_pbe.c
|
||||
p5_pbev2.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
p5_pbev2.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
p5_pbev2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
p5_pbev2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
p5_pbev2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
p5_pbev2.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
p5_pbev2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
p5_pbev2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
|
||||
p5_pbev2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
p5_pbev2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
p5_pbev2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
p5_pbev2.o: ../cryptlib.h p5_pbev2.c
|
||||
p8_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
p8_pkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
p8_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
p8_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
p8_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
p8_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
p8_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
p8_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
p8_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
p8_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p8_pkey.c
|
||||
t_bitst.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
t_bitst.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
t_bitst.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
t_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
t_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
t_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
t_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
t_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
t_bitst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
t_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
t_bitst.o: ../cryptlib.h t_bitst.c
|
||||
t_crl.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
t_crl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
t_crl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
t_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
t_crl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
t_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
t_crl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
t_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
t_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
t_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
t_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
t_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
t_crl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
t_crl.o: ../cryptlib.h t_crl.c
|
||||
t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
t_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
t_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
t_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
t_pkey.o: ../../include/openssl/ec.h ../../include/openssl/err.h
|
||||
t_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
t_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
t_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
t_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
t_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
t_pkey.o: ../cryptlib.h t_pkey.c
|
||||
t_req.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
t_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
t_req.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
t_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
t_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
t_req.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
t_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
t_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
t_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
t_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
t_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
t_req.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
t_req.o: ../cryptlib.h t_req.c
|
||||
t_spki.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
t_spki.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
|
||||
t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
t_spki.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
t_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
t_spki.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
t_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
t_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
t_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
|
||||
t_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
t_spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
t_spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
t_spki.o: ../cryptlib.h t_spki.c
|
||||
t_x509.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
t_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
t_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
t_x509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
t_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
t_x509.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
t_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
t_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
t_x509.o: ../cryptlib.h t_x509.c
|
||||
t_x509a.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
t_x509a.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
t_x509a.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
t_x509a.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
t_x509a.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
t_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
t_x509a.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
t_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
t_x509a.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
t_x509a.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
t_x509a.o: ../cryptlib.h t_x509a.c
|
||||
tasn_dec.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||
tasn_dec.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
tasn_dec.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
tasn_dec.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
tasn_dec.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
tasn_dec.o: ../../include/openssl/opensslconf.h
|
||||
tasn_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tasn_dec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
tasn_dec.o: ../../include/openssl/symhacks.h tasn_dec.c
|
||||
tasn_enc.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||
tasn_enc.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
tasn_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/obj_mac.h
|
||||
tasn_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
tasn_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tasn_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
tasn_enc.o: ../../include/openssl/symhacks.h tasn_enc.c
|
||||
tasn_fre.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||
tasn_fre.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
tasn_fre.o: ../../include/openssl/e_os2.h ../../include/openssl/obj_mac.h
|
||||
tasn_fre.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
tasn_fre.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tasn_fre.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
tasn_fre.o: ../../include/openssl/symhacks.h tasn_fre.c
|
||||
tasn_new.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||
tasn_new.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
tasn_new.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
tasn_new.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
tasn_new.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
tasn_new.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tasn_new.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
tasn_new.o: ../../include/openssl/symhacks.h tasn_new.c
|
||||
tasn_typ.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||
tasn_typ.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
tasn_typ.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
tasn_typ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tasn_typ.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
tasn_typ.o: ../../include/openssl/symhacks.h tasn_typ.c
|
||||
tasn_utl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||
tasn_utl.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
tasn_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
tasn_utl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
tasn_utl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
tasn_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tasn_utl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
tasn_utl.o: ../../include/openssl/symhacks.h tasn_utl.c
|
||||
x_algor.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||
x_algor.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
x_algor.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
x_algor.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
x_algor.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h
|
||||
x_algor.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_algor.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_algor.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_algor.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_algor.o: ../../include/openssl/x509_vfy.h x_algor.c
|
||||
x_attrib.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_attrib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_attrib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_attrib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_attrib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_attrib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_attrib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_attrib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_attrib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_attrib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_attrib.c
|
||||
x_bignum.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_bignum.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_bignum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
x_bignum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
x_bignum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
x_bignum.o: ../../include/openssl/opensslconf.h
|
||||
x_bignum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_bignum.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
x_bignum.o: ../../include/openssl/symhacks.h ../cryptlib.h x_bignum.c
|
||||
x_crl.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_crl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_crl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_crl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_crl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_crl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_crl.c
|
||||
x_exten.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
|
||||
x_exten.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
x_exten.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
x_exten.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
x_exten.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h
|
||||
x_exten.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_exten.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_exten.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_exten.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_exten.o: ../../include/openssl/x509_vfy.h x_exten.c
|
||||
x_info.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
x_info.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_info.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_info.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_info.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_info.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_info.c
|
||||
x_long.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_long.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_long.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
x_long.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
x_long.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
x_long.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
x_long.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
x_long.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
x_long.o: ../cryptlib.h x_long.c
|
||||
x_name.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_name.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_name.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_name.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_name.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_name.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_name.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_name.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_name.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_name.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_name.c
|
||||
x_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
|
||||
x_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_pkey.c
|
||||
x_pubkey.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_pubkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_pubkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_pubkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
x_pubkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
x_pubkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
x_pubkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
x_pubkey.o: ../../include/openssl/opensslconf.h
|
||||
x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_pubkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
|
||||
x_pubkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
x_pubkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
x_pubkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
x_pubkey.o: ../cryptlib.h x_pubkey.c
|
||||
x_req.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_req.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_req.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_req.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_req.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_req.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_req.c
|
||||
x_sig.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_sig.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_sig.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_sig.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_sig.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_sig.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_sig.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_sig.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_sig.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_sig.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_sig.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_sig.c
|
||||
x_spki.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_spki.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_spki.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_spki.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_spki.c
|
||||
x_val.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_val.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_val.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_val.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_val.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_val.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_val.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_val.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_val.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_val.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_val.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_val.c
|
||||
x_x509.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_x509.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
|
||||
x_x509.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
x_x509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
x_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
|
||||
x_x509.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
x_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
x_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
x_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
x_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
x_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
x_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
x_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h x_x509.c
|
||||
x_x509a.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x_x509a.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
x_x509a.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
x_x509a.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
x_x509a.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
x_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
x_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_x509a.c
|
||||
@@ -113,12 +113,11 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
|
||||
const unsigned char **pp, long len)
|
||||
ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
|
||||
long len)
|
||||
{
|
||||
ASN1_BIT_STRING *ret=NULL;
|
||||
const unsigned char *p;
|
||||
unsigned char *s;
|
||||
unsigned char *p,*s;
|
||||
int i;
|
||||
|
||||
if (len < 1)
|
||||
@@ -201,7 +200,6 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value)
|
||||
return 0;
|
||||
}
|
||||
if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length);
|
||||
if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length);
|
||||
a->data=c;
|
||||
a->length=w+1;
|
||||
}
|
||||
|
||||
@@ -75,10 +75,10 @@ int i2d_ASN1_BOOLEAN(int a, unsigned char **pp)
|
||||
return(r);
|
||||
}
|
||||
|
||||
int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length)
|
||||
int d2i_ASN1_BOOLEAN(int *a, unsigned char **pp, long length)
|
||||
{
|
||||
int ret= -1;
|
||||
const unsigned char *p;
|
||||
unsigned char *p;
|
||||
long len;
|
||||
int inf,tag,xclass;
|
||||
int i=0;
|
||||
|
||||
@@ -60,15 +60,14 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c);
|
||||
static int asn1_collate_primitive(ASN1_STRING *a, ASN1_CTX *c);
|
||||
/* type is a 'bitmap' of acceptable string types.
|
||||
*/
|
||||
ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
|
||||
ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp,
|
||||
long length, int type)
|
||||
{
|
||||
ASN1_STRING *ret=NULL;
|
||||
const unsigned char *p;
|
||||
unsigned char *s;
|
||||
unsigned char *p,*s;
|
||||
long len;
|
||||
int inf,tag,xclass;
|
||||
int i=0;
|
||||
@@ -154,12 +153,11 @@ int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass)
|
||||
return(r);
|
||||
}
|
||||
|
||||
ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
|
||||
long length, int Ptag, int Pclass)
|
||||
ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp, long length,
|
||||
int Ptag, int Pclass)
|
||||
{
|
||||
ASN1_STRING *ret=NULL;
|
||||
const unsigned char *p;
|
||||
unsigned char *s;
|
||||
unsigned char *p,*s;
|
||||
long len;
|
||||
int inf,tag,xclass;
|
||||
int i=0;
|
||||
@@ -187,7 +185,7 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
|
||||
|
||||
if (inf & V_ASN1_CONSTRUCTED)
|
||||
{
|
||||
ASN1_const_CTX c;
|
||||
ASN1_CTX c;
|
||||
|
||||
c.pp=pp;
|
||||
c.p=p;
|
||||
@@ -249,7 +247,7 @@ err:
|
||||
* them into the one structure that is then returned */
|
||||
/* There have been a few bug fixes for this function from
|
||||
* Paul Keogh <paul.keogh@sse.ie>, many thanks to him */
|
||||
static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c)
|
||||
static int asn1_collate_primitive(ASN1_STRING *a, ASN1_CTX *c)
|
||||
{
|
||||
ASN1_STRING *os=NULL;
|
||||
BUF_MEM b;
|
||||
@@ -270,7 +268,7 @@ static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c)
|
||||
{
|
||||
if (c->inf & 1)
|
||||
{
|
||||
c->eos=ASN1_const_check_infinite_end(&c->p,
|
||||
c->eos=ASN1_check_infinite_end(&c->p,
|
||||
(long)(c->max-c->p));
|
||||
if (c->eos) break;
|
||||
}
|
||||
@@ -298,7 +296,7 @@ static int asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c)
|
||||
num+=os->length;
|
||||
}
|
||||
|
||||
if (!asn1_const_Finish(c)) goto err;
|
||||
if (!asn1_Finish(c)) goto err;
|
||||
|
||||
a->length=num;
|
||||
if (a->data != NULL) OPENSSL_free(a->data);
|
||||
|
||||
@@ -107,14 +107,14 @@ err:
|
||||
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x)
|
||||
{
|
||||
BUF_MEM *b = NULL;
|
||||
const unsigned char *p;
|
||||
unsigned char *p;
|
||||
void *ret=NULL;
|
||||
int len;
|
||||
|
||||
len = asn1_d2i_read_bio(in, &b);
|
||||
if(len < 0) goto err;
|
||||
|
||||
p=(const unsigned char *)b->data;
|
||||
p=(unsigned char *)b->data;
|
||||
ret=ASN1_item_d2i(x,&p,len, it);
|
||||
err:
|
||||
if (b != NULL) BUF_MEM_free(b);
|
||||
@@ -146,7 +146,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
||||
unsigned char *p;
|
||||
int i;
|
||||
int ret=-1;
|
||||
ASN1_const_CTX c;
|
||||
ASN1_CTX c;
|
||||
int want=HEADER_SIZE;
|
||||
int eos=0;
|
||||
#if defined(__GNUC__) && defined(__ia64)
|
||||
|
||||
@@ -91,8 +91,7 @@ char *ASN1_dup(int (*i2d)(), char *(*d2i)(), char *x)
|
||||
|
||||
void *ASN1_item_dup(const ASN1_ITEM *it, void *x)
|
||||
{
|
||||
unsigned char *b = NULL;
|
||||
const unsigned char *p;
|
||||
unsigned char *b = NULL, *p;
|
||||
long i;
|
||||
void *ret;
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
#include <stdio.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
/*
|
||||
* Code for ENUMERATED type: identical to INTEGER apart from a different tag.
|
||||
@@ -68,13 +67,12 @@
|
||||
|
||||
int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v)
|
||||
{
|
||||
int j,k;
|
||||
unsigned int i;
|
||||
int i,j,k;
|
||||
unsigned char buf[sizeof(long)+1];
|
||||
long d;
|
||||
|
||||
a->type=V_ASN1_ENUMERATED;
|
||||
if (a->length < (int)(sizeof(long)+1))
|
||||
if (a->length < (sizeof(long)+1))
|
||||
{
|
||||
if (a->data != NULL)
|
||||
OPENSSL_free(a->data);
|
||||
@@ -118,7 +116,7 @@ long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a)
|
||||
else if (i != V_ASN1_ENUMERATED)
|
||||
return -1;
|
||||
|
||||
if (a->length > (int)sizeof(long))
|
||||
if (a->length > sizeof(long))
|
||||
{
|
||||
/* hmm... a bit ugly */
|
||||
return(0xffffffffL);
|
||||
@@ -149,7 +147,7 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai)
|
||||
ASN1err(ASN1_F_BN_TO_ASN1_ENUMERATED,ERR_R_NESTED_ASN1_ERROR);
|
||||
goto err;
|
||||
}
|
||||
if(BN_get_sign(bn)) ret->type = V_ASN1_NEG_ENUMERATED;
|
||||
if(bn->neg) ret->type = V_ASN1_NEG_ENUMERATED;
|
||||
else ret->type=V_ASN1_ENUMERATED;
|
||||
j=BN_num_bits(bn);
|
||||
len=((j == 0)?0:((j/8)+1));
|
||||
@@ -177,6 +175,6 @@ BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn)
|
||||
|
||||
if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
|
||||
ASN1err(ASN1_F_ASN1_ENUMERATED_TO_BN,ASN1_R_BN_LIB);
|
||||
else if(ai->type == V_ASN1_NEG_ENUMERATED) BN_set_sign(ret,1);
|
||||
else if(ai->type == V_ASN1_NEG_ENUMERATED) ret->neg = 1;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ err:
|
||||
return(0);
|
||||
}
|
||||
|
||||
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str)
|
||||
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str)
|
||||
{
|
||||
ASN1_GENERALIZEDTIME t;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ int i2d_ASN1_HEADER(ASN1_HEADER *a, unsigned char **pp)
|
||||
M_ASN1_I2D_finish();
|
||||
}
|
||||
|
||||
ASN1_HEADER *d2i_ASN1_HEADER(ASN1_HEADER **a, const unsigned char **pp,
|
||||
ASN1_HEADER *d2i_ASN1_HEADER(ASN1_HEADER **a, unsigned char **pp,
|
||||
long length)
|
||||
{
|
||||
M_ASN1_D2I_vars(a,ASN1_HEADER *,ASN1_HEADER_new);
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
#include <stdio.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
ASN1_INTEGER *ASN1_INTEGER_dup(ASN1_INTEGER *x)
|
||||
{ return M_ASN1_INTEGER_dup(x);}
|
||||
@@ -175,12 +174,11 @@ int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp)
|
||||
|
||||
/* Convert just ASN1 INTEGER content octets to ASN1_INTEGER structure */
|
||||
|
||||
ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
|
||||
ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp,
|
||||
long len)
|
||||
{
|
||||
ASN1_INTEGER *ret=NULL;
|
||||
const unsigned char *p, *pend;
|
||||
unsigned char *to,*s;
|
||||
unsigned char *p,*to,*s, *pend;
|
||||
int i;
|
||||
|
||||
if ((a == NULL) || ((*a) == NULL))
|
||||
@@ -268,12 +266,11 @@ err:
|
||||
* with its MSB set as negative (it doesn't add a padding zero).
|
||||
*/
|
||||
|
||||
ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
|
||||
ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, unsigned char **pp,
|
||||
long length)
|
||||
{
|
||||
ASN1_INTEGER *ret=NULL;
|
||||
const unsigned char *p;
|
||||
unsigned char *to,*s;
|
||||
unsigned char *p,*to,*s;
|
||||
long len;
|
||||
int inf,tag,xclass;
|
||||
int i;
|
||||
@@ -335,13 +332,12 @@ err:
|
||||
|
||||
int ASN1_INTEGER_set(ASN1_INTEGER *a, long v)
|
||||
{
|
||||
int j,k;
|
||||
unsigned int i;
|
||||
int i,j,k;
|
||||
unsigned char buf[sizeof(long)+1];
|
||||
long d;
|
||||
|
||||
a->type=V_ASN1_INTEGER;
|
||||
if (a->length < (int)(sizeof(long)+1))
|
||||
if (a->length < (sizeof(long)+1))
|
||||
{
|
||||
if (a->data != NULL)
|
||||
OPENSSL_free(a->data);
|
||||
@@ -385,7 +381,7 @@ long ASN1_INTEGER_get(ASN1_INTEGER *a)
|
||||
else if (i != V_ASN1_INTEGER)
|
||||
return -1;
|
||||
|
||||
if (a->length > (int)sizeof(long))
|
||||
if (a->length > sizeof(long))
|
||||
{
|
||||
/* hmm... a bit ugly */
|
||||
return(0xffffffffL);
|
||||
@@ -416,8 +412,7 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai)
|
||||
ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_NESTED_ASN1_ERROR);
|
||||
goto err;
|
||||
}
|
||||
if (BN_get_sign(bn))
|
||||
ret->type = V_ASN1_NEG_INTEGER;
|
||||
if(bn->neg) ret->type = V_ASN1_NEG_INTEGER;
|
||||
else ret->type=V_ASN1_INTEGER;
|
||||
j=BN_num_bits(bn);
|
||||
len=((j == 0)?0:((j/8)+1));
|
||||
@@ -450,8 +445,7 @@ BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai, BIGNUM *bn)
|
||||
|
||||
if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
|
||||
ASN1err(ASN1_F_ASN1_INTEGER_TO_BN,ASN1_R_BN_LIB);
|
||||
else if(ai->type == V_ASN1_NEG_INTEGER)
|
||||
BN_set_sign(ret, 1);
|
||||
else if(ai->type == V_ASN1_NEG_INTEGER) ret->neg = 1;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -184,15 +184,15 @@ int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a)
|
||||
if ((a == NULL) || (a->data == NULL))
|
||||
return(BIO_write(bp,"NULL",4));
|
||||
i=i2t_ASN1_OBJECT(buf,sizeof buf,a);
|
||||
if (i > (int)sizeof(buf)) i=sizeof buf;
|
||||
if (i > sizeof buf) i=sizeof buf;
|
||||
BIO_write(bp,buf,i);
|
||||
return(i);
|
||||
}
|
||||
|
||||
ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
|
||||
ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp,
|
||||
long length)
|
||||
{
|
||||
const unsigned char *p;
|
||||
unsigned char *p;
|
||||
long len;
|
||||
int tag,xclass;
|
||||
int inf,i;
|
||||
@@ -219,11 +219,11 @@ err:
|
||||
ASN1_OBJECT_free(ret);
|
||||
return(NULL);
|
||||
}
|
||||
ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
|
||||
ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp,
|
||||
long len)
|
||||
{
|
||||
ASN1_OBJECT *ret=NULL;
|
||||
const unsigned char *p;
|
||||
unsigned char *p;
|
||||
int i;
|
||||
|
||||
/* only the ASN1_OBJECTs from the 'table' will have values
|
||||
|
||||
@@ -66,6 +66,6 @@ ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(ASN1_OCTET_STRING *x)
|
||||
int ASN1_OCTET_STRING_cmp(ASN1_OCTET_STRING *a, ASN1_OCTET_STRING *b)
|
||||
{ return M_ASN1_OCTET_STRING_cmp(a, b); }
|
||||
|
||||
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *x, const unsigned char *d, int len)
|
||||
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *x, unsigned char *d, int len)
|
||||
{ return M_ASN1_OCTET_STRING_set(x, d, len); }
|
||||
|
||||
|
||||
@@ -162,10 +162,10 @@ SetBlob
|
||||
return(r);
|
||||
}
|
||||
|
||||
STACK *d2i_ASN1_SET(STACK **a, const unsigned char **pp, long length,
|
||||
STACK *d2i_ASN1_SET(STACK **a, unsigned char **pp, long length,
|
||||
char *(*func)(), void (*free_func)(void *), int ex_tag, int ex_class)
|
||||
{
|
||||
ASN1_const_CTX c;
|
||||
ASN1_CTX c;
|
||||
STACK *ret=NULL;
|
||||
|
||||
if ((a == NULL) || ((*a) == NULL))
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1998-2002 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
|
||||
@@ -229,11 +229,10 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
||||
else
|
||||
a=algor2;
|
||||
if (a == NULL) continue;
|
||||
if (type->pkey_type == NID_dsaWithSHA1 ||
|
||||
type->pkey_type == NID_ecdsa_with_SHA1)
|
||||
if (type->pkey_type == NID_dsaWithSHA1)
|
||||
{
|
||||
/* special case: RFC 3279 tells us to omit 'parameters'
|
||||
* with id-dsa-with-sha1 and ecdsa-with-SHA1 */
|
||||
/* special case: RFC 2459 tells us to omit 'parameters'
|
||||
* with id-dsa-with-sha1 */
|
||||
ASN1_TYPE_free(a->parameter);
|
||||
a->parameter = NULL;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* project 2000.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2000 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 2000-2004 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
|
||||
@@ -553,7 +553,12 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
||||
if((type < 0) || (type > 30)) return -1;
|
||||
mbflag = tag2nbyte[type];
|
||||
if(mbflag == -1) return -1;
|
||||
mbflag |= MBSTRING_FLAG;
|
||||
if (mbflag == 0)
|
||||
mbflag = MBSTRING_UTF8;
|
||||
else if (mbflag == 4)
|
||||
mbflag = MBSTRING_UNIV;
|
||||
else
|
||||
mbflag |= MBSTRING_FLAG;
|
||||
stmp.data = NULL;
|
||||
ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
|
||||
if(ret < 0) return ret;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user