Compare commits
2551 Commits
OpenSSL-en
...
BEN_FIPS_T
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffe8370a18 | ||
|
|
fdf12fd455 | ||
|
|
50c71f8701 | ||
|
|
f25b0dddbb | ||
|
|
871743aea9 | ||
|
|
2821a5e587 | ||
|
|
739320b840 | ||
|
|
c9ee3ccd45 | ||
|
|
95a64aa4b8 | ||
|
|
80be2f484f | ||
|
|
cf54f06dcb | ||
|
|
5389c2dfa1 | ||
|
|
4e2307ebdc | ||
|
|
64961dc3c5 | ||
|
|
ed2e0e3988 | ||
|
|
7027553741 | ||
|
|
445aa1c44a | ||
|
|
2343078660 | ||
|
|
2fe7c59277 | ||
|
|
899ffab2c9 | ||
|
|
577332db14 | ||
|
|
3b84ce3b6f | ||
|
|
2667b068a1 | ||
|
|
a26be0386e | ||
|
|
d5adc4b475 | ||
|
|
fe2d15d814 | ||
|
|
c45c8f3f1c | ||
|
|
b09c9a91cb | ||
|
|
a2fd4d03e8 | ||
|
|
52fc641da0 | ||
|
|
f29f610bf5 | ||
|
|
27d63818e1 | ||
|
|
fa68935f57 | ||
|
|
b2f94f81e1 | ||
|
|
ad6eec30a3 | ||
|
|
25c578f3ca | ||
|
|
22f083815c | ||
|
|
c61e45fba0 | ||
|
|
7418027279 | ||
|
|
d3446728f9 | ||
|
|
245dac4d17 | ||
|
|
c377882c39 | ||
|
|
e6fa67fa93 | ||
|
|
c2cdb1a877 | ||
|
|
31b28f95be | ||
|
|
f61bc950c1 | ||
|
|
64a014a6d2 | ||
|
|
9ea72d3705 | ||
|
|
a86eff4296 | ||
|
|
4c4ef336a9 | ||
|
|
1ce9c76f8e | ||
|
|
19c8d4a5f8 | ||
|
|
e7d580a924 | ||
|
|
1f8e046af9 | ||
|
|
7e1ef2d62a | ||
|
|
ccf61c87fe | ||
|
|
6d02c53762 | ||
|
|
dac0d334ad | ||
|
|
f63ff4a1a3 | ||
|
|
9ef37a8dc9 | ||
|
|
fbb40083c1 | ||
|
|
549d89f7ed | ||
|
|
5db9e7bec8 | ||
|
|
104f570c73 | ||
|
|
e1015c1fe7 | ||
|
|
97e62d5554 | ||
|
|
9aca5b2259 | ||
|
|
b8b47f67d0 | ||
|
|
b5da126b21 | ||
|
|
a7d64957b9 | ||
|
|
f743ef233a | ||
|
|
79176d6053 | ||
|
|
e726e5f170 | ||
|
|
c1a32376db | ||
|
|
6b211d8cd2 | ||
|
|
f3bda010df | ||
|
|
a907751350 | ||
|
|
4ccac96346 | ||
|
|
4ef3352608 | ||
|
|
1f1bd3a51a | ||
|
|
560dfd2a02 | ||
|
|
14f3d7c5cc | ||
|
|
b2293a6cc6 | ||
|
|
766332ac11 | ||
|
|
51f7c5a6ea | ||
|
|
fc0376e257 | ||
|
|
51c568b309 | ||
|
|
2b3784c235 | ||
|
|
2e9f3c4636 | ||
|
|
aac3861773 | ||
|
|
e0162fa745 | ||
|
|
510dc1ecd0 | ||
|
|
563c05e2dc | ||
|
|
a8e3195083 | ||
|
|
643ecd2ed6 | ||
|
|
4435349cc6 | ||
|
|
ec47bb7c81 | ||
|
|
bf50d5b4ac | ||
|
|
94a1183fab | ||
|
|
88401ed449 | ||
|
|
30e4269241 | ||
|
|
59315df637 | ||
|
|
3aa8d3a7f1 | ||
|
|
3659df7d15 | ||
|
|
16f1fdbc8b | ||
|
|
98c1a4900c | ||
|
|
5b6e7c8c65 | ||
|
|
2541f58309 | ||
|
|
6b063f32d9 | ||
|
|
693f2e3625 | ||
|
|
afab06d3f5 | ||
|
|
8fb97c9acd | ||
|
|
7312a38d9e | ||
|
|
475e8d3d1d | ||
|
|
c5f070d5d5 | ||
|
|
1b9e855744 | ||
|
|
f3b2ea53e2 | ||
|
|
ed71769948 | ||
|
|
e1c0a9c416 | ||
|
|
0b8c5413a4 | ||
|
|
c473d53898 | ||
|
|
e8f8249319 | ||
|
|
e2ced802b4 | ||
|
|
9163658aa8 | ||
|
|
d3a15e132d | ||
|
|
47954f114c | ||
|
|
3ef747c8b6 | ||
|
|
75622f1ece | ||
|
|
a052dd6532 | ||
|
|
f96d1af449 | ||
|
|
968766cad8 | ||
|
|
652ae06bad | ||
|
|
5cc2658cff | ||
|
|
ddc38679ce | ||
|
|
2f4335ec2b | ||
|
|
02e0559477 | ||
|
|
ada0e717fa | ||
|
|
2c789c82be | ||
|
|
d143dce03c | ||
|
|
f9d183c209 | ||
|
|
2ab0740785 | ||
|
|
182cd19dea | ||
|
|
61f00386ab | ||
|
|
82f676c633 | ||
|
|
5f24adda77 | ||
|
|
2ae0352b0f | ||
|
|
94805c84d1 | ||
|
|
900f062d1f | ||
|
|
6f2f534b58 | ||
|
|
ba64c2cc8f | ||
|
|
da6c44fc97 | ||
|
|
29e62e487f | ||
|
|
da0d33560f | ||
|
|
ec28f9c12c | ||
|
|
9d19fbc4fc | ||
|
|
4e6480faf8 | ||
|
|
aa5ae4841e | ||
|
|
eb3d68c454 | ||
|
|
c89f31def0 | ||
|
|
ed5fae580e | ||
|
|
d55141ed7a | ||
|
|
a99ce1a574 | ||
|
|
c687a3d5d5 | ||
|
|
dfc3151925 | ||
|
|
0fbffe7a71 | ||
|
|
00dc2d7551 | ||
|
|
037f6e73f1 | ||
|
|
cf82439de8 | ||
|
|
37fcd48f86 | ||
|
|
27346c53b1 | ||
|
|
e2491c45ab | ||
|
|
cf9a88cad7 | ||
|
|
398cd7276f | ||
|
|
4f1cd8324c | ||
|
|
873ddf7c0c | ||
|
|
ed7f1d0bc6 | ||
|
|
4aae637f6c | ||
|
|
f6b9cd7f82 | ||
|
|
8fbb2af392 | ||
|
|
c5aba56c5b | ||
|
|
705d0f5c8d | ||
|
|
fd4ef69913 | ||
|
|
844df66895 | ||
|
|
834ac33a37 | ||
|
|
4e9023f4d2 | ||
|
|
d3a28e8b8d | ||
|
|
0bd71d3b7e | ||
|
|
d97322f0e6 | ||
|
|
b52d512dfa | ||
|
|
a3a2ff4cd9 | ||
|
|
0d5b4f594d | ||
|
|
5a1fd87ec1 | ||
|
|
8c2786fff7 | ||
|
|
8645c415cf | ||
|
|
66ce343361 | ||
|
|
700d86ea18 | ||
|
|
1b9f21fdc8 | ||
|
|
54bbde3c3f | ||
|
|
f3031b106d | ||
|
|
c14b337570 | ||
|
|
e666c4599f | ||
|
|
98cec7fc7b | ||
|
|
fadd2246a0 | ||
|
|
c78b4f1d3d | ||
|
|
6e260c4093 | ||
|
|
33862b90bb | ||
|
|
36bad5cdfd | ||
|
|
54f6451670 | ||
|
|
f19d064087 | ||
|
|
490967195a | ||
|
|
25a1259911 | ||
|
|
606c8048a0 | ||
|
|
e66d863cd0 | ||
|
|
f63f51dc22 | ||
|
|
a069460015 | ||
|
|
4eebab0d22 | ||
|
|
55b12f8641 | ||
|
|
40e5b9abeb | ||
|
|
bc63a2ee0e | ||
|
|
dcfb57c736 | ||
|
|
2ee67f1dad | ||
|
|
4af3184662 | ||
|
|
e31047744a | ||
|
|
f6eba601b0 | ||
|
|
f796dc5c06 | ||
|
|
476f09712c | ||
|
|
50078051bd | ||
|
|
db01746978 | ||
|
|
fe0444b17e | ||
|
|
63b815583b | ||
|
|
16c9148220 | ||
|
|
ca82ac1fee | ||
|
|
9d92486cfb | ||
|
|
aff0542844 | ||
|
|
bb41fdb5ec | ||
|
|
beab098d53 | ||
|
|
3410aa1aa8 | ||
|
|
f50b911a3f | ||
|
|
02b95b7499 | ||
|
|
2a948bd306 | ||
|
|
c4d471552f | ||
|
|
d4e35514ba | ||
|
|
01fc834bc9 | ||
|
|
f7f8d82aaa | ||
|
|
3fd6b9f6d4 | ||
|
|
4f17dfcd75 | ||
|
|
a598524ad6 | ||
|
|
83b4f49c0a | ||
|
|
828ce10ce7 | ||
|
|
8939adbad9 | ||
|
|
60790aff6f | ||
|
|
ff160dba54 | ||
|
|
e19d0ef068 | ||
|
|
f5f7dffdd1 | ||
|
|
fb5b7317a7 | ||
|
|
edd55d08f5 | ||
|
|
457f692eab | ||
|
|
83743ad039 | ||
|
|
163f5b236c | ||
|
|
e077b5452f | ||
|
|
513c01a591 | ||
|
|
d9a2a89a17 | ||
|
|
31939f1544 | ||
|
|
11ce33a71d | ||
|
|
9acef3bbd7 | ||
|
|
164bc7dae8 | ||
|
|
f59c941950 | ||
|
|
0239876511 | ||
|
|
93c929e411 | ||
|
|
c2dac35a02 | ||
|
|
a9cfd20da7 | ||
|
|
727ef76ebd | ||
|
|
22e6c2524e | ||
|
|
bca52f7d4e | ||
|
|
48c36fdb2a | ||
|
|
6d8cbdcb53 | ||
|
|
9b2042fac3 | ||
|
|
54a7ea6f36 | ||
|
|
816d785721 | ||
|
|
742b139f54 | ||
|
|
0e2f5ec2d2 | ||
|
|
3b30121bd9 | ||
|
|
9ee789e6c3 | ||
|
|
8c5e375c8e | ||
|
|
b9d2d20086 | ||
|
|
b9d7ca9748 | ||
|
|
5b194dfbd5 | ||
|
|
7f6af7d9db | ||
|
|
42b2b6a2d5 | ||
|
|
d1465bac90 | ||
|
|
3bbb0212f3 | ||
|
|
a5db6fa576 | ||
|
|
9236b5b013 | ||
|
|
535fba4907 | ||
|
|
7e4140f73f | ||
|
|
1ae0a83bdd | ||
|
|
7ae46c6761 | ||
|
|
d584fd6b66 | ||
|
|
54dbdd9837 | ||
|
|
9d6c32d6d1 | ||
|
|
26851b6b42 | ||
|
|
ea5240a5ed | ||
|
|
ce8a202831 | ||
|
|
eec7968f18 | ||
|
|
0ece1d304d | ||
|
|
1cc087fe4f | ||
|
|
7f0f9f1934 | ||
|
|
040c687ce4 | ||
|
|
8f09a154e3 | ||
|
|
cd1226bc6a | ||
|
|
7a04fdd87f | ||
|
|
4e7566579e | ||
|
|
fba1cfa06d | ||
|
|
138f970e6e | ||
|
|
110c6f72ec | ||
|
|
27f7d430ce | ||
|
|
5964e95c0a | ||
|
|
1a0c1f9052 | ||
|
|
f78ae9c0f2 | ||
|
|
e072e16e92 | ||
|
|
1774e22d6f | ||
|
|
7a79b5601a | ||
|
|
26abc8f01a | ||
|
|
74b0c41e47 | ||
|
|
5924c21608 | ||
|
|
bbfbd4b270 | ||
|
|
c93fbfaebc | ||
|
|
88ec5a637f | ||
|
|
0b1c00abeb | ||
|
|
75fcbb43a7 | ||
|
|
e4e049e489 | ||
|
|
225e35bd36 | ||
|
|
9f81f23742 | ||
|
|
0ae4ad9e9f | ||
|
|
721688c2f8 | ||
|
|
a109220107 | ||
|
|
4a4a04622e | ||
|
|
d6fd88fffd | ||
|
|
e96133e4cf | ||
|
|
f65a75786b | ||
|
|
a157379adc | ||
|
|
1ed3815650 | ||
|
|
0b55368306 | ||
|
|
27310553b1 | ||
|
|
43eb3b0130 | ||
|
|
78490b9cc2 | ||
|
|
0a861ab7f3 | ||
|
|
7b36590b17 | ||
|
|
a8b728445c | ||
|
|
af0f0f3e8f | ||
|
|
86ccb91ddb | ||
|
|
8d570498a2 | ||
|
|
4c771796d5 | ||
|
|
8e4552ed30 | ||
|
|
d6df2b281f | ||
|
|
bc4a5ed341 | ||
|
|
6fcf735497 | ||
|
|
b5f96e8818 | ||
|
|
3ae70939ba | ||
|
|
d5157a6244 | ||
|
|
c433d72593 | ||
|
|
68b42986cb | ||
|
|
57544ee224 | ||
|
|
83b23ed967 | ||
|
|
4342c5c1a0 | ||
|
|
16b1b03543 | ||
|
|
e6526fbf4d | ||
|
|
d07e7c32c2 | ||
|
|
8152d88799 | ||
|
|
8f35294c1b | ||
|
|
4ce4884a5b | ||
|
|
db598fbce2 | ||
|
|
8382ec5d37 | ||
|
|
0998cfaadd | ||
|
|
2bdcfbd7a3 | ||
|
|
c4448f60d6 | ||
|
|
63b6fe2bf6 | ||
|
|
f85b68cd49 | ||
|
|
46b695d850 | ||
|
|
5679bcce07 | ||
|
|
6076f21f5e | ||
|
|
24692fc5d7 | ||
|
|
4390d66179 | ||
|
|
be34231656 | ||
|
|
d678cc07ed | ||
|
|
54e73364f1 | ||
|
|
6dd6da6005 | ||
|
|
c6b220d933 | ||
|
|
03eeb07152 | ||
|
|
1a15c89988 | ||
|
|
d1c5c168b5 | ||
|
|
d0a4bd00b6 | ||
|
|
423b1a840c | ||
|
|
931756b833 | ||
|
|
a47789e849 | ||
|
|
39e76bc454 | ||
|
|
e5b0508a14 | ||
|
|
961b565690 | ||
|
|
c4d00669a0 | ||
|
|
142cdf5ec9 | ||
|
|
d6cab100fa | ||
|
|
81bd0446a9 | ||
|
|
520b76ffd9 | ||
|
|
1e2b14e9ca | ||
|
|
4fe70c7812 | ||
|
|
1c2d141238 | ||
|
|
32e75dd3f0 | ||
|
|
21eb91c79e | ||
|
|
abfc6a3a9b | ||
|
|
5cc5ec1bba | ||
|
|
f80153e20b | ||
|
|
33b34a9d8f | ||
|
|
9b94f215b1 | ||
|
|
8b5bcef798 | ||
|
|
ea17e1f00f | ||
|
|
543105ac17 | ||
|
|
3789284807 | ||
|
|
be9bec9bc7 | ||
|
|
9c35452842 | ||
|
|
69104cdf34 | ||
|
|
dfefdb41f7 | ||
|
|
cd6ab56da0 | ||
|
|
c988c9b839 | ||
|
|
bff8e1dddb | ||
|
|
641e6ef2cb | ||
|
|
9e9e8cb6a8 | ||
|
|
f118514501 | ||
|
|
39c4b7092c | ||
|
|
c7e7fc3ee4 | ||
|
|
786b0075d5 | ||
|
|
fb10590910 | ||
|
|
abf21308d2 | ||
|
|
8c84b677e2 | ||
|
|
d5ef144222 | ||
|
|
741dae576f | ||
|
|
59ade20500 | ||
|
|
c11b9af75e | ||
|
|
08a54f6e6a | ||
|
|
8305477157 | ||
|
|
e8cc7de4f4 | ||
|
|
3b6aa36c77 | ||
|
|
03829b2b47 | ||
|
|
87c9c659de | ||
|
|
751ff1d376 | ||
|
|
d3ae5b1c8a | ||
|
|
0f3879455b | ||
|
|
0c7d61ee0e | ||
|
|
78951e7711 | ||
|
|
9ba4cc007b | ||
|
|
7b5a6c7a62 | ||
|
|
44deca977d | ||
|
|
536b73e78e | ||
|
|
940767b03f | ||
|
|
d4a47a5778 | ||
|
|
b24668626e | ||
|
|
ea3675b5b6 | ||
|
|
c554155b58 | ||
|
|
a1d12daed2 | ||
|
|
6f528cac5a | ||
|
|
10a66ad389 | ||
|
|
9d80973ea1 | ||
|
|
e986704d24 | ||
|
|
ce06265a37 | ||
|
|
e4fb312330 | ||
|
|
439909a068 | ||
|
|
1296e72d1d | ||
|
|
d177e6180d | ||
|
|
f077cf68af | ||
|
|
48f1fa7482 | ||
|
|
a69cc10af1 | ||
|
|
aa9d896b0d | ||
|
|
2dd060d94e | ||
|
|
42a559163d | ||
|
|
546490c00e | ||
|
|
3285eb336c | ||
|
|
409a5de586 | ||
|
|
02da5bcd83 | ||
|
|
84b1e84af1 | ||
|
|
5250725ba5 | ||
|
|
9ed1fa4813 | ||
|
|
500df82a96 | ||
|
|
84d5ad6181 | ||
|
|
96c15b8aad | ||
|
|
4fc2bf07b5 | ||
|
|
e8e0e3716a | ||
|
|
bc441b739b | ||
|
|
2007fe63f8 | ||
|
|
ee435c0d9c | ||
|
|
e6539fe22d | ||
|
|
ba5df66a8b | ||
|
|
12d4e7b8c8 | ||
|
|
3f691235da | ||
|
|
bba2cb3ada | ||
|
|
86a925b27e | ||
|
|
52c4c51f02 | ||
|
|
954d8e4f79 | ||
|
|
767712fa62 | ||
|
|
b575dff21a | ||
|
|
90e8a3102b | ||
|
|
b35ca7b257 | ||
|
|
879650b866 | ||
|
|
176f31ddec | ||
|
|
fe14ee96db | ||
|
|
0102bb94cb | ||
|
|
57376542a0 | ||
|
|
57bc7769b7 | ||
|
|
b8dc9693a7 | ||
|
|
0461b8c90b | ||
|
|
6ac26a5ce5 | ||
|
|
155bd1137e | ||
|
|
f0dc08e656 | ||
|
|
e9ec63961b | ||
|
|
0185803cc2 | ||
|
|
bd8e228d60 | ||
|
|
5c9a9c9c33 | ||
|
|
bad99f6a9d | ||
|
|
63ff3e83fc | ||
|
|
5600a9cba1 | ||
|
|
607ae30be8 | ||
|
|
b4f43344d5 | ||
|
|
c8c5cec1f9 | ||
|
|
37d9503a67 | ||
|
|
66ecdf3bfb | ||
|
|
a1033894d7 | ||
|
|
7841edc9c1 | ||
|
|
132eaa59da | ||
|
|
5562cfaca4 | ||
|
|
0480574310 | ||
|
|
c8252b71b5 | ||
|
|
94949a50aa | ||
|
|
0214893e6a | ||
|
|
5be4a42e99 | ||
|
|
f2aa055ec6 | ||
|
|
62e3163b1b | ||
|
|
8214e74f76 | ||
|
|
542a1b1a2e | ||
|
|
5672e3a321 | ||
|
|
fbbfd86b67 | ||
|
|
d8cbc93585 | ||
|
|
dab0aaa612 | ||
|
|
6fcf1dbc50 | ||
|
|
352df99302 | ||
|
|
5b0b0e98ce | ||
|
|
a3063b37ef | ||
|
|
d5234c7b3a | ||
|
|
cf13eaf1a1 | ||
|
|
77e270d10e | ||
|
|
c893bffae7 | ||
|
|
988e8458ad | ||
|
|
cc811b1d7e | ||
|
|
758f942b88 | ||
|
|
a81d9af7f7 | ||
|
|
26e9724458 | ||
|
|
4879ec7bf3 | ||
|
|
b653327d47 | ||
|
|
4cadedef57 | ||
|
|
27068df7e0 | ||
|
|
b12753dffc | ||
|
|
79221bc265 | ||
|
|
1dc94d4dcc | ||
|
|
5a2485ce12 | ||
|
|
ffa49dc3d9 | ||
|
|
142398d3a7 | ||
|
|
b7bbac72c4 | ||
|
|
c1269c81fd | ||
|
|
6c0118ee8e | ||
|
|
765ca5ea06 | ||
|
|
794a386af3 | ||
|
|
97333eaff7 | ||
|
|
e270cf9c5e | ||
|
|
b088a2d3f9 | ||
|
|
7e38616d1f | ||
|
|
b9447ec1bc | ||
|
|
85d686e723 | ||
|
|
2d3de726c5 | ||
|
|
4989f0599f | ||
|
|
73bec6d4b7 | ||
|
|
e4b52ac353 | ||
|
|
abd22c9c46 | ||
|
|
ba729265a8 | ||
|
|
e4b95737f0 | ||
|
|
9ec1d35f29 | ||
|
|
cf56663fb7 | ||
|
|
c13eba970c | ||
|
|
ea513641d0 | ||
|
|
4309b740ce | ||
|
|
8537943e8b | ||
|
|
a8f5b2ed50 | ||
|
|
33075f229e | ||
|
|
28f573a28d | ||
|
|
e2c9c91b5b | ||
|
|
d42d2d1ab6 | ||
|
|
65b254e8c0 | ||
|
|
82871eaa17 | ||
|
|
24893ca999 | ||
|
|
c0d4f622eb | ||
|
|
27a9bf17c7 | ||
|
|
37c660ff9b | ||
|
|
a004b06237 | ||
|
|
98eab43915 | ||
|
|
772ec4135c | ||
|
|
ef03883edd | ||
|
|
0e9035ac98 | ||
|
|
636631cdd5 | ||
|
|
4e5d3a7f98 | ||
|
|
02ff8c1b66 | ||
|
|
379e568950 | ||
|
|
c09a297892 | ||
|
|
0b0be7a381 | ||
|
|
2619676256 | ||
|
|
33cc07f79a | ||
|
|
83df7b20c4 | ||
|
|
c029841e36 | ||
|
|
90c60eee9d | ||
|
|
bfa3555081 | ||
|
|
8e1e238219 | ||
|
|
5d780babe3 | ||
|
|
88c1fec923 | ||
|
|
5cd48abf9f | ||
|
|
981469c80d | ||
|
|
db5006df04 | ||
|
|
b5a4fd98a5 | ||
|
|
3d6a84c42a | ||
|
|
bd573ee31a | ||
|
|
5fe11c7533 | ||
|
|
20dc821092 | ||
|
|
a1d57849b3 | ||
|
|
0b13e9f055 | ||
|
|
6d85cd36e2 | ||
|
|
96f7065f63 | ||
|
|
f3c22ef10d | ||
|
|
a85bef1899 | ||
|
|
bb3e67f315 | ||
|
|
10ac28e26d | ||
|
|
c0a93e31ab | ||
|
|
8f94b2010f | ||
|
|
2e60ea7634 | ||
|
|
d48e6a47bd | ||
|
|
4e78074b39 | ||
|
|
40b676aa4f | ||
|
|
b637670f03 | ||
|
|
bd1217a176 | ||
|
|
7e4e392b07 | ||
|
|
da45180de4 | ||
|
|
82516e3baf | ||
|
|
c1862f9136 | ||
|
|
30e3c99d9f | ||
|
|
9048c7245b | ||
|
|
02bf9a151a | ||
|
|
0f618d0576 | ||
|
|
d3b5cb5343 | ||
|
|
624feae8af | ||
|
|
246f2b016b | ||
|
|
97e6bf6b22 | ||
|
|
04da4558dd | ||
|
|
118204f9a7 | ||
|
|
60d16c258a | ||
|
|
0c3426da86 | ||
|
|
9b3f03d5a2 | ||
|
|
9abff96b2f | ||
|
|
c56dbabcfd | ||
|
|
30167ace51 | ||
|
|
722d17cbac | ||
|
|
b01db3b279 | ||
|
|
59b846c515 | ||
|
|
2af5880cfd | ||
|
|
42bf2a5cdc | ||
|
|
80bcbaa02f | ||
|
|
ff3fa159d0 | ||
|
|
7c4e24af38 | ||
|
|
726c223143 | ||
|
|
c440333535 | ||
|
|
5322333b7b | ||
|
|
59ae8c9419 | ||
|
|
e98823d847 | ||
|
|
0bdd2da5d2 | ||
|
|
d87a127837 | ||
|
|
2f09524501 | ||
|
|
06492aef01 | ||
|
|
0062e618f0 | ||
|
|
c00cee00fd | ||
|
|
8228f302dd | ||
|
|
018c56fdca | ||
|
|
282382cc14 | ||
|
|
d745af4b0c | ||
|
|
44ea41cfff | ||
|
|
acad5755a2 | ||
|
|
0a3aece096 | ||
|
|
bc35d57932 | ||
|
|
28b958f732 | ||
|
|
dd1a3c26ba | ||
|
|
4e59cd3bb6 | ||
|
|
5f988984e4 | ||
|
|
0748cdc7f1 | ||
|
|
a74333f905 | ||
|
|
365e14622a | ||
|
|
8ec16ce711 | ||
|
|
b2c71c489d | ||
|
|
0e4aa0d2d2 | ||
|
|
08cb96bba2 | ||
|
|
2ce906cee7 | ||
|
|
23b1ff0970 | ||
|
|
c2777386fc | ||
|
|
cdc5b4a41e | ||
|
|
52e5e5c2ba | ||
|
|
7a48984dd5 | ||
|
|
c653b56937 | ||
|
|
96f2552c8a | ||
|
|
04aff67de4 | ||
|
|
e5658b9331 | ||
|
|
ac2336adb0 | ||
|
|
1a6356b2ca | ||
|
|
b05645902a | ||
|
|
5da8738fea | ||
|
|
54d4f8c320 | ||
|
|
f9f6c92c52 | ||
|
|
98753dd088 | ||
|
|
c76153f31d | ||
|
|
881cb8b108 | ||
|
|
8cbb91c857 | ||
|
|
66bca12856 | ||
|
|
aaae0aa48b | ||
|
|
256c5769b4 | ||
|
|
0535d3b25f | ||
|
|
b36ea7636b | ||
|
|
62be003150 | ||
|
|
1f7238a434 | ||
|
|
364c7cd621 | ||
|
|
9d5390a049 | ||
|
|
bda2fa364d | ||
|
|
2944c9c665 | ||
|
|
129bd04329 | ||
|
|
caa7b2ad4f | ||
|
|
c14b4d6b38 | ||
|
|
a6816db813 | ||
|
|
1d76d78858 | ||
|
|
0382c95e4d | ||
|
|
fb70607064 | ||
|
|
fda20f08d0 | ||
|
|
959ba907df | ||
|
|
afd41c9fc7 | ||
|
|
dfc3b51e78 | ||
|
|
2964ba8c6a | ||
|
|
7f2e024e78 | ||
|
|
c0cc5c3059 | ||
|
|
193e764c0b | ||
|
|
6b20c70b52 | ||
|
|
e68cb95d84 | ||
|
|
448666239c | ||
|
|
69c5d47bd4 | ||
|
|
c0ac323360 | ||
|
|
daf5fafced | ||
|
|
a0cd3ca62b | ||
|
|
fa47b4d8b8 | ||
|
|
4a9476dd8d | ||
|
|
661ef5eead | ||
|
|
8d2511688d | ||
|
|
d38ef273cc | ||
|
|
969511d2cb | ||
|
|
989f48d8c1 | ||
|
|
85ca752e33 | ||
|
|
f8ea5cb579 | ||
|
|
17244d193b | ||
|
|
360e506710 | ||
|
|
09ad2458b8 | ||
|
|
df77232bdc | ||
|
|
2ae5bd9bb6 | ||
|
|
ad200a864e | ||
|
|
9d1b5614f9 | ||
|
|
416b19c6fc | ||
|
|
5b7249f302 | ||
|
|
8ce7348625 | ||
|
|
699543e4a2 | ||
|
|
4309c4ad46 | ||
|
|
3f1cbad2e7 | ||
|
|
4ebb5293fc | ||
|
|
2814c62915 | ||
|
|
876e96fdbf | ||
|
|
e78a012305 | ||
|
|
f68843e3d7 | ||
|
|
19a97a1df0 | ||
|
|
72997517b0 | ||
|
|
2a9fca82d2 | ||
|
|
55b1516770 | ||
|
|
3cc9a89dda | ||
|
|
4d1e5535b2 | ||
|
|
46a0d4fbcb | ||
|
|
04945fda66 | ||
|
|
1954767b45 | ||
|
|
97e2e71ef9 | ||
|
|
0bc81d5135 | ||
|
|
c8a647846c | ||
|
|
90ce14cd84 | ||
|
|
28e276f139 | ||
|
|
f22e1e4dd2 | ||
|
|
e0d769caa2 | ||
|
|
4a37c48789 | ||
|
|
ad492c3601 | ||
|
|
6983b4615c | ||
|
|
0c055b201e | ||
|
|
339e4dd3ef | ||
|
|
d57084f235 | ||
|
|
7eed0fc041 | ||
|
|
7a1c6aa2a3 | ||
|
|
4a2e36b19e | ||
|
|
1c2018f37f | ||
|
|
948dcdb81b | ||
|
|
08101d72ce | ||
|
|
04572965ea | ||
|
|
1832f5e751 | ||
|
|
75c4028585 | ||
|
|
85f258d1c2 | ||
|
|
d3f56a69fb | ||
|
|
bfbc667397 | ||
|
|
49be7042dc | ||
|
|
44fcd3ef3e | ||
|
|
cb284033f5 | ||
|
|
21cde7a41c | ||
|
|
ef9d3a10c3 | ||
|
|
8598289936 | ||
|
|
20c9a50710 | ||
|
|
35dde7480f | ||
|
|
5e42f9ab46 | ||
|
|
7acf00a633 | ||
|
|
69339d254b | ||
|
|
ec517d25e8 | ||
|
|
5b9aa0e474 | ||
|
|
475cc45a61 | ||
|
|
21fa937c9f | ||
|
|
bae500aa21 | ||
|
|
5534b7f133 | ||
|
|
163d6401c5 | ||
|
|
fc24169eaf | ||
|
|
ce9b1b0573 | ||
|
|
0a2407a851 | ||
|
|
0c78046356 | ||
|
|
4b8e01a22f | ||
|
|
76a03d568e | ||
|
|
a882c80e6f | ||
|
|
7c03f26393 | ||
|
|
5de00c254d | ||
|
|
9ff9e406ea | ||
|
|
d7b612e737 | ||
|
|
b5beb13abb | ||
|
|
d95b69b32c | ||
|
|
ceb12d3074 | ||
|
|
1dbfa26b5a | ||
|
|
59c0dd56ab | ||
|
|
342a584c2b | ||
|
|
dcf19c173c | ||
|
|
718d8a931d | ||
|
|
e235000169 | ||
|
|
39db27cb83 | ||
|
|
821951b851 | ||
|
|
cc81432b5b | ||
|
|
35ba1f17dc | ||
|
|
ea8e0cc7c2 | ||
|
|
c71414b3a9 | ||
|
|
542e010aa5 | ||
|
|
cb661c56b0 | ||
|
|
84ce9aa177 | ||
|
|
e904bd0ddc | ||
|
|
4c94c028a7 | ||
|
|
e9883d285d | ||
|
|
88a908e50d | ||
|
|
8d6ad9e39d | ||
|
|
d7de7bcf3e | ||
|
|
aa18245f7e | ||
|
|
316bfb77b5 | ||
|
|
cbdda5cc87 | ||
|
|
4e356d9876 | ||
|
|
9b58214e4a | ||
|
|
ff3ab1699b | ||
|
|
3c801fa460 | ||
|
|
8eeefabf32 | ||
|
|
1c9202004b | ||
|
|
1004c99c29 | ||
|
|
214b8b998a | ||
|
|
2ef9e7efe6 | ||
|
|
c9ecb1edd8 | ||
|
|
449598e723 | ||
|
|
8baf5fdca0 | ||
|
|
5201cb5acb | ||
|
|
aafafa314d | ||
|
|
ab79ac44d5 | ||
|
|
49e42a1f60 | ||
|
|
e286dfe6ed | ||
|
|
9cd16b1dea | ||
|
|
17e3b273e6 | ||
|
|
12cd28258d | ||
|
|
c93c8d1123 | ||
|
|
9564997222 | ||
|
|
f968059c67 | ||
|
|
d5bf2e06b3 | ||
|
|
0b900a5e93 | ||
|
|
09867a47a4 | ||
|
|
bbd6c8bd16 | ||
|
|
00f76ad0df | ||
|
|
9d5c42b61b | ||
|
|
4b70367430 | ||
|
|
8e7a8b68d2 | ||
|
|
ce9cbfc815 | ||
|
|
4d625031a5 | ||
|
|
26a60b2eb0 | ||
|
|
07d09fdb66 | ||
|
|
a92a9f02fb | ||
|
|
b65d3741b3 | ||
|
|
fcf8f4d453 | ||
|
|
13617646da | ||
|
|
4553ed276b | ||
|
|
7a3565009e | ||
|
|
62966f3829 | ||
|
|
c445142505 | ||
|
|
9f3864fde3 | ||
|
|
db186beee4 | ||
|
|
1f1a32541f | ||
|
|
f70ddce761 | ||
|
|
0465313e70 | ||
|
|
e29246cb17 | ||
|
|
8d2563f136 | ||
|
|
146e6776f5 | ||
|
|
21996c6d8e | ||
|
|
fcc5349156 | ||
|
|
a45051fbfc | ||
|
|
1a07628209 | ||
|
|
814af7e175 | ||
|
|
ec9f67f610 | ||
|
|
bf683ec609 | ||
|
|
30c08f2e3d | ||
|
|
e851895f04 | ||
|
|
9f100cf344 | ||
|
|
a5a01e9051 | ||
|
|
6be4688bdc | ||
|
|
a2049ba394 | ||
|
|
717c5cdcc7 | ||
|
|
a8239afc86 | ||
|
|
bb38cd49e4 | ||
|
|
0654bba39f | ||
|
|
4d77d5b316 | ||
|
|
1cbdbcd587 | ||
|
|
7e201e9f73 | ||
|
|
2f98abbcb6 | ||
|
|
270fa8aeda | ||
|
|
9fc866c5eb | ||
|
|
4329db3726 | ||
|
|
6f7ac8e1b0 | ||
|
|
b0e88fb11b | ||
|
|
04c71cd725 | ||
|
|
a1457874c6 | ||
|
|
d64b16ab25 | ||
|
|
18be6c4116 | ||
|
|
f30b793779 | ||
|
|
dad1535f7a | ||
|
|
f60e6604b8 | ||
|
|
94ea9c84c5 | ||
|
|
0d3f2ccb62 | ||
|
|
5c72869563 | ||
|
|
14676ffcd6 | ||
|
|
e5a08ce44d | ||
|
|
712419b73a | ||
|
|
b9b6e14b4a | ||
|
|
7627efc92f | ||
|
|
442d42300b | ||
|
|
cd7f458e28 | ||
|
|
75e1c74724 | ||
|
|
ea01493df0 | ||
|
|
5db2b5e573 | ||
|
|
323edf1908 | ||
|
|
005ef84c5d | ||
|
|
f92570f00a | ||
|
|
9314e366c8 | ||
|
|
ba9cf37d59 | ||
|
|
b22c7a1cfb | ||
|
|
99efc0f50f | ||
|
|
d979d09ccc | ||
|
|
2581aacd52 | ||
|
|
c17810b087 | ||
|
|
e0b2073fd4 | ||
|
|
123e5dfc3a | ||
|
|
533a0c4ce7 | ||
|
|
0edad88a31 | ||
|
|
4ccfe5f49b | ||
|
|
e189872486 | ||
|
|
fdaea9ed2e | ||
|
|
5daec7ea0e | ||
|
|
e9224c7177 | ||
|
|
e90e719739 | ||
|
|
7ba666fa0e | ||
|
|
86a62cf15c | ||
|
|
b11405723d | ||
|
|
4c3a2b4f8a | ||
|
|
93f3decc4f | ||
|
|
bbf8198feb | ||
|
|
1c799131ae | ||
|
|
b1d4b48d39 | ||
|
|
bed4559052 | ||
|
|
3dda0dd2a2 | ||
|
|
7f87c1c0fc | ||
|
|
fa63a98ad8 | ||
|
|
1fc73fef48 | ||
|
|
aaf7b47abe | ||
|
|
af0b30e77c | ||
|
|
90543bd07a | ||
|
|
9494e3cc40 | ||
|
|
a272f7eb08 | ||
|
|
43ecece595 | ||
|
|
b3dd9f3bb5 | ||
|
|
4ba8cabf62 | ||
|
|
bb9104f0ee | ||
|
|
f68bb3c51f | ||
|
|
6d4ac67ac1 | ||
|
|
ae0b7667a9 | ||
|
|
b84d5b72f1 | ||
|
|
8cbccedf7c | ||
|
|
fabf7d3a67 | ||
|
|
1c24347062 | ||
|
|
54307ce955 | ||
|
|
9ef888130d | ||
|
|
2589b74fd8 | ||
|
|
4387f47832 | ||
|
|
d9090acdfb | ||
|
|
38d6e4bb50 | ||
|
|
ced621e3c2 | ||
|
|
72951df799 | ||
|
|
85940ea8ea | ||
|
|
a9b41af71c | ||
|
|
439ae4d398 | ||
|
|
a0ed612fef | ||
|
|
4fbe40c54f | ||
|
|
afdec73ca5 | ||
|
|
578ca7e4cd | ||
|
|
7e8c30b589 | ||
|
|
2b32b28191 | ||
|
|
532215f2db | ||
|
|
2e70cb6506 | ||
|
|
1794904a4a | ||
|
|
5319be4438 | ||
|
|
fd28279a62 | ||
|
|
f7a3e73ef6 | ||
|
|
6b27ae1d94 | ||
|
|
ff3345cb72 | ||
|
|
a6ee8fe26a | ||
|
|
716b2079dc | ||
|
|
e7b6228fd3 | ||
|
|
e758ce69a3 | ||
|
|
2053c43de2 | ||
|
|
38b085902f | ||
|
|
27498a3330 | ||
|
|
1c3e4a3660 | ||
|
|
49cd4b7316 | ||
|
|
4707991520 | ||
|
|
a067cba35b | ||
|
|
7a1f92fdc3 | ||
|
|
2905015c6e | ||
|
|
610abd4c52 | ||
|
|
e7a285694e | ||
|
|
6ab285bf4c | ||
|
|
ddc6ea162f | ||
|
|
1d3159bcca | ||
|
|
f60ceb54eb | ||
|
|
b8804bf15d | ||
|
|
0f995b2f40 | ||
|
|
d03ad453a5 | ||
|
|
848f735ae4 | ||
|
|
3f71579dfc | ||
|
|
a678430602 | ||
|
|
f217439ee2 | ||
|
|
e9b553dac1 | ||
|
|
9d8f3cfb7f | ||
|
|
d5c79928ef | ||
|
|
db3758923b | ||
|
|
37529750e2 | ||
|
|
5e4a75e79f | ||
|
|
c9ea7400b4 | ||
|
|
43d601641f | ||
|
|
9fa15b6ff8 | ||
|
|
55f78baf32 | ||
|
|
9c44ebc1e2 | ||
|
|
6c359479d7 | ||
|
|
75e3026a14 | ||
|
|
4579924b7e | ||
|
|
2047bda6fb | ||
|
|
406c6f6962 | ||
|
|
0a3af9a403 | ||
|
|
3a08cf3bfb | ||
|
|
df29cc8f77 | ||
|
|
ec7164133d | ||
|
|
8826087a97 | ||
|
|
8aa09a245c | ||
|
|
ba8ad07490 | ||
|
|
17582ccf21 | ||
|
|
a5fd84de41 | ||
|
|
31be2daa06 | ||
|
|
dc199cfaa2 | ||
|
|
de868e0b94 | ||
|
|
b81ef84227 | ||
|
|
15994b034a | ||
|
|
922fa76e26 | ||
|
|
19aa370573 | ||
|
|
d020e701bb | ||
|
|
91203a9482 | ||
|
|
364ff369d1 | ||
|
|
134fea9d0f | ||
|
|
8a09b3866a | ||
|
|
137445140b | ||
|
|
6a8afe2201 | ||
|
|
a153c46d7f | ||
|
|
1e3a9b650f | ||
|
|
8faad520ae | ||
|
|
229dc0ee31 | ||
|
|
fcc764639d | ||
|
|
8f89ae928b | ||
|
|
821385ad00 | ||
|
|
782ded56e5 | ||
|
|
25ff76d565 | ||
|
|
8e458d52b5 | ||
|
|
1f475c1f6f | ||
|
|
bc9867e672 | ||
|
|
9801fb61d0 | ||
|
|
20199ca809 | ||
|
|
711f1a3c26 | ||
|
|
412fd4708d | ||
|
|
a1d85309ee | ||
|
|
273c624442 | ||
|
|
450cee5c3a | ||
|
|
a2dbcf3644 | ||
|
|
4663355496 | ||
|
|
8b591c2f8e | ||
|
|
9dc610495c | ||
|
|
8f4a23e3b7 | ||
|
|
055076cd4f | ||
|
|
c83d8e2ba6 | ||
|
|
527497a722 | ||
|
|
32d21c1ef6 | ||
|
|
6afc70be84 | ||
|
|
f503c2c9e6 | ||
|
|
629b58b7fb | ||
|
|
7656893d51 | ||
|
|
7fa2a81d34 | ||
|
|
ff38d68237 | ||
|
|
7f66ab4783 | ||
|
|
95189389b0 | ||
|
|
aff3e60754 | ||
|
|
8196d87371 | ||
|
|
b4b82ab465 | ||
|
|
61b1ad197a | ||
|
|
89618e7a0d | ||
|
|
293bb4b1b8 | ||
|
|
b87e2576b5 | ||
|
|
29ca164513 | ||
|
|
97d58eadbf | ||
|
|
0bf23d9b20 | ||
|
|
813f256783 | ||
|
|
8cdeec9f54 | ||
|
|
bfa96bc20e | ||
|
|
082cd4e564 | ||
|
|
6f17f16fd5 | ||
|
|
2115a89212 | ||
|
|
84034f7aec | ||
|
|
acce40c585 | ||
|
|
af3ec1e24e | ||
|
|
6dc78bf7e8 | ||
|
|
f275683ae8 | ||
|
|
ce4f169ff9 | ||
|
|
c566205319 | ||
|
|
da91e37d37 | ||
|
|
2758c44398 | ||
|
|
eaf6c61c9f | ||
|
|
4e056a2894 | ||
|
|
4c53d11d7f | ||
|
|
f60b017da8 | ||
|
|
1d647444e3 | ||
|
|
08634f1156 | ||
|
|
c1eeb6078f | ||
|
|
a50d6a801f | ||
|
|
953db08416 | ||
|
|
0439a5a8a7 | ||
|
|
0a5942093e | ||
|
|
d78254aa28 | ||
|
|
af67804bef | ||
|
|
8ffe66b4ce | ||
|
|
d62ec8362a | ||
|
|
35a6db8640 | ||
|
|
56dc24d483 | ||
|
|
84d828ab70 | ||
|
|
259b33d5a3 | ||
|
|
cfae3d94e9 | ||
|
|
6393c09cda | ||
|
|
9421f1ab9c | ||
|
|
b9c23cca01 | ||
|
|
5bf0d0ea1e | ||
|
|
c863201780 | ||
|
|
cb21d001c9 | ||
|
|
769f74b818 | ||
|
|
c7faede37b | ||
|
|
64051a3a71 | ||
|
|
d4e573f305 | ||
|
|
8260eded07 | ||
|
|
e20afbb340 | ||
|
|
2b2ab52354 | ||
|
|
402b4a784d | ||
|
|
651e7ddf7e | ||
|
|
40bace2da6 | ||
|
|
8d6e60486f | ||
|
|
1f30946481 | ||
|
|
e89c82f549 | ||
|
|
b1697f189b | ||
|
|
812d100d06 | ||
|
|
17a202add7 | ||
|
|
b759742352 | ||
|
|
3bd16a8902 | ||
|
|
555d75252a | ||
|
|
eaad02a747 | ||
|
|
475e4d23bd | ||
|
|
bf4ae6dcfa | ||
|
|
97101fafd5 | ||
|
|
17d4f07658 | ||
|
|
403f1bdc70 | ||
|
|
5ec797f263 | ||
|
|
d574d83993 | ||
|
|
83411793b6 | ||
|
|
5b1aea7afe | ||
|
|
65caee44ff | ||
|
|
327e113775 | ||
|
|
58f3009aba | ||
|
|
738554331b | ||
|
|
b193f29a9b | ||
|
|
3f083ef0eb | ||
|
|
17ed6c06a7 | ||
|
|
c112323dd5 | ||
|
|
0709385d3c | ||
|
|
7ab58bf012 | ||
|
|
54a656ef08 | ||
|
|
8f797f14b8 | ||
|
|
cd10ba9c39 | ||
|
|
c0d64de660 | ||
|
|
96a3369c4a | ||
|
|
c1ce8cf3b8 | ||
|
|
e8ad570e3f | ||
|
|
ad1ddf413c | ||
|
|
2d780dfd81 | ||
|
|
b6fee5c2fb | ||
|
|
e2c2152be9 | ||
|
|
10fa047622 | ||
|
|
919b2a9673 | ||
|
|
024a20905d | ||
|
|
04f0a6ba39 | ||
|
|
eb43641dd3 | ||
|
|
69ba8a00ad | ||
|
|
f6a0c4f853 | ||
|
|
040ade9bee | ||
|
|
d479dc1d02 | ||
|
|
7fb8d254fe | ||
|
|
c99935e32c | ||
|
|
2232e262bf | ||
|
|
137e7e3aa1 | ||
|
|
ba36b61d3d | ||
|
|
ccb13ded84 | ||
|
|
46ce790727 | ||
|
|
9ea1b87862 | ||
|
|
9831d941ca | ||
|
|
707ceb29e0 | ||
|
|
688cf84d1f | ||
|
|
3d470fc7b7 | ||
|
|
69ce48c307 | ||
|
|
edb7b28a00 | ||
|
|
06b7c8d5ba | ||
|
|
c4efde7403 | ||
|
|
a1edc87664 | ||
|
|
6722b62b36 | ||
|
|
7d80b27949 | ||
|
|
9cbc3356e7 | ||
|
|
d742bd882e | ||
|
|
97a06ad9ef | ||
|
|
756b9a0046 | ||
|
|
9161c2ff51 | ||
|
|
96c930dd2f | ||
|
|
21f8cf65e6 | ||
|
|
8bcc049399 | ||
|
|
95900b8592 | ||
|
|
c81a15099a | ||
|
|
20a50cb517 | ||
|
|
a8c125550c | ||
|
|
3782350c14 | ||
|
|
a71a482250 | ||
|
|
d6257073aa | ||
|
|
8b6ee018c2 | ||
|
|
ddff68bee7 | ||
|
|
ddab3c9327 | ||
|
|
491659c436 | ||
|
|
6a9a7ff259 | ||
|
|
8d6fc30bc7 | ||
|
|
56824b9658 | ||
|
|
f7cd5462c9 | ||
|
|
892e9625d3 | ||
|
|
e2916b2540 | ||
|
|
d268511c84 | ||
|
|
1810d2088e | ||
|
|
d618f703ec | ||
|
|
190467767e | ||
|
|
896e4fef30 | ||
|
|
8d699c8c93 | ||
|
|
38c7271a39 | ||
|
|
e2a93e38d6 | ||
|
|
5e3247d8bc | ||
|
|
41c2fb962c | ||
|
|
b53e44e572 | ||
|
|
e5f4d8279d | ||
|
|
455bacd4d3 | ||
|
|
86e8b56ac4 | ||
|
|
e85cbdad7a | ||
|
|
bff1567623 | ||
|
|
db199abd9e | ||
|
|
b6d0defb98 | ||
|
|
c752563e43 | ||
|
|
ad22b914d6 | ||
|
|
f216fae545 | ||
|
|
242823c9bc | ||
|
|
0eae6cd5f2 | ||
|
|
40efa67248 | ||
|
|
0bf707e346 | ||
|
|
769fedc3ad | ||
|
|
9c3db400dc | ||
|
|
96a2c35d91 | ||
|
|
d9ec9d990f | ||
|
|
f9fde13590 | ||
|
|
74174b9d05 | ||
|
|
b5148cf1f7 | ||
|
|
90a617e050 | ||
|
|
259cdf2af9 | ||
|
|
6c950e0dc9 | ||
|
|
62dd6f161a | ||
|
|
6aba658cd8 | ||
|
|
89eda1fc01 | ||
|
|
accb0c6edb | ||
|
|
bbec79a0c1 | ||
|
|
e0db2eed8d | ||
|
|
6f7ba4be1f | ||
|
|
2ccb522c5b | ||
|
|
00a357ab20 | ||
|
|
8ee4845b65 | ||
|
|
19b8d06a79 | ||
|
|
5c6bf03117 | ||
|
|
f72ed6153b | ||
|
|
0bf76767b0 | ||
|
|
d652a0957f | ||
|
|
fbcd27907b | ||
|
|
a551bea52e | ||
|
|
6cb686208e | ||
|
|
732c9fe179 | ||
|
|
bd1fb77245 | ||
|
|
d610d27f30 | ||
|
|
4f99ab58f7 | ||
|
|
339abc9bd9 | ||
|
|
4407fbc2d4 | ||
|
|
96b35c9e26 | ||
|
|
27f08d6d48 | ||
|
|
907a8f1e6e | ||
|
|
e1c191fe44 | ||
|
|
a9e0953900 | ||
|
|
9597027693 | ||
|
|
5aa3429c5d | ||
|
|
ffd418f217 | ||
|
|
78f41a4e89 | ||
|
|
76dcae8020 | ||
|
|
0711be1696 | ||
|
|
190ef122b2 | ||
|
|
7521ab3d0b | ||
|
|
0587ec2645 | ||
|
|
b76d66fbf6 | ||
|
|
06f851f721 | ||
|
|
f6661d391c | ||
|
|
284b216b3a | ||
|
|
dc74e7d5d7 | ||
|
|
3d76ceddff | ||
|
|
05dbe6ee1f | ||
|
|
871d0f5126 | ||
|
|
5be1264b7e | ||
|
|
b963f807be | ||
|
|
314c667050 | ||
|
|
005bbb52ff | ||
|
|
28c8a911bd | ||
|
|
a690102da2 | ||
|
|
437d1ed49f | ||
|
|
12fd8be2c4 | ||
|
|
8258f7b361 | ||
|
|
e15ea3d9e1 | ||
|
|
09db11783d | ||
|
|
677532629d | ||
|
|
f6733ae577 | ||
|
|
57d8ff79b2 | ||
|
|
2d2ca3aab1 | ||
|
|
cfc7620572 | ||
|
|
4b14ed760d | ||
|
|
79a6260a11 | ||
|
|
a0bf8f2008 | ||
|
|
408bf2f0c4 | ||
|
|
874fee478c | ||
|
|
90d9a69bb1 | ||
|
|
9a01bc0732 | ||
|
|
4006c56036 | ||
|
|
dbcc560717 | ||
|
|
1729588435 | ||
|
|
6f7c2cb31e | ||
|
|
a4629f4136 | ||
|
|
449d39f41c | ||
|
|
56b5f687e4 | ||
|
|
caa4f47f61 | ||
|
|
36757b4438 | ||
|
|
75871dda4b | ||
|
|
506fec1a95 | ||
|
|
aae329c447 | ||
|
|
02acf1409e | ||
|
|
6ac3309c74 | ||
|
|
1b15cfa11d | ||
|
|
76dfca879f | ||
|
|
7cdc7bacea | ||
|
|
fbd78b5c08 | ||
|
|
fbcd0da597 | ||
|
|
665dc3924d | ||
|
|
4bdacff25b | ||
|
|
ecd45314b8 | ||
|
|
3e06fb754e | ||
|
|
84236041c1 | ||
|
|
b2e20a31ea | ||
|
|
38e19a4220 | ||
|
|
f28164fefd | ||
|
|
8d44d96ec3 | ||
|
|
2eaabb718b | ||
|
|
5572f482e7 | ||
|
|
707e098687 | ||
|
|
729f0a277e | ||
|
|
88de74ad83 | ||
|
|
c55d759168 | ||
|
|
97b8718f15 | ||
|
|
b7910992d8 | ||
|
|
cf3b8b52f1 | ||
|
|
388a6f937f | ||
|
|
42b06fbaca | ||
|
|
a61050ad96 | ||
|
|
2245cd87d4 | ||
|
|
c199837c54 | ||
|
|
83699c4784 | ||
|
|
30afcc072a | ||
|
|
baaeac3036 | ||
|
|
832f9304fd | ||
|
|
fa4bde98d2 | ||
|
|
d19370b617 | ||
|
|
ca80756c70 | ||
|
|
8376acbf7f | ||
|
|
ef0baf60aa | ||
|
|
12a2ff9625 | ||
|
|
7ba3a4c3d2 | ||
|
|
29e48c18b7 | ||
|
|
292a217b51 | ||
|
|
982dfb7d10 | ||
|
|
104117c5e7 | ||
|
|
7ab3c662e3 | ||
|
|
8c4b69d3ab | ||
|
|
4fd5e85a18 | ||
|
|
0e2cc42cfb | ||
|
|
e9a9211e75 | ||
|
|
1e5c205ccb | ||
|
|
4c82171a8e | ||
|
|
88c80b3e75 | ||
|
|
d438845ac8 | ||
|
|
b1d495b2c4 | ||
|
|
27bad5ad3d | ||
|
|
6b7a46b721 | ||
|
|
6a89a25c27 | ||
|
|
001ab3abad | ||
|
|
ff90d659e6 | ||
|
|
ec8ad2bb96 | ||
|
|
8f841c70c4 | ||
|
|
5fbb02fcb1 | ||
|
|
4e1b50e219 | ||
|
|
052c0f276e | ||
|
|
d7b2342a6a | ||
|
|
7e9db7cefc | ||
|
|
d30e4c5b0b | ||
|
|
9de6bb8abc | ||
|
|
72e04bd13f | ||
|
|
4ec0448122 | ||
|
|
842d8e209b | ||
|
|
292fcd5c7b | ||
|
|
74e3931f84 | ||
|
|
12dadc555f | ||
|
|
1e7e392419 | ||
|
|
b75b2225e5 | ||
|
|
12f27bd414 | ||
|
|
e11b82c337 | ||
|
|
69deec58fb | ||
|
|
1e976bdc46 | ||
|
|
9946fceb9d | ||
|
|
6fed88113b | ||
|
|
04ad43af9e | ||
|
|
97ebe047d0 | ||
|
|
fc6a6a1030 | ||
|
|
3d840c827f | ||
|
|
a2a1a04e53 | ||
|
|
f86abc2e80 | ||
|
|
227aec9a0f | ||
|
|
7104c376ae | ||
|
|
b0165ce439 | ||
|
|
0638ced5cc | ||
|
|
3c8756f024 | ||
|
|
e984b2af64 | ||
|
|
70e96dcf59 | ||
|
|
2c696b2ddc | ||
|
|
1801bc0658 | ||
|
|
ebbad107bf | ||
|
|
9a48b07ee4 | ||
|
|
230fd6b7b6 | ||
|
|
20b33a015f | ||
|
|
293d5082c7 | ||
|
|
fc0ab2eac2 | ||
|
|
64cb996206 | ||
|
|
929f116733 | ||
|
|
ba5ba5490d | ||
|
|
413f2b2247 | ||
|
|
b8565a9af9 | ||
|
|
fbf4c7b4f1 | ||
|
|
99542d8763 | ||
|
|
94960c8421 | ||
|
|
b3c1d18d03 | ||
|
|
6859cf7459 | ||
|
|
6c8aec60ca | ||
|
|
2018681b33 | ||
|
|
c0ca52952e | ||
|
|
e204516178 | ||
|
|
39d727d0c3 | ||
|
|
153aecf91a | ||
|
|
6319853811 | ||
|
|
cd98ab6491 | ||
|
|
6b3a385f85 | ||
|
|
b3823ac64b | ||
|
|
27a80b7906 | ||
|
|
5d9470ff8e | ||
|
|
4e33db9a3f | ||
|
|
e78f137899 | ||
|
|
ca9a114f7a | ||
|
|
40e66398db | ||
|
|
ce1dc2e9b2 | ||
|
|
b4b62004a6 | ||
|
|
6e32d0a74b | ||
|
|
f7eb95852c | ||
|
|
a4f53a1c73 | ||
|
|
a90ae02454 | ||
|
|
4c8f79a33e | ||
|
|
7cc6ec7af7 | ||
|
|
c2bbf275b2 | ||
|
|
9226e2187c | ||
|
|
12a296edfc | ||
|
|
48921e00fc | ||
|
|
e696a05791 | ||
|
|
f804930150 | ||
|
|
3403caf3da | ||
|
|
4a13e4b36c | ||
|
|
b7fb041f31 | ||
|
|
ba11121731 | ||
|
|
ed5e37c309 | ||
|
|
65b1d31df5 | ||
|
|
a98beb3a2d | ||
|
|
b499ed06d2 | ||
|
|
f627c159b1 | ||
|
|
6ff7c95843 | ||
|
|
535cedf136 | ||
|
|
3a00964dd3 | ||
|
|
41cc7096b8 | ||
|
|
c237de058f | ||
|
|
e2aeb8174b | ||
|
|
34f1f2a81c | ||
|
|
c96f0fd2d1 | ||
|
|
8aefe253a7 | ||
|
|
7e31164ae0 | ||
|
|
ad55f581f9 | ||
|
|
d4a8f90cab | ||
|
|
41ab00bedf | ||
|
|
a69d50b02d | ||
|
|
fc85ac20c7 | ||
|
|
e88479243c | ||
|
|
c787525ac8 | ||
|
|
ed7443661c | ||
|
|
9a2601033d | ||
|
|
3d2aa62cb6 | ||
|
|
9925249ba5 | ||
|
|
fbb311a7d2 | ||
|
|
d7041ea5de | ||
|
|
f309c1ae50 | ||
|
|
82a20fb0f0 | ||
|
|
68a9ee13e8 | ||
|
|
a64f08f3dd | ||
|
|
428112ef10 | ||
|
|
64376cd8ff | ||
|
|
384897f46b | ||
|
|
cc8aa08b02 | ||
|
|
08e60fc0ff | ||
|
|
1c4e4e4f56 | ||
|
|
3f6db7f518 | ||
|
|
ea050a6eb3 | ||
|
|
bde63f803a | ||
|
|
8435a755fd | ||
|
|
52c29b7b99 | ||
|
|
e73308638a | ||
|
|
1ac3419ef6 | ||
|
|
c6bf63da7c | ||
|
|
0fd05a2f0f | ||
|
|
1e9858a28b | ||
|
|
1fd0338b49 | ||
|
|
8f4a09e531 | ||
|
|
b2be73e4e8 | ||
|
|
3b2f77d88e | ||
|
|
52ccf9e1c1 | ||
|
|
37f5fcf85c | ||
|
|
5e947727a9 | ||
|
|
f742e497dd | ||
|
|
d7bd58cf36 | ||
|
|
dcc426fcfe | ||
|
|
7eb18f1237 | ||
|
|
b84e473d63 | ||
|
|
265e892fed | ||
|
|
4aecd67d04 | ||
|
|
623e9e66c0 | ||
|
|
74a25e9cd9 | ||
|
|
90f5a2b6fe | ||
|
|
bf625abe29 | ||
|
|
d020139db7 | ||
|
|
b44069730b | ||
|
|
749d055eba | ||
|
|
49a0f77867 | ||
|
|
f84acec8ea | ||
|
|
2af52de7b5 | ||
|
|
d3b282e01f | ||
|
|
85d9e2f2f0 | ||
|
|
629d860cbc | ||
|
|
056cc163f5 | ||
|
|
04ed3994e2 | ||
|
|
6100502726 | ||
|
|
e09efcf71a | ||
|
|
763b4dcc66 | ||
|
|
a1f09ea8f8 | ||
|
|
83348e0b80 | ||
|
|
bce625987d | ||
|
|
f13ddd5d0a | ||
|
|
18a31aa861 | ||
|
|
b2a4e959c9 | ||
|
|
f17ef241d1 | ||
|
|
aa1e56b0b9 | ||
|
|
7ef524ea1c | ||
|
|
0c7141a343 | ||
|
|
5488bb6197 | ||
|
|
8e28c67155 | ||
|
|
3c1a6f441b | ||
|
|
97d640e1f0 | ||
|
|
36969082bb | ||
|
|
ddf7602425 | ||
|
|
4fde69b066 | ||
|
|
fd9a4dbe94 | ||
|
|
f0db0ed35d | ||
|
|
6d24cbf452 | ||
|
|
5454829ae6 | ||
|
|
da0bca6466 | ||
|
|
4705bd9b37 | ||
|
|
5bd90983bc | ||
|
|
329f981582 | ||
|
|
cece7adcee | ||
|
|
74cc4903ef | ||
|
|
41fdcfa71e | ||
|
|
60cc56b1a9 | ||
|
|
f912e9293f | ||
|
|
56939728b7 | ||
|
|
ea26226046 | ||
|
|
17f6279317 | ||
|
|
d3c32ffbcc | ||
|
|
e172d60ddb | ||
|
|
1d2a3fe246 | ||
|
|
f8fe7fa491 | ||
|
|
00c8546d21 | ||
|
|
fbe792f0ac | ||
|
|
14a7cfb32a | ||
|
|
7a8645d171 | ||
|
|
31e441a805 | ||
|
|
5bf738737d | ||
|
|
c4a28caa32 | ||
|
|
415e03aa6f | ||
|
|
c3eb0c1e7f | ||
|
|
ac120e20e3 | ||
|
|
d18f681310 | ||
|
|
ea5214328b | ||
|
|
3f90e45079 | ||
|
|
9dcc441a5f | ||
|
|
0833a40d13 | ||
|
|
ab1a01e9b2 | ||
|
|
db4f691f9f | ||
|
|
d28735a05b | ||
|
|
183847747a | ||
|
|
bac6012308 | ||
|
|
f1e1d6d6af | ||
|
|
aaa384ca1a | ||
|
|
f908226898 | ||
|
|
b012127a99 | ||
|
|
909abce800 | ||
|
|
33d4e690cc | ||
|
|
848c849584 | ||
|
|
102c8f47bf | ||
|
|
d3bcbba45c | ||
|
|
0903e56196 | ||
|
|
95ecacf8a2 | ||
|
|
be8a280e0b | ||
|
|
6fb60a84dd | ||
|
|
5af7d1a3b8 | ||
|
|
35b73a1f20 | ||
|
|
9e4f9b36fc | ||
|
|
84d7e365a0 | ||
|
|
64c3da230f | ||
|
|
7793f30e09 | ||
|
|
714df32e33 | ||
|
|
1dc920c8de | ||
|
|
16dc1cfb5c | ||
|
|
819ff32dc4 | ||
|
|
5574e0ed41 | ||
|
|
265a9e2c5d | ||
|
|
b0b3b11dbf | ||
|
|
042e57d562 | ||
|
|
c578208d63 | ||
|
|
ba8fb52183 | ||
|
|
038461a61b | ||
|
|
f6f9961819 | ||
|
|
716c94492a | ||
|
|
e74e9c48de | ||
|
|
a4f335ba3e | ||
|
|
179add2b07 | ||
|
|
456bc309d8 | ||
|
|
90832c891e | ||
|
|
dc2ab9f4fa | ||
|
|
a7535a2727 | ||
|
|
162d858a90 | ||
|
|
44c09667ff | ||
|
|
da9b972466 | ||
|
|
13ac37d01a | ||
|
|
c2decc56b0 | ||
|
|
bd45950f4a | ||
|
|
1649d5fee1 | ||
|
|
f70cf11819 | ||
|
|
f8279b8ea3 | ||
|
|
5575f781ad | ||
|
|
76b8f839c2 | ||
|
|
0472883cc2 | ||
|
|
8d37f07e09 | ||
|
|
87e8feca95 | ||
|
|
450c73d98b | ||
|
|
e70a39830c | ||
|
|
2ead4a5df6 | ||
|
|
ba25198517 | ||
|
|
6297bcd74c | ||
|
|
dd7ab82e75 | ||
|
|
addafc08a5 | ||
|
|
c046fffa16 | ||
|
|
3aecef7697 | ||
|
|
b218af2b27 | ||
|
|
e970fa0022 | ||
|
|
458bb156bf | ||
|
|
bca9dc2a51 | ||
|
|
3720ea24f0 | ||
|
|
77c46bbf29 | ||
|
|
72a37c03be | ||
|
|
02750ff56f | ||
|
|
93d1969c78 | ||
|
|
0bee0e6294 | ||
|
|
6178bb8fe9 | ||
|
|
12593e6f45 | ||
|
|
819a040f44 | ||
|
|
5b195b5a0e | ||
|
|
546405bece | ||
|
|
4289131ae6 | ||
|
|
b721e1e239 | ||
|
|
f013c7f2a6 | ||
|
|
6cf2012a4d | ||
|
|
e459ebaed1 | ||
|
|
1cc67fa80c | ||
|
|
eefa6e4e2b | ||
|
|
6d9116f83d | ||
|
|
e9e3ce40c5 | ||
|
|
56d84db1d4 | ||
|
|
8be4e173e8 | ||
|
|
648765ba2f | ||
|
|
16758de0a2 | ||
|
|
c6ccf055ba | ||
|
|
f19b6474fe | ||
|
|
1649d85d10 | ||
|
|
2f6f2970c4 | ||
|
|
f227a1af7d | ||
|
|
cd72dcd925 | ||
|
|
7a5ed919ad | ||
|
|
799d7a34cf | ||
|
|
20adcfa058 | ||
|
|
4408572079 | ||
|
|
31b5b999c7 | ||
|
|
f8bcfb5d5a | ||
|
|
02b7ec88bb | ||
|
|
0af9a89cef | ||
|
|
44e9c2617a | ||
|
|
b61739874e | ||
|
|
db802c60e3 | ||
|
|
73957bd323 | ||
|
|
503f3b1a21 | ||
|
|
81f1338613 | ||
|
|
402bcde847 | ||
|
|
90baf2a92d | ||
|
|
ec9ea6a3c8 | ||
|
|
7e6617611f | ||
|
|
13793a0ddf | ||
|
|
b334853d72 | ||
|
|
ca6dde5d3d | ||
|
|
4b5d50e26b | ||
|
|
8e6cbcd7c0 | ||
|
|
6d454e6ab2 | ||
|
|
9335a5f7c0 | ||
|
|
4f0e09aa67 | ||
|
|
32bf74e30e | ||
|
|
e921bbf9f6 | ||
|
|
6643f275e2 | ||
|
|
205a4a9571 | ||
|
|
cd4c36adb8 | ||
|
|
44279d4638 | ||
|
|
311e209931 | ||
|
|
9f1c3d7392 | ||
|
|
fe5eb6707f | ||
|
|
362be34a2f | ||
|
|
f5db08e57a | ||
|
|
ec7f13d375 | ||
|
|
8cfdb960f0 | ||
|
|
ec27c2ac97 | ||
|
|
ebccb429de | ||
|
|
b97c854e15 | ||
|
|
7dbed652fc | ||
|
|
bdbbf930aa | ||
|
|
6789b41d86 | ||
|
|
5254b53e97 | ||
|
|
8adc3e5db7 | ||
|
|
0487cb234c | ||
|
|
80e1495b99 | ||
|
|
041843e47e | ||
|
|
4810644f65 | ||
|
|
c2aa4f2081 | ||
|
|
d24d873e17 | ||
|
|
b23f50e67e | ||
|
|
7fe03ed3a3 | ||
|
|
7728770623 | ||
|
|
9466fa6750 | ||
|
|
279c36564f | ||
|
|
cead7f36da | ||
|
|
50d1c3fd85 | ||
|
|
cbecb3ac37 | ||
|
|
5dbd3efce7 | ||
|
|
ed712101ea | ||
|
|
876811e2af | ||
|
|
015eb65963 | ||
|
|
b57c98df7b | ||
|
|
c4da6dd38a | ||
|
|
afafa3e15c | ||
|
|
2edcb4ac71 | ||
|
|
150f2d8d24 | ||
|
|
0c4d9b2fbc | ||
|
|
a6545f0566 | ||
|
|
5012158adf | ||
|
|
5fc041cca0 | ||
|
|
5c9396e37c | ||
|
|
089cd046af | ||
|
|
7b63c0fa8c | ||
|
|
7e8852c549 | ||
|
|
063a8905bf | ||
|
|
4064a85205 | ||
|
|
3a9fef60a1 | ||
|
|
cd7562091d | ||
|
|
d1d0be3cd2 | ||
|
|
be9419edf4 | ||
|
|
2c8ad4f1af | ||
|
|
a729d47d41 | ||
|
|
121dea3f85 | ||
|
|
6abf827f25 | ||
|
|
ea4f109c99 | ||
|
|
5af9fcaf35 | ||
|
|
7650934f21 | ||
|
|
5736d40dad | ||
|
|
0dfd83b9f4 | ||
|
|
40c5cae24a | ||
|
|
8e10dea8ec | ||
|
|
cce9396dc9 | ||
|
|
a69e8ea1a1 | ||
|
|
47f3eafb8d | ||
|
|
1f656724f6 | ||
|
|
53fc93dda6 | ||
|
|
ca55c617e5 | ||
|
|
17085b022c | ||
|
|
9063e375e8 | ||
|
|
4367eb8706 | ||
|
|
97c9760f61 | ||
|
|
0a8a99785b | ||
|
|
df60710ea8 | ||
|
|
a9d96b98cb | ||
|
|
5d2edd2659 | ||
|
|
ae689b6b27 | ||
|
|
a558ae9496 | ||
|
|
60d160da2d | ||
|
|
d58a949aae | ||
|
|
05086644c4 | ||
|
|
00e608c89d | ||
|
|
fb96d9d90d | ||
|
|
b4dfd76a4c | ||
|
|
e1a32c1807 | ||
|
|
ea9a52d124 | ||
|
|
5585f4eca4 | ||
|
|
75cc5e05ad | ||
|
|
e8b4d05f61 | ||
|
|
84ae14d754 | ||
|
|
0df748e7e2 | ||
|
|
1fbcfbe693 | ||
|
|
a9e897adc3 | ||
|
|
34ab17b669 | ||
|
|
fc0f3ad254 | ||
|
|
a1fbe27123 | ||
|
|
4942ef6f0e | ||
|
|
1c45b1fef3 | ||
|
|
9ae08a9c04 | ||
|
|
e003386793 | ||
|
|
76f8a1f51d | ||
|
|
a533b89c9f | ||
|
|
9d358821e5 | ||
|
|
a2ffad81c8 | ||
|
|
a6c6874a1a | ||
|
|
a947f2d2b6 | ||
|
|
081cdf3f63 | ||
|
|
94e19e7111 | ||
|
|
dbf5b18a99 | ||
|
|
04677ce024 | ||
|
|
0b3f7afaed | ||
|
|
407adb5b17 | ||
|
|
da0616cd13 | ||
|
|
d6e8f6ae2b | ||
|
|
af629a19d7 | ||
|
|
1c02ca537a | ||
|
|
9a3eaa1117 | ||
|
|
3f2f3d4264 | ||
|
|
c4c2c61e8c | ||
|
|
7a68e6aad1 | ||
|
|
5f3d6f70f6 | ||
|
|
f27fa54388 | ||
|
|
ece0bdf1fd | ||
|
|
97e4b1883e | ||
|
|
a2b38b3022 | ||
|
|
48acb9e08a | ||
|
|
d51092f42b | ||
|
|
e5706ccbde | ||
|
|
bdb6171334 | ||
|
|
9a82ef5255 | ||
|
|
4a1dcb2d03 | ||
|
|
1d4547a43d | ||
|
|
ef92312b41 | ||
|
|
65ee74fbc7 | ||
|
|
4673461789 | ||
|
|
c21506ba02 | ||
|
|
2f8275c52d | ||
|
|
39ebb51bba | ||
|
|
d7227da9a8 | ||
|
|
00f1628eac | ||
|
|
c69d103956 | ||
|
|
ab805194a6 | ||
|
|
4fac53a757 | ||
|
|
d56f92ee78 | ||
|
|
d5492d9b47 | ||
|
|
11198b78a2 | ||
|
|
451dc18f10 | ||
|
|
573a568dd0 | ||
|
|
127dca46a0 | ||
|
|
ff3dd00370 | ||
|
|
e888074bb4 | ||
|
|
2028c2800a | ||
|
|
1ef5026ef9 | ||
|
|
fd8766b67e | ||
|
|
40889b9cd3 | ||
|
|
7d210e5194 | ||
|
|
99889b46c9 | ||
|
|
2e674fc611 | ||
|
|
82869b3c8d | ||
|
|
5cfd3419c6 | ||
|
|
e8233e699b | ||
|
|
9efd4fb891 | ||
|
|
b2e85f9d93 | ||
|
|
04cc76660a | ||
|
|
e1f7ea25d2 | ||
|
|
f10581829d | ||
|
|
8586df1efb | ||
|
|
78af3b274f | ||
|
|
b8e0e12399 | ||
|
|
254ef80db1 | ||
|
|
f9de8446a0 | ||
|
|
facd9a2024 | ||
|
|
d15711efc6 | ||
|
|
25ace3ed25 | ||
|
|
461f00dd53 | ||
|
|
012c86ab74 | ||
|
|
458c29175e | ||
|
|
8a5dbb0a2e | ||
|
|
22f03eaedf | ||
|
|
532203cdb0 | ||
|
|
d467c74954 | ||
|
|
870d3d5595 | ||
|
|
c6c0e4cb32 | ||
|
|
8f6f347848 | ||
|
|
c4c745ccb8 | ||
|
|
0f7b63c834 | ||
|
|
3b66e34e74 | ||
|
|
345731731a | ||
|
|
2250f475fc | ||
|
|
b2c04539a1 | ||
|
|
d13363af60 | ||
|
|
ed703912b2 | ||
|
|
b6fc2386f0 | ||
|
|
2cddcd1dbb | ||
|
|
9f353dd662 | ||
|
|
231360a3b7 | ||
|
|
b49053cae2 | ||
|
|
65ac3faff6 | ||
|
|
778252741e | ||
|
|
c8062c3a5e | ||
|
|
05c08fc708 | ||
|
|
96e40d97cc | ||
|
|
0990a0851a | ||
|
|
4b3743c85a | ||
|
|
bb0db9c491 | ||
|
|
5795665a7d | ||
|
|
88f1be140c | ||
|
|
966a753997 | ||
|
|
fc16b228fd | ||
|
|
0f829bd111 | ||
|
|
a5b2ccaaad | ||
|
|
5dd352c916 | ||
|
|
a5200a1b8f | ||
|
|
3c204aaf50 | ||
|
|
6631a7e7f1 | ||
|
|
010da5c015 | ||
|
|
3ae184d31f | ||
|
|
3e975124f3 | ||
|
|
74c467f9f2 | ||
|
|
1b97c938e9 | ||
|
|
fbb56e5b1d | ||
|
|
b3e2acac4e | ||
|
|
78055aa6a5 | ||
|
|
403fa0dc53 | ||
|
|
e6bd5e8a6d | ||
|
|
f918c330a9 | ||
|
|
94f1b50c0f | ||
|
|
7f52f77efe | ||
|
|
bd54d55c1d | ||
|
|
90b480f2af | ||
|
|
09c70c3261 | ||
|
|
578c33c010 | ||
|
|
1ed0c6621b | ||
|
|
d6a821b9d7 | ||
|
|
5f8453587e | ||
|
|
7d8b5c530f | ||
|
|
d6e2d12c74 | ||
|
|
2033da0b23 | ||
|
|
305a1afcf7 | ||
|
|
c4ac954c59 | ||
|
|
9cdf87f194 | ||
|
|
2640aec227 | ||
|
|
a81e9d3dc4 | ||
|
|
a1037ce3bc | ||
|
|
6b7e0a9987 | ||
|
|
249737e53d | ||
|
|
8b57fb1208 | ||
|
|
2962243d19 | ||
|
|
c70573dee1 | ||
|
|
6c98ed520d | ||
|
|
dbdc5d14d3 | ||
|
|
6cbe638294 | ||
|
|
37ceea7333 | ||
|
|
07c08ed42c | ||
|
|
17b226a672 | ||
|
|
374b227226 | ||
|
|
8c4a5016ce | ||
|
|
f33ca23e2f | ||
|
|
6d79659dd7 | ||
|
|
1056275825 | ||
|
|
9634acedaf | ||
|
|
c56fb0f1a3 | ||
|
|
08241a5814 | ||
|
|
3a4b0bed49 | ||
|
|
84f4e33ea3 | ||
|
|
3d27b1fa85 | ||
|
|
b093ef7445 | ||
|
|
6298bf9073 | ||
|
|
9a26adf598 | ||
|
|
405ac901c9 | ||
|
|
721ccb6cf5 | ||
|
|
64ad04eb2d | ||
|
|
ba05727773 | ||
|
|
349b293353 | ||
|
|
fd91256316 | ||
|
|
f9332da521 | ||
|
|
a9a025d08c | ||
|
|
156516ce44 | ||
|
|
157e44a799 | ||
|
|
b605e3ada3 | ||
|
|
02cbedc387 | ||
|
|
e5d814d040 | ||
|
|
b09f4fb271 | ||
|
|
1f4eada3b4 | ||
|
|
b935754cb0 | ||
|
|
7d2ff3f081 | ||
|
|
396bc53593 | ||
|
|
25a87e82d4 | ||
|
|
e400753ed8 | ||
|
|
0984fcf118 | ||
|
|
18cc99ac17 | ||
|
|
1522c23470 | ||
|
|
2341e303da | ||
|
|
dca142029c | ||
|
|
7711de24f9 | ||
|
|
7448f5e5ed | ||
|
|
eee6c81af8 | ||
|
|
b89670ef0e | ||
|
|
45caf9c50c | ||
|
|
0fccb00b5b | ||
|
|
ace2ca484b | ||
|
|
72da660ddb | ||
|
|
7dc584ed91 | ||
|
|
855f0b4f2f | ||
|
|
46ffee4792 | ||
|
|
c0a953650b | ||
|
|
2bf30d6b47 | ||
|
|
685e7d7225 | ||
|
|
0424fe1a8f | ||
|
|
544a2aea4b | ||
|
|
38dbcb2248 | ||
|
|
bb3a69f801 | ||
|
|
60e5f36d27 | ||
|
|
55db40d3e0 | ||
|
|
f1fbf15116 | ||
|
|
2469361c0f | ||
|
|
9bdbdda261 | ||
|
|
6fa865a325 | ||
|
|
ad2057500a | ||
|
|
e9ba69631b | ||
|
|
d0e3726ca4 | ||
|
|
75a46764e5 | ||
|
|
d80a8d1919 | ||
|
|
d0ff2a237b | ||
|
|
6e5dd63c77 | ||
|
|
4eceda658b | ||
|
|
1c511bdb7c | ||
|
|
dc014d43af | ||
|
|
f9bd76e4f7 | ||
|
|
2f9cf160e4 | ||
|
|
336c35dc9e | ||
|
|
e74e0dedcd | ||
|
|
dcf6eb2a9e | ||
|
|
72b5215645 | ||
|
|
7d2980f09e | ||
|
|
06bed64317 | ||
|
|
f1fe6fa6e4 | ||
|
|
c559759265 | ||
|
|
ecb7a9c73a | ||
|
|
b4000e8ad8 | ||
|
|
21d5ed98d5 | ||
|
|
aebe0396e9 | ||
|
|
4e9a77cf26 | ||
|
|
e9a182fa30 | ||
|
|
14ef32631c | ||
|
|
b6db386ffd | ||
|
|
2c975b501d | ||
|
|
500f07c8de | ||
|
|
279fe3b1c5 | ||
|
|
98a9092af1 | ||
|
|
ae936dae90 | ||
|
|
87108f5af9 | ||
|
|
67166dc05c | ||
|
|
aa9fed8cc2 | ||
|
|
f257d984b7 | ||
|
|
b889d6a8e8 | ||
|
|
442eb8a4c3 | ||
|
|
46805f696d | ||
|
|
47234cd3d2 | ||
|
|
29f6a99432 | ||
|
|
2c8d0dccfc | ||
|
|
a4f576a378 | ||
|
|
1f13793b1a | ||
|
|
3def5a010e | ||
|
|
08130eb158 | ||
|
|
294bd1e2f3 | ||
|
|
253ef2187c | ||
|
|
b27dfeacc9 | ||
|
|
fb0f53b2e0 | ||
|
|
c0455cbb18 | ||
|
|
baa521bef5 | ||
|
|
17e2c77a77 | ||
|
|
7bcf65a125 | ||
|
|
b52f3818f4 | ||
|
|
306009bb6a | ||
|
|
cc12975514 | ||
|
|
9738f395c6 | ||
|
|
d4294c8984 | ||
|
|
dfc5336975 | ||
|
|
8df61b5011 | ||
|
|
f1e6643751 | ||
|
|
4cea95a547 | ||
|
|
6991bf196c | ||
|
|
b23b3272dc | ||
|
|
822a4c1bdb | ||
|
|
1696aa1891 | ||
|
|
52407725c9 | ||
|
|
a5868b3fe2 | ||
|
|
81da3c3319 | ||
|
|
4edfacb983 | ||
|
|
c6efe6f59e | ||
|
|
7729bc2634 | ||
|
|
69a305d434 | ||
|
|
35c2b3a9ac | ||
|
|
ab5b1cf86b | ||
|
|
af9675e75a | ||
|
|
c33387749b | ||
|
|
c9ca65b469 | ||
|
|
8b2f9cdfad | ||
|
|
8e078f45e0 | ||
|
|
01682a8b3c | ||
|
|
8b07f23c30 | ||
|
|
45932ad508 | ||
|
|
ce94682ce1 | ||
|
|
2d7ab7e9ea | ||
|
|
f84ffd0130 | ||
|
|
6176df94ed | ||
|
|
a8f8788248 | ||
|
|
300e3d7c73 | ||
|
|
d5d007abe3 | ||
|
|
365c6e4661 | ||
|
|
151457ab16 | ||
|
|
1dc03ef706 | ||
|
|
dde3e83129 | ||
|
|
8f182fdc69 | ||
|
|
1064acafc4 | ||
|
|
d4a67e3186 | ||
|
|
ff8e412ceb | ||
|
|
e9cbcb1d98 | ||
|
|
18e10315e5 | ||
|
|
ea7fc0311c | ||
|
|
e9caaa4ad9 | ||
|
|
30911232c1 | ||
|
|
a6198b9ed1 | ||
|
|
2940a1298e | ||
|
|
a7be294ed7 | ||
|
|
617f461c9d | ||
|
|
f916052eab | ||
|
|
2fb3f002d0 | ||
|
|
1dcb6c994f | ||
|
|
a9ab63c01c | ||
|
|
82b0bf0b87 | ||
|
|
f89db4020f | ||
|
|
393c09659e | ||
|
|
3a7cef3e76 | ||
|
|
592c0e0273 | ||
|
|
08b977b5a5 | ||
|
|
2d96549cd0 | ||
|
|
b48892d403 | ||
|
|
85fb12d554 | ||
|
|
b975183c41 | ||
|
|
7b907f0bb5 | ||
|
|
083100e2ab | ||
|
|
9dfcad117c | ||
|
|
241d2ba1da | ||
|
|
e4fb49775b | ||
|
|
7018feed88 | ||
|
|
381a146dc6 | ||
|
|
9be529f12d | ||
|
|
b4a262832a | ||
|
|
f5e5277908 | ||
|
|
c991c6e710 | ||
|
|
6d498d478e | ||
|
|
e1f4319279 | ||
|
|
d0561b5c2d | ||
|
|
4f4b192402 | ||
|
|
2826fcc851 | ||
|
|
0ae1661ba2 | ||
|
|
4e9ef338fc | ||
|
|
d16e1131b4 | ||
|
|
37562f753a | ||
|
|
a18894d159 | ||
|
|
248252682c | ||
|
|
dfee50ecd9 | ||
|
|
cc3586028e | ||
|
|
10189984f9 | ||
|
|
f60df86c89 | ||
|
|
d8425465a3 | ||
|
|
bc7a3a9e99 | ||
|
|
1fc02dcf6a | ||
|
|
d3cbf7d86a | ||
|
|
313bf45e42 | ||
|
|
83d092f785 | ||
|
|
ce34d0ac09 | ||
|
|
4825092bbe | ||
|
|
4e9dd6b0f5 | ||
|
|
bbd79bdf03 | ||
|
|
b6ccbffe2b | ||
|
|
a096e9b719 | ||
|
|
ddab25a90d | ||
|
|
1aecc34e9e | ||
|
|
ffbe98b763 | ||
|
|
75b9c0044c | ||
|
|
d7a9bb0a2a | ||
|
|
0d81c69b8e | ||
|
|
600b77a93f | ||
|
|
401cd0af0f | ||
|
|
39335c356b | ||
|
|
c7b41e67f0 | ||
|
|
a3c62bb737 | ||
|
|
003144a8e8 | ||
|
|
af1cb47e65 | ||
|
|
e8e7fbdb16 | ||
|
|
2f6263a696 | ||
|
|
d5c21afd4b | ||
|
|
35748f40d6 | ||
|
|
1afa967909 | ||
|
|
ed62478192 | ||
|
|
9e7733a743 | ||
|
|
85b7b80434 | ||
|
|
fe0f662310 | ||
|
|
fc0bdd1aa8 | ||
|
|
90453438ff | ||
|
|
e9dad4048f | ||
|
|
2e63f3b733 | ||
|
|
125cc35b59 | ||
|
|
ddba94214f | ||
|
|
e9f970891d | ||
|
|
a89cf50c59 | ||
|
|
7e58aa7d71 | ||
|
|
f90c544039 | ||
|
|
be3d90de02 | ||
|
|
82652aaf17 | ||
|
|
afcf54a5c9 | ||
|
|
17d6bb8158 | ||
|
|
3671e38af4 | ||
|
|
11c26ecf81 | ||
|
|
99d5b23023 | ||
|
|
611ba3f4a1 | ||
|
|
4fc3946111 | ||
|
|
af28dd6c75 | ||
|
|
e79ec456be | ||
|
|
3e268d2717 | ||
|
|
59a941e4a4 | ||
|
|
a7cd5f3f38 | ||
|
|
c46acbacde | ||
|
|
304d90425f | ||
|
|
0bdbc5a86e | ||
|
|
bfaa8a89e1 | ||
|
|
abecef77cf | ||
|
|
de941e289e | ||
|
|
b74dfe6e8e | ||
|
|
1d28453529 | ||
|
|
d80f6e0f8c | ||
|
|
690ecff795 | ||
|
|
234c73767d | ||
|
|
13962f0b15 | ||
|
|
2fc1f3dd48 | ||
|
|
497810cae7 | ||
|
|
f2cbb15468 | ||
|
|
e38e8b29f8 | ||
|
|
cbc9d9713d | ||
|
|
c03ceadfbd | ||
|
|
98fa4fe8c5 | ||
|
|
e50baf58ab | ||
|
|
0b4c91c0fc | ||
|
|
b9b43196e1 | ||
|
|
1750ec5c52 | ||
|
|
bf6a9e66d6 | ||
|
|
c77bd28775 | ||
|
|
0c372b94f7 | ||
|
|
1619add90c | ||
|
|
a1a4e8b6bb | ||
|
|
26e1237380 | ||
|
|
25f350a058 | ||
|
|
4882171df5 | ||
|
|
121cb9ee38 | ||
|
|
931627e6a0 | ||
|
|
bc173b9fb0 | ||
|
|
274a2c9970 | ||
|
|
006fcc22a8 | ||
|
|
4fd9c70f06 | ||
|
|
709c51c424 | ||
|
|
9bc448546e | ||
|
|
91aeab0de3 | ||
|
|
0dc092334b | ||
|
|
c913cf446f | ||
|
|
36c194638e | ||
|
|
45fb737950 | ||
|
|
a01273bae3 | ||
|
|
a88f39457b | ||
|
|
2bbaab4a24 | ||
|
|
2c17323e15 | ||
|
|
870694b3da | ||
|
|
1a8f4b57a9 | ||
|
|
87a4b4d1f4 | ||
|
|
022b31a8c8 | ||
|
|
8ecf5104b3 | ||
|
|
2b3aeffbbd | ||
|
|
dd6b494eb3 | ||
|
|
2c2f9e2cc3 | ||
|
|
2d9b1b3ffa | ||
|
|
f070480275 | ||
|
|
49f1597de2 | ||
|
|
c9bea5bad3 | ||
|
|
b44e425f39 | ||
|
|
296324ea03 | ||
|
|
93683c3cf8 | ||
|
|
fa41e86a28 | ||
|
|
9e77b7075a | ||
|
|
a08ee55e2d | ||
|
|
5c7f9a627f | ||
|
|
3bac6d9479 | ||
|
|
bc3e3472c1 | ||
|
|
5c5143de48 | ||
|
|
c8cd7d9e0f | ||
|
|
66bd86e2c2 | ||
|
|
e0a6cdcf30 | ||
|
|
487fe20490 | ||
|
|
a0ecb9b8fc | ||
|
|
80d9b1ccd7 | ||
|
|
4bf4bc784f | ||
|
|
69c48301e0 | ||
|
|
2be9b88135 | ||
|
|
9437fef8cc | ||
|
|
16b0384bd2 | ||
|
|
98fa4fce09 | ||
|
|
1ec1d17e16 | ||
|
|
87ebdd8a71 | ||
|
|
1e11df0dc3 | ||
|
|
7d68189d8a | ||
|
|
421d474332 | ||
|
|
26414ee013 | ||
|
|
58060fa11b | ||
|
|
5c62f68e14 | ||
|
|
cea698f19c | ||
|
|
0d22b5dace | ||
|
|
48781ef7f7 | ||
|
|
023ec151df | ||
|
|
59dbdb51dc | ||
|
|
92d1bc09cb | ||
|
|
6d1a837df7 | ||
|
|
21f422ca5e | ||
|
|
d62bfb39cd | ||
|
|
291ae60b52 | ||
|
|
ce4b274aa1 | ||
|
|
3b79d2789d | ||
|
|
334f1842fc | ||
|
|
b12540520d | ||
|
|
bb9dcc99cf | ||
|
|
0d7b9b8b7e | ||
|
|
3d59821134 | ||
|
|
31188ee1a8 | ||
|
|
cae111287b | ||
|
|
e36e473859 | ||
|
|
4a3e6bce79 | ||
|
|
a3829cb720 | ||
|
|
d7fb66aa82 | ||
|
|
344b3b5ce1 | ||
|
|
3f7cf29124 | ||
|
|
63dc69fef6 | ||
|
|
e84be9b495 | ||
|
|
cfe1c195c4 | ||
|
|
3a3ca3f515 | ||
|
|
032c49b8b3 | ||
|
|
3208ff58ca | ||
|
|
6707d22a40 | ||
|
|
3647bee263 | ||
|
|
0cd8572b2d | ||
|
|
7c2831ac90 | ||
|
|
e2aebccba1 | ||
|
|
de603b75fc | ||
|
|
3e563bcea7 | ||
|
|
1244be2eda | ||
|
|
92f91ff48b | ||
|
|
9f0a373b51 | ||
|
|
b3dfaaa143 | ||
|
|
b0701709c1 | ||
|
|
5b7848a345 | ||
|
|
34aa216a65 | ||
|
|
915c6a21ba | ||
|
|
a76a29f233 | ||
|
|
4e06ab75e8 | ||
|
|
58706d595b | ||
|
|
236be53269 | ||
|
|
1fc1bd382b | ||
|
|
26147fb954 | ||
|
|
a60033f106 | ||
|
|
3613e6fc57 | ||
|
|
f8e21776f9 | ||
|
|
006723cf76 | ||
|
|
bd53a054b1 | ||
|
|
aa89bcd279 | ||
|
|
f19759a182 | ||
|
|
d009bcbfb6 | ||
|
|
211b8685d3 | ||
|
|
4b71f63ac0 | ||
|
|
3adb8c3854 | ||
|
|
02e666d59f | ||
|
|
5b2d6ff07e | ||
|
|
877b2fbd3c | ||
|
|
afeab58a3c | ||
|
|
744c49a81b | ||
|
|
9c75b2d931 | ||
|
|
54d11e6057 | ||
|
|
9c5b91fd0b | ||
|
|
290d3eab76 | ||
|
|
46dae77c23 | ||
|
|
3d7ba69a05 | ||
|
|
a6cd870784 | ||
|
|
58133d22a8 | ||
|
|
330e5c5460 | ||
|
|
97879bcd57 | ||
|
|
ab519c8262 | ||
|
|
ab1dee1efc | ||
|
|
e072aa535d | ||
|
|
48f9859d2a | ||
|
|
48b5083ca0 | ||
|
|
cd64618674 | ||
|
|
65f29a78b2 | ||
|
|
5d7e960adf | ||
|
|
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,3 +1,4 @@
|
|||||||
|
openssl.pc
|
||||||
Makefile.ssl
|
Makefile.ssl
|
||||||
MINFO
|
MINFO
|
||||||
makefile.one
|
makefile.one
|
||||||
@@ -13,3 +14,4 @@ cctest.c
|
|||||||
cctest.a
|
cctest.a
|
||||||
libcrypto.so.*
|
libcrypto.so.*
|
||||||
libssl.so.*
|
libssl.so.*
|
||||||
|
libcrypto.sha1
|
||||||
|
|||||||
356
Configure
356
Configure
@@ -10,7 +10,7 @@ use strict;
|
|||||||
|
|
||||||
# see INSTALL for instructions.
|
# see INSTALL for instructions.
|
||||||
|
|
||||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
|
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-engine] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [fips] [debug] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
|
||||||
|
|
||||||
# Options:
|
# Options:
|
||||||
#
|
#
|
||||||
@@ -38,6 +38,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-
|
|||||||
# --test-sanity Make a number of sanity checks on the data in this file.
|
# --test-sanity Make a number of sanity checks on the data in this file.
|
||||||
# This is a debugging tool for OpenSSL developers.
|
# This is a debugging tool for OpenSSL developers.
|
||||||
#
|
#
|
||||||
|
# no-engine do not compile in any engine code.
|
||||||
# no-hw-xxx do not compile support for specific crypto hardware.
|
# no-hw-xxx do not compile support for specific crypto hardware.
|
||||||
# Generic OpenSSL-style methods relating to this support
|
# Generic OpenSSL-style methods relating to this support
|
||||||
# are always compiled but return NULL if the hardware
|
# are always compiled but return NULL if the hardware
|
||||||
@@ -107,7 +108,6 @@ my $tlib="-lnsl -lsocket";
|
|||||||
my $bits1="THIRTY_TWO_BIT ";
|
my $bits1="THIRTY_TWO_BIT ";
|
||||||
my $bits2="SIXTY_FOUR_BIT ";
|
my $bits2="SIXTY_FOUR_BIT ";
|
||||||
|
|
||||||
my $x86_sol_asm="asm/bn86-sol.o asm/co86-sol.o:asm/dx86-sol.o asm/yx86-sol.o:asm/bx86-sol.o:asm/mx86-sol.o:asm/sx86-sol.o:asm/cx86-sol.o:asm/rx86-sol.o:asm/rm86-sol.o:asm/r586-sol.o";
|
|
||||||
my $x86_elf_asm="asm/bn86-elf.o asm/co86-elf.o:asm/dx86-elf.o asm/yx86-elf.o:asm/bx86-elf.o:asm/mx86-elf.o:asm/sx86-elf.o:asm/cx86-elf.o:asm/rx86-elf.o:asm/rm86-elf.o:asm/r586-elf.o";
|
my $x86_elf_asm="asm/bn86-elf.o asm/co86-elf.o:asm/dx86-elf.o asm/yx86-elf.o:asm/bx86-elf.o:asm/mx86-elf.o:asm/sx86-elf.o:asm/cx86-elf.o:asm/rx86-elf.o:asm/rm86-elf.o:asm/r586-elf.o";
|
||||||
my $x86_out_asm="asm/bn86-out.o asm/co86-out.o:asm/dx86-out.o asm/yx86-out.o:asm/bx86-out.o:asm/mx86-out.o:asm/sx86-out.o:asm/cx86-out.o:asm/rx86-out.o:asm/rm86-out.o:asm/r586-out.o";
|
my $x86_out_asm="asm/bn86-out.o asm/co86-out.o:asm/dx86-out.o asm/yx86-out.o:asm/bx86-out.o:asm/mx86-out.o:asm/sx86-out.o:asm/cx86-out.o:asm/rx86-out.o:asm/rm86-out.o:asm/r586-out.o";
|
||||||
my $x86_bsdi_asm="asm/bn86bsdi.o asm/co86bsdi.o:asm/dx86bsdi.o asm/yx86bsdi.o:asm/bx86bsdi.o:asm/mx86bsdi.o:asm/sx86bsdi.o:asm/cx86bsdi.o:asm/rx86bsdi.o:asm/rm86bsdi.o:asm/r586bsdi.o";
|
my $x86_bsdi_asm="asm/bn86bsdi.o asm/co86bsdi.o:asm/dx86bsdi.o asm/yx86bsdi.o:asm/bx86bsdi.o:asm/mx86bsdi.o:asm/sx86bsdi.o:asm/cx86bsdi.o:asm/rx86bsdi.o:asm/rm86bsdi.o:asm/r586bsdi.o";
|
||||||
@@ -120,7 +120,7 @@ my $alpha_asm="::::::::";
|
|||||||
# -DB_ENDIAN slows things down on a sparc for md5, but helps sha1.
|
# -DB_ENDIAN slows things down on a sparc for md5, but helps sha1.
|
||||||
# So the md5_locl.h file has an undef B_ENDIAN if sun is defined
|
# So the md5_locl.h file has an undef B_ENDIAN if sun is defined
|
||||||
|
|
||||||
#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib
|
#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags
|
||||||
|
|
||||||
my %table=(
|
my %table=(
|
||||||
# File 'TABLE' (created by 'make TABLE') contains the data from this list,
|
# File 'TABLE' (created by 'make TABLE') contains the data from this list,
|
||||||
@@ -134,18 +134,22 @@ my %table=(
|
|||||||
|
|
||||||
# Our development configs
|
# Our development configs
|
||||||
"purify", "purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::",
|
"purify", "purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::",
|
||||||
"debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::",
|
"debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::",
|
||||||
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
|
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
|
||||||
"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
||||||
"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
||||||
"debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::::",
|
"debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::::",
|
||||||
"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
|
"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
|
||||||
|
"debug-ben-fips-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DFIPS -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
|
||||||
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||||
"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||||
"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT:::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT:::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||||
"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT::dlfcn",
|
||||||
"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"dist", "cc:-O::(unknown)::::::",
|
"dist", "cc:-O::(unknown)::::::",
|
||||||
|
|
||||||
# Basic configs that should work on any (32 and less bit) box
|
# Basic configs that should work on any (32 and less bit) box
|
||||||
@@ -158,24 +162,25 @@ my %table=(
|
|||||||
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
|
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
|
||||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
|
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
|
||||||
# error message.
|
# error message.
|
||||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
#### Solaris x86 with Sun C setups
|
#### Solaris x86 with Sun C setups
|
||||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
#### SPARC Solaris with GNU C setups
|
#### SPARC Solaris with GNU C setups
|
||||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# -m32 should be safe to add as long as driver recognizes -mcpu=ultrasparc
|
# -m32 should be safe to add as long as driver recognizes -mcpu=ultrasparc
|
||||||
"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"solaris64-sparcv9-gcc31","gcc:-mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
|
# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
|
||||||
# but keep the assembler modules.
|
# but keep the assembler modules.
|
||||||
"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
####
|
####
|
||||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
#### SPARC Solaris with Sun C setups
|
#### SPARC Solaris with Sun C setups
|
||||||
# DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests
|
# DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests
|
||||||
@@ -195,17 +200,16 @@ my %table=(
|
|||||||
"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::",
|
"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::",
|
||||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||||
# assisted with debugging of following two configs.
|
# assisted with debugging of following two configs.
|
||||||
"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o::::",
|
"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# it's a real mess with -mcpu=ultrasparc option under Linux, but
|
# it's a real mess with -mcpu=ultrasparc option under Linux, but
|
||||||
# -Wa,-Av8plus should do the trick no matter what.
|
# -Wa,-Av8plus should do the trick no matter what.
|
||||||
"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:",
|
"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# !!!Folowing can't be even tested yet!!!
|
# GCC 3.1 is a requirement
|
||||||
# We have to wait till 64-bit glibc for SPARC is operational!!!
|
"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
#"linux64-sparcv9","sparc64-linux-gcc:-m64 -mcpu=v9 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT:ULTRASPARC::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:",
|
|
||||||
|
|
||||||
# Sunos configs, assuming sparc for the gcc one.
|
# Sunos configs, assuming sparc for the gcc one.
|
||||||
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):::DES_UNROLL:::",
|
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:::",
|
||||||
"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::",
|
"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown):SUNOS::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::",
|
||||||
|
|
||||||
#### IRIX 5.x configs
|
#### IRIX 5.x configs
|
||||||
# -mips2 flag is added by ./config when appropriate.
|
# -mips2 flag is added by ./config when appropriate.
|
||||||
@@ -216,7 +220,7 @@ my %table=(
|
|||||||
# './Configure irix-[g]cc' manually.
|
# './Configure irix-[g]cc' manually.
|
||||||
# -mips4 flag is added by ./config when appropriate.
|
# -mips4 flag is added by ./config when appropriate.
|
||||||
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"irix-mips3-cc", "cc:-n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# N64 ABI builds.
|
# N64 ABI builds.
|
||||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
@@ -254,24 +258,26 @@ my %table=(
|
|||||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
# 64bit PARISC for GCC without optimization, which seems to make problems.
|
||||||
|
# Submitted by <ross.alexander@uk.neceur.com>
|
||||||
|
"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
# IA-64 targets
|
# IA-64 targets
|
||||||
# I have no idea if this one actually works, feedback needed. <appro>
|
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +ESlit -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
|
||||||
# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
|
# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
|
||||||
# with debugging of the following config.
|
# with debugging of the following config.
|
||||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
||||||
#
|
#
|
||||||
# Chris Ruemmler <ruemmler@cup.hp.com>
|
# Chris Ruemmler <ruemmler@cup.hp.com>
|
||||||
# Kevin Steves <ks@hp.se>
|
# Kevin Steves <ks@hp.se>
|
||||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# Isn't the line below meaningless? HP-UX cc optimizes for host by default.
|
# Isn't the line below meaningless? HP-UX cc optimizes for host by default.
|
||||||
# hpux-parisc1_0-cc with +DAportable flag would make more sense. <appro>
|
# hpux-parisc1_0-cc with +DAportable flag would make more sense. <appro>
|
||||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
# HPUX 9.X config.
|
# HPUX 9.X config.
|
||||||
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
|
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
|
||||||
@@ -373,21 +379,26 @@ my %table=(
|
|||||||
"linux-pentium", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"linux-pentium", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"linux-ppro", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"linux-ppro", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"linux-k6", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=k6 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"linux-k6", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=k6 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||||
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||||
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||||
"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown):::BN_LLONG:::",
|
"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown):::BN_LLONG:::",
|
"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
|
"linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
|
||||||
"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
|
"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG:::::::::::linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"FreeBSD-sparc64","gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"FreeBSD-ia64","gcc:-DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64-cpp.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"FreeBSD", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
"FreeBSD", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||||
"bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown):::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}",
|
"bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown):::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}",
|
||||||
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
@@ -395,7 +406,7 @@ my %table=(
|
|||||||
"nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
|
"nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||||
|
|
||||||
# NCR MP-RAS UNIX ver 02.03.01
|
# NCR MP-RAS UNIX ver 02.03.01
|
||||||
"ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::",
|
"ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown)::-lsocket -lnsl -lc89:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||||
|
|
||||||
# QNX 4
|
# QNX 4
|
||||||
"qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:",
|
"qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:",
|
||||||
@@ -406,35 +417,39 @@ my %table=(
|
|||||||
# Linux on ARM
|
# Linux on ARM
|
||||||
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
|
# SCO/Caldera targets.
|
||||||
|
#
|
||||||
|
# Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
|
||||||
|
# Now we only have blended unixware-* as it's the only one used by ./config.
|
||||||
|
# If you want to optimize for particular microarchitecture, bypass ./config
|
||||||
|
# and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
|
||||||
|
# Note that not all targets include assembler support. Mostly because of
|
||||||
|
# lack of motivation to support out-of-date platforms with out-of-date
|
||||||
|
# compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
|
||||||
|
# patiently assisted to debug most of it.
|
||||||
|
#
|
||||||
# UnixWare 2.0x fails destest with -O
|
# UnixWare 2.0x fails destest with -O
|
||||||
"unixware-2.0","cc:-DFILIO_H::-Kthread::-lsocket -lnsl -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||||
"unixware-2.0-pentium","cc:-DFILIO_H -Kpentium::-Kthread::-lsocket -lnsl -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
|
"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||||
|
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"sco3-gcc", "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
|
||||||
|
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
|
||||||
|
"sco5-cc", "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
# UnixWare 2.1
|
|
||||||
"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
|
||||||
"unixware-2.1-pentium","cc:-O -DFILIO_H -Kpentium::-Kthread::-lsocket -lnsl -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
|
|
||||||
"unixware-2.1-p6","cc:-O -DFILIO_H -Kp6::-Kthread::-lsocket -lnsl -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
|
|
||||||
|
|
||||||
# UnixWare 7
|
|
||||||
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
|
||||||
"unixware-7-pentium","cc:-O -DFILIO_H -Kalloca -Kpentium::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
|
||||||
"unixware-7-pentium_pro","cc:-O -DFILIO_H -Kalloca -Kpentium_pro::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
|
||||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
|
||||||
|
|
||||||
# OpenUNIX 8
|
|
||||||
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
|
||||||
"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
|
||||||
"OpenUNIX-8-pentium","cc:-O -DFILIO_H -Kalloca -Kpentium::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
|
||||||
"OpenUNIX-8-pentium_pro","cc:-O -DFILIO_H -Kalloca -Kpentium_pro::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
|
||||||
|
|
||||||
# IBM's AIX.
|
# IBM's AIX.
|
||||||
"aix-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
|
"aix-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
|
||||||
"aix-gcc", "gcc:-O3 -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR:::",
|
"aix-gcc", "gcc:-O3 -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR:::",
|
||||||
"aix43-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
"aix43-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::",
|
||||||
"aix43-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
"aix43-gcc", "gcc:-O1 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||||
|
"aix64-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHAR::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cray T90 (SDSC)
|
# Cray T90 and similar (SDSC)
|
||||||
# It's Big-endian, but the algorithms work properly when B_ENDIAN is NOT
|
# It's Big-endian, but the algorithms work properly when B_ENDIAN is NOT
|
||||||
# defined. The T90 ints and longs are 8 bytes long, and apparently the
|
# defined. The T90 ints and longs are 8 bytes long, and apparently the
|
||||||
# B_ENDIAN code assumes 4 byte ints. Fortunately, the non-B_ENDIAN and
|
# B_ENDIAN code assumes 4 byte ints. Fortunately, the non-B_ENDIAN and
|
||||||
@@ -444,7 +459,10 @@ my %table=(
|
|||||||
#'Taking the address of a bit field is not allowed. '
|
#'Taking the address of a bit field is not allowed. '
|
||||||
#'An expression with bit field exists as the operand of "sizeof" '
|
#'An expression with bit field exists as the operand of "sizeof" '
|
||||||
# (written by Wayne Schroeder <schroede@SDSC.EDU>)
|
# (written by Wayne Schroeder <schroede@SDSC.EDU>)
|
||||||
"cray-t90-cc", "cc: -DBIT_FIELD_LIMITS -DTERMIOS::(unknown):CRAY::SIXTY_FOUR_BIT_LONG DES_INT:::",
|
#
|
||||||
|
# j90 is considered the base machine type for unicos machines,
|
||||||
|
# so this configuration is now called "cray-j90" ...
|
||||||
|
"cray-j90", "cc: -DBIT_FIELD_LIMITS -DTERMIOS::(unknown):CRAY::SIXTY_FOUR_BIT_LONG DES_INT:::",
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cray T3E (Research Center Juelich, beckman@acl.lanl.gov)
|
# Cray T3E (Research Center Juelich, beckman@acl.lanl.gov)
|
||||||
@@ -461,18 +479,9 @@ my %table=(
|
|||||||
"dgux-R4-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lnsl -lsocket:RC4_INDEX DES_UNROLL:::",
|
"dgux-R4-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lnsl -lsocket:RC4_INDEX DES_UNROLL:::",
|
||||||
"dgux-R4-x86-gcc", "gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown)::-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
"dgux-R4-x86-gcc", "gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown)::-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||||
|
|
||||||
# SCO 3 - Tim Rice <tim@multitalents.net>
|
|
||||||
"sco3-gcc", "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
|
|
||||||
|
|
||||||
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the
|
|
||||||
# SCO cc.
|
|
||||||
"sco5-cc", "cc:-belf::(unknown)::-lsocket -lresolv -lnsl:${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:svr3-shared:-Kpic", # des options?
|
|
||||||
"sco5-cc-pentium", "cc:-Kpentium::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:::", # des options?
|
|
||||||
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lresolv -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC", # the SCO assembler doesn't seem to like our assembler files ...
|
|
||||||
|
|
||||||
# Sinix/ReliantUNIX RM400
|
# Sinix/ReliantUNIX RM400
|
||||||
# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g */
|
# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g */
|
||||||
"ReliantUNIX","cc:-KPIC -g -DTERMIOS -DB_ENDIAN::-Kthread:SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:BN_LLONG DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:reliantunix-shared::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"ReliantUNIX","cc:-KPIC -g -DTERMIOS -DB_ENDIAN::-Kthread:SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:BN_LLONG DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:reliantunix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"SINIX","cc:-O::(unknown):SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:RC4_INDEX RC4_CHAR:::",
|
"SINIX","cc:-O::(unknown):SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:RC4_INDEX RC4_CHAR:::",
|
||||||
"SINIX-N","/usr/ucb/cc:-O2 -misaligned::(unknown)::-lucb:RC4_INDEX RC4_CHAR:::",
|
"SINIX-N","/usr/ucb/cc:-O2 -misaligned::(unknown)::-lucb:RC4_INDEX RC4_CHAR:::",
|
||||||
|
|
||||||
@@ -488,6 +497,7 @@ my %table=(
|
|||||||
# Windows NT, Microsoft Visual C++ 4.0
|
# Windows NT, Microsoft Visual C++ 4.0
|
||||||
|
|
||||||
"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
|
"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
|
||||||
|
"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
|
||||||
"VC-WIN32","cl::::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
|
"VC-WIN32","cl::::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
|
||||||
"VC-WIN16","cl:::(unknown):WIN16::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
|
"VC-WIN16","cl:::(unknown):WIN16::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
|
||||||
"VC-W31-16","cl:::(unknown):WIN16::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
"VC-W31-16","cl:::(unknown):WIN16::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||||
@@ -495,34 +505,48 @@ my %table=(
|
|||||||
"VC-MSDOS","cl:::(unknown):MSDOS::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
"VC-MSDOS","cl:::(unknown):MSDOS::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||||
|
|
||||||
# Borland C++ 4.5
|
# Borland C++ 4.5
|
||||||
"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX::::::::::win32",
|
"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN::::::::::win32",
|
||||||
"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||||
|
|
||||||
# Mingw32
|
# MinGW
|
||||||
# (Note: the real CFLAGS for Windows builds are defined by util/mk1mf.pl
|
"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-mno-cygwin -lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32::::.dll",
|
||||||
# and its library files in util/pl/*)
|
|
||||||
"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
# UWIN
|
||||||
|
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||||
|
|
||||||
# Cygwin
|
# Cygwin
|
||||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll",
|
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:::.dll",
|
||||||
|
|
||||||
|
# DJGPP
|
||||||
|
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::",
|
||||||
|
|
||||||
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
|
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
|
||||||
"ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown):::::::",
|
"ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::",
|
||||||
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::",
|
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::",
|
||||||
# K&R C is no longer supported; you need gcc on old Ultrix installations
|
# K&R C is no longer supported; you need gcc on old Ultrix installations
|
||||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
|
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
|
||||||
|
|
||||||
# Some OpenBSD from Bob Beck <beck@obtuse.com>
|
# Some OpenBSD from Bob Beck <beck@obtuse.com>
|
||||||
"OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"OpenBSD", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"OpenBSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"OpenBSD-alpha", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"OpenBSD", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"OpenBSD-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"OpenBSD-mips","gcc:-O2 -DL_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"OpenBSD-m68k", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"OpenBSD-m88k", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"OpenBSD-mips", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"OpenBSD-powerpc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"OpenBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"OpenBSD-sparc64", "gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"OpenBSD-vax", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"OpenBSD-hppa", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
|
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
|
||||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||||
"darwin-ppc-cc","cc:-O3 -nostdinc -I/System/Library/Frameworks/System.framework/Headers -I/System/Library/Frameworks/System.frameworks/Headers/bsd -I/usr/include -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"darwin-ppc-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
"darwin-i386-cc","cc:-O3 -nostdinc -I/System/Library/Frameworks/System.framework/Headers -I/System/Library/Frameworks/System.frameworks/Headers/bsd -I/usr/include -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::::-fPIC",
|
"darwin-i386-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
|
|
||||||
|
##### A/UX
|
||||||
|
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||||
|
|
||||||
##### Sony NEWS-OS 4.x
|
##### Sony NEWS-OS 4.x
|
||||||
"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
|
"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
|
||||||
@@ -535,11 +559,18 @@ my %table=(
|
|||||||
|
|
||||||
##### VxWorks for various targets
|
##### VxWorks for various targets
|
||||||
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
|
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
|
||||||
|
"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::",
|
||||||
|
"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
|
||||||
|
"vxworks-ppc860","ccppc:-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
|
||||||
|
"vxworks-mipsle","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r::::::::::::::::ranlibmips:",
|
||||||
|
|
||||||
|
##### Compaq Non-Stop Kernel (Tandem)
|
||||||
|
"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::",
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
|
my @WinTargets=qw(VC-NT VC-CE VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS
|
||||||
BC-16 Mingw32 OS2-EMX);
|
BC-32 BC-16 Mingw32 OS2-EMX);
|
||||||
|
|
||||||
my $idx = 0;
|
my $idx = 0;
|
||||||
my $idx_cc = $idx++;
|
my $idx_cc = $idx++;
|
||||||
@@ -564,6 +595,7 @@ my $idx_shared_cflag = $idx++;
|
|||||||
my $idx_shared_ldflag = $idx++;
|
my $idx_shared_ldflag = $idx++;
|
||||||
my $idx_shared_extension = $idx++;
|
my $idx_shared_extension = $idx++;
|
||||||
my $idx_ranlib = $idx++;
|
my $idx_ranlib = $idx++;
|
||||||
|
my $idx_arflags = $idx++;
|
||||||
|
|
||||||
my $prefix="";
|
my $prefix="";
|
||||||
my $openssldir="";
|
my $openssldir="";
|
||||||
@@ -599,6 +631,8 @@ my $rmd160_obj="";
|
|||||||
my $processor="";
|
my $processor="";
|
||||||
my $default_ranlib;
|
my $default_ranlib;
|
||||||
my $perl;
|
my $perl;
|
||||||
|
my $fips=0;
|
||||||
|
my $debug=0;
|
||||||
|
|
||||||
my $no_ssl2=0;
|
my $no_ssl2=0;
|
||||||
my $no_ssl3=0;
|
my $no_ssl3=0;
|
||||||
@@ -621,9 +655,11 @@ my $openssl_thread_defines;
|
|||||||
my $openssl_sys_defines="";
|
my $openssl_sys_defines="";
|
||||||
my $openssl_other_defines;
|
my $openssl_other_defines;
|
||||||
my $libs;
|
my $libs;
|
||||||
|
my $libkrb5="";
|
||||||
my $target;
|
my $target;
|
||||||
my $options;
|
my $options;
|
||||||
my $symlink;
|
my $symlink;
|
||||||
|
my $make_depend=0;
|
||||||
my %withargs=();
|
my %withargs=();
|
||||||
|
|
||||||
my @argvcopy=@ARGV;
|
my @argvcopy=@ARGV;
|
||||||
@@ -660,6 +696,11 @@ PROCESS_ARGS:
|
|||||||
$flags .= "-DOPENSSL_NO_ASM ";
|
$flags .= "-DOPENSSL_NO_ASM ";
|
||||||
$openssl_other_defines .= "#define OPENSSL_NO_ASM\n";
|
$openssl_other_defines .= "#define OPENSSL_NO_ASM\n";
|
||||||
}
|
}
|
||||||
|
elsif (/^no-err$/)
|
||||||
|
{
|
||||||
|
$flags .= "-DOPENSSL_NO_ERR ";
|
||||||
|
$openssl_other_defines .= "#define OPENSSL_NO_ERR\n";
|
||||||
|
}
|
||||||
elsif (/^no-hw-(.+)$/)
|
elsif (/^no-hw-(.+)$/)
|
||||||
{
|
{
|
||||||
my $hw=$1;
|
my $hw=$1;
|
||||||
@@ -682,7 +723,7 @@ PROCESS_ARGS:
|
|||||||
{ $threads=1; }
|
{ $threads=1; }
|
||||||
elsif (/^no-shared$/)
|
elsif (/^no-shared$/)
|
||||||
{ $no_shared=1; }
|
{ $no_shared=1; }
|
||||||
elsif (/^shared$/)
|
elsif (/^shared$/ || /^-shared$/ || /^--shared$/)
|
||||||
{ $no_shared=0; }
|
{ $no_shared=0; }
|
||||||
elsif (/^no-zlib$/)
|
elsif (/^no-zlib$/)
|
||||||
{ $zlib=0; }
|
{ $zlib=0; }
|
||||||
@@ -710,6 +751,7 @@ PROCESS_ARGS:
|
|||||||
$openssl_algorithm_defines .= "#define OPENSSL_NO_$algo\n";
|
$openssl_algorithm_defines .= "#define OPENSSL_NO_$algo\n";
|
||||||
if ($algo eq "RIJNDAEL")
|
if ($algo eq "RIJNDAEL")
|
||||||
{
|
{
|
||||||
|
push @skip, "aes";
|
||||||
$flags .= "-DOPENSSL_NO_AES ";
|
$flags .= "-DOPENSSL_NO_AES ";
|
||||||
$depflags .= "-DOPENSSL_NO_AES ";
|
$depflags .= "-DOPENSSL_NO_AES ";
|
||||||
$openssl_algorithm_defines .= "#define OPENSSL_NO_AES\n";
|
$openssl_algorithm_defines .= "#define OPENSSL_NO_AES\n";
|
||||||
@@ -722,14 +764,6 @@ PROCESS_ARGS:
|
|||||||
$depflags .= "-DOPENSSL_NO_MDC2 ";
|
$depflags .= "-DOPENSSL_NO_MDC2 ";
|
||||||
$openssl_algorithm_defines .= "#define OPENSSL_NO_MDC2\n";
|
$openssl_algorithm_defines .= "#define OPENSSL_NO_MDC2\n";
|
||||||
}
|
}
|
||||||
if ($algo eq "EC" || $algo eq "SHA" || $algo eq "SHA1")
|
|
||||||
{
|
|
||||||
push @skip, "ecdsa";
|
|
||||||
$options .= " no-ecdsa";
|
|
||||||
$flags .= "-DOPENSSL_NO_ECDSA ";
|
|
||||||
$depflags .= "-DOPENSSL_NO_ECDSA ";
|
|
||||||
$openssl_algorithm_defines .= "#define OPENSSL_NO_ECDSA\n";
|
|
||||||
}
|
|
||||||
if ($algo eq "MD5")
|
if ($algo eq "MD5")
|
||||||
{
|
{
|
||||||
$no_md5 = 1;
|
$no_md5 = 1;
|
||||||
@@ -772,6 +806,15 @@ PROCESS_ARGS:
|
|||||||
}
|
}
|
||||||
elsif (/^386$/)
|
elsif (/^386$/)
|
||||||
{ $processor=386; }
|
{ $processor=386; }
|
||||||
|
elsif (/^fips$/)
|
||||||
|
{
|
||||||
|
$fips=1;
|
||||||
|
$openssl_other_defines.="#define OPENSSL_FIPS\n";
|
||||||
|
}
|
||||||
|
elsif (/^debug$/)
|
||||||
|
{
|
||||||
|
$debug=1;
|
||||||
|
}
|
||||||
elsif (/^rsaref$/)
|
elsif (/^rsaref$/)
|
||||||
{
|
{
|
||||||
# No RSAref support any more since it's not needed.
|
# No RSAref support any more since it's not needed.
|
||||||
@@ -889,6 +932,7 @@ print "Configuring for $target\n";
|
|||||||
my $IsWindows=scalar grep /^$target$/,@WinTargets;
|
my $IsWindows=scalar grep /^$target$/,@WinTargets;
|
||||||
|
|
||||||
$exe_ext=".exe" if ($target eq "Cygwin");
|
$exe_ext=".exe" if ($target eq "Cygwin");
|
||||||
|
$exe_ext=".exe" if ($target eq "DJGPP");
|
||||||
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
|
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
|
||||||
$prefix=$openssldir if $prefix eq "";
|
$prefix=$openssldir if $prefix eq "";
|
||||||
|
|
||||||
@@ -896,7 +940,7 @@ chop $openssldir if $openssldir =~ /\/$/;
|
|||||||
chop $prefix if $prefix =~ /\/$/;
|
chop $prefix if $prefix =~ /\/$/;
|
||||||
|
|
||||||
$openssldir=$prefix . "/ssl" if $openssldir eq "";
|
$openssldir=$prefix . "/ssl" if $openssldir eq "";
|
||||||
$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /^\//;
|
$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/])/;
|
||||||
|
|
||||||
|
|
||||||
print "IsWindows=$IsWindows\n";
|
print "IsWindows=$IsWindows\n";
|
||||||
@@ -912,11 +956,11 @@ my $bn_ops = $fields[$idx_bn_ops];
|
|||||||
my $bn_obj = $fields[$idx_bn_obj];
|
my $bn_obj = $fields[$idx_bn_obj];
|
||||||
my $des_obj = $fields[$idx_des_obj];
|
my $des_obj = $fields[$idx_des_obj];
|
||||||
my $bf_obj = $fields[$idx_bf_obj];
|
my $bf_obj = $fields[$idx_bf_obj];
|
||||||
my $md5_obj = $fields[$idx_md5_obj];
|
$md5_obj = $fields[$idx_md5_obj];
|
||||||
my $sha1_obj = $fields[$idx_sha1_obj];
|
$sha1_obj = $fields[$idx_sha1_obj];
|
||||||
my $cast_obj = $fields[$idx_cast_obj];
|
my $cast_obj = $fields[$idx_cast_obj];
|
||||||
my $rc4_obj = $fields[$idx_rc4_obj];
|
my $rc4_obj = $fields[$idx_rc4_obj];
|
||||||
my $rmd160_obj = $fields[$idx_rmd160_obj];
|
$rmd160_obj = $fields[$idx_rmd160_obj];
|
||||||
my $rc5_obj = $fields[$idx_rc5_obj];
|
my $rc5_obj = $fields[$idx_rc5_obj];
|
||||||
my $dso_scheme = $fields[$idx_dso_scheme];
|
my $dso_scheme = $fields[$idx_dso_scheme];
|
||||||
my $shared_target = $fields[$idx_shared_target];
|
my $shared_target = $fields[$idx_shared_target];
|
||||||
@@ -924,6 +968,9 @@ my $shared_cflag = $fields[$idx_shared_cflag];
|
|||||||
my $shared_ldflag = $fields[$idx_shared_ldflag];
|
my $shared_ldflag = $fields[$idx_shared_ldflag];
|
||||||
my $shared_extension = $fields[$idx_shared_extension];
|
my $shared_extension = $fields[$idx_shared_extension];
|
||||||
my $ranlib = $fields[$idx_ranlib];
|
my $ranlib = $fields[$idx_ranlib];
|
||||||
|
my $arflags = $fields[$idx_arflags];
|
||||||
|
|
||||||
|
my $no_shared_warn=0;
|
||||||
|
|
||||||
$cflags="$flags$cflags" if ($flags ne "");
|
$cflags="$flags$cflags" if ($flags ne "");
|
||||||
|
|
||||||
@@ -942,6 +989,17 @@ else
|
|||||||
my ($lresolv, $lpath, $lext);
|
my ($lresolv, $lpath, $lext);
|
||||||
if ($withargs{"krb5-flavor"} =~ /^[Hh]eimdal$/)
|
if ($withargs{"krb5-flavor"} =~ /^[Hh]eimdal$/)
|
||||||
{
|
{
|
||||||
|
die "Sorry, Heimdal is currently not supported\n";
|
||||||
|
}
|
||||||
|
##### HACK to force use of Heimdal.
|
||||||
|
##### WARNING: Since we don't really have adequate support for Heimdal,
|
||||||
|
##### using this will break the build. You'll have to make
|
||||||
|
##### changes to the source, and if you do, please send
|
||||||
|
##### patches to openssl-dev@openssl.org
|
||||||
|
if ($withargs{"krb5-flavor"} =~ /^force-[Hh]eimdal$/)
|
||||||
|
{
|
||||||
|
warn "Heimdal isn't really supported. Your build WILL break\n";
|
||||||
|
warn "If you fix the problems, please send a patch to openssl-dev\@openssl.org\n";
|
||||||
$withargs{"krb5-dir"} = "/usr/heimdal"
|
$withargs{"krb5-dir"} = "/usr/heimdal"
|
||||||
if $withargs{"krb5-dir"} eq "";
|
if $withargs{"krb5-dir"} eq "";
|
||||||
$withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}.
|
$withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}.
|
||||||
@@ -974,7 +1032,7 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$withargs{"krb5-lib"} .= " -lresolv"
|
$withargs{"krb5-lib"} .= " -lresolv"
|
||||||
if ("$lresolv");
|
if ("$lresolv" ne "");
|
||||||
$withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include"
|
$withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include"
|
||||||
if $withargs{"krb5-include"} eq "" &&
|
if $withargs{"krb5-include"} eq "" &&
|
||||||
$withargs{"krb5-dir"} ne "";
|
$withargs{"krb5-dir"} ne "";
|
||||||
@@ -1033,7 +1091,7 @@ else
|
|||||||
# }
|
# }
|
||||||
}
|
}
|
||||||
|
|
||||||
$lflags="$libs$lflags"if ($libs ne "");
|
$lflags="$libs$lflags" if ($libs ne "");
|
||||||
|
|
||||||
if ($no_asm)
|
if ($no_asm)
|
||||||
{
|
{
|
||||||
@@ -1041,6 +1099,11 @@ if ($no_asm)
|
|||||||
$sha1_obj=$md5_obj=$rmd160_obj="";
|
$sha1_obj=$md5_obj=$rmd160_obj="";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$no_shared)
|
||||||
|
{
|
||||||
|
$cast_obj=""; # CAST assembler is not PIC
|
||||||
|
}
|
||||||
|
|
||||||
if ($threads)
|
if ($threads)
|
||||||
{
|
{
|
||||||
$cflags=$thread_cflags;
|
$cflags=$thread_cflags;
|
||||||
@@ -1051,25 +1114,22 @@ if ($zlib)
|
|||||||
{
|
{
|
||||||
$cflags = "-DZLIB $cflags";
|
$cflags = "-DZLIB $cflags";
|
||||||
$cflags = "-DZLIB_SHARED $cflags" if $zlib == 2;
|
$cflags = "-DZLIB_SHARED $cflags" if $zlib == 2;
|
||||||
$lflags = "$lflags -lz" if $zlib == 2;
|
$lflags = "$lflags -lz" if $zlib == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
|
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
|
||||||
my $shared_mark = "";
|
my $shared_mark = "";
|
||||||
if ($shared_target ne "")
|
if ($shared_target eq "")
|
||||||
|
{
|
||||||
|
$no_shared_warn = 1 if !$no_shared;
|
||||||
|
$no_shared = 1;
|
||||||
|
}
|
||||||
|
if (!$no_shared)
|
||||||
{
|
{
|
||||||
if ($shared_cflag ne "")
|
if ($shared_cflag ne "")
|
||||||
{
|
{
|
||||||
$cflags = "$shared_cflag $cflags";
|
$cflags = "$shared_cflag $cflags";
|
||||||
}
|
}
|
||||||
if (!$no_shared)
|
|
||||||
{
|
|
||||||
#$shared_mark = "\$(SHARED_LIBS)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$no_shared = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sys_id ne "")
|
if ($sys_id ne "")
|
||||||
@@ -1090,7 +1150,11 @@ if ($ranlib eq "")
|
|||||||
|
|
||||||
$bn_obj = $bn_asm unless $bn_obj ne "";
|
$bn_obj = $bn_asm unless $bn_obj ne "";
|
||||||
|
|
||||||
$des_obj=$des_enc unless ($des_obj =~ /\.o$/);
|
if ($fips)
|
||||||
|
{
|
||||||
|
$des_obj=$sha1_obj="";
|
||||||
|
}
|
||||||
|
$des_obj=$des_enc unless (!$fips && $des_obj =~ /\.o$/);
|
||||||
$bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/);
|
$bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/);
|
||||||
$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/);
|
$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/);
|
||||||
$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/);
|
$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/);
|
||||||
@@ -1111,6 +1175,16 @@ if ($rmd160_obj =~ /\.o$/)
|
|||||||
$cflags.=" -DRMD160_ASM";
|
$cflags.=" -DRMD160_ASM";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($debug)
|
||||||
|
{
|
||||||
|
$cflags.=" -g";
|
||||||
|
$cflags=~s/-fomit-frame-pointer//;
|
||||||
|
}
|
||||||
|
|
||||||
|
# "Stringify" the C flags string. This permits it to be made part of a string
|
||||||
|
# and works as well on command lines.
|
||||||
|
$cflags =~ s/([\\\"])/\\\1/g;
|
||||||
|
|
||||||
my $version = "unknown";
|
my $version = "unknown";
|
||||||
my $major = "unknown";
|
my $major = "unknown";
|
||||||
my $minor = "unknown";
|
my $minor = "unknown";
|
||||||
@@ -1142,7 +1216,8 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
|
open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
|
||||||
open(OUT,">$Makefile") || die "unable to create $Makefile:$!\n";
|
unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
|
||||||
|
open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
|
||||||
print OUT "### Generated automatically from Makefile.org by Configure.\n\n";
|
print OUT "### Generated automatically from Makefile.org by Configure.\n\n";
|
||||||
my $sdirs=0;
|
my $sdirs=0;
|
||||||
while (<IN>)
|
while (<IN>)
|
||||||
@@ -1187,6 +1262,7 @@ while (<IN>)
|
|||||||
s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
|
s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
|
||||||
s/^PROCESSOR=.*/PROCESSOR= $processor/;
|
s/^PROCESSOR=.*/PROCESSOR= $processor/;
|
||||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||||
|
s/^ARFLAGS=.*/ARFLAGS= $arflags/;
|
||||||
s/^PERL=.*/PERL= $perl/;
|
s/^PERL=.*/PERL= $perl/;
|
||||||
s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/;
|
s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/;
|
||||||
s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/;
|
s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/;
|
||||||
@@ -1196,18 +1272,28 @@ while (<IN>)
|
|||||||
if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/)
|
if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/)
|
||||||
{
|
{
|
||||||
my $sotmp = $1;
|
my $sotmp = $1;
|
||||||
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/
|
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
|
||||||
|
}
|
||||||
|
elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.dylib$/)
|
||||||
|
{
|
||||||
|
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.dylib/;
|
||||||
}
|
}
|
||||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
|
elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
|
||||||
{
|
{
|
||||||
my $sotmp = $1;
|
my $sotmp = $1;
|
||||||
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
|
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
|
||||||
}
|
}
|
||||||
|
elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
|
||||||
|
{
|
||||||
|
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.\$(SHLIB_MAJOR).dylib .dylib/;
|
||||||
|
}
|
||||||
s/^SHARED_LDFLAGS=.*/SHARED_LDFLAGS=$shared_ldflag/;
|
s/^SHARED_LDFLAGS=.*/SHARED_LDFLAGS=$shared_ldflag/;
|
||||||
print OUT $_."\n";
|
print OUT $_."\n";
|
||||||
}
|
}
|
||||||
close(IN);
|
close(IN);
|
||||||
close(OUT);
|
close(OUT);
|
||||||
|
rename($Makefile,"$Makefile.bak") || die "unable to rename $Makefile\n" if -e $Makefile;
|
||||||
|
rename("$Makefile.new",$Makefile) || die "unable to rename $Makefile.new\n";
|
||||||
|
|
||||||
print "CC =$cc\n";
|
print "CC =$cc\n";
|
||||||
print "CFLAG =$cflags\n";
|
print "CFLAG =$cflags\n";
|
||||||
@@ -1223,11 +1309,10 @@ print "SHA1_OBJ_ASM =$sha1_obj\n";
|
|||||||
print "RMD160_OBJ_ASM=$rmd160_obj\n";
|
print "RMD160_OBJ_ASM=$rmd160_obj\n";
|
||||||
print "PROCESSOR =$processor\n";
|
print "PROCESSOR =$processor\n";
|
||||||
print "RANLIB =$ranlib\n";
|
print "RANLIB =$ranlib\n";
|
||||||
|
print "ARFLAGS =$arflags\n";
|
||||||
print "PERL =$perl\n";
|
print "PERL =$perl\n";
|
||||||
print "KRB5_INCLUDES =",$withargs{"krb5-include"},"\n"
|
print "KRB5_INCLUDES =",$withargs{"krb5-include"},"\n"
|
||||||
if $withargs{"krb5-include"} ne "";
|
if $withargs{"krb5-include"} ne "";
|
||||||
print "LIBKRB5 =",$withargs{"krb5-lib"},"\n"
|
|
||||||
if $withargs{"krb5-lib"} ne "";
|
|
||||||
|
|
||||||
my $des_ptr=0;
|
my $des_ptr=0;
|
||||||
my $des_risc1=0;
|
my $des_risc1=0;
|
||||||
@@ -1278,7 +1363,8 @@ foreach (sort split(/\s+/,$bn_ops))
|
|||||||
}
|
}
|
||||||
|
|
||||||
open(IN,'<crypto/opensslconf.h.in') || die "unable to read crypto/opensslconf.h.in:$!\n";
|
open(IN,'<crypto/opensslconf.h.in') || die "unable to read crypto/opensslconf.h.in:$!\n";
|
||||||
open(OUT,'>crypto/opensslconf.h') || die "unable to create crypto/opensslconf.h:$!\n";
|
unlink("crypto/opensslconf.h.new") || die "unable to remove old crypto/opensslconf.h.new:$!\n" if -e "crypto/opensslconf.h.new";
|
||||||
|
open(OUT,'>crypto/opensslconf.h.new') || die "unable to create crypto/opensslconf.h.new:$!\n";
|
||||||
print OUT "/* opensslconf.h */\n";
|
print OUT "/* opensslconf.h */\n";
|
||||||
print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n";
|
print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n";
|
||||||
|
|
||||||
@@ -1372,6 +1458,8 @@ while (<IN>)
|
|||||||
}
|
}
|
||||||
close(IN);
|
close(IN);
|
||||||
close(OUT);
|
close(OUT);
|
||||||
|
rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h";
|
||||||
|
rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n";
|
||||||
|
|
||||||
|
|
||||||
# Fix the date
|
# Fix the date
|
||||||
@@ -1411,11 +1499,13 @@ if($IsWindows) {
|
|||||||
EOF
|
EOF
|
||||||
close(OUT);
|
close(OUT);
|
||||||
} else {
|
} else {
|
||||||
(system "make -f Makefile.ssl PERL=\'$perl\' links") == 0 or exit $?
|
my $make_command = "make -f Makefile.ssl PERL=\'$perl\'";
|
||||||
if $symlink;
|
my $make_targets = "";
|
||||||
### (system 'make depend') == 0 or exit $? if $depflags ne "";
|
$make_targets .= " links" if $symlink;
|
||||||
# Run "make depend" manually if you want to be able to delete
|
$make_targets .= " depend" if $depflags ne "" && $make_depend;
|
||||||
# the source code files of ciphers you left out.
|
$make_targets .= " gentests" if $symlink;
|
||||||
|
(system $make_command.$make_targets) == 0 or exit $?
|
||||||
|
if $make_targets ne "";
|
||||||
if ( $perl =~ m@^/@) {
|
if ( $perl =~ m@^/@) {
|
||||||
&dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
|
&dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
|
||||||
&dofile("apps/der_chop",$perl,'^#!/', '#!%s');
|
&dofile("apps/der_chop",$perl,'^#!/', '#!%s');
|
||||||
@@ -1425,7 +1515,16 @@ EOF
|
|||||||
&dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
|
&dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
|
||||||
&dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s');
|
&dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s');
|
||||||
&dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
|
&dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
|
||||||
}
|
}
|
||||||
|
if ($depflags ne "" && !$make_depend) {
|
||||||
|
print <<EOF;
|
||||||
|
|
||||||
|
Since you've disabled at least one algorithm, you need to do the following
|
||||||
|
before building:
|
||||||
|
|
||||||
|
make depend
|
||||||
|
EOF
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
@@ -1440,6 +1539,16 @@ applications as the compiler options required on this system are not known.
|
|||||||
See file INSTALL for details if you need multi-threading.
|
See file INSTALL for details if you need multi-threading.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
print <<\EOF if ($no_shared_warn);
|
||||||
|
|
||||||
|
You gave the option 'shared'. Normally, that would give you shared libraries.
|
||||||
|
Unfortunately, the OpenSSL configuration doesn't include shared library support
|
||||||
|
for this platform yet, so it will pretend you gave the option 'no-shared'. If
|
||||||
|
you can inform the developpers (openssl-dev\@openssl.org) how to support shared
|
||||||
|
libraries on this platform, they will at least look at it and try their best
|
||||||
|
(but please first make sure you have tried with a current version of OpenSSL).
|
||||||
|
EOF
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
sub usage
|
sub usage
|
||||||
@@ -1516,7 +1625,7 @@ sub print_table_entry
|
|||||||
my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
|
my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
|
||||||
my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
|
my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
|
||||||
my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag,
|
my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag,
|
||||||
my $shared_ldflag,my $shared_extension,my $ranlib)=
|
my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags)=
|
||||||
split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||||
|
|
||||||
print <<EOF
|
print <<EOF
|
||||||
@@ -1544,6 +1653,7 @@ sub print_table_entry
|
|||||||
\$shared_ldflag = $shared_ldflag
|
\$shared_ldflag = $shared_ldflag
|
||||||
\$shared_extension = $shared_extension
|
\$shared_extension = $shared_extension
|
||||||
\$ranlib = $ranlib
|
\$ranlib = $ranlib
|
||||||
|
\$arflags = $arflags
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
192
FAQ
192
FAQ
@@ -9,6 +9,7 @@ OpenSSL - Frequently Asked Questions
|
|||||||
* Where can I get a compiled version of OpenSSL?
|
* Where can I get a compiled version of OpenSSL?
|
||||||
* Why aren't tools like 'autoconf' and 'libtool' used?
|
* Why aren't tools like 'autoconf' and 'libtool' used?
|
||||||
* What is an 'engine' version?
|
* What is an 'engine' version?
|
||||||
|
* How do I check the authenticity of the OpenSSL distribution?
|
||||||
|
|
||||||
[LEGAL] Legal questions
|
[LEGAL] Legal questions
|
||||||
|
|
||||||
@@ -29,15 +30,22 @@ OpenSSL - Frequently Asked Questions
|
|||||||
* Why can't I use OpenSSL certificates with SSL client authentication?
|
* Why can't I use OpenSSL certificates with SSL client authentication?
|
||||||
* Why does my browser give a warning about a mismatched hostname?
|
* Why does my browser give a warning about a mismatched hostname?
|
||||||
* How do I install a CA certificate into a browser?
|
* How do I install a CA certificate into a browser?
|
||||||
|
* Why is OpenSSL x509 DN output not conformant to RFC2253?
|
||||||
|
|
||||||
[BUILD] Questions about building and testing OpenSSL
|
[BUILD] Questions about building and testing OpenSSL
|
||||||
|
|
||||||
* Why does the linker complain about undefined symbols?
|
* Why does the linker complain about undefined symbols?
|
||||||
* Why does the OpenSSL test fail with "bc: command not found"?
|
* Why does the OpenSSL test fail with "bc: command not found"?
|
||||||
* Why does the OpenSSL test fail with "bc: 1 no implemented"?
|
* Why does the OpenSSL test fail with "bc: 1 no implemented"?
|
||||||
|
* Why does the OpenSSL test fail with "bc: stack empty"?
|
||||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
||||||
* Why does the OpenSSL compilation fail with "ar: command not found"?
|
* Why does the OpenSSL compilation fail with "ar: command not found"?
|
||||||
* Why does the OpenSSL compilation fail on Win32 with VC++?
|
* Why does the OpenSSL compilation fail on Win32 with VC++?
|
||||||
|
* What is special about OpenSSL on Redhat?
|
||||||
|
* Why does the OpenSSL compilation fail on MacOS X?
|
||||||
|
* Why does the OpenSSL test suite fail on MacOS X?
|
||||||
|
* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]?
|
||||||
|
* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"?
|
||||||
|
|
||||||
[PROG] Questions about programming with OpenSSL
|
[PROG] Questions about programming with OpenSSL
|
||||||
|
|
||||||
@@ -51,6 +59,7 @@ OpenSSL - Frequently Asked Questions
|
|||||||
* Why can't the OpenSSH configure script detect OpenSSL?
|
* Why can't the OpenSSH configure script detect OpenSSL?
|
||||||
* Can I use OpenSSL's SSL library with non-blocking I/O?
|
* Can I use OpenSSL's SSL library with non-blocking I/O?
|
||||||
* Why doesn't my server application receive a client certificate?
|
* Why doesn't my server application receive a client certificate?
|
||||||
|
* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier?
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
@@ -59,7 +68,7 @@ OpenSSL - Frequently Asked Questions
|
|||||||
* Which is the current version of OpenSSL?
|
* Which is the current version of OpenSSL?
|
||||||
|
|
||||||
The current version is available from <URL: http://www.openssl.org>.
|
The current version is available from <URL: http://www.openssl.org>.
|
||||||
OpenSSL 0.9.6c was released on December 21st, 2001.
|
OpenSSL 0.9.7c was released on September 30, 2003.
|
||||||
|
|
||||||
In addition to the current stable release, you can also access daily
|
In addition to the current stable release, you can also access daily
|
||||||
snapshots of the OpenSSL development version at <URL:
|
snapshots of the OpenSSL development version at <URL:
|
||||||
@@ -130,6 +139,19 @@ hardware. This was realized in a special release '0.9.6-engine'. With
|
|||||||
version 0.9.7 (not yet released) the changes were merged into the main
|
version 0.9.7 (not yet released) the changes were merged into the main
|
||||||
development line, so that the special release is no longer necessary.
|
development line, so that the special release is no longer necessary.
|
||||||
|
|
||||||
|
* How do I check the authenticity of the OpenSSL distribution?
|
||||||
|
|
||||||
|
We provide MD5 digests and ASC signatures of each tarball.
|
||||||
|
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). Then
|
||||||
|
just do:
|
||||||
|
|
||||||
|
pgp TARBALL.asc
|
||||||
|
|
||||||
[LEGAL] =======================================================================
|
[LEGAL] =======================================================================
|
||||||
|
|
||||||
* Do I need patent licenses to use OpenSSL?
|
* Do I need patent licenses to use OpenSSL?
|
||||||
@@ -167,18 +189,30 @@ for permission to use their software with OpenSSL.
|
|||||||
|
|
||||||
Cryptographic software needs a source of unpredictable data to work
|
Cryptographic software needs a source of unpredictable data to work
|
||||||
correctly. Many open source operating systems provide a "randomness
|
correctly. Many open source operating systems provide a "randomness
|
||||||
device" that serves this purpose. On other systems, applications have
|
device" (/dev/urandom or /dev/random) that serves this purpose.
|
||||||
to call the RAND_add() or RAND_seed() function with appropriate data
|
All OpenSSL versions try to use /dev/urandom by default; starting with
|
||||||
before generating keys or performing public key encryption.
|
version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not
|
||||||
(These functions initialize the pseudo-random number generator, PRNG.)
|
available.
|
||||||
|
|
||||||
Some broken applications do not do this. As of version 0.9.5, the
|
On other systems, applications have to call the RAND_add() or
|
||||||
OpenSSL functions that need randomness report an error if the random
|
RAND_seed() function with appropriate data before generating keys or
|
||||||
number generator has not been seeded with at least 128 bits of
|
performing public key encryption. (These functions initialize the
|
||||||
randomness. If this error occurs, please contact the author of the
|
pseudo-random number generator, PRNG.) Some broken applications do
|
||||||
application you are using. It is likely that it never worked
|
not do this. As of version 0.9.5, the OpenSSL functions that need
|
||||||
correctly. OpenSSL 0.9.5 and later make the error visible by refusing
|
randomness report an error if the random number generator has not been
|
||||||
to perform potentially insecure encryption.
|
seeded with at least 128 bits of randomness. If this error occurs and
|
||||||
|
is not discussed in the documentation of the application you are
|
||||||
|
using, please contact the author of that application; it is likely
|
||||||
|
that it never worked correctly. OpenSSL 0.9.5 and later make the
|
||||||
|
error visible by refusing to perform potentially insecure encryption.
|
||||||
|
|
||||||
|
If you are using Solaris 8, you can add /dev/urandom and /dev/random
|
||||||
|
devices by installing patch 112438 (Sparc) or 112439 (x86), which are
|
||||||
|
available via the Patchfinder at <URL: http://sunsolve.sun.com>
|
||||||
|
(Solaris 9 includes these devices by default). For /dev/random support
|
||||||
|
for earlier Solaris versions, see Sun's statement at
|
||||||
|
<URL: http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski>
|
||||||
|
(the SUNWski package is available in patch 105710).
|
||||||
|
|
||||||
On systems without /dev/urandom and /dev/random, it is a good idea to
|
On systems without /dev/urandom and /dev/random, it is a good idea to
|
||||||
use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for
|
use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for
|
||||||
@@ -211,13 +245,6 @@ OpenSSL command line tools. Applications using the OpenSSL library
|
|||||||
provide their own configuration options to specify the entropy source,
|
provide their own configuration options to specify the entropy source,
|
||||||
please check out the documentation coming the with application.
|
please check out the documentation coming the with application.
|
||||||
|
|
||||||
For Solaris 2.6, Tim Nibbe <tnibbe@sprint.net> and others have suggested
|
|
||||||
installing the SUNski package from Sun patch 105710-01 (Sparc) which
|
|
||||||
adds a /dev/random device and make sure it gets used, usually through
|
|
||||||
$RANDFILE. There are probably similar patches for the other Solaris
|
|
||||||
versions. However, be warned that /dev/random is usually a blocking
|
|
||||||
device, which may have some effects on OpenSSL.
|
|
||||||
|
|
||||||
|
|
||||||
* Why do I get an "unable to write 'random state'" error message?
|
* Why do I get an "unable to write 'random state'" error message?
|
||||||
|
|
||||||
@@ -343,6 +370,13 @@ DO NOT DO THIS! This command will give away your CAs private key and
|
|||||||
reduces its security to zero: allowing anyone to forge certificates in
|
reduces its security to zero: allowing anyone to forge certificates in
|
||||||
whatever name they choose.
|
whatever name they choose.
|
||||||
|
|
||||||
|
* Why is OpenSSL x509 DN output not conformant to RFC2253?
|
||||||
|
|
||||||
|
The ways to print out the oneline format of the DN (Distinguished Name) have
|
||||||
|
been extended in version 0.9.7 of OpenSSL. Using the new X509_NAME_print_ex()
|
||||||
|
interface, the "-nameopt" option could be introduded. See the manual
|
||||||
|
page of the "openssl x509" commandline tool for details. The old behaviour
|
||||||
|
has however been left as default for the sake of compatibility.
|
||||||
|
|
||||||
[BUILD] =======================================================================
|
[BUILD] =======================================================================
|
||||||
|
|
||||||
@@ -387,6 +421,17 @@ and compile/install it. GNU bc (see http://www.gnu.org/software/software.html
|
|||||||
for download instructions) can be safely used, for example.
|
for download instructions) can be safely used, for example.
|
||||||
|
|
||||||
|
|
||||||
|
* Why does the OpenSSL test fail with "bc: stack empty"?
|
||||||
|
|
||||||
|
On some DG/ux versions, bc seems to have a too small stack for calculations
|
||||||
|
that the OpenSSL bntest throws at it. This gets triggered when you run the
|
||||||
|
test suite (using "make test"). The message returned is "bc: stack empty".
|
||||||
|
|
||||||
|
The best way to deal with this is to find another implementation of bc
|
||||||
|
and compile/install it. GNU bc (see http://www.gnu.org/software/software.html
|
||||||
|
for download instructions) can be safely used, for example.
|
||||||
|
|
||||||
|
|
||||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
||||||
|
|
||||||
On some Alpha installations running Tru64 Unix and Compaq C, the compilation
|
On some Alpha installations running Tru64 Unix and Compaq C, the compilation
|
||||||
@@ -445,12 +490,104 @@ and then redo the compilation. What you should really do is make sure
|
|||||||
Sometimes, you may get reports from VC++ command line (cl) that it
|
Sometimes, you may get reports from VC++ command line (cl) that it
|
||||||
can't find standard include files like stdio.h and other weirdnesses.
|
can't find standard include files like stdio.h and other weirdnesses.
|
||||||
One possible cause is that the environment isn't correctly set up.
|
One possible cause is that the environment isn't correctly set up.
|
||||||
To solve that problem, one should run VCVARS32.BAT which is found in
|
To solve that problem for VC++ versions up to 6, one should run
|
||||||
the 'bin' subdirectory of the VC++ installation directory (somewhere
|
VCVARS32.BAT which is found in the 'bin' subdirectory of the VC++
|
||||||
under 'Program Files'). This needs to be done prior to running NMAKE,
|
installation directory (somewhere under 'Program Files'). For VC++
|
||||||
and the changes are only valid for the current DOS session.
|
version 7 (and up?), which is also called VS.NET, the file is called
|
||||||
|
VSVARS32.BAT instead.
|
||||||
|
This needs to be done prior to running NMAKE, and the changes are only
|
||||||
|
valid for the current DOS session.
|
||||||
|
|
||||||
|
|
||||||
|
* What is special about OpenSSL on Redhat?
|
||||||
|
|
||||||
|
Red Hat Linux (release 7.0 and later) include a preinstalled limited
|
||||||
|
version of OpenSSL. For patent reasons, support for IDEA, RC5 and MDC2
|
||||||
|
is disabled in this version. The same may apply to other Linux distributions.
|
||||||
|
Users may therefore wish to install more or all of the features left out.
|
||||||
|
|
||||||
|
To do this you MUST ensure that you do not overwrite the openssl that is in
|
||||||
|
/usr/bin on your Red Hat machine. Several packages depend on this file,
|
||||||
|
including sendmail and ssh. /usr/local/bin is a good alternative choice. The
|
||||||
|
libraries that come with Red Hat 7.0 onwards have different names and so are
|
||||||
|
not affected. (eg For Red Hat 7.2 they are /lib/libssl.so.0.9.6b and
|
||||||
|
/lib/libcrypto.so.0.9.6b with symlinks /lib/libssl.so.2 and
|
||||||
|
/lib/libcrypto.so.2 respectively).
|
||||||
|
|
||||||
|
Please note that we have been advised by Red Hat attempting to recompile the
|
||||||
|
openssl rpm with all the cryptography enabled will not work. All other
|
||||||
|
packages depend on the original Red Hat supplied openssl package. It is also
|
||||||
|
worth noting that due to the way Red Hat supplies its packages, updates to
|
||||||
|
openssl on each distribution never change the package version, only the
|
||||||
|
build number. For example, on Red Hat 7.1, the latest openssl package has
|
||||||
|
version number 0.9.6 and build number 9 even though it contains all the
|
||||||
|
relevant updates in packages up to and including 0.9.6b.
|
||||||
|
|
||||||
|
A possible way around this is to persuade Red Hat to produce a non-US
|
||||||
|
version of Red Hat Linux.
|
||||||
|
|
||||||
|
FYI: Patent numbers and expiry dates of US patents:
|
||||||
|
MDC-2: 4,908,861 13/03/2007
|
||||||
|
IDEA: 5,214,703 25/05/2010
|
||||||
|
RC5: 5,724,428 03/03/2015
|
||||||
|
|
||||||
|
|
||||||
|
* Why does the OpenSSL compilation fail on MacOS X?
|
||||||
|
|
||||||
|
If the failure happens when trying to build the "openssl" binary, with
|
||||||
|
a large number of undefined symbols, it's very probable that you have
|
||||||
|
OpenSSL 0.9.6b delivered with the operating system (you can find out by
|
||||||
|
running '/usr/bin/openssl version') and that you were trying to build
|
||||||
|
OpenSSL 0.9.7 or newer. The problem is that the loader ('ld') in
|
||||||
|
MacOS X has a misfeature that's quite difficult to go around.
|
||||||
|
Look in the file PROBLEMS for a more detailed explanation and for possible
|
||||||
|
solutions.
|
||||||
|
|
||||||
|
|
||||||
|
* Why does the OpenSSL test suite fail on MacOS X?
|
||||||
|
|
||||||
|
If the failure happens when running 'make test' and the RC4 test fails,
|
||||||
|
it's very probable that you have OpenSSL 0.9.6b delivered with the
|
||||||
|
operating system (you can find out by running '/usr/bin/openssl version')
|
||||||
|
and that you were trying to build OpenSSL 0.9.6d. The problem is that
|
||||||
|
the loader ('ld') in MacOS X has a misfeature that's quite difficult to
|
||||||
|
go around and has linked the programs "openssl" and the test programs
|
||||||
|
with /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib instead of the
|
||||||
|
libraries you just built.
|
||||||
|
Look in the file PROBLEMS for a more detailed explanation and for possible
|
||||||
|
solutions.
|
||||||
|
|
||||||
|
* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]?
|
||||||
|
|
||||||
|
Failure in BN_sqr test is most likely caused by a failure to configure the
|
||||||
|
toolkit for current platform or lack of support for the platform in question.
|
||||||
|
Run './config -t' and './apps/openssl version -p'. Do these platform
|
||||||
|
identifiers match? If they don't, then you most likely failed to run
|
||||||
|
./config and you're hereby advised to do so before filing a bug report.
|
||||||
|
If ./config itself fails to run, then it's most likely problem with your
|
||||||
|
local environment and you should turn to your system administrator (or
|
||||||
|
similar). If identifiers match (and/or no alternative identifier is
|
||||||
|
suggested by ./config script), then the platform is unsupported. There might
|
||||||
|
or might not be a workaround. Most notably on SPARC64 platforms with GNU
|
||||||
|
C compiler you should be able to produce a working build by running
|
||||||
|
'./config -m32'. I understand that -m32 might not be what you want/need,
|
||||||
|
but the build should be operational. For further details turn to
|
||||||
|
<openssl-dev@openssl.org>.
|
||||||
|
|
||||||
|
* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"?
|
||||||
|
|
||||||
|
As of 0.9.7 assembler routines were overhauled for position independence
|
||||||
|
of the machine code, which is essential for shared library support. For
|
||||||
|
some reason OpenBSD is equipped with an out-of-date GNU assembler which
|
||||||
|
finds the new code offensive. To work around the problem, configure with
|
||||||
|
no-asm (and sacrifice a great deal of performance) or patch your assembler
|
||||||
|
according to <URL: http://www.openssl.org/~appro/gas-1.92.3.OpenBSD.patch>.
|
||||||
|
For your convenience a pre-compiled replacement binary is provided at
|
||||||
|
<URL: http://www.openssl.org/~appro/gas-1.92.3.static.aout.bin>.
|
||||||
|
Reportedly elder *BSD a.out platforms also suffer from this problem and
|
||||||
|
remedy should be same. Provided binary is statically linked and should be
|
||||||
|
working across wider range of *BSD branches, not just OpenBSD.
|
||||||
|
|
||||||
[PROG] ========================================================================
|
[PROG] ========================================================================
|
||||||
|
|
||||||
* Is OpenSSL thread-safe?
|
* Is OpenSSL thread-safe?
|
||||||
@@ -595,6 +732,7 @@ The general answer is to check the config.log file generated when running
|
|||||||
the OpenSSH configure script. It should contain the detailed information
|
the OpenSSH configure script. It should contain the detailed information
|
||||||
on why the OpenSSL library was not detected or considered incompatible.
|
on why the OpenSSL library was not detected or considered incompatible.
|
||||||
|
|
||||||
|
|
||||||
* Can I use OpenSSL's SSL library with non-blocking I/O?
|
* Can I use OpenSSL's SSL library with non-blocking I/O?
|
||||||
|
|
||||||
Yes; make sure to read the SSL_get_error(3) manual page!
|
Yes; make sure to read the SSL_get_error(3) manual page!
|
||||||
@@ -616,5 +754,13 @@ if explicitly asked by the server. Use the SSL_VERIFY_PEER flag of the
|
|||||||
SSL_CTX_set_verify() function to enable the use of client certificates.
|
SSL_CTX_set_verify() function to enable the use of client certificates.
|
||||||
|
|
||||||
|
|
||||||
|
* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier?
|
||||||
|
|
||||||
|
For OpenSSL 0.9.7 the OID table was extended and corrected. In earlier
|
||||||
|
versions, uniqueIdentifier was incorrectly used for X.509 certificates.
|
||||||
|
The correct name according to RFC2256 (LDAP) is x500UniqueIdentifier.
|
||||||
|
Change your code to use the new name when compiling against OpenSSL 0.9.7.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
|
|||||||
52
INSTALL
52
INSTALL
@@ -2,8 +2,10 @@
|
|||||||
INSTALLATION ON THE UNIX PLATFORM
|
INSTALLATION ON THE UNIX PLATFORM
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
[Installation on Windows, OpenVMS and MacOS (before MacOS X) is described
|
[Installation on DOS (with djgpp), Windows, OpenVMS and MacOS (before MacOS X)
|
||||||
in INSTALL.W32, INSTALL.VMS and INSTALL.MacOS.]
|
is described in INSTALL.DJGPP, INSTALL.W32, INSTALL.VMS and INSTALL.MacOS.
|
||||||
|
This document describes installation on operating systems in the Unix
|
||||||
|
family.]
|
||||||
|
|
||||||
To install OpenSSL, you will need:
|
To install OpenSSL, you will need:
|
||||||
|
|
||||||
@@ -137,8 +139,11 @@
|
|||||||
the failure that aren't problems in OpenSSL itself (like missing
|
the failure that aren't problems in OpenSSL itself (like missing
|
||||||
standard headers). If it is a problem with OpenSSL itself, please
|
standard headers). If it is a problem with OpenSSL itself, please
|
||||||
report the problem to <openssl-bugs@openssl.org> (note that your
|
report the problem to <openssl-bugs@openssl.org> (note that your
|
||||||
message will be forwarded to a public mailing list). Include the
|
message will be recorded in the request tracker publicly readable
|
||||||
output of "make report" in your message.
|
via http://www.openssl.org/support/rt2.html and will be forwarded to a
|
||||||
|
public mailing list). Include the output of "make report" in your message.
|
||||||
|
Please check out the request tracker. Maybe the bug was already
|
||||||
|
reported or has already been fixed.
|
||||||
|
|
||||||
[If you encounter assembler error messages, try the "no-asm"
|
[If you encounter assembler error messages, try the "no-asm"
|
||||||
configuration option as an immediate fix.]
|
configuration option as an immediate fix.]
|
||||||
@@ -153,10 +158,11 @@
|
|||||||
If a test fails, look at the output. There may be reasons for
|
If a test fails, look at the output. There may be reasons for
|
||||||
the failure that isn't a problem in OpenSSL itself (like a missing
|
the failure that isn't a problem in OpenSSL itself (like a missing
|
||||||
or malfunctioning bc). If it is a problem with OpenSSL itself,
|
or malfunctioning bc). If it is a problem with OpenSSL itself,
|
||||||
try removing any compiler optimization flags from the CFLAGS line
|
try removing any compiler optimization flags from the CFLAG line
|
||||||
in Makefile.ssl and run "make clean; make". Please send a bug
|
in Makefile.ssl and run "make clean; make". Please send a bug
|
||||||
report to <openssl-bugs@openssl.org>, including the output of
|
report to <openssl-bugs@openssl.org>, including the output of
|
||||||
"make report".
|
"make report" in order to be added to the request tracker at
|
||||||
|
http://www.openssl.org/support/rt2.html.
|
||||||
|
|
||||||
4. If everything tests ok, install OpenSSL with
|
4. If everything tests ok, install OpenSSL with
|
||||||
|
|
||||||
@@ -290,3 +296,37 @@
|
|||||||
targets for shared library creation, like linux-shared. Those targets
|
targets for shared library creation, like linux-shared. Those targets
|
||||||
can currently be used on their own just as well, but this is expected
|
can currently be used on their own just as well, but this is expected
|
||||||
to change in future versions of OpenSSL.
|
to change in future versions of OpenSSL.
|
||||||
|
|
||||||
|
Note on random number generation
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
Availability of cryptographically secure random numbers is required for
|
||||||
|
secret key generation. OpenSSL provides several options to seed the
|
||||||
|
internal PRNG. If not properly seeded, the internal PRNG will refuse
|
||||||
|
to deliver random bytes and a "PRNG not seeded error" will occur.
|
||||||
|
On systems without /dev/urandom (or similar) device, it may be necessary
|
||||||
|
to install additional support software to obtain random seed.
|
||||||
|
Please check out the manual pages for RAND_add(), RAND_bytes(), RAND_egd(),
|
||||||
|
and the FAQ for more information.
|
||||||
|
|
||||||
|
Note on support for multiple builds
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
OpenSSL is usually built in it's source tree. Unfortunately, this doesn't
|
||||||
|
support building for multiple platforms from the same source tree very well.
|
||||||
|
It is however possible to build in a separate tree through the use of lots
|
||||||
|
of symbolic links, which should be prepared like this:
|
||||||
|
|
||||||
|
mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
|
||||||
|
cd objtree/"`uname -s`-`uname -r`-`uname -m`"
|
||||||
|
(cd $OPENSSL_SOURCE; find . -type f) | while read F; do
|
||||||
|
mkdir -p `dirname $F`
|
||||||
|
rm -f $F; ln -s $OPENSSL_SOURCE/$F $F
|
||||||
|
echo $F '->' $OPENSSL_SOURCE/$F
|
||||||
|
done
|
||||||
|
make -f Makefile.org clean
|
||||||
|
|
||||||
|
OPENSSL_SOURCE is an environment variable that contains the absolute (this
|
||||||
|
is important!) path to the OpenSSL source tree.
|
||||||
|
|
||||||
|
Also, operations like 'make update' should still be made in the source tree.
|
||||||
|
|||||||
34
INSTALL.DJGPP
Normal file
34
INSTALL.DJGPP
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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/".
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
@@ -20,3 +20,12 @@
|
|||||||
|
|
||||||
If that finishes successfully you will find the libraries and programs in the
|
If that finishes successfully you will find the libraries and programs in the
|
||||||
"out" directory.
|
"out" directory.
|
||||||
|
|
||||||
|
Alternatively, you can make a dynamic build that puts the library code into
|
||||||
|
crypto.dll and ssl.dll by running
|
||||||
|
|
||||||
|
> make -f os2-emx-dll.mak
|
||||||
|
|
||||||
|
This will build the above mentioned dlls and a matching pair of import
|
||||||
|
libraries in the "out_dll" directory along with the set of test programs
|
||||||
|
and the openssl application.
|
||||||
|
|||||||
174
INSTALL.W32
174
INSTALL.W32
@@ -2,19 +2,28 @@
|
|||||||
INSTALLATION ON THE WIN32 PLATFORM
|
INSTALLATION ON THE WIN32 PLATFORM
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
|
[Instructions for building for Windows CE can be found in INSTALL.WCE]
|
||||||
|
|
||||||
Heres a few comments about building OpenSSL in Windows environments. Most
|
Heres a few comments about building OpenSSL in Windows environments. Most
|
||||||
of this is tested on Win32 but it may also work in Win 3.1 with some
|
of this is tested on Win32 but it may also work in Win 3.1 with some
|
||||||
modification.
|
modification.
|
||||||
|
|
||||||
You need Perl for Win32. Unless you will build on CygWin32, you will need
|
You need Perl for Win32. Unless you will build on Cygwin, you will need
|
||||||
ActiveState Perl, available from http://www.activestate.com/ActivePerl.
|
ActiveState Perl, available from http://www.activestate.com/ActivePerl.
|
||||||
For CygWin32 users, there's more info in the CygWin32 section.
|
|
||||||
|
|
||||||
and one of the following C compilers:
|
and one of the following C compilers:
|
||||||
|
|
||||||
* Visual C++
|
* Visual C++
|
||||||
* Borland C
|
* Borland C
|
||||||
* GNU C (Mingw32 or Cygwin32)
|
* GNU C (Cygwin or MinGW)
|
||||||
|
|
||||||
|
If you are compiling from a tarball or a CVS snapshot then the Win32 files
|
||||||
|
may well be not up to date. This may mean that some "tweaking" is required to
|
||||||
|
get it all to work. See the trouble shooting section later on for if (when?)
|
||||||
|
it goes wrong.
|
||||||
|
|
||||||
|
Visual C++
|
||||||
|
----------
|
||||||
|
|
||||||
If you want to compile in the assembly language routines with Visual C++ then
|
If you want to compile in the assembly language routines with Visual C++ then
|
||||||
you will need an assembler. This is worth doing because it will result in
|
you will need an assembler. This is worth doing because it will result in
|
||||||
@@ -24,26 +33,19 @@
|
|||||||
* Microsoft MASM (aka "ml")
|
* Microsoft MASM (aka "ml")
|
||||||
* Free Netwide Assembler NASM.
|
* Free Netwide Assembler NASM.
|
||||||
|
|
||||||
MASM was at one point distributed with VC++. It is now distributed with some
|
MASM is distributed with most versions of VC++. For the versions where it is
|
||||||
Microsoft DDKs, for example the Windows NT 4.0 DDK and the Windows 98 DDK. If
|
not included in VC++, it is also distributed with some Microsoft DDKs, for
|
||||||
you do not have either of these DDKs then you can just download the binaries
|
example the Windows NT 4.0 DDK and the Windows 98 DDK. If you do not have
|
||||||
for the Windows 98 DDK and extract and rename the two files XXXXXml.exe and
|
either of these DDKs then you can just download the binaries for the Windows
|
||||||
XXXXXml.err, to ml.exe and ml.err and install somewhere on your PATH. Both
|
98 DDK and extract and rename the two files XXXXXml.exe and XXXXXml.err, to
|
||||||
DDKs can be downloaded from the Microsoft developers site www.msdn.com.
|
ml.exe and ml.err and install somewhere on your PATH. Both DDKs can be
|
||||||
|
downloaded from the Microsoft developers site www.msdn.com.
|
||||||
|
|
||||||
NASM is freely available. Version 0.98 was used during testing: other versions
|
NASM is freely available. Version 0.98 was used during testing: other versions
|
||||||
may also work. It is available from many places, see for example:
|
may also work. It is available from many places, see for example:
|
||||||
http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
|
http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
|
||||||
The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
|
The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
|
||||||
|
|
||||||
If you are compiling from a tarball or a CVS snapshot then the Win32 files
|
|
||||||
may well be not up to date. This may mean that some "tweaking" is required to
|
|
||||||
get it all to work. See the trouble shooting section later on for if (when?)
|
|
||||||
it goes wrong.
|
|
||||||
|
|
||||||
Visual C++
|
|
||||||
----------
|
|
||||||
|
|
||||||
Firstly you should run Configure:
|
Firstly you should run Configure:
|
||||||
|
|
||||||
> perl Configure VC-WIN32
|
> perl Configure VC-WIN32
|
||||||
@@ -81,8 +83,9 @@
|
|||||||
|
|
||||||
There are various changes you can make to the Win32 compile environment. By
|
There are various changes you can make to the Win32 compile environment. By
|
||||||
default the library is not compiled with debugging symbols. If you add 'debug'
|
default the library is not compiled with debugging symbols. If you add 'debug'
|
||||||
to the mk1mk.pl lines in the do_* batch file then debugging symbols will be
|
to the mk1mf.pl lines in the do_* batch file then debugging symbols will be
|
||||||
compiled in.
|
compiled in. Note that mk1mf.pl expects the platform to be the last argument
|
||||||
|
on the command line, so 'debug' must appear before that, as all other options.
|
||||||
|
|
||||||
The default Win32 environment is to leave out any Windows NT specific
|
The default Win32 environment is to leave out any Windows NT specific
|
||||||
features.
|
features.
|
||||||
@@ -94,6 +97,18 @@
|
|||||||
You can also build a static version of the library using the Makefile
|
You can also build a static version of the library using the Makefile
|
||||||
ms\nt.mak
|
ms\nt.mak
|
||||||
|
|
||||||
|
Borland C++ builder 5
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
* Configure for building with Borland Builder:
|
||||||
|
> perl Configure BC-32
|
||||||
|
|
||||||
|
* Create the appropriate makefile
|
||||||
|
> ms\do_nasm
|
||||||
|
|
||||||
|
* Build
|
||||||
|
> make -f ms\bcb.mak
|
||||||
|
|
||||||
Borland C++ builder 3 and 4
|
Borland C++ builder 3 and 4
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
@@ -104,18 +119,72 @@
|
|||||||
* Run make:
|
* Run make:
|
||||||
> make -f bcb.mak
|
> make -f bcb.mak
|
||||||
|
|
||||||
GNU C (Mingw32)
|
GNU C (Cygwin)
|
||||||
---------------
|
--------------
|
||||||
|
|
||||||
To build OpenSSL, you need the Mingw32 package and GNU make.
|
Cygwin provides a bash shell and GNU tools environment running
|
||||||
|
on NT 4.0, Windows 9x, Windows ME, Windows 2000, and Windows XP.
|
||||||
|
Consequently, a make of OpenSSL with Cygwin is closer to a GNU
|
||||||
|
bash environment such as Linux than to other the other Win32
|
||||||
|
makes.
|
||||||
|
|
||||||
|
Cygwin implements a Posix/Unix runtime system (cygwin1.dll).
|
||||||
|
It is also possible to create Win32 binaries that only use the
|
||||||
|
Microsoft C runtime system (msvcrt.dll or crtdll.dll) using
|
||||||
|
MinGW. MinGW can be used in the Cygwin development environment
|
||||||
|
or in a standalone setup as described in the following section.
|
||||||
|
|
||||||
|
To build OpenSSL using Cygwin:
|
||||||
|
|
||||||
|
* Install Cygwin (see http://cygwin.com/)
|
||||||
|
|
||||||
|
* Install Perl and ensure it is in the path. Both Cygwin perl
|
||||||
|
(5.6.1-2 or newer) and ActivePerl work.
|
||||||
|
|
||||||
|
* Run the Cygwin bash shell
|
||||||
|
|
||||||
|
* $ tar zxvf openssl-x.x.x.tar.gz
|
||||||
|
$ cd openssl-x.x.x
|
||||||
|
|
||||||
|
To build the Cygwin version of OpenSSL:
|
||||||
|
|
||||||
|
$ ./config
|
||||||
|
[...]
|
||||||
|
$ make
|
||||||
|
[...]
|
||||||
|
$ make test
|
||||||
|
$ make install
|
||||||
|
|
||||||
|
This will create a default install in /usr/local/ssl.
|
||||||
|
|
||||||
|
To build the MinGW version (native Windows) in Cygwin:
|
||||||
|
|
||||||
|
$ ./Configure mingw
|
||||||
|
[...]
|
||||||
|
$ make
|
||||||
|
[...]
|
||||||
|
$ make test
|
||||||
|
$ make install
|
||||||
|
|
||||||
|
Cygwin Notes:
|
||||||
|
|
||||||
|
"make test" and normal file operations may fail in directories
|
||||||
|
mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
|
||||||
|
stripping of carriage returns. To avoid this ensure that a binary
|
||||||
|
mount is used, e.g. mount -b c:\somewhere /home.
|
||||||
|
|
||||||
|
"bc" is not provided in older Cygwin distribution. This causes a
|
||||||
|
non-fatal error in "make test" but is otherwise harmless. If
|
||||||
|
desired and needed, GNU bc can be built with Cygwin without change.
|
||||||
|
|
||||||
|
GNU C (MinGW)
|
||||||
|
-------------
|
||||||
|
|
||||||
* Compiler installation:
|
* Compiler installation:
|
||||||
|
|
||||||
Mingw32 is available from <ftp://ftp.xraylith.wisc.edu/pub/khan/
|
MinGW is available from http://www.mingw.org. Run the installer and
|
||||||
gnu-win32/mingw32/gcc-2.95.2/gcc-2.95.2-msvcrt.exe>. GNU make is at
|
set the MinGW bin directory to the PATH in "System Properties" or
|
||||||
<ftp://agnes.dida.physik.uni-essen.de/home/janjaap/mingw32/binaries/
|
autoexec.bat.
|
||||||
make-3.76.1.zip>. Install both of them in C:\egcs-1.1.2 and run
|
|
||||||
C:\egcs-1.1.2\mingw32.bat to set the PATH.
|
|
||||||
|
|
||||||
* Compile OpenSSL:
|
* Compile OpenSSL:
|
||||||
|
|
||||||
@@ -137,58 +206,11 @@
|
|||||||
> cd out
|
> cd out
|
||||||
> ..\ms\test
|
> ..\ms\test
|
||||||
|
|
||||||
GNU C (CygWin32)
|
|
||||||
---------------
|
|
||||||
|
|
||||||
CygWin32 provides a bash shell and GNU tools environment running on
|
|
||||||
NT 4.0, Windows 9x and Windows 2000. Consequently, a make of OpenSSL
|
|
||||||
with CygWin is closer to a GNU bash environment such as Linux rather
|
|
||||||
than other W32 makes that are based on a single makefile approach.
|
|
||||||
CygWin32 implements Posix/Unix calls through cygwin1.dll, and is
|
|
||||||
contrasted to Mingw32 which links dynamically to msvcrt.dll or
|
|
||||||
crtdll.dll.
|
|
||||||
|
|
||||||
To build OpenSSL using CygWin32:
|
|
||||||
|
|
||||||
* Install CygWin32 (see http://sourceware.cygnus.com/cygwin)
|
|
||||||
|
|
||||||
* Install Perl and ensure it is in the path (recent Cygwin perl
|
|
||||||
(version 5.6.1-2 of the latter has been reported to work) or
|
|
||||||
ActivePerl)
|
|
||||||
|
|
||||||
* Run the CygWin bash shell
|
|
||||||
|
|
||||||
* $ tar zxvf openssl-x.x.x.tar.gz
|
|
||||||
$ cd openssl-x.x.x
|
|
||||||
$ ./Configure no-threads CygWin32
|
|
||||||
[...]
|
|
||||||
$ make
|
|
||||||
[...]
|
|
||||||
$ make test
|
|
||||||
$ make install
|
|
||||||
|
|
||||||
This will create a default install in /usr/local/ssl.
|
|
||||||
|
|
||||||
CygWin32 Notes:
|
|
||||||
|
|
||||||
"make test" and normal file operations may fail in directories
|
|
||||||
mounted as text (i.e. mount -t c:\somewhere /home) due to CygWin
|
|
||||||
stripping of carriage returns. To avoid this ensure that a binary
|
|
||||||
mount is used, e.g. mount -b c:\somewhere /home.
|
|
||||||
|
|
||||||
As of version 1.1.1 CygWin32 is relatively unstable in its handling
|
|
||||||
of cr/lf issues. These make procedures succeeded with versions 1.1 and
|
|
||||||
the snapshot 20000524 (Slow!).
|
|
||||||
|
|
||||||
"bc" is not provided in the CygWin32 distribution. This causes a
|
|
||||||
non-fatal error in "make test" but is otherwise harmless. If
|
|
||||||
desired, GNU bc can be built with CygWin32 without change.
|
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
If you used the CygWin procedure above, you have already installed and
|
If you used the Cygwin procedure above, you have already installed and
|
||||||
can skip this section. For all other procedures, there's currently no real
|
can skip this section. For all other procedures, there's currently no real
|
||||||
installation procedure for Win32. There are, however, some suggestions:
|
installation procedure for Win32. There are, however, some suggestions:
|
||||||
|
|
||||||
@@ -203,7 +225,7 @@
|
|||||||
$ md c:\openssl\lib
|
$ md c:\openssl\lib
|
||||||
$ md c:\openssl\include
|
$ md c:\openssl\include
|
||||||
$ md c:\openssl\include\openssl
|
$ md c:\openssl\include\openssl
|
||||||
$ copy /b inc32\* c:\openssl\include\openssl
|
$ copy /b inc32\openssl\* c:\openssl\include\openssl
|
||||||
$ copy /b out32dll\ssleay32.lib c:\openssl\lib
|
$ copy /b out32dll\ssleay32.lib c:\openssl\lib
|
||||||
$ copy /b out32dll\libeay32.lib c:\openssl\lib
|
$ copy /b out32dll\libeay32.lib c:\openssl\lib
|
||||||
$ copy /b out32dll\ssleay32.dll c:\openssl\bin
|
$ copy /b out32dll\ssleay32.dll c:\openssl\bin
|
||||||
|
|||||||
71
INSTALL.WCE
Normal file
71
INSTALL.WCE
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
INSTALLATION FOR THE WINDOWS CE PLATFORM
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
Building OpenSSL for Windows CE requires the following external tools:
|
||||||
|
|
||||||
|
* Microsoft eMbedded Visual C++ 3.0
|
||||||
|
* wcecompat compatibility library (www.essemer.com.au)
|
||||||
|
* Optionally ceutils for running automated tests (www.essemer.com.au)
|
||||||
|
|
||||||
|
You also need Perl for Win32. You will need ActiveState Perl, available
|
||||||
|
from http://www.activestate.com/ActivePerl.
|
||||||
|
|
||||||
|
Windows CE support in OpenSSL relies on wcecompat. All Windows CE specific
|
||||||
|
issues should be directed to www.essemer.com.au.
|
||||||
|
|
||||||
|
The C Runtime Library implementation for Windows CE that is included with
|
||||||
|
Microsoft eMbedded Visual C++ 3.0 is incomplete and in some places
|
||||||
|
incorrect. wcecompat plugs the holes and tries to bring the Windows CE
|
||||||
|
CRT to a level that is more compatible with ANSI C. wcecompat goes further
|
||||||
|
and provides low-level IO and stream IO support for stdin/stdout/stderr
|
||||||
|
(which Windows CE does not provide). This IO functionality is not needed
|
||||||
|
by the OpenSSL library itself but is used for the tests and openssl.exe.
|
||||||
|
More information is available at www.essemer.com.au.
|
||||||
|
|
||||||
|
Building
|
||||||
|
--------
|
||||||
|
|
||||||
|
Setup the eMbedded Visual C++ environment. There are batch files for doing
|
||||||
|
this installed with eVC++. For an ARM processor, for example, execute:
|
||||||
|
|
||||||
|
> "C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT"
|
||||||
|
|
||||||
|
Next indicate where wcecompat is located:
|
||||||
|
|
||||||
|
> set WCECOMPAT=C:\wcecompat
|
||||||
|
|
||||||
|
Next you should run Configure:
|
||||||
|
|
||||||
|
> perl Configure VC-CE
|
||||||
|
|
||||||
|
Next you need to build the Makefiles:
|
||||||
|
|
||||||
|
> ms\do_ms
|
||||||
|
|
||||||
|
If you get errors about things not having numbers assigned then check the
|
||||||
|
troubleshooting section in INSTALL.W32: you probably won't be able to compile
|
||||||
|
it as it stands.
|
||||||
|
|
||||||
|
Then from the VC++ environment at a prompt do:
|
||||||
|
|
||||||
|
- to build static libraries:
|
||||||
|
|
||||||
|
> nmake -f ms\ce.mak
|
||||||
|
|
||||||
|
- or to build DLLs:
|
||||||
|
|
||||||
|
> nmake -f ms\cedll.mak
|
||||||
|
|
||||||
|
If all is well it should compile and you will have some static libraries and
|
||||||
|
executables in out32, or some DLLs and executables in out32dll. If you want
|
||||||
|
to try the tests then make sure the ceutils are in the path and do:
|
||||||
|
|
||||||
|
> cd out32
|
||||||
|
> ..\ms\testce
|
||||||
|
|
||||||
|
This will copy each of the test programs to the Windows CE device and execute
|
||||||
|
them, displaying the output of the tests on this computer. The output should
|
||||||
|
look similar to the output produced by running the tests for a regular Windows
|
||||||
|
build.
|
||||||
|
|
||||||
2
LICENSE
2
LICENSE
@@ -12,7 +12,7 @@
|
|||||||
---------------
|
---------------
|
||||||
|
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|||||||
@@ -1287,7 +1287,7 @@ EXITPOINT:
|
|||||||
|
|
||||||
// Send some bytes
|
// Send some bytes
|
||||||
|
|
||||||
int MacSocket_send(const int inSocketNum,void *inBuff,int inBuffLength)
|
int MacSocket_send(const int inSocketNum,const void *inBuff,int inBuffLength)
|
||||||
{
|
{
|
||||||
OSErr errCode = noErr;
|
OSErr errCode = noErr;
|
||||||
int bytesSent = 0;
|
int bytesSent = 0;
|
||||||
@@ -1604,4 +1604,4 @@ EPInfo* epi = (EPInfo*) context;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ int MacSocket_recv(const int inSocketNum,void *outBuff,int outBuffLength,const B
|
|||||||
|
|
||||||
// Call this to send data on a socket
|
// Call this to send data on a socket
|
||||||
|
|
||||||
int MacSocket_send(const int inSocketNum,void *inBuff,int inBuffLength);
|
int MacSocket_send(const int inSocketNum,const void *inBuff,int inBuffLength);
|
||||||
|
|
||||||
|
|
||||||
// If zero bytes were read in a call to MacSocket_recv(), it may be that the remote end has done a half-close
|
// If zero bytes were read in a call to MacSocket_recv(), it may be that the remote end has done a half-close
|
||||||
|
|||||||
332
Makefile.org
332
Makefile.org
@@ -15,6 +15,11 @@ OPTIONS=
|
|||||||
CONFIGURE_ARGS=
|
CONFIGURE_ARGS=
|
||||||
SHLIB_TARGET=
|
SHLIB_TARGET=
|
||||||
|
|
||||||
|
# HERE indicates where this Makefile lives. This can be used to indicate
|
||||||
|
# where sub-Makefiles are expected to be. Currently has very limited usage,
|
||||||
|
# and should probably not be bothered with at all.
|
||||||
|
HERE=.
|
||||||
|
|
||||||
# INSTALL_PREFIX is for package builders so that they can configure
|
# INSTALL_PREFIX is for package builders so that they can configure
|
||||||
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
|
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
|
||||||
# Normally it is left empty.
|
# Normally it is left empty.
|
||||||
@@ -59,13 +64,22 @@ DEPFLAG=
|
|||||||
PEX_LIBS=
|
PEX_LIBS=
|
||||||
EX_LIBS=
|
EX_LIBS=
|
||||||
EXE_EXT=
|
EXE_EXT=
|
||||||
AR=ar r
|
ARFLAGS=
|
||||||
|
AR=ar $(ARFLAGS) r
|
||||||
RANLIB= ranlib
|
RANLIB= ranlib
|
||||||
PERL= perl
|
PERL= perl
|
||||||
TAR= tar
|
TAR= tar
|
||||||
TARFLAGS= --no-recursion
|
TARFLAGS= --no-recursion
|
||||||
MAKEDEPPROG=makedepend
|
MAKEDEPPROG=makedepend
|
||||||
|
|
||||||
|
# We let the C compiler driver to take care of .s files. This is done in
|
||||||
|
# order to be excused from maintaining a separate set of architecture
|
||||||
|
# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
|
||||||
|
# gcc, then the driver will automatically translate it to -xarch=v8plus
|
||||||
|
# and pass it down to assembler.
|
||||||
|
AS=$(CC) -c
|
||||||
|
ASFLAG=$(CFLAG)
|
||||||
|
|
||||||
# Set BN_ASM to bn_asm.o if you want to use the C version
|
# 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
|
||||||
#BN_ASM= bn_asm.o
|
#BN_ASM= bn_asm.o
|
||||||
@@ -159,17 +173,19 @@ LIBKRB5=
|
|||||||
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
||||||
SHLIB_MARK=
|
SHLIB_MARK=
|
||||||
|
|
||||||
DIRS= crypto ssl $(SHLIB_MARK) apps test tools
|
DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools
|
||||||
SHLIBDIRS= crypto ssl
|
SHLIBDIRS= fips crypto ssl
|
||||||
|
|
||||||
# dirs in crypto to build
|
# dirs in crypto to build
|
||||||
SDIRS= \
|
SDIRS= objects \
|
||||||
md2 md4 md5 sha mdc2 hmac ripemd \
|
md2 md4 md5 sha mdc2 hmac ripemd \
|
||||||
des rc2 rc4 rc5 idea bf cast \
|
des rc2 rc4 rc5 idea bf cast \
|
||||||
bn ec rsa dsa ecdsa dh dso engine aes \
|
bn ec rsa dsa dh dso engine aes \
|
||||||
buffer bio stack lhash rand err objects \
|
buffer bio stack lhash rand err \
|
||||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
||||||
|
|
||||||
|
FDIRS= sha1 rand des aes dsa rsa
|
||||||
|
|
||||||
# tests to perform. "alltests" is a special word indicating that all tests
|
# tests to perform. "alltests" is a special word indicating that all tests
|
||||||
# should be performed.
|
# should be performed.
|
||||||
TESTS = alltests
|
TESTS = alltests
|
||||||
@@ -180,6 +196,7 @@ MAKE= make -f Makefile.ssl
|
|||||||
MANDIR=$(OPENSSLDIR)/man
|
MANDIR=$(OPENSSLDIR)/man
|
||||||
MAN1=1
|
MAN1=1
|
||||||
MAN3=3
|
MAN3=3
|
||||||
|
MANSUFFIX=
|
||||||
SHELL=/bin/sh
|
SHELL=/bin/sh
|
||||||
|
|
||||||
TOP= .
|
TOP= .
|
||||||
@@ -187,6 +204,7 @@ ONEDIRS=out tmp
|
|||||||
EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
||||||
WDIRS= windows
|
WDIRS= windows
|
||||||
LIBS= libcrypto.a libssl.a
|
LIBS= libcrypto.a libssl.a
|
||||||
|
SIGS= libcrypto.sha1
|
||||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||||
SHARED_SSL=libssl$(SHLIB_EXT)
|
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||||
SHARED_LIBS=
|
SHARED_LIBS=
|
||||||
@@ -204,14 +222,31 @@ HEADER= e_os.h
|
|||||||
# When we're prepared to use shared libraries in the programs we link here
|
# 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
|
# we might remove 'clean-shared' from the targets to perform at this stage
|
||||||
|
|
||||||
all: Makefile.ssl sub_all
|
all: Makefile.ssl sub_all openssl.pc
|
||||||
|
|
||||||
|
sigs: $(SIGS)
|
||||||
|
libcrypto.sha1: libcrypto.a
|
||||||
|
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||||
|
fips/sha1/fips_standalone_sha1 libcrypto.a > libcrypto.sha1; \
|
||||||
|
fi
|
||||||
|
|
||||||
sub_all:
|
sub_all:
|
||||||
@for i in $(DIRS); \
|
@for i in $(DIRS); \
|
||||||
do \
|
do \
|
||||||
if [ -d "$$i" ]; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making all in $$i..." && \
|
(cd $$i && echo "making all 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}' 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}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
|
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' 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}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $$i; \
|
||||||
|
fi; \
|
||||||
|
done;
|
||||||
|
|
||||||
|
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}' 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}' 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 \
|
else \
|
||||||
$(MAKE) $$i; \
|
$(MAKE) $$i; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -241,7 +276,7 @@ clean-shared:
|
|||||||
fi; \
|
fi; \
|
||||||
( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
|
( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
|
||||||
if [ "$(PLATFORM)" = "Cygwin" ]; then \
|
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; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -251,7 +286,8 @@ link-shared:
|
|||||||
for i in $(SHLIBDIRS); do \
|
for i in $(SHLIBDIRS); do \
|
||||||
prev=lib$$i$(SHLIB_EXT); \
|
prev=lib$$i$(SHLIB_EXT); \
|
||||||
for j in $${tmp:-x}; do \
|
for j in $${tmp:-x}; do \
|
||||||
( set -x; ln -f -s $$prev lib$$i$$j ); \
|
( set -x; \
|
||||||
|
rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
|
||||||
prev=lib$$i$$j; \
|
prev=lib$$i$$j; \
|
||||||
done; \
|
done; \
|
||||||
done; \
|
done; \
|
||||||
@@ -263,39 +299,45 @@ do_bsd-gcc-shared: do_gnu-shared
|
|||||||
do_linux-shared: do_gnu-shared
|
do_linux-shared: do_gnu-shared
|
||||||
do_gnu-shared:
|
do_gnu-shared:
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
|
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||||
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
|
fi; \
|
||||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||||
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-Wl,-soname=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,--whole-archive lib$$i.a \
|
||||||
-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
|
-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
|
DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
|
||||||
collect2=`gcc -print-prog-name=collect2 2>&1` && \
|
|
||||||
[ -n "$$collect2" ] && \
|
|
||||||
my_ld=`$$collect2 --help 2>&1 | grep Usage: | sed 's/^Usage: *\([^ ][^ ]*\).*/\1/'` && \
|
|
||||||
[ -n "$$my_ld" ] && \
|
|
||||||
$$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
|
|
||||||
|
|
||||||
# For Darwin AKA Mac OS/X (dyld)
|
# For Darwin AKA Mac OS/X (dyld)
|
||||||
do_darwin-shared:
|
do_darwin-shared:
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
( set -x ; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
|
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} \
|
lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
|
-compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
|
||||||
-install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
|
-install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
|
||||||
libs="$$libs -l`basename $$i${SHLIB_EXT} .dylib`"; \
|
libs="-l`basename $$i${SHLIB_EXT} .dylib` $$libs"; \
|
||||||
echo "" ; \
|
echo "" ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
do_cygwin-shared:
|
do_cygwin-shared:
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
( set -x; ${CC} -shared -o cyg$$i.dll \
|
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||||
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
|
fi; \
|
||||||
|
( set -x; ${CC} -shared -o cyg$$i-$(SHLIB_VERSION_NUMBER).dll \
|
||||||
|
-Wl,-Bsymbolic \
|
||||||
-Wl,--whole-archive lib$$i.a \
|
-Wl,--whole-archive lib$$i.a \
|
||||||
-Wl,--out-implib,lib$$i.dll.a \
|
-Wl,--out-implib,lib$$i.dll.a \
|
||||||
-Wl,--no-whole-archive $$libs ) || exit 1; \
|
-Wl,--no-whole-archive $$libs ) || exit 1; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# This assumes that GNU utilities are *not* used
|
# This assumes that GNU utilities are *not* used
|
||||||
@@ -304,11 +346,14 @@ do_alpha-osf1-shared:
|
|||||||
$(MAKE) do_gnu-shared; \
|
$(MAKE) do_gnu-shared; \
|
||||||
else \
|
else \
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
|
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||||
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
|
fi; \
|
||||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||||
-shared -o lib$$i.so \
|
-shared -o lib$$i.so \
|
||||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -320,11 +365,14 @@ do_tru64-shared:
|
|||||||
$(MAKE) do_gnu-shared; \
|
$(MAKE) do_gnu-shared; \
|
||||||
else \
|
else \
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
|
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||||
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
|
fi; \
|
||||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||||
-shared -msym -o lib$$i.so \
|
-shared -msym -o lib$$i.so \
|
||||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -336,12 +384,15 @@ do_tru64-shared-rpath:
|
|||||||
$(MAKE) do_gnu-shared; \
|
$(MAKE) do_gnu-shared; \
|
||||||
else \
|
else \
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
|
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||||
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
|
fi; \
|
||||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||||
-shared -msym -o lib$$i.so \
|
-shared -msym -o lib$$i.so \
|
||||||
-rpath ${INSTALLTOP}/lib \
|
-rpath ${INSTALLTOP}/lib \
|
||||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -352,12 +403,18 @@ do_solaris-shared:
|
|||||||
$(MAKE) do_gnu-shared; \
|
$(MAKE) do_gnu-shared; \
|
||||||
else \
|
else \
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
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; \
|
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||||
set -x; ${CC} ${SHARED_LDFLAGS} \
|
MINUSZ='-z '; \
|
||||||
-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
(${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} \
|
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
|
$${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \
|
||||||
libs="$$libs -l$$i"; \
|
$$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||||
|
libs="-l$$i $$libs"; \
|
||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -367,16 +424,20 @@ do_svr3-shared:
|
|||||||
$(MAKE) do_gnu-shared; \
|
$(MAKE) do_gnu-shared; \
|
||||||
else \
|
else \
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
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; \
|
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||||
find . -name "*.o" -print > allobjs ; \
|
find . -name "*.o" -print > allobjs ; \
|
||||||
OBJS= ; export OBJS ; \
|
OBJS= ; export OBJS ; \
|
||||||
for obj in `ar t lib$$i.a` ; do \
|
for obj in `ar t lib$$i.a` ; do \
|
||||||
OBJS="$${OBJS} `grep $$obj allobjs`" ; \
|
OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
|
||||||
done ; \
|
done ; \
|
||||||
set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||||
|
-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -386,17 +447,23 @@ do_svr5-shared:
|
|||||||
$(MAKE) do_gnu-shared; \
|
$(MAKE) do_gnu-shared; \
|
||||||
else \
|
else \
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
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; \
|
( 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 ; \
|
find . -name "*.o" -print > allobjs ; \
|
||||||
OBJS= ; export OBJS ; \
|
OBJS= ; export OBJS ; \
|
||||||
for obj in `ar t lib$$i.a` ; do \
|
for obj in `ar t lib$$i.a` ; do \
|
||||||
OBJS="$${OBJS} `grep $$obj allobjs`" ; \
|
OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
|
||||||
done ; \
|
done ; \
|
||||||
set -x; ${CC} ${SHARED_LDFLAGS} \
|
set -x; LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
|
||||||
-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
${CC} ${SHARED_LDFLAGS} \
|
||||||
|
$${SHARE_FLAG} -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -406,11 +473,14 @@ do_irix-shared:
|
|||||||
$(MAKE) do_gnu-shared; \
|
$(MAKE) do_gnu-shared; \
|
||||||
else \
|
else \
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
|
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||||
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
|
fi; \
|
||||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||||
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
-Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-all lib$$i.a $$libs ${EX_LIBS} -lc) || exit 1; \
|
-all lib$$i.a $$libs ${EX_LIBS} -lc) || exit 1; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -427,12 +497,16 @@ do_irix-shared:
|
|||||||
#
|
#
|
||||||
do_hpux-shared:
|
do_hpux-shared:
|
||||||
for i in ${SHLIBDIRS}; do \
|
for i in ${SHLIBDIRS}; do \
|
||||||
|
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||||
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
|
fi; \
|
||||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||||
+vnocompatwarnings \
|
+vnocompatwarnings \
|
||||||
-b -z +s \
|
-b -z +s \
|
||||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-Fl lib$$i.a -ldld -lc ) || exit 1; \
|
-Fl lib$$i.a -ldld -lc ) || exit 1; \
|
||||||
|
chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# This assumes that GNU utilities are *not* used
|
# This assumes that GNU utilities are *not* used
|
||||||
@@ -446,11 +520,15 @@ do_hpux-shared:
|
|||||||
#
|
#
|
||||||
do_hpux64-shared:
|
do_hpux64-shared:
|
||||||
for i in ${SHLIBDIRS}; do \
|
for i in ${SHLIBDIRS}; do \
|
||||||
|
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||||
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
|
fi; \
|
||||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||||
-b -z \
|
-b -z \
|
||||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
+forceload lib$$i.a -ldl -lc ) || exit 1; \
|
+forceload lib$$i.a -ldl -lc ) || exit 1; \
|
||||||
|
chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# The following method is said to work on all platforms. Tests will
|
# The following method is said to work on all platforms. Tests will
|
||||||
@@ -487,17 +565,24 @@ SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
|
|||||||
SHAREDCMD=$(CC)
|
SHAREDCMD=$(CC)
|
||||||
do_aix-shared:
|
do_aix-shared:
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
|
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||||
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
|
fi; \
|
||||||
( set -x; \
|
( set -x; \
|
||||||
ld -r -o $$i.o $(ALLSYMSFLAG) lib$$i.a && \
|
ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \
|
||||||
( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
|
( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
|
||||||
$(SHAREDCMD) $(SHAREDFLAG) -o lib$$i.so lib$$i.o \
|
$(SHAREDCMD) $(SHAREDFLAGS) \
|
||||||
|
-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib$$i.o \
|
||||||
$$libs ${EX_LIBS} ) ) \
|
$$libs ${EX_LIBS} ) ) \
|
||||||
|| exit 1; \
|
|| exit 1; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
do_reliantunix-shared:
|
do_reliantunix-shared:
|
||||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
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 ; \
|
tmpdir=/tmp/openssl.$$$$ ; rm -rf $$tmpdir ; \
|
||||||
( set -x; \
|
( set -x; \
|
||||||
( Opwd=`pwd` ; mkdir $$tmpdir || exit 1; \
|
( Opwd=`pwd` ; mkdir $$tmpdir || exit 1; \
|
||||||
@@ -507,19 +592,32 @@ do_reliantunix-shared:
|
|||||||
cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \
|
cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \
|
||||||
) || exit 1; \
|
) || exit 1; \
|
||||||
rm -rf $$tmpdir ; \
|
rm -rf $$tmpdir ; \
|
||||||
libs="$$libs -l$$i"; \
|
libs="-l$$i $$libs"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
openssl.pc: Makefile.ssl
|
||||||
|
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
||||||
|
echo 'exec_prefix=$${prefix}'; \
|
||||||
|
echo 'libdir=$${exec_prefix}/lib'; \
|
||||||
|
echo 'includedir=$${prefix}/include'; \
|
||||||
|
echo ''; \
|
||||||
|
echo 'Name: OpenSSL'; \
|
||||||
|
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
||||||
|
echo 'Version: '$(VERSION); \
|
||||||
|
echo 'Requires: '; \
|
||||||
|
echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
|
||||||
|
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||||
|
|
||||||
Makefile.ssl: Makefile.org
|
Makefile.ssl: Makefile.org
|
||||||
@echo "Makefile.ssl is older than Makefile.org."
|
@echo "Makefile.ssl is older than Makefile.org."
|
||||||
@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
||||||
@false
|
@false
|
||||||
|
|
||||||
libclean:
|
libclean:
|
||||||
rm -f *.a */lib */*/lib
|
rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
|
||||||
|
|
||||||
clean:
|
clean: libclean
|
||||||
rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
|
rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
do \
|
do \
|
||||||
if [ -d "$$i" ]; then \
|
if [ -d "$$i" ]; then \
|
||||||
@@ -528,7 +626,8 @@ clean:
|
|||||||
rm -f $(LIBS); \
|
rm -f $(LIBS); \
|
||||||
fi; \
|
fi; \
|
||||||
done;
|
done;
|
||||||
rm -f *.a *.o speed.* *.map *.so .pure core
|
rm -f openssl.pc
|
||||||
|
rm -f speed.* .pure
|
||||||
rm -f $(TARFILE)
|
rm -f $(TARFILE)
|
||||||
@for i in $(ONEDIRS) ;\
|
@for i in $(ONEDIRS) ;\
|
||||||
do \
|
do \
|
||||||
@@ -560,6 +659,10 @@ links:
|
|||||||
fi; \
|
fi; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
gentests:
|
||||||
|
@(cd test && echo "generating dummy tests (if needed)..." && \
|
||||||
|
$(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}' 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}' 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:
|
dclean:
|
||||||
rm -f *.bak
|
rm -f *.bak
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
@@ -574,8 +677,12 @@ rehash: rehash.time
|
|||||||
rehash.time: certs
|
rehash.time: certs
|
||||||
@(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
|
@(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
|
||||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||||
LD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
|
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||||
export LD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
|
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||||
|
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||||
|
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||||
|
if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||||
|
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||||
$(PERL) tools/c_rehash certs)
|
$(PERL) tools/c_rehash certs)
|
||||||
touch rehash.time
|
touch rehash.time
|
||||||
|
|
||||||
@@ -583,10 +690,14 @@ test: tests
|
|||||||
|
|
||||||
tests: rehash
|
tests: rehash
|
||||||
@(cd test && echo "testing..." && \
|
@(cd test && echo "testing..." && \
|
||||||
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' OPENSSL_DEBUG_MEMORY=on tests );
|
$(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}' 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}' 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 );
|
||||||
@LD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
|
@LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||||
export LD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
|
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||||
apps/openssl version -a
|
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||||
|
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||||
|
if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||||
|
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||||
|
apps/openssl version -a
|
||||||
|
|
||||||
report:
|
report:
|
||||||
@$(PERL) util/selftest.pl
|
@$(PERL) util/selftest.pl
|
||||||
@@ -596,7 +707,7 @@ depend:
|
|||||||
do \
|
do \
|
||||||
if [ -d "$$i" ]; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making dependencies $$i..." && \
|
(cd $$i && echo "making dependencies $$i..." && \
|
||||||
$(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' depend ) || exit 1; \
|
$(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
@@ -642,18 +753,27 @@ TABLE: Configure
|
|||||||
|
|
||||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
|
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
|
||||||
|
|
||||||
|
# Build distribution tar-file. As the list of files returned by "find" is
|
||||||
|
# pretty long, on several platforms a "too many arguments" error or similar
|
||||||
|
# would occur. Therefore the list of files is temporarily stored into a file
|
||||||
|
# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
|
||||||
|
# tar does not support the --files-from option.
|
||||||
tar:
|
tar:
|
||||||
@$(TAR) $(TARFLAGS) -cvf - \
|
find . -type d -print | xargs chmod 755
|
||||||
`find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort` |\
|
find . -type f -print | xargs chmod a+r
|
||||||
|
find . -type f -perm -0100 -print | xargs chmod a+x
|
||||||
|
find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
|
||||||
|
$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
|
||||||
tardy --user_number=0 --user_name=openssl \
|
tardy --user_number=0 --user_name=openssl \
|
||||||
--group_number=0 --group_name=openssl \
|
--group_number=0 --group_name=openssl \
|
||||||
--prefix=openssl-$(VERSION) - |\
|
--prefix=openssl-$(VERSION) - |\
|
||||||
gzip --best >../$(TARFILE).gz; \
|
gzip --best >../$(TARFILE).gz; \
|
||||||
|
rm -f ../$(TARFILE).list; \
|
||||||
ls -l ../$(TARFILE).gz
|
ls -l ../$(TARFILE).gz
|
||||||
|
|
||||||
tar-snap:
|
tar-snap:
|
||||||
@$(TAR) $(TARFLAGS) -cvf - \
|
@$(TAR) $(TARFLAGS) -cvf - \
|
||||||
`find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' | sort` |\
|
`find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\
|
||||||
tardy --user_number=0 --user_name=openssl \
|
tardy --user_number=0 --user_name=openssl \
|
||||||
--group_number=0 --group_name=openssl \
|
--group_number=0 --group_name=openssl \
|
||||||
--prefix=openssl-$(VERSION) - > ../$(TARFILE);\
|
--prefix=openssl-$(VERSION) - > ../$(TARFILE);\
|
||||||
@@ -663,7 +783,7 @@ dist:
|
|||||||
$(PERL) Configure dist
|
$(PERL) Configure dist
|
||||||
@$(MAKE) dist_pem_h
|
@$(MAKE) dist_pem_h
|
||||||
@$(MAKE) SDIRS='${SDIRS}' clean
|
@$(MAKE) SDIRS='${SDIRS}' clean
|
||||||
@$(MAKE) tar
|
@$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
|
||||||
|
|
||||||
dist_pem_h:
|
dist_pem_h:
|
||||||
(cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
|
(cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
|
||||||
@@ -671,6 +791,7 @@ dist_pem_h:
|
|||||||
install: all install_docs
|
install: all install_docs
|
||||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
|
$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
|
||||||
|
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
|
||||||
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
||||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
||||||
@@ -692,11 +813,12 @@ install: all install_docs
|
|||||||
do \
|
do \
|
||||||
if [ -f "$$i" ]; then \
|
if [ -f "$$i" ]; then \
|
||||||
( echo installing $$i; \
|
( echo installing $$i; \
|
||||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||||
fi \
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||||
done
|
fi; \
|
||||||
|
done;
|
||||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||||
tmp="$(SHARED_LIBS)"; \
|
tmp="$(SHARED_LIBS)"; \
|
||||||
for i in $${tmp:-x}; \
|
for i in $${tmp:-x}; \
|
||||||
@@ -704,21 +826,41 @@ install: all install_docs
|
|||||||
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
||||||
( echo installing $$i; \
|
( echo installing $$i; \
|
||||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||||
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||||
else \
|
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; \
|
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||||
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||||
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||||
fi ); \
|
fi ); \
|
||||||
fi \
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
( here="`pwd`"; \
|
( here="`pwd`"; \
|
||||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||||
make -f $$here/Makefile link-shared ); \
|
set $(MAKE); \
|
||||||
|
$$1 -f $$here/Makefile link-shared ); \
|
||||||
|
if [ "$(INSTALLTOP)" != "/usr" ]; then \
|
||||||
|
echo 'OpenSSL shared libraries have been installed in:'; \
|
||||||
|
echo ' $(INSTALLTOP)'; \
|
||||||
|
echo ''; \
|
||||||
|
sed -e '1,/^$$/d' doc/openssl-shared.txt; \
|
||||||
|
fi; \
|
||||||
fi
|
fi
|
||||||
|
@for i in $(SIGS) ;\
|
||||||
|
do \
|
||||||
|
if [ -f "$$i" ]; then \
|
||||||
|
( echo installing $$i; \
|
||||||
|
cp $$i $(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
|
||||||
|
|
||||||
install_docs:
|
install_docs:
|
||||||
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||||
@@ -726,23 +868,45 @@ install_docs:
|
|||||||
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||||
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||||
$(INSTALL_PREFIX)$(MANDIR)/man7
|
$(INSTALL_PREFIX)$(MANDIR)/man7
|
||||||
@for i in doc/apps/*.pod; do \
|
@pod2man="`cd util; ./pod2mantest $(PERL)`"; \
|
||||||
|
here="`pwd`"; \
|
||||||
|
filecase=; \
|
||||||
|
if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" ]; then \
|
||||||
|
filecase=-i; \
|
||||||
|
fi; \
|
||||||
|
for i in doc/apps/*.pod; do \
|
||||||
fn=`basename $$i .pod`; \
|
fn=`basename $$i .pod`; \
|
||||||
if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
|
if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
|
||||||
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||||
(cd `dirname $$i`; \
|
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||||
$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
|
sh -c "$$pod2man \
|
||||||
--release=$(VERSION) `basename $$i`) \
|
--section=$$sec --center=OpenSSL \
|
||||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
--release=$(VERSION) `basename $$i`") \
|
||||||
done
|
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||||
@for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
$(PERL) util/extract-names.pl < $$i | \
|
||||||
|
grep -v $$filecase "^$$fn\$$" | \
|
||||||
|
grep -v "[ ]" | \
|
||||||
|
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||||
|
while read n; do \
|
||||||
|
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||||
|
done); \
|
||||||
|
done; \
|
||||||
|
for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||||
fn=`basename $$i .pod`; \
|
fn=`basename $$i .pod`; \
|
||||||
if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
|
if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
|
||||||
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||||
(cd `dirname $$i`; \
|
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||||
$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
|
sh -c "$$pod2man \
|
||||||
--release=$(VERSION) `basename $$i`) \
|
--section=$$sec --center=OpenSSL \
|
||||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
--release=$(VERSION) `basename $$i`") \
|
||||||
|
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||||
|
$(PERL) util/extract-names.pl < $$i | \
|
||||||
|
grep -v $$filecase "^$$fn\$$" | \
|
||||||
|
grep -v "[ ]" | \
|
||||||
|
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||||
|
while read n; do \
|
||||||
|
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||||
|
done); \
|
||||||
done
|
done
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|||||||
124
NEWS
124
NEWS
@@ -5,14 +5,130 @@
|
|||||||
This file gives a brief overview of the major changes between each OpenSSL
|
This file gives a brief overview of the major changes between each OpenSSL
|
||||||
release. For more details please read the CHANGES file.
|
release. For more details please read the CHANGES file.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c:
|
||||||
|
|
||||||
|
o Security: fix various ASN1 parsing bugs.
|
||||||
|
o New -ignore_err option to OCSP utility.
|
||||||
|
o Various interop and bug fixes in S/MIME code.
|
||||||
|
o SSL/TLS protocol fix for unrequested client certificates.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b:
|
||||||
|
|
||||||
|
o Security: counter the Klima-Pokorny-Rosa extension of
|
||||||
|
Bleichbacher's attack
|
||||||
|
o Security: make RSA blinding default.
|
||||||
|
o Configuration: Irix fixes, AIX fixes, better mingw support.
|
||||||
|
o Support for new platforms: linux-ia64-ecc.
|
||||||
|
o Build: shared library support fixes.
|
||||||
|
o ASN.1: treat domainComponent correctly.
|
||||||
|
o Documentation: fixes and additions.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a:
|
||||||
|
|
||||||
|
o Security: Important security related bugfixes.
|
||||||
|
o Enhanced compatibility with MIT Kerberos.
|
||||||
|
o Can be built without the ENGINE framework.
|
||||||
|
o IA32 assembler enhancements.
|
||||||
|
o Support for new platforms: FreeBSD/IA64 and FreeBSD/Sparc64.
|
||||||
|
o Configuration: the no-err option now works properly.
|
||||||
|
o SSL/TLS: now handles manual certificate chain building.
|
||||||
|
o SSL/TLS: certain session ID malfunctions corrected.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7:
|
Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7:
|
||||||
|
|
||||||
o New library section OCSP.
|
o New library section OCSP.
|
||||||
o Complete haul-over of the ASN.1 library section.
|
o Complete rewrite of ASN1 code.
|
||||||
|
o CRL checking in verify code and openssl utility.
|
||||||
|
o Extension copying in 'ca' utility.
|
||||||
|
o Flexible display options in 'ca' utility.
|
||||||
|
o Provisional support for international characters with UTF8.
|
||||||
o Support for external crypto devices ('engine') is no longer
|
o Support for external crypto devices ('engine') is no longer
|
||||||
a separate distribution.
|
a separate distribution.
|
||||||
|
o New elliptic curve library section.
|
||||||
|
o New AES (Rijndael) library section.
|
||||||
|
o Support for new platforms: Windows CE, Tandem OSS, A/UX, AIX 64-bit,
|
||||||
|
Linux x86_64, Linux 64-bit on Sparc v9
|
||||||
|
o Extended support for some platforms: VxWorks
|
||||||
|
o Enhanced support for shared libraries.
|
||||||
|
o Now only builds PIC code when shared library support is requested.
|
||||||
|
o Support for pkg-config.
|
||||||
|
o Lots of new manuals.
|
||||||
|
o Makes symbolic links to or copies of manuals to cover all described
|
||||||
|
functions.
|
||||||
|
o Change DES API to clean up the namespace (some applications link also
|
||||||
|
against libdes providing similar functions having the same name).
|
||||||
|
Provide macros for backward compatibility (will be removed in the
|
||||||
|
future).
|
||||||
|
o Unify handling of cryptographic algorithms (software and engine)
|
||||||
|
to be available via EVP routines for asymmetric and symmetric ciphers.
|
||||||
|
o NCONF: new configuration handling routines.
|
||||||
|
o Change API to use more 'const' modifiers to improve error checking
|
||||||
|
and help optimizers.
|
||||||
|
o Finally remove references to RSAref.
|
||||||
|
o Reworked parts of the BIGNUM code.
|
||||||
|
o Support for new engines: Broadcom ubsec, Accelerated Encryption
|
||||||
|
Processing, IBM 4758.
|
||||||
|
o A few new engines added in the demos area.
|
||||||
|
o Extended and corrected OID (object identifier) table.
|
||||||
|
o PRNG: query at more locations for a random device, automatic query for
|
||||||
|
EGD style random sources at several locations.
|
||||||
|
o SSL/TLS: allow optional cipher choice according to server's preference.
|
||||||
|
o SSL/TLS: allow server to explicitly set new session ids.
|
||||||
|
o SSL/TLS: support Kerberos cipher suites (RFC2712).
|
||||||
|
Only supports MIT Kerberos for now.
|
||||||
|
o SSL/TLS: allow more precise control of renegotiations and sessions.
|
||||||
|
o SSL/TLS: add callback to retrieve SSL/TLS messages.
|
||||||
|
o SSL/TLS: support AES cipher suites (RFC3268).
|
||||||
|
|
||||||
Changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c:
|
Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k:
|
||||||
|
|
||||||
|
o Security: fix various ASN1 parsing bugs.
|
||||||
|
o SSL/TLS protocol fix for unrequested client certificates.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j:
|
||||||
|
|
||||||
|
o Security: counter the Klima-Pokorny-Rosa extension of
|
||||||
|
Bleichbacher's attack
|
||||||
|
o Security: make RSA blinding default.
|
||||||
|
o Build: shared library support fixes.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i:
|
||||||
|
|
||||||
|
o Important security related bugfixes.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h:
|
||||||
|
|
||||||
|
o New configuration targets for Tandem OSS and A/UX.
|
||||||
|
o New OIDs for Microsoft attributes.
|
||||||
|
o Better handling of SSL session caching.
|
||||||
|
o Better comparison of distinguished names.
|
||||||
|
o Better handling of shared libraries in a mixed GNU/non-GNU environment.
|
||||||
|
o Support assembler code with Borland C.
|
||||||
|
o Fixes for length problems.
|
||||||
|
o Fixes for uninitialised variables.
|
||||||
|
o Fixes for memory leaks, some unusual crashes and some race conditions.
|
||||||
|
o Fixes for smaller building problems.
|
||||||
|
o Updates of manuals, FAQ and other instructive documents.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g:
|
||||||
|
|
||||||
|
o Important building fixes on Unix.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f:
|
||||||
|
|
||||||
|
o Various important bugfixes.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e:
|
||||||
|
|
||||||
|
o Important security related bugfixes.
|
||||||
|
o Various SSL/TLS library bugfixes.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d:
|
||||||
|
|
||||||
|
o Various SSL/TLS library bugfixes.
|
||||||
|
o Fix DH parameter generation for 'non-standard' generators.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c:
|
||||||
|
|
||||||
o Various SSL/TLS library bugfixes.
|
o Various SSL/TLS library bugfixes.
|
||||||
o BIGNUM library fixes.
|
o BIGNUM library fixes.
|
||||||
@@ -25,7 +141,7 @@
|
|||||||
Broadcom and Cryptographic Appliance's keyserver
|
Broadcom and Cryptographic Appliance's keyserver
|
||||||
[in 0.9.6c-engine release].
|
[in 0.9.6c-engine release].
|
||||||
|
|
||||||
Changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b:
|
Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b:
|
||||||
|
|
||||||
o Security fix: PRNG improvements.
|
o Security fix: PRNG improvements.
|
||||||
o Security fix: RSA OAEP check.
|
o Security fix: RSA OAEP check.
|
||||||
@@ -58,7 +174,7 @@
|
|||||||
o Bug fixes for Win32, HP/UX and Irix.
|
o Bug fixes for Win32, HP/UX and Irix.
|
||||||
o Bug fixes in BIGNUM, SSL, PKCS#7, PKCS#12, X.509, CONF and
|
o Bug fixes in BIGNUM, SSL, PKCS#7, PKCS#12, X.509, CONF and
|
||||||
memory checking routines.
|
memory checking routines.
|
||||||
o Bug fixes for RSA operations in threaded enviroments.
|
o Bug fixes for RSA operations in threaded environments.
|
||||||
o Bug fixes in misc. openssl applications.
|
o Bug fixes in misc. openssl applications.
|
||||||
o Remove a few potential memory leaks.
|
o Remove a few potential memory leaks.
|
||||||
o Add tighter checks of BIGNUM routines.
|
o Add tighter checks of BIGNUM routines.
|
||||||
|
|||||||
131
PROBLEMS
Normal file
131
PROBLEMS
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
* System libcrypto.dylib and libssl.dylib are used by system ld on MacOS X.
|
||||||
|
|
||||||
|
|
||||||
|
NOTE: The problem described here only applies when OpenSSL isn't built
|
||||||
|
with shared library support (i.e. without the "shared" configuration
|
||||||
|
option). If you build with shared library support, you will have no
|
||||||
|
problems as long as you set up DYLD_LIBRARY_PATH properly at all times.
|
||||||
|
|
||||||
|
|
||||||
|
This is really a misfeature in ld, which seems to look for .dylib libraries
|
||||||
|
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:
|
||||||
|
|
||||||
|
LIBCRYPTO=-L.. -lcrypto
|
||||||
|
LIBSSL=-L.. -lssl
|
||||||
|
|
||||||
|
to:
|
||||||
|
|
||||||
|
LIBCRYPTO=../libcrypto.a
|
||||||
|
LIBSSL=../libssl.a
|
||||||
|
|
||||||
|
It's possible that something similar is needed for shared library support
|
||||||
|
as well. That hasn't been well tested yet.
|
||||||
|
|
||||||
|
|
||||||
|
Another solution that many seem to recommend is to move the libraries
|
||||||
|
/usr/lib/libcrypto.0.9.dylib, /usr/lib/libssl.0.9.dylib to a different
|
||||||
|
directory, build and install OpenSSL and anything that depends on your
|
||||||
|
build, then move libcrypto.0.9.dylib and libssl.0.9.dylib back to their
|
||||||
|
original places. Note that the version numbers on those two libraries
|
||||||
|
may differ on your machine.
|
||||||
|
|
||||||
|
|
||||||
|
As long as Apple doesn't fix the problem with ld, this problem building
|
||||||
|
OpenSSL will remain as is.
|
||||||
|
|
||||||
|
|
||||||
|
* Parallell make leads to errors
|
||||||
|
|
||||||
|
While running tests, running a parallell make is a bad idea. Many test
|
||||||
|
scripts use the same name for output and input files, which means different
|
||||||
|
will interfere with each other and lead to test failure.
|
||||||
|
|
||||||
|
The solution is simple for now: don't run parallell make when testing.
|
||||||
|
|
||||||
|
|
||||||
|
* Bugs in gcc 3.0 triggered
|
||||||
|
|
||||||
|
According to a problem report, there are bugs in gcc 3.0 that are
|
||||||
|
triggered by some of the code in OpenSSL, more specifically in
|
||||||
|
PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
|
||||||
|
|
||||||
|
header+=11;
|
||||||
|
if (*header != '4') return(0); header++;
|
||||||
|
if (*header != ',') return(0); header++;
|
||||||
|
|
||||||
|
What happens is that gcc might optimize a little too agressively, and
|
||||||
|
you end up with an extra incrementation when *header != '4'.
|
||||||
|
|
||||||
|
We recommend that you upgrade gcc to as high a 3.x version as you can.
|
||||||
|
|
||||||
|
* solaris64-sparcv9-cc SHA-1 performance with WorkShop 6 compiler.
|
||||||
|
|
||||||
|
As subject suggests SHA-1 might perform poorly (4 times slower)
|
||||||
|
if compiled with WorkShop 6 compiler and -xarch=v9. The cause for
|
||||||
|
this seems to be the fact that compiler emits multiplication to
|
||||||
|
perform shift operations:-( To work the problem around configure
|
||||||
|
with './Configure solaris64-sparcv9-cc -DMD32_REG_T=int'.
|
||||||
|
|
||||||
|
* Problems with hp-parisc2-cc target when used with "no-asm" flag
|
||||||
|
|
||||||
|
When using the hp-parisc2-cc target, wrong bignum code is generated.
|
||||||
|
This is due to the SIXTY_FOUR_BIT build being compiled with the +O3
|
||||||
|
aggressive optimization.
|
||||||
|
The problem manifests itself by the BN_kronecker test hanging in an
|
||||||
|
endless loop. Reason: the BN_kronecker test calls BN_generate_prime()
|
||||||
|
which itself hangs. The reason could be tracked down to the bn_mul_comba8()
|
||||||
|
function in bn_asm.c. At some occasions the higher 32bit value of r[7]
|
||||||
|
is off by 1 (meaning: calculated=shouldbe+1). Further analysis failed,
|
||||||
|
as no debugger support possible at +O3 and additional fprintf()'s
|
||||||
|
introduced fixed the bug, therefore it is most likely a bug in the
|
||||||
|
optimizer.
|
||||||
|
The bug was found in the BN_kronecker test but may also lead to
|
||||||
|
failures in other parts of the code.
|
||||||
|
(See Ticket #426.)
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
The symptoms appear when running the test suite, more specifically
|
||||||
|
test/ectest, with the following result:
|
||||||
|
|
||||||
|
OSSL_LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH="$OSSL_LIBPATH:$LD_LIBRARY_PATH"; DYLD_LIBRARY_PATH="$OSSL_LIBPATH:$DYLD_LIBRARY_PATH"; SHLIB_PATH="$OSSL_LIBPATH:$SHLIB_PATH"; LIBPATH="$OSSL_LIBPATH:$LIBPATH"; if [ "debug-sco5-gcc" = "Cygwin" ]; then PATH="${LIBPATH}:$PATH"; fi; export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; ./ectest
|
||||||
|
ectest.c:186: ABORT
|
||||||
|
|
||||||
|
The cause of the problem seems to be that isxdigit(), called from
|
||||||
|
BN_hex2bn(), returns 0 on a perfectly legitimate hex digit. Further
|
||||||
|
investigation shows that any of the isxxx() macros return 0 on any
|
||||||
|
input. A direct look in the information array that the isxxx() use,
|
||||||
|
called __ctype, shows that it contains all zeroes...
|
||||||
|
|
||||||
|
Taking a look at the newly created libcrypto.so with nm, one can see
|
||||||
|
that the variable __ctype is defined in libcrypto's .bss (which
|
||||||
|
explains why it is filled with zeroes):
|
||||||
|
|
||||||
|
$ nm -Pg libcrypto.so | grep __ctype
|
||||||
|
__ctype B 0011659c
|
||||||
|
__ctype2 U
|
||||||
|
|
||||||
|
Curiously, __ctype2 is undefined, in spite of being declared in
|
||||||
|
/usr/include/ctype.h in exactly the same way as __ctype.
|
||||||
|
|
||||||
|
Any information helping to solve this issue would be deeply
|
||||||
|
appreciated.
|
||||||
|
|
||||||
|
NOTE: building non-shared doesn't come with this problem.
|
||||||
21
README
21
README
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
OpenSSL 0.9.8-dev 24 Sep 2000
|
OpenSSL 0.9.7c 30 Sep 2003
|
||||||
|
|
||||||
Copyright (c) 1998-2002 The OpenSSL Project
|
Copyright (c) 1998-2003 The OpenSSL Project
|
||||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
@@ -122,6 +122,13 @@
|
|||||||
lists the functions; you will probably have to look at the code to work out
|
lists the functions; you will probably have to look at the code to work out
|
||||||
how to use them. Look at the example programs.
|
how to use them. Look at the example programs.
|
||||||
|
|
||||||
|
PROBLEMS
|
||||||
|
--------
|
||||||
|
|
||||||
|
For some platforms, there are some known problems that may affect the user
|
||||||
|
or application author. We try to collect those in doc/PROBLEMS, with current
|
||||||
|
thoughts on how they should be solved in a future of OpenSSL.
|
||||||
|
|
||||||
SUPPORT
|
SUPPORT
|
||||||
-------
|
-------
|
||||||
|
|
||||||
@@ -146,11 +153,13 @@
|
|||||||
- Problem Description (steps that will reproduce the problem, if known)
|
- Problem Description (steps that will reproduce the problem, if known)
|
||||||
- Stack Traceback (if the application dumps core)
|
- Stack Traceback (if the application dumps core)
|
||||||
|
|
||||||
Report the bug to the OpenSSL project at:
|
Report the bug to the OpenSSL project via the Request Tracker
|
||||||
|
(http://www.openssl.org/support/rt2.html) by mail to:
|
||||||
|
|
||||||
openssl-bugs@openssl.org
|
openssl-bugs@openssl.org
|
||||||
|
|
||||||
Note that mail to openssl-bugs@openssl.org is forwarded to a public
|
Note that mail to openssl-bugs@openssl.org is recorded in the publicly
|
||||||
|
readable request tracker database and is forwarded to a public
|
||||||
mailing list. Confidential mail may be sent to openssl-security@openssl.org
|
mailing list. Confidential mail may be sent to openssl-security@openssl.org
|
||||||
(PGP key available from the key servers).
|
(PGP key available from the key servers).
|
||||||
|
|
||||||
@@ -164,7 +173,9 @@
|
|||||||
textual explanation of what your patch does.
|
textual explanation of what your patch does.
|
||||||
|
|
||||||
Note: For legal reasons, contributions from the US can be accepted only
|
Note: For legal reasons, contributions from the US can be accepted only
|
||||||
if a copy of the patch is sent to crypt@bxa.doc.gov
|
if a TSA notification and a copy of the patch is sent to crypt@bis.doc.gov;
|
||||||
|
see http://www.bis.doc.gov/Encryption/PubAvailEncSourceCodeNofify.html [sic]
|
||||||
|
and http://w3.access.gpo.gov/bis/ear/pdf/740.pdf (EAR Section 740.13(e)).
|
||||||
|
|
||||||
The preferred format for changes is "diff -u" output. You might
|
The preferred format for changes is "diff -u" output. You might
|
||||||
generate it like this:
|
generate it like this:
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
shared-library that contains the ENGINE implementation, and "NO_VCHECK"
|
shared-library that contains the ENGINE implementation, and "NO_VCHECK"
|
||||||
might possibly be useful if there is a minor version conflict and you
|
might possibly be useful if there is a minor version conflict and you
|
||||||
(or a vendor helpdesk) is convinced you can safely ignore it.
|
(or a vendor helpdesk) is convinced you can safely ignore it.
|
||||||
"ENGINE_ID" is probably only needed if a shared-library implements
|
"ID" is probably only needed if a shared-library implements
|
||||||
multiple ENGINEs, but if you know the engine id you expect to be using,
|
multiple ENGINEs, but if you know the engine id you expect to be using,
|
||||||
it doesn't hurt to specify it (and this provides a sanity check if
|
it doesn't hurt to specify it (and this provides a sanity check if
|
||||||
nothing else). "LIST_ADD" is only required if you actually wish the
|
nothing else). "LIST_ADD" is only required if you actually wish the
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
|
|
||||||
ENGINE *e = ENGINE_by_id("dynamic");
|
ENGINE *e = ENGINE_by_id("dynamic");
|
||||||
ENGINE_ctrl_cmd_string(e, "SO_PATH", "/lib/libfoo.so", 0);
|
ENGINE_ctrl_cmd_string(e, "SO_PATH", "/lib/libfoo.so", 0);
|
||||||
ENGINE_ctrl_cmd_string(e, "ENGINE_ID", "foo", 0);
|
ENGINE_ctrl_cmd_string(e, "ID", "foo", 0);
|
||||||
ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0);
|
ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0);
|
||||||
ENGINE_ctrl_cmd_string(e, "CMD_FOO", "some input data", 0);
|
ENGINE_ctrl_cmd_string(e, "CMD_FOO", "some input data", 0);
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
|
|
||||||
openssl engine dynamic \
|
openssl engine dynamic \
|
||||||
-pre SO_PATH:/lib/libfoo.so \
|
-pre SO_PATH:/lib/libfoo.so \
|
||||||
-pre ENGINE_ID:foo \
|
-pre ID:foo \
|
||||||
-pre LOAD \
|
-pre LOAD \
|
||||||
-pre "CMD_FOO:some input data"
|
-pre "CMD_FOO:some input data"
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
|
|
||||||
openssl engine -vvvv dynamic \
|
openssl engine -vvvv dynamic \
|
||||||
-pre SO_PATH:/lib/libfoo.so \
|
-pre SO_PATH:/lib/libfoo.so \
|
||||||
-pre ENGINE_ID:foo \
|
-pre ID:foo \
|
||||||
-pre LOAD
|
-pre LOAD
|
||||||
|
|
||||||
Applications that support the ENGINE API and more specifically, the
|
Applications that support the ENGINE API and more specifically, the
|
||||||
|
|||||||
56
STATUS
56
STATUS
@@ -1,10 +1,22 @@
|
|||||||
|
|
||||||
OpenSSL STATUS Last modified at
|
OpenSSL STATUS Last modified at
|
||||||
______________ $Date: 2002/02/13 10:21:25 $
|
______________ $Date: 2003/10/02 10:55:20 $
|
||||||
|
|
||||||
DEVELOPMENT STATE
|
DEVELOPMENT STATE
|
||||||
|
|
||||||
o OpenSSL 0.9.7: Under development...
|
o OpenSSL 0.9.8: Under development...
|
||||||
|
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.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
|
||||||
|
o OpenSSL 0.9.6f: Released on August 8th, 2002
|
||||||
|
o OpenSSL 0.9.6e: Released on July 30th, 2002
|
||||||
|
o OpenSSL 0.9.6d: Released on May 9th, 2002
|
||||||
o OpenSSL 0.9.6c: Released on December 21st, 2001
|
o OpenSSL 0.9.6c: Released on December 21st, 2001
|
||||||
o OpenSSL 0.9.6b: Released on July 9th, 2001
|
o OpenSSL 0.9.6b: Released on July 9th, 2001
|
||||||
o OpenSSL 0.9.6a: Released on April 5th, 2001
|
o OpenSSL 0.9.6a: Released on April 5th, 2001
|
||||||
@@ -17,10 +29,11 @@
|
|||||||
o OpenSSL 0.9.2b: Released on March 22th, 1999
|
o OpenSSL 0.9.2b: Released on March 22th, 1999
|
||||||
o OpenSSL 0.9.1c: Released on December 23th, 1998
|
o OpenSSL 0.9.1c: Released on December 23th, 1998
|
||||||
|
|
||||||
|
[See also http://www.openssl.org/support/rt2.html]
|
||||||
|
|
||||||
RELEASE SHOWSTOPPERS
|
RELEASE SHOWSTOPPERS
|
||||||
|
|
||||||
o BIGNUM library failures on 64-bit platforms (0.9.7-dev):
|
o
|
||||||
- BN_mod_mul verificiation (bc) fails for solaris64-sparcv9-cc
|
|
||||||
|
|
||||||
AVAILABLE PATCHES
|
AVAILABLE PATCHES
|
||||||
|
|
||||||
@@ -43,30 +56,13 @@
|
|||||||
UTIL (a new set of library functions to support some higher level
|
UTIL (a new set of library functions to support some higher level
|
||||||
functionality that is currently missing).
|
functionality that is currently missing).
|
||||||
Shared library support for VMS.
|
Shared library support for VMS.
|
||||||
Kerberos 5 authentication
|
Kerberos 5 authentication (Heimdal)
|
||||||
Constification
|
Constification
|
||||||
OCSP
|
|
||||||
|
|
||||||
NEEDS PATCH
|
NEEDS PATCH
|
||||||
|
|
||||||
o An (optional) countermeasure against the predictable-IV CBC
|
|
||||||
weakness in SSL/TLS should be added; see
|
|
||||||
http://www.openssl.org/~bodo/tls-cbc.txt
|
|
||||||
|
|
||||||
o All 'openssl' subprograms taking '-des' and '-des3' options should
|
|
||||||
include AES support (0.9.7-dev)
|
|
||||||
|
|
||||||
o 'openssl speed' should include AES support (0.9.7-dev)
|
|
||||||
|
|
||||||
o apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
|
o apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
|
||||||
|
|
||||||
o OpenSSL_0_9_6-stable:
|
|
||||||
#include <openssl/e_os.h> in exported header files is illegal since
|
|
||||||
e_os.h is suitable only for library-internal use.
|
|
||||||
|
|
||||||
o Whenever strncpy is used, make sure the resulting string is NULL-terminated
|
|
||||||
or an error is reported
|
|
||||||
|
|
||||||
o "OpenSSL STATUS" is never up-to-date.
|
o "OpenSSL STATUS" is never up-to-date.
|
||||||
|
|
||||||
OPEN ISSUES
|
OPEN ISSUES
|
||||||
@@ -95,22 +91,6 @@
|
|||||||
which apparently is not flexible enough to generate
|
which apparently is not flexible enough to generate
|
||||||
libcrypto)
|
libcrypto)
|
||||||
|
|
||||||
|
|
||||||
o The perl/ stuff needs a major overhaul. Currently it's
|
|
||||||
totally obsolete. Either we clean it up and enhance it to be up-to-date
|
|
||||||
with the C code or we also could replace it with the really nice
|
|
||||||
Net::SSLeay package we can find under
|
|
||||||
http://www.neuronio.pt/SSLeay.pm.html. Ralf uses this package for a
|
|
||||||
longer time and it works fine and is a nice Perl module. Best would be
|
|
||||||
to convince the author to work for the OpenSSL project and create a
|
|
||||||
Net::OpenSSL or Crypt::OpenSSL package out of it and maintains it for
|
|
||||||
us.
|
|
||||||
|
|
||||||
Status: Ralf thinks we should both contact the author of Net::SSLeay
|
|
||||||
and look how much effort it is to bring Eric's perl/ stuff up
|
|
||||||
to date.
|
|
||||||
Paul +1
|
|
||||||
|
|
||||||
WISHES
|
WISHES
|
||||||
|
|
||||||
o Add variants of DH_generate_parameters() and BN_generate_prime() [etc?]
|
o Add variants of DH_generate_parameters() and BN_generate_prime() [etc?]
|
||||||
|
|||||||
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
|
||||||
1302
apps/Makefile.ssl
1302
apps/Makefile.ssl
File diff suppressed because it is too large
Load Diff
200
apps/apps.c
200
apps/apps.c
@@ -114,9 +114,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#define NON_MAIN
|
#include <ctype.h>
|
||||||
#include "apps.h"
|
|
||||||
#undef NON_MAIN
|
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
@@ -124,17 +122,13 @@
|
|||||||
#include <openssl/pkcs12.h>
|
#include <openssl/pkcs12.h>
|
||||||
#include <openssl/ui.h>
|
#include <openssl/ui.h>
|
||||||
#include <openssl/safestack.h>
|
#include <openssl/safestack.h>
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
|
||||||
#define strcasecmp _stricmp
|
|
||||||
#else
|
|
||||||
#include <strings.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#define NON_MAIN
|
||||||
# include "bss_file.c"
|
#include "apps.h"
|
||||||
#endif
|
#undef NON_MAIN
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *name;
|
char *name;
|
||||||
@@ -147,7 +141,7 @@ static UI_METHOD *ui_method = NULL;
|
|||||||
static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl);
|
static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl);
|
||||||
static int set_multi_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl);
|
static int set_multi_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl);
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_RC4
|
#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA)
|
||||||
/* Looks like this stuff is worth moving into separate function */
|
/* Looks like this stuff is worth moving into separate function */
|
||||||
static EVP_PKEY *
|
static EVP_PKEY *
|
||||||
load_netscape_key(BIO *err, BIO *key, const char *file,
|
load_netscape_key(BIO *err, BIO *key, const char *file,
|
||||||
@@ -310,9 +304,16 @@ void program_name(char *in, char *out, int size)
|
|||||||
|
|
||||||
q=strrchr(p,'.');
|
q=strrchr(p,'.');
|
||||||
if (q == NULL)
|
if (q == NULL)
|
||||||
q = in+size;
|
q = p + strlen(p);
|
||||||
strncpy(out,p,q-p);
|
strncpy(out,p,size-1);
|
||||||
out[q-p]='\0';
|
if (q-p >= size)
|
||||||
|
{
|
||||||
|
out[size-1]='\0';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out[q-p]='\0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void program_name(char *in, char *out, int size)
|
void program_name(char *in, char *out, int size)
|
||||||
@@ -324,8 +325,7 @@ void program_name(char *in, char *out, int size)
|
|||||||
p++;
|
p++;
|
||||||
else
|
else
|
||||||
p=in;
|
p=in;
|
||||||
strncpy(out,p,size-1);
|
BUF_strlcpy(out,p,size);
|
||||||
out[size-1]='\0';
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -333,15 +333,37 @@ void program_name(char *in, char *out, int size)
|
|||||||
#ifdef OPENSSL_SYS_WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
int WIN32_rename(char *from, char *to)
|
int WIN32_rename(char *from, char *to)
|
||||||
{
|
{
|
||||||
#ifdef OPENSSL_SYS_WINNT
|
#ifndef OPENSSL_SYS_WINCE
|
||||||
int ret;
|
/* Windows rename gives an error if 'to' exists, so delete it
|
||||||
/* Note: MoveFileEx() doesn't work under Win95, Win98 */
|
* first and ignore file not found errror
|
||||||
|
*/
|
||||||
ret=MoveFileEx(from,to,MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED);
|
if((remove(to) != 0) && (errno != ENOENT))
|
||||||
return(ret?0:-1);
|
return -1;
|
||||||
|
#undef rename
|
||||||
|
return rename(from, to);
|
||||||
#else
|
#else
|
||||||
unlink(to);
|
/* convert strings to UNICODE */
|
||||||
return MoveFile(from, to);
|
{
|
||||||
|
BOOL result = FALSE;
|
||||||
|
WCHAR* wfrom;
|
||||||
|
WCHAR* wto;
|
||||||
|
int i;
|
||||||
|
wfrom = malloc((strlen(from)+1)*2);
|
||||||
|
wto = malloc((strlen(to)+1)*2);
|
||||||
|
if (wfrom != NULL && wto != NULL)
|
||||||
|
{
|
||||||
|
for (i=0; i<(int)strlen(from)+1; i++)
|
||||||
|
wfrom[i] = (short)from[i];
|
||||||
|
for (i=0; i<(int)strlen(to)+1; i++)
|
||||||
|
wto[i] = (short)to[i];
|
||||||
|
result = MoveFile(wfrom, wto);
|
||||||
|
}
|
||||||
|
if (wfrom != NULL)
|
||||||
|
free(wfrom);
|
||||||
|
if (wto != NULL)
|
||||||
|
free(wto);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -421,16 +443,20 @@ int app_init(long mesgwin)
|
|||||||
|
|
||||||
int dump_cert_text (BIO *out, X509 *x)
|
int dump_cert_text (BIO *out, X509 *x)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char *p;
|
||||||
X509_NAME_oneline(X509_get_subject_name(x),buf,256);
|
|
||||||
BIO_puts(out,"subject=");
|
|
||||||
BIO_puts(out,buf);
|
|
||||||
|
|
||||||
X509_NAME_oneline(X509_get_issuer_name(x),buf,256);
|
p=X509_NAME_oneline(X509_get_subject_name(x),NULL,0);
|
||||||
BIO_puts(out,"\nissuer= ");
|
BIO_puts(out,"subject=");
|
||||||
BIO_puts(out,buf);
|
BIO_puts(out,p);
|
||||||
|
OPENSSL_free(p);
|
||||||
|
|
||||||
|
p=X509_NAME_oneline(X509_get_issuer_name(x),NULL,0);
|
||||||
|
BIO_puts(out,"\nissuer=");
|
||||||
|
BIO_puts(out,p);
|
||||||
BIO_puts(out,"\n");
|
BIO_puts(out,"\n");
|
||||||
return 0;
|
OPENSSL_free(p);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ui_open(UI *ui)
|
static int ui_open(UI *ui)
|
||||||
@@ -486,7 +512,7 @@ static int ui_close(UI *ui)
|
|||||||
{
|
{
|
||||||
return UI_method_get_closer(UI_OpenSSL())(ui);
|
return UI_method_get_closer(UI_OpenSSL())(ui);
|
||||||
}
|
}
|
||||||
int setup_ui_method()
|
int setup_ui_method(void)
|
||||||
{
|
{
|
||||||
ui_method = UI_create_method("OpenSSL application user interface");
|
ui_method = UI_create_method("OpenSSL application user interface");
|
||||||
UI_method_set_opener(ui_method, ui_open);
|
UI_method_set_opener(ui_method, ui_open);
|
||||||
@@ -495,7 +521,7 @@ int setup_ui_method()
|
|||||||
UI_method_set_closer(ui_method, ui_close);
|
UI_method_set_closer(ui_method, ui_close);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
void destroy_ui_method()
|
void destroy_ui_method(void)
|
||||||
{
|
{
|
||||||
if(ui_method)
|
if(ui_method)
|
||||||
{
|
{
|
||||||
@@ -561,7 +587,7 @@ int password_callback(char *buf, int bufsiz, int verify,
|
|||||||
|
|
||||||
if (buff)
|
if (buff)
|
||||||
{
|
{
|
||||||
memset(buff,0,(unsigned int)bufsiz);
|
OPENSSL_cleanse(buff,(unsigned int)bufsiz);
|
||||||
OPENSSL_free(buff);
|
OPENSSL_free(buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -571,13 +597,13 @@ int password_callback(char *buf, int bufsiz, int verify,
|
|||||||
{
|
{
|
||||||
BIO_printf(bio_err, "User interface error\n");
|
BIO_printf(bio_err, "User interface error\n");
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
memset(buf,0,(unsigned int)bufsiz);
|
OPENSSL_cleanse(buf,(unsigned int)bufsiz);
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
if (ok == -2)
|
if (ok == -2)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"aborted!\n");
|
BIO_printf(bio_err,"aborted!\n");
|
||||||
memset(buf,0,(unsigned int)bufsiz);
|
OPENSSL_cleanse(buf,(unsigned int)bufsiz);
|
||||||
res = 0;
|
res = 0;
|
||||||
}
|
}
|
||||||
UI_free(ui);
|
UI_free(ui);
|
||||||
@@ -790,7 +816,7 @@ end:
|
|||||||
return(x);
|
return(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
EVP_PKEY *load_key(BIO *err, const char *file, int format,
|
EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
|
||||||
const char *pass, ENGINE *e, const char *key_descrip)
|
const char *pass, ENGINE *e, const char *key_descrip)
|
||||||
{
|
{
|
||||||
BIO *key=NULL;
|
BIO *key=NULL;
|
||||||
@@ -800,11 +826,12 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
|
|||||||
cb_data.password = pass;
|
cb_data.password = pass;
|
||||||
cb_data.prompt_info = file;
|
cb_data.prompt_info = file;
|
||||||
|
|
||||||
if (file == NULL)
|
if (file == NULL && (!maybe_stdin || format == FORMAT_ENGINE))
|
||||||
{
|
{
|
||||||
BIO_printf(err,"no keyfile specified\n");
|
BIO_printf(err,"no keyfile specified\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
if (format == FORMAT_ENGINE)
|
if (format == FORMAT_ENGINE)
|
||||||
{
|
{
|
||||||
if (!e)
|
if (!e)
|
||||||
@@ -814,18 +841,26 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
|
|||||||
ui_method, &cb_data);
|
ui_method, &cb_data);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
key=BIO_new(BIO_s_file());
|
key=BIO_new(BIO_s_file());
|
||||||
if (key == NULL)
|
if (key == NULL)
|
||||||
{
|
{
|
||||||
ERR_print_errors(err);
|
ERR_print_errors(err);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if (BIO_read_filename(key,file) <= 0)
|
if (file == NULL && maybe_stdin)
|
||||||
{
|
{
|
||||||
BIO_printf(err, "Error opening %s %s\n", key_descrip, file);
|
setvbuf(stdin, NULL, _IONBF, 0);
|
||||||
ERR_print_errors(err);
|
BIO_set_fp(key,stdin,BIO_NOCLOSE);
|
||||||
goto end;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
if (BIO_read_filename(key,file) <= 0)
|
||||||
|
{
|
||||||
|
BIO_printf(err, "Error opening %s %s\n",
|
||||||
|
key_descrip, file);
|
||||||
|
ERR_print_errors(err);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
if (format == FORMAT_ASN1)
|
if (format == FORMAT_ASN1)
|
||||||
{
|
{
|
||||||
pkey=d2i_PrivateKey_bio(key, NULL);
|
pkey=d2i_PrivateKey_bio(key, NULL);
|
||||||
@@ -835,7 +870,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
|
|||||||
pkey=PEM_read_bio_PrivateKey(key,NULL,
|
pkey=PEM_read_bio_PrivateKey(key,NULL,
|
||||||
(pem_password_cb *)password_callback, &cb_data);
|
(pem_password_cb *)password_callback, &cb_data);
|
||||||
}
|
}
|
||||||
#ifndef OPENSSL_NO_RC4
|
#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA)
|
||||||
else if (format == FORMAT_NETSCAPE || format == FORMAT_IISSGC)
|
else if (format == FORMAT_NETSCAPE || format == FORMAT_IISSGC)
|
||||||
pkey = load_netscape_key(err, key, file, key_descrip, format);
|
pkey = load_netscape_key(err, key, file, key_descrip, format);
|
||||||
#endif
|
#endif
|
||||||
@@ -859,7 +894,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
|
|||||||
return(pkey);
|
return(pkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
|
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
|
||||||
const char *pass, ENGINE *e, const char *key_descrip)
|
const char *pass, ENGINE *e, const char *key_descrip)
|
||||||
{
|
{
|
||||||
BIO *key=NULL;
|
BIO *key=NULL;
|
||||||
@@ -869,11 +904,12 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
|
|||||||
cb_data.password = pass;
|
cb_data.password = pass;
|
||||||
cb_data.prompt_info = file;
|
cb_data.prompt_info = file;
|
||||||
|
|
||||||
if (file == NULL)
|
if (file == NULL && (!maybe_stdin || format == FORMAT_ENGINE))
|
||||||
{
|
{
|
||||||
BIO_printf(err,"no keyfile specified\n");
|
BIO_printf(err,"no keyfile specified\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
if (format == FORMAT_ENGINE)
|
if (format == FORMAT_ENGINE)
|
||||||
{
|
{
|
||||||
if (!e)
|
if (!e)
|
||||||
@@ -883,17 +919,25 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
|
|||||||
ui_method, &cb_data);
|
ui_method, &cb_data);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
key=BIO_new(BIO_s_file());
|
key=BIO_new(BIO_s_file());
|
||||||
if (key == NULL)
|
if (key == NULL)
|
||||||
{
|
{
|
||||||
ERR_print_errors(err);
|
ERR_print_errors(err);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if (BIO_read_filename(key,file) <= 0)
|
if (file == NULL && maybe_stdin)
|
||||||
{
|
{
|
||||||
BIO_printf(err, "Error opening %s %s\n", key_descrip, file);
|
setvbuf(stdin, NULL, _IONBF, 0);
|
||||||
ERR_print_errors(err);
|
BIO_set_fp(key,stdin,BIO_NOCLOSE);
|
||||||
goto end;
|
}
|
||||||
|
else
|
||||||
|
if (BIO_read_filename(key,file) <= 0)
|
||||||
|
{
|
||||||
|
BIO_printf(err, "Error opening %s %s\n",
|
||||||
|
key_descrip, file);
|
||||||
|
ERR_print_errors(err);
|
||||||
|
goto end;
|
||||||
}
|
}
|
||||||
if (format == FORMAT_ASN1)
|
if (format == FORMAT_ASN1)
|
||||||
{
|
{
|
||||||
@@ -904,7 +948,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
|
|||||||
pkey=PEM_read_bio_PUBKEY(key,NULL,
|
pkey=PEM_read_bio_PUBKEY(key,NULL,
|
||||||
(pem_password_cb *)password_callback, &cb_data);
|
(pem_password_cb *)password_callback, &cb_data);
|
||||||
}
|
}
|
||||||
#ifndef OPENSSL_NO_RC4
|
#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA)
|
||||||
else if (format == FORMAT_NETSCAPE || format == FORMAT_IISSGC)
|
else if (format == FORMAT_NETSCAPE || format == FORMAT_IISSGC)
|
||||||
pkey = load_netscape_key(err, key, file, key_descrip, format);
|
pkey = load_netscape_key(err, key, file, key_descrip, format);
|
||||||
#endif
|
#endif
|
||||||
@@ -920,8 +964,8 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
|
|||||||
return(pkey);
|
return(pkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_RC4
|
#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA)
|
||||||
EVP_PKEY *
|
static EVP_PKEY *
|
||||||
load_netscape_key(BIO *err, BIO *key, const char *file,
|
load_netscape_key(BIO *err, BIO *key, const char *file,
|
||||||
const char *key_descrip, int format)
|
const char *key_descrip, int format)
|
||||||
{
|
{
|
||||||
@@ -938,7 +982,7 @@ load_netscape_key(BIO *err, BIO *key, const char *file,
|
|||||||
goto error;
|
goto error;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (!BUF_MEM_grow(buf,size+1024*10))
|
if (!BUF_MEM_grow_clean(buf,size+1024*10))
|
||||||
goto error;
|
goto error;
|
||||||
i = BIO_read(key, &(buf->data[size]), 1024*10);
|
i = BIO_read(key, &(buf->data[size]), 1024*10);
|
||||||
size += i;
|
size += i;
|
||||||
@@ -1066,6 +1110,7 @@ int set_cert_ex(unsigned long *flags, const char *arg)
|
|||||||
{ "no_extensions", X509_FLAG_NO_EXTENSIONS, 0},
|
{ "no_extensions", X509_FLAG_NO_EXTENSIONS, 0},
|
||||||
{ "no_sigdump", X509_FLAG_NO_SIGDUMP, 0},
|
{ "no_sigdump", X509_FLAG_NO_SIGDUMP, 0},
|
||||||
{ "no_aux", X509_FLAG_NO_AUX, 0},
|
{ "no_aux", X509_FLAG_NO_AUX, 0},
|
||||||
|
{ "no_attributes", X509_FLAG_NO_ATTRIBUTES, 0},
|
||||||
{ "ext_default", X509V3_EXT_DEFAULT, X509V3_EXT_UNKNOWN_MASK},
|
{ "ext_default", X509V3_EXT_DEFAULT, X509V3_EXT_UNKNOWN_MASK},
|
||||||
{ "ext_error", X509V3_EXT_ERROR_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
|
{ "ext_error", X509V3_EXT_ERROR_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
|
||||||
{ "ext_parse", X509V3_EXT_PARSE_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
|
{ "ext_parse", X509V3_EXT_PARSE_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
|
||||||
@@ -1209,18 +1254,20 @@ static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_T
|
|||||||
|
|
||||||
void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags)
|
void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char *buf;
|
||||||
char mline = 0;
|
char mline = 0;
|
||||||
int indent = 0;
|
int indent = 0;
|
||||||
|
|
||||||
if(title) BIO_puts(out, title);
|
if(title) BIO_puts(out, title);
|
||||||
if((lflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) {
|
if((lflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) {
|
||||||
mline = 1;
|
mline = 1;
|
||||||
indent = 4;
|
indent = 4;
|
||||||
}
|
}
|
||||||
if(lflags == XN_FLAG_COMPAT) {
|
if(lflags == XN_FLAG_COMPAT) {
|
||||||
X509_NAME_oneline(nm,buf,256);
|
buf = X509_NAME_oneline(nm, 0, 0);
|
||||||
BIO_puts(out,buf);
|
BIO_puts(out, buf);
|
||||||
BIO_puts(out, "\n");
|
BIO_puts(out, "\n");
|
||||||
|
OPENSSL_free(buf);
|
||||||
} else {
|
} else {
|
||||||
if(mline) BIO_puts(out, "\n");
|
if(mline) BIO_puts(out, "\n");
|
||||||
X509_NAME_print_ex(out, nm, indent, lflags);
|
X509_NAME_print_ex(out, nm, indent, lflags);
|
||||||
@@ -1258,8 +1305,9 @@ X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
/* Try to load an engine in a shareable library */
|
/* Try to load an engine in a shareable library */
|
||||||
ENGINE *try_load_engine(BIO *err, const char *engine, int debug)
|
static ENGINE *try_load_engine(BIO *err, const char *engine, int debug)
|
||||||
{
|
{
|
||||||
ENGINE *e = ENGINE_by_id("dynamic");
|
ENGINE *e = ENGINE_by_id("dynamic");
|
||||||
if (e)
|
if (e)
|
||||||
@@ -1314,3 +1362,37 @@ ENGINE *setup_engine(BIO *err, const char *engine, int debug)
|
|||||||
}
|
}
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int load_config(BIO *err, CONF *cnf)
|
||||||
|
{
|
||||||
|
if (!cnf)
|
||||||
|
cnf = config;
|
||||||
|
if (!cnf)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
OPENSSL_load_builtin_modules();
|
||||||
|
|
||||||
|
if (CONF_modules_load(cnf, NULL, 0) <= 0)
|
||||||
|
{
|
||||||
|
BIO_printf(err, "Error configuring OpenSSL\n");
|
||||||
|
ERR_print_errors(err);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *make_config_name()
|
||||||
|
{
|
||||||
|
const char *t=X509_get_default_cert_area();
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
p=OPENSSL_malloc(strlen(t)+strlen(OPENSSL_CONF)+2);
|
||||||
|
strcpy(p,t);
|
||||||
|
#ifndef OPENSSL_SYS_VMS
|
||||||
|
strcat(p,"/");
|
||||||
|
#endif
|
||||||
|
strcat(p,OPENSSL_CONF);
|
||||||
|
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|||||||
88
apps/apps.h
88
apps/apps.h
@@ -121,6 +121,9 @@
|
|||||||
#include <openssl/lhash.h>
|
#include <openssl/lhash.h>
|
||||||
#include <openssl/conf.h>
|
#include <openssl/conf.h>
|
||||||
#include <openssl/txt_db.h>
|
#include <openssl/txt_db.h>
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
#include <openssl/engine.h>
|
||||||
|
#endif
|
||||||
#include <openssl/ossl_typ.h>
|
#include <openssl/ossl_typ.h>
|
||||||
|
|
||||||
int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
|
int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
|
||||||
@@ -133,10 +136,6 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read,
|
|||||||
* (see e_os.h). The string is
|
* (see e_os.h). The string is
|
||||||
* destroyed! */
|
* destroyed! */
|
||||||
|
|
||||||
#ifdef OPENSSL_NO_STDIO
|
|
||||||
BIO_METHOD *BIO_s_file();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
#define rename(from,to) WIN32_rename((from),(to))
|
#define rename(from,to) WIN32_rename((from),(to))
|
||||||
int WIN32_rename(char *oldname,char *newname);
|
int WIN32_rename(char *oldname,char *newname);
|
||||||
@@ -147,8 +146,10 @@ int WIN32_rename(char *oldname,char *newname);
|
|||||||
#define MAIN(a,v) main(a,v)
|
#define MAIN(a,v) main(a,v)
|
||||||
|
|
||||||
#ifndef NON_MAIN
|
#ifndef NON_MAIN
|
||||||
|
CONF *config=NULL;
|
||||||
BIO *bio_err=NULL;
|
BIO *bio_err=NULL;
|
||||||
#else
|
#else
|
||||||
|
extern CONF *config;
|
||||||
extern BIO *bio_err;
|
extern BIO *bio_err;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -174,29 +175,57 @@ extern BIO *bio_err;
|
|||||||
do_pipe_sig()
|
do_pipe_sig()
|
||||||
# define apps_shutdown()
|
# define apps_shutdown()
|
||||||
#else
|
#else
|
||||||
# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
|
# ifndef OPENSSL_NO_ENGINE
|
||||||
defined(OPENSSL_SYS_WIN32)
|
# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
|
||||||
# ifdef _O_BINARY
|
defined(OPENSSL_SYS_WIN32)
|
||||||
# define apps_startup() \
|
# ifdef _O_BINARY
|
||||||
do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
# define apps_startup() \
|
||||||
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||||
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
|
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||||
|
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
|
||||||
|
# else
|
||||||
|
# define apps_startup() \
|
||||||
|
do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||||
|
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||||
|
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
# define apps_startup() \
|
# define apps_startup() \
|
||||||
do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
|
||||||
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \
|
||||||
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
|
setup_ui_method(); } while(0)
|
||||||
# endif
|
# endif
|
||||||
|
# define apps_shutdown() \
|
||||||
|
do { CONF_modules_unload(1); destroy_ui_method(); \
|
||||||
|
EVP_cleanup(); ENGINE_cleanup(); \
|
||||||
|
CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
|
||||||
|
ERR_free_strings(); } while(0)
|
||||||
# else
|
# else
|
||||||
# define apps_startup() \
|
# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
|
||||||
do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
|
defined(OPENSSL_SYS_WIN32)
|
||||||
ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \
|
# ifdef _O_BINARY
|
||||||
setup_ui_method(); } while(0)
|
# define apps_startup() \
|
||||||
|
do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||||
|
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||||
|
setup_ui_method(); } while(0)
|
||||||
|
# else
|
||||||
|
# define apps_startup() \
|
||||||
|
do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||||
|
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||||
|
setup_ui_method(); } while(0)
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# define apps_startup() \
|
||||||
|
do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
|
||||||
|
ERR_load_crypto_strings(); \
|
||||||
|
setup_ui_method(); } while(0)
|
||||||
|
# endif
|
||||||
|
# define apps_shutdown() \
|
||||||
|
do { CONF_modules_unload(1); destroy_ui_method(); \
|
||||||
|
EVP_cleanup(); \
|
||||||
|
CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
|
||||||
|
ERR_free_strings(); } while(0)
|
||||||
# endif
|
# endif
|
||||||
# define apps_shutdown() \
|
|
||||||
do { destroy_ui_method(); EVP_cleanup(); \
|
|
||||||
ENGINE_cleanup(); CRYPTO_cleanup_all_ex_data(); \
|
|
||||||
ERR_remove_state(0); ERR_free_strings(); } while(0)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct args_st
|
typedef struct args_st
|
||||||
@@ -215,8 +244,8 @@ typedef struct pw_cb_data
|
|||||||
int password_callback(char *buf, int bufsiz, int verify,
|
int password_callback(char *buf, int bufsiz, int verify,
|
||||||
PW_CB_DATA *cb_data);
|
PW_CB_DATA *cb_data);
|
||||||
|
|
||||||
int setup_ui_method();
|
int setup_ui_method(void);
|
||||||
void destroy_ui_method();
|
void destroy_ui_method(void);
|
||||||
|
|
||||||
int should_retry(int i);
|
int should_retry(int i);
|
||||||
int args_from_file(char *file, int *argc, char **argv[]);
|
int args_from_file(char *file, int *argc, char **argv[]);
|
||||||
@@ -235,20 +264,27 @@ int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2);
|
|||||||
int add_oid_section(BIO *err, CONF *conf);
|
int add_oid_section(BIO *err, CONF *conf);
|
||||||
X509 *load_cert(BIO *err, const char *file, int format,
|
X509 *load_cert(BIO *err, const char *file, int format,
|
||||||
const char *pass, ENGINE *e, const char *cert_descrip);
|
const char *pass, ENGINE *e, const char *cert_descrip);
|
||||||
EVP_PKEY *load_key(BIO *err, const char *file, int format,
|
EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
|
||||||
const char *pass, ENGINE *e, const char *key_descrip);
|
const char *pass, ENGINE *e, const char *key_descrip);
|
||||||
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
|
EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
|
||||||
const char *pass, ENGINE *e, const char *key_descrip);
|
const char *pass, ENGINE *e, const char *key_descrip);
|
||||||
STACK_OF(X509) *load_certs(BIO *err, const char *file, int format,
|
STACK_OF(X509) *load_certs(BIO *err, const char *file, int format,
|
||||||
const char *pass, ENGINE *e, const char *cert_descrip);
|
const char *pass, ENGINE *e, const char *cert_descrip);
|
||||||
X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath);
|
X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath);
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *setup_engine(BIO *err, const char *engine, int debug);
|
ENGINE *setup_engine(BIO *err, const char *engine, int debug);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int load_config(BIO *err, CONF *cnf);
|
||||||
|
char *make_config_name(void);
|
||||||
|
|
||||||
/* Functions defined in ca.c and also used in ocsp.c */
|
/* Functions defined in ca.c and also used in ocsp.c */
|
||||||
int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
|
int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
|
||||||
ASN1_GENERALIZEDTIME **pinvtm, char *str);
|
ASN1_GENERALIZEDTIME **pinvtm, char *str);
|
||||||
int make_serial_index(TXT_DB *db);
|
int make_serial_index(TXT_DB *db);
|
||||||
|
|
||||||
|
X509_NAME *do_subject(char *str, long chtype);
|
||||||
|
|
||||||
#define FORMAT_UNDEF 0
|
#define FORMAT_UNDEF 0
|
||||||
#define FORMAT_ASN1 1
|
#define FORMAT_ASN1 1
|
||||||
#define FORMAT_TEXT 2
|
#define FORMAT_TEXT 2
|
||||||
|
|||||||
@@ -103,6 +103,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
prog=argv[0];
|
prog=argv[0];
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
@@ -181,7 +184,7 @@ bad:
|
|||||||
BIO_printf(bio_err,"where options are\n");
|
BIO_printf(bio_err,"where options are\n");
|
||||||
BIO_printf(bio_err," -inform arg input format - one of DER TXT PEM\n");
|
BIO_printf(bio_err," -inform arg input format - one of DER TXT PEM\n");
|
||||||
BIO_printf(bio_err," -in arg input file\n");
|
BIO_printf(bio_err," -in arg input file\n");
|
||||||
BIO_printf(bio_err," -out arg output file\n");
|
BIO_printf(bio_err," -out arg output file (output format is always DER\n");
|
||||||
BIO_printf(bio_err," -noout arg don't produce any output\n");
|
BIO_printf(bio_err," -noout arg don't produce any output\n");
|
||||||
BIO_printf(bio_err," -offset arg offset into file\n");
|
BIO_printf(bio_err," -offset arg offset into file\n");
|
||||||
BIO_printf(bio_err," -length arg length of section in file\n");
|
BIO_printf(bio_err," -length arg length of section in file\n");
|
||||||
@@ -192,7 +195,6 @@ bad:
|
|||||||
BIO_printf(bio_err," -strparse offset\n");
|
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," a series of these can be used to 'dig' into multiple\n");
|
||||||
BIO_printf(bio_err," ASN1 blob wrappings\n");
|
BIO_printf(bio_err," ASN1 blob wrappings\n");
|
||||||
BIO_printf(bio_err," -out filename output DER encoding to file\n");
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,6 +332,6 @@ end:
|
|||||||
if (osk != NULL) sk_free(osk);
|
if (osk != NULL) sk_free(osk);
|
||||||
OBJ_cleanup();
|
OBJ_cleanup();
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
285
apps/ca.c
285
apps/ca.c
@@ -64,7 +64,6 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "apps.h"
|
|
||||||
#include <openssl/conf.h>
|
#include <openssl/conf.h>
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
@@ -77,12 +76,6 @@
|
|||||||
#include <openssl/ocsp.h>
|
#include <openssl/ocsp.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
|
||||||
#define strcasecmp _stricmp
|
|
||||||
#else
|
|
||||||
#include <strings.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef W_OK
|
#ifndef W_OK
|
||||||
# ifdef OPENSSL_SYS_VMS
|
# ifdef OPENSSL_SYS_VMS
|
||||||
# if defined(__DECC)
|
# if defined(__DECC)
|
||||||
@@ -90,11 +83,13 @@
|
|||||||
# else
|
# else
|
||||||
# include <unixlib.h>
|
# include <unixlib.h>
|
||||||
# endif
|
# endif
|
||||||
# elif !defined(OPENSSL_SYS_VXWORKS)
|
# elif !defined(OPENSSL_SYS_VXWORKS) && !defined(OPENSSL_SYS_WINDOWS)
|
||||||
# include <sys/file.h>
|
# include <sys/file.h>
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "apps.h"
|
||||||
|
|
||||||
#ifndef W_OK
|
#ifndef W_OK
|
||||||
# define F_OK 0
|
# define F_OK 0
|
||||||
# define X_OK 1
|
# define X_OK 1
|
||||||
@@ -191,7 +186,9 @@ static char *ca_usage[]={
|
|||||||
" -extensions .. - Extension section (override value in config file)\n",
|
" -extensions .. - Extension section (override value in config file)\n",
|
||||||
" -extfile file - Configuration file with X509v3 extentions to add\n",
|
" -extfile file - Configuration file with X509v3 extentions to add\n",
|
||||||
" -crlexts .. - CRL extension section (override value in config file)\n",
|
" -crlexts .. - CRL extension section (override value in config file)\n",
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
" -engine e - use engine e, possibly a hardware device.\n",
|
" -engine e - use engine e, possibly a hardware device.\n",
|
||||||
|
#endif
|
||||||
" -status serial - Shows certificate status given the serial number\n",
|
" -status serial - Shows certificate status given the serial number\n",
|
||||||
" -updatedb - Updates db for expired certificates\n",
|
" -updatedb - Updates db for expired certificates\n",
|
||||||
NULL
|
NULL
|
||||||
@@ -238,7 +235,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
|||||||
int verbose, X509_REQ *req, char *ext_sect, CONF *conf,
|
int verbose, X509_REQ *req, char *ext_sect, CONF *conf,
|
||||||
unsigned long certopt, unsigned long nameopt, int default_op,
|
unsigned long certopt, unsigned long nameopt, int default_op,
|
||||||
int ext_copy);
|
int ext_copy);
|
||||||
static X509_NAME *do_subject(char *subject);
|
|
||||||
static int do_revoke(X509 *x509, TXT_DB *db, int ext, char *extval);
|
static int do_revoke(X509 *x509, TXT_DB *db, int ext, char *extval);
|
||||||
static int get_certificate_status(const char *ser_status, TXT_DB *db);
|
static int get_certificate_status(const char *ser_status, TXT_DB *db);
|
||||||
static int do_updatedb(TXT_DB *db);
|
static int do_updatedb(TXT_DB *db);
|
||||||
@@ -329,7 +325,10 @@ int MAIN(int argc, char **argv)
|
|||||||
#define BSIZE 256
|
#define BSIZE 256
|
||||||
MS_STATIC char buf[3][BSIZE];
|
MS_STATIC char buf[3][BSIZE];
|
||||||
char *randfile=NULL;
|
char *randfile=NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine = NULL;
|
char *engine = NULL;
|
||||||
|
#endif
|
||||||
|
char *tofree=NULL;
|
||||||
|
|
||||||
#ifdef EFENCE
|
#ifdef EFENCE
|
||||||
EF_PROTECT_FREE=1;
|
EF_PROTECT_FREE=1;
|
||||||
@@ -532,11 +531,13 @@ EF_ALIGNMENT=0;
|
|||||||
rev_arg = *(++argv);
|
rev_arg = *(++argv);
|
||||||
rev_type = REV_CA_COMPROMISE;
|
rev_type = REV_CA_COMPROMISE;
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bad:
|
bad:
|
||||||
@@ -557,24 +558,28 @@ bad:
|
|||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
e = setup_engine(bio_err, engine, 0);
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
|
tofree=NULL;
|
||||||
if (configfile == NULL) configfile = getenv("OPENSSL_CONF");
|
if (configfile == NULL) configfile = getenv("OPENSSL_CONF");
|
||||||
if (configfile == NULL) configfile = getenv("SSLEAY_CONF");
|
if (configfile == NULL) configfile = getenv("SSLEAY_CONF");
|
||||||
if (configfile == NULL)
|
if (configfile == NULL)
|
||||||
{
|
{
|
||||||
/* We will just use 'buf[0]' as a temporary buffer. */
|
const char *s=X509_get_default_cert_area();
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strncpy(buf[0],X509_get_default_cert_area(),
|
tofree=OPENSSL_malloc(strlen(s)+sizeof(CONFIG_FILE));
|
||||||
sizeof(buf[0])-1-sizeof(CONFIG_FILE));
|
strcpy(tofree,s);
|
||||||
#else
|
#else
|
||||||
strncpy(buf[0],X509_get_default_cert_area(),
|
tofree=OPENSSL_malloc(strlen(s)+sizeof(CONFIG_FILE)+1);
|
||||||
sizeof(buf[0])-2-sizeof(CONFIG_FILE));
|
strcpy(tofree,s);
|
||||||
strcat(buf[0],"/");
|
strcat(tofree,"/");
|
||||||
#endif
|
#endif
|
||||||
strcat(buf[0],CONFIG_FILE);
|
strcat(tofree,CONFIG_FILE);
|
||||||
configfile=buf[0];
|
configfile=tofree;
|
||||||
}
|
}
|
||||||
|
|
||||||
BIO_printf(bio_err,"Using configuration from %s\n",configfile);
|
BIO_printf(bio_err,"Using configuration from %s\n",configfile);
|
||||||
@@ -589,6 +594,14 @@ bad:
|
|||||||
,errorline,configfile);
|
,errorline,configfile);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
if(tofree)
|
||||||
|
{
|
||||||
|
OPENSSL_free(tofree);
|
||||||
|
tofree = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!load_config(bio_err, conf))
|
||||||
|
goto err;
|
||||||
|
|
||||||
/* Lets get the config section we are using */
|
/* Lets get the config section we are using */
|
||||||
if (section == NULL)
|
if (section == NULL)
|
||||||
@@ -692,9 +705,9 @@ bad:
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pkey = load_key(bio_err, keyfile, keyform, key, e,
|
pkey = load_key(bio_err, keyfile, keyform, 0, key, e,
|
||||||
"CA private key");
|
"CA private key");
|
||||||
if (key) memset(key,0,strlen(key));
|
if (key) OPENSSL_cleanse(key,strlen(key));
|
||||||
if (pkey == NULL)
|
if (pkey == NULL)
|
||||||
{
|
{
|
||||||
/* load_key() has already printed an appropriate message */
|
/* load_key() has already printed an appropriate message */
|
||||||
@@ -1009,7 +1022,7 @@ bad:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
BIO_printf(bio_err, "Succesfully loaded extensions file %s\n", extfile);
|
BIO_printf(bio_err, "Successfully loaded extensions file %s\n", extfile);
|
||||||
|
|
||||||
/* We can have sections in the ext file */
|
/* We can have sections in the ext file */
|
||||||
if (!extensions && !(extensions = NCONF_get_string(extconf, "default", "extensions")))
|
if (!extensions && !(extensions = NCONF_get_string(extconf, "default", "extensions")))
|
||||||
@@ -1151,9 +1164,14 @@ bad:
|
|||||||
}
|
}
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
if ((f=BN_bn2hex(serial)) == NULL) goto err;
|
if (BN_is_zero(serial))
|
||||||
BIO_printf(bio_err,"next serial number is %s\n",f);
|
BIO_printf(bio_err,"next serial number is 00\n");
|
||||||
OPENSSL_free(f);
|
else
|
||||||
|
{
|
||||||
|
if ((f=BN_bn2hex(serial)) == NULL) goto err;
|
||||||
|
BIO_printf(bio_err,"next serial number is %s\n",f);
|
||||||
|
OPENSSL_free(f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((attribs=NCONF_get_section(conf,policy)) == NULL)
|
if ((attribs=NCONF_get_section(conf,policy)) == NULL)
|
||||||
@@ -1273,7 +1291,13 @@ bad:
|
|||||||
|
|
||||||
BIO_printf(bio_err,"Write out database with %d new entries\n",sk_X509_num(cert_sk));
|
BIO_printf(bio_err,"Write out database with %d new entries\n",sk_X509_num(cert_sk));
|
||||||
|
|
||||||
strncpy(buf[0],serialfile,BSIZE-4);
|
if(strlen(serialfile) > BSIZE-5 || strlen(dbfile) > BSIZE-5)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"file name too long\n");
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
strcpy(buf[0],serialfile);
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strcat(buf[0],"-new");
|
strcat(buf[0],"-new");
|
||||||
@@ -1283,7 +1307,7 @@ bad:
|
|||||||
|
|
||||||
if (!save_serial(buf[0],serial)) goto err;
|
if (!save_serial(buf[0],serial)) goto err;
|
||||||
|
|
||||||
strncpy(buf[1],dbfile,BSIZE-4);
|
strcpy(buf[1],dbfile);
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strcat(buf[1],"-new");
|
strcat(buf[1],"-new");
|
||||||
@@ -1313,7 +1337,13 @@ bad:
|
|||||||
j=x->cert_info->serialNumber->length;
|
j=x->cert_info->serialNumber->length;
|
||||||
p=(char *)x->cert_info->serialNumber->data;
|
p=(char *)x->cert_info->serialNumber->data;
|
||||||
|
|
||||||
strncpy(buf[2],outdir,BSIZE-(j*2)-6);
|
if(strlen(outdir) >= (size_t)(j ? BSIZE-j*2-6 : BSIZE-8))
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"certificate file name too long\n");
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
strcpy(buf[2],outdir);
|
||||||
|
|
||||||
#ifndef OPENSSL_SYS_VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
strcat(buf[2],"/");
|
strcat(buf[2],"/");
|
||||||
@@ -1351,6 +1381,7 @@ bad:
|
|||||||
{
|
{
|
||||||
/* Rename the database and the serial file */
|
/* Rename the database and the serial file */
|
||||||
strncpy(buf[2],serialfile,BSIZE-4);
|
strncpy(buf[2],serialfile,BSIZE-4);
|
||||||
|
buf[2][BSIZE-4]='\0';
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strcat(buf[2],"-old");
|
strcat(buf[2],"-old");
|
||||||
@@ -1379,6 +1410,7 @@ bad:
|
|||||||
}
|
}
|
||||||
|
|
||||||
strncpy(buf[2],dbfile,BSIZE-4);
|
strncpy(buf[2],dbfile,BSIZE-4);
|
||||||
|
buf[2][BSIZE-4]='\0';
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strcat(buf[2],"-old");
|
strcat(buf[2],"-old");
|
||||||
@@ -1442,13 +1474,13 @@ bad:
|
|||||||
}
|
}
|
||||||
if ((crldays == 0) && (crlhours == 0))
|
if ((crldays == 0) && (crlhours == 0))
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"cannot lookup how long until the next CRL is issuer\n");
|
BIO_printf(bio_err,"cannot lookup how long until the next CRL is issued\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verbose) BIO_printf(bio_err,"making CRL\n");
|
if (verbose) BIO_printf(bio_err,"making CRL\n");
|
||||||
if ((crl=X509_CRL_new()) == NULL) goto err;
|
if ((crl=X509_CRL_new()) == NULL) goto err;
|
||||||
if (!X509_CRL_set_issuer_name(crl, X509_get_issuer_name(x509))) goto err;
|
if (!X509_CRL_set_issuer_name(crl, X509_get_subject_name(x509))) goto err;
|
||||||
|
|
||||||
tmptm = ASN1_TIME_new();
|
tmptm = ASN1_TIME_new();
|
||||||
if (!tmptm) goto err;
|
if (!tmptm) goto err;
|
||||||
@@ -1501,11 +1533,6 @@ bad:
|
|||||||
if (pkey->type == EVP_PKEY_DSA)
|
if (pkey->type == EVP_PKEY_DSA)
|
||||||
dgst=EVP_dss1();
|
dgst=EVP_dss1();
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
if (pkey->type == EVP_PKEY_ECDSA)
|
|
||||||
dgst=EVP_ecdsa();
|
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
dgst=EVP_md5();
|
dgst=EVP_md5();
|
||||||
}
|
}
|
||||||
@@ -1550,7 +1577,13 @@ bad:
|
|||||||
if (j <= 0) goto err;
|
if (j <= 0) goto err;
|
||||||
X509_free(revcert);
|
X509_free(revcert);
|
||||||
|
|
||||||
strncpy(buf[0],dbfile,BSIZE-4);
|
if(strlen(dbfile) > BSIZE-5)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"filename too long\n");
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
strcpy(buf[0],dbfile);
|
||||||
#ifndef OPENSSL_SYS_VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
strcat(buf[0],".new");
|
strcat(buf[0],".new");
|
||||||
#else
|
#else
|
||||||
@@ -1564,7 +1597,12 @@ bad:
|
|||||||
}
|
}
|
||||||
j=TXT_DB_write(out,db);
|
j=TXT_DB_write(out,db);
|
||||||
if (j <= 0) goto err;
|
if (j <= 0) goto err;
|
||||||
|
BIO_free_all(out);
|
||||||
|
out = NULL;
|
||||||
|
BIO_free_all(in);
|
||||||
|
in = NULL;
|
||||||
strncpy(buf[1],dbfile,BSIZE-4);
|
strncpy(buf[1],dbfile,BSIZE-4);
|
||||||
|
buf[1][BSIZE-4]='\0';
|
||||||
#ifndef OPENSSL_SYS_VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
strcat(buf[1],".old");
|
strcat(buf[1],".old");
|
||||||
#else
|
#else
|
||||||
@@ -1589,16 +1627,19 @@ bad:
|
|||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
ret=0;
|
ret=0;
|
||||||
err:
|
err:
|
||||||
|
if(tofree)
|
||||||
|
OPENSSL_free(tofree);
|
||||||
BIO_free_all(Cout);
|
BIO_free_all(Cout);
|
||||||
BIO_free_all(Sout);
|
BIO_free_all(Sout);
|
||||||
BIO_free_all(out);
|
BIO_free_all(out);
|
||||||
BIO_free_all(in);
|
BIO_free_all(in);
|
||||||
|
|
||||||
sk_X509_pop_free(cert_sk,X509_free);
|
if (cert_sk)
|
||||||
|
sk_X509_pop_free(cert_sk,X509_free);
|
||||||
|
|
||||||
if (ret) ERR_print_errors(bio_err);
|
if (ret) ERR_print_errors(bio_err);
|
||||||
app_RAND_write_file(randfile, bio_err);
|
app_RAND_write_file(randfile, bio_err);
|
||||||
if (free_key)
|
if (free_key && key)
|
||||||
OPENSSL_free(key);
|
OPENSSL_free(key);
|
||||||
BN_free(serial);
|
BN_free(serial);
|
||||||
TXT_DB_free(db);
|
TXT_DB_free(db);
|
||||||
@@ -1608,7 +1649,7 @@ err:
|
|||||||
NCONF_free(conf);
|
NCONF_free(conf);
|
||||||
OBJ_cleanup();
|
OBJ_cleanup();
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lookup_fail(char *name, char *tag)
|
static void lookup_fail(char *name, char *tag)
|
||||||
@@ -1673,7 +1714,7 @@ static BIGNUM *load_serial(char *serialfile)
|
|||||||
ret=ASN1_INTEGER_to_BN(ai,NULL);
|
ret=ASN1_INTEGER_to_BN(ai,NULL);
|
||||||
if (ret == NULL)
|
if (ret == NULL)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"error converting number from bin to BIGNUM");
|
BIO_printf(bio_err,"error converting number from bin to BIGNUM\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
err:
|
err:
|
||||||
@@ -1864,7 +1905,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
|||||||
|
|
||||||
if (subj)
|
if (subj)
|
||||||
{
|
{
|
||||||
X509_NAME *n = do_subject(subj);
|
X509_NAME *n = do_subject(subj, MBSTRING_ASC);
|
||||||
|
|
||||||
if (!n)
|
if (!n)
|
||||||
{
|
{
|
||||||
@@ -2076,9 +2117,11 @@ again2:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
row[DB_name]=X509_NAME_oneline(dn_subject,NULL,0);
|
if (BN_is_zero(serial))
|
||||||
row[DB_serial]=BN_bn2hex(serial);
|
row[DB_serial]=BUF_strdup("00");
|
||||||
if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
|
else
|
||||||
|
row[DB_serial]=BN_bn2hex(serial);
|
||||||
|
if (row[DB_serial] == NULL)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"Memory allocation failure\n");
|
BIO_printf(bio_err,"Memory allocation failure\n");
|
||||||
goto err;
|
goto err;
|
||||||
@@ -2140,7 +2183,7 @@ again2:
|
|||||||
|
|
||||||
#ifdef X509_V3
|
#ifdef X509_V3
|
||||||
/* Make it an X509 v3 certificate. */
|
/* Make it an X509 v3 certificate. */
|
||||||
if (!X509_set_version(x509,2)) goto err;
|
if (!X509_set_version(ret,2)) goto err;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (BN_to_ASN1_INTEGER(serial,ci->serialNumber) == NULL)
|
if (BN_to_ASN1_INTEGER(serial,ci->serialNumber) == NULL)
|
||||||
@@ -2275,16 +2318,6 @@ again2:
|
|||||||
EVP_PKEY_copy_parameters(pktmp,pkey);
|
EVP_PKEY_copy_parameters(pktmp,pkey);
|
||||||
EVP_PKEY_free(pktmp);
|
EVP_PKEY_free(pktmp);
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
if (pkey->type == EVP_PKEY_ECDSA)
|
|
||||||
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))
|
if (!X509_sign(ret,pkey,dgst))
|
||||||
goto err;
|
goto err;
|
||||||
@@ -2301,10 +2334,10 @@ again2:
|
|||||||
|
|
||||||
/* row[DB_serial] done already */
|
/* row[DB_serial] done already */
|
||||||
row[DB_file]=(char *)OPENSSL_malloc(8);
|
row[DB_file]=(char *)OPENSSL_malloc(8);
|
||||||
/* row[DB_name] done already */
|
row[DB_name]=X509_NAME_oneline(X509_get_subject_name(ret),NULL,0);
|
||||||
|
|
||||||
if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) ||
|
if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) ||
|
||||||
(row[DB_file] == NULL))
|
(row[DB_file] == NULL) || (row[DB_name] == NULL))
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"Memory allocation failure\n");
|
BIO_printf(bio_err,"Memory allocation failure\n");
|
||||||
goto err;
|
goto err;
|
||||||
@@ -2571,7 +2604,10 @@ static int do_revoke(X509 *x509, TXT_DB *db, int type, char *value)
|
|||||||
row[i]=NULL;
|
row[i]=NULL;
|
||||||
row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
|
row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
|
||||||
bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);
|
bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);
|
||||||
row[DB_serial]=BN_bn2hex(bn);
|
if (BN_is_zero(bn))
|
||||||
|
row[DB_serial]=BUF_strdup("00");
|
||||||
|
else
|
||||||
|
row[DB_serial]=BN_bn2hex(bn);
|
||||||
BN_free(bn);
|
BN_free(bn);
|
||||||
if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
|
if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
|
||||||
{
|
{
|
||||||
@@ -3008,65 +3044,128 @@ int make_revoked(X509_REVOKED *rev, char *str)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static X509_NAME *do_subject(char *subject)
|
/*
|
||||||
|
* 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;
|
X509_NAME *n = NULL;
|
||||||
|
int nid;
|
||||||
|
|
||||||
int i, nid, ne_num=0;
|
if (!buf || !ne_types || !ne_values)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err, "malloc error\n");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
char *ne_name = NULL;
|
if (*subject != '/')
|
||||||
char *ne_value = NULL;
|
{
|
||||||
|
BIO_printf(bio_err, "Subject does not start with '/'.\n");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
sp++; /* skip leading / */
|
||||||
|
|
||||||
char *tmp = NULL;
|
while (*sp)
|
||||||
char *p[2];
|
|
||||||
|
|
||||||
char *str_list[256];
|
|
||||||
|
|
||||||
p[0] = ",/";
|
|
||||||
p[1] = "=";
|
|
||||||
|
|
||||||
n = X509_NAME_new();
|
|
||||||
|
|
||||||
tmp = strtok(subject, p[0]);
|
|
||||||
while((tmp != NULL) && (ne_num < (sizeof str_list/sizeof *str_list)))
|
|
||||||
{
|
{
|
||||||
char *token = tmp;
|
/* collect type */
|
||||||
|
ne_types[ne_num] = bp;
|
||||||
while (token[0] == ' ')
|
while (*sp)
|
||||||
token++;
|
{
|
||||||
str_list[ne_num] = token;
|
if (*sp == '\\') /* is there anything to escape in the type...? */
|
||||||
|
{
|
||||||
tmp = strtok(NULL, p[0]);
|
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++;
|
ne_num++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(n = X509_NAME_new()))
|
||||||
|
goto error;
|
||||||
|
|
||||||
for (i = 0; i < ne_num; i++)
|
for (i = 0; i < ne_num; i++)
|
||||||
{
|
{
|
||||||
ne_name = strtok(str_list[i], p[1]);
|
if ((nid=OBJ_txt2nid(ne_types[i])) == NID_undef)
|
||||||
ne_value = strtok(NULL, p[1]);
|
|
||||||
|
|
||||||
if ((nid=OBJ_txt2nid(ne_name)) == NID_undef)
|
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "Subject Attribute %s has no known NID, skipped\n", ne_name);
|
BIO_printf(bio_err, "Subject Attribute %s has no known NID, skipped\n", ne_types[i]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ne_value == NULL)
|
if (!*ne_values[i])
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "No value provided for Subject Attribute %s, skipped\n", ne_name);
|
BIO_printf(bio_err, "No value provided for Subject Attribute %s, skipped\n", ne_types[i]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!X509_NAME_add_entry_by_NID(n, nid, MBSTRING_ASC, (unsigned char*)ne_value, -1,-1,0))
|
if (!X509_NAME_add_entry_by_NID(n, nid, chtype, (unsigned char*)ne_values[i], -1,-1,0))
|
||||||
{
|
goto error;
|
||||||
X509_NAME_free(n);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OPENSSL_free(ne_values);
|
||||||
|
OPENSSL_free(ne_types);
|
||||||
|
OPENSSL_free(buf);
|
||||||
return n;
|
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)
|
int old_entry_print(BIO *bp, ASN1_OBJECT *obj, ASN1_STRING *str)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ int MAIN(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
BIO_puts(STDout,SSL_CIPHER_description(
|
BIO_puts(STDout,SSL_CIPHER_description(
|
||||||
sk_SSL_CIPHER_value(sk,i),
|
sk_SSL_CIPHER_value(sk,i),
|
||||||
buf,512));
|
buf,sizeof buf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,6 +203,6 @@ end:
|
|||||||
if (ssl != NULL) SSL_free(ssl);
|
if (ssl != NULL) SSL_free(ssl);
|
||||||
if (STDout != NULL) BIO_free_all(STDout);
|
if (STDout != NULL) BIO_free_all(STDout);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
19
apps/crl.c
19
apps/crl.c
@@ -81,12 +81,14 @@ static char *crl_usage[]={
|
|||||||
" -in arg - input file - default stdin\n",
|
" -in arg - input file - default stdin\n",
|
||||||
" -out arg - output file - default stdout\n",
|
" -out arg - output file - default stdout\n",
|
||||||
" -hash - print hash value\n",
|
" -hash - print hash value\n",
|
||||||
|
" -fingerprint - print the crl fingerprint\n",
|
||||||
" -issuer - print issuer DN\n",
|
" -issuer - print issuer DN\n",
|
||||||
" -lastupdate - lastUpdate field\n",
|
" -lastupdate - lastUpdate field\n",
|
||||||
" -nextupdate - nextUpdate field\n",
|
" -nextupdate - nextUpdate field\n",
|
||||||
" -noout - no CRL output\n",
|
" -noout - no CRL output\n",
|
||||||
" -CAfile name - verify CRL using certificates in file \"name\"\n",
|
" -CAfile name - verify CRL using certificates in file \"name\"\n",
|
||||||
" -CApath dir - verify CRL using certificates in \"dir\"\n",
|
" -CApath dir - verify CRL using certificates in \"dir\"\n",
|
||||||
|
" -nameopt arg - various certificate name options\n",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -97,6 +99,7 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
unsigned long nmflag = 0;
|
||||||
X509_CRL *x=NULL;
|
X509_CRL *x=NULL;
|
||||||
char *CAfile = NULL, *CApath = NULL;
|
char *CAfile = NULL, *CApath = NULL;
|
||||||
int ret=1,i,num,badops=0;
|
int ret=1,i,num,badops=0;
|
||||||
@@ -105,7 +108,7 @@ int MAIN(int argc, char **argv)
|
|||||||
char *infile=NULL,*outfile=NULL;
|
char *infile=NULL,*outfile=NULL;
|
||||||
int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0;
|
int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0;
|
||||||
int fingerprint = 0;
|
int fingerprint = 0;
|
||||||
char **pp,buf[256];
|
char **pp;
|
||||||
X509_STORE *store = NULL;
|
X509_STORE *store = NULL;
|
||||||
X509_STORE_CTX ctx;
|
X509_STORE_CTX ctx;
|
||||||
X509_LOOKUP *lookup = NULL;
|
X509_LOOKUP *lookup = NULL;
|
||||||
@@ -120,6 +123,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
if (bio_out == NULL)
|
if (bio_out == NULL)
|
||||||
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
|
||||||
{
|
{
|
||||||
@@ -185,6 +191,11 @@ int MAIN(int argc, char **argv)
|
|||||||
text = 1;
|
text = 1;
|
||||||
else if (strcmp(*argv,"-hash") == 0)
|
else if (strcmp(*argv,"-hash") == 0)
|
||||||
hash= ++num;
|
hash= ++num;
|
||||||
|
else if (strcmp(*argv,"-nameopt") == 0)
|
||||||
|
{
|
||||||
|
if (--argc < 1) goto bad;
|
||||||
|
if (!set_name_ex(&nmflag, *(++argv))) goto bad;
|
||||||
|
}
|
||||||
else if (strcmp(*argv,"-issuer") == 0)
|
else if (strcmp(*argv,"-issuer") == 0)
|
||||||
issuer= ++num;
|
issuer= ++num;
|
||||||
else if (strcmp(*argv,"-lastupdate") == 0)
|
else if (strcmp(*argv,"-lastupdate") == 0)
|
||||||
@@ -268,9 +279,7 @@ bad:
|
|||||||
{
|
{
|
||||||
if (issuer == i)
|
if (issuer == i)
|
||||||
{
|
{
|
||||||
X509_NAME_oneline(X509_CRL_get_issuer(x),
|
print_name(bio_out, "issuer=", X509_CRL_get_issuer(x), nmflag);
|
||||||
buf,256);
|
|
||||||
BIO_printf(bio_out,"issuer= %s\n",buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hash == i)
|
if (hash == i)
|
||||||
@@ -369,7 +378,7 @@ end:
|
|||||||
X509_STORE_free(store);
|
X509_STORE_free(store);
|
||||||
}
|
}
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static X509_CRL *load_crl(char *infile, int format)
|
static X509_CRL *load_crl(char *infile, int format)
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ end:
|
|||||||
if (crl != NULL) X509_CRL_free(crl);
|
if (crl != NULL) X509_CRL_free(crl);
|
||||||
|
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
81
apps/dgst.c
81
apps/dgst.c
@@ -73,8 +73,9 @@
|
|||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG dgst_main
|
#define PROG dgst_main
|
||||||
|
|
||||||
void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||||
EVP_PKEY *key, unsigned char *sigin, int siglen);
|
EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
|
||||||
|
const char *file);
|
||||||
|
|
||||||
int MAIN(int, char **);
|
int MAIN(int, char **);
|
||||||
|
|
||||||
@@ -88,8 +89,8 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO *bmd=NULL;
|
BIO *bmd=NULL;
|
||||||
BIO *out = NULL;
|
BIO *out = NULL;
|
||||||
const char *name;
|
const char *name;
|
||||||
#define PROG_NAME_SIZE 16
|
#define PROG_NAME_SIZE 39
|
||||||
char pname[PROG_NAME_SIZE];
|
char pname[PROG_NAME_SIZE+1];
|
||||||
int separator=0;
|
int separator=0;
|
||||||
int debug=0;
|
int debug=0;
|
||||||
int keyform=FORMAT_PEM;
|
int keyform=FORMAT_PEM;
|
||||||
@@ -99,7 +100,9 @@ int MAIN(int argc, char **argv)
|
|||||||
EVP_PKEY *sigkey = NULL;
|
EVP_PKEY *sigkey = NULL;
|
||||||
unsigned char *sigbuf = NULL;
|
unsigned char *sigbuf = NULL;
|
||||||
int siglen = 0;
|
int siglen = 0;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -112,8 +115,11 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
/* first check the program name */
|
/* first check the program name */
|
||||||
program_name(argv[0],pname,PROG_NAME_SIZE);
|
program_name(argv[0],pname,sizeof pname);
|
||||||
|
|
||||||
md=EVP_get_digestbyname(pname);
|
md=EVP_get_digestbyname(pname);
|
||||||
|
|
||||||
@@ -162,11 +168,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) break;
|
if (--argc < 1) break;
|
||||||
keyform=str2fmt(*(++argv));
|
keyform=str2fmt(*(++argv));
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) break;
|
if (--argc < 1) break;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-hex") == 0)
|
else if (strcmp(*argv,"-hex") == 0)
|
||||||
out_bin = 0;
|
out_bin = 0;
|
||||||
else if (strcmp(*argv,"-binary") == 0)
|
else if (strcmp(*argv,"-binary") == 0)
|
||||||
@@ -204,7 +212,9 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf(bio_err,"-keyform arg key file format (PEM or ENGINE)\n");
|
BIO_printf(bio_err,"-keyform arg key file format (PEM or ENGINE)\n");
|
||||||
BIO_printf(bio_err,"-signature file signature to verify\n");
|
BIO_printf(bio_err,"-signature file signature to verify\n");
|
||||||
BIO_printf(bio_err,"-binary output in binary form\n");
|
BIO_printf(bio_err,"-binary output in binary form\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
|
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
|
||||||
LN_md5,LN_md5);
|
LN_md5,LN_md5);
|
||||||
@@ -224,7 +234,9 @@ int MAIN(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#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());
|
in=BIO_new(BIO_s_file());
|
||||||
bmd=BIO_new(BIO_f_md());
|
bmd=BIO_new(BIO_f_md());
|
||||||
@@ -273,10 +285,10 @@ int MAIN(int argc, char **argv)
|
|||||||
if(keyfile)
|
if(keyfile)
|
||||||
{
|
{
|
||||||
if (want_pub)
|
if (want_pub)
|
||||||
sigkey = load_pubkey(bio_err, keyfile, keyform, NULL,
|
sigkey = load_pubkey(bio_err, keyfile, keyform, 0, NULL,
|
||||||
e, "key file");
|
e, "key file");
|
||||||
else
|
else
|
||||||
sigkey = load_key(bio_err, keyfile, keyform, NULL,
|
sigkey = load_key(bio_err, keyfile, keyform, 0, NULL,
|
||||||
e, "key file");
|
e, "key file");
|
||||||
if (!sigkey)
|
if (!sigkey)
|
||||||
{
|
{
|
||||||
@@ -316,29 +328,43 @@ int MAIN(int argc, char **argv)
|
|||||||
if (argc == 0)
|
if (argc == 0)
|
||||||
{
|
{
|
||||||
BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
||||||
do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf, siglen);
|
err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
|
||||||
|
siglen,"","(stdin)");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
name=OBJ_nid2sn(md->type);
|
name=OBJ_nid2sn(md->type);
|
||||||
for (i=0; i<argc; i++)
|
for (i=0; i<argc; i++)
|
||||||
{
|
{
|
||||||
|
char *tmp,*tofree=NULL;
|
||||||
|
int r;
|
||||||
|
|
||||||
if (BIO_read_filename(in,argv[i]) <= 0)
|
if (BIO_read_filename(in,argv[i]) <= 0)
|
||||||
{
|
{
|
||||||
perror(argv[i]);
|
perror(argv[i]);
|
||||||
err++;
|
err++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!out_bin) BIO_printf(out, "%s(%s)= ",name,argv[i]);
|
if(!out_bin)
|
||||||
do_fp(out, buf,inp,separator, out_bin, sigkey,
|
{
|
||||||
sigbuf, siglen);
|
tmp=tofree=OPENSSL_malloc(strlen(name)+strlen(argv[i])+5);
|
||||||
|
sprintf(tmp,"%s(%s)= ",name,argv[i]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
tmp="";
|
||||||
|
r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
|
||||||
|
siglen,tmp,argv[i]);
|
||||||
|
if(r)
|
||||||
|
err=r;
|
||||||
|
if(tofree)
|
||||||
|
OPENSSL_free(tofree);
|
||||||
(void)BIO_reset(bmd);
|
(void)BIO_reset(bmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
if (buf != NULL)
|
if (buf != NULL)
|
||||||
{
|
{
|
||||||
memset(buf,0,BUFSIZE);
|
OPENSSL_cleanse(buf,BUFSIZE);
|
||||||
OPENSSL_free(buf);
|
OPENSSL_free(buf);
|
||||||
}
|
}
|
||||||
if (in != NULL) BIO_free(in);
|
if (in != NULL) BIO_free(in);
|
||||||
@@ -347,11 +373,12 @@ end:
|
|||||||
if(sigbuf) OPENSSL_free(sigbuf);
|
if(sigbuf) OPENSSL_free(sigbuf);
|
||||||
if (bmd != NULL) BIO_free(bmd);
|
if (bmd != NULL) BIO_free(bmd);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(err);
|
OPENSSL_EXIT(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||||
EVP_PKEY *key, unsigned char *sigin, int siglen)
|
EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
|
||||||
|
const char *file)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
int i;
|
int i;
|
||||||
@@ -359,21 +386,33 @@ void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
i=BIO_read(bp,(char *)buf,BUFSIZE);
|
i=BIO_read(bp,(char *)buf,BUFSIZE);
|
||||||
if (i <= 0) break;
|
if(i < 0)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err, "Read Error in %s\n",file);
|
||||||
|
ERR_print_errors(bio_err);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (i == 0) break;
|
||||||
}
|
}
|
||||||
if(sigin)
|
if(sigin)
|
||||||
{
|
{
|
||||||
EVP_MD_CTX *ctx;
|
EVP_MD_CTX *ctx;
|
||||||
BIO_get_md_ctx(bp, &ctx);
|
BIO_get_md_ctx(bp, &ctx);
|
||||||
i = EVP_VerifyFinal(ctx, sigin, (unsigned int)siglen, key);
|
i = EVP_VerifyFinal(ctx, sigin, (unsigned int)siglen, key);
|
||||||
if(i > 0) BIO_printf(out, "Verified OK\n");
|
if(i > 0)
|
||||||
else if(i == 0) BIO_printf(out, "Verification Failure\n");
|
BIO_printf(out, "Verified OK\n");
|
||||||
|
else if(i == 0)
|
||||||
|
{
|
||||||
|
BIO_printf(out, "Verification Failure\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "Error Verifying Data\n");
|
BIO_printf(bio_err, "Error Verifying Data\n");
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
if(key)
|
if(key)
|
||||||
{
|
{
|
||||||
@@ -383,7 +422,7 @@ void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
|||||||
{
|
{
|
||||||
BIO_printf(bio_err, "Error Signing Data\n");
|
BIO_printf(bio_err, "Error Signing Data\n");
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
return;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -392,6 +431,7 @@ void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
|||||||
if(binout) BIO_write(out, buf, len);
|
if(binout) BIO_write(out, buf, len);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
BIO_write(out,title,strlen(title));
|
||||||
for (i=0; i<len; i++)
|
for (i=0; i<len; i++)
|
||||||
{
|
{
|
||||||
if (sep && (i != 0))
|
if (sep && (i != 0))
|
||||||
@@ -400,5 +440,6 @@ void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
|||||||
}
|
}
|
||||||
BIO_printf(out, "\n");
|
BIO_printf(out, "\n");
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
20
apps/dh.c
20
apps/dh.c
@@ -87,12 +87,17 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
DH *dh=NULL;
|
DH *dh=NULL;
|
||||||
int i,badops=0,text=0;
|
int i,badops=0,text=0;
|
||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
||||||
char *infile,*outfile,*prog,*engine;
|
char *infile,*outfile,*prog;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
char *engine;
|
||||||
|
#endif
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -100,7 +105,12 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
engine=NULL;
|
engine=NULL;
|
||||||
|
#endif
|
||||||
infile=NULL;
|
infile=NULL;
|
||||||
outfile=NULL;
|
outfile=NULL;
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
@@ -131,11 +141,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
outfile= *(++argv);
|
outfile= *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-check") == 0)
|
else if (strcmp(*argv,"-check") == 0)
|
||||||
check=1;
|
check=1;
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
else if (strcmp(*argv,"-text") == 0)
|
||||||
@@ -167,13 +179,17 @@ bad:
|
|||||||
BIO_printf(bio_err," -text print a text form of the DH parameters\n");
|
BIO_printf(bio_err," -text print a text form of the DH parameters\n");
|
||||||
BIO_printf(bio_err," -C Output C code\n");
|
BIO_printf(bio_err," -C Output C code\n");
|
||||||
BIO_printf(bio_err," -noout no output\n");
|
BIO_printf(bio_err," -noout no output\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
|
#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());
|
in=BIO_new(BIO_s_file());
|
||||||
out=BIO_new(BIO_s_file());
|
out=BIO_new(BIO_s_file());
|
||||||
@@ -330,6 +346,6 @@ end:
|
|||||||
if (out != NULL) BIO_free_all(out);
|
if (out != NULL) BIO_free_all(out);
|
||||||
if (dh != NULL) DH_free(dh);
|
if (dh != NULL) DH_free(dh);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -148,7 +148,9 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
DH *dh=NULL;
|
DH *dh=NULL;
|
||||||
int i,badops=0,text=0;
|
int i,badops=0,text=0;
|
||||||
#ifndef OPENSSL_NO_DSA
|
#ifndef OPENSSL_NO_DSA
|
||||||
@@ -157,7 +159,10 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
||||||
char *infile,*outfile,*prog;
|
char *infile,*outfile,*prog;
|
||||||
char *inrand=NULL,*engine=NULL;
|
char *inrand=NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
int num = 0, g = 0;
|
int num = 0, g = 0;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
@@ -166,6 +171,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
infile=NULL;
|
infile=NULL;
|
||||||
outfile=NULL;
|
outfile=NULL;
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
@@ -196,11 +204,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
outfile= *(++argv);
|
outfile= *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-check") == 0)
|
else if (strcmp(*argv,"-check") == 0)
|
||||||
check=1;
|
check=1;
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
else if (strcmp(*argv,"-text") == 0)
|
||||||
@@ -246,7 +256,9 @@ bad:
|
|||||||
BIO_printf(bio_err," -2 generate parameters using 2 as the generator value\n");
|
BIO_printf(bio_err," -2 generate parameters using 2 as the generator value\n");
|
||||||
BIO_printf(bio_err," -5 generate parameters using 5 as the generator value\n");
|
BIO_printf(bio_err," -5 generate parameters using 5 as the generator value\n");
|
||||||
BIO_printf(bio_err," numbits number of bits in to generate (default 512)\n");
|
BIO_printf(bio_err," numbits number of bits in to generate (default 512)\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err," the random number generator\n");
|
BIO_printf(bio_err," the random number generator\n");
|
||||||
@@ -256,7 +268,9 @@ bad:
|
|||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (g && !num)
|
if (g && !num)
|
||||||
num = DEFBITS;
|
num = DEFBITS;
|
||||||
@@ -487,7 +501,7 @@ bad:
|
|||||||
printf("\tif ((dh->p == NULL) || (dh->g == NULL))\n");
|
printf("\tif ((dh->p == NULL) || (dh->g == NULL))\n");
|
||||||
printf("\t\t{ DH_free(dh); return(NULL); }\n");
|
printf("\t\t{ DH_free(dh); return(NULL); }\n");
|
||||||
if (dh->length)
|
if (dh->length)
|
||||||
printf("\tdh->length = %d;\n", dh->length);
|
printf("\tdh->length = %ld;\n", dh->length);
|
||||||
printf("\treturn(dh);\n\t}\n");
|
printf("\treturn(dh);\n\t}\n");
|
||||||
OPENSSL_free(data);
|
OPENSSL_free(data);
|
||||||
}
|
}
|
||||||
@@ -516,7 +530,7 @@ end:
|
|||||||
if (out != NULL) BIO_free_all(out);
|
if (out != NULL) BIO_free_all(out);
|
||||||
if (dh != NULL) DH_free(dh);
|
if (dh != NULL) DH_free(dh);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
|
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
|
||||||
|
|||||||
27
apps/dsa.c
27
apps/dsa.c
@@ -79,6 +79,9 @@
|
|||||||
* -des - encrypt output if PEM format with DES in cbc mode
|
* -des - encrypt output if PEM format with DES in cbc mode
|
||||||
* -des3 - encrypt output if PEM format
|
* -des3 - encrypt output if PEM format
|
||||||
* -idea - encrypt output if PEM format
|
* -idea - encrypt output if PEM format
|
||||||
|
* -aes128 - encrypt output if PEM format
|
||||||
|
* -aes192 - encrypt output if PEM format
|
||||||
|
* -aes256 - encrypt output if PEM format
|
||||||
* -text - print a text version
|
* -text - print a text version
|
||||||
* -modulus - print the DSA public key
|
* -modulus - print the DSA public key
|
||||||
*/
|
*/
|
||||||
@@ -87,7 +90,9 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
int ret=1;
|
int ret=1;
|
||||||
DSA *dsa=NULL;
|
DSA *dsa=NULL;
|
||||||
int i,badops=0;
|
int i,badops=0;
|
||||||
@@ -95,7 +100,10 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
int informat,outformat,text=0,noout=0;
|
int informat,outformat,text=0,noout=0;
|
||||||
int pubin = 0, pubout = 0;
|
int pubin = 0, pubout = 0;
|
||||||
char *infile,*outfile,*prog,*engine;
|
char *infile,*outfile,*prog;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
char *engine;
|
||||||
|
#endif
|
||||||
char *passargin = NULL, *passargout = NULL;
|
char *passargin = NULL, *passargout = NULL;
|
||||||
char *passin = NULL, *passout = NULL;
|
char *passin = NULL, *passout = NULL;
|
||||||
int modulus=0;
|
int modulus=0;
|
||||||
@@ -106,7 +114,12 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
engine=NULL;
|
engine=NULL;
|
||||||
|
#endif
|
||||||
infile=NULL;
|
infile=NULL;
|
||||||
outfile=NULL;
|
outfile=NULL;
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
@@ -147,11 +160,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
passargout= *(++argv);
|
passargout= *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-noout") == 0)
|
else if (strcmp(*argv,"-noout") == 0)
|
||||||
noout=1;
|
noout=1;
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
else if (strcmp(*argv,"-text") == 0)
|
||||||
@@ -183,11 +198,17 @@ bad:
|
|||||||
BIO_printf(bio_err," -passin arg input file pass phrase source\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," -out arg output file\n");
|
||||||
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err," -des encrypt PEM output with cbc des\n");
|
BIO_printf(bio_err," -des encrypt PEM output with cbc des\n");
|
||||||
BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
|
BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
|
||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
BIO_printf(bio_err," -idea encrypt PEM output with cbc idea\n");
|
BIO_printf(bio_err," -idea encrypt PEM output with cbc idea\n");
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
|
||||||
|
BIO_printf(bio_err," encrypt PEM output with cbc aes\n");
|
||||||
#endif
|
#endif
|
||||||
BIO_printf(bio_err," -text print the key in text\n");
|
BIO_printf(bio_err," -text print the key in text\n");
|
||||||
BIO_printf(bio_err," -noout don't print key out\n");
|
BIO_printf(bio_err," -noout don't print key out\n");
|
||||||
@@ -197,7 +218,9 @@ bad:
|
|||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||||
BIO_printf(bio_err, "Error getting passwords\n");
|
BIO_printf(bio_err, "Error getting passwords\n");
|
||||||
@@ -304,6 +327,6 @@ end:
|
|||||||
if(passin) OPENSSL_free(passin);
|
if(passin) OPENSSL_free(passin);
|
||||||
if(passout) OPENSSL_free(passout);
|
if(passout) OPENSSL_free(passout);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -90,7 +90,9 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
DSA *dsa=NULL;
|
DSA *dsa=NULL;
|
||||||
int i,badops=0,text=0;
|
int i,badops=0,text=0;
|
||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
@@ -98,7 +100,9 @@ int MAIN(int argc, char **argv)
|
|||||||
char *infile,*outfile,*prog,*inrand=NULL;
|
char *infile,*outfile,*prog,*inrand=NULL;
|
||||||
int numbits= -1,num,genkey=0;
|
int numbits= -1,num,genkey=0;
|
||||||
int need_rand=0;
|
int need_rand=0;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -106,6 +110,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
infile=NULL;
|
infile=NULL;
|
||||||
outfile=NULL;
|
outfile=NULL;
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
@@ -136,11 +143,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
outfile= *(++argv);
|
outfile= *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if(strcmp(*argv, "-engine") == 0)
|
else if(strcmp(*argv, "-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine = *(++argv);
|
engine = *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
else if (strcmp(*argv,"-text") == 0)
|
||||||
text=1;
|
text=1;
|
||||||
else if (strcmp(*argv,"-C") == 0)
|
else if (strcmp(*argv,"-C") == 0)
|
||||||
@@ -183,11 +192,14 @@ bad:
|
|||||||
BIO_printf(bio_err," -outform arg output 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," -in arg input file\n");
|
||||||
BIO_printf(bio_err," -out arg output file\n");
|
BIO_printf(bio_err," -out arg output file\n");
|
||||||
BIO_printf(bio_err," -text print the key in text\n");
|
BIO_printf(bio_err," -text print as text\n");
|
||||||
BIO_printf(bio_err," -C Output C code\n");
|
BIO_printf(bio_err," -C Output C code\n");
|
||||||
BIO_printf(bio_err," -noout no output\n");
|
BIO_printf(bio_err," -noout no output\n");
|
||||||
|
BIO_printf(bio_err," -genkey generate a DSA key\n");
|
||||||
BIO_printf(bio_err," -rand files to use for random number input\n");
|
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");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err," number number of bits to use for generating private key\n");
|
BIO_printf(bio_err," number number of bits to use for generating private key\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
@@ -231,7 +243,9 @@ bad:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (need_rand)
|
if (need_rand)
|
||||||
{
|
{
|
||||||
@@ -368,7 +382,7 @@ end:
|
|||||||
if (out != NULL) BIO_free_all(out);
|
if (out != NULL) BIO_free_all(out);
|
||||||
if (dsa != NULL) DSA_free(dsa);
|
if (dsa != NULL) DSA_free(dsa);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
|
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
|
||||||
|
|||||||
435
apps/ecdsa.c
435
apps/ecdsa.c
@@ -1,435 +0,0 @@
|
|||||||
/* apps/ecdsa.c */
|
|
||||||
/* ====================================================================
|
|
||||||
* 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 (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This package is an SSL implementation written
|
|
||||||
* by Eric Young (eay@cryptsoft.com).
|
|
||||||
* The implementation was written so as to conform with Netscapes SSL.
|
|
||||||
*
|
|
||||||
* This library is free for commercial and non-commercial use as long as
|
|
||||||
* the following conditions are aheared to. The following conditions
|
|
||||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
|
||||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
|
||||||
* included with this distribution is covered by the same copyright terms
|
|
||||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
|
||||||
* the code are not to be removed.
|
|
||||||
* If this package is used in a product, Eric Young should be given attribution
|
|
||||||
* as the author of the parts of the library used.
|
|
||||||
* This can be in the form of a textual message at program startup or
|
|
||||||
* in documentation (online or textual) provided with the package.
|
|
||||||
*
|
|
||||||
* 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 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 acknowledgement:
|
|
||||||
* "This product includes cryptographic software written by
|
|
||||||
* Eric Young (eay@cryptsoft.com)"
|
|
||||||
* The word 'cryptographic' can be left out if the rouines from the library
|
|
||||||
* being used are not cryptographic related :-).
|
|
||||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
|
||||||
* the apps directory (application code) you must include an acknowledgement:
|
|
||||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
|
|
||||||
*
|
|
||||||
* The licence and distribution terms for any publically available version or
|
|
||||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
|
||||||
* copied and put under another distribution licence
|
|
||||||
* [including the GNU Public Licence.]
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include "apps.h"
|
|
||||||
#include <openssl/bio.h>
|
|
||||||
#include <openssl/err.h>
|
|
||||||
#include <openssl/ecdsa.h>
|
|
||||||
#include <openssl/evp.h>
|
|
||||||
#include <openssl/x509.h>
|
|
||||||
#include <openssl/pem.h>
|
|
||||||
|
|
||||||
#undef PROG
|
|
||||||
#define PROG ecdsa_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
|
|
||||||
* -des3 - encrypt output if PEM format
|
|
||||||
* -idea - encrypt output if PEM format
|
|
||||||
* -text - print a text version
|
|
||||||
* -pub - print the ECDSA public key
|
|
||||||
* -compressed - print the public key in compressed form ( default )
|
|
||||||
* -hybrid - print the public key in hybrid form
|
|
||||||
* -uncompressed - print the public key in uncompressed form
|
|
||||||
* the last three options ( compressed, hybrid and uncompressed )
|
|
||||||
* are only used if the "-pub" option is also selected.
|
|
||||||
* For a precise description of the the meaning of compressed,
|
|
||||||
* hybrid and uncompressed please refer to the X9.62 standart.
|
|
||||||
* All three forms represents ways to express the ecdsa public
|
|
||||||
* key ( a point on a elliptic curve ) as octet string. Let len be
|
|
||||||
* the length ( in bytes ) of an element of the field over which
|
|
||||||
* the curve is defined, then a compressed octet string has the form
|
|
||||||
* 0x02 + result of BN_bn2bin() of the x coordinate of the public key
|
|
||||||
*/
|
|
||||||
|
|
||||||
int MAIN(int, char **);
|
|
||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
|
||||||
{
|
|
||||||
ENGINE *e = NULL;
|
|
||||||
int ret = 1;
|
|
||||||
ECDSA *ecdsa = 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;
|
|
||||||
char *infile, *outfile, *prog, *engine;
|
|
||||||
char *passargin = NULL, *passargout = NULL;
|
|
||||||
char *passin = NULL, *passout = NULL;
|
|
||||||
int pub = 0, point_form = 0;
|
|
||||||
unsigned char *buffer = NULL;
|
|
||||||
unsigned int buf_len = 0;
|
|
||||||
BIGNUM *tmp_bn = 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);
|
|
||||||
|
|
||||||
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, "-pub") == 0)
|
|
||||||
{
|
|
||||||
pub = 1;
|
|
||||||
buffer = (*(argv+1));
|
|
||||||
if (strcmp(buffer, "compressed") == 0)
|
|
||||||
point_form = POINT_CONVERSION_COMPRESSED;
|
|
||||||
else if (strcmp(buffer, "hybrid") == 0)
|
|
||||||
point_form = POINT_CONVERSION_HYBRID;
|
|
||||||
else if (strcmp(buffer, "uncompressed") == 0)
|
|
||||||
point_form = POINT_CONVERSION_UNCOMPRESSED;
|
|
||||||
if (point_form)
|
|
||||||
{
|
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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 with cbc des\n");
|
|
||||||
BIO_printf(bio_err, " -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
|
|
||||||
#ifndef OPENSSL_NO_IDEA
|
|
||||||
BIO_printf(bio_err, " -idea encrypt PEM output with cbc idea\n");
|
|
||||||
#endif
|
|
||||||
BIO_printf(bio_err, " -text print the key in text\n");
|
|
||||||
BIO_printf(bio_err, " -noout don't print key out\n");
|
|
||||||
BIO_printf(bio_err, " -pub [compressed | hybrid | uncompressed] \n");
|
|
||||||
BIO_printf(bio_err, " compressed print the public key in compressed form ( default )\n");
|
|
||||||
BIO_printf(bio_err, " hybrid print the public key in hybrid form\n");
|
|
||||||
BIO_printf(bio_err, " uncompressed print the public key in uncompressed form\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
|
||||||
|
|
||||||
e = setup_engine(bio_err, engine, 0);
|
|
||||||
|
|
||||||
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 ECDSA key\n");
|
|
||||||
if (informat == FORMAT_ASN1)
|
|
||||||
{
|
|
||||||
if (pubin)
|
|
||||||
ecdsa = d2i_ECDSA_PUBKEY_bio(in, NULL);
|
|
||||||
else
|
|
||||||
ecdsa = d2i_ECDSAPrivateKey_bio(in, NULL);
|
|
||||||
} else if (informat == FORMAT_PEM)
|
|
||||||
{
|
|
||||||
if (pubin)
|
|
||||||
ecdsa = PEM_read_bio_ECDSA_PUBKEY(in, NULL, NULL, NULL);
|
|
||||||
else
|
|
||||||
ecdsa = PEM_read_bio_ECDSAPrivateKey(in, NULL, NULL, passin);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err, "bad input format specified for key\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if (ecdsa == 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 (text)
|
|
||||||
if (!ECDSA_print(out, ecdsa, 0))
|
|
||||||
{
|
|
||||||
perror(outfile);
|
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pub)
|
|
||||||
{
|
|
||||||
fprintf(stdout, "Public Key (");
|
|
||||||
if (point_form == POINT_CONVERSION_COMPRESSED)
|
|
||||||
fprintf(stdout, "COMPRESSED");
|
|
||||||
else if (point_form == POINT_CONVERSION_UNCOMPRESSED)
|
|
||||||
fprintf(stdout, "UNCOMPRESSED");
|
|
||||||
else if (point_form == POINT_CONVERSION_HYBRID)
|
|
||||||
fprintf(stdout, "HYBRID");
|
|
||||||
fprintf(stdout, ")=");
|
|
||||||
buf_len = EC_POINT_point2oct(ecdsa->group, EC_GROUP_get0_generator(ecdsa->group),
|
|
||||||
point_form, NULL, 0, NULL);
|
|
||||||
if (!buf_len)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid public key length\n");
|
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if ((tmp_bn = BN_new()) == NULL ||
|
|
||||||
(buffer = OPENSSL_malloc(buf_len)) == NULL) goto end;
|
|
||||||
if (!EC_POINT_point2oct(ecdsa->group, EC_GROUP_get0_generator(ecdsa->group),
|
|
||||||
point_form, buffer, buf_len, NULL) ||
|
|
||||||
!BN_bin2bn(buffer, buf_len, tmp_bn))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can not encode public key\n");
|
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
OPENSSL_free(buffer);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BN_print(out, tmp_bn);
|
|
||||||
fprintf(stdout,"\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (noout)
|
|
||||||
goto end;
|
|
||||||
BIO_printf(bio_err, "writing ECDSA key\n");
|
|
||||||
if (outformat == FORMAT_ASN1)
|
|
||||||
{
|
|
||||||
if(pubin || pubout)
|
|
||||||
i = i2d_ECDSA_PUBKEY_bio(out, ecdsa);
|
|
||||||
else
|
|
||||||
i = i2d_ECDSAPrivateKey_bio(out, ecdsa);
|
|
||||||
} else if (outformat == FORMAT_PEM)
|
|
||||||
{
|
|
||||||
if(pubin || pubout)
|
|
||||||
i = PEM_write_bio_ECDSA_PUBKEY(out, ecdsa);
|
|
||||||
else
|
|
||||||
i = PEM_write_bio_ECDSAPrivateKey(out, ecdsa, 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 (ecdsa) ECDSA_free(ecdsa);
|
|
||||||
if (tmp_bn) BN_free(tmp_bn);
|
|
||||||
if (passin) OPENSSL_free(passin);
|
|
||||||
if (passout) OPENSSL_free(passout);
|
|
||||||
apps_shutdown();
|
|
||||||
EXIT(ret);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1,562 +0,0 @@
|
|||||||
/* apps/ecdsaparam.c */
|
|
||||||
/* ====================================================================
|
|
||||||
* 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 (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This package is an SSL implementation written
|
|
||||||
* by Eric Young (eay@cryptsoft.com).
|
|
||||||
* The implementation was written so as to conform with Netscapes SSL.
|
|
||||||
*
|
|
||||||
* This library is free for commercial and non-commercial use as long as
|
|
||||||
* the following conditions are aheared to. The following conditions
|
|
||||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
|
||||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
|
||||||
* included with this distribution is covered by the same copyright terms
|
|
||||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
|
||||||
* the code are not to be removed.
|
|
||||||
* If this package is used in a product, Eric Young should be given attribution
|
|
||||||
* as the author of the parts of the library used.
|
|
||||||
* This can be in the form of a textual message at program startup or
|
|
||||||
* in documentation (online or textual) provided with the package.
|
|
||||||
*
|
|
||||||
* 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 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 acknowledgement:
|
|
||||||
* "This product includes cryptographic software written by
|
|
||||||
* Eric Young (eay@cryptsoft.com)"
|
|
||||||
* The word 'cryptographic' can be left out if the rouines from the library
|
|
||||||
* being used are not cryptographic related :-).
|
|
||||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
|
||||||
* the apps directory (application code) you must include an acknowledgement:
|
|
||||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
|
|
||||||
*
|
|
||||||
* The licence and distribution terms for any publically available version or
|
|
||||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
|
||||||
* copied and put under another distribution licence
|
|
||||||
* [including the GNU Public Licence.]
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
#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/ecdsa.h>
|
|
||||||
#include <openssl/x509.h>
|
|
||||||
#include <openssl/pem.h>
|
|
||||||
|
|
||||||
#undef PROG
|
|
||||||
#define PROG ecdsaparam_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
|
|
||||||
* -text
|
|
||||||
* -C
|
|
||||||
* -noout
|
|
||||||
* -genkey - generate a private public keypair based on the supplied curve
|
|
||||||
* -named_curve - use the curve oid instead of the parameters
|
|
||||||
* -NIST_192 - use the NIST recommeded curve parameters over a 192 bit prime field
|
|
||||||
* -NIST_224 - use the NIST recommeded curve parameters over a 224 bit prime field
|
|
||||||
* -NIST_256 - use the NIST recommeded curve parameters over a 256 bit prime field
|
|
||||||
* -NIST_384 - use the NIST recommeded curve parameters over a 384 bit prime field
|
|
||||||
* -NIST_521 - use the NIST recommeded curve parameters over a 521 bit prime field
|
|
||||||
* -X9_62_192v1 - use the X9_62 192v1 example curve over a 192 bit prime field
|
|
||||||
* -X9_62_192v2 - use the X9_62 192v2 example curve over a 192 bit prime field
|
|
||||||
* -X9_62_192v3 - use the X9_62 192v3 example curve over a 192 bit prime field
|
|
||||||
* -X9_62_239v1 - use the X9_62 239v1 example curve over a 239 bit prime field
|
|
||||||
* -X9_62_239v2 - use the X9_62 239v2 example curve over a 239 bit prime field
|
|
||||||
* -X9_62_239v3 - use the X9_62 239v3 example curve over a 239 bit prime field
|
|
||||||
* -X9_62_256v1 - use the X9_62 239v1 example curve over a 256 bit prime field
|
|
||||||
*/
|
|
||||||
|
|
||||||
int MAIN(int, char **);
|
|
||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
|
||||||
{
|
|
||||||
ENGINE *e = NULL;
|
|
||||||
ECDSA *ecdsa = NULL;
|
|
||||||
int i, badops = 0, text = 0;
|
|
||||||
BIO *in = NULL, *out = NULL;
|
|
||||||
int informat, outformat, noout = 0, C = 0, ret = 1;
|
|
||||||
char *infile, *outfile, *prog, *inrand = NULL;
|
|
||||||
int genkey = 0;
|
|
||||||
int need_rand = 0;
|
|
||||||
char *engine=NULL;
|
|
||||||
int curve_type = EC_GROUP_NO_CURVE;
|
|
||||||
int named_curve = 0;
|
|
||||||
BIGNUM *tmp_1 = NULL, *tmp_2 = NULL, *tmp_3 = NULL, *tmp_4 = NULL, *tmp_5 = NULL,
|
|
||||||
*tmp_6 = NULL, *tmp_7 = NULL;
|
|
||||||
BN_CTX *ctx = NULL;
|
|
||||||
EC_POINT *point = NULL;
|
|
||||||
unsigned char *data = 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);
|
|
||||||
|
|
||||||
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, "-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine = *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
|
||||||
text = 1;
|
|
||||||
else if (strcmp(*argv,"-C") == 0)
|
|
||||||
C = 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, "-named_curve") == 0)
|
|
||||||
named_curve = 1;
|
|
||||||
else if (strcmp(*argv, "-NIST_192") == 0)
|
|
||||||
curve_type = EC_GROUP_NIST_PRIME_192;
|
|
||||||
else if (strcmp(*argv, "-NIST_224") == 0)
|
|
||||||
curve_type = EC_GROUP_NIST_PRIME_224;
|
|
||||||
else if (strcmp(*argv, "-NIST_256") == 0)
|
|
||||||
curve_type = EC_GROUP_NIST_PRIME_256;
|
|
||||||
else if (strcmp(*argv, "-NIST_384") == 0)
|
|
||||||
curve_type = EC_GROUP_NIST_PRIME_384;
|
|
||||||
else if (strcmp(*argv, "-NIST_521") == 0)
|
|
||||||
curve_type = EC_GROUP_NIST_PRIME_521;
|
|
||||||
else if (strcmp(*argv, "-X9_62_192v1") == 0)
|
|
||||||
curve_type = EC_GROUP_X9_62_PRIME_192V1;
|
|
||||||
else if (strcmp(*argv, "-X9_62_192v2") == 0)
|
|
||||||
curve_type = EC_GROUP_X9_62_PRIME_192V2;
|
|
||||||
else if (strcmp(*argv, "-X9_62_192v3") == 0)
|
|
||||||
curve_type = EC_GROUP_X9_62_PRIME_192V3;
|
|
||||||
else if (strcmp(*argv, "-X9_62_239v1") == 0)
|
|
||||||
curve_type = EC_GROUP_X9_62_PRIME_239V1;
|
|
||||||
else if (strcmp(*argv, "-X9_62_239v2") == 0)
|
|
||||||
curve_type = EC_GROUP_X9_62_PRIME_239V2;
|
|
||||||
else if (strcmp(*argv, "-X9_62_239v3") == 0)
|
|
||||||
curve_type = EC_GROUP_X9_62_PRIME_239V3;
|
|
||||||
else if (strcmp(*argv, "-X9_62_256v1") == 0)
|
|
||||||
curve_type = EC_GROUP_X9_62_PRIME_256V1;
|
|
||||||
else if (strcmp(*argv, "-noout") == 0)
|
|
||||||
noout=1;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
|
||||||
badops=1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (badops)
|
|
||||||
{
|
|
||||||
bad:
|
|
||||||
BIO_printf(bio_err,"%s [options] [bits] <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," -out arg output file\n");
|
|
||||||
BIO_printf(bio_err," -text print the key in text\n");
|
|
||||||
BIO_printf(bio_err," -C Output C code\n");
|
|
||||||
BIO_printf(bio_err," -noout no output\n");
|
|
||||||
BIO_printf(bio_err," -rand files to use for random number input\n");
|
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err," -named_curve use the curve oid instead of the parameters\n");
|
|
||||||
BIO_printf(bio_err," -NIST_192 use the NIST recommeded curve parameters over a 192 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -NIST_224 use the NIST recommeded curve parameters over a 224 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -NIST_256 use the NIST recommeded curve parameters over a 256 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -NIST_384 use the NIST recommeded curve parameters over a 384 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -NIST_521 use the NIST recommeded curve parameters over a 521 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -X9_62_192v1 use the X9_62 192v1 example curve over a 192 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -X9_62_192v2 use the X9_62 192v2 example curve over a 192 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -X9_62_192v3 use the X9_62 192v3 example curve over a 192 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -X9_62_239v1 use the X9_62 239v1 example curve over a 239 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -X9_62_239v2 use the X9_62 239v2 example curve over a 239 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -X9_62_239v3 use the X9_62 239v3 example curve over a 239 bit prime field\n");
|
|
||||||
BIO_printf(bio_err," -X9_62_256v1 use the X9_62 239v1 example curve over a 256 bit prime field\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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
e = setup_engine(bio_err, engine, 0);
|
|
||||||
|
|
||||||
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 (curve_type != EC_GROUP_NO_CURVE)
|
|
||||||
{
|
|
||||||
if ((ecdsa = ECDSA_new()) == NULL)
|
|
||||||
goto end;
|
|
||||||
ecdsa->group = EC_GROUP_new_by_name(curve_type);
|
|
||||||
if (named_curve)
|
|
||||||
ECDSA_set_parameter_flags(ecdsa, ECDSA_FLAG_NAMED_CURVE);
|
|
||||||
}
|
|
||||||
else if (informat == FORMAT_ASN1)
|
|
||||||
ecdsa = d2i_ECDSAParameters_bio(in,NULL);
|
|
||||||
else if (informat == FORMAT_PEM)
|
|
||||||
ecdsa = PEM_read_bio_ECDSAParameters(in, NULL, NULL, NULL);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err, "bad input format specified\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if (ecdsa == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err, "unable to load ECDSA parameters\n");
|
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (text)
|
|
||||||
{
|
|
||||||
ECDSAParameters_print(out, ecdsa);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (C)
|
|
||||||
{ // TODO : characteristic two
|
|
||||||
int l, len, bits_p;
|
|
||||||
if ((tmp_1 = BN_new()) == NULL || (tmp_2 = BN_new()) == NULL ||
|
|
||||||
(tmp_3 = BN_new()) == NULL || (tmp_4 = BN_new()) == NULL ||
|
|
||||||
(tmp_5 = BN_new()) == NULL || (tmp_6 = BN_new()) == NULL ||
|
|
||||||
(tmp_7 = BN_new()) == NULL || (ctx = BN_CTX_new()) == NULL)
|
|
||||||
{
|
|
||||||
perror("OPENSSL_malloc");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if (!EC_GROUP_get_curve_GFp(ecdsa->group, tmp_1, tmp_2, tmp_3, ctx))
|
|
||||||
goto end;
|
|
||||||
if ((point = EC_GROUP_get0_generator(ecdsa->group)) == NULL)
|
|
||||||
goto end;
|
|
||||||
if (!EC_POINT_get_affine_coordinates_GFp(ecdsa->group, point, tmp_4, tmp_5, ctx))
|
|
||||||
goto end;
|
|
||||||
if (!EC_GROUP_get_order(ecdsa->group, tmp_6, ctx))
|
|
||||||
goto end;
|
|
||||||
if (!EC_GROUP_get_cofactor(ecdsa->group, tmp_7, ctx))
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
len = BN_num_bytes(tmp_1);
|
|
||||||
bits_p = BN_num_bits(tmp_1);
|
|
||||||
data=(unsigned char *)OPENSSL_malloc(len+20);
|
|
||||||
if (data == NULL)
|
|
||||||
{
|
|
||||||
perror("OPENSSL_malloc");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
l = BN_bn2bin(tmp_1, data);
|
|
||||||
printf("static unsigned char ecdsa%d_p[]={", bits_p);
|
|
||||||
for (i=0; i<l; i++)
|
|
||||||
{
|
|
||||||
if ((i%12) == 0) printf("\n\t");
|
|
||||||
printf("0x%02X,",data[i]);
|
|
||||||
}
|
|
||||||
printf("\n\t};\n");
|
|
||||||
|
|
||||||
l = BN_bn2bin(tmp_2, data);
|
|
||||||
printf("static unsigned char ecdsa%d_a[]={",bits_p);
|
|
||||||
for (i=0; i<l; i++)
|
|
||||||
{
|
|
||||||
if ((i%12) == 0) printf("\n\t");
|
|
||||||
printf("0x%02X,",data[i]);
|
|
||||||
}
|
|
||||||
printf("\n\t};\n");
|
|
||||||
|
|
||||||
l = BN_bn2bin(tmp_3, data);
|
|
||||||
printf("static unsigned char ecdsa%d_b[]={", bits_p);
|
|
||||||
for (i=0; i<l; i++)
|
|
||||||
{
|
|
||||||
if ((i%12) == 0) printf("\n\t");
|
|
||||||
printf("0x%02X,",data[i]);
|
|
||||||
}
|
|
||||||
printf("\n\t};\n\n");
|
|
||||||
|
|
||||||
l = BN_bn2bin(tmp_3, data);
|
|
||||||
printf("static unsigned char ecdsa%d_x[]={", bits_p);
|
|
||||||
for (i=0; i<l; i++)
|
|
||||||
{
|
|
||||||
if ((i%12) == 0) printf("\n\t");
|
|
||||||
printf("0x%02X,",data[i]);
|
|
||||||
}
|
|
||||||
printf("\n\t};\n\n");
|
|
||||||
|
|
||||||
l = BN_bn2bin(tmp_3, data);
|
|
||||||
printf("static unsigned char ecdsa%d_y[]={", bits_p);
|
|
||||||
for (i=0; i<l; i++)
|
|
||||||
{
|
|
||||||
if ((i%12) == 0) printf("\n\t");
|
|
||||||
printf("0x%02X,",data[i]);
|
|
||||||
}
|
|
||||||
printf("\n\t};\n\n");
|
|
||||||
|
|
||||||
l = BN_bn2bin(tmp_3, data);
|
|
||||||
printf("static unsigned char ecdsa%d_o[]={", bits_p);
|
|
||||||
for (i=0; i<l; i++)
|
|
||||||
{
|
|
||||||
if ((i%12) == 0) printf("\n\t");
|
|
||||||
printf("0x%02X,",data[i]);
|
|
||||||
}
|
|
||||||
printf("\n\t};\n\n");
|
|
||||||
|
|
||||||
l = BN_bn2bin(tmp_3, data);
|
|
||||||
printf("static unsigned char ecdsa%d_c[]={", bits_p);
|
|
||||||
for (i=0; i<l; i++)
|
|
||||||
{
|
|
||||||
if ((i%12) == 0) printf("\n\t");
|
|
||||||
printf("0x%02X,",data[i]);
|
|
||||||
}
|
|
||||||
printf("\n\t};\n\n");
|
|
||||||
|
|
||||||
/* FIXME:
|
|
||||||
* the generated code does not make much sense
|
|
||||||
*
|
|
||||||
* TODO:
|
|
||||||
* use EC_GROUP_new_curve_GFp instead of using EC_GFp_mont_method directly
|
|
||||||
*/
|
|
||||||
|
|
||||||
printf("ECDSA *get_ecdsa%d()\n\t{\n",bits_p);
|
|
||||||
printf("\tint ok=1;\n");
|
|
||||||
printf("\tECDSA *ecdsa=NULL;\n");
|
|
||||||
printf("\tEC_POINT *point=NULL;\n");
|
|
||||||
printf("\tBIGNUM *tmp_1=NULL,*tmp_2=NULL,*tmp_3=NULL;\n");
|
|
||||||
printf("\tBN_CTX *ctx=NULL;\n\n");
|
|
||||||
printf("\tecdsa=ECDSA_new();\n");
|
|
||||||
printf("\ttmp_1=BN_new();\n");
|
|
||||||
printf("\ttmp_2=BN_new();\n");
|
|
||||||
printf("\ttmp_3=BN_new();\n");
|
|
||||||
printf("\tctx=BN_CTX_new();\n");
|
|
||||||
printf("\tif (!ecdsa || !tmp_1 || !tmp_2 || !tmp_3 || !ctx) ok=0;\n");
|
|
||||||
printf("\tif (ok && !ecdsa->group=EC_GROUP_new(EC_GFp_mont_method())) == NULL) ok=0;");
|
|
||||||
printf("\tif (ok && !BN_bin2bn(ecdsa%d_p,sizeof(ecdsa%d_p),tmp_1)) ok=0;\n", bits_p, bits_p);
|
|
||||||
printf("\tif (ok && !BN_bin2bn(ecdsa%d_a,sizeof(ecdsa%d_a),tmp_2)) ok=0;\n", bits_p, bits_p);
|
|
||||||
printf("\tif (ok && !BN_bin2bn(ecdsa%d_b,sizeof(ecdsa%d_b),tmp_3)) ok=0;\n", bits_p, bits_p);
|
|
||||||
printf("\tif (ok && !EC_GROUP_set_curve_GFp(ecdsa->group,tmp_1,tmp_2,tmp_3,ctx)) ok=0;\n");
|
|
||||||
printf("\tif (ok && !BN_bin2bn(ecdsa%d_x,sizeof(ecdsa%d_p),tmp_1)) ok=0;\n", bits_p, bits_p);
|
|
||||||
printf("\tif (ok && !BN_bin2bn(ecdsa%d_y,sizeof(ecdsa%d_a),tmp_2)) ok=0;\n", bits_p, bits_p);
|
|
||||||
printf("\tif (ok && (point = EC_POINT_new(ecdsa->group)) == NULL) ok=0;\n");
|
|
||||||
printf("\tif (ok && !EC_POINT_set_affine_coordinates_GFp(ecdsa->group,point,tmp_1,tmp_2,ctx)) ok=0:\n");
|
|
||||||
printf("\tif (ok && !BN_bin2bn(ecdsa%d_o,sizeof(ecdsa%d_b),tmp_1)) ok=0;\n", bits_p, bits_p);
|
|
||||||
printf("\tif (ok && !BN_bin2bn(ecdsa%d_c,sizeof(ecdsa%d_b),tmp_2)) ok=0;\n", bits_p, bits_p);
|
|
||||||
printf("\tif (ok && !EC_GROUP_set_generator(ecdsa->group,point,tmp_1,tmp_2)) ok=0;\n");
|
|
||||||
printf("\tif ((ecdsa->group == NULL) || (ecdsa->pub_key == NULL) || (ecdsa->priv_key == NULL))\n");
|
|
||||||
printf("\t\t{ ECDSA_free(ecdsa); return(NULL); }\n");
|
|
||||||
printf("\treturn(ecdsa);\n\t}\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (!noout)
|
|
||||||
{
|
|
||||||
if (outformat == FORMAT_ASN1)
|
|
||||||
i = i2d_ECDSAParameters_bio(out, ecdsa);
|
|
||||||
else if (outformat == FORMAT_PEM)
|
|
||||||
i = PEM_write_bio_ECDSAParameters(out, ecdsa);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"bad output format specified for outfile\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if (!i)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err, "unable to write ECDSA parameters\n");
|
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (genkey)
|
|
||||||
{
|
|
||||||
ECDSA *ecdsakey;
|
|
||||||
|
|
||||||
assert(need_rand);
|
|
||||||
if ((ecdsakey = ECDSAParameters_dup(ecdsa)) == NULL) goto end;
|
|
||||||
if (!ECDSA_generate_key(ecdsakey)) goto end;
|
|
||||||
if (outformat == FORMAT_ASN1)
|
|
||||||
i = i2d_ECDSAPrivateKey_bio(out, ecdsakey);
|
|
||||||
else if (outformat == FORMAT_PEM)
|
|
||||||
i = PEM_write_bio_ECDSAPrivateKey(out, ecdsakey, NULL, NULL, 0, NULL, NULL);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err, "bad output format specified for outfile\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
ECDSA_free(ecdsakey);
|
|
||||||
}
|
|
||||||
if (need_rand)
|
|
||||||
app_RAND_write_file(NULL, bio_err);
|
|
||||||
ret=0;
|
|
||||||
end:
|
|
||||||
if (in != NULL) BIO_free(in);
|
|
||||||
if (out != NULL) BIO_free_all(out);
|
|
||||||
if (ecdsa != NULL) ECDSA_free(ecdsa);
|
|
||||||
if (tmp_1) BN_free(tmp_1);
|
|
||||||
if (tmp_2) BN_free(tmp_2);
|
|
||||||
if (tmp_3) BN_free(tmp_3);
|
|
||||||
if (tmp_3) BN_free(tmp_4);
|
|
||||||
if (tmp_3) BN_free(tmp_5);
|
|
||||||
if (tmp_3) BN_free(tmp_6);
|
|
||||||
if (tmp_3) BN_free(tmp_7);
|
|
||||||
if (ctx) BN_CTX_free(ctx);
|
|
||||||
if (data) OPENSSL_free(data);
|
|
||||||
apps_shutdown();
|
|
||||||
EXIT(ret);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
41
apps/enc.c
41
apps/enc.c
@@ -78,7 +78,7 @@ int set_hex(char *in,unsigned char *out,int size);
|
|||||||
#define BSIZE (8*1024)
|
#define BSIZE (8*1024)
|
||||||
#define PROG enc_main
|
#define PROG enc_main
|
||||||
|
|
||||||
void show_ciphers(const OBJ_NAME *name,void *bio_)
|
static void show_ciphers(const OBJ_NAME *name,void *bio_)
|
||||||
{
|
{
|
||||||
BIO *bio=bio_;
|
BIO *bio=bio_;
|
||||||
static int n;
|
static int n;
|
||||||
@@ -100,9 +100,11 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
static const char magic[]="Salted__";
|
static const char magic[]="Salted__";
|
||||||
char mbuf[8]; /* should be 1 smaller than magic */
|
char mbuf[sizeof magic-1];
|
||||||
char *strbuf=NULL;
|
char *strbuf=NULL;
|
||||||
unsigned char *buff=NULL,*bufsize=NULL;
|
unsigned char *buff=NULL,*bufsize=NULL;
|
||||||
int bsize=BSIZE,verbose=0;
|
int bsize=BSIZE,verbose=0;
|
||||||
@@ -117,9 +119,11 @@ int MAIN(int argc, char **argv)
|
|||||||
const EVP_CIPHER *cipher=NULL,*c;
|
const EVP_CIPHER *cipher=NULL,*c;
|
||||||
char *inf=NULL,*outf=NULL;
|
char *inf=NULL,*outf=NULL;
|
||||||
BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
|
BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
|
||||||
#define PROG_NAME_SIZE 16
|
#define PROG_NAME_SIZE 39
|
||||||
char pname[PROG_NAME_SIZE];
|
char pname[PROG_NAME_SIZE+1];
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine = NULL;
|
char *engine = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -127,8 +131,11 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
/* first check the program name */
|
/* first check the program name */
|
||||||
program_name(argv[0],pname,PROG_NAME_SIZE);
|
program_name(argv[0],pname,sizeof pname);
|
||||||
if (strcmp(pname,"base64") == 0)
|
if (strcmp(pname,"base64") == 0)
|
||||||
base64=1;
|
base64=1;
|
||||||
|
|
||||||
@@ -160,11 +167,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
passarg= *(++argv);
|
passarg= *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-d") == 0)
|
else if (strcmp(*argv,"-d") == 0)
|
||||||
enc=0;
|
enc=0;
|
||||||
else if (strcmp(*argv,"-p") == 0)
|
else if (strcmp(*argv,"-p") == 0)
|
||||||
@@ -213,7 +222,7 @@ int MAIN(int argc, char **argv)
|
|||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
buf[0]='\0';
|
buf[0]='\0';
|
||||||
fgets(buf,128,infile);
|
fgets(buf,sizeof buf,infile);
|
||||||
fclose(infile);
|
fclose(infile);
|
||||||
i=strlen(buf);
|
i=strlen(buf);
|
||||||
if ((i > 0) &&
|
if ((i > 0) &&
|
||||||
@@ -267,7 +276,9 @@ bad:
|
|||||||
BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv");
|
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 print the iv/key (then exit if -P)\n","-[pP]");
|
||||||
BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>");
|
BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err,"%-14s use engine e, possibly a hardware device.\n","-engine e");
|
BIO_printf(bio_err,"%-14s use engine e, possibly a hardware device.\n","-engine e");
|
||||||
|
#endif
|
||||||
|
|
||||||
BIO_printf(bio_err,"Cipher Types\n");
|
BIO_printf(bio_err,"Cipher Types\n");
|
||||||
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
|
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
|
||||||
@@ -281,7 +292,9 @@ bad:
|
|||||||
argv++;
|
argv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (bufsize != NULL)
|
if (bufsize != NULL)
|
||||||
{
|
{
|
||||||
@@ -439,12 +452,12 @@ bad:
|
|||||||
else {
|
else {
|
||||||
if(enc) {
|
if(enc) {
|
||||||
if(hsalt) {
|
if(hsalt) {
|
||||||
if(!set_hex(hsalt,salt,PKCS5_SALT_LEN)) {
|
if(!set_hex(hsalt,salt,sizeof salt)) {
|
||||||
BIO_printf(bio_err,
|
BIO_printf(bio_err,
|
||||||
"invalid hex salt value\n");
|
"invalid hex salt value\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
} else if (RAND_pseudo_bytes(salt, PKCS5_SALT_LEN) < 0)
|
} else if (RAND_pseudo_bytes(salt, sizeof salt) < 0)
|
||||||
goto end;
|
goto end;
|
||||||
/* If -P option then don't bother writing */
|
/* If -P option then don't bother writing */
|
||||||
if((printkey != 2)
|
if((printkey != 2)
|
||||||
@@ -452,14 +465,14 @@ bad:
|
|||||||
sizeof magic-1) != sizeof magic-1
|
sizeof magic-1) != sizeof magic-1
|
||||||
|| BIO_write(wbio,
|
|| BIO_write(wbio,
|
||||||
(char *)salt,
|
(char *)salt,
|
||||||
PKCS5_SALT_LEN) != PKCS5_SALT_LEN)) {
|
sizeof salt) != sizeof salt)) {
|
||||||
BIO_printf(bio_err,"error writing output file\n");
|
BIO_printf(bio_err,"error writing output file\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
} else if(BIO_read(rbio,mbuf,sizeof mbuf) != sizeof mbuf
|
} else if(BIO_read(rbio,mbuf,sizeof mbuf) != sizeof mbuf
|
||||||
|| BIO_read(rbio,
|
|| BIO_read(rbio,
|
||||||
(unsigned char *)salt,
|
(unsigned char *)salt,
|
||||||
PKCS5_SALT_LEN) != PKCS5_SALT_LEN) {
|
sizeof salt) != sizeof salt) {
|
||||||
BIO_printf(bio_err,"error reading input file\n");
|
BIO_printf(bio_err,"error reading input file\n");
|
||||||
goto end;
|
goto end;
|
||||||
} else if(memcmp(mbuf,magic,sizeof magic-1)) {
|
} else if(memcmp(mbuf,magic,sizeof magic-1)) {
|
||||||
@@ -478,9 +491,9 @@ bad:
|
|||||||
* bug picked up by
|
* bug picked up by
|
||||||
* Larry J. Hughes Jr. <hughes@indiana.edu> */
|
* Larry J. Hughes Jr. <hughes@indiana.edu> */
|
||||||
if (str == strbuf)
|
if (str == strbuf)
|
||||||
memset(str,0,SIZE);
|
OPENSSL_cleanse(str,SIZE);
|
||||||
else
|
else
|
||||||
memset(str,0,strlen(str));
|
OPENSSL_cleanse(str,strlen(str));
|
||||||
}
|
}
|
||||||
if ((hiv != NULL) && !set_hex(hiv,iv,sizeof iv))
|
if ((hiv != NULL) && !set_hex(hiv,iv,sizeof iv))
|
||||||
{
|
{
|
||||||
@@ -521,7 +534,7 @@ bad:
|
|||||||
if (!nosalt)
|
if (!nosalt)
|
||||||
{
|
{
|
||||||
printf("salt=");
|
printf("salt=");
|
||||||
for (i=0; i<PKCS5_SALT_LEN; i++)
|
for (i=0; i<sizeof salt; i++)
|
||||||
printf("%02X",salt[i]);
|
printf("%02X",salt[i]);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@@ -583,7 +596,7 @@ end:
|
|||||||
if (b64 != NULL) BIO_free(b64);
|
if (b64 != NULL) BIO_free(b64);
|
||||||
if(pass) OPENSSL_free(pass);
|
if(pass) OPENSSL_free(pass);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
int set_hex(char *in, unsigned char *out, int size)
|
int set_hex(char *in, unsigned char *out, int size)
|
||||||
|
|||||||
@@ -56,6 +56,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -356,6 +358,9 @@ int MAIN(int argc, char **argv)
|
|||||||
|
|
||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
bio_out=BIO_new_fp(stdout,BIO_NOCLOSE);
|
bio_out=BIO_new_fp(stdout,BIO_NOCLOSE);
|
||||||
#ifdef OPENSSL_SYS_VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
@@ -513,5 +518,12 @@ end:
|
|||||||
sk_pop_free(post_cmds, identity);
|
sk_pop_free(post_cmds, identity);
|
||||||
if (bio_out != NULL) BIO_free_all(bio_out);
|
if (bio_out != NULL) BIO_free_all(bio_out);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
# if PEDANTIC
|
||||||
|
static void *dummy=&dummy;
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -122,5 +122,5 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|||||||
15
apps/gendh.c
15
apps/gendh.c
@@ -81,13 +81,17 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
DH *dh=NULL;
|
DH *dh=NULL;
|
||||||
int ret=1,num=DEFBITS;
|
int ret=1,num=DEFBITS;
|
||||||
int g=2;
|
int g=2;
|
||||||
char *outfile=NULL;
|
char *outfile=NULL;
|
||||||
char *inrand=NULL;
|
char *inrand=NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
BIO *out=NULL;
|
BIO *out=NULL;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
@@ -96,6 +100,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
argv++;
|
argv++;
|
||||||
argc--;
|
argc--;
|
||||||
for (;;)
|
for (;;)
|
||||||
@@ -112,11 +119,13 @@ int MAIN(int argc, char **argv)
|
|||||||
g=3; */
|
g=3; */
|
||||||
else if (strcmp(*argv,"-5") == 0)
|
else if (strcmp(*argv,"-5") == 0)
|
||||||
g=5;
|
g=5;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-rand") == 0)
|
else if (strcmp(*argv,"-rand") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -135,14 +144,18 @@ bad:
|
|||||||
BIO_printf(bio_err," -2 - use 2 as the generator value\n");
|
BIO_printf(bio_err," -2 - use 2 as the generator value\n");
|
||||||
/* BIO_printf(bio_err," -3 - use 3 as the generator value\n"); */
|
/* BIO_printf(bio_err," -3 - use 3 as the generator value\n"); */
|
||||||
BIO_printf(bio_err," -5 - use 5 as the generator value\n");
|
BIO_printf(bio_err," -5 - use 5 as the generator value\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err," the random number generator\n");
|
BIO_printf(bio_err," the random number generator\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
out=BIO_new(BIO_s_file());
|
out=BIO_new(BIO_s_file());
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
@@ -195,7 +208,7 @@ end:
|
|||||||
if (out != NULL) BIO_free_all(out);
|
if (out != NULL) BIO_free_all(out);
|
||||||
if (dh != NULL) DH_free(dh);
|
if (dh != NULL) DH_free(dh);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
|
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
DSA *dsa=NULL;
|
DSA *dsa=NULL;
|
||||||
int ret=1;
|
int ret=1;
|
||||||
char *outfile=NULL;
|
char *outfile=NULL;
|
||||||
@@ -85,7 +87,9 @@ int MAIN(int argc, char **argv)
|
|||||||
char *passargout = NULL, *passout = NULL;
|
char *passargout = NULL, *passout = NULL;
|
||||||
BIO *out=NULL,*in=NULL;
|
BIO *out=NULL,*in=NULL;
|
||||||
const EVP_CIPHER *enc=NULL;
|
const EVP_CIPHER *enc=NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -93,6 +97,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
argv++;
|
argv++;
|
||||||
argc--;
|
argc--;
|
||||||
for (;;)
|
for (;;)
|
||||||
@@ -108,11 +115,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
passargout= *(++argv);
|
passargout= *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-rand") == 0)
|
else if (strcmp(*argv,"-rand") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -129,6 +138,14 @@ int MAIN(int argc, char **argv)
|
|||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
else if (strcmp(*argv,"-idea") == 0)
|
else if (strcmp(*argv,"-idea") == 0)
|
||||||
enc=EVP_idea_cbc();
|
enc=EVP_idea_cbc();
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
else if (strcmp(*argv,"-aes128") == 0)
|
||||||
|
enc=EVP_aes_128_cbc();
|
||||||
|
else if (strcmp(*argv,"-aes192") == 0)
|
||||||
|
enc=EVP_aes_192_cbc();
|
||||||
|
else if (strcmp(*argv,"-aes256") == 0)
|
||||||
|
enc=EVP_aes_256_cbc();
|
||||||
#endif
|
#endif
|
||||||
else if (**argv != '-' && dsaparams == NULL)
|
else if (**argv != '-' && dsaparams == NULL)
|
||||||
{
|
{
|
||||||
@@ -152,7 +169,13 @@ bad:
|
|||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
BIO_printf(bio_err," -idea - encrypt the generated key with IDEA in cbc mode\n");
|
BIO_printf(bio_err," -idea - encrypt the generated key with IDEA in cbc mode\n");
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
|
||||||
|
BIO_printf(bio_err," encrypt PEM output with cbc aes\n");
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err," the random number generator\n");
|
BIO_printf(bio_err," the random number generator\n");
|
||||||
@@ -161,7 +184,9 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
|
if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
|
||||||
BIO_printf(bio_err, "Error getting password\n");
|
BIO_printf(bio_err, "Error getting password\n");
|
||||||
@@ -231,6 +256,6 @@ end:
|
|||||||
if (dsa != NULL) DSA_free(dsa);
|
if (dsa != NULL) DSA_free(dsa);
|
||||||
if(passout) OPENSSL_free(passout);
|
if(passout) OPENSSL_free(passout);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -81,7 +81,9 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
int ret=1;
|
int ret=1;
|
||||||
RSA *rsa=NULL;
|
RSA *rsa=NULL;
|
||||||
int i,num=DEFBITS;
|
int i,num=DEFBITS;
|
||||||
@@ -90,7 +92,9 @@ int MAIN(int argc, char **argv)
|
|||||||
unsigned long f4=RSA_F4;
|
unsigned long f4=RSA_F4;
|
||||||
char *outfile=NULL;
|
char *outfile=NULL;
|
||||||
char *passargout = NULL, *passout = NULL;
|
char *passargout = NULL, *passout = NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
char *inrand=NULL;
|
char *inrand=NULL;
|
||||||
BIO *out=NULL;
|
BIO *out=NULL;
|
||||||
|
|
||||||
@@ -99,6 +103,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto err;
|
||||||
if ((out=BIO_new(BIO_s_file())) == NULL)
|
if ((out=BIO_new(BIO_s_file())) == NULL)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"unable to create BIO for output\n");
|
BIO_printf(bio_err,"unable to create BIO for output\n");
|
||||||
@@ -119,11 +126,13 @@ int MAIN(int argc, char **argv)
|
|||||||
f4=3;
|
f4=3;
|
||||||
else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
|
else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
|
||||||
f4=RSA_F4;
|
f4=RSA_F4;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-rand") == 0)
|
else if (strcmp(*argv,"-rand") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -138,6 +147,14 @@ int MAIN(int argc, char **argv)
|
|||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
else if (strcmp(*argv,"-idea") == 0)
|
else if (strcmp(*argv,"-idea") == 0)
|
||||||
enc=EVP_idea_cbc();
|
enc=EVP_idea_cbc();
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
else if (strcmp(*argv,"-aes128") == 0)
|
||||||
|
enc=EVP_aes_128_cbc();
|
||||||
|
else if (strcmp(*argv,"-aes192") == 0)
|
||||||
|
enc=EVP_aes_192_cbc();
|
||||||
|
else if (strcmp(*argv,"-aes256") == 0)
|
||||||
|
enc=EVP_aes_256_cbc();
|
||||||
#endif
|
#endif
|
||||||
else if (strcmp(*argv,"-passout") == 0)
|
else if (strcmp(*argv,"-passout") == 0)
|
||||||
{
|
{
|
||||||
@@ -157,12 +174,18 @@ bad:
|
|||||||
BIO_printf(bio_err," -des3 encrypt the generated key with DES in ede cbc mode (168 bit key)\n");
|
BIO_printf(bio_err," -des3 encrypt the generated key with DES in ede cbc mode (168 bit key)\n");
|
||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
BIO_printf(bio_err," -idea encrypt the generated key with IDEA in cbc mode\n");
|
BIO_printf(bio_err," -idea encrypt the generated key with IDEA in cbc mode\n");
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
|
||||||
|
BIO_printf(bio_err," encrypt PEM output with cbc aes\n");
|
||||||
#endif
|
#endif
|
||||||
BIO_printf(bio_err," -out file output the key to 'file\n");
|
BIO_printf(bio_err," -out file output the key to 'file\n");
|
||||||
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
||||||
BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n");
|
BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n");
|
||||||
BIO_printf(bio_err," -3 use 3 for the E value\n");
|
BIO_printf(bio_err," -3 use 3 for the E value\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err," load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err," load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err," the random number generator\n");
|
BIO_printf(bio_err," the random number generator\n");
|
||||||
@@ -176,7 +199,9 @@ bad:
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
@@ -243,7 +268,7 @@ err:
|
|||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
|
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
|
||||||
|
|||||||
@@ -15,22 +15,10 @@ $!
|
|||||||
$! It was written so it would try to determine what "C" compiler to
|
$! It was written so it would try to determine what "C" compiler to
|
||||||
$! use or you can specify which "C" compiler to use.
|
$! use or you can specify which "C" compiler to use.
|
||||||
$!
|
$!
|
||||||
$! Specify RSAREF as P1 to compile with the RSAREF library instead of
|
$! Specify DEBUG or NODEBUG as P1 to compile with or without debugger
|
||||||
$! the regular one. If you specify NORSAREF it will compile with the
|
|
||||||
$! regular RSAREF routines. (Note: If you are in the United States
|
|
||||||
$! you MUST compile with RSAREF unless you have a license from RSA).
|
|
||||||
$!
|
|
||||||
$! Note: The RSAREF libraries are NOT INCLUDED and you have to
|
|
||||||
$! download it from "ftp://ftp.rsa.com/rsaref". You have to
|
|
||||||
$! get the ".tar-Z" file as the ".zip" file dosen't have the
|
|
||||||
$! directory structure stored. You have to extract the file
|
|
||||||
$! into the [.RSAREF] directory under the root directory as that
|
|
||||||
$! is where the scripts will look for the files.
|
|
||||||
$!
|
|
||||||
$! Specify DEBUG or NODEBUG as P2 to compile with or without debugger
|
|
||||||
$! information.
|
$! information.
|
||||||
$!
|
$!
|
||||||
$! Specify which compiler at P3 to try to compile under.
|
$! Specify which compiler at P2 to try to compile under.
|
||||||
$!
|
$!
|
||||||
$! VAXC For VAX C.
|
$! VAXC For VAX C.
|
||||||
$! DECC For DEC C.
|
$! DECC For DEC C.
|
||||||
@@ -39,15 +27,16 @@ $!
|
|||||||
$! If you don't speficy a compiler, it will try to determine which
|
$! If you don't speficy a compiler, it will try to determine which
|
||||||
$! "C" compiler to use.
|
$! "C" compiler to use.
|
||||||
$!
|
$!
|
||||||
$! P4, if defined, sets a TCP/IP library to use, through one of the following
|
$! P3, if defined, sets a TCP/IP library to use, through one of the following
|
||||||
$! keywords:
|
$! keywords:
|
||||||
$!
|
$!
|
||||||
$! UCX for UCX
|
$! UCX for UCX
|
||||||
$! SOCKETSHR for SOCKETSHR+NETLIB
|
$! SOCKETSHR for SOCKETSHR+NETLIB
|
||||||
|
$! TCPIP for TCPIP (post UCX)
|
||||||
$!
|
$!
|
||||||
$! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
|
$! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
|
||||||
$!
|
$!
|
||||||
$! P6, if defined, sets a choice of programs to compile.
|
$! P5, if defined, sets a choice of programs to compile.
|
||||||
$!
|
$!
|
||||||
$!
|
$!
|
||||||
$! Define A TCP/IP Library That We Will Need To Link To.
|
$! Define A TCP/IP Library That We Will Need To Link To.
|
||||||
@@ -100,10 +89,6 @@ $! Define The CRYPTO Library.
|
|||||||
$!
|
$!
|
||||||
$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
|
$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
|
||||||
$!
|
$!
|
||||||
$! Define The RSAREF Library.
|
|
||||||
$!
|
|
||||||
$ RSAREF_LIB := SYS$DISK:[-.'ARCH'.EXE.RSAREF]LIBRSAGLUE.OLB
|
|
||||||
$!
|
|
||||||
$! Define The SSL Library.
|
$! Define The SSL Library.
|
||||||
$!
|
$!
|
||||||
$ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB
|
$ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB
|
||||||
@@ -181,7 +166,7 @@ $! TCPIP_PROGRAMS = ",S_SERVER,S_CLIENT,SESS_ID,CIPHERS,S_TIME,"
|
|||||||
$!
|
$!
|
||||||
$! Setup exceptional compilations
|
$! Setup exceptional compilations
|
||||||
$!
|
$!
|
||||||
$ COMPILEWITH_CC2 = ",S_SOCKET,S_SERVER,S_CLIENT,"
|
$ COMPILEWITH_CC2 = ",S_SERVER,S_CLIENT,"
|
||||||
$!
|
$!
|
||||||
$ PHASE := LIB
|
$ PHASE := LIB
|
||||||
$!
|
$!
|
||||||
@@ -292,73 +277,31 @@ $ WRITE SYS$OUTPUT FILE_NAME," needs a TCP/IP library. Can't link. Skipping.
|
|||||||
$ GOTO NEXT_FILE
|
$ GOTO NEXT_FILE
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! Link The Program, Check To See If We Need To Link With RSAREF Or Not.
|
$! Link The Program.
|
||||||
|
$! Check To See If We Are To Link With A Specific TCP/IP Library.
|
||||||
$!
|
$!
|
||||||
$ IF (RSAREF.EQS."TRUE")
|
$ IF (TCPIP_LIB.NES."")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Check To See If We Are To Link With A Specific TCP/IP Library.
|
$! Don't Link With The RSAREF Routines And TCP/IP Library.
|
||||||
$!
|
$!
|
||||||
$ IF (TCPIP_LIB.NES."")
|
$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
|
||||||
$ THEN
|
'OBJECT_FILE''EXTRA_OBJ', -
|
||||||
$!
|
'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
|
||||||
$! Link With The RSAREF Library And A Specific TCP/IP Library.
|
'TCPIP_LIB','OPT_FILE'/OPTION
|
||||||
$!
|
|
||||||
$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
|
|
||||||
'OBJECT_FILE''EXTRA_OBJ', -
|
|
||||||
'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, -
|
|
||||||
'TCPIP_LIB','OPT_FILE'/OPTION
|
|
||||||
$!
|
|
||||||
$! Else...
|
|
||||||
$!
|
|
||||||
$ ELSE
|
|
||||||
$!
|
|
||||||
$! Link With The RSAREF Library And NO TCP/IP Library.
|
|
||||||
$!
|
|
||||||
$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
|
|
||||||
'OBJECT_FILE''EXTRA_OBJ', -
|
|
||||||
'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, -
|
|
||||||
'OPT_FILE'/OPTION
|
|
||||||
$!
|
|
||||||
$! End The TCP/IP Library Check.
|
|
||||||
$!
|
|
||||||
$ ENDIF
|
|
||||||
$!
|
$!
|
||||||
$! Else...
|
$! Else...
|
||||||
$!
|
$!
|
||||||
$ ELSE
|
$ ELSE
|
||||||
$!
|
$!
|
||||||
$! Don't Link With The RSAREF Routines.
|
$! Don't Link With The RSAREF Routines And Link With A TCP/IP Library.
|
||||||
$!
|
$!
|
||||||
|
$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
|
||||||
|
'OBJECT_FILE''EXTRA_OBJ', -
|
||||||
|
'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
|
||||||
|
'OPT_FILE'/OPTION
|
||||||
$!
|
$!
|
||||||
$! Check To See If We Are To Link With A Specific TCP/IP Library.
|
$! End The TCP/IP Library Check.
|
||||||
$!
|
|
||||||
$ IF (TCPIP_LIB.NES."")
|
|
||||||
$ THEN
|
|
||||||
$!
|
|
||||||
$! Don't Link With The RSAREF Routines And TCP/IP Library.
|
|
||||||
$!
|
|
||||||
$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
|
|
||||||
'OBJECT_FILE''EXTRA_OBJ', -
|
|
||||||
'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
|
|
||||||
'TCPIP_LIB','OPT_FILE'/OPTION
|
|
||||||
$!
|
|
||||||
$! Else...
|
|
||||||
$!
|
|
||||||
$ ELSE
|
|
||||||
$!
|
|
||||||
$! Don't Link With The RSAREF Routines And Link With A TCP/IP Library.
|
|
||||||
$!
|
|
||||||
$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
|
|
||||||
'OBJECT_FILE''EXTRA_OBJ', -
|
|
||||||
'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
|
|
||||||
'OPT_FILE'/OPTION
|
|
||||||
$!
|
|
||||||
$! End The TCP/IP Library Check.
|
|
||||||
$!
|
|
||||||
$ ENDIF
|
|
||||||
$!
|
|
||||||
$! End The RSAREF Link Check.
|
|
||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
@@ -525,32 +468,6 @@ $! End The Crypto Library Check.
|
|||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! See If We Need The RSAREF Library.
|
|
||||||
$!
|
|
||||||
$ IF (RSAREF.EQS."TRUE")
|
|
||||||
$ THEN
|
|
||||||
$!
|
|
||||||
$! Look For The Library LIBRSAGLUE.OLB.
|
|
||||||
$!
|
|
||||||
$ IF (F$SEARCH(RSAREF_LIB).EQS."")
|
|
||||||
$ THEN
|
|
||||||
$!
|
|
||||||
$! Tell The User We Can't Find The LIBRSAGLUE.OLB Library.
|
|
||||||
$!
|
|
||||||
$ WRITE SYS$OUTPUT ""
|
|
||||||
$ WRITE SYS$OUTPUT "Can't Find The Library ",RSAREF_LIB,"."
|
|
||||||
$ WRITE SYS$OUTPUT "We Can't Link Without It."
|
|
||||||
$ WRITE SYS$OUTPUT ""
|
|
||||||
$!
|
|
||||||
$! Since We Can't Link Without It, Exit.
|
|
||||||
$!
|
|
||||||
$ EXIT
|
|
||||||
$ ENDIF
|
|
||||||
$!
|
|
||||||
$! End The RSAREF Library Check.
|
|
||||||
$!
|
|
||||||
$ ENDIF
|
|
||||||
$!
|
|
||||||
$! Look For The Library LIBSSL.OLB.
|
$! Look For The Library LIBSSL.OLB.
|
||||||
$!
|
$!
|
||||||
$ IF (F$SEARCH(SSL_LIB).EQS."")
|
$ IF (F$SEARCH(SSL_LIB).EQS."")
|
||||||
@@ -581,87 +498,10 @@ $ CHECK_OPTIONS:
|
|||||||
$!
|
$!
|
||||||
$! Check To See If P1 Is Blank.
|
$! Check To See If P1 Is Blank.
|
||||||
$!
|
$!
|
||||||
$ P1 = "NORSAREF"
|
$ IF (P1.EQS."NODEBUG")
|
||||||
$ IF (P1.EQS."NORSAREF")
|
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! P1 Is NORSAREF, So Compile With The Regular RSA Libraries.
|
$! P1 Is NODEBUG, So Compile Without Debugger Information.
|
||||||
$!
|
|
||||||
$ RSAREF = "FALSE"
|
|
||||||
$!
|
|
||||||
$! Else...
|
|
||||||
$!
|
|
||||||
$ ELSE
|
|
||||||
$!
|
|
||||||
$! Check To See If We Are To Use The RSAREF Library.
|
|
||||||
$!
|
|
||||||
$ IF (P1.EQS."RSAREF")
|
|
||||||
$ THEN
|
|
||||||
$!
|
|
||||||
$! Check To Make Sure We Have The RSAREF Source Code Directory.
|
|
||||||
$!
|
|
||||||
$ IF (F$SEARCH("SYS$DISK:[-.RSAREF]SOURCE.DIR").EQS."")
|
|
||||||
$ THEN
|
|
||||||
$!
|
|
||||||
$! We Don't Have The RSAREF Souce Code Directory, So Tell The
|
|
||||||
$! User This.
|
|
||||||
$!
|
|
||||||
$ WRITE SYS$OUTPUT ""
|
|
||||||
$ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code."
|
|
||||||
$ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to"
|
|
||||||
$ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the"
|
|
||||||
$ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file"
|
|
||||||
$ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory"
|
|
||||||
$ WRITE SYS$OUTPUT "as that is where the scripts will look for the files."
|
|
||||||
$ WRITE SYS$OUTPUT ""
|
|
||||||
$!
|
|
||||||
$! Time To Exit.
|
|
||||||
$!
|
|
||||||
$ EXIT
|
|
||||||
$!
|
|
||||||
$! Else...
|
|
||||||
$!
|
|
||||||
$ ELSE
|
|
||||||
$!
|
|
||||||
$! Compile Using The RSAREF Library.
|
|
||||||
$!
|
|
||||||
$ RSAREF = "TRUE"
|
|
||||||
$!
|
|
||||||
$! End The RSAREF Soure Directory Check.
|
|
||||||
$!
|
|
||||||
$ ENDIF
|
|
||||||
$!
|
|
||||||
$! Else...
|
|
||||||
$!
|
|
||||||
$ ELSE
|
|
||||||
$!
|
|
||||||
$! They Entered An Invalid Option..
|
|
||||||
$!
|
|
||||||
$ WRITE SYS$OUTPUT ""
|
|
||||||
$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
|
|
||||||
$ WRITE SYS$OUTPUT ""
|
|
||||||
$ WRITE SYS$OUTPUT " RSAREF : Compile With The RSAREF Library."
|
|
||||||
$ WRITE SYS$OUTPUT " NORSAREF : Compile With The Regular RSA Library."
|
|
||||||
$ WRITE SYS$OUTPUT ""
|
|
||||||
$!
|
|
||||||
$! Time To EXIT.
|
|
||||||
$!
|
|
||||||
$ EXIT
|
|
||||||
$!
|
|
||||||
$! End The Valid Arguement Check.
|
|
||||||
$!
|
|
||||||
$ ENDIF
|
|
||||||
$!
|
|
||||||
$! End P1 Check.
|
|
||||||
$!
|
|
||||||
$ ENDIF
|
|
||||||
$!
|
|
||||||
$! Check To See If P2 Is Blank.
|
|
||||||
$!
|
|
||||||
$ IF (P2.EQS."NODEBUG")
|
|
||||||
$ THEN
|
|
||||||
$!
|
|
||||||
$! P2 Is NODEBUG, So Compile Without Debugger Information.
|
|
||||||
$!
|
$!
|
||||||
$ DEBUGGER = "NODEBUG"
|
$ DEBUGGER = "NODEBUG"
|
||||||
$ TRACEBACK = "NOTRACEBACK"
|
$ TRACEBACK = "NOTRACEBACK"
|
||||||
@@ -676,7 +516,7 @@ $ ELSE
|
|||||||
$!
|
$!
|
||||||
$! Check To See If We Are To Compile With Debugger Information.
|
$! Check To See If We Are To Compile With Debugger Information.
|
||||||
$!
|
$!
|
||||||
$ IF (P2.EQS."DEBUG")
|
$ IF (P1.EQS."DEBUG")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Compile With Debugger Information.
|
$! Compile With Debugger Information.
|
||||||
@@ -692,7 +532,7 @@ $!
|
|||||||
$! Tell The User Entered An Invalid Option..
|
$! Tell The User Entered An Invalid Option..
|
||||||
$!
|
$!
|
||||||
$ WRITE SYS$OUTPUT ""
|
$ WRITE SYS$OUTPUT ""
|
||||||
$ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
|
$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
|
||||||
$ WRITE SYS$OUTPUT ""
|
$ WRITE SYS$OUTPUT ""
|
||||||
$ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
|
$ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
|
||||||
$ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
|
$ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
|
||||||
@@ -706,13 +546,13 @@ $! End The Valid Arguement Check.
|
|||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! End The P2 Check.
|
$! End The P1 Check.
|
||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! Check To See If P3 Is Blank.
|
$! Check To See If P2 Is Blank.
|
||||||
$!
|
$!
|
||||||
$ IF (P3.EQS."")
|
$ IF (P2.EQS."")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! O.K., The User Didn't Specify A Compiler, Let's Try To
|
$! O.K., The User Didn't Specify A Compiler, Let's Try To
|
||||||
@@ -725,7 +565,7 @@ $ THEN
|
|||||||
$!
|
$!
|
||||||
$! Looks Like GNUC, Set To Use GNUC.
|
$! Looks Like GNUC, Set To Use GNUC.
|
||||||
$!
|
$!
|
||||||
$ P3 = "GNUC"
|
$ P2 = "GNUC"
|
||||||
$!
|
$!
|
||||||
$! Else...
|
$! Else...
|
||||||
$!
|
$!
|
||||||
@@ -738,7 +578,7 @@ $ THEN
|
|||||||
$!
|
$!
|
||||||
$! Looks Like DECC, Set To Use DECC.
|
$! Looks Like DECC, Set To Use DECC.
|
||||||
$!
|
$!
|
||||||
$ P3 = "DECC"
|
$ P2 = "DECC"
|
||||||
$!
|
$!
|
||||||
$! Else...
|
$! Else...
|
||||||
$!
|
$!
|
||||||
@@ -746,7 +586,7 @@ $ ELSE
|
|||||||
$!
|
$!
|
||||||
$! Looks Like VAXC, Set To Use VAXC.
|
$! Looks Like VAXC, Set To Use VAXC.
|
||||||
$!
|
$!
|
||||||
$ P3 = "VAXC"
|
$ P2 = "VAXC"
|
||||||
$!
|
$!
|
||||||
$! End The VAXC Compiler Check.
|
$! End The VAXC Compiler Check.
|
||||||
$!
|
$!
|
||||||
@@ -760,9 +600,9 @@ $! End The Compiler Check.
|
|||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! Check To See If We Have A Option For P4.
|
$! Check To See If We Have A Option For P3.
|
||||||
$!
|
$!
|
||||||
$ IF (P4.EQS."")
|
$ IF (P3.EQS."")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Find out what socket library we have available
|
$! Find out what socket library we have available
|
||||||
@@ -772,7 +612,7 @@ $ THEN
|
|||||||
$!
|
$!
|
||||||
$! We have SOCKETSHR, and it is my opinion that it's the best to use.
|
$! We have SOCKETSHR, and it is my opinion that it's the best to use.
|
||||||
$!
|
$!
|
||||||
$ P4 = "SOCKETSHR"
|
$ P3 = "SOCKETSHR"
|
||||||
$!
|
$!
|
||||||
$! Tell the user
|
$! Tell the user
|
||||||
$!
|
$!
|
||||||
@@ -792,7 +632,7 @@ $ THEN
|
|||||||
$!
|
$!
|
||||||
$! Last resort: a UCX or UCX-compatible library
|
$! Last resort: a UCX or UCX-compatible library
|
||||||
$!
|
$!
|
||||||
$ P4 = "UCX"
|
$ P3 = "UCX"
|
||||||
$!
|
$!
|
||||||
$! Tell the user
|
$! Tell the user
|
||||||
$!
|
$!
|
||||||
@@ -816,12 +656,12 @@ $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
|
|||||||
$!
|
$!
|
||||||
$! Check To See If The User Entered A Valid Paramter.
|
$! Check To See If The User Entered A Valid Paramter.
|
||||||
$!
|
$!
|
||||||
$ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
|
$ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Check To See If The User Wanted DECC.
|
$! Check To See If The User Wanted DECC.
|
||||||
$!
|
$!
|
||||||
$ IF (P3.EQS."DECC")
|
$ IF (P2.EQS."DECC")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Looks Like DECC, Set To Use DECC.
|
$! Looks Like DECC, Set To Use DECC.
|
||||||
@@ -851,7 +691,7 @@ $ ENDIF
|
|||||||
$!
|
$!
|
||||||
$! Check To See If We Are To Use VAXC.
|
$! Check To See If We Are To Use VAXC.
|
||||||
$!
|
$!
|
||||||
$ IF (P3.EQS."VAXC")
|
$ IF (P2.EQS."VAXC")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Looks Like VAXC, Set To Use VAXC.
|
$! Looks Like VAXC, Set To Use VAXC.
|
||||||
@@ -888,7 +728,7 @@ $ ENDIF
|
|||||||
$!
|
$!
|
||||||
$! Check To See If We Are To Use GNU C.
|
$! Check To See If We Are To Use GNU C.
|
||||||
$!
|
$!
|
||||||
$ IF (P3.EQS."GNUC")
|
$ IF (P2.EQS."GNUC")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Looks Like GNUC, Set To Use GNUC.
|
$! Looks Like GNUC, Set To Use GNUC.
|
||||||
@@ -917,31 +757,6 @@ $! Set up default defines
|
|||||||
$!
|
$!
|
||||||
$ CCDEFS = """FLAT_INC=1""," + CCDEFS
|
$ CCDEFS = """FLAT_INC=1""," + CCDEFS
|
||||||
$!
|
$!
|
||||||
$! Check To See If We Are To Compile With RSAREF Routines.
|
|
||||||
$!
|
|
||||||
$ IF (RSAREF.EQS."TRUE")
|
|
||||||
$ THEN
|
|
||||||
$!
|
|
||||||
$! Compile With RSAREF.
|
|
||||||
$!
|
|
||||||
$ CCDEFS = CCDEFS + ",""RSAref=1"""
|
|
||||||
$!
|
|
||||||
$! Tell The User This.
|
|
||||||
$!
|
|
||||||
$ WRITE SYS$OUTPUT "Compiling With RSAREF Routines."
|
|
||||||
$!
|
|
||||||
$! Else, We Don't Care. Compile Without The RSAREF Library.
|
|
||||||
$!
|
|
||||||
$ ELSE
|
|
||||||
$!
|
|
||||||
$! Tell The User We Are Compile Without The RSAREF Routines.
|
|
||||||
$!
|
|
||||||
$ WRITE SYS$OUTPUT "Compiling Without The RSAREF Routines.
|
|
||||||
$!
|
|
||||||
$! End The RSAREF Check.
|
|
||||||
$!
|
|
||||||
$ ENDIF
|
|
||||||
$!
|
|
||||||
$! Else The User Entered An Invalid Arguement.
|
$! Else The User Entered An Invalid Arguement.
|
||||||
$!
|
$!
|
||||||
$ ELSE
|
$ ELSE
|
||||||
@@ -949,7 +764,7 @@ $!
|
|||||||
$! Tell The User We Don't Know What They Want.
|
$! Tell The User We Don't Know What They Want.
|
||||||
$!
|
$!
|
||||||
$ WRITE SYS$OUTPUT ""
|
$ WRITE SYS$OUTPUT ""
|
||||||
$ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
|
$ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
|
||||||
$ WRITE SYS$OUTPUT ""
|
$ WRITE SYS$OUTPUT ""
|
||||||
$ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
|
$ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
|
||||||
$ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
|
$ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
|
||||||
@@ -963,17 +778,18 @@ $ ENDIF
|
|||||||
$!
|
$!
|
||||||
$! Time to check the contents, and to make sure we get the correct library.
|
$! Time to check the contents, and to make sure we get the correct library.
|
||||||
$!
|
$!
|
||||||
$ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX"
|
$ IF P3.EQS."SOCKETSHR" .OR. P3.EQS."MULTINET" .OR. P3.EQS."UCX" -
|
||||||
|
.OR. P3.EQS."TCPIP" .OR. P3.EQS."NONE"
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Check to see if SOCKETSHR was chosen
|
$! Check to see if SOCKETSHR was chosen
|
||||||
$!
|
$!
|
||||||
$ IF P4.EQS."SOCKETSHR"
|
$ IF P3.EQS."SOCKETSHR"
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Set the library to use SOCKETSHR
|
$! Set the library to use SOCKETSHR
|
||||||
$!
|
$!
|
||||||
$ TCPIP_LIB = "[-.VMS]SOCKETSHR_SHR.OPT/OPT"
|
$ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT"
|
||||||
$!
|
$!
|
||||||
$! Done with SOCKETSHR
|
$! Done with SOCKETSHR
|
||||||
$!
|
$!
|
||||||
@@ -981,12 +797,12 @@ $ ENDIF
|
|||||||
$!
|
$!
|
||||||
$! Check to see if MULTINET was chosen
|
$! Check to see if MULTINET was chosen
|
||||||
$!
|
$!
|
||||||
$ IF P4.EQS."MULTINET"
|
$ IF P3.EQS."MULTINET"
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Set the library to use UCX emulation.
|
$! Set the library to use UCX emulation.
|
||||||
$!
|
$!
|
||||||
$ P4 = "UCX"
|
$ P3 = "UCX"
|
||||||
$!
|
$!
|
||||||
$! Done with MULTINET
|
$! Done with MULTINET
|
||||||
$!
|
$!
|
||||||
@@ -994,27 +810,53 @@ $ ENDIF
|
|||||||
$!
|
$!
|
||||||
$! Check to see if UCX was chosen
|
$! Check to see if UCX was chosen
|
||||||
$!
|
$!
|
||||||
$ IF P4.EQS."UCX"
|
$ IF P3.EQS."UCX"
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Set the library to use UCX.
|
$! Set the library to use UCX.
|
||||||
$!
|
$!
|
||||||
$ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC.OPT/OPT"
|
$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT"
|
||||||
$ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
|
$ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
|
||||||
$ THEN
|
$ THEN
|
||||||
$ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT"
|
$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT"
|
||||||
$ ELSE
|
$ ELSE
|
||||||
$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
|
$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
|
||||||
TCPIP_LIB = "[-.VMS]UCX_SHR_VAXC.OPT/OPT"
|
TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT"
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! Done with UCX
|
$! Done with UCX
|
||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
|
$! Check to see if TCPIP (post UCX) was chosen
|
||||||
|
$!
|
||||||
|
$ IF P3.EQS."TCPIP"
|
||||||
|
$ THEN
|
||||||
|
$!
|
||||||
|
$! Set the library to use TCPIP.
|
||||||
|
$!
|
||||||
|
$ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT"
|
||||||
|
$!
|
||||||
|
$! Done with TCPIP
|
||||||
|
$!
|
||||||
|
$ ENDIF
|
||||||
|
$!
|
||||||
|
$! Check to see if NONE was chosen
|
||||||
|
$!
|
||||||
|
$ IF P3.EQS."NONE"
|
||||||
|
$ THEN
|
||||||
|
$!
|
||||||
|
$! Do not use TCPIP.
|
||||||
|
$!
|
||||||
|
$ TCPIP_LIB = ""
|
||||||
|
$!
|
||||||
|
$! Done with TCPIP
|
||||||
|
$!
|
||||||
|
$ ENDIF
|
||||||
|
$!
|
||||||
$! Add TCP/IP type to CC definitions.
|
$! Add TCP/IP type to CC definitions.
|
||||||
$!
|
$!
|
||||||
$ CCDEFS = CCDEFS + ",TCPIP_TYPE_''P4'"
|
$ CCDEFS = CCDEFS + ",TCPIP_TYPE_''P3'"
|
||||||
$!
|
$!
|
||||||
$! Print info
|
$! Print info
|
||||||
$!
|
$!
|
||||||
@@ -1027,10 +869,11 @@ $!
|
|||||||
$! Tell The User We Don't Know What They Want.
|
$! Tell The User We Don't Know What They Want.
|
||||||
$!
|
$!
|
||||||
$ WRITE SYS$OUTPUT ""
|
$ WRITE SYS$OUTPUT ""
|
||||||
$ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
|
$ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
|
||||||
$ WRITE SYS$OUTPUT ""
|
$ WRITE SYS$OUTPUT ""
|
||||||
$ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
|
$ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
|
||||||
$ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
|
$ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
|
||||||
|
$ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library."
|
||||||
$ WRITE SYS$OUTPUT ""
|
$ WRITE SYS$OUTPUT ""
|
||||||
$!
|
$!
|
||||||
$! Time To EXIT.
|
$! Time To EXIT.
|
||||||
@@ -1057,7 +900,7 @@ $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
|
|||||||
$!
|
$!
|
||||||
$! Show user the result
|
$! Show user the result
|
||||||
$!
|
$!
|
||||||
$ WRITE SYS$OUTPUT "Main Compiling Command: ",CC
|
$ WRITE/SYMBOL SYS$OUTPUT "Main Compiling Command: ",CC
|
||||||
$!
|
$!
|
||||||
$! Special Threads For OpenVMS v7.1 Or Later
|
$! Special Threads For OpenVMS v7.1 Or Later
|
||||||
$!
|
$!
|
||||||
@@ -1065,9 +908,9 @@ $! Written By: Richard Levitte
|
|||||||
$! richard@levitte.org
|
$! richard@levitte.org
|
||||||
$!
|
$!
|
||||||
$!
|
$!
|
||||||
$! Check To See If We Have A Option For P5.
|
$! Check To See If We Have A Option For P4.
|
||||||
$!
|
$!
|
||||||
$ IF (P5.EQS."")
|
$ IF (P4.EQS."")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! Get The Version Of VMS We Are Using.
|
$! Get The Version Of VMS We Are Using.
|
||||||
@@ -1089,15 +932,15 @@ $! End The VMS Version Check.
|
|||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! End The P5 Check.
|
$! End The P4 Check.
|
||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! Check if the user wanted to compile just a subset of all the programs.
|
$! Check if the user wanted to compile just a subset of all the programs.
|
||||||
$!
|
$!
|
||||||
$ IF P6 .NES. ""
|
$ IF P5 .NES. ""
|
||||||
$ THEN
|
$ THEN
|
||||||
$ PROGRAMS = P6
|
$ PROGRAMS = P5
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! Time To RETURN...
|
$! Time To RETURN...
|
||||||
|
|||||||
@@ -58,9 +58,9 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "apps.h"
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include "apps.h"
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG nseq_main
|
#define PROG nseq_main
|
||||||
@@ -102,7 +102,7 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-in file input file\n");
|
BIO_printf (bio_err, "-in file input file\n");
|
||||||
BIO_printf (bio_err, "-out file output file\n");
|
BIO_printf (bio_err, "-out file output file\n");
|
||||||
BIO_printf (bio_err, "-toseq output NS Sequence file\n");
|
BIO_printf (bio_err, "-toseq output NS Sequence file\n");
|
||||||
EXIT(1);
|
OPENSSL_EXIT(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infile) {
|
if (infile) {
|
||||||
@@ -162,6 +162,6 @@ end:
|
|||||||
BIO_free_all(out);
|
BIO_free_all(out);
|
||||||
NETSCAPE_CERT_SEQUENCE_free(seq);
|
NETSCAPE_CERT_SEQUENCE_free(seq);
|
||||||
|
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
71
apps/ocsp.c
71
apps/ocsp.c
@@ -55,14 +55,15 @@
|
|||||||
* Hudson (tjh@cryptsoft.com).
|
* Hudson (tjh@cryptsoft.com).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#ifndef OPENSSL_NO_OCSP
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "apps.h"
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/ocsp.h>
|
#include <openssl/ocsp.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include "apps.h"
|
|
||||||
|
|
||||||
/* Maximum leeway in validity period: default 5 minutes */
|
/* Maximum leeway in validity period: default 5 minutes */
|
||||||
#define MAX_VALIDITY_PERIOD (5 * 60)
|
#define MAX_VALIDITY_PERIOD (5 * 60)
|
||||||
@@ -135,6 +136,7 @@ int MAIN(int argc, char **argv)
|
|||||||
int accept_count = -1;
|
int accept_count = -1;
|
||||||
int badarg = 0;
|
int badarg = 0;
|
||||||
int i;
|
int i;
|
||||||
|
int ignore_err = 0;
|
||||||
STACK *reqnames = NULL;
|
STACK *reqnames = NULL;
|
||||||
STACK_OF(OCSP_CERTID) *ids = NULL;
|
STACK_OF(OCSP_CERTID) *ids = NULL;
|
||||||
|
|
||||||
@@ -145,6 +147,9 @@ int MAIN(int argc, char **argv)
|
|||||||
int nmin = 0, ndays = -1;
|
int nmin = 0, ndays = -1;
|
||||||
|
|
||||||
if (bio_err == NULL) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
|
if (bio_err == NULL) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
args = argv + 1;
|
args = argv + 1;
|
||||||
reqnames = sk_new_null();
|
reqnames = sk_new_null();
|
||||||
@@ -191,6 +196,8 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
else badarg = 1;
|
else badarg = 1;
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(*args, "-ignore_err"))
|
||||||
|
ignore_err = 1;
|
||||||
else if (!strcmp(*args, "-noverify"))
|
else if (!strcmp(*args, "-noverify"))
|
||||||
noverify = 1;
|
noverify = 1;
|
||||||
else if (!strcmp(*args, "-nonce"))
|
else if (!strcmp(*args, "-nonce"))
|
||||||
@@ -520,7 +527,7 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-serial n serial number to check\n");
|
BIO_printf (bio_err, "-serial n serial number to check\n");
|
||||||
BIO_printf (bio_err, "-signer file certificate to sign OCSP request with\n");
|
BIO_printf (bio_err, "-signer file certificate to sign OCSP request with\n");
|
||||||
BIO_printf (bio_err, "-signkey file private key to sign OCSP request with\n");
|
BIO_printf (bio_err, "-signkey file private key to sign OCSP request with\n");
|
||||||
BIO_printf (bio_err, "-sign_certs file additional certificates to include in signed request\n");
|
BIO_printf (bio_err, "-sign_other file additional certificates to include in signed request\n");
|
||||||
BIO_printf (bio_err, "-no_certs don't include any certificates in signed request\n");
|
BIO_printf (bio_err, "-no_certs don't include any certificates in signed request\n");
|
||||||
BIO_printf (bio_err, "-req_text print text form of request\n");
|
BIO_printf (bio_err, "-req_text print text form of request\n");
|
||||||
BIO_printf (bio_err, "-resp_text print text form of response\n");
|
BIO_printf (bio_err, "-resp_text print text form of response\n");
|
||||||
@@ -540,18 +547,18 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-validity_period n maximum validity discrepancy in seconds\n");
|
BIO_printf (bio_err, "-validity_period n maximum validity discrepancy in seconds\n");
|
||||||
BIO_printf (bio_err, "-status_age n maximum status age in seconds\n");
|
BIO_printf (bio_err, "-status_age n maximum status age in seconds\n");
|
||||||
BIO_printf (bio_err, "-noverify don't verify response at all\n");
|
BIO_printf (bio_err, "-noverify don't verify response at all\n");
|
||||||
BIO_printf (bio_err, "-verify_certs file additional certificates to search for signer\n");
|
BIO_printf (bio_err, "-verify_other file additional certificates to search for signer\n");
|
||||||
BIO_printf (bio_err, "-trust_other don't verify additional certificates\n");
|
BIO_printf (bio_err, "-trust_other don't verify additional certificates\n");
|
||||||
BIO_printf (bio_err, "-no_intern don't search certificates contained in response for signer\n");
|
BIO_printf (bio_err, "-no_intern don't search certificates contained in response for signer\n");
|
||||||
BIO_printf (bio_err, "-no_sig_verify don't check signature on response\n");
|
BIO_printf (bio_err, "-no_signature_verify don't check signature on response\n");
|
||||||
BIO_printf (bio_err, "-no_cert_verify don't check signing certificate\n");
|
BIO_printf (bio_err, "-no_cert_verify don't check signing certificate\n");
|
||||||
BIO_printf (bio_err, "-no_chain don't chain verify response\n");
|
BIO_printf (bio_err, "-no_chain don't chain verify response\n");
|
||||||
BIO_printf (bio_err, "-no_cert_checks don't do additional checks on signing certificate\n");
|
BIO_printf (bio_err, "-no_cert_checks don't do additional checks on signing certificate\n");
|
||||||
BIO_printf (bio_err, "-port num port to run responder on\n");
|
BIO_printf (bio_err, "-port num port to run responder on\n");
|
||||||
BIO_printf (bio_err, "-index file certificate status index file\n");
|
BIO_printf (bio_err, "-index file certificate status index file\n");
|
||||||
BIO_printf (bio_err, "-CA file CA certificate\n");
|
BIO_printf (bio_err, "-CA file CA certificate\n");
|
||||||
BIO_printf (bio_err, "-rsigner file responder certificate to sign requests with\n");
|
BIO_printf (bio_err, "-rsigner file responder certificate to sign responses with\n");
|
||||||
BIO_printf (bio_err, "-rkey file responder key to sign requests with\n");
|
BIO_printf (bio_err, "-rkey file responder key to sign responses with\n");
|
||||||
BIO_printf (bio_err, "-rother file other certificates to include in response\n");
|
BIO_printf (bio_err, "-rother file other certificates to include in response\n");
|
||||||
BIO_printf (bio_err, "-resp_no_certs don't include any certificates in response\n");
|
BIO_printf (bio_err, "-resp_no_certs don't include any certificates in response\n");
|
||||||
BIO_printf (bio_err, "-nmin n number of minutes before next update\n");
|
BIO_printf (bio_err, "-nmin n number of minutes before next update\n");
|
||||||
@@ -610,11 +617,11 @@ int MAIN(int argc, char **argv)
|
|||||||
NULL, e, "CA certificate");
|
NULL, e, "CA certificate");
|
||||||
if (rcertfile)
|
if (rcertfile)
|
||||||
{
|
{
|
||||||
rother = load_certs(bio_err, sign_certfile, FORMAT_PEM,
|
rother = load_certs(bio_err, rcertfile, FORMAT_PEM,
|
||||||
NULL, e, "responder other certificates");
|
NULL, e, "responder other certificates");
|
||||||
if (!sign_other) goto end;
|
if (!rother) goto end;
|
||||||
}
|
}
|
||||||
rkey = load_key(bio_err, rkeyfile, FORMAT_PEM, NULL, NULL,
|
rkey = load_key(bio_err, rkeyfile, FORMAT_PEM, 0, NULL, NULL,
|
||||||
"responder private key");
|
"responder private key");
|
||||||
if (!rkey)
|
if (!rkey)
|
||||||
goto end;
|
goto end;
|
||||||
@@ -660,7 +667,7 @@ int MAIN(int argc, char **argv)
|
|||||||
NULL, e, "signer certificates");
|
NULL, e, "signer certificates");
|
||||||
if (!sign_other) goto end;
|
if (!sign_other) goto end;
|
||||||
}
|
}
|
||||||
key = load_key(bio_err, keyfile, FORMAT_PEM, NULL, NULL,
|
key = load_key(bio_err, keyfile, FORMAT_PEM, 0, NULL, NULL,
|
||||||
"signer private key");
|
"signer private key");
|
||||||
if (!key)
|
if (!key)
|
||||||
goto end;
|
goto end;
|
||||||
@@ -673,6 +680,18 @@ int MAIN(int argc, char **argv)
|
|||||||
|
|
||||||
if (req_text && req) OCSP_REQUEST_print(out, req, 0);
|
if (req_text && req) OCSP_REQUEST_print(out, req, 0);
|
||||||
|
|
||||||
|
if (reqout)
|
||||||
|
{
|
||||||
|
derbio = BIO_new_file(reqout, "wb");
|
||||||
|
if(!derbio)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err, "Error opening file %s\n", reqout);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
i2d_OCSP_REQUEST_bio(derbio, req);
|
||||||
|
BIO_free(derbio);
|
||||||
|
}
|
||||||
|
|
||||||
if (ridx_filename && (!rkey || !rsigner || !rca_cert))
|
if (ridx_filename && (!rkey || !rsigner || !rca_cert))
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "Need a responder certificate, key and CA for this operation!\n");
|
BIO_printf(bio_err, "Need a responder certificate, key and CA for this operation!\n");
|
||||||
@@ -707,7 +726,12 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
else if (host)
|
else if (host)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_SOCK
|
||||||
cbio = BIO_new_connect(host);
|
cbio = BIO_new_connect(host);
|
||||||
|
#else
|
||||||
|
BIO_printf(bio_err, "Error creating connect BIO - sockets not supported.\n");
|
||||||
|
goto end;
|
||||||
|
#endif
|
||||||
if (!cbio)
|
if (!cbio)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "Error creating connect BIO\n");
|
BIO_printf(bio_err, "Error creating connect BIO\n");
|
||||||
@@ -717,7 +741,16 @@ int MAIN(int argc, char **argv)
|
|||||||
if (use_ssl == 1)
|
if (use_ssl == 1)
|
||||||
{
|
{
|
||||||
BIO *sbio;
|
BIO *sbio;
|
||||||
|
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
||||||
ctx = SSL_CTX_new(SSLv23_client_method());
|
ctx = SSL_CTX_new(SSLv23_client_method());
|
||||||
|
#elif !defined(OPENSSL_NO_SSL3)
|
||||||
|
ctx = SSL_CTX_new(SSLv3_client_method());
|
||||||
|
#elif !defined(OPENSSL_NO_SSL2)
|
||||||
|
ctx = SSL_CTX_new(SSLv2_client_method());
|
||||||
|
#else
|
||||||
|
BIO_printf(bio_err, "SSL is disabled\n");
|
||||||
|
goto end;
|
||||||
|
#endif
|
||||||
SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
|
SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
|
||||||
sbio = BIO_new_ssl(ctx, 1);
|
sbio = BIO_new_ssl(ctx, 1);
|
||||||
cbio = BIO_push(sbio, cbio);
|
cbio = BIO_push(sbio, cbio);
|
||||||
@@ -779,6 +812,8 @@ int MAIN(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
BIO_printf(out, "Responder Error: %s (%ld)\n",
|
BIO_printf(out, "Responder Error: %s (%ld)\n",
|
||||||
OCSP_response_status_str(i), i);
|
OCSP_response_status_str(i), i);
|
||||||
|
if (ignore_err)
|
||||||
|
goto redo_accept;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
@@ -806,6 +841,8 @@ int MAIN(int argc, char **argv)
|
|||||||
|
|
||||||
if (!store)
|
if (!store)
|
||||||
store = setup_verify(bio_err, CAfile, CApath);
|
store = setup_verify(bio_err, CAfile, CApath);
|
||||||
|
if (!store)
|
||||||
|
goto end;
|
||||||
if (verify_certfile)
|
if (verify_certfile)
|
||||||
{
|
{
|
||||||
verify_other = load_certs(bio_err, verify_certfile, FORMAT_PEM,
|
verify_other = load_certs(bio_err, verify_certfile, FORMAT_PEM,
|
||||||
@@ -882,7 +919,7 @@ end:
|
|||||||
SSL_CTX_free(ctx);
|
SSL_CTX_free(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
|
static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
|
||||||
@@ -1103,7 +1140,10 @@ static char **lookup_serial(TXT_DB *db, ASN1_INTEGER *ser)
|
|||||||
char *itmp, *row[DB_NUMBER],**rrow;
|
char *itmp, *row[DB_NUMBER],**rrow;
|
||||||
for (i = 0; i < DB_NUMBER; i++) row[i] = NULL;
|
for (i = 0; i < DB_NUMBER; i++) row[i] = NULL;
|
||||||
bn = ASN1_INTEGER_to_BN(ser,NULL);
|
bn = ASN1_INTEGER_to_BN(ser,NULL);
|
||||||
itmp = BN_bn2hex(bn);
|
if (BN_is_zero(bn))
|
||||||
|
itmp = BUF_strdup("00");
|
||||||
|
else
|
||||||
|
itmp = BN_bn2hex(bn);
|
||||||
row[DB_serial] = itmp;
|
row[DB_serial] = itmp;
|
||||||
BN_free(bn);
|
BN_free(bn);
|
||||||
rrow=TXT_DB_get_by_index(db,DB_serial,row);
|
rrow=TXT_DB_get_by_index(db,DB_serial,row);
|
||||||
@@ -1119,7 +1159,11 @@ static BIO *init_responder(char *port)
|
|||||||
bufbio = BIO_new(BIO_f_buffer());
|
bufbio = BIO_new(BIO_f_buffer());
|
||||||
if (!bufbio)
|
if (!bufbio)
|
||||||
goto err;
|
goto err;
|
||||||
|
#ifndef OPENSSL_NO_SOCK
|
||||||
acbio = BIO_new_accept(port);
|
acbio = BIO_new_accept(port);
|
||||||
|
#else
|
||||||
|
BIO_printf(bio_err, "Error setting up accept BIO - sockets not supported.\n");
|
||||||
|
#endif
|
||||||
if (!acbio)
|
if (!acbio)
|
||||||
goto err;
|
goto err;
|
||||||
BIO_set_accept_bios(acbio, bufbio);
|
BIO_set_accept_bios(acbio, bufbio);
|
||||||
@@ -1159,7 +1203,7 @@ static int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, char *port
|
|||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
len = BIO_gets(cbio, inbuf, 1024);
|
len = BIO_gets(cbio, inbuf, sizeof inbuf);
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
return 1;
|
return 1;
|
||||||
/* Look for "POST" signalling start of query */
|
/* Look for "POST" signalling start of query */
|
||||||
@@ -1206,3 +1250,4 @@ static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -114,6 +114,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define OPENSSL_C /* tells apps.h to use complete apps_startup() */
|
#define OPENSSL_C /* tells apps.h to use complete apps_startup() */
|
||||||
|
#include "apps.h"
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/lhash.h>
|
#include <openssl/lhash.h>
|
||||||
@@ -121,9 +122,10 @@
|
|||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
|
#endif
|
||||||
#define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
|
#define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
|
||||||
#include "apps.h"
|
|
||||||
#include "progs.h"
|
#include "progs.h"
|
||||||
#include "s_apps.h"
|
#include "s_apps.h"
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
@@ -139,11 +141,11 @@ static unsigned long MS_CALLBACK hash(const void *a_void);
|
|||||||
static int MS_CALLBACK cmp(const void *a_void,const void *b_void);
|
static int MS_CALLBACK cmp(const void *a_void,const void *b_void);
|
||||||
static LHASH *prog_init(void );
|
static LHASH *prog_init(void );
|
||||||
static int do_cmd(LHASH *prog,int argc,char *argv[]);
|
static int do_cmd(LHASH *prog,int argc,char *argv[]);
|
||||||
CONF *config=NULL;
|
|
||||||
char *default_config_file=NULL;
|
char *default_config_file=NULL;
|
||||||
|
|
||||||
/* Make sure there is only one when MONOLITH is defined */
|
/* Make sure there is only one when MONOLITH is defined */
|
||||||
#ifdef MONOLITH
|
#ifdef MONOLITH
|
||||||
|
CONF *config=NULL;
|
||||||
BIO *bio_err=NULL;
|
BIO *bio_err=NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -161,7 +163,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type < 0 || type > CRYPTO_NUM_LOCKS)
|
if (type < 0 || type >= CRYPTO_NUM_LOCKS)
|
||||||
{
|
{
|
||||||
errstr = "type out of bounds";
|
errstr = "type out of bounds";
|
||||||
goto err;
|
goto err;
|
||||||
@@ -215,10 +217,11 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
|
|||||||
int main(int Argc, char *Argv[])
|
int main(int Argc, char *Argv[])
|
||||||
{
|
{
|
||||||
ARGS arg;
|
ARGS arg;
|
||||||
#define PROG_NAME_SIZE 16
|
#define PROG_NAME_SIZE 39
|
||||||
char pname[PROG_NAME_SIZE];
|
char pname[PROG_NAME_SIZE+1];
|
||||||
FUNCTION f,*fp;
|
FUNCTION f,*fp;
|
||||||
MS_STATIC char *prompt,buf[1024],config_name[256];
|
MS_STATIC char *prompt,buf[1024];
|
||||||
|
char *to_free=NULL;
|
||||||
int n,i,ret=0;
|
int n,i,ret=0;
|
||||||
int argc;
|
int argc;
|
||||||
char **argv,*p;
|
char **argv,*p;
|
||||||
@@ -228,6 +231,10 @@ int main(int Argc, char *Argv[])
|
|||||||
arg.data=NULL;
|
arg.data=NULL;
|
||||||
arg.count=0;
|
arg.count=0;
|
||||||
|
|
||||||
|
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 (getenv("OPENSSL_DEBUG_MEMORY") != NULL) /* if not defined, use compiled-in library defaults */
|
if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) /* if not defined, use compiled-in library defaults */
|
||||||
{
|
{
|
||||||
if (!(0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))
|
if (!(0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))
|
||||||
@@ -252,23 +259,12 @@ int main(int Argc, char *Argv[])
|
|||||||
|
|
||||||
apps_startup();
|
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);
|
|
||||||
|
|
||||||
/* Lets load up our environment a little */
|
/* Lets load up our environment a little */
|
||||||
p=getenv("OPENSSL_CONF");
|
p=getenv("OPENSSL_CONF");
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
p=getenv("SSLEAY_CONF");
|
p=getenv("SSLEAY_CONF");
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
p=to_free=make_config_name();
|
||||||
strcpy(config_name,X509_get_default_cert_area());
|
|
||||||
#ifndef OPENSSL_SYS_VMS
|
|
||||||
strcat(config_name,"/");
|
|
||||||
#endif
|
|
||||||
strcat(config_name,OPENSSL_CONF);
|
|
||||||
p=config_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
default_config_file=p;
|
default_config_file=p;
|
||||||
|
|
||||||
@@ -284,7 +280,7 @@ int main(int Argc, char *Argv[])
|
|||||||
prog=prog_init();
|
prog=prog_init();
|
||||||
|
|
||||||
/* first check the program name */
|
/* first check the program name */
|
||||||
program_name(Argv[0],pname,PROG_NAME_SIZE);
|
program_name(Argv[0],pname,sizeof pname);
|
||||||
|
|
||||||
f.name=pname;
|
f.name=pname;
|
||||||
fp=(FUNCTION *)lh_retrieve(prog,&f);
|
fp=(FUNCTION *)lh_retrieve(prog,&f);
|
||||||
@@ -312,7 +308,7 @@ int main(int Argc, char *Argv[])
|
|||||||
{
|
{
|
||||||
ret=0;
|
ret=0;
|
||||||
p=buf;
|
p=buf;
|
||||||
n=1024;
|
n=sizeof buf;
|
||||||
i=0;
|
i=0;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
@@ -346,6 +342,8 @@ int main(int Argc, char *Argv[])
|
|||||||
BIO_printf(bio_err,"bad exit\n");
|
BIO_printf(bio_err,"bad exit\n");
|
||||||
ret=1;
|
ret=1;
|
||||||
end:
|
end:
|
||||||
|
if (to_free)
|
||||||
|
OPENSSL_free(to_free);
|
||||||
if (config != NULL)
|
if (config != NULL)
|
||||||
{
|
{
|
||||||
NCONF_free(config);
|
NCONF_free(config);
|
||||||
@@ -362,7 +360,7 @@ end:
|
|||||||
BIO_free(bio_err);
|
BIO_free(bio_err);
|
||||||
bio_err=NULL;
|
bio_err=NULL;
|
||||||
}
|
}
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LIST_STANDARD_COMMANDS "list-standard-commands"
|
#define LIST_STANDARD_COMMANDS "list-standard-commands"
|
||||||
|
|||||||
@@ -16,10 +16,9 @@
|
|||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#ifndef OPENSSL_NO_DES
|
#ifndef OPENSSL_NO_DES
|
||||||
# include <openssl/des_old.h>
|
# include <openssl/des.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_MD5CRYPT_1
|
#ifndef NO_MD5CRYPT_1
|
||||||
# include <openssl/evp.h>
|
|
||||||
# include <openssl/md5.h>
|
# include <openssl/md5.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -79,6 +78,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto err;
|
||||||
out = BIO_new(BIO_s_file());
|
out = BIO_new(BIO_s_file());
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -290,7 +292,7 @@ err:
|
|||||||
if (out)
|
if (out)
|
||||||
BIO_free_all(out);
|
BIO_free_all(out);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -479,7 +481,7 @@ static int do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p,
|
|||||||
/* now compute password hash */
|
/* now compute password hash */
|
||||||
#ifndef OPENSSL_NO_DES
|
#ifndef OPENSSL_NO_DES
|
||||||
if (usecrypt)
|
if (usecrypt)
|
||||||
hash = des_crypt(passwd, *salt_p);
|
hash = DES_crypt(passwd, *salt_p);
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_MD5CRYPT_1
|
#ifndef NO_MD5CRYPT_1
|
||||||
if (use1 || useapr1)
|
if (use1 || useapr1)
|
||||||
@@ -503,6 +505,6 @@ err:
|
|||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
fputs("Program not available.\n", stderr)
|
fputs("Program not available.\n", stderr)
|
||||||
EXIT(1);
|
OPENSSL_EXIT(1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -120,13 +120,18 @@ int MAIN(int argc, char **argv)
|
|||||||
char *passin = NULL, *passout = NULL;
|
char *passin = NULL, *passout = NULL;
|
||||||
char *inrand = NULL;
|
char *inrand = NULL;
|
||||||
char *CApath = NULL, *CAfile = NULL;
|
char *CApath = NULL, *CAfile = NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
enc = EVP_des_ede3_cbc();
|
enc = EVP_des_ede3_cbc();
|
||||||
if (bio_err == NULL ) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
|
if (bio_err == NULL ) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
args = argv + 1;
|
args = argv + 1;
|
||||||
|
|
||||||
|
|
||||||
@@ -151,6 +156,11 @@ int MAIN(int argc, char **argv)
|
|||||||
else if (!strcmp (*args, "-idea")) enc=EVP_idea_cbc();
|
else if (!strcmp (*args, "-idea")) enc=EVP_idea_cbc();
|
||||||
#endif
|
#endif
|
||||||
else if (!strcmp (*args, "-des3")) enc = EVP_des_ede3_cbc();
|
else if (!strcmp (*args, "-des3")) enc = EVP_des_ede3_cbc();
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
else if (!strcmp(*args,"-aes128")) enc=EVP_aes_128_cbc();
|
||||||
|
else if (!strcmp(*args,"-aes192")) enc=EVP_aes_192_cbc();
|
||||||
|
else if (!strcmp(*args,"-aes256")) enc=EVP_aes_256_cbc();
|
||||||
|
#endif
|
||||||
else if (!strcmp (*args, "-noiter")) iter = 1;
|
else if (!strcmp (*args, "-noiter")) iter = 1;
|
||||||
else if (!strcmp (*args, "-maciter"))
|
else if (!strcmp (*args, "-maciter"))
|
||||||
maciter = PKCS12_DEFAULT_ITER;
|
maciter = PKCS12_DEFAULT_ITER;
|
||||||
@@ -244,11 +254,13 @@ int MAIN(int argc, char **argv)
|
|||||||
args++;
|
args++;
|
||||||
CAfile = *args;
|
CAfile = *args;
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
} else if (!strcmp(*args,"-engine")) {
|
} else if (!strcmp(*args,"-engine")) {
|
||||||
if (args[1]) {
|
if (args[1]) {
|
||||||
args++;
|
args++;
|
||||||
engine = *args;
|
engine = *args;
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
|
#endif
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
|
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
@@ -279,6 +291,10 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-des3 encrypt private keys with triple DES (default)\n");
|
BIO_printf (bio_err, "-des3 encrypt private keys with triple DES (default)\n");
|
||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
BIO_printf (bio_err, "-idea encrypt private keys with idea\n");
|
BIO_printf (bio_err, "-idea encrypt private keys with idea\n");
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
BIO_printf (bio_err, "-aes128, -aes192, -aes256\n");
|
||||||
|
BIO_printf (bio_err, " encrypt PEM output with cbc aes\n");
|
||||||
#endif
|
#endif
|
||||||
BIO_printf (bio_err, "-nodes don't encrypt private keys\n");
|
BIO_printf (bio_err, "-nodes don't encrypt private keys\n");
|
||||||
BIO_printf (bio_err, "-noiter don't use encryption iteration\n");
|
BIO_printf (bio_err, "-noiter don't use encryption iteration\n");
|
||||||
@@ -292,14 +308,18 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-password p set import/export password source\n");
|
BIO_printf (bio_err, "-password p set import/export password source\n");
|
||||||
BIO_printf (bio_err, "-passin p input file pass phrase source\n");
|
BIO_printf (bio_err, "-passin p input file pass phrase source\n");
|
||||||
BIO_printf (bio_err, "-passout p output file pass phrase source\n");
|
BIO_printf (bio_err, "-passout p output file pass phrase source\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err, " the random number generator\n");
|
BIO_printf(bio_err, " the random number generator\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(passarg) {
|
if(passarg) {
|
||||||
if(export_cert) passargout = passarg;
|
if(export_cert) passargout = passarg;
|
||||||
@@ -387,7 +407,7 @@ int MAIN(int argc, char **argv)
|
|||||||
#ifdef CRYPTO_MDEBUG
|
#ifdef CRYPTO_MDEBUG
|
||||||
CRYPTO_push_info("read MAC password");
|
CRYPTO_push_info("read MAC password");
|
||||||
#endif
|
#endif
|
||||||
if(EVP_read_pw_string (macpass, 50, "Enter MAC Password:", export_cert))
|
if(EVP_read_pw_string (macpass, sizeof macpass, "Enter MAC Password:", export_cert))
|
||||||
{
|
{
|
||||||
BIO_printf (bio_err, "Can't read Password\n");
|
BIO_printf (bio_err, "Can't read Password\n");
|
||||||
goto end;
|
goto end;
|
||||||
@@ -415,7 +435,7 @@ int MAIN(int argc, char **argv)
|
|||||||
CRYPTO_push_info("process -export_cert");
|
CRYPTO_push_info("process -export_cert");
|
||||||
CRYPTO_push_info("reading private key");
|
CRYPTO_push_info("reading private key");
|
||||||
#endif
|
#endif
|
||||||
key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM,
|
key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM, 1,
|
||||||
passin, e, "private key");
|
passin, e, "private key");
|
||||||
if (!key) {
|
if (!key) {
|
||||||
goto export_end;
|
goto export_end;
|
||||||
@@ -496,9 +516,10 @@ int MAIN(int argc, char **argv)
|
|||||||
/* Exclude verified certificate */
|
/* Exclude verified certificate */
|
||||||
for (i = 1; i < sk_X509_num (chain2) ; i++)
|
for (i = 1; i < sk_X509_num (chain2) ; i++)
|
||||||
sk_X509_push(certs, sk_X509_value (chain2, i));
|
sk_X509_push(certs, sk_X509_value (chain2, i));
|
||||||
}
|
/* Free first certificate */
|
||||||
sk_X509_free(chain2);
|
X509_free(sk_X509_value(chain2, 0));
|
||||||
if (vret) {
|
sk_X509_free(chain2);
|
||||||
|
} else {
|
||||||
BIO_printf (bio_err, "Error %s getting chain.\n",
|
BIO_printf (bio_err, "Error %s getting chain.\n",
|
||||||
X509_verify_cert_error_string(vret));
|
X509_verify_cert_error_string(vret));
|
||||||
goto export_end;
|
goto export_end;
|
||||||
@@ -525,8 +546,6 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
sk_X509_pop_free(certs, X509_free);
|
sk_X509_pop_free(certs, X509_free);
|
||||||
certs = NULL;
|
certs = NULL;
|
||||||
/* ucert is part of certs so it is already freed */
|
|
||||||
ucert = NULL;
|
|
||||||
|
|
||||||
#ifdef CRYPTO_MDEBUG
|
#ifdef CRYPTO_MDEBUG
|
||||||
CRYPTO_pop_info();
|
CRYPTO_pop_info();
|
||||||
@@ -534,7 +553,7 @@ int MAIN(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!noprompt &&
|
if(!noprompt &&
|
||||||
EVP_read_pw_string(pass, 50, "Enter Export Password:", 1)) {
|
EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1)) {
|
||||||
BIO_printf (bio_err, "Can't read Password\n");
|
BIO_printf (bio_err, "Can't read Password\n");
|
||||||
goto export_end;
|
goto export_end;
|
||||||
}
|
}
|
||||||
@@ -615,7 +634,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (certs) sk_X509_pop_free(certs, X509_free);
|
if (certs) sk_X509_pop_free(certs, X509_free);
|
||||||
if (safes) sk_PKCS7_pop_free(safes, PKCS7_free);
|
if (safes) sk_PKCS7_pop_free(safes, PKCS7_free);
|
||||||
if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
|
if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
|
||||||
if (ucert) X509_free(ucert);
|
|
||||||
|
|
||||||
#ifdef CRYPTO_MDEBUG
|
#ifdef CRYPTO_MDEBUG
|
||||||
CRYPTO_pop_info();
|
CRYPTO_pop_info();
|
||||||
@@ -632,7 +650,7 @@ int MAIN(int argc, char **argv)
|
|||||||
#ifdef CRYPTO_MDEBUG
|
#ifdef CRYPTO_MDEBUG
|
||||||
CRYPTO_push_info("read import password");
|
CRYPTO_push_info("read import password");
|
||||||
#endif
|
#endif
|
||||||
if(!noprompt && EVP_read_pw_string(pass, 50, "Enter Import Password:", 0)) {
|
if(!noprompt && EVP_read_pw_string(pass, sizeof pass, "Enter Import Password:", 0)) {
|
||||||
BIO_printf (bio_err, "Can't read Password\n");
|
BIO_printf (bio_err, "Can't read Password\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
@@ -686,7 +704,7 @@ int MAIN(int argc, char **argv)
|
|||||||
if(passin) OPENSSL_free(passin);
|
if(passin) OPENSSL_free(passin);
|
||||||
if(passout) OPENSSL_free(passout);
|
if(passout) OPENSSL_free(passout);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
|
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
|
||||||
@@ -767,7 +785,10 @@ int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, char *pass,
|
|||||||
print_attribs (out, bag->attrib, "Bag Attributes");
|
print_attribs (out, bag->attrib, "Bag Attributes");
|
||||||
if (!(p8 = PKCS12_decrypt_skey(bag, pass, passlen)))
|
if (!(p8 = PKCS12_decrypt_skey(bag, pass, passlen)))
|
||||||
return 0;
|
return 0;
|
||||||
if (!(pkey = EVP_PKCS82PKEY (p8))) return 0;
|
if (!(pkey = EVP_PKCS82PKEY (p8))) {
|
||||||
|
PKCS8_PRIV_KEY_INFO_free(p8);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
print_attribs (out, p8->attributes, "Key Attributes");
|
print_attribs (out, p8->attributes, "Key Attributes");
|
||||||
PKCS8_PRIV_KEY_INFO_free(p8);
|
PKCS8_PRIV_KEY_INFO_free(p8);
|
||||||
PEM_write_bio_PrivateKey (out, pkey, enc, NULL, 0, NULL, pempass);
|
PEM_write_bio_PrivateKey (out, pkey, enc, NULL, 0, NULL, pempass);
|
||||||
|
|||||||
14
apps/pkcs7.c
14
apps/pkcs7.c
@@ -82,15 +82,19 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
PKCS7 *p7=NULL;
|
PKCS7 *p7=NULL;
|
||||||
int i,badops=0;
|
int i,badops=0;
|
||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
int informat,outformat;
|
int informat,outformat;
|
||||||
char *infile,*outfile,*prog;
|
char *infile,*outfile,*prog;
|
||||||
int print_certs=0,text=0,noout=0;
|
int print_certs=0,text=0,noout=0;
|
||||||
int ret=0;
|
int ret=1;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -134,11 +138,13 @@ int MAIN(int argc, char **argv)
|
|||||||
text=1;
|
text=1;
|
||||||
else if (strcmp(*argv,"-print_certs") == 0)
|
else if (strcmp(*argv,"-print_certs") == 0)
|
||||||
print_certs=1;
|
print_certs=1;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||||
@@ -161,14 +167,18 @@ bad:
|
|||||||
BIO_printf(bio_err," -print_certs print any certs or crl in the input\n");
|
BIO_printf(bio_err," -print_certs print any certs or crl in the input\n");
|
||||||
BIO_printf(bio_err," -text print full details of certificates\n");
|
BIO_printf(bio_err," -text print full details of certificates\n");
|
||||||
BIO_printf(bio_err," -noout don't output encoded data\n");
|
BIO_printf(bio_err," -noout don't output encoded data\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
ret = 1;
|
ret = 1;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
|
#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());
|
in=BIO_new(BIO_s_file());
|
||||||
out=BIO_new(BIO_s_file());
|
out=BIO_new(BIO_s_file());
|
||||||
@@ -301,5 +311,5 @@ end:
|
|||||||
if (in != NULL) BIO_free(in);
|
if (in != NULL) BIO_free(in);
|
||||||
if (out != NULL) BIO_free_all(out);
|
if (out != NULL) BIO_free_all(out);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|||||||
34
apps/pkcs8.c
34
apps/pkcs8.c
@@ -63,7 +63,6 @@
|
|||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/pkcs12.h>
|
#include <openssl/pkcs12.h>
|
||||||
|
|
||||||
#include "apps.h"
|
|
||||||
#define PROG pkcs8_main
|
#define PROG pkcs8_main
|
||||||
|
|
||||||
int MAIN(int, char **);
|
int MAIN(int, char **);
|
||||||
@@ -83,13 +82,18 @@ int MAIN(int argc, char **argv)
|
|||||||
int nocrypt = 0;
|
int nocrypt = 0;
|
||||||
X509_SIG *p8;
|
X509_SIG *p8;
|
||||||
PKCS8_PRIV_KEY_INFO *p8inf;
|
PKCS8_PRIV_KEY_INFO *p8inf;
|
||||||
EVP_PKEY *pkey;
|
EVP_PKEY *pkey=NULL;
|
||||||
char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
|
char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
|
||||||
int badarg = 0;
|
int badarg = 0;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
|
if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
outformat=FORMAT_PEM;
|
outformat=FORMAT_PEM;
|
||||||
|
|
||||||
@@ -143,11 +147,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (!args[1]) goto bad;
|
if (!args[1]) goto bad;
|
||||||
passargout= *(++args);
|
passargout= *(++args);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*args,"-engine") == 0)
|
else if (strcmp(*args,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (!args[1]) goto bad;
|
if (!args[1]) goto bad;
|
||||||
engine= *(++args);
|
engine= *(++args);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (!strcmp (*args, "-in")) {
|
else if (!strcmp (*args, "-in")) {
|
||||||
if (args[1]) {
|
if (args[1]) {
|
||||||
args++;
|
args++;
|
||||||
@@ -180,11 +186,15 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf(bio_err, "-nocrypt use or expect unencrypted private key\n");
|
BIO_printf(bio_err, "-nocrypt use or expect unencrypted private key\n");
|
||||||
BIO_printf(bio_err, "-v2 alg use PKCS#5 v2.0 and cipher \"alg\"\n");
|
BIO_printf(bio_err, "-v2 alg use PKCS#5 v2.0 and cipher \"alg\"\n");
|
||||||
BIO_printf(bio_err, "-v1 obj use PKCS#5 v1.5 and cipher \"alg\"\n");
|
BIO_printf(bio_err, "-v1 obj use PKCS#5 v1.5 and cipher \"alg\"\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||||
BIO_printf(bio_err, "Error getting passwords\n");
|
BIO_printf(bio_err, "Error getting passwords\n");
|
||||||
@@ -219,12 +229,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (topk8)
|
if (topk8)
|
||||||
{
|
{
|
||||||
BIO_free(in); /* Not needed in this section */
|
BIO_free(in); /* Not needed in this section */
|
||||||
pkey = load_key(bio_err, infile, informat, passin, e, "key");
|
pkey = load_key(bio_err, infile, informat, 1,
|
||||||
|
passin, e, "key");
|
||||||
if (!pkey) {
|
if (!pkey) {
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) {
|
if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) {
|
||||||
BIO_printf(bio_err, "Error converting key\n", outfile);
|
BIO_printf(bio_err, "Error converting key\n");
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
@@ -241,14 +252,14 @@ int MAIN(int argc, char **argv)
|
|||||||
if(passout) p8pass = passout;
|
if(passout) p8pass = passout;
|
||||||
else {
|
else {
|
||||||
p8pass = pass;
|
p8pass = pass;
|
||||||
EVP_read_pw_string(pass, 50, "Enter Encryption Password:", 1);
|
if (EVP_read_pw_string(pass, sizeof pass, "Enter Encryption Password:", 1))
|
||||||
|
return (1);
|
||||||
}
|
}
|
||||||
app_RAND_load_file(NULL, bio_err, 0);
|
app_RAND_load_file(NULL, bio_err, 0);
|
||||||
if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
|
if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
|
||||||
p8pass, strlen(p8pass),
|
p8pass, strlen(p8pass),
|
||||||
NULL, 0, iter, p8inf))) {
|
NULL, 0, iter, p8inf))) {
|
||||||
BIO_printf(bio_err, "Error encrypting key\n",
|
BIO_printf(bio_err, "Error encrypting key\n");
|
||||||
outfile);
|
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
@@ -291,27 +302,27 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!p8) {
|
if (!p8) {
|
||||||
BIO_printf (bio_err, "Error reading key\n", outfile);
|
BIO_printf (bio_err, "Error reading key\n");
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
if(passin) p8pass = passin;
|
if(passin) p8pass = passin;
|
||||||
else {
|
else {
|
||||||
p8pass = pass;
|
p8pass = pass;
|
||||||
EVP_read_pw_string(pass, 50, "Enter Password:", 0);
|
EVP_read_pw_string(pass, sizeof pass, "Enter Password:", 0);
|
||||||
}
|
}
|
||||||
p8inf = PKCS8_decrypt(p8, p8pass, strlen(p8pass));
|
p8inf = PKCS8_decrypt(p8, p8pass, strlen(p8pass));
|
||||||
X509_SIG_free(p8);
|
X509_SIG_free(p8);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p8inf) {
|
if (!p8inf) {
|
||||||
BIO_printf(bio_err, "Error decrypting key\n", outfile);
|
BIO_printf(bio_err, "Error decrypting key\n");
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(pkey = EVP_PKCS82PKEY(p8inf))) {
|
if (!(pkey = EVP_PKCS82PKEY(p8inf))) {
|
||||||
BIO_printf(bio_err, "Error converting key\n", outfile);
|
BIO_printf(bio_err, "Error converting key\n");
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
@@ -347,6 +358,7 @@ int MAIN(int argc, char **argv)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
end:
|
||||||
EVP_PKEY_free(pkey);
|
EVP_PKEY_free(pkey);
|
||||||
BIO_free_all(out);
|
BIO_free_all(out);
|
||||||
BIO_free(in);
|
BIO_free(in);
|
||||||
|
|||||||
14
apps/progs.h
14
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 rsautl_main(int argc,char *argv[]);
|
||||||
extern int dsa_main(int argc,char *argv[]);
|
extern int dsa_main(int argc,char *argv[]);
|
||||||
extern int dsaparam_main(int argc,char *argv[]);
|
extern int dsaparam_main(int argc,char *argv[]);
|
||||||
extern int ecdsa_main(int argc,char *argv[]);
|
|
||||||
extern int ecdsaparam_main(int argc,char *argv[]);
|
|
||||||
extern int x509_main(int argc,char *argv[]);
|
extern int x509_main(int argc,char *argv[]);
|
||||||
extern int genrsa_main(int argc,char *argv[]);
|
extern int genrsa_main(int argc,char *argv[]);
|
||||||
extern int gendsa_main(int argc,char *argv[]);
|
extern int gendsa_main(int argc,char *argv[]);
|
||||||
@@ -37,7 +35,9 @@ extern int pkcs8_main(int argc,char *argv[]);
|
|||||||
extern int spkac_main(int argc,char *argv[]);
|
extern int spkac_main(int argc,char *argv[]);
|
||||||
extern int smime_main(int argc,char *argv[]);
|
extern int smime_main(int argc,char *argv[]);
|
||||||
extern int rand_main(int argc,char *argv[]);
|
extern int rand_main(int argc,char *argv[]);
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
extern int engine_main(int argc,char *argv[]);
|
extern int engine_main(int argc,char *argv[]);
|
||||||
|
#endif
|
||||||
extern int ocsp_main(int argc,char *argv[]);
|
extern int ocsp_main(int argc,char *argv[]);
|
||||||
|
|
||||||
#define FUNC_TYPE_GENERAL 1
|
#define FUNC_TYPE_GENERAL 1
|
||||||
@@ -80,12 +80,6 @@ FUNCTION functions[] = {
|
|||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_DSA
|
#ifndef OPENSSL_NO_DSA
|
||||||
{FUNC_TYPE_GENERAL,"dsaparam",dsaparam_main},
|
{FUNC_TYPE_GENERAL,"dsaparam",dsaparam_main},
|
||||||
#endif
|
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
{FUNC_TYPE_GENERAL,"ecdsa",ecdsa_main},
|
|
||||||
#endif
|
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
{FUNC_TYPE_GENERAL,"ecdsaparam",ecdsaparam_main},
|
|
||||||
#endif
|
#endif
|
||||||
{FUNC_TYPE_GENERAL,"x509",x509_main},
|
{FUNC_TYPE_GENERAL,"x509",x509_main},
|
||||||
#ifndef OPENSSL_NO_RSA
|
#ifndef OPENSSL_NO_RSA
|
||||||
@@ -100,7 +94,9 @@ FUNCTION functions[] = {
|
|||||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
||||||
{FUNC_TYPE_GENERAL,"s_client",s_client_main},
|
{FUNC_TYPE_GENERAL,"s_client",s_client_main},
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_SPEED
|
||||||
{FUNC_TYPE_GENERAL,"speed",speed_main},
|
{FUNC_TYPE_GENERAL,"speed",speed_main},
|
||||||
|
#endif
|
||||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
||||||
{FUNC_TYPE_GENERAL,"s_time",s_time_main},
|
{FUNC_TYPE_GENERAL,"s_time",s_time_main},
|
||||||
#endif
|
#endif
|
||||||
@@ -119,7 +115,9 @@ FUNCTION functions[] = {
|
|||||||
{FUNC_TYPE_GENERAL,"spkac",spkac_main},
|
{FUNC_TYPE_GENERAL,"spkac",spkac_main},
|
||||||
{FUNC_TYPE_GENERAL,"smime",smime_main},
|
{FUNC_TYPE_GENERAL,"smime",smime_main},
|
||||||
{FUNC_TYPE_GENERAL,"rand",rand_main},
|
{FUNC_TYPE_GENERAL,"rand",rand_main},
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
{FUNC_TYPE_GENERAL,"engine",engine_main},
|
{FUNC_TYPE_GENERAL,"engine",engine_main},
|
||||||
|
#endif
|
||||||
{FUNC_TYPE_GENERAL,"ocsp",ocsp_main},
|
{FUNC_TYPE_GENERAL,"ocsp",ocsp_main},
|
||||||
#ifndef OPENSSL_NO_MD2
|
#ifndef OPENSSL_NO_MD2
|
||||||
{FUNC_TYPE_MD,"md2",dgst_main},
|
{FUNC_TYPE_MD,"md2",dgst_main},
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ foreach (@ARGV)
|
|||||||
{ print "#ifndef OPENSSL_NO_RSA\n${str}#endif\n"; }
|
{ print "#ifndef OPENSSL_NO_RSA\n${str}#endif\n"; }
|
||||||
elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/))
|
elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/))
|
||||||
{ print "#ifndef OPENSSL_NO_DSA\n${str}#endif\n"; }
|
{ print "#ifndef OPENSSL_NO_DSA\n${str}#endif\n"; }
|
||||||
elsif ( ($_ =~ /^ecdsa$/) || ($_ =~ /^ecdsaparam$/))
|
|
||||||
{ print "#ifndef OPENSSL_NO_ECDSA\n${str}#endif\n";}
|
|
||||||
elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/) || ($_ =~ /^dhparam$/))
|
elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/) || ($_ =~ /^dhparam$/))
|
||||||
{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
|
{ print "#ifndef OPENSSL_NO_DH\n${str}#endif\n"; }
|
||||||
elsif ( ($_ =~ /^pkcs12$/))
|
elsif ( ($_ =~ /^pkcs12$/))
|
||||||
|
|||||||
15
apps/rand.c
15
apps/rand.c
@@ -76,7 +76,9 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
int i, r, ret = 1;
|
int i, r, ret = 1;
|
||||||
int badopt;
|
int badopt;
|
||||||
char *outfile = NULL;
|
char *outfile = NULL;
|
||||||
@@ -84,7 +86,9 @@ int MAIN(int argc, char **argv)
|
|||||||
int base64 = 0;
|
int base64 = 0;
|
||||||
BIO *out = NULL;
|
BIO *out = NULL;
|
||||||
int num = -1;
|
int num = -1;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -92,6 +96,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err = BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err = BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err, stderr, BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err, stderr, BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto err;
|
||||||
|
|
||||||
badopt = 0;
|
badopt = 0;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (!badopt && argv[++i] != NULL)
|
while (!badopt && argv[++i] != NULL)
|
||||||
@@ -103,6 +110,7 @@ int MAIN(int argc, char **argv)
|
|||||||
else
|
else
|
||||||
badopt = 1;
|
badopt = 1;
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(argv[i], "-engine") == 0)
|
else if (strcmp(argv[i], "-engine") == 0)
|
||||||
{
|
{
|
||||||
if ((argv[i+1] != NULL) && (engine == NULL))
|
if ((argv[i+1] != NULL) && (engine == NULL))
|
||||||
@@ -110,6 +118,7 @@ int MAIN(int argc, char **argv)
|
|||||||
else
|
else
|
||||||
badopt = 1;
|
badopt = 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(argv[i], "-rand") == 0)
|
else if (strcmp(argv[i], "-rand") == 0)
|
||||||
{
|
{
|
||||||
if ((argv[i+1] != NULL) && (inrand == NULL))
|
if ((argv[i+1] != NULL) && (inrand == NULL))
|
||||||
@@ -147,13 +156,17 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf(bio_err, "Usage: rand [options] num\n");
|
BIO_printf(bio_err, "Usage: rand [options] num\n");
|
||||||
BIO_printf(bio_err, "where options are\n");
|
BIO_printf(bio_err, "where options are\n");
|
||||||
BIO_printf(bio_err, "-out file - write to file\n");
|
BIO_printf(bio_err, "-out file - write to file\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err, "-engine e - use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err, "-engine e - use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err, "-base64 - encode output\n");
|
BIO_printf(bio_err, "-base64 - encode output\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
|
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
|
||||||
if (inrand != NULL)
|
if (inrand != NULL)
|
||||||
@@ -210,5 +223,5 @@ err:
|
|||||||
if (out)
|
if (out)
|
||||||
BIO_free_all(out);
|
BIO_free_all(out);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|||||||
243
apps/req.c
243
apps/req.c
@@ -73,6 +73,7 @@
|
|||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
|
#include "../crypto/cryptlib.h"
|
||||||
|
|
||||||
#define SECTION "req"
|
#define SECTION "req"
|
||||||
|
|
||||||
@@ -134,7 +135,6 @@ static int req_check_len(int len,int n_min,int n_max);
|
|||||||
static int check_end(char *str, char *end);
|
static int check_end(char *str, char *end);
|
||||||
#ifndef MONOLITH
|
#ifndef MONOLITH
|
||||||
static char *default_config_file=NULL;
|
static char *default_config_file=NULL;
|
||||||
static CONF *config=NULL;
|
|
||||||
#endif
|
#endif
|
||||||
static CONF *req_conf=NULL;
|
static CONF *req_conf=NULL;
|
||||||
static int batch=0;
|
static int batch=0;
|
||||||
@@ -142,7 +142,6 @@ static int batch=0;
|
|||||||
#define TYPE_RSA 1
|
#define TYPE_RSA 1
|
||||||
#define TYPE_DSA 2
|
#define TYPE_DSA 2
|
||||||
#define TYPE_DH 3
|
#define TYPE_DH 3
|
||||||
#define TYPE_ECDSA 4
|
|
||||||
|
|
||||||
int MAIN(int, char **);
|
int MAIN(int, char **);
|
||||||
|
|
||||||
@@ -152,10 +151,7 @@ int MAIN(int argc, char **argv)
|
|||||||
#ifndef OPENSSL_NO_DSA
|
#ifndef OPENSSL_NO_DSA
|
||||||
DSA *dsa_params=NULL;
|
DSA *dsa_params=NULL;
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
unsigned long nmflag = 0, reqflag = 0;
|
||||||
ECDSA *ecdsa_params = NULL;
|
|
||||||
#endif
|
|
||||||
unsigned long nmflag = 0;
|
|
||||||
int ex=1,x509=0,days=30;
|
int ex=1,x509=0,days=30;
|
||||||
X509 *x509ss=NULL;
|
X509 *x509ss=NULL;
|
||||||
X509_REQ *req=NULL;
|
X509_REQ *req=NULL;
|
||||||
@@ -166,7 +162,9 @@ int MAIN(int argc, char **argv)
|
|||||||
int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
|
int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
|
||||||
int nodes=0,kludge=0,newhdr=0,subject=0,pubkey=0;
|
int nodes=0,kludge=0,newhdr=0,subject=0,pubkey=0;
|
||||||
char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
|
char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
char *extensions = NULL;
|
char *extensions = NULL;
|
||||||
char *req_exts = NULL;
|
char *req_exts = NULL;
|
||||||
const EVP_CIPHER *cipher=NULL;
|
const EVP_CIPHER *cipher=NULL;
|
||||||
@@ -180,7 +178,8 @@ int MAIN(int argc, char **argv)
|
|||||||
const EVP_MD *md_alg=NULL,*digest=EVP_md5();
|
const EVP_MD *md_alg=NULL,*digest=EVP_md5();
|
||||||
unsigned long chtype = MBSTRING_ASC;
|
unsigned long chtype = MBSTRING_ASC;
|
||||||
#ifndef MONOLITH
|
#ifndef MONOLITH
|
||||||
MS_STATIC char config_name[256];
|
char *to_free;
|
||||||
|
long errline;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
req_conf = NULL;
|
req_conf = NULL;
|
||||||
@@ -213,11 +212,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
outformat=str2fmt(*(++argv));
|
outformat=str2fmt(*(++argv));
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-key") == 0)
|
else if (strcmp(*argv,"-key") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -309,7 +310,7 @@ int MAIN(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
dtmp=X509_get_pubkey(xtmp);
|
if ((dtmp=X509_get_pubkey(xtmp)) == NULL) goto end;
|
||||||
if (dtmp->type == EVP_PKEY_DSA)
|
if (dtmp->type == EVP_PKEY_DSA)
|
||||||
dsa_params=DSAparams_dup(dtmp->pkey.dsa);
|
dsa_params=DSAparams_dup(dtmp->pkey.dsa);
|
||||||
EVP_PKEY_free(dtmp);
|
EVP_PKEY_free(dtmp);
|
||||||
@@ -321,63 +322,11 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIO_free(in);
|
BIO_free(in);
|
||||||
in=NULL;
|
|
||||||
newkey=BN_num_bits(dsa_params->p);
|
newkey=BN_num_bits(dsa_params->p);
|
||||||
|
in=NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
if (strncmp("ecdsa:",p,4) == 0)
|
|
||||||
{
|
|
||||||
X509 *xtmp=NULL;
|
|
||||||
EVP_PKEY *dtmp;
|
|
||||||
|
|
||||||
pkey_type=TYPE_ECDSA;
|
|
||||||
p+=6;
|
|
||||||
if ((in=BIO_new_file(p,"r")) == NULL)
|
|
||||||
{
|
|
||||||
perror(p);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if ((ecdsa_params = PEM_read_bio_ECDSAParameters(in, NULL, NULL, NULL)) == NULL)
|
|
||||||
{
|
|
||||||
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 ECDSA parameters from file\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
dtmp=X509_get_pubkey(xtmp);
|
|
||||||
if (dtmp->type == EVP_PKEY_ECDSA)
|
|
||||||
ecdsa_params = ECDSAParameters_dup(dtmp->pkey.ecdsa);
|
|
||||||
EVP_PKEY_free(dtmp);
|
|
||||||
X509_free(xtmp);
|
|
||||||
if (ecdsa_params == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"Certificate does not contain ECDSA parameters\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BIO_free(in);
|
|
||||||
in=NULL;
|
|
||||||
|
|
||||||
{
|
|
||||||
BIGNUM *order = BN_new();
|
|
||||||
|
|
||||||
if (!order)
|
|
||||||
goto end;
|
|
||||||
if (!EC_GROUP_get_order(ecdsa_params->group, order, NULL))
|
|
||||||
goto end;
|
|
||||||
newkey = BN_num_bits(order);
|
|
||||||
BN_free(order);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
#ifndef OPENSSL_NO_DH
|
#ifndef OPENSSL_NO_DH
|
||||||
if (strncmp("dh:",p,4) == 0)
|
if (strncmp("dh:",p,4) == 0)
|
||||||
{
|
{
|
||||||
@@ -411,6 +360,11 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
if (!set_name_ex(&nmflag, *(++argv))) goto bad;
|
if (!set_name_ex(&nmflag, *(++argv))) goto bad;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(*argv,"-reqopt") == 0)
|
||||||
|
{
|
||||||
|
if (--argc < 1) goto bad;
|
||||||
|
if (!set_cert_ex(&reqflag, *(++argv))) goto bad;
|
||||||
|
}
|
||||||
else if (strcmp(*argv,"-subject") == 0)
|
else if (strcmp(*argv,"-subject") == 0)
|
||||||
subject=1;
|
subject=1;
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
else if (strcmp(*argv,"-text") == 0)
|
||||||
@@ -478,7 +432,9 @@ bad:
|
|||||||
BIO_printf(bio_err," -verify verify signature on REQ\n");
|
BIO_printf(bio_err," -verify verify signature on REQ\n");
|
||||||
BIO_printf(bio_err," -modulus RSA modulus\n");
|
BIO_printf(bio_err," -modulus RSA modulus\n");
|
||||||
BIO_printf(bio_err," -nodes don't encrypt the output key\n");
|
BIO_printf(bio_err," -nodes don't encrypt the output key\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device\n");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err," -subject output the request's subject\n");
|
BIO_printf(bio_err," -subject output the request's subject\n");
|
||||||
BIO_printf(bio_err," -passin private key password source\n");
|
BIO_printf(bio_err," -passin private key password source\n");
|
||||||
BIO_printf(bio_err," -key file use the private key contained in file\n");
|
BIO_printf(bio_err," -key file use the private key contained in file\n");
|
||||||
@@ -489,7 +445,6 @@ bad:
|
|||||||
BIO_printf(bio_err," the random number generator\n");
|
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 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");
|
BIO_printf(bio_err," -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'\n");
|
||||||
BIO_printf(bio_err," -newkey ecdsa:file generate a new ECDSA key, parameters taken from CA in 'file'\n");
|
|
||||||
BIO_printf(bio_err," -[digest] Digest to sign with (md5, sha1, md2, mdc2, md4)\n");
|
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," -config file request template file.\n");
|
||||||
BIO_printf(bio_err," -subj arg set or modify request subject\n");
|
BIO_printf(bio_err," -subj arg set or modify request subject\n");
|
||||||
@@ -504,6 +459,8 @@ bad:
|
|||||||
BIO_printf(bio_err," -extensions .. specify certificate extension section (override value in config file)\n");
|
BIO_printf(bio_err," -extensions .. specify certificate extension section (override value in config file)\n");
|
||||||
BIO_printf(bio_err," -reqexts .. specify request extension section (override value in config file)\n");
|
BIO_printf(bio_err," -reqexts .. specify request extension section (override value in config file)\n");
|
||||||
BIO_printf(bio_err," -utf8 input characters are UTF8 (default ASCII)\n");
|
BIO_printf(bio_err," -utf8 input characters are UTF8 (default ASCII)\n");
|
||||||
|
BIO_printf(bio_err," -nameopt arg - various certificate name options\n");
|
||||||
|
BIO_printf(bio_err," -reqopt arg - various request text options\n\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,22 +476,15 @@ bad:
|
|||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
p=getenv("SSLEAY_CONF");
|
p=getenv("SSLEAY_CONF");
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
p=to_free=make_config_name();
|
||||||
strcpy(config_name,X509_get_default_cert_area());
|
|
||||||
#ifndef OPENSSL_SYS_VMS
|
|
||||||
strcat(config_name,"/");
|
|
||||||
#endif
|
|
||||||
strcat(config_name,OPENSSL_CONF);
|
|
||||||
p=config_name;
|
|
||||||
}
|
|
||||||
default_config_file=p;
|
default_config_file=p;
|
||||||
config=NCONF_new(NULL);
|
config=NCONF_new(NULL);
|
||||||
i=NCONF_load(config, p);
|
i=NCONF_load(config, p, &errline);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (template != NULL)
|
if (template != NULL)
|
||||||
{
|
{
|
||||||
long errline;
|
long errline = -1;
|
||||||
|
|
||||||
if( verbose )
|
if( verbose )
|
||||||
BIO_printf(bio_err,"Using configuration from %s\n",template);
|
BIO_printf(bio_err,"Using configuration from %s\n",template);
|
||||||
@@ -560,6 +510,8 @@ bad:
|
|||||||
|
|
||||||
if (req_conf != NULL)
|
if (req_conf != NULL)
|
||||||
{
|
{
|
||||||
|
if (!load_config(bio_err, req_conf))
|
||||||
|
goto end;
|
||||||
p=NCONF_get_string(req_conf,NULL,"oid_file");
|
p=NCONF_get_string(req_conf,NULL,"oid_file");
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
ERR_clear_error();
|
ERR_clear_error();
|
||||||
@@ -671,11 +623,13 @@ bad:
|
|||||||
if ((in == NULL) || (out == NULL))
|
if ((in == NULL) || (out == NULL))
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (keyfile != NULL)
|
if (keyfile != NULL)
|
||||||
{
|
{
|
||||||
pkey = load_key(bio_err, keyfile, keyform, passin, e,
|
pkey = load_key(bio_err, keyfile, keyform, 0, passin, e,
|
||||||
"Private Key");
|
"Private Key");
|
||||||
if (!pkey)
|
if (!pkey)
|
||||||
{
|
{
|
||||||
@@ -683,7 +637,7 @@ bad:
|
|||||||
message */
|
message */
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA || EVP_PKEY_type(pkey->type) == EVP_PKEY_ECDSA)
|
if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA)
|
||||||
{
|
{
|
||||||
char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
|
char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE");
|
||||||
if (randfile == NULL)
|
if (randfile == NULL)
|
||||||
@@ -707,15 +661,14 @@ bad:
|
|||||||
newkey=DEFAULT_KEY_LENGTH;
|
newkey=DEFAULT_KEY_LENGTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newkey < MIN_KEY_LENGTH && (pkey_type == TYPE_RSA || pkey_type == TYPE_DSA))
|
if (newkey < MIN_KEY_LENGTH)
|
||||||
/* TODO: appropriate minimal keylength for the different algorithm (esp. ECDSA) */
|
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"private key length is too short,\n");
|
BIO_printf(bio_err,"private key length is too short,\n");
|
||||||
BIO_printf(bio_err,"it needs to be at least %d bits, not %d\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;
|
goto end;
|
||||||
}
|
}
|
||||||
BIO_printf(bio_err,"Generating a %d bit %s private key\n",
|
BIO_printf(bio_err,"Generating a %d bit %s private key\n",
|
||||||
newkey,(pkey_type == TYPE_RSA)?"RSA":(pkey_type == TYPE_DSA)?"DSA":"ECDSA");
|
newkey,(pkey_type == TYPE_RSA)?"RSA":"DSA");
|
||||||
|
|
||||||
if ((pkey=EVP_PKEY_new()) == NULL) goto end;
|
if ((pkey=EVP_PKEY_new()) == NULL) goto end;
|
||||||
|
|
||||||
@@ -737,14 +690,6 @@ bad:
|
|||||||
dsa_params=NULL;
|
dsa_params=NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
if (pkey_type == TYPE_ECDSA)
|
|
||||||
{
|
|
||||||
if (!ECDSA_generate_key(ecdsa_params)) goto end;
|
|
||||||
if (!EVP_PKEY_assign_ECDSA(pkey, ecdsa_params)) goto end;
|
|
||||||
ecdsa_params = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
app_RAND_write_file(randfile, bio_err);
|
app_RAND_write_file(randfile, bio_err);
|
||||||
|
|
||||||
@@ -850,10 +795,6 @@ loop:
|
|||||||
#ifndef OPENSSL_NO_DSA
|
#ifndef OPENSSL_NO_DSA
|
||||||
if (pkey->type == EVP_PKEY_DSA)
|
if (pkey->type == EVP_PKEY_DSA)
|
||||||
digest=EVP_dss1();
|
digest=EVP_dss1();
|
||||||
#endif
|
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
if (pkey->type == EVP_PKEY_ECDSA)
|
|
||||||
digest=EVP_ecdsa();
|
|
||||||
#endif
|
#endif
|
||||||
if (req == NULL)
|
if (req == NULL)
|
||||||
{
|
{
|
||||||
@@ -885,19 +826,20 @@ loop:
|
|||||||
/* Set version to V3 */
|
/* Set version to V3 */
|
||||||
if(!X509_set_version(x509ss, 2)) goto end;
|
if(!X509_set_version(x509ss, 2)) goto end;
|
||||||
if (serial)
|
if (serial)
|
||||||
X509_set_serialNumber(x509ss, serial);
|
{
|
||||||
|
if (!X509_set_serialNumber(x509ss, serial)) goto end;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ASN1_INTEGER_set(X509_get_serialNumber(x509ss),0L);
|
{
|
||||||
|
if (!ASN1_INTEGER_set(X509_get_serialNumber(x509ss),0L)) goto end;
|
||||||
|
}
|
||||||
|
|
||||||
X509_set_issuer_name(x509ss,
|
if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req))) goto end;
|
||||||
X509_REQ_get_subject_name(req));
|
if (!X509_gmtime_adj(X509_get_notBefore(x509ss),0)) goto end;
|
||||||
X509_gmtime_adj(X509_get_notBefore(x509ss),0);
|
if (!X509_gmtime_adj(X509_get_notAfter(x509ss), (long)60*60*24*days)) goto end;
|
||||||
X509_gmtime_adj(X509_get_notAfter(x509ss),
|
if (!X509_set_subject_name(x509ss, X509_REQ_get_subject_name(req))) goto end;
|
||||||
(long)60*60*24*days);
|
|
||||||
X509_set_subject_name(x509ss,
|
|
||||||
X509_REQ_get_subject_name(req));
|
|
||||||
tmppkey = X509_REQ_get_pubkey(req);
|
tmppkey = X509_REQ_get_pubkey(req);
|
||||||
X509_set_pubkey(x509ss,tmppkey);
|
if (!tmppkey || !X509_set_pubkey(x509ss,tmppkey)) goto end;
|
||||||
EVP_PKEY_free(tmppkey);
|
EVP_PKEY_free(tmppkey);
|
||||||
|
|
||||||
/* Set up V3 context struct */
|
/* Set up V3 context struct */
|
||||||
@@ -1046,9 +988,9 @@ loop:
|
|||||||
if (text)
|
if (text)
|
||||||
{
|
{
|
||||||
if (x509)
|
if (x509)
|
||||||
X509_print(out,x509ss);
|
X509_print_ex(out, x509ss, nmflag, reqflag);
|
||||||
else
|
else
|
||||||
X509_REQ_print(out,req);
|
X509_REQ_print_ex(out, req, nmflag, reqflag);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(subject)
|
if(subject)
|
||||||
@@ -1118,6 +1060,10 @@ loop:
|
|||||||
}
|
}
|
||||||
ex=0;
|
ex=0;
|
||||||
end:
|
end:
|
||||||
|
#ifndef MONOLITH
|
||||||
|
if(to_free)
|
||||||
|
OPENSSL_free(to_free);
|
||||||
|
#endif
|
||||||
if (ex)
|
if (ex)
|
||||||
{
|
{
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
@@ -1134,12 +1080,9 @@ end:
|
|||||||
OBJ_cleanup();
|
OBJ_cleanup();
|
||||||
#ifndef OPENSSL_NO_DSA
|
#ifndef OPENSSL_NO_DSA
|
||||||
if (dsa_params != NULL) DSA_free(dsa_params);
|
if (dsa_params != NULL) DSA_free(dsa_params);
|
||||||
#endif
|
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
if (ecdsa_params != NULL) ECDSA_free(ecdsa_params);
|
|
||||||
#endif
|
#endif
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ex);
|
OPENSSL_EXIT(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int attribs,
|
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int attribs,
|
||||||
@@ -1199,71 +1142,29 @@ static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int attribs,
|
|||||||
}
|
}
|
||||||
if(!i) goto err;
|
if(!i) goto err;
|
||||||
|
|
||||||
X509_REQ_set_pubkey(req,pkey);
|
if (!X509_REQ_set_pubkey(req,pkey)) goto err;
|
||||||
|
|
||||||
ret=1;
|
ret=1;
|
||||||
err:
|
err:
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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)
|
static int build_subject(X509_REQ *req, char *subject, unsigned long chtype)
|
||||||
{
|
{
|
||||||
X509_NAME *n = NULL;
|
X509_NAME *n;
|
||||||
|
|
||||||
int i, nid, ne_num=0;
|
if (!(n = do_subject(subject, chtype)))
|
||||||
|
return 0;
|
||||||
char *ne_name = NULL;
|
|
||||||
char *ne_value = NULL;
|
|
||||||
|
|
||||||
char *tmp = NULL;
|
|
||||||
char *p[2];
|
|
||||||
|
|
||||||
char *str_list[256];
|
|
||||||
|
|
||||||
p[0] = ",/";
|
|
||||||
p[1] = "=";
|
|
||||||
|
|
||||||
n = X509_NAME_new();
|
|
||||||
|
|
||||||
tmp = strtok(subject, p[0]);
|
|
||||||
while((tmp != NULL) && (ne_num < (sizeof str_list/sizeof *str_list)))
|
|
||||||
{
|
|
||||||
char *token = tmp;
|
|
||||||
|
|
||||||
while (token[0] == ' ')
|
|
||||||
token++;
|
|
||||||
str_list[ne_num] = token;
|
|
||||||
|
|
||||||
tmp = strtok(NULL, p[0]);
|
|
||||||
ne_num++;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i = 0; i < ne_num; i++)
|
|
||||||
{
|
|
||||||
ne_name = strtok(str_list[i], p[1]);
|
|
||||||
ne_value = strtok(NULL, p[1]);
|
|
||||||
|
|
||||||
if ((nid=OBJ_txt2nid(ne_name)) == NID_undef)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err, "Subject Attribute %s has no known NID, skipped\n", ne_name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ne_value == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err, "No value provided for Subject Attribute %s, skipped\n", ne_name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!X509_NAME_add_entry_by_NID(n, nid, chtype, (unsigned char*)ne_value, -1,-1,0))
|
|
||||||
{
|
|
||||||
X509_NAME_free(n);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!X509_REQ_set_subject_name(req, n))
|
if (!X509_REQ_set_subject_name(req, n))
|
||||||
|
{
|
||||||
|
X509_NAME_free(n);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
X509_NAME_free(n);
|
X509_NAME_free(n);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1322,13 +1223,19 @@ start: for (;;)
|
|||||||
}
|
}
|
||||||
/* If OBJ not recognised ignore it */
|
/* If OBJ not recognised ignore it */
|
||||||
if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
|
if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
|
||||||
|
|
||||||
|
if(strlen(v->name) > sizeof buf-9)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"Name '%s' too long\n",v->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
sprintf(buf,"%s_default",v->name);
|
sprintf(buf,"%s_default",v->name);
|
||||||
if ((def=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
|
if ((def=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
|
||||||
{
|
{
|
||||||
ERR_clear_error();
|
ERR_clear_error();
|
||||||
def="";
|
def="";
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(buf,"%s_value",v->name);
|
sprintf(buf,"%s_value",v->name);
|
||||||
if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
|
if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
|
||||||
{
|
{
|
||||||
@@ -1338,11 +1245,17 @@ start: for (;;)
|
|||||||
|
|
||||||
sprintf(buf,"%s_min",v->name);
|
sprintf(buf,"%s_min",v->name);
|
||||||
if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min))
|
if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min))
|
||||||
|
{
|
||||||
|
ERR_clear_error();
|
||||||
n_min = -1;
|
n_min = -1;
|
||||||
|
}
|
||||||
|
|
||||||
sprintf(buf,"%s_max",v->name);
|
sprintf(buf,"%s_max",v->name);
|
||||||
if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max))
|
if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max))
|
||||||
|
{
|
||||||
|
ERR_clear_error();
|
||||||
n_max = -1;
|
n_max = -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!add_DN_object(subj,v->value,def,value,nid,
|
if (!add_DN_object(subj,v->value,def,value,nid,
|
||||||
n_min,n_max, chtype))
|
n_min,n_max, chtype))
|
||||||
@@ -1375,6 +1288,12 @@ start2: for (;;)
|
|||||||
if ((nid=OBJ_txt2nid(type)) == NID_undef)
|
if ((nid=OBJ_txt2nid(type)) == NID_undef)
|
||||||
goto start2;
|
goto start2;
|
||||||
|
|
||||||
|
if(strlen(v->name) > sizeof buf-9)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"Name '%s' too long\n",v->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
sprintf(buf,"%s_default",type);
|
sprintf(buf,"%s_default",type);
|
||||||
if ((def=NCONF_get_string(req_conf,attr_sect,buf))
|
if ((def=NCONF_get_string(req_conf,attr_sect,buf))
|
||||||
== NULL)
|
== NULL)
|
||||||
@@ -1478,6 +1397,7 @@ start:
|
|||||||
(void)BIO_flush(bio_err);
|
(void)BIO_flush(bio_err);
|
||||||
if(value != NULL)
|
if(value != NULL)
|
||||||
{
|
{
|
||||||
|
OPENSSL_assert(strlen(value) < sizeof buf-2);
|
||||||
strcpy(buf,value);
|
strcpy(buf,value);
|
||||||
strcat(buf,"\n");
|
strcat(buf,"\n");
|
||||||
BIO_printf(bio_err,"%s\n",value);
|
BIO_printf(bio_err,"%s\n",value);
|
||||||
@@ -1487,7 +1407,7 @@ start:
|
|||||||
buf[0]='\0';
|
buf[0]='\0';
|
||||||
if (!batch)
|
if (!batch)
|
||||||
{
|
{
|
||||||
fgets(buf,1024,stdin);
|
fgets(buf,sizeof buf,stdin);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1536,6 +1456,7 @@ start:
|
|||||||
(void)BIO_flush(bio_err);
|
(void)BIO_flush(bio_err);
|
||||||
if (value != NULL)
|
if (value != NULL)
|
||||||
{
|
{
|
||||||
|
OPENSSL_assert(strlen(value) < sizeof buf-2);
|
||||||
strcpy(buf,value);
|
strcpy(buf,value);
|
||||||
strcat(buf,"\n");
|
strcat(buf,"\n");
|
||||||
BIO_printf(bio_err,"%s\n",value);
|
BIO_printf(bio_err,"%s\n",value);
|
||||||
@@ -1545,7 +1466,7 @@ start:
|
|||||||
buf[0]='\0';
|
buf[0]='\0';
|
||||||
if (!batch)
|
if (!batch)
|
||||||
{
|
{
|
||||||
fgets(buf,1024,stdin);
|
fgets(buf,sizeof buf,stdin);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
24
apps/rsa.c
24
apps/rsa.c
@@ -79,6 +79,9 @@
|
|||||||
* -des - encrypt output if PEM format with DES in cbc mode
|
* -des - encrypt output if PEM format with DES in cbc mode
|
||||||
* -des3 - encrypt output if PEM format
|
* -des3 - encrypt output if PEM format
|
||||||
* -idea - encrypt output if PEM format
|
* -idea - encrypt output if PEM format
|
||||||
|
* -aes128 - encrypt output if PEM format
|
||||||
|
* -aes192 - encrypt output if PEM format
|
||||||
|
* -aes256 - encrypt output if PEM format
|
||||||
* -text - print a text version
|
* -text - print a text version
|
||||||
* -modulus - print the RSA key modulus
|
* -modulus - print the RSA key modulus
|
||||||
* -check - verify key consistency
|
* -check - verify key consistency
|
||||||
@@ -101,7 +104,9 @@ int MAIN(int argc, char **argv)
|
|||||||
char *infile,*outfile,*prog;
|
char *infile,*outfile,*prog;
|
||||||
char *passargin = NULL, *passargout = NULL;
|
char *passargin = NULL, *passargout = NULL;
|
||||||
char *passin = NULL, *passout = NULL;
|
char *passin = NULL, *passout = NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
int modulus=0;
|
int modulus=0;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
@@ -110,6 +115,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
infile=NULL;
|
infile=NULL;
|
||||||
outfile=NULL;
|
outfile=NULL;
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
@@ -150,11 +158,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
passargout= *(++argv);
|
passargout= *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-sgckey") == 0)
|
else if (strcmp(*argv,"-sgckey") == 0)
|
||||||
sgckey=1;
|
sgckey=1;
|
||||||
else if (strcmp(*argv,"-pubin") == 0)
|
else if (strcmp(*argv,"-pubin") == 0)
|
||||||
@@ -195,6 +205,10 @@ bad:
|
|||||||
BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
|
BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
|
||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
BIO_printf(bio_err," -idea encrypt PEM output with cbc idea\n");
|
BIO_printf(bio_err," -idea encrypt PEM output with cbc idea\n");
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
|
||||||
|
BIO_printf(bio_err," encrypt PEM output with cbc aes\n");
|
||||||
#endif
|
#endif
|
||||||
BIO_printf(bio_err," -text print the key in text\n");
|
BIO_printf(bio_err," -text print the key in text\n");
|
||||||
BIO_printf(bio_err," -noout don't print key out\n");
|
BIO_printf(bio_err," -noout don't print key out\n");
|
||||||
@@ -202,13 +216,17 @@ bad:
|
|||||||
BIO_printf(bio_err," -check verify key consistency\n");
|
BIO_printf(bio_err," -check verify key consistency\n");
|
||||||
BIO_printf(bio_err," -pubin expect a public key in input file\n");
|
BIO_printf(bio_err," -pubin expect a public key in input file\n");
|
||||||
BIO_printf(bio_err," -pubout output a public key\n");
|
BIO_printf(bio_err," -pubout output a public key\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||||
BIO_printf(bio_err, "Error getting passwords\n");
|
BIO_printf(bio_err, "Error getting passwords\n");
|
||||||
@@ -228,12 +246,12 @@ bad:
|
|||||||
if (pubin)
|
if (pubin)
|
||||||
pkey = load_pubkey(bio_err, infile,
|
pkey = load_pubkey(bio_err, infile,
|
||||||
(informat == FORMAT_NETSCAPE && sgckey ?
|
(informat == FORMAT_NETSCAPE && sgckey ?
|
||||||
FORMAT_IISSGC : informat),
|
FORMAT_IISSGC : informat), 1,
|
||||||
passin, e, "Public Key");
|
passin, e, "Public Key");
|
||||||
else
|
else
|
||||||
pkey = load_key(bio_err, infile,
|
pkey = load_key(bio_err, infile,
|
||||||
(informat == FORMAT_NETSCAPE && sgckey ?
|
(informat == FORMAT_NETSCAPE && sgckey ?
|
||||||
FORMAT_IISSGC : informat),
|
FORMAT_IISSGC : informat), 1,
|
||||||
passin, e, "Private Key");
|
passin, e, "Private Key");
|
||||||
|
|
||||||
if (pkey != NULL)
|
if (pkey != NULL)
|
||||||
@@ -359,7 +377,7 @@ end:
|
|||||||
if(passin) OPENSSL_free(passin);
|
if(passin) OPENSSL_free(passin);
|
||||||
if(passout) OPENSSL_free(passout);
|
if(passout) OPENSSL_free(passout);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
#else /* !OPENSSL_NO_RSA */
|
#else /* !OPENSSL_NO_RSA */
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,9 @@ int MAIN(int argc, char **argv)
|
|||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
BIO *in = NULL, *out = NULL;
|
BIO *in = NULL, *out = NULL;
|
||||||
char *infile = NULL, *outfile = NULL;
|
char *infile = NULL, *outfile = NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine = NULL;
|
char *engine = NULL;
|
||||||
|
#endif
|
||||||
char *keyfile = NULL;
|
char *keyfile = NULL;
|
||||||
char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY;
|
char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY;
|
||||||
int keyform = FORMAT_PEM;
|
int keyform = FORMAT_PEM;
|
||||||
@@ -104,6 +106,9 @@ int MAIN(int argc, char **argv)
|
|||||||
argv++;
|
argv++;
|
||||||
|
|
||||||
if(!bio_err) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
|
if(!bio_err) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
OpenSSL_add_all_algorithms();
|
OpenSSL_add_all_algorithms();
|
||||||
pad = RSA_PKCS1_PADDING;
|
pad = RSA_PKCS1_PADDING;
|
||||||
@@ -122,9 +127,11 @@ int MAIN(int argc, char **argv)
|
|||||||
} else if (strcmp(*argv,"-keyform") == 0) {
|
} else if (strcmp(*argv,"-keyform") == 0) {
|
||||||
if (--argc < 1) badarg = 1;
|
if (--argc < 1) badarg = 1;
|
||||||
keyform=str2fmt(*(++argv));
|
keyform=str2fmt(*(++argv));
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
} else if(!strcmp(*argv, "-engine")) {
|
} else if(!strcmp(*argv, "-engine")) {
|
||||||
if (--argc < 1) badarg = 1;
|
if (--argc < 1) badarg = 1;
|
||||||
engine = *(++argv);
|
engine = *(++argv);
|
||||||
|
#endif
|
||||||
} else if(!strcmp(*argv, "-pubin")) {
|
} else if(!strcmp(*argv, "-pubin")) {
|
||||||
key_type = KEY_PUBKEY;
|
key_type = KEY_PUBKEY;
|
||||||
} else if(!strcmp(*argv, "-certin")) {
|
} else if(!strcmp(*argv, "-certin")) {
|
||||||
@@ -159,19 +166,21 @@ int MAIN(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FIXME: seed PRNG only if needed */
|
/* FIXME: seed PRNG only if needed */
|
||||||
app_RAND_load_file(NULL, bio_err, 0);
|
app_RAND_load_file(NULL, bio_err, 0);
|
||||||
|
|
||||||
switch(key_type) {
|
switch(key_type) {
|
||||||
case KEY_PRIVKEY:
|
case KEY_PRIVKEY:
|
||||||
pkey = load_key(bio_err, keyfile, keyform,
|
pkey = load_key(bio_err, keyfile, keyform, 0,
|
||||||
NULL, e, "Private Key");
|
NULL, e, "Private Key");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_PUBKEY:
|
case KEY_PUBKEY:
|
||||||
pkey = load_pubkey(bio_err, keyfile, keyform,
|
pkey = load_pubkey(bio_err, keyfile, keyform, 0,
|
||||||
NULL, e, "Public Key");
|
NULL, e, "Public Key");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -302,7 +311,9 @@ static void usage()
|
|||||||
BIO_printf(bio_err, "-encrypt encrypt with public key\n");
|
BIO_printf(bio_err, "-encrypt encrypt with public key\n");
|
||||||
BIO_printf(bio_err, "-decrypt decrypt with private key\n");
|
BIO_printf(bio_err, "-decrypt decrypt with private key\n");
|
||||||
BIO_printf(bio_err, "-hexdump hex dump output\n");
|
BIO_printf(bio_err, "-hexdump hex dump output\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,6 +112,14 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
|
|
||||||
|
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||||
|
#include <conio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef OPENSSL_SYS_MSDOS
|
||||||
|
#define _kbhit kbhit
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
|
#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
|
||||||
/* VAX C does not defined fd_set and friends, but it's actually quite simple */
|
/* VAX C does not defined fd_set and friends, but it's actually quite simple */
|
||||||
/* These definitions are borrowed from SOCKETSHR. /Richard Levitte */
|
/* These definitions are borrowed from SOCKETSHR. /Richard Levitte */
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
|
|||||||
err= X509_STORE_CTX_get_error(ctx);
|
err= X509_STORE_CTX_get_error(ctx);
|
||||||
depth= X509_STORE_CTX_get_error_depth(ctx);
|
depth= X509_STORE_CTX_get_error_depth(ctx);
|
||||||
|
|
||||||
X509_NAME_oneline(X509_get_subject_name(err_cert),buf,256);
|
X509_NAME_oneline(X509_get_subject_name(err_cert),buf,sizeof buf);
|
||||||
BIO_printf(bio_err,"depth=%d %s\n",depth,buf);
|
BIO_printf(bio_err,"depth=%d %s\n",depth,buf);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
@@ -154,7 +154,7 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
|
|||||||
switch (ctx->error)
|
switch (ctx->error)
|
||||||
{
|
{
|
||||||
case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
|
case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
|
||||||
X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert),buf,256);
|
X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert),buf,sizeof buf);
|
||||||
BIO_printf(bio_err,"issuer= %s\n",buf);
|
BIO_printf(bio_err,"issuer= %s\n",buf);
|
||||||
break;
|
break;
|
||||||
case X509_V_ERR_CERT_NOT_YET_VALID:
|
case X509_V_ERR_CERT_NOT_YET_VALID:
|
||||||
|
|||||||
@@ -136,8 +136,12 @@ typedef unsigned int u_int;
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include "s_apps.h"
|
#include "s_apps.h"
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#ifdef OPENSSL_SYS_WINCE
|
||||||
#include <conio.h>
|
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
|
||||||
|
#ifdef fileno
|
||||||
|
#undef fileno
|
||||||
|
#endif
|
||||||
|
#define fileno(a) (int)_fileno(a)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -213,8 +217,10 @@ static void sc_usage(void)
|
|||||||
BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n");
|
BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n");
|
||||||
BIO_printf(bio_err," for those protocols that support it, where\n");
|
BIO_printf(bio_err," for those protocols that support it, where\n");
|
||||||
BIO_printf(bio_err," 'prot' defines which one to assume. Currently,\n");
|
BIO_printf(bio_err," 'prot' defines which one to assume. Currently,\n");
|
||||||
BIO_printf(bio_err," only \"smtp\" is supported.\n");
|
BIO_printf(bio_err," only \"smtp\" and \"pop3\" are supported.\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
|
BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -241,14 +247,16 @@ int MAIN(int argc, char **argv)
|
|||||||
int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending;
|
int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending;
|
||||||
SSL_CTX *ctx=NULL;
|
SSL_CTX *ctx=NULL;
|
||||||
int ret=1,in_init=1,i,nbio_test=0;
|
int ret=1,in_init=1,i,nbio_test=0;
|
||||||
int smtp_starttls = 0;
|
int starttls_proto = 0;
|
||||||
int prexit = 0, vflags = 0;
|
int prexit = 0, vflags = 0;
|
||||||
SSL_METHOD *meth=NULL;
|
SSL_METHOD *meth=NULL;
|
||||||
BIO *sbio;
|
BIO *sbio;
|
||||||
char *inrand=NULL;
|
char *inrand=NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine_id=NULL;
|
char *engine_id=NULL;
|
||||||
ENGINE *e=NULL;
|
ENGINE *e=NULL;
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#endif
|
||||||
|
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -271,6 +279,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
if ( ((cbuf=OPENSSL_malloc(BUFSIZZ)) == NULL) ||
|
if ( ((cbuf=OPENSSL_malloc(BUFSIZZ)) == NULL) ||
|
||||||
((sbuf=OPENSSL_malloc(BUFSIZZ)) == NULL) ||
|
((sbuf=OPENSSL_malloc(BUFSIZZ)) == NULL) ||
|
||||||
((mbuf=OPENSSL_malloc(BUFSIZZ)) == NULL))
|
((mbuf=OPENSSL_malloc(BUFSIZZ)) == NULL))
|
||||||
@@ -400,15 +411,19 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
++argv;
|
++argv;
|
||||||
if (strcmp(*argv,"smtp") == 0)
|
if (strcmp(*argv,"smtp") == 0)
|
||||||
smtp_starttls = 1;
|
starttls_proto = 1;
|
||||||
|
else if (strcmp(*argv,"pop3") == 0)
|
||||||
|
starttls_proto = 2;
|
||||||
else
|
else
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine_id = *(++argv);
|
engine_id = *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-rand") == 0)
|
else if (strcmp(*argv,"-rand") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -430,6 +445,13 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OpenSSL_add_ssl_algorithms();
|
||||||
|
SSL_load_error_strings();
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
e = setup_engine(bio_err, engine_id, 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
|
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
|
||||||
&& !RAND_status())
|
&& !RAND_status())
|
||||||
{
|
{
|
||||||
@@ -452,11 +474,6 @@ bad:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenSSL_add_ssl_algorithms();
|
|
||||||
SSL_load_error_strings();
|
|
||||||
|
|
||||||
e = setup_engine(bio_err, engine_id, 1);
|
|
||||||
|
|
||||||
ctx=SSL_CTX_new(meth);
|
ctx=SSL_CTX_new(meth);
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
{
|
{
|
||||||
@@ -568,12 +585,18 @@ re_start:
|
|||||||
sbuf_off=0;
|
sbuf_off=0;
|
||||||
|
|
||||||
/* This is an ugly hack that does a lot of assumptions */
|
/* This is an ugly hack that does a lot of assumptions */
|
||||||
if (smtp_starttls)
|
if (starttls_proto == 1)
|
||||||
{
|
{
|
||||||
BIO_read(sbio,mbuf,BUFSIZZ);
|
BIO_read(sbio,mbuf,BUFSIZZ);
|
||||||
BIO_printf(sbio,"STARTTLS\r\n");
|
BIO_printf(sbio,"STARTTLS\r\n");
|
||||||
BIO_read(sbio,sbuf,BUFSIZZ);
|
BIO_read(sbio,sbuf,BUFSIZZ);
|
||||||
}
|
}
|
||||||
|
if (starttls_proto == 2)
|
||||||
|
{
|
||||||
|
BIO_read(sbio,mbuf,BUFSIZZ);
|
||||||
|
BIO_printf(sbio,"STLS\r\n");
|
||||||
|
BIO_read(sbio,sbuf,BUFSIZZ);
|
||||||
|
}
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
@@ -594,11 +617,11 @@ re_start:
|
|||||||
print_stuff(bio_c_out,con,full_log);
|
print_stuff(bio_c_out,con,full_log);
|
||||||
if (full_log > 0) full_log--;
|
if (full_log > 0) full_log--;
|
||||||
|
|
||||||
if (smtp_starttls)
|
if (starttls_proto)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"%s",mbuf);
|
BIO_printf(bio_err,"%s",mbuf);
|
||||||
/* We don't need to know any more */
|
/* We don't need to know any more */
|
||||||
smtp_starttls = 0;
|
starttls_proto = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reconnect)
|
if (reconnect)
|
||||||
@@ -617,7 +640,7 @@ re_start:
|
|||||||
|
|
||||||
if (!ssl_pending)
|
if (!ssl_pending)
|
||||||
{
|
{
|
||||||
#ifndef OPENSSL_SYS_WINDOWS
|
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
|
||||||
if (tty_on)
|
if (tty_on)
|
||||||
{
|
{
|
||||||
if (read_tty) FD_SET(fileno(stdin),&readfds);
|
if (read_tty) FD_SET(fileno(stdin),&readfds);
|
||||||
@@ -644,8 +667,8 @@ re_start:
|
|||||||
* will choke the compiler: if you do have a cast then
|
* will choke the compiler: if you do have a cast then
|
||||||
* you can either go for (int *) or (void *).
|
* you can either go for (int *) or (void *).
|
||||||
*/
|
*/
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||||
/* Under Windows we make the assumption that we can
|
/* Under Windows/DOS we make the assumption that we can
|
||||||
* always write to the tty: therefore if we need to
|
* always write to the tty: therefore if we need to
|
||||||
* write to the tty we just fall through. Otherwise
|
* write to the tty we just fall through. Otherwise
|
||||||
* we timeout the select every second and see if there
|
* we timeout the select every second and see if there
|
||||||
@@ -659,7 +682,11 @@ re_start:
|
|||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
i=select(width,(void *)&readfds,(void *)&writefds,
|
i=select(width,(void *)&readfds,(void *)&writefds,
|
||||||
NULL,&tv);
|
NULL,&tv);
|
||||||
|
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
|
||||||
|
if(!i && (!_kbhit() || !read_tty) ) continue;
|
||||||
|
#else
|
||||||
if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
|
if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
|
||||||
|
#endif
|
||||||
} else i=select(width,(void *)&readfds,(void *)&writefds,
|
} else i=select(width,(void *)&readfds,(void *)&writefds,
|
||||||
NULL,NULL);
|
NULL,NULL);
|
||||||
}
|
}
|
||||||
@@ -743,8 +770,8 @@ re_start:
|
|||||||
goto shut;
|
goto shut;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||||
/* Assume Windows can always write */
|
/* Assume Windows/DOS can always write */
|
||||||
else if (!ssl_pending && write_tty)
|
else if (!ssl_pending && write_tty)
|
||||||
#else
|
#else
|
||||||
else if (!ssl_pending && FD_ISSET(fileno(stdout),&writefds))
|
else if (!ssl_pending && FD_ISSET(fileno(stdout),&writefds))
|
||||||
@@ -824,8 +851,12 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||||
|
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
|
||||||
|
else if (_kbhit())
|
||||||
|
#else
|
||||||
else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
|
else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
else if (FD_ISSET(fileno(stdin),&readfds))
|
else if (FD_ISSET(fileno(stdin),&readfds))
|
||||||
#endif
|
#endif
|
||||||
@@ -889,16 +920,16 @@ end:
|
|||||||
if (con != NULL) SSL_free(con);
|
if (con != NULL) SSL_free(con);
|
||||||
if (con2 != NULL) SSL_free(con2);
|
if (con2 != NULL) SSL_free(con2);
|
||||||
if (ctx != NULL) SSL_CTX_free(ctx);
|
if (ctx != NULL) SSL_CTX_free(ctx);
|
||||||
if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); OPENSSL_free(cbuf); }
|
if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); }
|
||||||
if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); OPENSSL_free(sbuf); }
|
if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); }
|
||||||
if (mbuf != NULL) { memset(mbuf,0,BUFSIZZ); OPENSSL_free(mbuf); }
|
if (mbuf != NULL) { OPENSSL_cleanse(mbuf,BUFSIZZ); OPENSSL_free(mbuf); }
|
||||||
if (bio_c_out != NULL)
|
if (bio_c_out != NULL)
|
||||||
{
|
{
|
||||||
BIO_free(bio_c_out);
|
BIO_free(bio_c_out);
|
||||||
bio_c_out=NULL;
|
bio_c_out=NULL;
|
||||||
}
|
}
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -927,10 +958,10 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
|||||||
for (i=0; i<sk_X509_num(sk); i++)
|
for (i=0; i<sk_X509_num(sk); i++)
|
||||||
{
|
{
|
||||||
X509_NAME_oneline(X509_get_subject_name(
|
X509_NAME_oneline(X509_get_subject_name(
|
||||||
sk_X509_value(sk,i)),buf,BUFSIZ);
|
sk_X509_value(sk,i)),buf,sizeof buf);
|
||||||
BIO_printf(bio,"%2d s:%s\n",i,buf);
|
BIO_printf(bio,"%2d s:%s\n",i,buf);
|
||||||
X509_NAME_oneline(X509_get_issuer_name(
|
X509_NAME_oneline(X509_get_issuer_name(
|
||||||
sk_X509_value(sk,i)),buf,BUFSIZ);
|
sk_X509_value(sk,i)),buf,sizeof buf);
|
||||||
BIO_printf(bio," i:%s\n",buf);
|
BIO_printf(bio," i:%s\n",buf);
|
||||||
if (c_showcerts)
|
if (c_showcerts)
|
||||||
PEM_write_bio_X509(bio,sk_X509_value(sk,i));
|
PEM_write_bio_X509(bio,sk_X509_value(sk,i));
|
||||||
@@ -945,10 +976,10 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
|||||||
if (!(c_showcerts && got_a_chain)) /* Redundant if we showed the whole chain */
|
if (!(c_showcerts && got_a_chain)) /* Redundant if we showed the whole chain */
|
||||||
PEM_write_bio_X509(bio,peer);
|
PEM_write_bio_X509(bio,peer);
|
||||||
X509_NAME_oneline(X509_get_subject_name(peer),
|
X509_NAME_oneline(X509_get_subject_name(peer),
|
||||||
buf,BUFSIZ);
|
buf,sizeof buf);
|
||||||
BIO_printf(bio,"subject=%s\n",buf);
|
BIO_printf(bio,"subject=%s\n",buf);
|
||||||
X509_NAME_oneline(X509_get_issuer_name(peer),
|
X509_NAME_oneline(X509_get_issuer_name(peer),
|
||||||
buf,BUFSIZ);
|
buf,sizeof buf);
|
||||||
BIO_printf(bio,"issuer=%s\n",buf);
|
BIO_printf(bio,"issuer=%s\n",buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -970,7 +1001,7 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
|||||||
{
|
{
|
||||||
BIO_printf(bio,"---\nNo client certificate CA names sent\n");
|
BIO_printf(bio,"---\nNo client certificate CA names sent\n");
|
||||||
}
|
}
|
||||||
p=SSL_get_shared_ciphers(s,buf,BUFSIZ);
|
p=SSL_get_shared_ciphers(s,buf,sizeof buf);
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
{
|
{
|
||||||
/* This works only for SSL 2. In later protocol
|
/* This works only for SSL 2. In later protocol
|
||||||
|
|||||||
@@ -140,8 +140,12 @@ typedef unsigned int u_int;
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include "s_apps.h"
|
#include "s_apps.h"
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#ifdef OPENSSL_SYS_WINCE
|
||||||
#include <conio.h>
|
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
|
||||||
|
#ifdef fileno
|
||||||
|
#undef fileno
|
||||||
|
#endif
|
||||||
|
#define fileno(a) (int)_fileno(a)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
|
#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
|
||||||
@@ -234,7 +238,9 @@ static int s_msg=0;
|
|||||||
static int s_quiet=0;
|
static int s_quiet=0;
|
||||||
|
|
||||||
static int hack=0;
|
static int hack=0;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
static char *engine_id=NULL;
|
static char *engine_id=NULL;
|
||||||
|
#endif
|
||||||
static const char *session_id_prefix=NULL;
|
static const char *session_id_prefix=NULL;
|
||||||
|
|
||||||
#ifdef MONOLITH
|
#ifdef MONOLITH
|
||||||
@@ -259,7 +265,9 @@ static void s_server_init(void)
|
|||||||
s_msg=0;
|
s_msg=0;
|
||||||
s_quiet=0;
|
s_quiet=0;
|
||||||
hack=0;
|
hack=0;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
engine_id=NULL;
|
engine_id=NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -308,7 +316,9 @@ static void sv_usage(void)
|
|||||||
BIO_printf(bio_err," -WWW - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
|
BIO_printf(bio_err," -WWW - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
|
||||||
BIO_printf(bio_err," -HTTP - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
|
BIO_printf(bio_err," -HTTP - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
|
||||||
BIO_printf(bio_err," with the assumption it contains a complete HTTP response.\n");
|
BIO_printf(bio_err," with the assumption it contains a complete HTTP response.\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
|
BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n");
|
BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n");
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
}
|
}
|
||||||
@@ -320,10 +330,10 @@ static char **local_argv;
|
|||||||
static int ebcdic_new(BIO *bi);
|
static int ebcdic_new(BIO *bi);
|
||||||
static int ebcdic_free(BIO *a);
|
static int ebcdic_free(BIO *a);
|
||||||
static int ebcdic_read(BIO *b, char *out, int outl);
|
static int ebcdic_read(BIO *b, char *out, int outl);
|
||||||
static int ebcdic_write(BIO *b, char *in, int inl);
|
static int ebcdic_write(BIO *b, const char *in, int inl);
|
||||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr);
|
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr);
|
||||||
static int ebcdic_gets(BIO *bp, char *buf, int size);
|
static int ebcdic_gets(BIO *bp, char *buf, int size);
|
||||||
static int ebcdic_puts(BIO *bp, char *str);
|
static int ebcdic_puts(BIO *bp, const char *str);
|
||||||
|
|
||||||
#define BIO_TYPE_EBCDIC_FILTER (18|0x0200)
|
#define BIO_TYPE_EBCDIC_FILTER (18|0x0200)
|
||||||
static BIO_METHOD methods_ebcdic=
|
static BIO_METHOD methods_ebcdic=
|
||||||
@@ -388,7 +398,7 @@ static int ebcdic_read(BIO *b, char *out, int outl)
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ebcdic_write(BIO *b, char *in, int inl)
|
static int ebcdic_write(BIO *b, const char *in, int inl)
|
||||||
{
|
{
|
||||||
EBCDIC_OUTBUFF *wbuf;
|
EBCDIC_OUTBUFF *wbuf;
|
||||||
int ret=0;
|
int ret=0;
|
||||||
@@ -421,7 +431,7 @@ static int ebcdic_write(BIO *b, char *in, int inl)
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
|
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||||
{
|
{
|
||||||
long ret;
|
long ret;
|
||||||
|
|
||||||
@@ -440,7 +450,7 @@ static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
|
|||||||
|
|
||||||
static int ebcdic_gets(BIO *bp, char *buf, int size)
|
static int ebcdic_gets(BIO *bp, char *buf, int size)
|
||||||
{
|
{
|
||||||
int i, ret;
|
int i, ret=0;
|
||||||
if (bp->next_bio == NULL) return(0);
|
if (bp->next_bio == NULL) return(0);
|
||||||
/* return(BIO_gets(bp->next_bio,buf,size));*/
|
/* return(BIO_gets(bp->next_bio,buf,size));*/
|
||||||
for (i=0; i<size-1; ++i)
|
for (i=0; i<size-1; ++i)
|
||||||
@@ -459,7 +469,7 @@ static int ebcdic_gets(BIO *bp, char *buf, int size)
|
|||||||
return (ret < 0 && i == 0) ? ret : i;
|
return (ret < 0 && i == 0) ? ret : i;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ebcdic_puts(BIO *bp, char *str)
|
static int ebcdic_puts(BIO *bp, const char *str)
|
||||||
{
|
{
|
||||||
if (bp->next_bio == NULL) return(0);
|
if (bp->next_bio == NULL) return(0);
|
||||||
return ebcdic_write(bp, str, strlen(str));
|
return ebcdic_write(bp, str, strlen(str));
|
||||||
@@ -482,7 +492,9 @@ int MAIN(int argc, char *argv[])
|
|||||||
int no_tmp_rsa=0,no_dhe=0,nocert=0;
|
int no_tmp_rsa=0,no_dhe=0,nocert=0;
|
||||||
int state=0;
|
int state=0;
|
||||||
SSL_METHOD *meth=NULL;
|
SSL_METHOD *meth=NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e=NULL;
|
ENGINE *e=NULL;
|
||||||
|
#endif
|
||||||
char *inrand=NULL;
|
char *inrand=NULL;
|
||||||
|
|
||||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
||||||
@@ -504,6 +516,9 @@ int MAIN(int argc, char *argv[])
|
|||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
verify_depth=0;
|
verify_depth=0;
|
||||||
#ifdef FIONBIO
|
#ifdef FIONBIO
|
||||||
s_nbio=0;
|
s_nbio=0;
|
||||||
@@ -654,11 +669,13 @@ int MAIN(int argc, char *argv[])
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
session_id_prefix = *(++argv);
|
session_id_prefix = *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine_id= *(++argv);
|
engine_id= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-rand") == 0)
|
else if (strcmp(*argv,"-rand") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -680,6 +697,13 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SSL_load_error_strings();
|
||||||
|
OpenSSL_add_ssl_algorithms();
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
e = setup_engine(bio_err, engine_id, 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
|
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
|
||||||
&& !RAND_status())
|
&& !RAND_status())
|
||||||
{
|
{
|
||||||
@@ -702,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)
|
if (nocert)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -712,11 +736,6 @@ bad:
|
|||||||
s_dkey_file=NULL;
|
s_dkey_file=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSL_load_error_strings();
|
|
||||||
OpenSSL_add_ssl_algorithms();
|
|
||||||
|
|
||||||
e = setup_engine(bio_err, engine_id, 1);
|
|
||||||
|
|
||||||
ctx=SSL_CTX_new(meth);
|
ctx=SSL_CTX_new(meth);
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
{
|
{
|
||||||
@@ -857,7 +876,7 @@ end:
|
|||||||
bio_s_out=NULL;
|
bio_s_out=NULL;
|
||||||
}
|
}
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
|
static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
|
||||||
@@ -894,7 +913,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
|||||||
unsigned long l;
|
unsigned long l;
|
||||||
SSL *con=NULL;
|
SSL *con=NULL;
|
||||||
BIO *sbio;
|
BIO *sbio;
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -968,7 +987,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
|||||||
if (!read_from_sslcon)
|
if (!read_from_sslcon)
|
||||||
{
|
{
|
||||||
FD_ZERO(&readfds);
|
FD_ZERO(&readfds);
|
||||||
#ifndef OPENSSL_SYS_WINDOWS
|
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
|
||||||
FD_SET(fileno(stdin),&readfds);
|
FD_SET(fileno(stdin),&readfds);
|
||||||
#endif
|
#endif
|
||||||
FD_SET(s,&readfds);
|
FD_SET(s,&readfds);
|
||||||
@@ -978,8 +997,8 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
|||||||
* the compiler: if you do have a cast then you can either
|
* the compiler: if you do have a cast then you can either
|
||||||
* go for (int *) or (void *).
|
* go for (int *) or (void *).
|
||||||
*/
|
*/
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||||
/* Under Windows we can't select on stdin: only
|
/* Under DOS (non-djgpp) and Windows we can't select on stdin: only
|
||||||
* on sockets. As a workaround we timeout the select every
|
* on sockets. As a workaround we timeout the select every
|
||||||
* second and check for any keypress. In a proper Windows
|
* second and check for any keypress. In a proper Windows
|
||||||
* application we wouldn't do this because it is inefficient.
|
* application we wouldn't do this because it is inefficient.
|
||||||
@@ -1173,7 +1192,7 @@ err:
|
|||||||
BIO_printf(bio_s_out,"CONNECTION CLOSED\n");
|
BIO_printf(bio_s_out,"CONNECTION CLOSED\n");
|
||||||
if (buf != NULL)
|
if (buf != NULL)
|
||||||
{
|
{
|
||||||
memset(buf,0,bufsize);
|
OPENSSL_cleanse(buf,bufsize);
|
||||||
OPENSSL_free(buf);
|
OPENSSL_free(buf);
|
||||||
}
|
}
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
@@ -1225,14 +1244,14 @@ static int init_ssl_connection(SSL *con)
|
|||||||
{
|
{
|
||||||
BIO_printf(bio_s_out,"Client certificate\n");
|
BIO_printf(bio_s_out,"Client certificate\n");
|
||||||
PEM_write_bio_X509(bio_s_out,peer);
|
PEM_write_bio_X509(bio_s_out,peer);
|
||||||
X509_NAME_oneline(X509_get_subject_name(peer),buf,BUFSIZ);
|
X509_NAME_oneline(X509_get_subject_name(peer),buf,sizeof buf);
|
||||||
BIO_printf(bio_s_out,"subject=%s\n",buf);
|
BIO_printf(bio_s_out,"subject=%s\n",buf);
|
||||||
X509_NAME_oneline(X509_get_issuer_name(peer),buf,BUFSIZ);
|
X509_NAME_oneline(X509_get_issuer_name(peer),buf,sizeof buf);
|
||||||
BIO_printf(bio_s_out,"issuer=%s\n",buf);
|
BIO_printf(bio_s_out,"issuer=%s\n",buf);
|
||||||
X509_free(peer);
|
X509_free(peer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SSL_get_shared_ciphers(con,buf,BUFSIZ) != NULL)
|
if (SSL_get_shared_ciphers(con,buf,sizeof buf) != NULL)
|
||||||
BIO_printf(bio_s_out,"Shared ciphers:%s\n",buf);
|
BIO_printf(bio_s_out,"Shared ciphers:%s\n",buf);
|
||||||
str=SSL_CIPHER_get_name(SSL_get_current_cipher(con));
|
str=SSL_CIPHER_get_name(SSL_get_current_cipher(con));
|
||||||
BIO_printf(bio_s_out,"CIPHER is %s\n",(str != NULL)?str:"(NONE)");
|
BIO_printf(bio_s_out,"CIPHER is %s\n",(str != NULL)?str:"(NONE)");
|
||||||
@@ -1240,7 +1259,13 @@ static int init_ssl_connection(SSL *con)
|
|||||||
if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
|
if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
|
||||||
TLS1_FLAGS_TLS_PADDING_BUG)
|
TLS1_FLAGS_TLS_PADDING_BUG)
|
||||||
BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n");
|
BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n");
|
||||||
|
#ifndef OPENSSL_NO_KRB5
|
||||||
|
if (con->kssl_ctx->client_princ != NULL)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_s_out,"Kerberos peer principal is %s\n",
|
||||||
|
con->kssl_ctx->client_princ);
|
||||||
|
}
|
||||||
|
#endif /* OPENSSL_NO_KRB5 */
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1392,7 +1417,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_printf(bio_s_out,"read R BLOCK\n");
|
BIO_printf(bio_s_out,"read R BLOCK\n");
|
||||||
#ifndef OPENSSL_SYS_MSDOS
|
#if !defined(OPENSSL_SYS_MSDOS) && !defined(__DJGPP__)
|
||||||
sleep(1);
|
sleep(1);
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ typedef unsigned int u_int;
|
|||||||
|
|
||||||
static struct hostent *GetHostByName(char *name);
|
static struct hostent *GetHostByName(char *name);
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
static void sock_cleanup(void);
|
static void ssl_sock_cleanup(void);
|
||||||
#endif
|
#endif
|
||||||
static int sock_init(void);
|
static int ssl_sock_init(void);
|
||||||
static int init_client_ip(int *sock,unsigned char ip[4], int port);
|
static int init_client_ip(int *sock,unsigned char ip[4], int port);
|
||||||
static int init_server(int *sock, int port);
|
static int init_server(int *sock, int port);
|
||||||
static int init_server_long(int *sock, int port,char *ip);
|
static int init_server_long(int *sock, int port,char *ip);
|
||||||
@@ -118,7 +118,7 @@ static LONG FAR PASCAL topHookProc(HWND hwnd, UINT message, WPARAM wParam,
|
|||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopWndProc);
|
SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopWndProc);
|
||||||
sock_cleanup();
|
ssl_sock_cleanup();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,26 +135,34 @@ static BOOL CALLBACK enumproc(HWND hwnd,LPARAM lParam)
|
|||||||
#endif /* OPENSSL_SYS_WINDOWS */
|
#endif /* OPENSSL_SYS_WINDOWS */
|
||||||
|
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
static void sock_cleanup(void)
|
static void ssl_sock_cleanup(void)
|
||||||
{
|
{
|
||||||
if (wsa_init_done)
|
if (wsa_init_done)
|
||||||
{
|
{
|
||||||
wsa_init_done=0;
|
wsa_init_done=0;
|
||||||
|
#ifndef OPENSSL_SYS_WINCE
|
||||||
WSACancelBlockingCall();
|
WSACancelBlockingCall();
|
||||||
|
#endif
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int sock_init(void)
|
static int ssl_sock_init(void)
|
||||||
{
|
{
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#ifdef WATT32
|
||||||
|
extern int _watt_do_exit;
|
||||||
|
_watt_do_exit = 0;
|
||||||
|
dbug_init();
|
||||||
|
if (sock_init())
|
||||||
|
return (0);
|
||||||
|
#elif defined(OPENSSL_SYS_WINDOWS)
|
||||||
if (!wsa_init_done)
|
if (!wsa_init_done)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
#ifdef SIGINT
|
#ifdef SIGINT
|
||||||
signal(SIGINT,(void (*)(int))sock_cleanup);
|
signal(SIGINT,(void (*)(int))ssl_sock_cleanup);
|
||||||
#endif
|
#endif
|
||||||
wsa_init_done=1;
|
wsa_init_done=1;
|
||||||
memset(&wsa_state,0,sizeof(wsa_state));
|
memset(&wsa_state,0,sizeof(wsa_state));
|
||||||
@@ -196,7 +204,7 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port)
|
|||||||
struct sockaddr_in them;
|
struct sockaddr_in them;
|
||||||
int s,i;
|
int s,i;
|
||||||
|
|
||||||
if (!sock_init()) return(0);
|
if (!ssl_sock_init()) return(0);
|
||||||
|
|
||||||
memset((char *)&them,0,sizeof(them));
|
memset((char *)&them,0,sizeof(them));
|
||||||
them.sin_family=AF_INET;
|
them.sin_family=AF_INET;
|
||||||
@@ -261,7 +269,7 @@ static int init_server_long(int *sock, int port, char *ip)
|
|||||||
struct sockaddr_in server;
|
struct sockaddr_in server;
|
||||||
int s= -1,i;
|
int s= -1,i;
|
||||||
|
|
||||||
if (!sock_init()) return(0);
|
if (!ssl_sock_init()) return(0);
|
||||||
|
|
||||||
memset((char *)&server,0,sizeof(server));
|
memset((char *)&server,0,sizeof(server));
|
||||||
server.sin_family=AF_INET;
|
server.sin_family=AF_INET;
|
||||||
@@ -318,7 +326,7 @@ static int do_accept(int acc_sock, int *sock, char **host)
|
|||||||
int len;
|
int len;
|
||||||
/* struct linger ling; */
|
/* struct linger ling; */
|
||||||
|
|
||||||
if (!sock_init()) return(0);
|
if (!ssl_sock_init()) return(0);
|
||||||
|
|
||||||
#ifndef OPENSSL_SYS_WINDOWS
|
#ifndef OPENSSL_SYS_WINDOWS
|
||||||
redoit:
|
redoit:
|
||||||
@@ -448,7 +456,7 @@ static int host_ip(char *str, unsigned char ip[4])
|
|||||||
{ /* do a gethostbyname */
|
{ /* do a gethostbyname */
|
||||||
struct hostent *he;
|
struct hostent *he;
|
||||||
|
|
||||||
if (!sock_init()) return(0);
|
if (!ssl_sock_init()) return(0);
|
||||||
|
|
||||||
he=GetHostByName(str);
|
he=GetHostByName(str);
|
||||||
if (he == NULL)
|
if (he == NULL)
|
||||||
@@ -529,9 +537,12 @@ static struct hostent *GetHostByName(char *name)
|
|||||||
ret=gethostbyname(name);
|
ret=gethostbyname(name);
|
||||||
if (ret == NULL) return(NULL);
|
if (ret == NULL) return(NULL);
|
||||||
/* else add to cache */
|
/* else add to cache */
|
||||||
strncpy(ghbn_cache[lowi].name,name,128);
|
if(strlen(name) < sizeof ghbn_cache[0].name)
|
||||||
memcpy((char *)&(ghbn_cache[lowi].ent),ret,sizeof(struct hostent));
|
{
|
||||||
ghbn_cache[lowi].order=ghbn_miss+ghbn_hits;
|
strcpy(ghbn_cache[lowi].name,name);
|
||||||
|
memcpy((char *)&(ghbn_cache[lowi].ent),ret,sizeof(struct hostent));
|
||||||
|
ghbn_cache[lowi].order=ghbn_miss+ghbn_hits;
|
||||||
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
#include OPENSSL_UNISTD
|
#include OPENSSL_UNISTD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX)
|
#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
|
||||||
#define TIMES
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -109,10 +109,6 @@
|
|||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _AIX
|
|
||||||
#include <sys/select.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(sun) || defined(__ultrix)
|
#if defined(sun) || defined(__ultrix)
|
||||||
#define _POSIX_SOURCE
|
#define _POSIX_SOURCE
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
@@ -150,6 +146,8 @@
|
|||||||
#undef BUFSIZZ
|
#undef BUFSIZZ
|
||||||
#define BUFSIZZ 1024*10
|
#define BUFSIZZ 1024*10
|
||||||
|
|
||||||
|
#define MYBUFSIZ 1024*8
|
||||||
|
|
||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#undef max
|
||||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||||
@@ -324,6 +322,11 @@ static int parseArgs(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
s_www_path= *(++argv);
|
s_www_path= *(++argv);
|
||||||
|
if(strlen(s_www_path) > MYBUFSIZ-100)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"-www option too long\n");
|
||||||
|
badop=1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(strcmp(*argv,"-bugs") == 0)
|
else if(strcmp(*argv,"-bugs") == 0)
|
||||||
st_bugs=1;
|
st_bugs=1;
|
||||||
@@ -484,7 +487,7 @@ int MAIN(int argc, char **argv)
|
|||||||
tm_Time_F(START);
|
tm_Time_F(START);
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (finishtime < time(NULL)) break;
|
if (finishtime < (long)time(NULL)) break;
|
||||||
#ifdef WIN32_STUFF
|
#ifdef WIN32_STUFF
|
||||||
|
|
||||||
if( flushWinMsgs(0) == -1 )
|
if( flushWinMsgs(0) == -1 )
|
||||||
@@ -535,9 +538,9 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
totalTime += tm_Time_F(STOP); /* Add the time for this iteration */
|
totalTime += tm_Time_F(STOP); /* Add the time for this iteration */
|
||||||
|
|
||||||
i=(int)(time(NULL)-finishtime+maxTime);
|
i=(int)((long)time(NULL)-finishtime+maxTime);
|
||||||
printf( "\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n", nConn, totalTime, ((double)nConn/totalTime),bytes_read);
|
printf( "\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n", nConn, totalTime, ((double)nConn/totalTime),bytes_read);
|
||||||
printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,time(NULL)-finishtime+maxTime,bytes_read/nConn);
|
printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,(long)time(NULL)-finishtime+maxTime,bytes_read/nConn);
|
||||||
|
|
||||||
/* Now loop and time connections using the same session id over and over */
|
/* Now loop and time connections using the same session id over and over */
|
||||||
|
|
||||||
@@ -569,7 +572,7 @@ next:
|
|||||||
nConn = 0;
|
nConn = 0;
|
||||||
totalTime = 0.0;
|
totalTime = 0.0;
|
||||||
|
|
||||||
finishtime=time(NULL)+maxTime;
|
finishtime=(long)time(NULL)+maxTime;
|
||||||
|
|
||||||
printf( "starting\n" );
|
printf( "starting\n" );
|
||||||
bytes_read=0;
|
bytes_read=0;
|
||||||
@@ -577,7 +580,7 @@ next:
|
|||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (finishtime < time(NULL)) break;
|
if (finishtime < (long)time(NULL)) break;
|
||||||
|
|
||||||
#ifdef WIN32_STUFF
|
#ifdef WIN32_STUFF
|
||||||
if( flushWinMsgs(0) == -1 )
|
if( flushWinMsgs(0) == -1 )
|
||||||
@@ -627,7 +630,7 @@ next:
|
|||||||
|
|
||||||
|
|
||||||
printf( "\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n", nConn, totalTime, ((double)nConn/totalTime),bytes_read);
|
printf( "\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n", nConn, totalTime, ((double)nConn/totalTime),bytes_read);
|
||||||
printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,time(NULL)-finishtime+maxTime,bytes_read/nConn);
|
printf( "%d connections in %ld real seconds, %ld bytes read per connection\n",nConn,(long)time(NULL)-finishtime+maxTime,bytes_read/nConn);
|
||||||
|
|
||||||
ret=0;
|
ret=0;
|
||||||
end:
|
end:
|
||||||
@@ -639,7 +642,7 @@ end:
|
|||||||
tm_ctx=NULL;
|
tm_ctx=NULL;
|
||||||
}
|
}
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ end:
|
|||||||
if (out != NULL) BIO_free_all(out);
|
if (out != NULL) BIO_free_all(out);
|
||||||
if (x != NULL) SSL_SESSION_free(x);
|
if (x != NULL) SSL_SESSION_free(x);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SSL_SESSION *load_sess_id(char *infile, int format)
|
static SSL_SESSION *load_sess_id(char *infile, int format)
|
||||||
|
|||||||
44
apps/smime.c
44
apps/smime.c
@@ -104,11 +104,22 @@ int MAIN(int argc, char **argv)
|
|||||||
int need_rand = 0;
|
int need_rand = 0;
|
||||||
int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
|
int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
|
||||||
int keyform = FORMAT_PEM;
|
int keyform = FORMAT_PEM;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
args = argv + 1;
|
args = argv + 1;
|
||||||
ret = 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] == '-') {
|
while (!badarg && *args && *args[0] == '-') {
|
||||||
if (!strcmp (*args, "-encrypt")) operation = SMIME_ENCRYPT;
|
if (!strcmp (*args, "-encrypt")) operation = SMIME_ENCRYPT;
|
||||||
else if (!strcmp (*args, "-decrypt")) operation = SMIME_DECRYPT;
|
else if (!strcmp (*args, "-decrypt")) operation = SMIME_DECRYPT;
|
||||||
@@ -128,6 +139,14 @@ int MAIN(int argc, char **argv)
|
|||||||
cipher = EVP_rc2_cbc();
|
cipher = EVP_rc2_cbc();
|
||||||
else if (!strcmp (*args, "-rc2-64"))
|
else if (!strcmp (*args, "-rc2-64"))
|
||||||
cipher = EVP_rc2_64_cbc();
|
cipher = EVP_rc2_64_cbc();
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
else if (!strcmp(*args,"-aes128"))
|
||||||
|
cipher = EVP_aes_128_cbc();
|
||||||
|
else if (!strcmp(*args,"-aes192"))
|
||||||
|
cipher = EVP_aes_192_cbc();
|
||||||
|
else if (!strcmp(*args,"-aes256"))
|
||||||
|
cipher = EVP_aes_256_cbc();
|
||||||
#endif
|
#endif
|
||||||
else if (!strcmp (*args, "-text"))
|
else if (!strcmp (*args, "-text"))
|
||||||
flags |= PKCS7_TEXT;
|
flags |= PKCS7_TEXT;
|
||||||
@@ -149,6 +168,10 @@ int MAIN(int argc, char **argv)
|
|||||||
flags |= PKCS7_BINARY;
|
flags |= PKCS7_BINARY;
|
||||||
else if (!strcmp (*args, "-nosigs"))
|
else if (!strcmp (*args, "-nosigs"))
|
||||||
flags |= PKCS7_NOSIGS;
|
flags |= PKCS7_NOSIGS;
|
||||||
|
else if (!strcmp (*args, "-nooldmime"))
|
||||||
|
flags |= PKCS7_NOOLDMIMETYPE;
|
||||||
|
else if (!strcmp (*args, "-crlfeol"))
|
||||||
|
flags |= PKCS7_CRLFEOL;
|
||||||
else if (!strcmp (*args, "-crl_check"))
|
else if (!strcmp (*args, "-crl_check"))
|
||||||
store_flags |= X509_V_FLAG_CRL_CHECK;
|
store_flags |= X509_V_FLAG_CRL_CHECK;
|
||||||
else if (!strcmp (*args, "-crl_check_all"))
|
else if (!strcmp (*args, "-crl_check_all"))
|
||||||
@@ -159,11 +182,13 @@ int MAIN(int argc, char **argv)
|
|||||||
inrand = *args;
|
inrand = *args;
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
need_rand = 1;
|
need_rand = 1;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
} else if (!strcmp(*args,"-engine")) {
|
} else if (!strcmp(*args,"-engine")) {
|
||||||
if (args[1]) {
|
if (args[1]) {
|
||||||
args++;
|
args++;
|
||||||
engine = *args;
|
engine = *args;
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
|
#endif
|
||||||
} else if (!strcmp(*args,"-passin")) {
|
} else if (!strcmp(*args,"-passin")) {
|
||||||
if (args[1]) {
|
if (args[1]) {
|
||||||
args++;
|
args++;
|
||||||
@@ -283,6 +308,10 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-rc2-40 encrypt with RC2-40 (default)\n");
|
BIO_printf (bio_err, "-rc2-40 encrypt with RC2-40 (default)\n");
|
||||||
BIO_printf (bio_err, "-rc2-64 encrypt with RC2-64\n");
|
BIO_printf (bio_err, "-rc2-64 encrypt with RC2-64\n");
|
||||||
BIO_printf (bio_err, "-rc2-128 encrypt with RC2-128\n");
|
BIO_printf (bio_err, "-rc2-128 encrypt with RC2-128\n");
|
||||||
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_AES
|
||||||
|
BIO_printf (bio_err, "-aes128, -aes192, -aes256\n");
|
||||||
|
BIO_printf (bio_err, " encrypt PEM output with cbc aes\n");
|
||||||
#endif
|
#endif
|
||||||
BIO_printf (bio_err, "-nointern don't search certificates in message for signer\n");
|
BIO_printf (bio_err, "-nointern don't search certificates in message for signer\n");
|
||||||
BIO_printf (bio_err, "-nosigs don't verify message signature\n");
|
BIO_printf (bio_err, "-nosigs don't verify message signature\n");
|
||||||
@@ -309,7 +338,9 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-CAfile file trusted certificates file\n");
|
BIO_printf (bio_err, "-CAfile file trusted certificates file\n");
|
||||||
BIO_printf (bio_err, "-crl_check check revocation status of signer's certificate using CRLs\n");
|
BIO_printf (bio_err, "-crl_check check revocation status of signer's certificate using CRLs\n");
|
||||||
BIO_printf (bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n");
|
BIO_printf (bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf (bio_err, "-passin arg input file pass phrase source\n");
|
BIO_printf (bio_err, "-passin arg input file pass phrase source\n");
|
||||||
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
||||||
@@ -318,7 +349,9 @@ int MAIN(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
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");
|
BIO_printf(bio_err, "Error getting password\n");
|
||||||
@@ -407,7 +440,7 @@ int MAIN(int argc, char **argv)
|
|||||||
} else keyfile = NULL;
|
} else keyfile = NULL;
|
||||||
|
|
||||||
if(keyfile) {
|
if(keyfile) {
|
||||||
key = load_key(bio_err, keyfile, keyform, passin, e,
|
key = load_key(bio_err, keyfile, keyform, 0, passin, e,
|
||||||
"signing key file");
|
"signing key file");
|
||||||
if (!key) {
|
if (!key) {
|
||||||
goto end;
|
goto end;
|
||||||
@@ -450,7 +483,10 @@ int MAIN(int argc, char **argv)
|
|||||||
p7 = PKCS7_encrypt(encerts, in, cipher, flags);
|
p7 = PKCS7_encrypt(encerts, in, cipher, flags);
|
||||||
} else if(operation == SMIME_SIGN) {
|
} else if(operation == SMIME_SIGN) {
|
||||||
p7 = PKCS7_sign(signer, key, other, in, flags);
|
p7 = PKCS7_sign(signer, key, other, in, flags);
|
||||||
BIO_reset(in);
|
if (BIO_reset(in) != 0 && (flags & PKCS7_DETACHED)) {
|
||||||
|
BIO_printf(bio_err, "Can't rewind input file\n");
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if(informat == FORMAT_SMIME)
|
if(informat == FORMAT_SMIME)
|
||||||
p7 = SMIME_read_PKCS7(in, &indata);
|
p7 = SMIME_read_PKCS7(in, &indata);
|
||||||
@@ -490,9 +526,9 @@ int MAIN(int argc, char **argv)
|
|||||||
} else if(operation == SMIME_VERIFY) {
|
} else if(operation == SMIME_VERIFY) {
|
||||||
STACK_OF(X509) *signers;
|
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");
|
BIO_printf(bio_err, "Verification successful\n");
|
||||||
} else {
|
} else {
|
||||||
BIO_printf(bio_err, "Verification Failure\n");
|
BIO_printf(bio_err, "Verification failure\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
signers = PKCS7_get0_signers(p7, other, flags);
|
signers = PKCS7_get0_signers(p7, other, flags);
|
||||||
|
|||||||
48
apps/speed.c
48
apps/speed.c
@@ -58,6 +58,8 @@
|
|||||||
|
|
||||||
/* most of this code has been pilfered from my libdes speed.c program */
|
/* most of this code has been pilfered from my libdes speed.c program */
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_SPEED
|
||||||
|
|
||||||
#undef SECONDS
|
#undef SECONDS
|
||||||
#define SECONDS 3
|
#define SECONDS 3
|
||||||
#define RSA_SECONDS 10
|
#define RSA_SECONDS 10
|
||||||
@@ -131,7 +133,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_DES
|
#ifndef OPENSSL_NO_DES
|
||||||
#include <openssl/des_old.h>
|
#include <openssl/des.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_AES
|
#ifndef OPENSSL_NO_AES
|
||||||
#include <openssl/aes.h>
|
#include <openssl/aes.h>
|
||||||
@@ -187,7 +189,8 @@
|
|||||||
|
|
||||||
/* The following if from times(3) man page. It may need to be changed */
|
/* The following if from times(3) man page. It may need to be changed */
|
||||||
#ifndef HZ
|
#ifndef HZ
|
||||||
# ifdef _SC_CLK_TCK
|
# if defined(_SC_CLK_TCK) \
|
||||||
|
&& (!defined(OPENSSL_SYS_VMS) || __CTRL_VER >= 70000000)
|
||||||
# define HZ ((double)sysconf(_SC_CLK_TCK))
|
# define HZ ((double)sysconf(_SC_CLK_TCK))
|
||||||
# else
|
# else
|
||||||
# ifndef CLK_TCK
|
# ifndef CLK_TCK
|
||||||
@@ -369,14 +372,18 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
#endif
|
||||||
unsigned char *buf=NULL,*buf2=NULL;
|
unsigned char *buf=NULL,*buf2=NULL;
|
||||||
int mret=1;
|
int mret=1;
|
||||||
long count=0,save_count=0;
|
long count=0,save_count=0;
|
||||||
int i,j,k;
|
int i,j,k;
|
||||||
|
#if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA)
|
||||||
|
long rsa_count;
|
||||||
|
#endif
|
||||||
#ifndef OPENSSL_NO_RSA
|
#ifndef OPENSSL_NO_RSA
|
||||||
unsigned rsa_num;
|
unsigned rsa_num;
|
||||||
long rsa_count;
|
|
||||||
#endif
|
#endif
|
||||||
unsigned char md[EVP_MAX_MD_SIZE];
|
unsigned char md[EVP_MAX_MD_SIZE];
|
||||||
#ifndef OPENSSL_NO_MD2
|
#ifndef OPENSSL_NO_MD2
|
||||||
@@ -437,9 +444,9 @@ int MAIN(int argc, char **argv)
|
|||||||
unsigned char iv[MAX_BLOCK_SIZE/8];
|
unsigned char iv[MAX_BLOCK_SIZE/8];
|
||||||
#ifndef OPENSSL_NO_DES
|
#ifndef OPENSSL_NO_DES
|
||||||
DES_cblock *buf_as_des_cblock = NULL;
|
DES_cblock *buf_as_des_cblock = NULL;
|
||||||
static des_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
|
static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
|
||||||
static des_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
|
static DES_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
|
||||||
static des_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34};
|
static DES_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34};
|
||||||
DES_key_schedule sch;
|
DES_key_schedule sch;
|
||||||
DES_key_schedule sch2;
|
DES_key_schedule sch2;
|
||||||
DES_key_schedule sch3;
|
DES_key_schedule sch3;
|
||||||
@@ -515,6 +522,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_RSA
|
#ifndef OPENSSL_NO_RSA
|
||||||
memset(rsa_key,0,sizeof(rsa_key));
|
memset(rsa_key,0,sizeof(rsa_key));
|
||||||
for (i=0; i<RSA_NUM; i++)
|
for (i=0; i<RSA_NUM; i++)
|
||||||
@@ -527,7 +537,7 @@ int MAIN(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
#ifndef OPENSSL_NO_DES
|
#ifndef OPENSSL_NO_DES
|
||||||
buf_as_des_cblock = (des_cblock *)buf;
|
buf_as_des_cblock = (DES_cblock *)buf;
|
||||||
#endif
|
#endif
|
||||||
if ((buf2=(unsigned char *)OPENSSL_malloc((int)BUFSIZE)) == NULL)
|
if ((buf2=(unsigned char *)OPENSSL_malloc((int)BUFSIZE)) == NULL)
|
||||||
{
|
{
|
||||||
@@ -584,6 +594,7 @@ int MAIN(int argc, char **argv)
|
|||||||
j--; /* Otherwise, -elapsed gets confused with
|
j--; /* Otherwise, -elapsed gets confused with
|
||||||
an algorithm. */
|
an algorithm. */
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if ((argc > 0) && (strcmp(*argv,"-engine") == 0))
|
else if ((argc > 0) && (strcmp(*argv,"-engine") == 0))
|
||||||
{
|
{
|
||||||
argc--;
|
argc--;
|
||||||
@@ -600,6 +611,7 @@ int MAIN(int argc, char **argv)
|
|||||||
means all of them should be run) */
|
means all of them should be run) */
|
||||||
j--;
|
j--;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifdef HAVE_FORK
|
#ifdef HAVE_FORK
|
||||||
else if ((argc > 0) && (strcmp(*argv,"-multi") == 0))
|
else if ((argc > 0) && (strcmp(*argv,"-multi") == 0))
|
||||||
{
|
{
|
||||||
@@ -856,10 +868,12 @@ int MAIN(int argc, char **argv)
|
|||||||
|
|
||||||
BIO_printf(bio_err,"\n");
|
BIO_printf(bio_err,"\n");
|
||||||
BIO_printf(bio_err,"Available options:\n");
|
BIO_printf(bio_err,"Available options:\n");
|
||||||
#ifdef TIMES
|
#if defined(TIMES) || defined(USE_TOD)
|
||||||
BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n");
|
BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n");
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
BIO_printf(bio_err,"-evp e use EVP e.\n");
|
BIO_printf(bio_err,"-evp e use EVP e.\n");
|
||||||
BIO_printf(bio_err,"-decrypt time decryption instead of encryption (only EVP).\n");
|
BIO_printf(bio_err,"-decrypt time decryption instead of encryption (only EVP).\n");
|
||||||
BIO_printf(bio_err,"-mr produce machine readable output.\n");
|
BIO_printf(bio_err,"-mr produce machine readable output.\n");
|
||||||
@@ -1136,7 +1150,7 @@ int MAIN(int argc, char **argv)
|
|||||||
|
|
||||||
HMAC_CTX_init(&hctx);
|
HMAC_CTX_init(&hctx);
|
||||||
HMAC_Init_ex(&hctx,(unsigned char *)"This is a key...",
|
HMAC_Init_ex(&hctx,(unsigned char *)"This is a key...",
|
||||||
16,EVP_md5());
|
16,EVP_md5(), NULL);
|
||||||
|
|
||||||
for (j=0; j<SIZE_NUM; j++)
|
for (j=0; j<SIZE_NUM; j++)
|
||||||
{
|
{
|
||||||
@@ -1144,9 +1158,9 @@ int MAIN(int argc, char **argv)
|
|||||||
Time_F(START);
|
Time_F(START);
|
||||||
for (count=0,run=1; COND(c[D_HMAC][j]); count++)
|
for (count=0,run=1; COND(c[D_HMAC][j]); count++)
|
||||||
{
|
{
|
||||||
HMAC_Init_ex(&hctx,NULL,0,NULL);
|
HMAC_Init_ex(&hctx,NULL,0,NULL,NULL);
|
||||||
HMAC_Update(&hctx,buf,lengths[j]);
|
HMAC_Update(&hctx,buf,lengths[j]);
|
||||||
HMAC_Final(&hctx,&(hmac[0]),NULL);
|
HMAC_Final(&hctx,&(hmac[0]),NULL);
|
||||||
}
|
}
|
||||||
d=Time_F(STOP);
|
d=Time_F(STOP);
|
||||||
print_result(D_HMAC,j,count,d);
|
print_result(D_HMAC,j,count,d);
|
||||||
@@ -1387,6 +1401,7 @@ int MAIN(int argc, char **argv)
|
|||||||
else
|
else
|
||||||
EVP_EncryptFinal_ex(&ctx,buf,&outl);
|
EVP_EncryptFinal_ex(&ctx,buf,&outl);
|
||||||
d=Time_F(STOP);
|
d=Time_F(STOP);
|
||||||
|
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||||
}
|
}
|
||||||
if (evp_md)
|
if (evp_md)
|
||||||
{
|
{
|
||||||
@@ -1598,7 +1613,7 @@ show_res:
|
|||||||
printf("%s ",RC4_options());
|
printf("%s ",RC4_options());
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_DES
|
#ifndef OPENSSL_NO_DES
|
||||||
printf("%s ",des_options());
|
printf("%s ",DES_options());
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_AES
|
#ifndef OPENSSL_NO_AES
|
||||||
printf("%s ",AES_options());
|
printf("%s ",AES_options());
|
||||||
@@ -1622,7 +1637,7 @@ show_res:
|
|||||||
#endif
|
#endif
|
||||||
#ifdef HZ
|
#ifdef HZ
|
||||||
#define as_string(s) (#s)
|
#define as_string(s) (#s)
|
||||||
printf("HZ=%g", HZ);
|
printf("HZ=%g", (double)HZ);
|
||||||
# ifdef _SC_CLK_TCK
|
# ifdef _SC_CLK_TCK
|
||||||
printf(" [sysconf value]");
|
printf(" [sysconf value]");
|
||||||
# endif
|
# endif
|
||||||
@@ -1723,7 +1738,7 @@ end:
|
|||||||
DSA_free(dsa_key[i]);
|
DSA_free(dsa_key[i]);
|
||||||
#endif
|
#endif
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(mret);
|
OPENSSL_EXIT(mret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_message(const char *s, long num, int length)
|
static void print_message(const char *s, long num, int length)
|
||||||
@@ -1776,7 +1791,7 @@ static char *sstrsep(char **string, const char *delim)
|
|||||||
if (**string == 0)
|
if (**string == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memset(isdelim, 0, 256);
|
memset(isdelim, 0, sizeof isdelim);
|
||||||
isdelim[0] = 1;
|
isdelim[0] = 1;
|
||||||
|
|
||||||
while (*delim)
|
while (*delim)
|
||||||
@@ -1933,3 +1948,4 @@ static int do_multi(int multi)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|||||||
15
apps/spkac.c
15
apps/spkac.c
@@ -92,12 +92,17 @@ int MAIN(int argc, char **argv)
|
|||||||
CONF *conf = NULL;
|
CONF *conf = NULL;
|
||||||
NETSCAPE_SPKI *spki = NULL;
|
NETSCAPE_SPKI *spki = NULL;
|
||||||
EVP_PKEY *pkey = NULL;
|
EVP_PKEY *pkey = NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
if (!bio_err) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
|
if (!bio_err) bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
prog=argv[0];
|
prog=argv[0];
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
@@ -138,11 +143,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
spksect= *(++argv);
|
spksect= *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-noout") == 0)
|
else if (strcmp(*argv,"-noout") == 0)
|
||||||
noout=1;
|
noout=1;
|
||||||
else if (strcmp(*argv,"-pubkey") == 0)
|
else if (strcmp(*argv,"-pubkey") == 0)
|
||||||
@@ -168,7 +175,9 @@ bad:
|
|||||||
BIO_printf(bio_err," -noout don't print SPKAC\n");
|
BIO_printf(bio_err," -noout don't print SPKAC\n");
|
||||||
BIO_printf(bio_err," -pubkey output public key\n");
|
BIO_printf(bio_err," -pubkey output public key\n");
|
||||||
BIO_printf(bio_err," -verify verify SPKAC signature\n");
|
BIO_printf(bio_err," -verify verify SPKAC signature\n");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||||
|
#endif
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,12 +187,14 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(keyfile) {
|
if(keyfile) {
|
||||||
pkey = load_key(bio_err,
|
pkey = load_key(bio_err,
|
||||||
strcmp(keyfile, "-") ? keyfile : NULL,
|
strcmp(keyfile, "-") ? keyfile : NULL,
|
||||||
FORMAT_PEM, passin, e, "private key");
|
FORMAT_PEM, 1, passin, e, "private key");
|
||||||
if(!pkey) {
|
if(!pkey) {
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
@@ -292,5 +303,5 @@ end:
|
|||||||
EVP_PKEY_free(pkey);
|
EVP_PKEY_free(pkey);
|
||||||
if(passin) OPENSSL_free(passin);
|
if(passin) OPENSSL_free(passin);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ int MAIN(int argc, char **argv)
|
|||||||
STACK_OF(X509) *untrusted = NULL, *trusted = NULL;
|
STACK_OF(X509) *untrusted = NULL, *trusted = NULL;
|
||||||
X509_STORE *cert_ctx=NULL;
|
X509_STORE *cert_ctx=NULL;
|
||||||
X509_LOOKUP *lookup=NULL;
|
X509_LOOKUP *lookup=NULL;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
cert_ctx=X509_STORE_new();
|
cert_ctx=X509_STORE_new();
|
||||||
if (cert_ctx == NULL) goto end;
|
if (cert_ctx == NULL) goto end;
|
||||||
@@ -100,6 +102,9 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
for (;;)
|
for (;;)
|
||||||
@@ -139,11 +144,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (argc-- < 1) goto end;
|
if (argc-- < 1) goto end;
|
||||||
trustfile= *(++argv);
|
trustfile= *(++argv);
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto end;
|
if (--argc < 1) goto end;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-help") == 0)
|
else if (strcmp(*argv,"-help") == 0)
|
||||||
goto end;
|
goto end;
|
||||||
else if (strcmp(*argv,"-ignore_critical") == 0)
|
else if (strcmp(*argv,"-ignore_critical") == 0)
|
||||||
@@ -167,7 +174,9 @@ int MAIN(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file());
|
lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file());
|
||||||
if (lookup == NULL) abort();
|
if (lookup == NULL) abort();
|
||||||
@@ -216,7 +225,11 @@ int MAIN(int argc, char **argv)
|
|||||||
ret=0;
|
ret=0;
|
||||||
end:
|
end:
|
||||||
if (ret == 1) {
|
if (ret == 1) {
|
||||||
BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-crl_check] [-engine e] cert1 cert2 ...\n");
|
BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-crl_check]");
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
BIO_printf(bio_err," [-engine e]");
|
||||||
|
#endif
|
||||||
|
BIO_printf(bio_err," cert1 cert2 ...\n");
|
||||||
BIO_printf(bio_err,"recognized usages:\n");
|
BIO_printf(bio_err,"recognized usages:\n");
|
||||||
for(i = 0; i < X509_PURPOSE_get_count(); i++) {
|
for(i = 0; i < X509_PURPOSE_get_count(); i++) {
|
||||||
X509_PURPOSE *ptmp;
|
X509_PURPOSE *ptmp;
|
||||||
@@ -229,7 +242,7 @@ end:
|
|||||||
sk_X509_pop_free(untrusted, X509_free);
|
sk_X509_pop_free(untrusted, X509_free);
|
||||||
sk_X509_pop_free(trusted, X509_free);
|
sk_X509_pop_free(trusted, X509_free);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose, ENGINE *e)
|
static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose, ENGINE *e)
|
||||||
@@ -327,7 +340,8 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
|
|||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
X509_NAME_oneline(
|
X509_NAME_oneline(
|
||||||
X509_get_subject_name(ctx->current_cert),buf,256);
|
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,
|
printf("error %d at %d depth lookup:%s\n",ctx->error,
|
||||||
ctx->error_depth,
|
ctx->error_depth,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
# include <openssl/rc4.h>
|
# include <openssl/rc4.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_DES
|
#ifndef OPENSSL_NO_DES
|
||||||
# include <openssl/des_old.h>
|
# include <openssl/des.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
# include <openssl/idea.h>
|
# include <openssl/idea.h>
|
||||||
@@ -186,7 +186,7 @@ int MAIN(int argc, char **argv)
|
|||||||
printf("%s ",RC4_options());
|
printf("%s ",RC4_options());
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_DES
|
#ifndef OPENSSL_NO_DES
|
||||||
printf("%s ",des_options());
|
printf("%s ",DES_options());
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
printf("%s ",idea_options());
|
printf("%s ",idea_options());
|
||||||
@@ -200,5 +200,5 @@ int MAIN(int argc, char **argv)
|
|||||||
if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR));
|
if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR));
|
||||||
end:
|
end:
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
HDC hdc;
|
HDC hdc;
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT ps;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
char buffer[200];
|
|
||||||
static int seeded = 0;
|
static int seeded = 0;
|
||||||
|
|
||||||
switch (iMsg)
|
switch (iMsg)
|
||||||
|
|||||||
59
apps/x509.c
59
apps/x509.c
@@ -122,7 +122,7 @@ static char *x509_usage[]={
|
|||||||
" -CAkey arg - set the CA key, must be PEM format\n",
|
" -CAkey arg - set the CA key, must be PEM format\n",
|
||||||
" missing, it is assumed to be in the CA file.\n",
|
" missing, it is assumed to be in the CA file.\n",
|
||||||
" -CAcreateserial - create serial number file if it does not exist\n",
|
" -CAcreateserial - create serial number file if it does not exist\n",
|
||||||
" -CAserial - serial file\n",
|
" -CAserial arg - serial file\n",
|
||||||
" -set_serial - serial number to use\n",
|
" -set_serial - serial number to use\n",
|
||||||
" -text - print the certificate in text form\n",
|
" -text - print the certificate in text form\n",
|
||||||
" -C - print out C code forms\n",
|
" -C - print out C code forms\n",
|
||||||
@@ -131,7 +131,9 @@ static char *x509_usage[]={
|
|||||||
" -extensions - section from config file with X509V3 extensions to add\n",
|
" -extensions - section from config file with X509V3 extensions to add\n",
|
||||||
" -clrext - delete extensions before signing and input certificate\n",
|
" -clrext - delete extensions before signing and input certificate\n",
|
||||||
" -nameopt arg - various certificate name options\n",
|
" -nameopt arg - various certificate name options\n",
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
" -engine e - use engine e, possibly a hardware device.\n",
|
" -engine e - use engine e, possibly a hardware device.\n",
|
||||||
|
#endif
|
||||||
" -certopt arg - various certificate text options\n",
|
" -certopt arg - various certificate text options\n",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
@@ -183,7 +185,9 @@ int MAIN(int argc, char **argv)
|
|||||||
int need_rand = 0;
|
int need_rand = 0;
|
||||||
int checkend=0,checkoffset=0;
|
int checkend=0,checkoffset=0;
|
||||||
unsigned long nmflag = 0, certflag = 0;
|
unsigned long nmflag = 0, certflag = 0;
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
reqfile=0;
|
reqfile=0;
|
||||||
|
|
||||||
@@ -191,6 +195,9 @@ int MAIN(int argc, char **argv)
|
|||||||
|
|
||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||||
|
|
||||||
|
if (!load_config(bio_err, NULL))
|
||||||
|
goto end;
|
||||||
STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
|
STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
|
||||||
#ifdef OPENSSL_SYS_VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
@@ -242,7 +249,7 @@ int MAIN(int argc, char **argv)
|
|||||||
else if (strcmp(*argv,"-CAkeyform") == 0)
|
else if (strcmp(*argv,"-CAkeyform") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
CAformat=str2fmt(*(++argv));
|
CAkeyformat=str2fmt(*(++argv));
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-days") == 0)
|
else if (strcmp(*argv,"-days") == 0)
|
||||||
{
|
{
|
||||||
@@ -351,17 +358,13 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
if (!set_name_ex(&nmflag, *(++argv))) goto bad;
|
if (!set_name_ex(&nmflag, *(++argv))) goto bad;
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-setalias") == 0)
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
alias= *(++argv);
|
|
||||||
trustout = 1;
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
else if (strcmp(*argv,"-engine") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
engine= *(++argv);
|
engine= *(++argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-C") == 0)
|
else if (strcmp(*argv,"-C") == 0)
|
||||||
C= ++num;
|
C= ++num;
|
||||||
else if (strcmp(*argv,"-email") == 0)
|
else if (strcmp(*argv,"-email") == 0)
|
||||||
@@ -447,7 +450,9 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (need_rand)
|
if (need_rand)
|
||||||
app_RAND_load_file(NULL, bio_err, 0);
|
app_RAND_load_file(NULL, bio_err, 0);
|
||||||
@@ -476,7 +481,7 @@ bad:
|
|||||||
|
|
||||||
if (extfile)
|
if (extfile)
|
||||||
{
|
{
|
||||||
long errorline;
|
long errorline = -1;
|
||||||
X509V3_CTX ctx2;
|
X509V3_CTX ctx2;
|
||||||
extconf = NCONF_new(NULL);
|
extconf = NCONF_new(NULL);
|
||||||
if (!NCONF_load(extconf, extfile,&errorline))
|
if (!NCONF_load(extconf, extfile,&errorline))
|
||||||
@@ -767,10 +772,11 @@ bad:
|
|||||||
int y,z;
|
int y,z;
|
||||||
|
|
||||||
X509_NAME_oneline(X509_get_subject_name(x),
|
X509_NAME_oneline(X509_get_subject_name(x),
|
||||||
buf,256);
|
buf,sizeof buf);
|
||||||
BIO_printf(STDout,"/* subject:%s */\n",buf);
|
BIO_printf(STDout,"/* subject:%s */\n",buf);
|
||||||
m=X509_NAME_oneline(
|
m=X509_NAME_oneline(
|
||||||
X509_get_issuer_name(x),buf,256);
|
X509_get_issuer_name(x),buf,
|
||||||
|
sizeof buf);
|
||||||
BIO_printf(STDout,"/* issuer :%s */\n",buf);
|
BIO_printf(STDout,"/* issuer :%s */\n",buf);
|
||||||
|
|
||||||
z=i2d_X509(x,NULL);
|
z=i2d_X509(x,NULL);
|
||||||
@@ -858,18 +864,14 @@ bad:
|
|||||||
if (Upkey == NULL)
|
if (Upkey == NULL)
|
||||||
{
|
{
|
||||||
Upkey=load_key(bio_err,
|
Upkey=load_key(bio_err,
|
||||||
keyfile,keyformat, passin, e,
|
keyfile, keyformat, 0,
|
||||||
"Private key");
|
passin, e, "Private key");
|
||||||
if (Upkey == NULL) goto end;
|
if (Upkey == NULL) goto end;
|
||||||
}
|
}
|
||||||
#ifndef OPENSSL_NO_DSA
|
#ifndef OPENSSL_NO_DSA
|
||||||
if (Upkey->type == EVP_PKEY_DSA)
|
if (Upkey->type == EVP_PKEY_DSA)
|
||||||
digest=EVP_dss1();
|
digest=EVP_dss1();
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
if (Upkey->type == EVP_PKEY_ECDSA)
|
|
||||||
digest=EVP_ecdsa();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
assert(need_rand);
|
assert(need_rand);
|
||||||
if (!sign(x,Upkey,days,clrext,digest,
|
if (!sign(x,Upkey,days,clrext,digest,
|
||||||
@@ -881,18 +883,15 @@ bad:
|
|||||||
if (CAkeyfile != NULL)
|
if (CAkeyfile != NULL)
|
||||||
{
|
{
|
||||||
CApkey=load_key(bio_err,
|
CApkey=load_key(bio_err,
|
||||||
CAkeyfile,CAkeyformat, passin,
|
CAkeyfile, CAkeyformat,
|
||||||
e, "CA Private Key");
|
0, passin, e,
|
||||||
|
"CA Private Key");
|
||||||
if (CApkey == NULL) goto end;
|
if (CApkey == NULL) goto end;
|
||||||
}
|
}
|
||||||
#ifndef OPENSSL_NO_DSA
|
#ifndef OPENSSL_NO_DSA
|
||||||
if (CApkey->type == EVP_PKEY_DSA)
|
if (CApkey->type == EVP_PKEY_DSA)
|
||||||
digest=EVP_dss1();
|
digest=EVP_dss1();
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
|
||||||
if (CApkey->type == EVP_PKEY_ECDSA)
|
|
||||||
digest = EVP_ecdsa();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
assert(need_rand);
|
assert(need_rand);
|
||||||
if (!x509_certify(ctx,CAfile,digest,x,xca,
|
if (!x509_certify(ctx,CAfile,digest,x,xca,
|
||||||
@@ -913,17 +912,17 @@ bad:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
pk=load_key(bio_err,
|
pk=load_key(bio_err,
|
||||||
keyfile,FORMAT_PEM, passin, e,
|
keyfile, FORMAT_PEM, 0,
|
||||||
"request key");
|
passin, e, "request key");
|
||||||
if (pk == NULL) goto end;
|
if (pk == NULL) goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
BIO_printf(bio_err,"Generating certificate request\n");
|
BIO_printf(bio_err,"Generating certificate request\n");
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_DSA
|
||||||
if (pk->type == EVP_PKEY_DSA)
|
if (pk->type == EVP_PKEY_DSA)
|
||||||
digest=EVP_dss1();
|
digest=EVP_dss1();
|
||||||
else if (pk->type == EVP_PKEY_ECDSA)
|
#endif
|
||||||
digest=EVP_ecdsa();
|
|
||||||
|
|
||||||
rq=X509_to_X509_REQ(x,pk,digest);
|
rq=X509_to_X509_REQ(x,pk,digest);
|
||||||
EVP_PKEY_free(pk);
|
EVP_PKEY_free(pk);
|
||||||
@@ -1020,7 +1019,7 @@ end:
|
|||||||
sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
|
sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
|
||||||
if (passin) OPENSSL_free(passin);
|
if (passin) OPENSSL_free(passin);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
|
static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
|
||||||
@@ -1078,7 +1077,7 @@ static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!a2i_ASN1_INTEGER(io,bs,buf2,1024))
|
if (!a2i_ASN1_INTEGER(io,bs,buf2,sizeof buf2))
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"unable to load serial number from %s\n",buf);
|
BIO_printf(bio_err,"unable to load serial number from %s\n",buf);
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
@@ -1146,7 +1145,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
|
|||||||
else if (!(bs = load_serial(CAfile, serialfile, create)))
|
else if (!(bs = load_serial(CAfile, serialfile, create)))
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
if (!X509_STORE_add_cert(ctx,x)) goto end;
|
/* if (!X509_STORE_add_cert(ctx,x)) goto end;*/
|
||||||
|
|
||||||
/* NOTE: this certificate can/should be self signed, unless it was
|
/* NOTE: this certificate can/should be self signed, unless it was
|
||||||
* a certificate request in which case it is not. */
|
* a certificate request in which case it is not. */
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ RC4-MD5, but a re-connect tries to use DES-CBC-SHA. So netscape, when
|
|||||||
doing a re-connect, always takes the first cipher in the cipher list.
|
doing a re-connect, always takes the first cipher in the cipher list.
|
||||||
|
|
||||||
If we accept a netscape connection, demand a client cert, have a
|
If we accept a netscape connection, demand a client cert, have a
|
||||||
non-self-sighed CA which does not have it's CA in netscape, and the
|
non-self-signed CA which does not have it's CA in netscape, and the
|
||||||
browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta
|
browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta
|
||||||
|
|
||||||
Netscape browsers do not really notice the server sending a
|
Netscape browsers do not really notice the server sending a
|
||||||
|
|||||||
144
config
144
config
@@ -74,34 +74,27 @@ if [ "x$XREL" != "x" ]; then
|
|||||||
echo "whatever-whatever-sco5"; exit 0
|
echo "whatever-whatever-sco5"; exit 0
|
||||||
;;
|
;;
|
||||||
4.2MP)
|
4.2MP)
|
||||||
if [ "x$VERSION" = "x2.01" ]; then
|
case "x${VERSION}" in
|
||||||
echo "${MACHINE}-whatever-unixware201"; exit 0
|
x2.0*) echo "whatever-whatever-unixware20"; exit 0 ;;
|
||||||
elif [ "x$VERSION" = "x2.02" ]; then
|
x2.1*) echo "whatever-whatever-unixware21"; exit 0 ;;
|
||||||
echo "${MACHINE}-whatever-unixware202"; exit 0
|
x2*) echo "whatever-whatever-unixware2"; exit 0 ;;
|
||||||
elif [ "x$VERSION" = "x2.03" ]; then
|
esac
|
||||||
echo "${MACHINE}-whatever-unixware203"; exit 0
|
|
||||||
elif [ "x$VERSION" = "x2.1.1" ]; then
|
|
||||||
echo "${MACHINE}-whatever-unixware211"; exit 0
|
|
||||||
elif [ "x$VERSION" = "x2.1.2" ]; then
|
|
||||||
echo "${MACHINE}-whatever-unixware212"; exit 0
|
|
||||||
elif [ "x$VERSION" = "x2.1.3" ]; then
|
|
||||||
echo "${MACHINE}-whatever-unixware213"; exit 0
|
|
||||||
else
|
|
||||||
echo "${MACHINE}-whatever-unixware2"; exit 0
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
4.2)
|
4.2)
|
||||||
echo "whatever-whatever-unixware1"; exit 0
|
echo "i386-whatever-unixware1"; exit 0
|
||||||
;;
|
|
||||||
OpenUNIX)
|
|
||||||
if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x8" ]; then
|
|
||||||
echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
5)
|
5)
|
||||||
if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x7" ]; then
|
case "x${VERSION}" in
|
||||||
echo "${MACHINE}-sco-unixware7"; exit 0
|
# We hardcode i586 in place of ${MACHINE} for the
|
||||||
fi
|
# following reason. The catch is that even though Pentium
|
||||||
|
# is minimum requirement for platforms in question,
|
||||||
|
# ${MACHINE} gets always assigned to i386. Now, problem
|
||||||
|
# with i386 is that it makes ./config pass 386 to
|
||||||
|
# ./Configure, which in turn makes make generate
|
||||||
|
# inefficient SHA-1 (for this moment) code.
|
||||||
|
x7*) echo "i586-sco-unixware7"; exit 0 ;;
|
||||||
|
x8*) echo "i586-unkn-OpenUNIX${VERSION}"; exit 0 ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@@ -196,7 +189,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
|||||||
echo "${MACHINE}-whatever-bsdi"; exit 0
|
echo "${MACHINE}-whatever-bsdi"; exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
FreeBSD:*)
|
FreeBSD:*:*:*386*)
|
||||||
VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
|
VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
|
||||||
MACH=`sysctl -n hw.model`
|
MACH=`sysctl -n hw.model`
|
||||||
ARCH='whatever'
|
ARCH='whatever'
|
||||||
@@ -205,7 +198,6 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
|||||||
*486* ) MACH="i486" ;;
|
*486* ) MACH="i486" ;;
|
||||||
Pentium\ II*) MACH="i686" ;;
|
Pentium\ II*) MACH="i686" ;;
|
||||||
Pentium* ) MACH="i586" ;;
|
Pentium* ) MACH="i586" ;;
|
||||||
Alpha* ) MACH="alpha" ;;
|
|
||||||
* ) MACH="$MACHINE" ;;
|
* ) MACH="$MACHINE" ;;
|
||||||
esac
|
esac
|
||||||
case ${MACH} in
|
case ${MACH} in
|
||||||
@@ -214,6 +206,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
|||||||
echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
|
echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
FreeBSD:*)
|
||||||
|
echo "${MACHINE}-whatever-freebsd"; exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
NetBSD:*:*:*386*)
|
NetBSD:*:*:*386*)
|
||||||
echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
|
echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
|
||||||
;;
|
;;
|
||||||
@@ -344,6 +340,17 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*"CRAY T3E")
|
||||||
|
echo "t3e-cray-unicosmk"; exit 0;
|
||||||
|
;;
|
||||||
|
|
||||||
|
*CRAY*)
|
||||||
|
echo "j90-cray-unicos"; exit 0;
|
||||||
|
;;
|
||||||
|
|
||||||
|
NONSTOP_KERNEL*)
|
||||||
|
echo "nsr-tandem-nsk"; exit 0;
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -383,18 +390,33 @@ exit 0
|
|||||||
|
|
||||||
# figure out if gcc is available and if so we use it otherwise
|
# figure out if gcc is available and if so we use it otherwise
|
||||||
# we fallback to whatever cc does on the system
|
# we fallback to whatever cc does on the system
|
||||||
GCCVER=`(gcc --version) 2>/dev/null`
|
GCCVER=`(gcc -dumpversion) 2>/dev/null`
|
||||||
if [ "$GCCVER" != "" ]; then
|
if [ "$GCCVER" != "" ]; then
|
||||||
CC=gcc
|
CC=gcc
|
||||||
# then strip off whatever prefix Cygnus prepends the number with...
|
# then strip off whatever prefix egcs prepends the number with...
|
||||||
GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'`
|
# Hopefully, this will work for any future prefixes as well.
|
||||||
|
GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z]*\-//'`
|
||||||
|
# Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion
|
||||||
|
# does give us what we want though, so we use that. We just just the
|
||||||
|
# major and minor version numbers.
|
||||||
# peak single digit before and after first dot, e.g. 2.95.1 gives 29
|
# peak single digit before and after first dot, e.g. 2.95.1 gives 29
|
||||||
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
|
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
|
||||||
else
|
else
|
||||||
CC=cc
|
CC=cc
|
||||||
fi
|
fi
|
||||||
GCCVER=${GCCVER:-0}
|
GCCVER=${GCCVER:-0}
|
||||||
|
if [ "$SYSTEM" = "HP-UX" ];then
|
||||||
|
# By default gcc is a ILP32 compiler (with long long == 64).
|
||||||
|
GCC_BITS="32"
|
||||||
|
if [ $GCCVER -ge 30 ]; then
|
||||||
|
# PA64 support only came in with gcc 3.0.x.
|
||||||
|
# We look for the preprocessor symbol __LP64__ indicating
|
||||||
|
# 64bit bit long and pointer. sizeof(int) == 32 on HPUX64.
|
||||||
|
if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then
|
||||||
|
GCC_BITS="64"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [ "$SYSTEM" = "SunOS" ]; then
|
if [ "$SYSTEM" = "SunOS" ]; then
|
||||||
if [ $GCCVER -ge 30 ]; then
|
if [ $GCCVER -ge 30 ]; then
|
||||||
# 64-bit ABI isn't officially supported in gcc 3.0, but it appears
|
# 64-bit ABI isn't officially supported in gcc 3.0, but it appears
|
||||||
@@ -435,6 +457,10 @@ if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc
|
||||||
|
(cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc
|
||||||
|
fi
|
||||||
|
|
||||||
CCVER=${CCVER:-0}
|
CCVER=${CCVER:-0}
|
||||||
|
|
||||||
# read the output of the embedded GuessOS
|
# read the output of the embedded GuessOS
|
||||||
@@ -447,7 +473,7 @@ echo Operating system: $GUESSOS
|
|||||||
# more time that I want to waste at the moment
|
# more time that I want to waste at the moment
|
||||||
case "$GUESSOS" in
|
case "$GUESSOS" in
|
||||||
mips2-sgi-irix)
|
mips2-sgi-irix)
|
||||||
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||||
CPU=${CPU:-0}
|
CPU=${CPU:-0}
|
||||||
if [ $CPU -ge 4000 ]; then
|
if [ $CPU -ge 4000 ]; then
|
||||||
options="$options -mips2"
|
options="$options -mips2"
|
||||||
@@ -455,7 +481,7 @@ case "$GUESSOS" in
|
|||||||
OUT="irix-$CC"
|
OUT="irix-$CC"
|
||||||
;;
|
;;
|
||||||
mips3-sgi-irix)
|
mips3-sgi-irix)
|
||||||
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||||
CPU=${CPU:-0}
|
CPU=${CPU:-0}
|
||||||
if [ $CPU -ge 5000 ]; then
|
if [ $CPU -ge 5000 ]; then
|
||||||
options="$options -mips4"
|
options="$options -mips4"
|
||||||
@@ -471,7 +497,7 @@ case "$GUESSOS" in
|
|||||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||||
fi
|
fi
|
||||||
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||||
CPU=${CPU:-0}
|
CPU=${CPU:-0}
|
||||||
if [ $CPU -ge 5000 ]; then
|
if [ $CPU -ge 5000 ]; then
|
||||||
options="$options -mips4"
|
options="$options -mips4"
|
||||||
@@ -510,6 +536,10 @@ EOF
|
|||||||
${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
|
${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
|
||||||
rm dummy dummy.c
|
rm dummy dummy.c
|
||||||
;;
|
;;
|
||||||
|
ppc64-*-linux2)
|
||||||
|
#Use the standard target for PPC architecture until we create a
|
||||||
|
#special one for the 64bit architecture.
|
||||||
|
OUT="linux-ppc" ;;
|
||||||
ppc-*-linux2) OUT="linux-ppc" ;;
|
ppc-*-linux2) OUT="linux-ppc" ;;
|
||||||
m68k-*-linux*) OUT="linux-m68k" ;;
|
m68k-*-linux*) OUT="linux-m68k" ;;
|
||||||
ia64-*-linux?) OUT="linux-ia64" ;;
|
ia64-*-linux?) OUT="linux-ia64" ;;
|
||||||
@@ -517,12 +547,13 @@ EOF
|
|||||||
ppc-apple-darwin*) OUT="darwin-ppc-cc" ;;
|
ppc-apple-darwin*) OUT="darwin-ppc-cc" ;;
|
||||||
i386-apple-darwin*) OUT="darwin-i386-cc" ;;
|
i386-apple-darwin*) OUT="darwin-i386-cc" ;;
|
||||||
sparc64-*-linux2)
|
sparc64-*-linux2)
|
||||||
#Before we can uncomment following lines we have to wait at least
|
echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI"
|
||||||
#till 64-bit glibc for SPARC is operational:-(
|
echo " and wish to build 64-bit library, then you have to"
|
||||||
#echo "WARNING! If you wish to build 64-bit library, then you have to"
|
echo " invoke './Configure linux64-sparcv9' *manually*."
|
||||||
#echo " invoke './Configure linux64-sparcv9' *manually*."
|
if [ "$TEST" = "false" ]; then
|
||||||
#echo " Type return if you want to continue, Ctrl-C to abort."
|
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||||
#read waste < /dev/tty
|
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||||
|
fi
|
||||||
OUT="linux-sparcv9" ;;
|
OUT="linux-sparcv9" ;;
|
||||||
sparc-*-linux2)
|
sparc-*-linux2)
|
||||||
KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
|
KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
|
||||||
@@ -555,6 +586,7 @@ EOF
|
|||||||
arm*-*-linux2) OUT="linux-elf-arm" ;;
|
arm*-*-linux2) OUT="linux-elf-arm" ;;
|
||||||
s390-*-linux2) OUT="linux-s390" ;;
|
s390-*-linux2) OUT="linux-s390" ;;
|
||||||
s390x-*-linux?) OUT="linux-s390x" ;;
|
s390x-*-linux?) OUT="linux-s390x" ;;
|
||||||
|
x86_64-*-linux?) OUT="linux-x86_64" ;;
|
||||||
*-*-linux2) OUT="linux-elf"
|
*-*-linux2) OUT="linux-elf"
|
||||||
if [ "$GCCVER" -gt 28 ]; then
|
if [ "$GCCVER" -gt 28 ]; then
|
||||||
if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then
|
if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then
|
||||||
@@ -608,14 +640,24 @@ EOF
|
|||||||
*86*-*-solaris2) OUT="solaris-x86-$CC" ;;
|
*86*-*-solaris2) OUT="solaris-x86-$CC" ;;
|
||||||
*-*-sunos4) OUT="sunos-$CC" ;;
|
*-*-sunos4) OUT="sunos-$CC" ;;
|
||||||
alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
|
alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
|
||||||
|
sparc64-*-freebsd*) OUT="FreeBSD-sparc64" ;;
|
||||||
|
ia64-*-freebsd*) OUT="FreeBSD-ia64" ;;
|
||||||
*-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
|
*-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
|
||||||
*-freebsd[1-2]*) OUT="FreeBSD" ;;
|
*-freebsd[1-2]*) OUT="FreeBSD" ;;
|
||||||
*86*-*-netbsd) OUT="NetBSD-x86" ;;
|
*86*-*-netbsd) OUT="NetBSD-x86" ;;
|
||||||
sun3*-*-netbsd) OUT="NetBSD-m68" ;;
|
sun3*-*-netbsd) OUT="NetBSD-m68" ;;
|
||||||
*-*-netbsd) OUT="NetBSD-sparc" ;;
|
*-*-netbsd) OUT="NetBSD-sparc" ;;
|
||||||
*86*-*-openbsd) OUT="OpenBSD-x86" ;;
|
|
||||||
alpha*-*-openbsd) OUT="OpenBSD-alpha" ;;
|
alpha*-*-openbsd) OUT="OpenBSD-alpha" ;;
|
||||||
|
*86*-*-openbsd) OUT="OpenBSD-i386" ;;
|
||||||
|
m68k*-*-openbsd) OUT="OpenBSD-m68k" ;;
|
||||||
|
m88k*-*-openbsd) OUT="OpenBSD-m88k" ;;
|
||||||
|
mips*-*-openbsd) OUT="OpenBSD-mips" ;;
|
||||||
pmax*-*-openbsd) OUT="OpenBSD-mips" ;;
|
pmax*-*-openbsd) OUT="OpenBSD-mips" ;;
|
||||||
|
powerpc*-*-openbsd) OUT="OpenBSD-powerpc" ;;
|
||||||
|
sparc64*-*-openbsd) OUT="OpenBSD-sparc64" ;;
|
||||||
|
sparc*-*-openbsd) OUT="OpenBSD-sparc" ;;
|
||||||
|
vax*-*-openbsd) OUT="OpenBSD-vax" ;;
|
||||||
|
hppa*-*-openbsd) OUT="OpenBSD-hppa" ;;
|
||||||
*-*-openbsd) OUT="OpenBSD" ;;
|
*-*-openbsd) OUT="OpenBSD" ;;
|
||||||
*86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
|
*86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
|
||||||
*-*-osf) OUT="alphaold-cc" ;;
|
*-*-osf) OUT="alphaold-cc" ;;
|
||||||
@@ -640,16 +682,27 @@ EOF
|
|||||||
RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
|
RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
|
||||||
*-siemens-sysv4) OUT="SINIX" ;;
|
*-siemens-sysv4) OUT="SINIX" ;;
|
||||||
*-hpux1*)
|
*-hpux1*)
|
||||||
OUT="hpux-parisc-$CC"
|
if [ $CC = "gcc" ];
|
||||||
|
then
|
||||||
|
if [ $GCC_BITS = "64" ]; then
|
||||||
|
OUT="hpux64-parisc-gcc"
|
||||||
|
else
|
||||||
|
OUT="hpux-parisc-gcc"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
OUT="hpux-parisc-$CC"
|
||||||
|
fi
|
||||||
KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
|
KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
|
||||||
KERNEL_BITS=${KERNEL_BITS:-32}
|
KERNEL_BITS=${KERNEL_BITS:-32}
|
||||||
CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null`
|
CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null`
|
||||||
CPU_VERSION=${CPU_VERSION:-0}
|
CPU_VERSION=${CPU_VERSION:-0}
|
||||||
# See <sys/unistd.h> for further info on CPU_VERSION.
|
# See <sys/unistd.h> for further info on CPU_VERSION.
|
||||||
if [ $CPU_VERSION -ge 768 ]; then # IA-64 CPU
|
if [ $CPU_VERSION -ge 768 ]; then # IA-64 CPU
|
||||||
echo "NOTICE! 64-bit is the only ABI currently operational on HP-UXi."
|
echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi."
|
||||||
echo " Post request to openssl-dev@openssl.org for 32-bit support."
|
echo " If you wish to build 32-bit library, the you have to"
|
||||||
|
echo " invoke './Configure hpux-ia32-cc' *manually*."
|
||||||
if [ "$TEST" = "false" ]; then
|
if [ "$TEST" = "false" ]; then
|
||||||
|
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||||
fi
|
fi
|
||||||
OUT="hpux64-ia64-cc"
|
OUT="hpux64-ia64-cc"
|
||||||
@@ -680,6 +733,9 @@ EOF
|
|||||||
mips-sony-newsos4) OUT="newsos4-gcc" ;;
|
mips-sony-newsos4) OUT="newsos4-gcc" ;;
|
||||||
*-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
|
*-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
|
||||||
*-*-cygwin) OUT="Cygwin" ;;
|
*-*-cygwin) OUT="Cygwin" ;;
|
||||||
|
t3e-cray-unicosmk) OUT="cray-t3e" ;;
|
||||||
|
j90-cray-unicos) OUT="cray-j90" ;;
|
||||||
|
nsr-tandem-nsk) OUT="tandem-c89" ;;
|
||||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -714,7 +770,7 @@ case "$GUESSOS" in
|
|||||||
i386-*) options="$options 386" ;;
|
i386-*) options="$options 386" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for i in bf cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 rijndael ripemd rsa sha
|
for i in bf cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 aes ripemd rsa sha
|
||||||
do
|
do
|
||||||
if [ ! -d crypto/$i ]
|
if [ ! -d crypto/$i ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ LIBS=
|
|||||||
|
|
||||||
SDIRS= md2 md5 sha mdc2 hmac ripemd \
|
SDIRS= md2 md5 sha mdc2 hmac ripemd \
|
||||||
des rc2 rc4 rc5 idea bf cast \
|
des rc2 rc4 rc5 idea bf cast \
|
||||||
bn ec rsa dsa ecdsa dh dso engine aes \
|
bn ec rsa dsa dh dso engine aes \
|
||||||
buffer bio stack lhash rand err objects \
|
buffer bio stack lhash rand err objects \
|
||||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
||||||
|
|
||||||
@@ -36,14 +36,14 @@ GENERAL=Makefile README crypto-lib.com install.com
|
|||||||
|
|
||||||
LIB= $(TOP)/libcrypto.a
|
LIB= $(TOP)/libcrypto.a
|
||||||
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
||||||
LIBSRC= cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c
|
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_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o
|
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)
|
SRC= $(LIBSRC)
|
||||||
|
|
||||||
EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
|
EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
|
||||||
ossl_typ.h
|
ossl_typ.h
|
||||||
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h $(EXHEADER)
|
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h $(EXHEADER)
|
||||||
|
|
||||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||||
|
|
||||||
@@ -54,11 +54,11 @@ all: buildinf.h lib subdirs shared
|
|||||||
|
|
||||||
buildinf.h: ../Makefile.ssl
|
buildinf.h: ../Makefile.ssl
|
||||||
( echo "#ifndef MK1MF_BUILD"; \
|
( echo "#ifndef MK1MF_BUILD"; \
|
||||||
echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
|
echo ' /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
|
||||||
echo " #define CFLAGS \"$(CC) $(CFLAG)\""; \
|
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
|
||||||
echo " #define PLATFORM \"$(PLATFORM)\""; \
|
echo ' #define PLATFORM "$(PLATFORM)"'; \
|
||||||
echo " #define DATE \"`date`\""; \
|
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
||||||
echo "#endif" ) >buildinf.h
|
echo '#endif' ) >buildinf.h
|
||||||
|
|
||||||
testapps:
|
testapps:
|
||||||
if echo ${SDIRS} | fgrep ' des '; \
|
if echo ${SDIRS} | fgrep ' des '; \
|
||||||
@@ -98,7 +98,7 @@ lib: $(LIBOBJ)
|
|||||||
|
|
||||||
shared:
|
shared:
|
||||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||||
(cd ..; make $(SHARED_LIB)); \
|
(cd ..; $(MAKE) $(SHARED_LIB)); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
libs:
|
libs:
|
||||||
@@ -136,12 +136,12 @@ lint:
|
|||||||
|
|
||||||
depend:
|
depend:
|
||||||
if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
|
if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
|
||||||
$(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||||
if [ ! -s buildinf.h ]; then rm buildinf.h; fi
|
if [ ! -s buildinf.h ]; then rm buildinf.h; fi
|
||||||
@for i in $(SDIRS) ;\
|
@for i in $(SDIRS) ;\
|
||||||
do \
|
do \
|
||||||
(cd $$i && echo "making depend in crypto/$$i..." && \
|
(cd $$i && echo "making depend in crypto/$$i..." && \
|
||||||
$(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
|
$(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@@ -180,7 +180,7 @@ cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
|||||||
cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||||
cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c
|
cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c
|
||||||
ebcdic.o: ../include/openssl/opensslconf.h ebcdic.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: ../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/crypto.h ../include/openssl/e_os2.h
|
||||||
ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||||
@@ -193,12 +193,18 @@ mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
|||||||
mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||||
mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c
|
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/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: ../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/crypto.h ../include/openssl/e_os2.h
|
||||||
mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.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/opensslconf.h ../include/openssl/opensslv.h
|
||||||
mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||||
mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
|
mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
|
||||||
|
o_str.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_str.c
|
||||||
|
o_str.o: o_str.h
|
||||||
o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
|
o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
|
||||||
o_time.o: o_time.h
|
o_time.o: o_time.h
|
||||||
tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ TEST=
|
|||||||
APPS=
|
APPS=
|
||||||
|
|
||||||
LIB=$(TOP)/libcrypto.a
|
LIB=$(TOP)/libcrypto.a
|
||||||
LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c
|
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
|
LIBOBJ=aes_core.o aes_misc.o aes_ecb.o aes_cbc.o aes_cfb.o aes_ofb.o aes_ctr.o
|
||||||
|
|
||||||
SRC= $(LIBSRC)
|
SRC= $(LIBSRC)
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ files:
|
|||||||
links:
|
links:
|
||||||
@$(TOP)/util/point.sh Makefile.ssl Makefile
|
@$(TOP)/util/point.sh Makefile.ssl Makefile
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@#$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
|
|
||||||
install: installs
|
install: installs
|
||||||
@@ -75,7 +75,7 @@ lint:
|
|||||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||||
|
|
||||||
dclean:
|
dclean:
|
||||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||||
@@ -88,10 +88,17 @@ clean:
|
|||||||
|
|
||||||
aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
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_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_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.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
|
aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||||
aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
|
aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
|
||||||
aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||||
aes_misc.o: ../../include/openssl/opensslconf.h
|
aes_misc.o: ../../include/openssl/opensslconf.h
|
||||||
aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c
|
aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c
|
||||||
|
aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||||
|
aes_ofb.o: ../../include/openssl/opensslconf.h aes_locl.h aes_ofb.c
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */
|
/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1998-2001 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -56,10 +56,13 @@
|
|||||||
#error AES is disabled.
|
#error AES is disabled.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const int AES_DECRYPT = 0;
|
#define AES_ENCRYPT 1
|
||||||
static const int AES_ENCRYPT = 1;
|
#define AES_DECRYPT 0
|
||||||
#define AES_MAXNR 14 /* array size can't be a const in C */
|
|
||||||
static const int AES_BLOCK_SIZE = 16; /* bytes */
|
/* Because array size can't be a const in C, the following two are macros.
|
||||||
|
Both sizes are in bytes. */
|
||||||
|
#define AES_MAXNR 14
|
||||||
|
#define AES_BLOCK_SIZE 16
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -74,17 +77,42 @@ typedef struct aes_key_st AES_KEY;
|
|||||||
|
|
||||||
const char *AES_options(void);
|
const char *AES_options(void);
|
||||||
|
|
||||||
int AES_set_encrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key);
|
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||||
int AES_set_decrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key);
|
AES_KEY *key);
|
||||||
|
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||||
|
AES_KEY *key);
|
||||||
|
|
||||||
void AES_encrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key);
|
void AES_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
void AES_decrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key);
|
const AES_KEY *key);
|
||||||
|
void AES_decrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const AES_KEY *key);
|
||||||
|
|
||||||
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
const AES_KEY *key, const int enc);
|
const AES_KEY *key, const int enc);
|
||||||
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
const unsigned long length, const AES_KEY *key,
|
const unsigned long length, const AES_KEY *key,
|
||||||
unsigned char *ivec, const int enc);
|
unsigned char *ivec, const int enc);
|
||||||
|
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char *ivec, int *num, const int enc);
|
||||||
|
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char *ivec, int *num, const int enc);
|
||||||
|
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char *ivec, int *num, const int enc);
|
||||||
|
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);
|
||||||
|
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char *ivec, int *num);
|
||||||
|
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char ivec[AES_BLOCK_SIZE],
|
||||||
|
unsigned char ecount_buf[AES_BLOCK_SIZE],
|
||||||
|
unsigned int *num);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* crypto/aes/aes_cbc.c -*- mode:C; c-file-style: "eay" -*- */
|
/* crypto/aes/aes_cbc.c -*- mode:C; c-file-style: "eay" -*- */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1998-2001 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -49,7 +49,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef AES_DEBUG
|
||||||
|
# ifndef NDEBUG
|
||||||
|
# define NDEBUG
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <openssl/aes.h>
|
#include <openssl/aes.h>
|
||||||
#include "aes_locl.h"
|
#include "aes_locl.h"
|
||||||
|
|
||||||
@@ -57,33 +63,49 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
|||||||
const unsigned long length, const AES_KEY *key,
|
const unsigned long length, const AES_KEY *key,
|
||||||
unsigned char *ivec, const int enc) {
|
unsigned char *ivec, const int enc) {
|
||||||
|
|
||||||
int n;
|
unsigned long n;
|
||||||
unsigned long len = length;
|
unsigned long len = length;
|
||||||
unsigned char tmp[16];
|
unsigned char tmp[AES_BLOCK_SIZE];
|
||||||
|
|
||||||
assert(in && out && key && ivec);
|
assert(in && out && key && ivec);
|
||||||
assert(length % AES_BLOCK_SIZE == 0);
|
|
||||||
assert((AES_ENCRYPT == enc)||(AES_DECRYPT == enc));
|
assert((AES_ENCRYPT == enc)||(AES_DECRYPT == enc));
|
||||||
|
|
||||||
if (AES_ENCRYPT == enc)
|
if (AES_ENCRYPT == enc) {
|
||||||
while (len > 0) {
|
while (len >= AES_BLOCK_SIZE) {
|
||||||
for(n=0; n < 16; ++n)
|
for(n=0; n < AES_BLOCK_SIZE; ++n)
|
||||||
tmp[n] = in[n] ^ ivec[n];
|
tmp[n] = in[n] ^ ivec[n];
|
||||||
AES_encrypt(tmp, out, key);
|
AES_encrypt(tmp, out, key);
|
||||||
memcpy(ivec, out, 16);
|
memcpy(ivec, out, AES_BLOCK_SIZE);
|
||||||
len -= 16;
|
len -= AES_BLOCK_SIZE;
|
||||||
in += 16;
|
in += AES_BLOCK_SIZE;
|
||||||
out += 16;
|
out += AES_BLOCK_SIZE;
|
||||||
}
|
}
|
||||||
else
|
if (len) {
|
||||||
while (len > 0) {
|
for(n=0; n < len; ++n)
|
||||||
memcpy(tmp, in, 16);
|
tmp[n] = in[n] ^ ivec[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);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
while (len >= AES_BLOCK_SIZE) {
|
||||||
|
memcpy(tmp, in, AES_BLOCK_SIZE);
|
||||||
AES_decrypt(in, out, key);
|
AES_decrypt(in, out, key);
|
||||||
for(n=0; n < 16; ++n)
|
for(n=0; n < AES_BLOCK_SIZE; ++n)
|
||||||
out[n] ^= ivec[n];
|
out[n] ^= ivec[n];
|
||||||
memcpy(ivec, tmp, 16);
|
memcpy(ivec, tmp, AES_BLOCK_SIZE);
|
||||||
len -= 16;
|
len -= AES_BLOCK_SIZE;
|
||||||
in += 16;
|
in += AES_BLOCK_SIZE;
|
||||||
out += 16;
|
out += AES_BLOCK_SIZE;
|
||||||
}
|
}
|
||||||
|
if (len) {
|
||||||
|
memcpy(tmp, in, AES_BLOCK_SIZE);
|
||||||
|
AES_decrypt(tmp, tmp, key);
|
||||||
|
for(n=0; n < len; ++n)
|
||||||
|
out[n] ^= ivec[n];
|
||||||
|
memcpy(ivec, tmp, AES_BLOCK_SIZE);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* crypto/ecdsa/ecdsa_vrf.c */
|
/* crypto/aes/aes_cfb.c -*- mode:C; c-file-style: "eay" -*- */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -17,12 +17,12 @@
|
|||||||
* 3. All advertising materials mentioning features or use of this
|
* 3. All advertising materials mentioning features or use of this
|
||||||
* software must display the following acknowledgment:
|
* software must display the following acknowledgment:
|
||||||
* "This product includes software developed by the OpenSSL Project
|
* "This product includes software developed by the OpenSSL Project
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||||
*
|
*
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||||
* endorse or promote products derived from this software without
|
* endorse or promote products derived from this software without
|
||||||
* prior written permission. For written permission, please contact
|
* prior written permission. For written permission, please contact
|
||||||
* openssl-core@OpenSSL.org.
|
* openssl-core@openssl.org.
|
||||||
*
|
*
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
* 5. Products derived from this software may not be called "OpenSSL"
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
* nor may "OpenSSL" appear in their names without prior written
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
* 6. Redistributions of any form whatsoever must retain the following
|
* 6. Redistributions of any form whatsoever must retain the following
|
||||||
* acknowledgment:
|
* acknowledgment:
|
||||||
* "This product includes software developed by the OpenSSL Project
|
* "This product includes software developed by the OpenSSL Project
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
@@ -47,10 +47,6 @@
|
|||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
* 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 (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@@ -108,34 +104,147 @@
|
|||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
#include <openssl/ecdsa.h>
|
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
/* returns
|
#ifndef AES_DEBUG
|
||||||
* 1: correct signature
|
# ifndef NDEBUG
|
||||||
* 0: incorrect signature
|
# define NDEBUG
|
||||||
* -1: error
|
# endif
|
||||||
|
#endif
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include <openssl/aes.h>
|
||||||
|
#include "aes_locl.h"
|
||||||
|
|
||||||
|
/* The input and output encrypted as though 128bit cfb mode is being
|
||||||
|
* used. The extra state information to record how much of the
|
||||||
|
* 128bit block we have used is contained in *num;
|
||||||
*/
|
*/
|
||||||
int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, ECDSA *ecdsa)
|
|
||||||
|
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char *ivec, int *num, const int enc) {
|
||||||
|
|
||||||
|
unsigned int n;
|
||||||
|
unsigned long l = length;
|
||||||
|
unsigned char c;
|
||||||
|
|
||||||
|
assert(in && out && key && ivec && num);
|
||||||
|
|
||||||
|
n = *num;
|
||||||
|
|
||||||
|
if (enc) {
|
||||||
|
while (l--) {
|
||||||
|
if (n == 0) {
|
||||||
|
AES_encrypt(ivec, ivec, key);
|
||||||
|
}
|
||||||
|
ivec[n] = *(out++) = *(in++) ^ ivec[n];
|
||||||
|
n = (n+1) % AES_BLOCK_SIZE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
while (l--) {
|
||||||
|
if (n == 0) {
|
||||||
|
AES_encrypt(ivec, ivec, key);
|
||||||
|
}
|
||||||
|
c = *(in);
|
||||||
|
*(out++) = *(in++) ^ ivec[n];
|
||||||
|
ivec[n] = c;
|
||||||
|
n = (n+1) % AES_BLOCK_SIZE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*num=n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
unsigned char ovec[AES_BLOCK_SIZE*2];
|
||||||
|
|
||||||
|
assert(in && out && key && ivec);
|
||||||
|
if(enc)
|
||||||
{
|
{
|
||||||
return ecdsa->meth->ecdsa_do_verify(dgst, dgst_len, sig, ecdsa);
|
/* 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)
|
||||||
|
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
|
||||||
/* returns
|
{
|
||||||
* 1: correct signature
|
/* construct the new IV in the first half of ovec */
|
||||||
* 0: incorrect signature
|
AES_encrypt(ivec,ovec,key);
|
||||||
* -1: error
|
/* decrypt the input */
|
||||||
*/
|
for(n=0 ; n < (nbits+7)/8 ; ++n)
|
||||||
int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, const unsigned char *sigbuf, int sig_len, ECDSA *ecdsa)
|
out[n]=in[n]^ovec[n];
|
||||||
{
|
/* fill in the first half of the new IV with the current IV */
|
||||||
ECDSA_SIG *s;
|
memcpy(ovec,ivec,AES_BLOCK_SIZE);
|
||||||
int ret=-1;
|
/* append the ciphertext */
|
||||||
|
memcpy(ovec+AES_BLOCK_SIZE,in,(nbits+7)/8);
|
||||||
s = ECDSA_SIG_new();
|
/* shift ovec left most of the bits... */
|
||||||
if (s == NULL) return(ret);
|
memmove(ovec,ovec+nbits/8,AES_BLOCK_SIZE+(nbits%8 ? 1 : 0));
|
||||||
if (d2i_ECDSA_SIG(&s,&sigbuf,sig_len) == NULL) goto err;
|
/* now the remaining bits */
|
||||||
ret=ECDSA_do_verify(dgst,dgst_len,s,ecdsa);
|
if(nbits%8 != 0)
|
||||||
err:
|
for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
|
||||||
ECDSA_SIG_free(s);
|
{
|
||||||
return(ret);
|
ovec[n]<<=nbits%8;
|
||||||
|
ovec[n]|=ovec[n+1]>>(8-nbits%8);
|
||||||
|
}
|
||||||
|
/* finally, move it back into place */
|
||||||
|
memcpy(ivec,ovec,AES_BLOCK_SIZE);
|
||||||
}
|
}
|
||||||
|
/* it is not necessary to cleanse ovec, since the IV is not secret */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* N.B. This expects the input to be packed, MS bit first */
|
||||||
|
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char *ivec, int *num, const int enc)
|
||||||
|
{
|
||||||
|
unsigned int n;
|
||||||
|
unsigned char c[1],d[1];
|
||||||
|
|
||||||
|
assert(in && out && key && ivec && num);
|
||||||
|
assert(*num == 0);
|
||||||
|
|
||||||
|
memset(out,0,(length+7)/8);
|
||||||
|
for(n=0 ; n < length ; ++n)
|
||||||
|
{
|
||||||
|
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
|
||||||
|
AES_cfbr_encrypt_block(c,d,1,key,ivec,enc);
|
||||||
|
out[n/8]=(out[n/8]&~(1 << (7-n%8)))|((d[0]&0x80) >> (n%8));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char *ivec, int *num, const int enc)
|
||||||
|
{
|
||||||
|
unsigned int n;
|
||||||
|
|
||||||
|
assert(in && out && key && ivec && num);
|
||||||
|
assert(*num == 0);
|
||||||
|
|
||||||
|
for(n=0 ; n < length ; ++n)
|
||||||
|
AES_cfbr_encrypt_block(&in[n],&out[n],8,key,ivec,enc);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -28,11 +28,20 @@
|
|||||||
/* Note: rewritten a little bit to provide error control and an OpenSSL-
|
/* Note: rewritten a little bit to provide error control and an OpenSSL-
|
||||||
compatible API */
|
compatible API */
|
||||||
|
|
||||||
|
#ifndef AES_DEBUG
|
||||||
|
# ifndef NDEBUG
|
||||||
|
# define NDEBUG
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <openssl/aes.h>
|
#include <openssl/aes.h>
|
||||||
|
#include <openssl/fips.h>
|
||||||
#include "aes_locl.h"
|
#include "aes_locl.h"
|
||||||
|
|
||||||
|
#ifndef OPENSSL_FIPS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Te0[x] = S [x].[02, 01, 01, 03];
|
Te0[x] = S [x].[02, 01, 01, 03];
|
||||||
Te1[x] = S [x].[03, 02, 01, 01];
|
Te1[x] = S [x].[03, 02, 01, 01];
|
||||||
@@ -715,16 +724,6 @@ static const u32 rcon[] = {
|
|||||||
0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
|
0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00)
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define GETU32(p) SWAP(*((u32 *)(p)))
|
|
||||||
#define PUTU32(ct, st) { *((u32 *)(ct)) = SWAP((st)); }
|
|
||||||
#else
|
|
||||||
#define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3]))
|
|
||||||
#define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expand the cipher key into the encryption key schedule.
|
* Expand the cipher key into the encryption key schedule.
|
||||||
*/
|
*/
|
||||||
@@ -754,7 +753,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
|||||||
rk[2] = GETU32(userKey + 8);
|
rk[2] = GETU32(userKey + 8);
|
||||||
rk[3] = GETU32(userKey + 12);
|
rk[3] = GETU32(userKey + 12);
|
||||||
if (bits == 128) {
|
if (bits == 128) {
|
||||||
for (;;) {
|
while (1) {
|
||||||
temp = rk[3];
|
temp = rk[3];
|
||||||
rk[4] = rk[0] ^
|
rk[4] = rk[0] ^
|
||||||
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
||||||
@@ -774,7 +773,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
|||||||
rk[4] = GETU32(userKey + 16);
|
rk[4] = GETU32(userKey + 16);
|
||||||
rk[5] = GETU32(userKey + 20);
|
rk[5] = GETU32(userKey + 20);
|
||||||
if (bits == 192) {
|
if (bits == 192) {
|
||||||
for (;;) {
|
while (1) {
|
||||||
temp = rk[ 5];
|
temp = rk[ 5];
|
||||||
rk[ 6] = rk[ 0] ^
|
rk[ 6] = rk[ 0] ^
|
||||||
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
||||||
@@ -796,7 +795,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
|||||||
rk[6] = GETU32(userKey + 24);
|
rk[6] = GETU32(userKey + 24);
|
||||||
rk[7] = GETU32(userKey + 28);
|
rk[7] = GETU32(userKey + 28);
|
||||||
if (bits == 256) {
|
if (bits == 256) {
|
||||||
for (;;) {
|
while (1) {
|
||||||
temp = rk[ 7];
|
temp = rk[ 7];
|
||||||
rk[ 8] = rk[ 0] ^
|
rk[ 8] = rk[ 0] ^
|
||||||
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
||||||
@@ -1259,3 +1258,4 @@ void AES_decrypt(const unsigned char *in, unsigned char *out,
|
|||||||
PUTU32(out + 12, s3);
|
PUTU32(out + 12, s3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* ndef OPENSSL_FIPS */
|
||||||
|
|||||||
164
crypto/aes/aes_ctr.c
Normal file
164
crypto/aes/aes_ctr.c
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
/* crypto/aes/aes_ctr.c -*- mode:C; c-file-style: "eay" -*- */
|
||||||
|
/* ====================================================================
|
||||||
|
* 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.
|
||||||
|
* ====================================================================
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AES_DEBUG
|
||||||
|
# ifndef NDEBUG
|
||||||
|
# define NDEBUG
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include <openssl/aes.h>
|
||||||
|
#include "aes_locl.h"
|
||||||
|
|
||||||
|
/* NOTE: CTR mode is big-endian. The rest of the AES code
|
||||||
|
* is endian-neutral. */
|
||||||
|
|
||||||
|
/* increment counter (128-bit int) by 1 */
|
||||||
|
static void AES_ctr128_inc(unsigned char *counter) {
|
||||||
|
unsigned long c;
|
||||||
|
|
||||||
|
/* Grab bottom dword of counter and increment */
|
||||||
|
#ifdef L_ENDIAN
|
||||||
|
c = GETU32(counter + 0);
|
||||||
|
c++;
|
||||||
|
PUTU32(counter + 0, c);
|
||||||
|
#else
|
||||||
|
c = GETU32(counter + 12);
|
||||||
|
c++;
|
||||||
|
PUTU32(counter + 12, c);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* if no overflow, we're done */
|
||||||
|
if (c)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Grab 1st dword of counter and increment */
|
||||||
|
#ifdef L_ENDIAN
|
||||||
|
c = GETU32(counter + 4);
|
||||||
|
c++;
|
||||||
|
PUTU32(counter + 4, c);
|
||||||
|
#else
|
||||||
|
c = GETU32(counter + 8);
|
||||||
|
c++;
|
||||||
|
PUTU32(counter + 8, c);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* if no overflow, we're done */
|
||||||
|
if (c)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Grab 2nd dword of counter and increment */
|
||||||
|
#ifdef L_ENDIAN
|
||||||
|
c = GETU32(counter + 8);
|
||||||
|
c++;
|
||||||
|
PUTU32(counter + 8, c);
|
||||||
|
#else
|
||||||
|
c = GETU32(counter + 4);
|
||||||
|
c++;
|
||||||
|
PUTU32(counter + 4, c);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* if no overflow, we're done */
|
||||||
|
if (c)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Grab top dword of counter and increment */
|
||||||
|
#ifdef L_ENDIAN
|
||||||
|
c = GETU32(counter + 12);
|
||||||
|
c++;
|
||||||
|
PUTU32(counter + 12, c);
|
||||||
|
#else
|
||||||
|
c = GETU32(counter + 0);
|
||||||
|
c++;
|
||||||
|
PUTU32(counter + 0, c);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The input encrypted as though 128bit counter mode is being
|
||||||
|
* used. The extra state information to record how much of the
|
||||||
|
* 128bit block we have used is contained in *num, and the
|
||||||
|
* encrypted counter is kept in ecount_buf. Both *num and
|
||||||
|
* ecount_buf must be initialised with zeros before the first
|
||||||
|
* call to AES_ctr128_encrypt().
|
||||||
|
*
|
||||||
|
* This algorithm assumes that the counter is in the x lower bits
|
||||||
|
* of the IV (ivec), and that the application has full control over
|
||||||
|
* overflow and the rest of the IV. This implementation takes NO
|
||||||
|
* responsability for checking that the counter doesn't overflow
|
||||||
|
* into the rest of the IV when incremented.
|
||||||
|
*/
|
||||||
|
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char ivec[AES_BLOCK_SIZE],
|
||||||
|
unsigned char ecount_buf[AES_BLOCK_SIZE],
|
||||||
|
unsigned int *num) {
|
||||||
|
|
||||||
|
unsigned int n;
|
||||||
|
unsigned long l=length;
|
||||||
|
|
||||||
|
assert(in && out && key && counter && num);
|
||||||
|
assert(*num < AES_BLOCK_SIZE);
|
||||||
|
|
||||||
|
n = *num;
|
||||||
|
|
||||||
|
while (l--) {
|
||||||
|
if (n == 0) {
|
||||||
|
AES_encrypt(ivec, ecount_buf, key);
|
||||||
|
AES_ctr128_inc(ivec);
|
||||||
|
}
|
||||||
|
*(out++) = *(in++) ^ ecount_buf[n];
|
||||||
|
n = (n+1) % AES_BLOCK_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*num=n;
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/* crypto/aes/aes_ecb.c -*- mode:C; c-file-style: "eay" -*- */
|
/* crypto/aes/aes_ecb.c -*- mode:C; c-file-style: "eay" -*- */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1998-2001 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -49,7 +49,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef AES_DEBUG
|
||||||
|
# ifndef NDEBUG
|
||||||
|
# define NDEBUG
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <openssl/aes.h>
|
#include <openssl/aes.h>
|
||||||
#include "aes_locl.h"
|
#include "aes_locl.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */
|
/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1998-2001 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -60,9 +60,15 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#if defined(__STDC__) || defined(OPENSSL_SYS_VMS) || defined(M_XENIX) || defined(OPENSSL_SYS_MSDOS)
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(OPENSSL_SYS_WINCE)
|
||||||
|
# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00)
|
||||||
|
# define GETU32(p) SWAP(*((u32 *)(p)))
|
||||||
|
# define PUTU32(ct, st) { *((u32 *)(ct)) = SWAP((st)); }
|
||||||
|
#else
|
||||||
|
# define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3]))
|
||||||
|
# define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned long u32;
|
typedef unsigned long u32;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* crypto/aes/aes_misc.c -*- mode:C; c-file-style: "eay" -*- */
|
/* crypto/aes/aes_misc.c -*- mode:C; c-file-style: "eay" -*- */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1998-2001 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* crypto/ecdsa/ecs_gen.c */
|
/* crypto/aes/aes_ofb.c -*- mode:C; c-file-style: "eay" -*- */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -17,12 +17,12 @@
|
|||||||
* 3. All advertising materials mentioning features or use of this
|
* 3. All advertising materials mentioning features or use of this
|
||||||
* software must display the following acknowledgment:
|
* software must display the following acknowledgment:
|
||||||
* "This product includes software developed by the OpenSSL Project
|
* "This product includes software developed by the OpenSSL Project
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||||
*
|
*
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||||
* endorse or promote products derived from this software without
|
* endorse or promote products derived from this software without
|
||||||
* prior written permission. For written permission, please contact
|
* prior written permission. For written permission, please contact
|
||||||
* openssl-core@OpenSSL.org.
|
* openssl-core@openssl.org.
|
||||||
*
|
*
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
* 5. Products derived from this software may not be called "OpenSSL"
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
* nor may "OpenSSL" appear in their names without prior written
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
* 6. Redistributions of any form whatsoever must retain the following
|
* 6. Redistributions of any form whatsoever must retain the following
|
||||||
* acknowledgment:
|
* acknowledgment:
|
||||||
* "This product includes software developed by the OpenSSL Project
|
* "This product includes software developed by the OpenSSL Project
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
@@ -47,10 +47,6 @@
|
|||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
* 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 (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@@ -108,26 +104,39 @@
|
|||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include "cryptlib.h"
|
|
||||||
#include <openssl/evp.h>
|
|
||||||
#include <openssl/bn.h>
|
|
||||||
#include <openssl/ecdsa.h>
|
|
||||||
#include <openssl/rand.h>
|
|
||||||
#include <openssl/sha.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifndef AES_DEBUG
|
||||||
extern "C" {
|
# ifndef NDEBUG
|
||||||
|
# define NDEBUG
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
ECDSA *ECDSA_generate_parameters(int bits,
|
#include <assert.h>
|
||||||
unsigned char *seed_in, int seed_len,
|
|
||||||
int *counter_ret, unsigned long *h_ret,
|
#include <openssl/aes.h>
|
||||||
void (*callback)(int, int, void *),
|
#include "aes_locl.h"
|
||||||
void *cb_arg)
|
|
||||||
{
|
/* The input and output encrypted as though 128bit ofb mode is being
|
||||||
return NULL;
|
* used. The extra state information to record how much of the
|
||||||
|
* 128bit block we have used is contained in *num;
|
||||||
|
*/
|
||||||
|
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned long length, const AES_KEY *key,
|
||||||
|
unsigned char *ivec, int *num) {
|
||||||
|
|
||||||
|
unsigned int n;
|
||||||
|
unsigned long l=length;
|
||||||
|
|
||||||
|
assert(in && out && key && ivec && num);
|
||||||
|
|
||||||
|
n = *num;
|
||||||
|
|
||||||
|
while (l--) {
|
||||||
|
if (n == 0) {
|
||||||
|
AES_encrypt(ivec, ivec, key);
|
||||||
|
}
|
||||||
|
*(out++) = *(in++) ^ ivec[n];
|
||||||
|
n = (n+1) % AES_BLOCK_SIZE;
|
||||||
}
|
}
|
||||||
#ifdef __cplusplus
|
|
||||||
|
*num=n;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -71,8 +71,6 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
|
|||||||
if (a == NULL) return(0);
|
if (a == NULL) return(0);
|
||||||
|
|
||||||
len=a->length;
|
len=a->length;
|
||||||
ret=1+len;
|
|
||||||
if (pp == NULL) return(ret);
|
|
||||||
|
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
{
|
{
|
||||||
@@ -100,6 +98,10 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
bits=0;
|
bits=0;
|
||||||
|
|
||||||
|
ret=1+len;
|
||||||
|
if (pp == NULL) return(ret);
|
||||||
|
|
||||||
p= *pp;
|
p= *pp;
|
||||||
|
|
||||||
*(p++)=(unsigned char)bits;
|
*(p++)=(unsigned char)bits;
|
||||||
@@ -118,6 +120,12 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
|
|||||||
unsigned char *p,*s;
|
unsigned char *p,*s;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (len < 1)
|
||||||
|
{
|
||||||
|
i=ASN1_R_STRING_TOO_SHORT;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
if ((a == NULL) || ((*a) == NULL))
|
if ((a == NULL) || ((*a) == NULL))
|
||||||
{
|
{
|
||||||
if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL);
|
if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL);
|
||||||
@@ -183,7 +191,9 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value)
|
|||||||
if (a->data == NULL)
|
if (a->data == NULL)
|
||||||
c=(unsigned char *)OPENSSL_malloc(w+1);
|
c=(unsigned char *)OPENSSL_malloc(w+1);
|
||||||
else
|
else
|
||||||
c=(unsigned char *)OPENSSL_realloc(a->data,w+1);
|
c=(unsigned char *)OPENSSL_realloc_clean(a->data,
|
||||||
|
a->length,
|
||||||
|
w+1);
|
||||||
if (c == NULL) return(0);
|
if (c == NULL) 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->data=c;
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ static int asn1_collate_primitive(ASN1_STRING *a, ASN1_CTX *c)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!BUF_MEM_grow(&b,num+os->length))
|
if (!BUF_MEM_grow_clean(&b,num+os->length))
|
||||||
{
|
{
|
||||||
c->error=ERR_R_BUF_LIB;
|
c->error=ERR_R_BUF_LIB;
|
||||||
goto err;
|
goto err;
|
||||||
|
|||||||
@@ -149,7 +149,12 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
ASN1_CTX c;
|
ASN1_CTX c;
|
||||||
int want=HEADER_SIZE;
|
int want=HEADER_SIZE;
|
||||||
int eos=0;
|
int eos=0;
|
||||||
|
#if defined(__GNUC__) && defined(__ia64)
|
||||||
|
/* pathetic compiler bug in all known versions as of Nov. 2002 */
|
||||||
|
long off=0;
|
||||||
|
#else
|
||||||
int off=0;
|
int off=0;
|
||||||
|
#endif
|
||||||
int len=0;
|
int len=0;
|
||||||
|
|
||||||
b=BUF_MEM_new();
|
b=BUF_MEM_new();
|
||||||
@@ -166,7 +171,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
{
|
{
|
||||||
want-=(len-off);
|
want-=(len-off);
|
||||||
|
|
||||||
if (!BUF_MEM_grow(b,len+want))
|
if (!BUF_MEM_grow_clean(b,len+want))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
@@ -221,18 +226,23 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
if (want > (len-off))
|
if (want > (len-off))
|
||||||
{
|
{
|
||||||
want-=(len-off);
|
want-=(len-off);
|
||||||
if (!BUF_MEM_grow(b,len+want))
|
if (!BUF_MEM_grow_clean(b,len+want))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
i=BIO_read(in,&(b->data[len]),want);
|
while (want > 0)
|
||||||
if (i <= 0)
|
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_BIO,ASN1_R_NOT_ENOUGH_DATA);
|
i=BIO_read(in,&(b->data[len]),want);
|
||||||
goto err;
|
if (i <= 0)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_D2I_BIO,
|
||||||
|
ASN1_R_NOT_ENOUGH_DATA);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
len+=i;
|
||||||
|
want -= i;
|
||||||
}
|
}
|
||||||
len+=i;
|
|
||||||
}
|
}
|
||||||
off+=(int)c.slen;
|
off+=(int)c.slen;
|
||||||
if (eos <= 0)
|
if (eos <= 0)
|
||||||
|
|||||||
@@ -151,7 +151,17 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai)
|
|||||||
else ret->type=V_ASN1_ENUMERATED;
|
else ret->type=V_ASN1_ENUMERATED;
|
||||||
j=BN_num_bits(bn);
|
j=BN_num_bits(bn);
|
||||||
len=((j == 0)?0:((j/8)+1));
|
len=((j == 0)?0:((j/8)+1));
|
||||||
ret->data=(unsigned char *)OPENSSL_malloc(len+4);
|
if (ret->length < len+4)
|
||||||
|
{
|
||||||
|
unsigned char *new_data=OPENSSL_realloc(ret->data, len+4);
|
||||||
|
if (!new_data)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_MALLOC_FAILURE);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
ret->data=new_data;
|
||||||
|
}
|
||||||
|
|
||||||
ret->length=BN_bn2bin(bn,ret->data);
|
ret->length=BN_bn2bin(bn,ret->data);
|
||||||
return(ret);
|
return(ret);
|
||||||
err:
|
err:
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ err:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d)
|
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *d)
|
||||||
{
|
{
|
||||||
static int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
|
static int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
|
||||||
static int max[9]={99, 99,12,31,23,59,59,12,59};
|
static int max[9]={99, 99,12,31,23,59,59,12,59};
|
||||||
|
|||||||
@@ -397,7 +397,16 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai)
|
|||||||
else ret->type=V_ASN1_INTEGER;
|
else ret->type=V_ASN1_INTEGER;
|
||||||
j=BN_num_bits(bn);
|
j=BN_num_bits(bn);
|
||||||
len=((j == 0)?0:((j/8)+1));
|
len=((j == 0)?0:((j/8)+1));
|
||||||
ret->data=(unsigned char *)OPENSSL_malloc(len+4);
|
if (ret->length < len+4)
|
||||||
|
{
|
||||||
|
unsigned char *new_data=OPENSSL_realloc(ret->data, len+4);
|
||||||
|
if (!new_data)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_MALLOC_FAILURE);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
ret->data=new_data;
|
||||||
|
}
|
||||||
ret->length=BN_bn2bin(bn,ret->data);
|
ret->length=BN_bn2bin(bn,ret->data);
|
||||||
/* Correct zero case */
|
/* Correct zero case */
|
||||||
if(!ret->length)
|
if(!ret->length)
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ static int in_utf8(unsigned long value, void *arg)
|
|||||||
|
|
||||||
static int out_utf8(unsigned long value, void *arg)
|
static int out_utf8(unsigned long value, void *arg)
|
||||||
{
|
{
|
||||||
long *outlen;
|
int *outlen;
|
||||||
outlen = arg;
|
outlen = arg;
|
||||||
*outlen += UTF8_putc(NULL, -1, value);
|
*outlen += UTF8_putc(NULL, -1, value);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -183,8 +183,8 @@ int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a)
|
|||||||
|
|
||||||
if ((a == NULL) || (a->data == NULL))
|
if ((a == NULL) || (a->data == NULL))
|
||||||
return(BIO_write(bp,"NULL",4));
|
return(BIO_write(bp,"NULL",4));
|
||||||
i=i2t_ASN1_OBJECT(buf,80,a);
|
i=i2t_ASN1_OBJECT(buf,sizeof buf,a);
|
||||||
if (i > 80) i=80;
|
if (i > sizeof buf) i=sizeof buf;
|
||||||
BIO_write(bp,buf,i);
|
BIO_write(bp,buf,i);
|
||||||
return(i);
|
return(i);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ int i2d_ASN1_SET(STACK *a, unsigned char **pp, int (*func)(), int ex_tag,
|
|||||||
}
|
}
|
||||||
|
|
||||||
pStart = p; /* Catch the beg of Setblobs*/
|
pStart = p; /* Catch the beg of Setblobs*/
|
||||||
rgSetBlob = (MYBLOB *)OPENSSL_malloc( sk_num(a) * sizeof(MYBLOB)); /* In this array
|
if (!(rgSetBlob = (MYBLOB *)OPENSSL_malloc( sk_num(a) * sizeof(MYBLOB)))) return 0; /* In this array
|
||||||
we will store the SET blobs */
|
we will store the SET blobs */
|
||||||
|
|
||||||
for (i=0; i<sk_num(a); i++)
|
for (i=0; i<sk_num(a); i++)
|
||||||
@@ -135,7 +135,7 @@ SetBlob
|
|||||||
/* Now we have to sort the blobs. I am using a simple algo.
|
/* Now we have to sort the blobs. I am using a simple algo.
|
||||||
*Sort ptrs *Copy to temp-mem *Copy from temp-mem to user-mem*/
|
*Sort ptrs *Copy to temp-mem *Copy from temp-mem to user-mem*/
|
||||||
qsort( rgSetBlob, sk_num(a), sizeof(MYBLOB), SetBlobCmp);
|
qsort( rgSetBlob, sk_num(a), sizeof(MYBLOB), SetBlobCmp);
|
||||||
pTempMem = OPENSSL_malloc(totSize);
|
if (!(pTempMem = OPENSSL_malloc(totSize))) return 0;
|
||||||
|
|
||||||
/* Copy to temp mem */
|
/* Copy to temp mem */
|
||||||
p = pTempMem;
|
p = pTempMem;
|
||||||
|
|||||||
@@ -55,6 +55,59 @@
|
|||||||
* copied and put under another distribution licence
|
* copied and put under another distribution licence
|
||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
/* ====================================================================
|
||||||
|
* 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).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@@ -90,7 +143,14 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
|
|||||||
else
|
else
|
||||||
a=algor2;
|
a=algor2;
|
||||||
if (a == NULL) continue;
|
if (a == NULL) continue;
|
||||||
if ( (a->parameter == NULL) ||
|
if (type->pkey_type == NID_dsaWithSHA1)
|
||||||
|
{
|
||||||
|
/* special case: RFC 2459 tells us to omit 'parameters'
|
||||||
|
* with id-dsa-with-sha1 */
|
||||||
|
ASN1_TYPE_free(a->parameter);
|
||||||
|
a->parameter = NULL;
|
||||||
|
}
|
||||||
|
else if ((a->parameter == NULL) ||
|
||||||
(a->parameter->type != V_ASN1_NULL))
|
(a->parameter->type != V_ASN1_NULL))
|
||||||
{
|
{
|
||||||
ASN1_TYPE_free(a->parameter);
|
ASN1_TYPE_free(a->parameter);
|
||||||
@@ -144,9 +204,9 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
|
|||||||
err:
|
err:
|
||||||
EVP_MD_CTX_cleanup(&ctx);
|
EVP_MD_CTX_cleanup(&ctx);
|
||||||
if (buf_in != NULL)
|
if (buf_in != NULL)
|
||||||
{ memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
|
{ OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
|
||||||
if (buf_out != NULL)
|
if (buf_out != NULL)
|
||||||
{ memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); }
|
{ OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); }
|
||||||
return(outl);
|
return(outl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +229,14 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
|||||||
else
|
else
|
||||||
a=algor2;
|
a=algor2;
|
||||||
if (a == NULL) continue;
|
if (a == NULL) continue;
|
||||||
if ( (a->parameter == NULL) ||
|
if (type->pkey_type == NID_dsaWithSHA1)
|
||||||
|
{
|
||||||
|
/* special case: RFC 2459 tells us to omit 'parameters'
|
||||||
|
* with id-dsa-with-sha1 */
|
||||||
|
ASN1_TYPE_free(a->parameter);
|
||||||
|
a->parameter = NULL;
|
||||||
|
}
|
||||||
|
else if ((a->parameter == NULL) ||
|
||||||
(a->parameter->type != V_ASN1_NULL))
|
(a->parameter->type != V_ASN1_NULL))
|
||||||
{
|
{
|
||||||
ASN1_TYPE_free(a->parameter);
|
ASN1_TYPE_free(a->parameter);
|
||||||
@@ -220,8 +287,8 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
|||||||
err:
|
err:
|
||||||
EVP_MD_CTX_cleanup(&ctx);
|
EVP_MD_CTX_cleanup(&ctx);
|
||||||
if (buf_in != NULL)
|
if (buf_in != NULL)
|
||||||
{ memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
|
{ OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
|
||||||
if (buf_out != NULL)
|
if (buf_out != NULL)
|
||||||
{ memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); }
|
{ OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); }
|
||||||
return(outl);
|
return(outl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
|
|
||||||
#include "charmap.h"
|
#include "charmap.h"
|
||||||
|
#include "cryptlib.h"
|
||||||
|
|
||||||
/* ASN1_STRING_print_ex() and X509_NAME_print_ex().
|
/* ASN1_STRING_print_ex() and X509_NAME_print_ex().
|
||||||
* Enhanced string and name printing routines handling
|
* Enhanced string and name printing routines handling
|
||||||
@@ -77,8 +78,8 @@
|
|||||||
/* Three IO functions for sending data to memory, a BIO and
|
/* Three IO functions for sending data to memory, a BIO and
|
||||||
* and a FILE pointer.
|
* and a FILE pointer.
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* never used */
|
||||||
int send_mem_chars(void *arg, const void *buf, int len)
|
static int send_mem_chars(void *arg, const void *buf, int len)
|
||||||
{
|
{
|
||||||
unsigned char **out = arg;
|
unsigned char **out = arg;
|
||||||
if(!out) return 1;
|
if(!out) return 1;
|
||||||
@@ -86,15 +87,16 @@ int send_mem_chars(void *arg, const void *buf, int len)
|
|||||||
*out += len;
|
*out += len;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int send_bio_chars(void *arg, const void *buf, int len)
|
static int send_bio_chars(void *arg, const void *buf, int len)
|
||||||
{
|
{
|
||||||
if(!arg) return 1;
|
if(!arg) return 1;
|
||||||
if(BIO_write(arg, buf, len) != len) return 0;
|
if(BIO_write(arg, buf, len) != len) return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int send_fp_chars(void *arg, const void *buf, int len)
|
static int send_fp_chars(void *arg, const void *buf, int len)
|
||||||
{
|
{
|
||||||
if(!arg) return 1;
|
if(!arg) return 1;
|
||||||
if(fwrite(buf, 1, len, arg) != (unsigned int)len) return 0;
|
if(fwrite(buf, 1, len, arg) != (unsigned int)len) return 0;
|
||||||
@@ -113,14 +115,17 @@ typedef int char_io(void *arg, const void *buf, int len);
|
|||||||
static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, char_io *io_ch, void *arg)
|
static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, char_io *io_ch, void *arg)
|
||||||
{
|
{
|
||||||
unsigned char chflgs, chtmp;
|
unsigned char chflgs, chtmp;
|
||||||
char tmphex[11];
|
char tmphex[HEX_SIZE(long)+3];
|
||||||
|
|
||||||
|
if(c > 0xffffffffL)
|
||||||
|
return -1;
|
||||||
if(c > 0xffff) {
|
if(c > 0xffff) {
|
||||||
BIO_snprintf(tmphex, 11, "\\W%08lX", c);
|
BIO_snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
|
||||||
if(!io_ch(arg, tmphex, 10)) return -1;
|
if(!io_ch(arg, tmphex, 10)) return -1;
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
if(c > 0xff) {
|
if(c > 0xff) {
|
||||||
BIO_snprintf(tmphex, 11, "\\U%04lX", c);
|
BIO_snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
|
||||||
if(!io_ch(arg, tmphex, 6)) return -1;
|
if(!io_ch(arg, tmphex, 6)) return -1;
|
||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
@@ -194,7 +199,7 @@ static int do_buf(unsigned char *buf, int buflen,
|
|||||||
if(type & BUF_TYPE_CONVUTF8) {
|
if(type & BUF_TYPE_CONVUTF8) {
|
||||||
unsigned char utfbuf[6];
|
unsigned char utfbuf[6];
|
||||||
int utflen;
|
int utflen;
|
||||||
utflen = UTF8_putc(utfbuf, 6, c);
|
utflen = UTF8_putc(utfbuf, sizeof utfbuf, c);
|
||||||
for(i = 0; i < utflen; i++) {
|
for(i = 0; i < utflen; i++) {
|
||||||
/* We don't need to worry about setting orflags correctly
|
/* We don't need to worry about setting orflags correctly
|
||||||
* because if utflen==1 its value will be correct anyway
|
* because if utflen==1 its value will be correct anyway
|
||||||
@@ -240,7 +245,7 @@ static int do_hex_dump(char_io *io_ch, void *arg, unsigned char *buf, int buflen
|
|||||||
* #01234 format.
|
* #01234 format.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING *str)
|
static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING *str)
|
||||||
{
|
{
|
||||||
/* Placing the ASN1_STRING in a temp ASN1_TYPE allows
|
/* Placing the ASN1_STRING in a temp ASN1_TYPE allows
|
||||||
* the DER encoding to readily obtained
|
* the DER encoding to readily obtained
|
||||||
@@ -274,7 +279,7 @@ int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING *str)
|
|||||||
* otherwise it is the number of bytes per character
|
* otherwise it is the number of bytes per character
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const static char tag2nbyte[] = {
|
const static signed char tag2nbyte[] = {
|
||||||
-1, -1, -1, -1, -1, /* 0-4 */
|
-1, -1, -1, -1, -1, /* 0-4 */
|
||||||
-1, -1, -1, -1, -1, /* 5-9 */
|
-1, -1, -1, -1, -1, /* 5-9 */
|
||||||
-1, -1, 0, -1, /* 10-13 */
|
-1, -1, 0, -1, /* 10-13 */
|
||||||
@@ -460,7 +465,7 @@ static int do_name_ex(char_io *io_ch, void *arg, X509_NAME *n,
|
|||||||
if(fn_opt != XN_FLAG_FN_NONE) {
|
if(fn_opt != XN_FLAG_FN_NONE) {
|
||||||
int objlen, fld_len;
|
int objlen, fld_len;
|
||||||
if((fn_opt == XN_FLAG_FN_OID) || (fn_nid==NID_undef) ) {
|
if((fn_opt == XN_FLAG_FN_OID) || (fn_nid==NID_undef) ) {
|
||||||
OBJ_obj2txt(objtmp, 80, fn, 1);
|
OBJ_obj2txt(objtmp, sizeof objtmp, fn, 1);
|
||||||
fld_len = 0; /* XXX: what should this be? */
|
fld_len = 0; /* XXX: what should this be? */
|
||||||
objbuf = objtmp;
|
objbuf = objtmp;
|
||||||
} else {
|
} else {
|
||||||
@@ -543,7 +548,7 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
|||||||
{
|
{
|
||||||
ASN1_STRING stmp, *str = &stmp;
|
ASN1_STRING stmp, *str = &stmp;
|
||||||
int mbflag, type, ret;
|
int mbflag, type, ret;
|
||||||
if(!*out || !in) return -1;
|
if(!in) return -1;
|
||||||
type = in->type;
|
type = in->type;
|
||||||
if((type < 0) || (type > 30)) return -1;
|
if((type < 0) || (type > 30)) return -1;
|
||||||
mbflag = tag2nbyte[type];
|
mbflag = tag2nbyte[type];
|
||||||
@@ -552,6 +557,6 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
|||||||
stmp.data = NULL;
|
stmp.data = NULL;
|
||||||
ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
|
ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
|
||||||
if(ret < 0) return ret;
|
if(ret < 0) return ret;
|
||||||
if(out) *out = stmp.data;
|
*out = stmp.data;
|
||||||
return stmp.length;
|
return stmp.length;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
|
|||||||
/* Now the tables and helper functions for the string table:
|
/* Now the tables and helper functions for the string table:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* size limits: this stuff is taken straight from RFC2459 */
|
/* size limits: this stuff is taken straight from RFC3280 */
|
||||||
|
|
||||||
#define ub_name 32768
|
#define ub_name 32768
|
||||||
#define ub_common_name 64
|
#define ub_common_name 64
|
||||||
@@ -153,6 +153,8 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
|
|||||||
#define ub_organization_unit_name 64
|
#define ub_organization_unit_name 64
|
||||||
#define ub_title 64
|
#define ub_title 64
|
||||||
#define ub_email_address 128
|
#define ub_email_address 128
|
||||||
|
#define ub_serial_number 64
|
||||||
|
|
||||||
|
|
||||||
/* This table must be kept in NID order */
|
/* This table must be kept in NID order */
|
||||||
|
|
||||||
@@ -170,9 +172,11 @@ static ASN1_STRING_TABLE tbl_standard[] = {
|
|||||||
{NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0},
|
{NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0},
|
||||||
{NID_surname, 1, ub_name, DIRSTRING_TYPE, 0},
|
{NID_surname, 1, ub_name, DIRSTRING_TYPE, 0},
|
||||||
{NID_initials, 1, ub_name, DIRSTRING_TYPE, 0},
|
{NID_initials, 1, ub_name, DIRSTRING_TYPE, 0},
|
||||||
|
{NID_serialNumber, 1, ub_serial_number, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
||||||
{NID_friendlyName, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
|
{NID_friendlyName, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
|
||||||
{NID_name, 1, ub_name, DIRSTRING_TYPE, 0},
|
{NID_name, 1, ub_name, DIRSTRING_TYPE, 0},
|
||||||
{NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
{NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
||||||
|
{NID_domainComponent, 1, -1, B_ASN1_IA5STRING, STABLE_NO_MASK},
|
||||||
{NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}
|
{NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -249,4 +253,38 @@ static void st_free(ASN1_STRING_TABLE *tbl)
|
|||||||
if(tbl->flags & STABLE_FLAGS_MALLOC) OPENSSL_free(tbl);
|
if(tbl->flags & STABLE_FLAGS_MALLOC) OPENSSL_free(tbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IMPLEMENT_STACK_OF(ASN1_STRING_TABLE)
|
IMPLEMENT_STACK_OF(ASN1_STRING_TABLE)
|
||||||
|
|
||||||
|
#ifdef STRING_TABLE_TEST
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
ASN1_STRING_TABLE *tmp;
|
||||||
|
int i, last_nid = -1;
|
||||||
|
|
||||||
|
for (tmp = tbl_standard, i = 0;
|
||||||
|
i < sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE); i++, tmp++)
|
||||||
|
{
|
||||||
|
if (tmp->nid < last_nid)
|
||||||
|
{
|
||||||
|
last_nid = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
last_nid = tmp->nid;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (last_nid != 0)
|
||||||
|
{
|
||||||
|
printf("Table order OK\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (tmp = tbl_standard, i = 0;
|
||||||
|
i < sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE); i++, tmp++)
|
||||||
|
printf("Index %d, NID %d, Name=%s\n", i, tmp->nid,
|
||||||
|
OBJ_nid2ln(tmp->nid));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -105,13 +105,16 @@ ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
|
|||||||
|
|
||||||
ts=OPENSSL_gmtime(&t,&data);
|
ts=OPENSSL_gmtime(&t,&data);
|
||||||
if (ts == NULL)
|
if (ts == NULL)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_TIME_SET, ASN1_R_ERROR_GETTING_TIME);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
if((ts->tm_year >= 50) && (ts->tm_year < 150))
|
if((ts->tm_year >= 50) && (ts->tm_year < 150))
|
||||||
return ASN1_UTCTIME_set(s, t);
|
return ASN1_UTCTIME_set(s, t);
|
||||||
return ASN1_GENERALIZEDTIME_set(s,t);
|
return ASN1_GENERALIZEDTIME_set(s,t);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ASN1_TIME_check(ASN1_TIME *t)
|
int ASN1_TIME_check(const ASN1_TIME *t)
|
||||||
{
|
{
|
||||||
if (t->type == V_ASN1_GENERALIZEDTIME)
|
if (t->type == V_ASN1_GENERALIZEDTIME)
|
||||||
return ASN1_GENERALIZEDTIME_check(t);
|
return ASN1_GENERALIZEDTIME_check(t);
|
||||||
@@ -121,7 +124,8 @@ int ASN1_TIME_check(ASN1_TIME *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Convert an ASN1_TIME structure to GeneralizedTime */
|
/* Convert an ASN1_TIME structure to GeneralizedTime */
|
||||||
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out)
|
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
|
||||||
|
ASN1_GENERALIZEDTIME **out)
|
||||||
{
|
{
|
||||||
ASN1_GENERALIZEDTIME *ret;
|
ASN1_GENERALIZEDTIME *ret;
|
||||||
char *str;
|
char *str;
|
||||||
@@ -152,7 +156,7 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZE
|
|||||||
if (t->data[0] >= '5') strcpy(str, "19");
|
if (t->data[0] >= '5') strcpy(str, "19");
|
||||||
else strcpy(str, "20");
|
else strcpy(str, "20");
|
||||||
|
|
||||||
strcat(str, (char *)t->data);
|
BUF_strlcat(str, (char *)t->data, t->length+3); /* Include space for a '\0' */
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
int ASN1_TYPE_get(ASN1_TYPE *a)
|
int ASN1_TYPE_get(ASN1_TYPE *a)
|
||||||
{
|
{
|
||||||
if (a->value.ptr != NULL)
|
if ((a->value.ptr != NULL) || (a->type == V_ASN1_NULL))
|
||||||
return(a->type);
|
return(a->type);
|
||||||
else
|
else
|
||||||
return(0);
|
return(0);
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ err:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ASN1_UTCTIME_check(ASN1_UTCTIME *d)
|
int ASN1_UTCTIME_check(const ASN1_UTCTIME *d)
|
||||||
{
|
{
|
||||||
static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
|
static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
|
||||||
static int max[8]={99,12,31,23,59,59,12,59};
|
static int max[8]={99,12,31,23,59,59,12,59};
|
||||||
@@ -222,6 +222,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
|
|||||||
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
||||||
{
|
{
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
|
struct tm data;
|
||||||
int offset;
|
int offset;
|
||||||
int year;
|
int year;
|
||||||
|
|
||||||
@@ -238,7 +239,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
|||||||
|
|
||||||
t -= offset*60; /* FIXME: may overflow in extreme cases */
|
t -= offset*60; /* FIXME: may overflow in extreme cases */
|
||||||
|
|
||||||
{ struct tm data; tm = OPENSSL_gmtime(&t, &data); }
|
tm = OPENSSL_gmtime(&t, &data);
|
||||||
|
|
||||||
#define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
|
#define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
|
||||||
year = g2(s->data);
|
year = g2(s->data);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
|
|||||||
EVP_VerifyInit_ex(&ctx,type, NULL);
|
EVP_VerifyInit_ex(&ctx,type, NULL);
|
||||||
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
|
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
|
||||||
|
|
||||||
memset(buf_in,0,(unsigned int)inl);
|
OPENSSL_cleanse(buf_in,(unsigned int)inl);
|
||||||
OPENSSL_free(buf_in);
|
OPENSSL_free(buf_in);
|
||||||
|
|
||||||
if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
|
if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
|
||||||
@@ -153,7 +153,7 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
|||||||
EVP_VerifyInit_ex(&ctx,type, NULL);
|
EVP_VerifyInit_ex(&ctx,type, NULL);
|
||||||
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
|
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
|
||||||
|
|
||||||
memset(buf_in,0,(unsigned int)inl);
|
OPENSSL_cleanse(buf_in,(unsigned int)inl);
|
||||||
OPENSSL_free(buf_in);
|
OPENSSL_free(buf_in);
|
||||||
|
|
||||||
if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
|
if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
|
||||||
|
|||||||
@@ -70,7 +70,6 @@
|
|||||||
|
|
||||||
#include <openssl/symhacks.h>
|
#include <openssl/symhacks.h>
|
||||||
|
|
||||||
#include <openssl/e_os2.h>
|
|
||||||
#include <openssl/ossl_typ.h>
|
#include <openssl/ossl_typ.h>
|
||||||
|
|
||||||
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
||||||
@@ -133,7 +132,7 @@ extern "C" {
|
|||||||
#define B_ASN1_NUMERICSTRING 0x0001
|
#define B_ASN1_NUMERICSTRING 0x0001
|
||||||
#define B_ASN1_PRINTABLESTRING 0x0002
|
#define B_ASN1_PRINTABLESTRING 0x0002
|
||||||
#define B_ASN1_T61STRING 0x0004
|
#define B_ASN1_T61STRING 0x0004
|
||||||
#define B_ASN1_TELETEXSTRING 0x0008
|
#define B_ASN1_TELETEXSTRING 0x0004
|
||||||
#define B_ASN1_VIDEOTEXSTRING 0x0008
|
#define B_ASN1_VIDEOTEXSTRING 0x0008
|
||||||
#define B_ASN1_IA5STRING 0x0010
|
#define B_ASN1_IA5STRING 0x0010
|
||||||
#define B_ASN1_GRAPHICSTRING 0x0020
|
#define B_ASN1_GRAPHICSTRING 0x0020
|
||||||
@@ -440,6 +439,8 @@ typedef const ASN1_ITEM * ASN1_ITEM_EXP(void);
|
|||||||
DECLARE_STACK_OF(ASN1_INTEGER)
|
DECLARE_STACK_OF(ASN1_INTEGER)
|
||||||
DECLARE_ASN1_SET_OF(ASN1_INTEGER)
|
DECLARE_ASN1_SET_OF(ASN1_INTEGER)
|
||||||
|
|
||||||
|
DECLARE_STACK_OF(ASN1_GENERALSTRING)
|
||||||
|
|
||||||
typedef struct asn1_type_st
|
typedef struct asn1_type_st
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
@@ -753,7 +754,7 @@ int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y);
|
|||||||
|
|
||||||
DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
|
DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
|
||||||
|
|
||||||
int ASN1_UTCTIME_check(ASN1_UTCTIME *a);
|
int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
|
||||||
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t);
|
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t);
|
||||||
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str);
|
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str);
|
||||||
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
|
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
|
||||||
@@ -761,7 +762,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
|
|||||||
time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s);
|
time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a);
|
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
|
||||||
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t);
|
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t);
|
||||||
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str);
|
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str);
|
||||||
|
|
||||||
@@ -771,6 +772,7 @@ int ASN1_OCTET_STRING_cmp(ASN1_OCTET_STRING *a, ASN1_OCTET_STRING *b);
|
|||||||
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, unsigned char *data, int len);
|
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, unsigned char *data, int len);
|
||||||
|
|
||||||
DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
|
DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
|
||||||
|
DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
|
||||||
DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
|
DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
|
||||||
DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
|
DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
|
||||||
DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
|
DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
|
||||||
@@ -791,8 +793,8 @@ DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
|
|||||||
DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
|
DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
|
||||||
|
|
||||||
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t);
|
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t);
|
||||||
int ASN1_TIME_check(ASN1_TIME *t);
|
int ASN1_TIME_check(const ASN1_TIME *t);
|
||||||
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);
|
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);
|
||||||
|
|
||||||
int i2d_ASN1_SET(STACK *a, unsigned char **pp,
|
int i2d_ASN1_SET(STACK *a, unsigned char **pp,
|
||||||
int (*func)(), int ex_tag, int ex_class, int is_set);
|
int (*func)(), int ex_tag, int ex_class, int is_set);
|
||||||
@@ -978,6 +980,7 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_F_ASN1_TEMPLATE_D2I 131
|
#define ASN1_F_ASN1_TEMPLATE_D2I 131
|
||||||
#define ASN1_F_ASN1_TEMPLATE_EX_D2I 132
|
#define ASN1_F_ASN1_TEMPLATE_EX_D2I 132
|
||||||
#define ASN1_F_ASN1_TEMPLATE_NEW 133
|
#define ASN1_F_ASN1_TEMPLATE_NEW 133
|
||||||
|
#define ASN1_F_ASN1_TIME_SET 175
|
||||||
#define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134
|
#define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134
|
||||||
#define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135
|
#define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135
|
||||||
#define ASN1_F_ASN1_UNPACK_STRING 136
|
#define ASN1_F_ASN1_UNPACK_STRING 136
|
||||||
@@ -1006,12 +1009,12 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_F_D2I_X509_PKEY 159
|
#define ASN1_F_D2I_X509_PKEY 159
|
||||||
#define ASN1_F_I2D_ASN1_TIME 160
|
#define ASN1_F_I2D_ASN1_TIME 160
|
||||||
#define ASN1_F_I2D_DSA_PUBKEY 161
|
#define ASN1_F_I2D_DSA_PUBKEY 161
|
||||||
#define ASN1_F_I2D_ECDSA_PUBKEY 174
|
|
||||||
#define ASN1_F_I2D_NETSCAPE_RSA 162
|
#define ASN1_F_I2D_NETSCAPE_RSA 162
|
||||||
#define ASN1_F_I2D_PRIVATEKEY 163
|
#define ASN1_F_I2D_PRIVATEKEY 163
|
||||||
#define ASN1_F_I2D_PUBLICKEY 164
|
#define ASN1_F_I2D_PUBLICKEY 164
|
||||||
#define ASN1_F_I2D_RSA_PUBKEY 165
|
#define ASN1_F_I2D_RSA_PUBKEY 165
|
||||||
#define ASN1_F_LONG_C2I 166
|
#define ASN1_F_LONG_C2I 166
|
||||||
|
#define ASN1_F_OID_MODULE_INIT 174
|
||||||
#define ASN1_F_PKCS5_PBE2_SET 167
|
#define ASN1_F_PKCS5_PBE2_SET 167
|
||||||
#define ASN1_F_X509_CINF_NEW 168
|
#define ASN1_F_X509_CINF_NEW 168
|
||||||
#define ASN1_F_X509_CRL_ADD0_REVOKED 169
|
#define ASN1_F_X509_CRL_ADD0_REVOKED 169
|
||||||
@@ -1021,6 +1024,7 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_F_X509_PKEY_NEW 173
|
#define ASN1_F_X509_PKEY_NEW 173
|
||||||
|
|
||||||
/* Reason codes. */
|
/* Reason codes. */
|
||||||
|
#define ASN1_R_ADDING_OBJECT 171
|
||||||
#define ASN1_R_AUX_ERROR 100
|
#define ASN1_R_AUX_ERROR 100
|
||||||
#define ASN1_R_BAD_CLASS 101
|
#define ASN1_R_BAD_CLASS 101
|
||||||
#define ASN1_R_BAD_OBJECT_HEADER 102
|
#define ASN1_R_BAD_OBJECT_HEADER 102
|
||||||
@@ -1034,6 +1038,8 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_R_DECODE_ERROR 110
|
#define ASN1_R_DECODE_ERROR 110
|
||||||
#define ASN1_R_DECODING_ERROR 111
|
#define ASN1_R_DECODING_ERROR 111
|
||||||
#define ASN1_R_ENCODE_ERROR 112
|
#define ASN1_R_ENCODE_ERROR 112
|
||||||
|
#define ASN1_R_ERROR_GETTING_TIME 173
|
||||||
|
#define ASN1_R_ERROR_LOADING_SECTION 172
|
||||||
#define ASN1_R_ERROR_PARSING_SET_ELEMENT 113
|
#define ASN1_R_ERROR_PARSING_SET_ELEMENT 113
|
||||||
#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114
|
#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114
|
||||||
#define ASN1_R_EXPECTING_AN_INTEGER 115
|
#define ASN1_R_EXPECTING_AN_INTEGER 115
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user