Compare commits
718 Commits
main
...
OpenSSL_1_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
569c68744a | ||
![]() |
cdac2e8928 | ||
![]() |
01fb34ad43 | ||
![]() |
08fac3fb6f | ||
![]() |
0c8dc6ebe5 | ||
![]() |
f4f1e80801 | ||
![]() |
36f309c50a | ||
![]() |
94e5cf36bd | ||
![]() |
23df532ec4 | ||
![]() |
b960060a0d | ||
![]() |
e9cb6eb1d3 | ||
![]() |
181ae2badb | ||
![]() |
a98051fb47 | ||
![]() |
225628f280 | ||
![]() |
ca39b261bf | ||
![]() |
c1beec0e6d | ||
![]() |
b095884a58 | ||
![]() |
f7fe3d235a | ||
![]() |
b2688c9161 | ||
![]() |
bf6fa208b5 | ||
![]() |
eb37b6aa41 | ||
![]() |
f66f76a24a | ||
![]() |
65c63da207 | ||
![]() |
9f028e4a78 | ||
![]() |
64eec8f898 | ||
![]() |
08a88774bd | ||
![]() |
802a070bb6 | ||
![]() |
31c65a7bc0 | ||
![]() |
208a6012be | ||
![]() |
d7f8a7cafd | ||
![]() |
0f1c30b00d | ||
![]() |
c4b969639a | ||
![]() |
bfb2e4b280 | ||
![]() |
d8c8a718a2 | ||
![]() |
40c2812f56 | ||
![]() |
2e3e3d278e | ||
![]() |
2ececf59de | ||
![]() |
a60536348b | ||
![]() |
9d410579a7 | ||
![]() |
4f90ef0c5b | ||
![]() |
eae2bb2f1f | ||
![]() |
c313270836 | ||
![]() |
af8a66d10d | ||
![]() |
ec5c25b3b4 | ||
![]() |
38afaa48ec | ||
![]() |
954818fe60 | ||
![]() |
027381f68c | ||
![]() |
a900b3b51c | ||
![]() |
82d7247fc5 | ||
![]() |
ceb4c684e4 | ||
![]() |
a8da754d84 | ||
![]() |
8ccb44e6f5 | ||
![]() |
bbfdd1f0c9 | ||
![]() |
8724f9f9cf | ||
![]() |
6d41cbb63a | ||
![]() |
04a73c844f | ||
![]() |
87ff17a05d | ||
![]() |
d93112abc6 | ||
![]() |
875a33d7f7 | ||
![]() |
cf48a6d7f6 | ||
![]() |
7f3490e685 | ||
![]() |
dcf7a2dc4a | ||
![]() |
6ff76b3347 | ||
![]() |
3b12515180 | ||
![]() |
4e73dc5b76 | ||
![]() |
67eb85d7d4 | ||
![]() |
915a3b1c21 | ||
![]() |
e1b1d82aab | ||
![]() |
c25456633c | ||
![]() |
aaf9335970 | ||
![]() |
cee17f96f1 | ||
![]() |
bd36615973 | ||
![]() |
db85611989 | ||
![]() |
9e5267fcdd | ||
![]() |
0d330ce5cc | ||
![]() |
2a303a5834 | ||
![]() |
8d81dfd0a6 | ||
![]() |
69c163ac81 | ||
![]() |
b7eaea7397 | ||
![]() |
2d2965d2c1 | ||
![]() |
56cee260d8 | ||
![]() |
e2e13b8f3a | ||
![]() |
13b2a4d06a | ||
![]() |
41da9188cc | ||
![]() |
e9fe4b1033 | ||
![]() |
6469c947f5 | ||
![]() |
9bf3ff1ca0 | ||
![]() |
74f77d40a9 | ||
![]() |
55513f3e48 | ||
![]() |
c8dd719095 | ||
![]() |
0bfd0bff17 | ||
![]() |
eb269523bb | ||
![]() |
802feda7fc | ||
![]() |
cdad6ad015 | ||
![]() |
4eca4cfbc8 | ||
![]() |
7e29be228e | ||
![]() |
8745c0815c | ||
![]() |
68828f167c | ||
![]() |
59dcfa21e5 | ||
![]() |
13f8ddacbe | ||
![]() |
ad8b204386 | ||
![]() |
7b7aef9bfd | ||
![]() |
93540299fe | ||
![]() |
1db72876dc | ||
![]() |
b55ff319f8 | ||
![]() |
9a6940a349 | ||
![]() |
c36ceb0b15 | ||
![]() |
904fcce0c6 | ||
![]() |
2518a35a51 | ||
![]() |
442ca2bd00 | ||
![]() |
09e62af4d4 | ||
![]() |
88f0c9797e | ||
![]() |
74f5307d57 | ||
![]() |
da8dd611ae | ||
![]() |
43711a589b | ||
![]() |
bf63eab048 | ||
![]() |
62ca466a54 | ||
![]() |
17d3b1ecea | ||
![]() |
73729e4cf3 | ||
![]() |
05f61fb27e | ||
![]() |
10be715b95 | ||
![]() |
e87a4a7011 | ||
![]() |
f2a57c101f | ||
![]() |
b88ffa2bce | ||
![]() |
27b0494153 | ||
![]() |
d38dcafe95 | ||
![]() |
b0873dbb44 | ||
![]() |
48ae65be09 | ||
![]() |
dd5d7447c1 | ||
![]() |
4ff9cbe635 | ||
![]() |
e164b34079 | ||
![]() |
679d0c8655 | ||
![]() |
1d5e58b53c | ||
![]() |
118149887b | ||
![]() |
bb505311c6 | ||
![]() |
f5fc85d382 | ||
![]() |
6e4929fcdb | ||
![]() |
03a12c1330 | ||
![]() |
57b0c4697a | ||
![]() |
9fd3555305 | ||
![]() |
67e53f73bf | ||
![]() |
2281d10a7b | ||
![]() |
e5861c885f | ||
![]() |
60be115771 | ||
![]() |
5ee775a4a5 | ||
![]() |
934ca0714a | ||
![]() |
ad007e0aaf | ||
![]() |
84361b898d | ||
![]() |
1a80d39021 | ||
![]() |
c5526a16b1 | ||
![]() |
b6b9670017 | ||
![]() |
469665f658 | ||
![]() |
c4eb02bcaa | ||
![]() |
97f336f25d | ||
![]() |
5e05728ace | ||
![]() |
061a5bdba2 | ||
![]() |
e6ed83fb74 | ||
![]() |
c3f2fc419b | ||
![]() |
ec9cb40da5 | ||
![]() |
ed1de3810d | ||
![]() |
df35da266d | ||
![]() |
26d60e29e3 | ||
![]() |
5a0df377ac | ||
![]() |
f7123634a5 | ||
![]() |
7aeb3d7937 | ||
![]() |
182f1ad8a1 | ||
![]() |
0819130188 | ||
![]() |
3fe4fc4774 | ||
![]() |
1326733457 | ||
![]() |
d8426e6b7d | ||
![]() |
aa90ff7d8e | ||
![]() |
aeae79951c | ||
![]() |
cf3792b3e4 | ||
![]() |
e6b98d5a40 | ||
![]() |
4054d95eb9 | ||
![]() |
a05e954b66 | ||
![]() |
ca4a339eeb | ||
![]() |
835e32f9f6 | ||
![]() |
23396f5500 | ||
![]() |
1c9b82a91f | ||
![]() |
99657430c0 | ||
![]() |
ce20ac72b4 | ||
![]() |
525b6c7585 | ||
![]() |
29ed482ffc | ||
![]() |
b38db8803f | ||
![]() |
59899c4d1b | ||
![]() |
eec4cc8878 | ||
![]() |
2e7124497d | ||
![]() |
c0eae35b3d | ||
![]() |
50c9141d00 | ||
![]() |
2617a3c44d | ||
![]() |
a7da2b8e17 | ||
![]() |
e617a506ff | ||
![]() |
80640bf0bc | ||
![]() |
f05bce4f2f | ||
![]() |
5cd3ae9f18 | ||
![]() |
d9d5a12823 | ||
![]() |
06f3746c62 | ||
![]() |
14247e4f59 | ||
![]() |
72bc04942a | ||
![]() |
8e28ef0d85 | ||
![]() |
996edff7e1 | ||
![]() |
532ee6e056 | ||
![]() |
08db2cc9c1 | ||
![]() |
f25e4263fe | ||
![]() |
2dc967ddd0 | ||
![]() |
a357acdd3b | ||
![]() |
7e98378d15 | ||
![]() |
d663f506dc | ||
![]() |
ead6774804 | ||
![]() |
e05282f8b0 | ||
![]() |
34b087c9d0 | ||
![]() |
9f81028969 | ||
![]() |
8781538f41 | ||
![]() |
8343fdc3c7 | ||
![]() |
e966578d2f | ||
![]() |
7bab3c16ff | ||
![]() |
e2d569973c | ||
![]() |
caff6fc593 | ||
![]() |
ccb0398da6 | ||
![]() |
1f163fce81 | ||
![]() |
4bee980bb5 | ||
![]() |
7fa5428558 | ||
![]() |
b9c9cd3ded | ||
![]() |
8250e1b232 | ||
![]() |
519c977c47 | ||
![]() |
123370fb94 | ||
![]() |
c97e457d53 | ||
![]() |
f4e6ed09e4 | ||
![]() |
b79e6e3a27 | ||
![]() |
812b7246d4 | ||
![]() |
db305124f3 | ||
![]() |
bffbaf92bf | ||
![]() |
5aca5d41c0 | ||
![]() |
8343e6b6b2 | ||
![]() |
f87c6a551e | ||
![]() |
268ae49453 | ||
![]() |
6270d1c086 | ||
![]() |
5b54d26830 | ||
![]() |
fccbab6f31 | ||
![]() |
caf4e91a35 | ||
![]() |
c01a838d62 | ||
![]() |
66d3fb6af0 | ||
![]() |
92e2dc11f3 | ||
![]() |
5bcb4be17d | ||
![]() |
dd9d9056cb | ||
![]() |
44f28dd1e6 | ||
![]() |
3f2959beee | ||
![]() |
30e9cbe792 | ||
![]() |
5b7f4c718f | ||
![]() |
cb8044f032 | ||
![]() |
7bca2646b5 | ||
![]() |
edc2df54b9 | ||
![]() |
365e872fa1 | ||
![]() |
b3edc5fdb1 | ||
![]() |
f7c4fe519b | ||
![]() |
92c2c6e88c | ||
![]() |
12cbba0d54 | ||
![]() |
f9f6befa1f | ||
![]() |
0552cbcdaa | ||
![]() |
c3cd9be01f | ||
![]() |
9f4a47b3ed | ||
![]() |
51080676f1 | ||
![]() |
1535ff91e1 | ||
![]() |
79c8c47d5c | ||
![]() |
84fe686173 | ||
![]() |
44ea88c26e | ||
![]() |
f4e6975590 | ||
![]() |
3dd101aa4d | ||
![]() |
ba44b8d42e | ||
![]() |
7cdbce53f1 | ||
![]() |
1ff9f2eed3 | ||
![]() |
ee30926671 | ||
![]() |
3d50fef7d7 | ||
![]() |
33c162301a | ||
![]() |
3abcf477a9 | ||
![]() |
986fa907ae | ||
![]() |
e4e1b8f230 | ||
![]() |
da8f10881e | ||
![]() |
ebbbc8bd1c | ||
![]() |
bddd6e3495 | ||
![]() |
6fc530e6a0 | ||
![]() |
d24e8ac25b | ||
![]() |
06e17142fc | ||
![]() |
f82596346b | ||
![]() |
38b4d7aab1 | ||
![]() |
f16fede1cd | ||
![]() |
4a15b7c625 | ||
![]() |
065b75d3b7 | ||
![]() |
75c3073bbf | ||
![]() |
5762c18517 | ||
![]() |
6a1dd28576 | ||
![]() |
0737acd2a8 | ||
![]() |
2198be3483 | ||
![]() |
6fe498497c | ||
![]() |
ce2c6d8452 | ||
![]() |
e67c71c8fd | ||
![]() |
ffa0e16198 | ||
![]() |
910b3a81fd | ||
![]() |
24a47191f3 | ||
![]() |
4ba2edd2a5 | ||
![]() |
4f5b7a76da | ||
![]() |
8fe4d5bedb | ||
![]() |
d43301b77a | ||
![]() |
4727d57400 | ||
![]() |
b815ab2101 | ||
![]() |
ffaebdf38c | ||
![]() |
8e04001f85 | ||
![]() |
0450d6c177 | ||
![]() |
745929c2a5 | ||
![]() |
158d061609 | ||
![]() |
16d616756f | ||
![]() |
9fe6acbd1d | ||
![]() |
5df832293e | ||
![]() |
317ed9abdb | ||
![]() |
080ae68432 | ||
![]() |
6c6f6c44e5 | ||
![]() |
11d31c00ad | ||
![]() |
7f94a3c3de | ||
![]() |
528c6ef7c0 | ||
![]() |
1b0d48126b | ||
![]() |
7233e20931 | ||
![]() |
2d64b51d20 | ||
![]() |
1f7732bca2 | ||
![]() |
fec613dcf2 | ||
![]() |
91f17128ab | ||
![]() |
2a832cf05b | ||
![]() |
0c9394280a | ||
![]() |
07aafc4956 | ||
![]() |
70fd1f9173 | ||
![]() |
16f2ba724d | ||
![]() |
0c0a51d34b | ||
![]() |
68b6a94379 | ||
![]() |
b7aa71a3f9 | ||
![]() |
f1d0201952 | ||
![]() |
41468ed388 | ||
![]() |
5f0df1f650 | ||
![]() |
e6b4ed7ffa | ||
![]() |
f11bedf8ed | ||
![]() |
c23746f339 | ||
![]() |
7a1b1722f5 | ||
![]() |
583c2aa3e5 | ||
![]() |
9b2b619133 | ||
![]() |
48f91f6a88 | ||
![]() |
6f1c8d45f7 | ||
![]() |
56023bc405 | ||
![]() |
6f87807e62 | ||
![]() |
799f203ff6 | ||
![]() |
34eee35479 | ||
![]() |
bcd092d706 | ||
![]() |
713f110f53 | ||
![]() |
4d11426716 | ||
![]() |
3087bd32ff | ||
![]() |
a47060f1c9 | ||
![]() |
b04c0d805c | ||
![]() |
a1a45c59ec | ||
![]() |
64841ed746 | ||
![]() |
901554b355 | ||
![]() |
0e05f88ebf | ||
![]() |
6715f00081 | ||
![]() |
6a14feb048 | ||
![]() |
02c54f7c22 | ||
![]() |
243dac0af0 | ||
![]() |
da018b129e | ||
![]() |
e9554f7f9b | ||
![]() |
71a1ac9398 | ||
![]() |
6a2f94b39a | ||
![]() |
6ba1d561eb | ||
![]() |
f73546df92 | ||
![]() |
be125aa5ba | ||
![]() |
413cbfe68d | ||
![]() |
ee463921ed | ||
![]() |
76e7744bef | ||
![]() |
d9e048ceac | ||
![]() |
65a9383e6b | ||
![]() |
c6b82f7ee9 | ||
![]() |
25590043d1 | ||
![]() |
8a5d624d5b | ||
![]() |
ae4a75cecf | ||
![]() |
2e884ce11d | ||
![]() |
da8f1b738c | ||
![]() |
33f44acbbe | ||
![]() |
11c48a0fd2 | ||
![]() |
3cdaca2436 | ||
![]() |
b23da2919b | ||
![]() |
610dfc3ef4 | ||
![]() |
080f395392 | ||
![]() |
f852b60797 | ||
![]() |
e2356454c8 | ||
![]() |
e5420be6cd | ||
![]() |
9c00a95060 | ||
![]() |
ebc71865f0 | ||
![]() |
1dfa62d4c8 | ||
![]() |
8c6364e198 | ||
![]() |
98c2e93723 | ||
![]() |
c053e538b4 | ||
![]() |
6386647298 | ||
![]() |
4b24b754f5 | ||
![]() |
bfff2cc192 | ||
![]() |
d8b177719a | ||
![]() |
d985a68c89 | ||
![]() |
8dad8bc465 | ||
![]() |
235e76bce1 | ||
![]() |
d38c549e60 | ||
![]() |
558189183f | ||
![]() |
77ada38dbd | ||
![]() |
8124ebcd78 | ||
![]() |
04fde2025b | ||
![]() |
6bd61198fb | ||
![]() |
23b5e47ffc | ||
![]() |
fb81e6d300 | ||
![]() |
50ff4afb03 | ||
![]() |
c51f6bccea | ||
![]() |
836a811604 | ||
![]() |
bb65e3f22b | ||
![]() |
b8719c753e | ||
![]() |
92b2530acd | ||
![]() |
9ff94ad7ae | ||
![]() |
60ccb02c4a | ||
![]() |
094fb13876 | ||
![]() |
9c5d75d5a9 | ||
![]() |
ca461ecd11 | ||
![]() |
0ad9fe2d59 | ||
![]() |
a203df7521 | ||
![]() |
144517299c | ||
![]() |
5c468f0c1f | ||
![]() |
83a4ae6b0b | ||
![]() |
9374bc1c10 | ||
![]() |
e9c563fc29 | ||
![]() |
4887e07819 | ||
![]() |
652ac3e93a | ||
![]() |
8d2f61ac70 | ||
![]() |
02a23fa309 | ||
![]() |
bef20d4a68 | ||
![]() |
dddddb2e6c | ||
![]() |
8fcb93613a | ||
![]() |
ecb58c1628 | ||
![]() |
a969ca5cc8 | ||
![]() |
1e4406a854 | ||
![]() |
94fbee800b | ||
![]() |
c50847c28b | ||
![]() |
b1ce2d24dd | ||
![]() |
743fb51d2c | ||
![]() |
0ed781740d | ||
![]() |
d0e542fdc9 | ||
![]() |
457863efdf | ||
![]() |
5bd4fcc5c2 | ||
![]() |
3dd2eebfbc | ||
![]() |
d079b387a3 | ||
![]() |
8eeaeb4b04 | ||
![]() |
0041925844 | ||
![]() |
14fa016b2b | ||
![]() |
7fdccda37d | ||
![]() |
cdc575c46b | ||
![]() |
2f0aaf76f3 | ||
![]() |
6b7887b0ab | ||
![]() |
9ad1b440ae | ||
![]() |
9275ad321f | ||
![]() |
216a2a5fc6 | ||
![]() |
c2c6044933 | ||
![]() |
dc95c53c6f | ||
![]() |
b24a53dd9a | ||
![]() |
ffbe7cd0c5 | ||
![]() |
97183a312e | ||
![]() |
46ed8aff6d | ||
![]() |
6a0a48433b | ||
![]() |
ad3d95222d | ||
![]() |
18ea747ce4 | ||
![]() |
f4f512a853 | ||
![]() |
9c2bed0b65 | ||
![]() |
ad83334e73 | ||
![]() |
2cf4bc9ecd | ||
![]() |
c8ac945d59 | ||
![]() |
92aa50bc03 | ||
![]() |
2f31308b17 | ||
![]() |
468d58e712 | ||
![]() |
dd4b50ff6a | ||
![]() |
030d5b8c97 | ||
![]() |
9b73be38ab | ||
![]() |
e5bf2f5d4c | ||
![]() |
a7096946fa | ||
![]() |
4a8362a68b | ||
![]() |
25128a11fb | ||
![]() |
3deb968fec | ||
![]() |
276eb93218 | ||
![]() |
29c33e16ac | ||
![]() |
bffb696f65 | ||
![]() |
fd2d78e70b | ||
![]() |
6b1fb9179e | ||
![]() |
702175817f | ||
![]() |
703ec840dc | ||
![]() |
04d706d42a | ||
![]() |
b996cecc32 | ||
![]() |
7e927da2a5 | ||
![]() |
7aa6d2fcf9 | ||
![]() |
27b1f137ff | ||
![]() |
f63c927e8e | ||
![]() |
d572544a2c | ||
![]() |
9100840258 | ||
![]() |
0f32c83c91 | ||
![]() |
80b570142d | ||
![]() |
a99b6fcb7c | ||
![]() |
02d1a6b3aa | ||
![]() |
08e8d58785 | ||
![]() |
c90c41f09d | ||
![]() |
c47b636a2c | ||
![]() |
7200b39ecd | ||
![]() |
84c95826de | ||
![]() |
63819e6f00 | ||
![]() |
8206dba75c | ||
![]() |
528ef87850 | ||
![]() |
9004c53107 | ||
![]() |
f47f99f295 | ||
![]() |
00f473b3cc | ||
![]() |
356de7146e | ||
![]() |
9eab925395 | ||
![]() |
22d89c501e | ||
![]() |
c06916db9f | ||
![]() |
ef7545a3e6 | ||
![]() |
fecb4ff331 | ||
![]() |
2a4adf19c8 | ||
![]() |
44c854ddb9 | ||
![]() |
47091035f1 | ||
![]() |
f3d51d7740 | ||
![]() |
70d3b4b653 | ||
![]() |
2fb94e4861 | ||
![]() |
1b84893905 | ||
![]() |
68b5330040 | ||
![]() |
da7ae62abd | ||
![]() |
f53337b89c | ||
![]() |
f70a5895e3 | ||
![]() |
d41bbd0db5 | ||
![]() |
49956294fc | ||
![]() |
48373e55d1 | ||
![]() |
42369021ed | ||
![]() |
b00fe7ce18 | ||
![]() |
872e3fd502 | ||
![]() |
c11ada6c99 | ||
![]() |
8f0968850b | ||
![]() |
0b96f60a56 | ||
![]() |
ab06ff6bee | ||
![]() |
bba8456e65 | ||
![]() |
b493a05720 | ||
![]() |
c2a8133d1c | ||
![]() |
e935440ad7 | ||
![]() |
8eaf563c41 | ||
![]() |
80d7e6b039 | ||
![]() |
9c44e33230 | ||
![]() |
b86f3197b7 | ||
![]() |
0875c00584 | ||
![]() |
dd3a770e07 | ||
![]() |
64763ce09b | ||
![]() |
2fffc29bd1 | ||
![]() |
d2650c3a4a | ||
![]() |
b5bd966ea4 | ||
![]() |
e71f7786e3 | ||
![]() |
e3b95e6b24 | ||
![]() |
658eeec7cd | ||
![]() |
e1c3d65f08 | ||
![]() |
2e4abe2ce2 | ||
![]() |
ea294bb50e | ||
![]() |
b58ea0b941 | ||
![]() |
16067fe5fd | ||
![]() |
f2e9070f26 | ||
![]() |
fe8629e1a5 | ||
![]() |
2a12eff4b2 | ||
![]() |
b680fef061 | ||
![]() |
7f7414e054 | ||
![]() |
8b9db484ed | ||
![]() |
f59f2fcbff | ||
![]() |
419a530194 | ||
![]() |
69a8901eb1 | ||
![]() |
2bcd08e691 | ||
![]() |
167d692925 | ||
![]() |
025ee1dbde | ||
![]() |
dce7b92d0b | ||
![]() |
db886c2a2b | ||
![]() |
4d43129446 | ||
![]() |
92107f8150 | ||
![]() |
e82d6a2019 | ||
![]() |
4e5755cd85 | ||
![]() |
dda8dcd2c0 | ||
![]() |
16646b0018 | ||
![]() |
320881c25c | ||
![]() |
1d23fb382e | ||
![]() |
c4f1942a76 | ||
![]() |
38c42c6eea | ||
![]() |
51eb247d0f | ||
![]() |
8d22673a62 | ||
![]() |
3622d3743e | ||
![]() |
fbbf28e7c2 | ||
![]() |
f5dac77c06 | ||
![]() |
067d72a082 | ||
![]() |
ac0f3f506a | ||
![]() |
f819147028 | ||
![]() |
a530963f05 | ||
![]() |
bc5a53f5e9 | ||
![]() |
83382fb9d5 | ||
![]() |
0674370017 | ||
![]() |
2f91cb2c5e | ||
![]() |
acb25c2327 | ||
![]() |
2d842a90f8 | ||
![]() |
80705bfc50 | ||
![]() |
2a8692311d | ||
![]() |
7d0ed89d57 | ||
![]() |
0912fae6ce | ||
![]() |
0bb2154ee9 | ||
![]() |
c9355e20c3 | ||
![]() |
6545372c24 | ||
![]() |
17f8412983 | ||
![]() |
d48df9a91b | ||
![]() |
65448fd0d3 | ||
![]() |
a677c87b7b | ||
![]() |
f8a123b4a2 | ||
![]() |
c64beae686 | ||
![]() |
99ef8323e4 | ||
![]() |
2668c58969 | ||
![]() |
5ae3168a77 | ||
![]() |
559579659c | ||
![]() |
2dd74160cc | ||
![]() |
2adf63272c | ||
![]() |
fb5a0fb8f1 | ||
![]() |
c222de16ce | ||
![]() |
19091ac236 | ||
![]() |
2fcf251d3d | ||
![]() |
dab5848cd9 | ||
![]() |
a02f0f3d69 | ||
![]() |
e69d49364e | ||
![]() |
38921f0abf | ||
![]() |
d76ce84c92 | ||
![]() |
c3c7a0d26e | ||
![]() |
d06bc800f2 | ||
![]() |
a01dc637bd | ||
![]() |
3bbbe757ea | ||
![]() |
76474e519f | ||
![]() |
420f572d49 | ||
![]() |
6d65d44b95 | ||
![]() |
91e1ff77a0 | ||
![]() |
c8e60ec8fa | ||
![]() |
e840570207 | ||
![]() |
077527f19e | ||
![]() |
00daa2e6c6 | ||
![]() |
000f221d60 | ||
![]() |
579a605494 | ||
![]() |
fa29ebd7ed | ||
![]() |
3360999046 | ||
![]() |
0b965e59cb | ||
![]() |
1684846f54 | ||
![]() |
dde6d9520c | ||
![]() |
f9a772b743 | ||
![]() |
0d6f7dbb50 | ||
![]() |
994a1ea900 | ||
![]() |
e5d1fd38d1 | ||
![]() |
a330ed26be | ||
![]() |
ca0a86c89d | ||
![]() |
1cf7bbce48 | ||
![]() |
4cdde22432 | ||
![]() |
a28cee6efe | ||
![]() |
1977bafba4 | ||
![]() |
3c96907f2b | ||
![]() |
2d96a30dc7 | ||
![]() |
c09d1df7d3 | ||
![]() |
c20dd45477 | ||
![]() |
abb320463d | ||
![]() |
ada3f8b5d3 | ||
![]() |
6172561597 | ||
![]() |
368b64d6dd | ||
![]() |
4ed0ca2b3e | ||
![]() |
a92f98c630 | ||
![]() |
4385b556b4 | ||
![]() |
5e7c9519b8 | ||
![]() |
ef02492908 | ||
![]() |
86d5f9ba4f | ||
![]() |
febcec6254 | ||
![]() |
f07cb1ce8e | ||
![]() |
b3c17a4805 | ||
![]() |
7b83fe34c0 | ||
![]() |
e0b1c57ae0 | ||
![]() |
6806b06d21 | ||
![]() |
0af0e9d747 | ||
![]() |
2191b3ba44 | ||
![]() |
73020a945b | ||
![]() |
9c2d0cd11c | ||
![]() |
0ef9b9c7bf | ||
![]() |
c14c6e996d | ||
![]() |
51381cd4ed | ||
![]() |
8c9ab050e5 | ||
![]() |
b6996c7849 | ||
![]() |
2c23b0716e | ||
![]() |
f548a0e4d5 | ||
![]() |
a404f63f92 | ||
![]() |
b54f50d277 | ||
![]() |
10ba241909 | ||
![]() |
1f238b1c4a | ||
![]() |
ef85bf8c2b | ||
![]() |
cbfccdb729 | ||
![]() |
94111aa401 | ||
![]() |
eec48070a1 | ||
![]() |
eebe668174 | ||
![]() |
8a15a4a7b4 | ||
![]() |
19057003f1 | ||
![]() |
031648d4ce | ||
![]() |
02bee340a2 | ||
![]() |
f6f2f68a05 | ||
![]() |
982d68a0c0 | ||
![]() |
7585a86a76 | ||
![]() |
73190f1b46 | ||
![]() |
6673ac592a | ||
![]() |
59aa655b53 | ||
![]() |
c4c99b4961 | ||
![]() |
ccbbcddd5f | ||
![]() |
65d82478d8 | ||
![]() |
02a6518a02 | ||
![]() |
a79053511b | ||
![]() |
eb56eb2279 | ||
![]() |
d40f6d4a02 | ||
![]() |
943ae0951a | ||
![]() |
999eeaba14 |
109
.gitignore
vendored
Normal file
109
.gitignore
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
# Object files
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
|
||||||
|
# editor artefacts
|
||||||
|
*.swp
|
||||||
|
.#*
|
||||||
|
#*#
|
||||||
|
*~
|
||||||
|
|
||||||
|
# Top level excludes
|
||||||
|
/Makefile.bak
|
||||||
|
/Makefile
|
||||||
|
/*.a
|
||||||
|
/include
|
||||||
|
/*.pc
|
||||||
|
/rehash.time
|
||||||
|
|
||||||
|
# Most *.c files under test/ are symlinks
|
||||||
|
/test/*.c
|
||||||
|
# Apart from these
|
||||||
|
!/test/asn1test.c
|
||||||
|
!/test/methtest.c
|
||||||
|
!/test/dummytest.c
|
||||||
|
!/test/igetest.c
|
||||||
|
!/test/r160test.c
|
||||||
|
!/test/fips_algvs.c
|
||||||
|
|
||||||
|
/test/*.ss
|
||||||
|
/test/*.srl
|
||||||
|
/test/.rnd
|
||||||
|
/test/test*.pem
|
||||||
|
/test/newkey.pem
|
||||||
|
|
||||||
|
# Certificate symbolic links
|
||||||
|
*.0
|
||||||
|
|
||||||
|
# Links under apps
|
||||||
|
/apps/CA.pl
|
||||||
|
/apps/md4.c
|
||||||
|
|
||||||
|
|
||||||
|
# Auto generated headers
|
||||||
|
/crypto/buildinf.h
|
||||||
|
/crypto/opensslconf.h
|
||||||
|
|
||||||
|
# Auto generated assembly language source files
|
||||||
|
*.s
|
||||||
|
!/crypto/bn/asm/pa-risc2.s
|
||||||
|
!/crypto/bn/asm/pa-risc2W.s
|
||||||
|
crypto/aes/asm/a_win32.asm
|
||||||
|
crypto/bf/asm/b_win32.asm
|
||||||
|
crypto/bn/asm/bn_win32.asm
|
||||||
|
crypto/bn/asm/co_win32.asm
|
||||||
|
crypto/bn/asm/mt_win32.asm
|
||||||
|
crypto/cast/asm/c_win32.asm
|
||||||
|
crypto/cpu_win32.asm
|
||||||
|
crypto/des/asm/d_win32.asm
|
||||||
|
crypto/des/asm/y_win32.asm
|
||||||
|
crypto/md5/asm/m5_win32.asm
|
||||||
|
crypto/rc4/asm/r4_win32.asm
|
||||||
|
crypto/rc5/asm/r5_win32.asm
|
||||||
|
crypto/ripemd/asm/rm_win32.asm
|
||||||
|
crypto/sha/asm/s1_win32.asm
|
||||||
|
crypto/sha/asm/sha512-sse2.asm
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
/apps/openssl
|
||||||
|
/test/sha256t
|
||||||
|
/test/sha512t
|
||||||
|
/test/*test
|
||||||
|
/test/fips_aesavs
|
||||||
|
/test/fips_desmovs
|
||||||
|
/test/fips_dhvs
|
||||||
|
/test/fips_drbgvs
|
||||||
|
/test/fips_dssvs
|
||||||
|
/test/fips_ecdhvs
|
||||||
|
/test/fips_ecdsavs
|
||||||
|
/test/fips_rngvs
|
||||||
|
/test/fips_test_suite
|
||||||
|
*.so*
|
||||||
|
*.dylib*
|
||||||
|
*.dll*
|
||||||
|
# Exceptions
|
||||||
|
!/test/bctest
|
||||||
|
!/crypto/des/times/486-50.sol
|
||||||
|
|
||||||
|
# Misc auto generated files
|
||||||
|
/tools/c_rehash
|
||||||
|
/test/evptests.txt
|
||||||
|
lib
|
||||||
|
Makefile.save
|
||||||
|
*.bak
|
||||||
|
tags
|
||||||
|
TAGS
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
/tmp32dll
|
||||||
|
/tmp32dll.dbg
|
||||||
|
/out32dll
|
||||||
|
/out32dll.dbg
|
||||||
|
/inc32
|
||||||
|
/MINFO
|
||||||
|
ms/bcb.mak
|
||||||
|
ms/libeay32.def
|
||||||
|
ms/nt.mak
|
||||||
|
ms/ntdll.mak
|
||||||
|
ms/ssleay32.def
|
||||||
|
ms/version32.rc
|
30
ACKNOWLEDGMENTS
Normal file
30
ACKNOWLEDGMENTS
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
The OpenSSL project depends on volunteer efforts and financial support from
|
||||||
|
the end user community. That support comes in the form of donations and paid
|
||||||
|
sponsorships, software support contracts, paid consulting services
|
||||||
|
and commissioned software development.
|
||||||
|
|
||||||
|
Since all these activities support the continued development and improvement
|
||||||
|
of OpenSSL we consider all these clients and customers as sponsors of the
|
||||||
|
OpenSSL project.
|
||||||
|
|
||||||
|
We would like to identify and thank the following such sponsors for their past
|
||||||
|
or current significant support of the OpenSSL project:
|
||||||
|
|
||||||
|
Major support:
|
||||||
|
|
||||||
|
Qualys http://www.qualys.com/
|
||||||
|
|
||||||
|
Very significant support:
|
||||||
|
|
||||||
|
OpenGear: http://www.opengear.com/
|
||||||
|
|
||||||
|
Significant support:
|
||||||
|
|
||||||
|
PSW Group: http://www.psw.net/
|
||||||
|
Acano Ltd. http://acano.com/
|
||||||
|
|
||||||
|
Please note that we ask permission to identify sponsors and that some sponsors
|
||||||
|
we consider eligible for inclusion here have requested to remain anonymous.
|
||||||
|
|
||||||
|
Additional sponsorship or financial support is always welcome: for more
|
||||||
|
information please contact the OpenSSL Software Foundation.
|
686
CHANGES
686
CHANGES
@@ -2,10 +2,477 @@
|
|||||||
OpenSSL CHANGES
|
OpenSSL CHANGES
|
||||||
_______________
|
_______________
|
||||||
|
|
||||||
Changes between 1.0.0a and 1.0.0b [xx XXX xxxx]
|
Changes between 1.0.0q and 1.0.0r [xx XXX xxxx]
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
Changes between 1.0.0p and 1.0.0q [15 Jan 2015]
|
||||||
|
|
||||||
|
*) Build fixes for the Windows and OpenVMS platforms
|
||||||
|
[Matt Caswell and Richard Levitte]
|
||||||
|
|
||||||
|
Changes between 1.0.0o and 1.0.0p [8 Jan 2015]
|
||||||
|
|
||||||
|
*) Fix DTLS segmentation fault in dtls1_get_record. A carefully crafted DTLS
|
||||||
|
message can cause a segmentation fault in OpenSSL due to a NULL pointer
|
||||||
|
dereference. This could lead to a Denial Of Service attack. Thanks to
|
||||||
|
Markus Stenberg of Cisco Systems, Inc. for reporting this issue.
|
||||||
|
(CVE-2014-3571)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Fix DTLS memory leak in dtls1_buffer_record. A memory leak can occur in the
|
||||||
|
dtls1_buffer_record function under certain conditions. In particular this
|
||||||
|
could occur if an attacker sent repeated DTLS records with the same
|
||||||
|
sequence number but for the next epoch. The memory leak could be exploited
|
||||||
|
by an attacker in a Denial of Service attack through memory exhaustion.
|
||||||
|
Thanks to Chris Mueller for reporting this issue.
|
||||||
|
(CVE-2015-0206)
|
||||||
|
[Matt Caswell]
|
||||||
|
|
||||||
|
*) Fix issue where no-ssl3 configuration sets method to NULL. When openssl is
|
||||||
|
built with the no-ssl3 option and a SSL v3 ClientHello is received the ssl
|
||||||
|
method would be set to NULL which could later result in a NULL pointer
|
||||||
|
dereference. Thanks to Frank Schmirler for reporting this issue.
|
||||||
|
(CVE-2014-3569)
|
||||||
|
[Kurt Roeckx]
|
||||||
|
|
||||||
|
*) Abort handshake if server key exchange message is omitted for ephemeral
|
||||||
|
ECDH ciphersuites.
|
||||||
|
|
||||||
|
Thanks to Karthikeyan Bhargavan of the PROSECCO team at INRIA for
|
||||||
|
reporting this issue.
|
||||||
|
(CVE-2014-3572)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Remove non-export ephemeral RSA code on client and server. This code
|
||||||
|
violated the TLS standard by allowing the use of temporary RSA keys in
|
||||||
|
non-export ciphersuites and could be used by a server to effectively
|
||||||
|
downgrade the RSA key length used to a value smaller than the server
|
||||||
|
certificate. Thanks for Karthikeyan Bhargavan of the PROSECCO team at
|
||||||
|
INRIA or reporting this issue.
|
||||||
|
(CVE-2015-0204)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Fixed issue where DH client certificates are accepted without verification.
|
||||||
|
An OpenSSL server will accept a DH certificate for client authentication
|
||||||
|
without the certificate verify message. This effectively allows a client to
|
||||||
|
authenticate without the use of a private key. This only affects servers
|
||||||
|
which trust a client certificate authority which issues certificates
|
||||||
|
containing DH keys: these are extremely rare and hardly ever encountered.
|
||||||
|
Thanks for Karthikeyan Bhargavan of the PROSECCO team at INRIA or reporting
|
||||||
|
this issue.
|
||||||
|
(CVE-2015-0205)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Correct Bignum squaring. Bignum squaring (BN_sqr) may produce incorrect
|
||||||
|
results on some platforms, including x86_64. This bug occurs at random
|
||||||
|
with a very low probability, and is not known to be exploitable in any
|
||||||
|
way, though its exact impact is difficult to determine. Thanks to Pieter
|
||||||
|
Wuille (Blockstream) who reported this issue and also suggested an initial
|
||||||
|
fix. Further analysis was conducted by the OpenSSL development team and
|
||||||
|
Adam Langley of Google. The final fix was developed by Andy Polyakov of
|
||||||
|
the OpenSSL core team.
|
||||||
|
(CVE-2014-3570)
|
||||||
|
[Andy Polyakov]
|
||||||
|
|
||||||
|
*) Fix various certificate fingerprint issues.
|
||||||
|
|
||||||
|
By using non-DER or invalid encodings outside the signed portion of a
|
||||||
|
certificate the fingerprint can be changed without breaking the signature.
|
||||||
|
Although no details of the signed portion of the certificate can be changed
|
||||||
|
this can cause problems with some applications: e.g. those using the
|
||||||
|
certificate fingerprint for blacklists.
|
||||||
|
|
||||||
|
1. Reject signatures with non zero unused bits.
|
||||||
|
|
||||||
|
If the BIT STRING containing the signature has non zero unused bits reject
|
||||||
|
the signature. All current signature algorithms require zero unused bits.
|
||||||
|
|
||||||
|
2. Check certificate algorithm consistency.
|
||||||
|
|
||||||
|
Check the AlgorithmIdentifier inside TBS matches the one in the
|
||||||
|
certificate signature. NB: this will result in signature failure
|
||||||
|
errors for some broken certificates.
|
||||||
|
|
||||||
|
Thanks to Konrad Kraszewski from Google for reporting this issue.
|
||||||
|
|
||||||
|
3. Check DSA/ECDSA signatures use DER.
|
||||||
|
|
||||||
|
Reencode DSA/ECDSA signatures and compare with the original received
|
||||||
|
signature. Return an error if there is a mismatch.
|
||||||
|
|
||||||
|
This will reject various cases including garbage after signature
|
||||||
|
(thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS
|
||||||
|
program for discovering this case) and use of BER or invalid ASN.1 INTEGERs
|
||||||
|
(negative or with leading zeroes).
|
||||||
|
|
||||||
|
Further analysis was conducted and fixes were developed by Stephen Henson
|
||||||
|
of the OpenSSL core team.
|
||||||
|
|
||||||
|
(CVE-2014-8275)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 1.0.0n and 1.0.0o [15 Oct 2014]
|
||||||
|
|
||||||
|
*) Session Ticket Memory Leak.
|
||||||
|
|
||||||
|
When an OpenSSL SSL/TLS/DTLS server receives a session ticket the
|
||||||
|
integrity of that ticket is first verified. In the event of a session
|
||||||
|
ticket integrity check failing, OpenSSL will fail to free memory
|
||||||
|
causing a memory leak. By sending a large number of invalid session
|
||||||
|
tickets an attacker could exploit this issue in a Denial Of Service
|
||||||
|
attack.
|
||||||
|
(CVE-2014-3567)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Build option no-ssl3 is incomplete.
|
||||||
|
|
||||||
|
When OpenSSL is configured with "no-ssl3" as a build option, servers
|
||||||
|
could accept and complete a SSL 3.0 handshake, and clients could be
|
||||||
|
configured to send them.
|
||||||
|
(CVE-2014-3568)
|
||||||
|
[Akamai and the OpenSSL team]
|
||||||
|
|
||||||
|
*) Add support for TLS_FALLBACK_SCSV.
|
||||||
|
Client applications doing fallback retries should call
|
||||||
|
SSL_set_mode(s, SSL_MODE_SEND_FALLBACK_SCSV).
|
||||||
|
(CVE-2014-3566)
|
||||||
|
[Adam Langley, Bodo Moeller]
|
||||||
|
|
||||||
|
*) Add additional DigestInfo checks.
|
||||||
|
|
||||||
|
Reencode DigestInto in DER and check against the original when
|
||||||
|
verifying RSA signature: this will reject any improperly encoded
|
||||||
|
DigestInfo structures.
|
||||||
|
|
||||||
|
Note: this is a precautionary measure and no attacks are currently known.
|
||||||
|
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 1.0.0m and 1.0.0n [6 Aug 2014]
|
||||||
|
|
||||||
|
*) OpenSSL DTLS clients enabling anonymous (EC)DH ciphersuites are subject
|
||||||
|
to a denial of service attack. A malicious server can crash the client
|
||||||
|
with a null pointer dereference (read) by specifying an anonymous (EC)DH
|
||||||
|
ciphersuite and sending carefully crafted handshake messages.
|
||||||
|
|
||||||
|
Thanks to Felix Gr<47>bert (Google) for discovering and researching this
|
||||||
|
issue.
|
||||||
|
(CVE-2014-3510)
|
||||||
|
[Emilia K<>sper]
|
||||||
|
|
||||||
|
*) By sending carefully crafted DTLS packets an attacker could cause openssl
|
||||||
|
to leak memory. This can be exploited through a Denial of Service attack.
|
||||||
|
Thanks to Adam Langley for discovering and researching this issue.
|
||||||
|
(CVE-2014-3507)
|
||||||
|
[Adam Langley]
|
||||||
|
|
||||||
|
*) An attacker can force openssl to consume large amounts of memory whilst
|
||||||
|
processing DTLS handshake messages. This can be exploited through a
|
||||||
|
Denial of Service attack.
|
||||||
|
Thanks to Adam Langley for discovering and researching this issue.
|
||||||
|
(CVE-2014-3506)
|
||||||
|
[Adam Langley]
|
||||||
|
|
||||||
|
*) An attacker can force an error condition which causes openssl to crash
|
||||||
|
whilst processing DTLS packets due to memory being freed twice. This
|
||||||
|
can be exploited through a Denial of Service attack.
|
||||||
|
Thanks to Adam Langley and Wan-Teh Chang for discovering and researching
|
||||||
|
this issue.
|
||||||
|
(CVE-2014-3505)
|
||||||
|
[Adam Langley]
|
||||||
|
|
||||||
|
*) If a multithreaded client connects to a malicious server using a resumed
|
||||||
|
session and the server sends an ec point format extension it could write
|
||||||
|
up to 255 bytes to freed memory.
|
||||||
|
|
||||||
|
Thanks to Gabor Tyukasz (LogMeIn Inc) for discovering and researching this
|
||||||
|
issue.
|
||||||
|
(CVE-2014-3509)
|
||||||
|
[Gabor Tyukasz]
|
||||||
|
|
||||||
|
*) A flaw in OBJ_obj2txt may cause pretty printing functions such as
|
||||||
|
X509_name_oneline, X509_name_print_ex et al. to leak some information
|
||||||
|
from the stack. Applications may be affected if they echo pretty printing
|
||||||
|
output to the attacker.
|
||||||
|
|
||||||
|
Thanks to Ivan Fratric (Google) for discovering this issue.
|
||||||
|
(CVE-2014-3508)
|
||||||
|
[Emilia K<>sper, and Steve Henson]
|
||||||
|
|
||||||
|
*) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.)
|
||||||
|
for corner cases. (Certain input points at infinity could lead to
|
||||||
|
bogus results, with non-infinity inputs mapped to infinity too.)
|
||||||
|
[Bodo Moeller]
|
||||||
|
|
||||||
|
Changes between 1.0.0l and 1.0.0m [5 Jun 2014]
|
||||||
|
|
||||||
|
*) Fix for SSL/TLS MITM flaw. An attacker using a carefully crafted
|
||||||
|
handshake can force the use of weak keying material in OpenSSL
|
||||||
|
SSL/TLS clients and servers.
|
||||||
|
|
||||||
|
Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for discovering and
|
||||||
|
researching this issue. (CVE-2014-0224)
|
||||||
|
[KIKUCHI Masashi, Steve Henson]
|
||||||
|
|
||||||
|
*) Fix DTLS recursion flaw. By sending an invalid DTLS handshake to an
|
||||||
|
OpenSSL DTLS client the code can be made to recurse eventually crashing
|
||||||
|
in a DoS attack.
|
||||||
|
|
||||||
|
Thanks to Imre Rad (Search-Lab Ltd.) for discovering this issue.
|
||||||
|
(CVE-2014-0221)
|
||||||
|
[Imre Rad, Steve Henson]
|
||||||
|
|
||||||
|
*) Fix DTLS invalid fragment vulnerability. A buffer overrun attack can
|
||||||
|
be triggered by sending invalid DTLS fragments to an OpenSSL DTLS
|
||||||
|
client or server. This is potentially exploitable to run arbitrary
|
||||||
|
code on a vulnerable client or server.
|
||||||
|
|
||||||
|
Thanks to J<>ri Aedla for reporting this issue. (CVE-2014-0195)
|
||||||
|
[J<>ri Aedla, Steve Henson]
|
||||||
|
|
||||||
|
*) Fix bug in TLS code where clients enable anonymous ECDH ciphersuites
|
||||||
|
are subject to a denial of service attack.
|
||||||
|
|
||||||
|
Thanks to Felix Gr<47>bert and Ivan Fratric at Google for discovering
|
||||||
|
this issue. (CVE-2014-3470)
|
||||||
|
[Felix Gr<47>bert, Ivan Fratric, Steve Henson]
|
||||||
|
|
||||||
|
*) Harmonize version and its documentation. -f flag is used to display
|
||||||
|
compilation flags.
|
||||||
|
[mancha <mancha1@zoho.com>]
|
||||||
|
|
||||||
|
*) Fix eckey_priv_encode so it immediately returns an error upon a failure
|
||||||
|
in i2d_ECPrivateKey.
|
||||||
|
[mancha <mancha1@zoho.com>]
|
||||||
|
|
||||||
|
*) Fix some double frees. These are not thought to be exploitable.
|
||||||
|
[mancha <mancha1@zoho.com>]
|
||||||
|
|
||||||
|
*) Fix for the attack described in the paper "Recovering OpenSSL
|
||||||
|
ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack"
|
||||||
|
by Yuval Yarom and Naomi Benger. Details can be obtained from:
|
||||||
|
http://eprint.iacr.org/2014/140
|
||||||
|
|
||||||
|
Thanks to Yuval Yarom and Naomi Benger for discovering this
|
||||||
|
flaw and to Yuval Yarom for supplying a fix (CVE-2014-0076)
|
||||||
|
[Yuval Yarom and Naomi Benger]
|
||||||
|
|
||||||
|
Changes between 1.0.0k and 1.0.0l [6 Jan 2014]
|
||||||
|
|
||||||
|
*) Keep original DTLS digest and encryption contexts in retransmission
|
||||||
|
structures so we can use the previous session parameters if they need
|
||||||
|
to be resent. (CVE-2013-6450)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Add option SSL_OP_SAFARI_ECDHE_ECDSA_BUG (part of SSL_OP_ALL) which
|
||||||
|
avoids preferring ECDHE-ECDSA ciphers when the client appears to be
|
||||||
|
Safari on OS X. Safari on OS X 10.8..10.8.3 advertises support for
|
||||||
|
several ECDHE-ECDSA ciphers, but fails to negotiate them. The bug
|
||||||
|
is fixed in OS X 10.8.4, but Apple have ruled out both hot fixing
|
||||||
|
10.8..10.8.3 and forcing users to upgrade to 10.8.4 or newer.
|
||||||
|
[Rob Stradling, Adam Langley]
|
||||||
|
|
||||||
|
Changes between 1.0.0j and 1.0.0k [5 Feb 2013]
|
||||||
|
|
||||||
|
*) Make the decoding of SSLv3, TLS and DTLS CBC records constant time.
|
||||||
|
|
||||||
|
This addresses the flaw in CBC record processing discovered by
|
||||||
|
Nadhem Alfardan and Kenny Paterson. Details of this attack can be found
|
||||||
|
at: http://www.isg.rhul.ac.uk/tls/
|
||||||
|
|
||||||
|
Thanks go to Nadhem Alfardan and Kenny Paterson of the Information
|
||||||
|
Security Group at Royal Holloway, University of London
|
||||||
|
(www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and
|
||||||
|
Emilia K<>sper for the initial patch.
|
||||||
|
(CVE-2013-0169)
|
||||||
|
[Emilia K<>sper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson]
|
||||||
|
|
||||||
|
*) Return an error when checking OCSP signatures when key is NULL.
|
||||||
|
This fixes a DoS attack. (CVE-2013-0166)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Call OCSP Stapling callback after ciphersuite has been chosen, so
|
||||||
|
the right response is stapled. Also change SSL_get_certificate()
|
||||||
|
so it returns the certificate actually sent.
|
||||||
|
See http://rt.openssl.org/Ticket/Display.html?id=2836.
|
||||||
|
(This is a backport)
|
||||||
|
[Rob Stradling <rob.stradling@comodo.com>]
|
||||||
|
|
||||||
|
*) Fix possible deadlock when decoding public keys.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 1.0.0i and 1.0.0j [10 May 2012]
|
||||||
|
|
||||||
|
[NB: OpenSSL 1.0.0i and later 1.0.0 patch levels were released after
|
||||||
|
OpenSSL 1.0.1.]
|
||||||
|
|
||||||
|
*) Sanity check record length before skipping explicit IV in DTLS
|
||||||
|
to fix DoS attack.
|
||||||
|
|
||||||
|
Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic
|
||||||
|
fuzzing as a service testing platform.
|
||||||
|
(CVE-2012-2333)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Initialise tkeylen properly when encrypting CMS messages.
|
||||||
|
Thanks to Solar Designer of Openwall for reporting this issue.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 1.0.0h and 1.0.0i [19 Apr 2012]
|
||||||
|
|
||||||
|
*) Check for potentially exploitable overflows in asn1_d2i_read_bio
|
||||||
|
BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer
|
||||||
|
in CRYPTO_realloc_clean.
|
||||||
|
|
||||||
|
Thanks to Tavis Ormandy, Google Security Team, for discovering this
|
||||||
|
issue and to Adam Langley <agl@chromium.org> for fixing it.
|
||||||
|
(CVE-2012-2110)
|
||||||
|
[Adam Langley (Google), Tavis Ormandy, Google Security Team]
|
||||||
|
|
||||||
|
Changes between 1.0.0g and 1.0.0h [12 Mar 2012]
|
||||||
|
|
||||||
|
*) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness
|
||||||
|
in CMS and PKCS7 code. When RSA decryption fails use a random key for
|
||||||
|
content decryption and always return the same error. Note: this attack
|
||||||
|
needs on average 2^20 messages so it only affects automated senders. The
|
||||||
|
old behaviour can be reenabled in the CMS code by setting the
|
||||||
|
CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where
|
||||||
|
an MMA defence is not necessary.
|
||||||
|
Thanks to Ivan Nestlerode <inestlerode@us.ibm.com> for discovering
|
||||||
|
this issue. (CVE-2012-0884)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Fix CVE-2011-4619: make sure we really are receiving a
|
||||||
|
client hello before rejecting multiple SGC restarts. Thanks to
|
||||||
|
Ivan Nestlerode <inestlerode@us.ibm.com> for discovering this bug.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 1.0.0f and 1.0.0g [18 Jan 2012]
|
||||||
|
|
||||||
|
*) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109.
|
||||||
|
Thanks to Antonio Martin, Enterprise Secure Access Research and
|
||||||
|
Development, Cisco Systems, Inc. for discovering this bug and
|
||||||
|
preparing a fix. (CVE-2012-0050)
|
||||||
|
[Antonio Martin]
|
||||||
|
|
||||||
|
Changes between 1.0.0e and 1.0.0f [4 Jan 2012]
|
||||||
|
|
||||||
|
*) Nadhem Alfardan and Kenny Paterson have discovered an extension
|
||||||
|
of the Vaudenay padding oracle attack on CBC mode encryption
|
||||||
|
which enables an efficient plaintext recovery attack against
|
||||||
|
the OpenSSL implementation of DTLS. Their attack exploits timing
|
||||||
|
differences arising during decryption processing. A research
|
||||||
|
paper describing this attack can be found at:
|
||||||
|
http://www.isg.rhul.ac.uk/~kp/dtls.pdf
|
||||||
|
Thanks go to Nadhem Alfardan and Kenny Paterson of the Information
|
||||||
|
Security Group at Royal Holloway, University of London
|
||||||
|
(www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann
|
||||||
|
<seggelmann@fh-muenster.de> and Michael Tuexen <tuexen@fh-muenster.de>
|
||||||
|
for preparing the fix. (CVE-2011-4108)
|
||||||
|
[Robin Seggelmann, Michael Tuexen]
|
||||||
|
|
||||||
|
*) Clear bytes used for block padding of SSL 3.0 records.
|
||||||
|
(CVE-2011-4576)
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Only allow one SGC handshake restart for SSL/TLS. Thanks to George
|
||||||
|
Kadianakis <desnacked@gmail.com> for discovering this issue and
|
||||||
|
Adam Langley for preparing the fix. (CVE-2011-4619)
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Check parameters are not NULL in GOST ENGINE. (CVE-2012-0027)
|
||||||
|
[Andrey Kulikov <amdeich@gmail.com>]
|
||||||
|
|
||||||
|
*) Prevent malformed RFC3779 data triggering an assertion failure.
|
||||||
|
Thanks to Andrew Chi, BBN Technologies, for discovering the flaw
|
||||||
|
and Rob Austein <sra@hactrn.net> for fixing it. (CVE-2011-4577)
|
||||||
|
[Rob Austein <sra@hactrn.net>]
|
||||||
|
|
||||||
|
*) Improved PRNG seeding for VOS.
|
||||||
|
[Paul Green <Paul.Green@stratus.com>]
|
||||||
|
|
||||||
|
*) Fix ssl_ciph.c set-up race.
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Fix spurious failures in ecdsatest.c.
|
||||||
|
[Emilia K<>sper (Google)]
|
||||||
|
|
||||||
|
*) Fix the BIO_f_buffer() implementation (which was mixing different
|
||||||
|
interpretations of the '..._len' fields).
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than
|
||||||
|
BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent
|
||||||
|
threads won't reuse the same blinding coefficients.
|
||||||
|
|
||||||
|
This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING
|
||||||
|
lock to call BN_BLINDING_invert_ex, and avoids one use of
|
||||||
|
BN_BLINDING_update for each BN_BLINDING structure (previously,
|
||||||
|
the last update always remained unused).
|
||||||
|
[Emilia K<>sper (Google)]
|
||||||
|
|
||||||
|
*) In ssl3_clear, preserve s3->init_extra along with s3->rbuf.
|
||||||
|
[Bob Buckholz (Google)]
|
||||||
|
|
||||||
|
Changes between 1.0.0d and 1.0.0e [6 Sep 2011]
|
||||||
|
|
||||||
|
*) Fix bug where CRLs with nextUpdate in the past are sometimes accepted
|
||||||
|
by initialising X509_STORE_CTX properly. (CVE-2011-3207)
|
||||||
|
[Kaspar Brand <ossl@velox.ch>]
|
||||||
|
|
||||||
|
*) Fix SSL memory handling for (EC)DH ciphersuites, in particular
|
||||||
|
for multi-threaded use of ECDH. (CVE-2011-3210)
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Fix x509_name_ex_d2i memory leak on bad inputs.
|
||||||
|
[Bodo Moeller]
|
||||||
|
|
||||||
|
*) Remove hard coded ecdsaWithSHA1 signature tests in ssl code and check
|
||||||
|
signature public key algorithm by using OID xref utilities instead.
|
||||||
|
Before this you could only use some ECC ciphersuites with SHA1 only.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Add protection against ECDSA timing attacks as mentioned in the paper
|
||||||
|
by Billy Bob Brumley and Nicola Tuveri, see:
|
||||||
|
|
||||||
|
http://eprint.iacr.org/2011/232.pdf
|
||||||
|
|
||||||
|
[Billy Bob Brumley and Nicola Tuveri]
|
||||||
|
|
||||||
|
Changes between 1.0.0c and 1.0.0d [8 Feb 2011]
|
||||||
|
|
||||||
|
*) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014
|
||||||
|
[Neel Mehta, Adam Langley, Bodo Moeller (Google)]
|
||||||
|
|
||||||
|
*) Fix bug in string printing code: if *any* escaping is enabled we must
|
||||||
|
escape the escape character (backslash) or the resulting string is
|
||||||
|
ambiguous.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 1.0.0b and 1.0.0c [2 Dec 2010]
|
||||||
|
|
||||||
|
*) Disable code workaround for ancient and obsolete Netscape browsers
|
||||||
|
and servers: an attacker can use it in a ciphersuite downgrade attack.
|
||||||
|
Thanks to Martin Rex for discovering this bug. CVE-2010-4180
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Fixed J-PAKE implementation error, originally discovered by
|
||||||
|
Sebastien Martini, further info and confirmation from Stefan
|
||||||
|
Arentz and Feng Hao. Note that this fix is a security fix. CVE-2010-4252
|
||||||
|
[Ben Laurie]
|
||||||
|
|
||||||
|
Changes between 1.0.0a and 1.0.0b [16 Nov 2010]
|
||||||
|
|
||||||
|
*) Fix extension code to avoid race conditions which can result in a buffer
|
||||||
|
overrun vulnerability: resumed sessions must not be modified as they can
|
||||||
|
be shared by multiple threads. CVE-2010-3864
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Fix WIN32 build system to correctly link an ENGINE directory into
|
||||||
|
a DLL.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
Changes between 1.0.0 and 1.0.0a [01 Jun 2010]
|
Changes between 1.0.0 and 1.0.0a [01 Jun 2010]
|
||||||
|
|
||||||
*) Check return value of int_rsa_verify in pkey_rsa_verifyrecover
|
*) Check return value of int_rsa_verify in pkey_rsa_verifyrecover
|
||||||
@@ -853,7 +1320,212 @@
|
|||||||
*) Change 'Configure' script to enable Camellia by default.
|
*) Change 'Configure' script to enable Camellia by default.
|
||||||
[NTT]
|
[NTT]
|
||||||
|
|
||||||
Changes between 0.9.8n and 0.9.8o [xx XXX xxxx]
|
Changes between 0.9.8x and 0.9.8y [5 Feb 2013]
|
||||||
|
|
||||||
|
*) Make the decoding of SSLv3, TLS and DTLS CBC records constant time.
|
||||||
|
|
||||||
|
This addresses the flaw in CBC record processing discovered by
|
||||||
|
Nadhem Alfardan and Kenny Paterson. Details of this attack can be found
|
||||||
|
at: http://www.isg.rhul.ac.uk/tls/
|
||||||
|
|
||||||
|
Thanks go to Nadhem Alfardan and Kenny Paterson of the Information
|
||||||
|
Security Group at Royal Holloway, University of London
|
||||||
|
(www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and
|
||||||
|
Emilia K<>sper for the initial patch.
|
||||||
|
(CVE-2013-0169)
|
||||||
|
[Emilia K<>sper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson]
|
||||||
|
|
||||||
|
*) Return an error when checking OCSP signatures when key is NULL.
|
||||||
|
This fixes a DoS attack. (CVE-2013-0166)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Call OCSP Stapling callback after ciphersuite has been chosen, so
|
||||||
|
the right response is stapled. Also change SSL_get_certificate()
|
||||||
|
so it returns the certificate actually sent.
|
||||||
|
See http://rt.openssl.org/Ticket/Display.html?id=2836.
|
||||||
|
(This is a backport)
|
||||||
|
[Rob Stradling <rob.stradling@comodo.com>]
|
||||||
|
|
||||||
|
*) Fix possible deadlock when decoding public keys.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 0.9.8w and 0.9.8x [10 May 2012]
|
||||||
|
|
||||||
|
*) Sanity check record length before skipping explicit IV in DTLS
|
||||||
|
to fix DoS attack.
|
||||||
|
|
||||||
|
Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic
|
||||||
|
fuzzing as a service testing platform.
|
||||||
|
(CVE-2012-2333)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Initialise tkeylen properly when encrypting CMS messages.
|
||||||
|
Thanks to Solar Designer of Openwall for reporting this issue.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 0.9.8v and 0.9.8w [23 Apr 2012]
|
||||||
|
|
||||||
|
*) The fix for CVE-2012-2110 did not take into account that the
|
||||||
|
'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an
|
||||||
|
int in OpenSSL 0.9.8, making it still vulnerable. Fix by
|
||||||
|
rejecting negative len parameter. (CVE-2012-2131)
|
||||||
|
[Tomas Hoger <thoger@redhat.com>]
|
||||||
|
|
||||||
|
Changes between 0.9.8u and 0.9.8v [19 Apr 2012]
|
||||||
|
|
||||||
|
*) Check for potentially exploitable overflows in asn1_d2i_read_bio
|
||||||
|
BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer
|
||||||
|
in CRYPTO_realloc_clean.
|
||||||
|
|
||||||
|
Thanks to Tavis Ormandy, Google Security Team, for discovering this
|
||||||
|
issue and to Adam Langley <agl@chromium.org> for fixing it.
|
||||||
|
(CVE-2012-2110)
|
||||||
|
[Adam Langley (Google), Tavis Ormandy, Google Security Team]
|
||||||
|
|
||||||
|
Changes between 0.9.8t and 0.9.8u [12 Mar 2012]
|
||||||
|
|
||||||
|
*) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness
|
||||||
|
in CMS and PKCS7 code. When RSA decryption fails use a random key for
|
||||||
|
content decryption and always return the same error. Note: this attack
|
||||||
|
needs on average 2^20 messages so it only affects automated senders. The
|
||||||
|
old behaviour can be reenabled in the CMS code by setting the
|
||||||
|
CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where
|
||||||
|
an MMA defence is not necessary.
|
||||||
|
Thanks to Ivan Nestlerode <inestlerode@us.ibm.com> for discovering
|
||||||
|
this issue. (CVE-2012-0884)
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Fix CVE-2011-4619: make sure we really are receiving a
|
||||||
|
client hello before rejecting multiple SGC restarts. Thanks to
|
||||||
|
Ivan Nestlerode <inestlerode@us.ibm.com> for discovering this bug.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 0.9.8s and 0.9.8t [18 Jan 2012]
|
||||||
|
|
||||||
|
*) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109.
|
||||||
|
Thanks to Antonio Martin, Enterprise Secure Access Research and
|
||||||
|
Development, Cisco Systems, Inc. for discovering this bug and
|
||||||
|
preparing a fix. (CVE-2012-0050)
|
||||||
|
[Antonio Martin]
|
||||||
|
|
||||||
|
Changes between 0.9.8r and 0.9.8s [4 Jan 2012]
|
||||||
|
|
||||||
|
*) Nadhem Alfardan and Kenny Paterson have discovered an extension
|
||||||
|
of the Vaudenay padding oracle attack on CBC mode encryption
|
||||||
|
which enables an efficient plaintext recovery attack against
|
||||||
|
the OpenSSL implementation of DTLS. Their attack exploits timing
|
||||||
|
differences arising during decryption processing. A research
|
||||||
|
paper describing this attack can be found at:
|
||||||
|
http://www.isg.rhul.ac.uk/~kp/dtls.pdf
|
||||||
|
Thanks go to Nadhem Alfardan and Kenny Paterson of the Information
|
||||||
|
Security Group at Royal Holloway, University of London
|
||||||
|
(www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann
|
||||||
|
<seggelmann@fh-muenster.de> and Michael Tuexen <tuexen@fh-muenster.de>
|
||||||
|
for preparing the fix. (CVE-2011-4108)
|
||||||
|
[Robin Seggelmann, Michael Tuexen]
|
||||||
|
|
||||||
|
*) Stop policy check failure freeing same buffer twice. (CVE-2011-4109)
|
||||||
|
[Ben Laurie, Kasper <ekasper@google.com>]
|
||||||
|
|
||||||
|
*) Clear bytes used for block padding of SSL 3.0 records.
|
||||||
|
(CVE-2011-4576)
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Only allow one SGC handshake restart for SSL/TLS. Thanks to George
|
||||||
|
Kadianakis <desnacked@gmail.com> for discovering this issue and
|
||||||
|
Adam Langley for preparing the fix. (CVE-2011-4619)
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Prevent malformed RFC3779 data triggering an assertion failure.
|
||||||
|
Thanks to Andrew Chi, BBN Technologies, for discovering the flaw
|
||||||
|
and Rob Austein <sra@hactrn.net> for fixing it. (CVE-2011-4577)
|
||||||
|
[Rob Austein <sra@hactrn.net>]
|
||||||
|
|
||||||
|
*) Fix ssl_ciph.c set-up race.
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Fix spurious failures in ecdsatest.c.
|
||||||
|
[Emilia K<>sper (Google)]
|
||||||
|
|
||||||
|
*) Fix the BIO_f_buffer() implementation (which was mixing different
|
||||||
|
interpretations of the '..._len' fields).
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than
|
||||||
|
BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent
|
||||||
|
threads won't reuse the same blinding coefficients.
|
||||||
|
|
||||||
|
This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING
|
||||||
|
lock to call BN_BLINDING_invert_ex, and avoids one use of
|
||||||
|
BN_BLINDING_update for each BN_BLINDING structure (previously,
|
||||||
|
the last update always remained unused).
|
||||||
|
[Emilia K<>sper (Google)]
|
||||||
|
|
||||||
|
*) Fix SSL memory handling for (EC)DH ciphersuites, in particular
|
||||||
|
for multi-threaded use of ECDH.
|
||||||
|
[Adam Langley (Google)]
|
||||||
|
|
||||||
|
*) Fix x509_name_ex_d2i memory leak on bad inputs.
|
||||||
|
[Bodo Moeller]
|
||||||
|
|
||||||
|
*) Add protection against ECDSA timing attacks as mentioned in the paper
|
||||||
|
by Billy Bob Brumley and Nicola Tuveri, see:
|
||||||
|
|
||||||
|
http://eprint.iacr.org/2011/232.pdf
|
||||||
|
|
||||||
|
[Billy Bob Brumley and Nicola Tuveri]
|
||||||
|
|
||||||
|
Changes between 0.9.8q and 0.9.8r [8 Feb 2011]
|
||||||
|
|
||||||
|
*) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014
|
||||||
|
[Neel Mehta, Adam Langley, Bodo Moeller (Google)]
|
||||||
|
|
||||||
|
*) Fix bug in string printing code: if *any* escaping is enabled we must
|
||||||
|
escape the escape character (backslash) or the resulting string is
|
||||||
|
ambiguous.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 0.9.8p and 0.9.8q [2 Dec 2010]
|
||||||
|
|
||||||
|
*) Disable code workaround for ancient and obsolete Netscape browsers
|
||||||
|
and servers: an attacker can use it in a ciphersuite downgrade attack.
|
||||||
|
Thanks to Martin Rex for discovering this bug. CVE-2010-4180
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Fixed J-PAKE implementation error, originally discovered by
|
||||||
|
Sebastien Martini, further info and confirmation from Stefan
|
||||||
|
Arentz and Feng Hao. Note that this fix is a security fix. CVE-2010-4252
|
||||||
|
[Ben Laurie]
|
||||||
|
|
||||||
|
Changes between 0.9.8o and 0.9.8p [16 Nov 2010]
|
||||||
|
|
||||||
|
*) Fix extension code to avoid race conditions which can result in a buffer
|
||||||
|
overrun vulnerability: resumed sessions must not be modified as they can
|
||||||
|
be shared by multiple threads. CVE-2010-3864
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Fix for double free bug in ssl/s3_clnt.c CVE-2010-2939
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Don't reencode certificate when calculating signature: cache and use
|
||||||
|
the original encoding instead. This makes signature verification of
|
||||||
|
some broken encodings work correctly.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) ec2_GF2m_simple_mul bugfix: compute correct result if the output EC_POINT
|
||||||
|
is also one of the inputs.
|
||||||
|
[Emilia K<>sper <emilia.kasper@esat.kuleuven.be> (Google)]
|
||||||
|
|
||||||
|
*) Don't repeatedly append PBE algorithms to table if they already exist.
|
||||||
|
Sort table on each new add. This effectively makes the table read only
|
||||||
|
after all algorithms are added and subsequent calls to PKCS12_pbe_add
|
||||||
|
etc are non-op.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
Changes between 0.9.8n and 0.9.8o [01 Jun 2010]
|
||||||
|
|
||||||
|
[NB: OpenSSL 0.9.8o and later 0.9.8 patch levels were released after
|
||||||
|
OpenSSL 1.0.0.]
|
||||||
|
|
||||||
*) Correct a typo in the CMS ASN1 module which can result in invalid memory
|
*) Correct a typo in the CMS ASN1 module which can result in invalid memory
|
||||||
access or freeing data twice (CVE-2010-0742)
|
access or freeing data twice (CVE-2010-0742)
|
||||||
@@ -864,6 +1536,12 @@
|
|||||||
SSL_library_init and not OpenSSL_add_all_algorithms() will fail.
|
SSL_library_init and not OpenSSL_add_all_algorithms() will fail.
|
||||||
[Steve Henson]
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) VMS fixes:
|
||||||
|
Reduce copying into .apps and .test in makevms.com
|
||||||
|
Don't try to use blank CA certificate in CA.com
|
||||||
|
Allow use of C files from original directories in maketests.com
|
||||||
|
[Steven M. Schweda" <sms@antinode.info>]
|
||||||
|
|
||||||
Changes between 0.9.8m and 0.9.8n [24 Mar 2010]
|
Changes between 0.9.8m and 0.9.8n [24 Mar 2010]
|
||||||
|
|
||||||
*) When rejecting SSL/TLS records due to an incorrect version number, never
|
*) When rejecting SSL/TLS records due to an incorrect version number, never
|
||||||
@@ -872,8 +1550,8 @@
|
|||||||
- OpenSSL 0.9.8f if 'short' is longer than 16 bits,
|
- OpenSSL 0.9.8f if 'short' is longer than 16 bits,
|
||||||
the previous behavior could result in a read attempt at NULL when
|
the previous behavior could result in a read attempt at NULL when
|
||||||
receiving specific incorrect SSL/TLS records once record payload
|
receiving specific incorrect SSL/TLS records once record payload
|
||||||
protection is active. (CVE-2010-####)
|
protection is active. (CVE-2010-0740)
|
||||||
[Bodo Moeller, Adam Langley]
|
[Bodo Moeller, Adam Langley <agl@chromium.org>]
|
||||||
|
|
||||||
*) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL
|
*) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL
|
||||||
could be crashed if the relevant tables were not present (e.g. chrooted).
|
could be crashed if the relevant tables were not present (e.g. chrooted).
|
||||||
|
42
Configure
42
Configure
@@ -167,18 +167,19 @@ my %table=(
|
|||||||
"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", "gcc44:$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O2 -pipe::(unknown)::::::",
|
"debug-ben-debug", "gcc44:$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O2 -pipe::(unknown)::::::",
|
||||||
|
"debug-ben-debug-64", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -Wno-error=strict-aliasing -Wno-error=uninitialized -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O3 -pipe::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-ben-no-opt", "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(unknown)::::::",
|
"debug-ben-no-opt", "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(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-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 -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
"debug-bodo", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||||
"debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll",
|
"debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll",
|
||||||
"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -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-elf","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -ggdb -g3 -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-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -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 -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -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-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -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_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -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 -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-geoff32","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -DMD32_REG_T=int -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-geoff32","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -DMD32_REG_T=int -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-geoff64","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -DMD32_REG_T=int -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-geoff64","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -DMD32_REG_T=int -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_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-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",
|
||||||
@@ -196,8 +197,8 @@ my %table=(
|
|||||||
"cc", "cc:-O::(unknown)::::::",
|
"cc", "cc:-O::(unknown)::::::",
|
||||||
|
|
||||||
####VOS Configurations
|
####VOS Configurations
|
||||||
"vos-gcc","gcc:-O3 -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:",
|
"vos-gcc","gcc:-O3 -Wall -DOPENSSL_SYSNAME_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:",
|
||||||
"debug-vos-gcc","gcc:-O0 -g -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:",
|
"debug-vos-gcc","gcc:-O0 -g -Wall -DOPENSSL_SYSNAME_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map:BN_LLONG:${no_asm}:::::.so:",
|
||||||
|
|
||||||
#### Solaris x86 with GNU C setups
|
#### Solaris x86 with GNU C setups
|
||||||
# -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have to do it
|
# -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have to do it
|
||||||
@@ -237,7 +238,7 @@ my %table=(
|
|||||||
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs::/64",
|
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-xarch=v9 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64",
|
||||||
####
|
####
|
||||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
@@ -438,8 +439,8 @@ my %table=(
|
|||||||
"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64",
|
"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64",
|
||||||
# Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE
|
# Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE
|
||||||
# at build time. $OBJECT_MODE is respected at ./config stage!
|
# at build time. $OBJECT_MODE is respected at ./config stage!
|
||||||
"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
|
"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
|
||||||
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
|
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cray T90 and similar (SDSC)
|
# Cray T90 and similar (SDSC)
|
||||||
@@ -492,6 +493,8 @@ my %table=(
|
|||||||
# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
|
# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
|
||||||
"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32",
|
"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32",
|
||||||
"VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32",
|
"VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32",
|
||||||
|
"debug-VC-WIN64I","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32",
|
||||||
|
"debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32",
|
||||||
# x86 Win32 target defaults to ANSI API, if you want UNICODE, complement
|
# x86 Win32 target defaults to ANSI API, if you want UNICODE, complement
|
||||||
# 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE'
|
# 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE'
|
||||||
"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
|
"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
|
||||||
@@ -551,7 +554,7 @@ my %table=(
|
|||||||
"darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc64_asm}:osx64:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc64_asm}:osx64:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
"debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
|
|
||||||
##### A/UX
|
##### A/UX
|
||||||
@@ -583,6 +586,7 @@ my %table=(
|
|||||||
);
|
);
|
||||||
|
|
||||||
my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A
|
my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A
|
||||||
|
debug-VC-WIN64I debug-VC-WIN64A
|
||||||
VC-NT VC-CE VC-WIN32 debug-VC-WIN32
|
VC-NT VC-CE VC-WIN32 debug-VC-WIN32
|
||||||
BC-32
|
BC-32
|
||||||
netware-clib netware-clib-bsdsock
|
netware-clib netware-clib-bsdsock
|
||||||
@@ -1012,6 +1016,8 @@ foreach (sort (keys %disabled))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
push @skip, $algo;
|
push @skip, $algo;
|
||||||
|
# fix-up crypto/directory name(s)
|
||||||
|
@skip[$#skip]="whrlpool" if $algo eq "whirlpool";
|
||||||
print " (skip dir)";
|
print " (skip dir)";
|
||||||
|
|
||||||
$depflags .= " -DOPENSSL_NO_$ALGO";
|
$depflags .= " -DOPENSSL_NO_$ALGO";
|
||||||
@@ -1093,6 +1099,12 @@ my $ar = $ENV{'AR'} || "ar";
|
|||||||
my $arflags = $fields[$idx_arflags];
|
my $arflags = $fields[$idx_arflags];
|
||||||
my $multilib = $fields[$idx_multilib];
|
my $multilib = $fields[$idx_multilib];
|
||||||
|
|
||||||
|
# if $prefix/lib$multilib is not an existing directory, then
|
||||||
|
# assume that it's not searched by linker automatically, in
|
||||||
|
# which case adding $multilib suffix causes more grief than
|
||||||
|
# we're ready to tolerate, so don't...
|
||||||
|
$multilib="" if !-d "$prefix/lib$multilib";
|
||||||
|
|
||||||
$libdir="lib$multilib" if $libdir eq "";
|
$libdir="lib$multilib" if $libdir eq "";
|
||||||
|
|
||||||
$cflags = "$cflags$exp_cflags";
|
$cflags = "$cflags$exp_cflags";
|
||||||
@@ -1102,6 +1114,12 @@ my ($prelflags,$postlflags)=split('%',$lflags);
|
|||||||
if (defined($postlflags)) { $lflags=$postlflags; }
|
if (defined($postlflags)) { $lflags=$postlflags; }
|
||||||
else { $lflags=$prelflags; undef $prelflags; }
|
else { $lflags=$prelflags; undef $prelflags; }
|
||||||
|
|
||||||
|
if ($target =~ /^mingw/ && `$cc --target-help 2>&1` !~ m/\-mno\-cygwin/m)
|
||||||
|
{
|
||||||
|
$cflags =~ s/\-mno\-cygwin\s*//;
|
||||||
|
$shared_ldflag =~ s/\-mno\-cygwin\s*//;
|
||||||
|
}
|
||||||
|
|
||||||
my $no_shared_warn=0;
|
my $no_shared_warn=0;
|
||||||
my $no_user_cflags=0;
|
my $no_user_cflags=0;
|
||||||
|
|
||||||
@@ -1400,7 +1418,7 @@ else {
|
|||||||
$aes_obj=$aes_enc;
|
$aes_obj=$aes_enc;
|
||||||
}
|
}
|
||||||
$wp_obj="" if ($wp_obj =~ /mmx/ && $processor eq "386");
|
$wp_obj="" if ($wp_obj =~ /mmx/ && $processor eq "386");
|
||||||
if ($wp_obj =~ /\.o$/)
|
if ($wp_obj =~ /\.o$/ && !$disabled{"whirlpool"})
|
||||||
{
|
{
|
||||||
$cflags.=" -DWHIRLPOOL_ASM";
|
$cflags.=" -DWHIRLPOOL_ASM";
|
||||||
}
|
}
|
||||||
|
83
FAQ
83
FAQ
@@ -10,6 +10,7 @@ OpenSSL - Frequently Asked Questions
|
|||||||
* 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?
|
* How do I check the authenticity of the OpenSSL distribution?
|
||||||
|
* How does the versioning scheme work?
|
||||||
|
|
||||||
[LEGAL] Legal questions
|
[LEGAL] Legal questions
|
||||||
|
|
||||||
@@ -52,6 +53,9 @@ OpenSSL - Frequently Asked Questions
|
|||||||
* Why does the OpenSSL test suite fail in sha512t on x86 CPU?
|
* Why does the OpenSSL test suite fail in sha512t on x86 CPU?
|
||||||
* Why does compiler fail to compile sha512.c?
|
* Why does compiler fail to compile sha512.c?
|
||||||
* Test suite still fails, what to do?
|
* Test suite still fails, what to do?
|
||||||
|
* I think I've found a bug, what should I do?
|
||||||
|
* I'm SURE I've found a bug, how do I report it?
|
||||||
|
* I've found a security issue, how do I report it?
|
||||||
|
|
||||||
[PROG] Questions about programming with OpenSSL
|
[PROG] Questions about programming with OpenSSL
|
||||||
|
|
||||||
@@ -79,11 +83,11 @@ 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 1.0.0a was released on Jun 1st, 2010.
|
OpenSSL 1.0.1c was released on Feb 5th, 2013.
|
||||||
|
|
||||||
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:
|
||||||
ftp://ftp.openssl.org/snapshot/>, or get it by anonymous CVS access.
|
ftp://ftp.openssl.org/snapshot/>, or get it by anonymous Git access.
|
||||||
|
|
||||||
|
|
||||||
* Where is the documentation?
|
* Where is the documentation?
|
||||||
@@ -105,12 +109,9 @@ In addition, you can read the most current versions at
|
|||||||
<URL: http://www.openssl.org/docs/>. Note that the online documents refer
|
<URL: http://www.openssl.org/docs/>. Note that the online documents refer
|
||||||
to the very latest development versions of OpenSSL and may include features
|
to the very latest development versions of OpenSSL and may include features
|
||||||
not present in released versions. If in doubt refer to the documentation
|
not present in released versions. If in doubt refer to the documentation
|
||||||
that came with the version of OpenSSL you are using.
|
that came with the version of OpenSSL you are using. The pod format
|
||||||
|
documentation is included in each OpenSSL distribution under the docs
|
||||||
For information on parts of libcrypto that are not yet documented, you
|
directory.
|
||||||
might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's
|
|
||||||
predecessor, at <URL: http://www.columbia.edu/~ariel/ssleay/>. Much
|
|
||||||
of this still applies to OpenSSL.
|
|
||||||
|
|
||||||
There is some documentation about certificate extensions and PKCS#12
|
There is some documentation about certificate extensions and PKCS#12
|
||||||
in doc/openssl.txt
|
in doc/openssl.txt
|
||||||
@@ -131,7 +132,7 @@ OpenSSL. Information on the OpenSSL mailing lists is available from
|
|||||||
* Where can I get a compiled version of OpenSSL?
|
* Where can I get a compiled version of OpenSSL?
|
||||||
|
|
||||||
You can finder pointers to binary distributions in
|
You can finder pointers to binary distributions in
|
||||||
http://www.openssl.org/related/binaries.html .
|
<URL: http://www.openssl.org/related/binaries.html> .
|
||||||
|
|
||||||
Some applications that use OpenSSL are distributed in binary form.
|
Some applications that use OpenSSL are distributed in binary form.
|
||||||
When using such an application, you don't need to install OpenSSL
|
When using such an application, you don't need to install OpenSSL
|
||||||
@@ -170,6 +171,19 @@ just do:
|
|||||||
|
|
||||||
pgp TARBALL.asc
|
pgp TARBALL.asc
|
||||||
|
|
||||||
|
* How does the versioning scheme work?
|
||||||
|
|
||||||
|
After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter
|
||||||
|
releases (e.g. 1.0.1a) can only contain bug and security fixes and no
|
||||||
|
new features. Minor releases change the last number (e.g. 1.0.2) and
|
||||||
|
can contain new features that retain binary compatibility. Changes to
|
||||||
|
the middle number are considered major releases and neither source nor
|
||||||
|
binary compatibility is guaranteed.
|
||||||
|
|
||||||
|
Therefore the answer to the common question "when will feature X be
|
||||||
|
backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear
|
||||||
|
in the next minor release.
|
||||||
|
|
||||||
[LEGAL] =======================================================================
|
[LEGAL] =======================================================================
|
||||||
|
|
||||||
* Do I need patent licenses to use OpenSSL?
|
* Do I need patent licenses to use OpenSSL?
|
||||||
@@ -281,7 +295,7 @@ current directory in this case, but this has changed with 0.9.6a.)
|
|||||||
Check out the CA.pl(1) manual page. This provides a simple wrapper round
|
Check out the CA.pl(1) manual page. This provides a simple wrapper round
|
||||||
the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check
|
the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check
|
||||||
out the manual pages for the individual utilities and the certificate
|
out the manual pages for the individual utilities and the certificate
|
||||||
extensions documentation (currently in doc/openssl.txt).
|
extensions documentation (in ca(1), req(1), x509v3_config(5) )
|
||||||
|
|
||||||
|
|
||||||
* Why can't I create certificate requests?
|
* Why can't I create certificate requests?
|
||||||
@@ -463,7 +477,7 @@ administrators.
|
|||||||
Other projects do have other policies so you can for example extract the CA
|
Other projects do have other policies so you can for example extract the CA
|
||||||
bundle used by Mozilla and/or modssl as described in this article:
|
bundle used by Mozilla and/or modssl as described in this article:
|
||||||
|
|
||||||
http://www.mail-archive.com/modssl-users@modssl.org/msg16980.html
|
<URL: http://www.mail-archive.com/modssl-users@modssl.org/msg16980.html>
|
||||||
|
|
||||||
|
|
||||||
[BUILD] =======================================================================
|
[BUILD] =======================================================================
|
||||||
@@ -505,7 +519,7 @@ when you run the test suite (using "make test"). The message returned is
|
|||||||
"bc: 1 not implemented".
|
"bc: 1 not implemented".
|
||||||
|
|
||||||
The best way to deal with this is to find another implementation of bc
|
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
|
and compile/install it. GNU bc (see <URL: 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.
|
||||||
|
|
||||||
|
|
||||||
@@ -516,7 +530,7 @@ 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".
|
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
|
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
|
and compile/install it. GNU bc (see <URL: 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.
|
||||||
|
|
||||||
|
|
||||||
@@ -709,6 +723,49 @@ never make sense, and tend to emerge when you least expect them. In order
|
|||||||
to identify one, drop optimization level, e.g. by editing CFLAG line in
|
to identify one, drop optimization level, e.g. by editing CFLAG line in
|
||||||
top-level Makefile, recompile and re-run the test.
|
top-level Makefile, recompile and re-run the test.
|
||||||
|
|
||||||
|
* I think I've found a bug, what should I do?
|
||||||
|
|
||||||
|
If you are a new user then it is quite likely you haven't found a bug and
|
||||||
|
something is happening you aren't familiar with. Check this FAQ, the associated
|
||||||
|
documentation and the mailing lists for similar queries. If you are still
|
||||||
|
unsure whether it is a bug or not submit a query to the openssl-users mailing
|
||||||
|
list.
|
||||||
|
|
||||||
|
|
||||||
|
* I'm SURE I've found a bug, how do I report it?
|
||||||
|
|
||||||
|
Bug reports with no security implications should be sent to the request
|
||||||
|
tracker. This can be done by mailing the report to <rt@openssl.org> (or its
|
||||||
|
alias <openssl-bugs@openssl.org>), please note that messages sent to the
|
||||||
|
request tracker also appear in the public openssl-dev mailing list.
|
||||||
|
|
||||||
|
The report should be in plain text. Any patches should be sent as
|
||||||
|
plain text attachments because some mailers corrupt patches sent inline.
|
||||||
|
If your issue affects multiple versions of OpenSSL check any patches apply
|
||||||
|
cleanly and, if possible include patches to each affected version.
|
||||||
|
|
||||||
|
The report should be given a meaningful subject line briefly summarising the
|
||||||
|
issue. Just "bug in OpenSSL" or "bug in OpenSSL 0.9.8n" is not very helpful.
|
||||||
|
|
||||||
|
By sending reports to the request tracker the bug can then be given a priority
|
||||||
|
and assigned to the appropriate maintainer. The history of discussions can be
|
||||||
|
accessed and if the issue has been addressed or a reason why not. If patches
|
||||||
|
are only sent to openssl-dev they can be mislaid if a team member has to
|
||||||
|
wade through months of old messages to review the discussion.
|
||||||
|
|
||||||
|
See also <URL: http://www.openssl.org/support/rt.html>
|
||||||
|
|
||||||
|
|
||||||
|
* I've found a security issue, how do I report it?
|
||||||
|
|
||||||
|
If you think your bug has security implications then please send it to
|
||||||
|
openssl-security@openssl.org if you don't get a prompt reply at least
|
||||||
|
acknowledging receipt then resend or mail it directly to one of the
|
||||||
|
more active team members (e.g. Steve).
|
||||||
|
|
||||||
|
Note that bugs only present in the openssl utility are not in general
|
||||||
|
considered to be security issues.
|
||||||
|
|
||||||
[PROG] ========================================================================
|
[PROG] ========================================================================
|
||||||
|
|
||||||
* Is OpenSSL thread-safe?
|
* Is OpenSSL thread-safe?
|
||||||
|
52
INSTALL.VMS
52
INSTALL.VMS
@@ -71,7 +71,7 @@ the top to understand how to use them. However, if you want to
|
|||||||
compile all you can get, the simplest is to use MAKEVMS.COM in the top
|
compile all you can get, the simplest is to use MAKEVMS.COM in the top
|
||||||
directory. The syntax is the following:
|
directory. The syntax is the following:
|
||||||
|
|
||||||
@MAKEVMS <option> <rsaref-p> <debug-p> [<compiler>]
|
@MAKEVMS <option> <bits> <debug-p> [<compiler>]
|
||||||
|
|
||||||
<option> must be one of the following:
|
<option> must be one of the following:
|
||||||
|
|
||||||
@@ -87,24 +87,11 @@ directory. The syntax is the following:
|
|||||||
TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL.
|
TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL.
|
||||||
APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL.
|
APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL.
|
||||||
|
|
||||||
<rsaref-p> must be one of the following:
|
<bits> must be one of the following:
|
||||||
|
|
||||||
RSAREF compile using the RSAREF Library
|
"" compile using default pointer size
|
||||||
NORSAREF compile without using RSAREF
|
32 compile using 32 bit pointer size
|
||||||
|
64 compile using 64 bit pointer size
|
||||||
Note 0: The RSAREF library IS NO LONGER NEEDED. The RSA patent
|
|
||||||
expires September 20, 2000, and RSA Security chose to make
|
|
||||||
the algorithm public domain two weeks before that.
|
|
||||||
|
|
||||||
Note 1: If you still want to use RSAREF, the library is NOT INCLUDED
|
|
||||||
and you have to download it. RSA Security doesn't carry it
|
|
||||||
any more, but there are a number of places where you can find
|
|
||||||
it. You have to get the ".tar-Z" file as the ".zip" file
|
|
||||||
doesn't have the directory structure stored. You have to
|
|
||||||
extract the file into the [.RSAREF] directory as that is where
|
|
||||||
the scripts will look for the files.
|
|
||||||
|
|
||||||
Note 2: I have never done this, so I've no idea if it works or not.
|
|
||||||
|
|
||||||
<debug-p> must be one of the following:
|
<debug-p> must be one of the following:
|
||||||
|
|
||||||
@@ -117,12 +104,13 @@ Note 2: I have never done this, so I've no idea if it works or not.
|
|||||||
GNUC For GNU C.
|
GNUC For GNU C.
|
||||||
|
|
||||||
|
|
||||||
You will find the crypto library in [.xxx.EXE.CRYPTO], called LIBCRYPTO.OLB,
|
You will find the crypto library in [.xxx.EXE.CRYPTO] (where xxx is VAX,
|
||||||
where xxx is VAX or AXP. You will find the SSL library in [.xxx.EXE.SSL],
|
ALPHA or IA64), called SSL_LIBCRYPTO32.OLB or SSL_LIBCRYPTO.OLB depending
|
||||||
named LIBSSL.OLB, and you will find a bunch of useful programs in
|
on how it was built. You will find the SSL library in [.xxx.EXE.SSL],
|
||||||
[.xxx.EXE.APPS]. However, these shouldn't be used right off unless it's
|
named SSL_LIBSSL32.OLB or SSL_LIBSSL.OLB, and you will find a bunch of
|
||||||
just to test them. For production use, make sure you install first, see
|
useful programs in [.xxx.EXE.APPS]. However, these shouldn't be used
|
||||||
Installation below.
|
right off unless it's just to test them. For production use, make sure
|
||||||
|
you install first, see Installation below.
|
||||||
|
|
||||||
Note 1: Some programs in this package require a TCP/IP library.
|
Note 1: Some programs in this package require a TCP/IP library.
|
||||||
|
|
||||||
@@ -170,12 +158,14 @@ Installation:
|
|||||||
|
|
||||||
Installation is easy, just do the following:
|
Installation is easy, just do the following:
|
||||||
|
|
||||||
@INSTALL <root>
|
@INSTALL <root> <bits>
|
||||||
|
|
||||||
<root> is the directory in which everything will be installed,
|
<root> is the directory in which everything will be installed,
|
||||||
subdirectories, libraries, header files, programs and startup command
|
subdirectories, libraries, header files, programs and startup command
|
||||||
procedures.
|
procedures.
|
||||||
|
|
||||||
|
<bits> works the same way as for MAKEVMS.COM
|
||||||
|
|
||||||
N.B.: INSTALL.COM builds a new directory structure, different from
|
N.B.: INSTALL.COM builds a new directory structure, different from
|
||||||
the directory tree where you have now build OpenSSL.
|
the directory tree where you have now build OpenSSL.
|
||||||
|
|
||||||
@@ -196,6 +186,10 @@ following command procedures:
|
|||||||
sets up the symbols to the applications. Should be called
|
sets up the symbols to the applications. Should be called
|
||||||
from for example SYS$MANAGER:SYLOGIN.COM
|
from for example SYS$MANAGER:SYLOGIN.COM
|
||||||
|
|
||||||
|
OPENSSL_UNDO.COM
|
||||||
|
|
||||||
|
deassigns the logical names created with OPENSSL_STARTUP.COM.
|
||||||
|
|
||||||
The logical names that are set up are the following:
|
The logical names that are set up are the following:
|
||||||
|
|
||||||
SSLROOT a dotted concealed logical name pointing at the
|
SSLROOT a dotted concealed logical name pointing at the
|
||||||
@@ -203,7 +197,6 @@ The logical names that are set up are the following:
|
|||||||
|
|
||||||
SSLCERTS Initially an empty directory, this is the default
|
SSLCERTS Initially an empty directory, this is the default
|
||||||
location for certificate files.
|
location for certificate files.
|
||||||
SSLMISC Various scripts.
|
|
||||||
SSLPRIVATE Initially an empty directory, this is the default
|
SSLPRIVATE Initially an empty directory, this is the default
|
||||||
location for private key files.
|
location for private key files.
|
||||||
|
|
||||||
@@ -211,8 +204,9 @@ The logical names that are set up are the following:
|
|||||||
programs.
|
programs.
|
||||||
SSLINCLUDE Contains the header files needed if you want to
|
SSLINCLUDE Contains the header files needed if you want to
|
||||||
compile programs with libcrypto or libssl.
|
compile programs with libcrypto or libssl.
|
||||||
SSLLIB Contains the OpenSSL library files (LIBCRYPTO.OLB
|
SSLLIB Contains the OpenSSL library files themselves:
|
||||||
and LIBSSL.OLB) themselves.
|
- SSL_LIBCRYPTO32.OLB and SSL_LIBSSL32.OLB or
|
||||||
|
- SSL_LIBCRYPTO.OLB and SSL_LIBSSL.OLB
|
||||||
|
|
||||||
OPENSSL Same as SSLINCLUDE. This is because the standard
|
OPENSSL Same as SSLINCLUDE. This is because the standard
|
||||||
way to include OpenSSL header files from version
|
way to include OpenSSL header files from version
|
||||||
@@ -296,4 +290,4 @@ have any ideas.
|
|||||||
|
|
||||||
--
|
--
|
||||||
Richard Levitte <richard@levitte.org>
|
Richard Levitte <richard@levitte.org>
|
||||||
2000-02-27
|
2000-02-27, 2011-03-18
|
||||||
|
26
INSTALL.W32
26
INSTALL.W32
@@ -29,7 +29,7 @@
|
|||||||
is required if you intend to utilize assembler modules. Note that NASM
|
is required if you intend to utilize assembler modules. Note that NASM
|
||||||
is now the only supported assembler.
|
is now the only supported assembler.
|
||||||
|
|
||||||
If you are compiling from a tarball or a CVS snapshot then the Win32 files
|
If you are compiling from a tarball or a Git snapshot then the Win32 files
|
||||||
may well be not up to date. This may mean that some "tweaking" is required to
|
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?)
|
get it all to work. See the trouble shooting section later on for if (when?)
|
||||||
it goes wrong.
|
it goes wrong.
|
||||||
@@ -185,6 +185,15 @@
|
|||||||
required. Run the installers and do whatever magic they say it takes
|
required. Run the installers and do whatever magic they say it takes
|
||||||
to start MSYS bash shell with GNU tools on its PATH.
|
to start MSYS bash shell with GNU tools on its PATH.
|
||||||
|
|
||||||
|
N.B. Since source tar-ball can contain symbolic links, it's essential
|
||||||
|
that you use accompanying MSYS tar to unpack the source. It will
|
||||||
|
either handle them in one way or another or fail to extract them,
|
||||||
|
which does the trick too. Latter means that you may safely ignore all
|
||||||
|
"cannot create symlink" messages, as they will be "re-created" at
|
||||||
|
configure stage by copying corresponding files. Alternative programs
|
||||||
|
were observed to create empty files instead, which results in build
|
||||||
|
failure.
|
||||||
|
|
||||||
* Compile OpenSSL:
|
* Compile OpenSSL:
|
||||||
|
|
||||||
$ ./config
|
$ ./config
|
||||||
@@ -248,7 +257,7 @@
|
|||||||
|
|
||||||
then ms\do_XXX should not give a warning any more. However the numbers that
|
then ms\do_XXX should not give a warning any more. However the numbers that
|
||||||
get assigned by this technique may not match those that eventually get
|
get assigned by this technique may not match those that eventually get
|
||||||
assigned in the CVS tree: so anything linked against this version of the
|
assigned in the Git tree: so anything linked against this version of the
|
||||||
library may need to be recompiled.
|
library may need to be recompiled.
|
||||||
|
|
||||||
If you get errors about unresolved symbols there are several possible
|
If you get errors about unresolved symbols there are several possible
|
||||||
@@ -297,7 +306,18 @@
|
|||||||
desktop, which is not available to service processes. The toolkit is
|
desktop, which is not available to service processes. The toolkit is
|
||||||
designed to detect in which context it's currently executed, GUI,
|
designed to detect in which context it's currently executed, GUI,
|
||||||
console app or service, and act accordingly, namely whether or not to
|
console app or service, and act accordingly, namely whether or not to
|
||||||
actually make GUI calls.
|
actually make GUI calls. Additionally those who wish to
|
||||||
|
/DELAYLOAD:GDI32.DLL and /DELAYLOAD:USER32.DLL and actually keep them
|
||||||
|
off service process should consider implementing and exporting from
|
||||||
|
.exe image in question own _OPENSSL_isservice not relying on USER32.DLL.
|
||||||
|
E.g., on Windows Vista and later you could:
|
||||||
|
|
||||||
|
__declspec(dllexport) __cdecl BOOL _OPENSSL_isservice(void)
|
||||||
|
{ DWORD sess;
|
||||||
|
if (ProcessIdToSessionId(GetCurrentProcessId(),&sess))
|
||||||
|
return sess==0;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
If you link with OpenSSL .DLLs, then you're expected to include into
|
If you link with OpenSSL .DLLs, then you're expected to include into
|
||||||
your application code small "shim" snippet, which provides glue between
|
your application code small "shim" snippet, which provides glue between
|
||||||
|
2
LICENSE
2
LICENSE
@@ -12,7 +12,7 @@
|
|||||||
---------------
|
---------------
|
||||||
|
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1998-2011 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
|
||||||
|
11
Makefile.org
11
Makefile.org
@@ -172,7 +172,7 @@ CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
|
|||||||
$${EXHEADER+EXHEADER} $${HEADER+HEADER} \
|
$${EXHEADER+EXHEADER} $${HEADER+HEADER} \
|
||||||
$${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
|
$${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
|
||||||
$${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
|
$${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
|
||||||
$${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} \
|
$${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \
|
||||||
$${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
|
$${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
|
||||||
$${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
|
$${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
|
||||||
|
|
||||||
@@ -322,7 +322,8 @@ libcrypto.pc: Makefile
|
|||||||
echo 'Description: OpenSSL cryptography library'; \
|
echo 'Description: OpenSSL cryptography library'; \
|
||||||
echo 'Version: '$(VERSION); \
|
echo 'Version: '$(VERSION); \
|
||||||
echo 'Requires: '; \
|
echo 'Requires: '; \
|
||||||
echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
|
echo 'Libs: -L$${libdir} -lcrypto'; \
|
||||||
|
echo 'Libs.private: $(EX_LIBS)'; \
|
||||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
|
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
|
||||||
|
|
||||||
libssl.pc: Makefile
|
libssl.pc: Makefile
|
||||||
@@ -335,7 +336,8 @@ libssl.pc: Makefile
|
|||||||
echo 'Description: Secure Sockets Layer and cryptography libraries'; \
|
echo 'Description: Secure Sockets Layer and cryptography libraries'; \
|
||||||
echo 'Version: '$(VERSION); \
|
echo 'Version: '$(VERSION); \
|
||||||
echo 'Requires: '; \
|
echo 'Requires: '; \
|
||||||
echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
|
||||||
|
echo 'Libs.private: $(EX_LIBS)'; \
|
||||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
|
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
|
||||||
|
|
||||||
openssl.pc: Makefile
|
openssl.pc: Makefile
|
||||||
@@ -348,7 +350,8 @@ openssl.pc: Makefile
|
|||||||
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
||||||
echo 'Version: '$(VERSION); \
|
echo 'Version: '$(VERSION); \
|
||||||
echo 'Requires: '; \
|
echo 'Requires: '; \
|
||||||
echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
|
||||||
|
echo 'Libs.private: $(EX_LIBS)'; \
|
||||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||||
|
|
||||||
Makefile: Makefile.org Configure config
|
Makefile: Makefile.org Configure config
|
||||||
|
@@ -135,7 +135,7 @@ LINK_SO_A_VIA_O= \
|
|||||||
ALL=$$ALLSYMSFLAGS; ALLSYMSFLAGS=; NOALLSYMSFLAGS=; \
|
ALL=$$ALLSYMSFLAGS; ALLSYMSFLAGS=; NOALLSYMSFLAGS=; \
|
||||||
( $(SET_X); \
|
( $(SET_X); \
|
||||||
ld $(LDFLAGS) -r -o lib$(LIBNAME).o $$ALL lib$(LIBNAME).a $(LIBEXTRAS) ); \
|
ld $(LDFLAGS) -r -o lib$(LIBNAME).o $$ALL lib$(LIBNAME).a $(LIBEXTRAS) ); \
|
||||||
$(LINK_SO) && rm -f $(LIBNAME).o
|
$(LINK_SO) && rm -f lib$(LIBNAME).o
|
||||||
|
|
||||||
LINK_SO_A_UNPACKED= \
|
LINK_SO_A_UNPACKED= \
|
||||||
UNPACKDIR=link_tmp.$$$$; rm -rf $$UNPACKDIR; mkdir $$UNPACKDIR; \
|
UNPACKDIR=link_tmp.$$$$; rm -rf $$UNPACKDIR; mkdir $$UNPACKDIR; \
|
||||||
@@ -207,17 +207,29 @@ link_app.bsd:
|
|||||||
fi; $(LINK_APP)
|
fi; $(LINK_APP)
|
||||||
|
|
||||||
# For Darwin AKA Mac OS/X (dyld)
|
# For Darwin AKA Mac OS/X (dyld)
|
||||||
# link_o.darwin produces .so, because we let it use dso_dlfcn module,
|
# Originally link_o.darwin produced .so, because it was hard-coded
|
||||||
# which has .so extension hard-coded. One can argue that one should
|
# in dso_dlfcn module. At later point dso_dlfcn switched to .dylib
|
||||||
# develop special dso module for MacOS X. At least manual encourages
|
# extension in order to allow for run-time linking with vendor-
|
||||||
# to use native NSModule(3) API and refers to dlfcn as termporary hack.
|
# supplied shared libraries such as libz, so that link_o.darwin had
|
||||||
|
# to be harmonized with it. This caused minor controversy, because
|
||||||
|
# it was believed that dlopen can't be used to dynamically load
|
||||||
|
# .dylib-s, only so called bundle modules (ones linked with -bundle
|
||||||
|
# flag). The belief seems to be originating from pre-10.4 release,
|
||||||
|
# where dlfcn functionality was emulated by dlcompat add-on. In
|
||||||
|
# 10.4 dlopen was rewritten as native part of dyld and is documented
|
||||||
|
# to be capable of loading both dynamic libraries and bundles. In
|
||||||
|
# order to provide compatibility with pre-10.4 dlopen, modules are
|
||||||
|
# linked with -bundle flag, which makes .dylib extension misleading.
|
||||||
|
# It works, because dlopen is [and always was] extension-agnostic.
|
||||||
|
# Alternative to this heuristic approach is to develop specific
|
||||||
|
# MacOS X dso module relying on whichever "native" dyld interface.
|
||||||
link_o.darwin:
|
link_o.darwin:
|
||||||
@ $(CALC_VERSIONS); \
|
@ $(CALC_VERSIONS); \
|
||||||
SHLIB=lib$(LIBNAME); \
|
SHLIB=lib$(LIBNAME); \
|
||||||
SHLIB_SUFFIX=.so; \
|
SHLIB_SUFFIX=.dylib; \
|
||||||
ALLSYMSFLAGS='-all_load'; \
|
ALLSYMSFLAGS='-all_load'; \
|
||||||
NOALLSYMSFLAGS=''; \
|
NOALLSYMSFLAGS=''; \
|
||||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS)"; \
|
SHAREDFLAGS="$(CFLAGS) `echo $(SHARED_LDFLAGS) | sed s/dynamiclib/bundle/`"; \
|
||||||
if [ -n "$(LIBVERSION)" ]; then \
|
if [ -n "$(LIBVERSION)" ]; then \
|
||||||
SHAREDFLAGS="$$SHAREDFLAGS -current_version $(LIBVERSION)"; \
|
SHAREDFLAGS="$$SHAREDFLAGS -current_version $(LIBVERSION)"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
259
NEWS
259
NEWS
@@ -5,12 +5,125 @@
|
|||||||
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 1.0.0 and OpenSSL 1.0.0a:
|
Major changes between OpenSSL 1.0.0q and OpenSSL 1.0.0r [under development]
|
||||||
|
|
||||||
|
o
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0p and OpenSSL 1.0.0q [15 Jan 2015]
|
||||||
|
|
||||||
|
o Build fixes for the Windows and OpenVMS platforms
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0o and OpenSSL 1.0.0p [8 Jan 2015]
|
||||||
|
|
||||||
|
o Fix for CVE-2014-3571
|
||||||
|
o Fix for CVE-2015-0206
|
||||||
|
o Fix for CVE-2014-3569
|
||||||
|
o Fix for CVE-2014-3572
|
||||||
|
o Fix for CVE-2015-0204
|
||||||
|
o Fix for CVE-2015-0205
|
||||||
|
o Fix for CVE-2014-8275
|
||||||
|
o Fix for CVE-2014-3570
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0n and OpenSSL 1.0.0o [15 Oct 2014]
|
||||||
|
|
||||||
|
o Fix for CVE-2014-3513
|
||||||
|
o Fix for CVE-2014-3567
|
||||||
|
o Mitigation for CVE-2014-3566 (SSL protocol vulnerability)
|
||||||
|
o Fix for CVE-2014-3568
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0m and OpenSSL 1.0.0n [6 Aug 2014]
|
||||||
|
|
||||||
|
o Fix for CVE-2014-3510
|
||||||
|
o Fix for CVE-2014-3507
|
||||||
|
o Fix for CVE-2014-3506
|
||||||
|
o Fix for CVE-2014-3505
|
||||||
|
o Fix for CVE-2014-3509
|
||||||
|
o Fix for CVE-2014-3508
|
||||||
|
|
||||||
|
Known issues in OpenSSL 1.0.0m:
|
||||||
|
|
||||||
|
o EAP-FAST and other applications using tls_session_secret_cb
|
||||||
|
wont resume sessions. Fixed in 1.0.0n-dev
|
||||||
|
o Compilation failure of s3_pkt.c on some platforms due to missing
|
||||||
|
<limits.h> include. Fixed in 1.0.0n-dev
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0l and OpenSSL 1.0.0m [5 Jun 2014]
|
||||||
|
|
||||||
|
o Fix for CVE-2014-0224
|
||||||
|
o Fix for CVE-2014-0221
|
||||||
|
o Fix for CVE-2014-0198
|
||||||
|
o Fix for CVE-2014-0195
|
||||||
|
o Fix for CVE-2014-3470
|
||||||
|
o Fix for CVE-2014-0076
|
||||||
|
o Fix for CVE-2010-5298
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0k and OpenSSL 1.0.0l [6 Jan 2014]
|
||||||
|
|
||||||
|
o Fix for DTLS retransmission bug CVE-2013-6450
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0j and OpenSSL 1.0.0k [5 Feb 2013]:
|
||||||
|
|
||||||
|
o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169
|
||||||
|
o Fix OCSP bad key DoS attack CVE-2013-0166
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0i and OpenSSL 1.0.0j [10 May 2012]:
|
||||||
|
|
||||||
|
o Fix DTLS record length checking bug CVE-2012-2333
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.0i [19 Apr 2012]:
|
||||||
|
|
||||||
|
o Fix for ASN1 overflow bug CVE-2012-2110
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h [12 Mar 2012]:
|
||||||
|
|
||||||
|
o Fix for CMS/PKCS#7 MMA CVE-2012-0884
|
||||||
|
o Corrected fix for CVE-2011-4619
|
||||||
|
o Various DTLS fixes.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0f and OpenSSL 1.0.0g [18 Jan 2012]:
|
||||||
|
|
||||||
|
o Fix for DTLS DoS issue CVE-2012-0050
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0e and OpenSSL 1.0.0f [4 Jan 2012]:
|
||||||
|
|
||||||
|
o Fix for DTLS plaintext recovery attack CVE-2011-4108
|
||||||
|
o Clear block padding bytes of SSL 3.0 records CVE-2011-4576
|
||||||
|
o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619
|
||||||
|
o Check parameters are not NULL in GOST ENGINE CVE-2012-0027
|
||||||
|
o Check for malformed RFC3779 data CVE-2011-4577
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e [6 Sep 2011]:
|
||||||
|
|
||||||
|
o Fix for CRL vulnerability issue CVE-2011-3207
|
||||||
|
o Fix for ECDH crashes CVE-2011-3210
|
||||||
|
o Protection against EC timing attacks.
|
||||||
|
o Support ECDH ciphersuites for certificates using SHA2 algorithms.
|
||||||
|
o Various DTLS fixes.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d [8 Feb 2011]:
|
||||||
|
|
||||||
|
o Fix for security issue CVE-2011-0014
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c [2 Dec 2010]:
|
||||||
|
|
||||||
|
o Fix for security issue CVE-2010-4180
|
||||||
|
o Fix for CVE-2010-4252
|
||||||
|
o Fix mishandling of absent EC point format extension.
|
||||||
|
o Fix various platform compilation issues.
|
||||||
|
o Corrected fix for security issue CVE-2010-3864.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b [16 Nov 2010]:
|
||||||
|
|
||||||
|
o Fix for security issue CVE-2010-3864.
|
||||||
|
o Fix for CVE-2010-2939
|
||||||
|
o Fix WIN32 build system for GOST ENGINE.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a [1 Jun 2010]:
|
||||||
|
|
||||||
o Fix for security issue CVE-2010-1633.
|
o Fix for security issue CVE-2010-1633.
|
||||||
o GOST MAC and CFB fixes.
|
o GOST MAC and CFB fixes.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8n and OpenSSL 1.0:
|
Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0 [29 Mar 2010]:
|
||||||
|
|
||||||
o RFC3280 path validation: sufficient to process PKITS tests.
|
o RFC3280 path validation: sufficient to process PKITS tests.
|
||||||
o Integrated support for PVK files and keyblobs.
|
o Integrated support for PVK files and keyblobs.
|
||||||
@@ -33,7 +146,55 @@
|
|||||||
o Opaque PRF Input TLS extension support.
|
o Opaque PRF Input TLS extension support.
|
||||||
o Updated time routines to avoid OS limitations.
|
o Updated time routines to avoid OS limitations.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o:
|
Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y [5 Feb 2013]:
|
||||||
|
|
||||||
|
o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169
|
||||||
|
o Fix OCSP bad key DoS attack CVE-2013-0166
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x [10 May 2012]:
|
||||||
|
|
||||||
|
o Fix DTLS record length checking bug CVE-2012-2333
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w [23 Apr 2012]:
|
||||||
|
|
||||||
|
o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110)
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v [19 Apr 2012]:
|
||||||
|
|
||||||
|
o Fix for ASN1 overflow bug CVE-2012-2110
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u [12 Mar 2012]:
|
||||||
|
|
||||||
|
o Fix for CMS/PKCS#7 MMA CVE-2012-0884
|
||||||
|
o Corrected fix for CVE-2011-4619
|
||||||
|
o Various DTLS fixes.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t [18 Jan 2012]:
|
||||||
|
|
||||||
|
o Fix for DTLS DoS issue CVE-2012-0050
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s [4 Jan 2012]:
|
||||||
|
|
||||||
|
o Fix for DTLS plaintext recovery attack CVE-2011-4108
|
||||||
|
o Fix policy check double free error CVE-2011-4109
|
||||||
|
o Clear block padding bytes of SSL 3.0 records CVE-2011-4576
|
||||||
|
o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619
|
||||||
|
o Check for malformed RFC3779 data CVE-2011-4577
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r [8 Feb 2011]:
|
||||||
|
|
||||||
|
o Fix for security issue CVE-2011-0014
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q [2 Dec 2010]:
|
||||||
|
|
||||||
|
o Fix for security issue CVE-2010-4180
|
||||||
|
o Fix for CVE-2010-4252
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p [16 Nov 2010]:
|
||||||
|
|
||||||
|
o Fix for security issue CVE-2010-3864.
|
||||||
|
|
||||||
|
Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o [1 Jun 2010]:
|
||||||
|
|
||||||
o Fix for security issue CVE-2010-0742.
|
o Fix for security issue CVE-2010-0742.
|
||||||
o Various DTLS fixes.
|
o Various DTLS fixes.
|
||||||
@@ -41,12 +202,12 @@
|
|||||||
o Fix for no-rc4 compilation.
|
o Fix for no-rc4 compilation.
|
||||||
o Chil ENGINE unload workaround.
|
o Chil ENGINE unload workaround.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n:
|
Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n [24 Mar 2010]:
|
||||||
|
|
||||||
o CFB cipher definition fixes.
|
o CFB cipher definition fixes.
|
||||||
o Fix security issues CVE-2010-0740 and CVE-2010-0433.
|
o Fix security issues CVE-2010-0740 and CVE-2010-0433.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m:
|
Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m [25 Feb 2010]:
|
||||||
|
|
||||||
o Cipher definition fixes.
|
o Cipher definition fixes.
|
||||||
o Workaround for slow RAND_poll() on some WIN32 versions.
|
o Workaround for slow RAND_poll() on some WIN32 versions.
|
||||||
@@ -58,33 +219,33 @@
|
|||||||
o Ticket and SNI coexistence fixes.
|
o Ticket and SNI coexistence fixes.
|
||||||
o Many fixes to DTLS handling.
|
o Many fixes to DTLS handling.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l:
|
Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l [5 Nov 2009]:
|
||||||
|
|
||||||
o Temporary work around for CVE-2009-3555: disable renegotiation.
|
o Temporary work around for CVE-2009-3555: disable renegotiation.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k:
|
Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k [25 Mar 2009]:
|
||||||
|
|
||||||
o Fix various build issues.
|
o Fix various build issues.
|
||||||
o Fix security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789)
|
o Fix security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789)
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j:
|
Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j [7 Jan 2009]:
|
||||||
|
|
||||||
o Fix security issue (CVE-2008-5077)
|
o Fix security issue (CVE-2008-5077)
|
||||||
o Merge FIPS 140-2 branch code.
|
o Merge FIPS 140-2 branch code.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h:
|
Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h [28 May 2008]:
|
||||||
|
|
||||||
o CryptoAPI ENGINE support.
|
o CryptoAPI ENGINE support.
|
||||||
o Various precautionary measures.
|
o Various precautionary measures.
|
||||||
o Fix for bugs affecting certificate request creation.
|
o Fix for bugs affecting certificate request creation.
|
||||||
o Support for local machine keyset attribute in PKCS#12 files.
|
o Support for local machine keyset attribute in PKCS#12 files.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g:
|
Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g [19 Oct 2007]:
|
||||||
|
|
||||||
o Backport of CMS functionality to 0.9.8.
|
o Backport of CMS functionality to 0.9.8.
|
||||||
o Fixes for bugs introduced with 0.9.8f.
|
o Fixes for bugs introduced with 0.9.8f.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f:
|
Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f [11 Oct 2007]:
|
||||||
|
|
||||||
o Add gcc 4.2 support.
|
o Add gcc 4.2 support.
|
||||||
o Add support for AES and SSE2 assembly lanugauge optimization
|
o Add support for AES and SSE2 assembly lanugauge optimization
|
||||||
@@ -95,23 +256,23 @@
|
|||||||
o RFC4507bis support.
|
o RFC4507bis support.
|
||||||
o TLS Extensions support.
|
o TLS Extensions support.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e:
|
Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e [23 Feb 2007]:
|
||||||
|
|
||||||
o Various ciphersuite selection fixes.
|
o Various ciphersuite selection fixes.
|
||||||
o RFC3779 support.
|
o RFC3779 support.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d:
|
Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d [28 Sep 2006]:
|
||||||
|
|
||||||
o Introduce limits to prevent malicious key DoS (CVE-2006-2940)
|
o Introduce limits to prevent malicious key DoS (CVE-2006-2940)
|
||||||
o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343)
|
o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343)
|
||||||
o Changes to ciphersuite selection algorithm
|
o Changes to ciphersuite selection algorithm
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c:
|
Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c [5 Sep 2006]:
|
||||||
|
|
||||||
o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339
|
o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339
|
||||||
o New cipher Camellia
|
o New cipher Camellia
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b:
|
Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b [4 May 2006]:
|
||||||
|
|
||||||
o Cipher string fixes.
|
o Cipher string fixes.
|
||||||
o Fixes for VC++ 2005.
|
o Fixes for VC++ 2005.
|
||||||
@@ -121,12 +282,12 @@
|
|||||||
o Built in dynamic engine compilation support on Win32.
|
o Built in dynamic engine compilation support on Win32.
|
||||||
o Fixes auto dynamic engine loading in Win32.
|
o Fixes auto dynamic engine loading in Win32.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a:
|
Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a [11 Oct 2005]:
|
||||||
|
|
||||||
o Fix potential SSL 2.0 rollback, CVE-2005-2969
|
o Fix potential SSL 2.0 rollback, CVE-2005-2969
|
||||||
o Extended Windows CE support
|
o Extended Windows CE support
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8:
|
Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8 [5 Jul 2005]:
|
||||||
|
|
||||||
o Major work on the BIGNUM library for higher efficiency and to
|
o Major work on the BIGNUM library for higher efficiency and to
|
||||||
make operations more streamlined and less contradictory. This
|
make operations more streamlined and less contradictory. This
|
||||||
@@ -200,36 +361,36 @@
|
|||||||
o Added initial support for Win64.
|
o Added initial support for Win64.
|
||||||
o Added alternate pkg-config files.
|
o Added alternate pkg-config files.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m:
|
Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m [23 Feb 2007]:
|
||||||
|
|
||||||
o FIPS 1.1.1 module linking.
|
o FIPS 1.1.1 module linking.
|
||||||
o Various ciphersuite selection fixes.
|
o Various ciphersuite selection fixes.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l:
|
Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l [28 Sep 2006]:
|
||||||
|
|
||||||
o Introduce limits to prevent malicious key DoS (CVE-2006-2940)
|
o Introduce limits to prevent malicious key DoS (CVE-2006-2940)
|
||||||
o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343)
|
o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343)
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k:
|
Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k [5 Sep 2006]:
|
||||||
|
|
||||||
o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339
|
o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j:
|
Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j [4 May 2006]:
|
||||||
|
|
||||||
o Visual C++ 2005 fixes.
|
o Visual C++ 2005 fixes.
|
||||||
o Update Windows build system for FIPS.
|
o Update Windows build system for FIPS.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i:
|
Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i [14 Oct 2005]:
|
||||||
|
|
||||||
o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build.
|
o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h:
|
Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h [11 Oct 2005]:
|
||||||
|
|
||||||
o Fix SSL 2.0 Rollback, CVE-2005-2969
|
o Fix SSL 2.0 Rollback, CVE-2005-2969
|
||||||
o Allow use of fixed-length exponent on DSA signing
|
o Allow use of fixed-length exponent on DSA signing
|
||||||
o Default fixed-window RSA, DSA, DH private-key operations
|
o Default fixed-window RSA, DSA, DH private-key operations
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g:
|
Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g [11 Apr 2005]:
|
||||||
|
|
||||||
o More compilation issues fixed.
|
o More compilation issues fixed.
|
||||||
o Adaptation to more modern Kerberos API.
|
o Adaptation to more modern Kerberos API.
|
||||||
@@ -238,7 +399,7 @@
|
|||||||
o More constification.
|
o More constification.
|
||||||
o Added processing of proxy certificates (RFC 3820).
|
o Added processing of proxy certificates (RFC 3820).
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f:
|
Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f [22 Mar 2005]:
|
||||||
|
|
||||||
o Several compilation issues fixed.
|
o Several compilation issues fixed.
|
||||||
o Many memory allocation failure checks added.
|
o Many memory allocation failure checks added.
|
||||||
@@ -246,12 +407,12 @@
|
|||||||
o Mandatory basic checks on certificates.
|
o Mandatory basic checks on certificates.
|
||||||
o Performance improvements.
|
o Performance improvements.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e:
|
Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e [25 Oct 2004]:
|
||||||
|
|
||||||
o Fix race condition in CRL checking code.
|
o Fix race condition in CRL checking code.
|
||||||
o Fixes to PKCS#7 (S/MIME) code.
|
o Fixes to PKCS#7 (S/MIME) code.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d:
|
Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d [17 Mar 2004]:
|
||||||
|
|
||||||
o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug
|
o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug
|
||||||
o Security: Fix null-pointer assignment in do_change_cipher_spec()
|
o Security: Fix null-pointer assignment in do_change_cipher_spec()
|
||||||
@@ -259,14 +420,14 @@
|
|||||||
o Multiple X509 verification fixes
|
o Multiple X509 verification fixes
|
||||||
o Speed up HMAC and other operations
|
o Speed up HMAC and other operations
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c:
|
Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c [30 Sep 2003]:
|
||||||
|
|
||||||
o Security: fix various ASN1 parsing bugs.
|
o Security: fix various ASN1 parsing bugs.
|
||||||
o New -ignore_err option to OCSP utility.
|
o New -ignore_err option to OCSP utility.
|
||||||
o Various interop and bug fixes in S/MIME code.
|
o Various interop and bug fixes in S/MIME code.
|
||||||
o SSL/TLS protocol fix for unrequested client certificates.
|
o SSL/TLS protocol fix for unrequested client certificates.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b:
|
Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b [10 Apr 2003]:
|
||||||
|
|
||||||
o Security: counter the Klima-Pokorny-Rosa extension of
|
o Security: counter the Klima-Pokorny-Rosa extension of
|
||||||
Bleichbacher's attack
|
Bleichbacher's attack
|
||||||
@@ -277,7 +438,7 @@
|
|||||||
o ASN.1: treat domainComponent correctly.
|
o ASN.1: treat domainComponent correctly.
|
||||||
o Documentation: fixes and additions.
|
o Documentation: fixes and additions.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a:
|
Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a [19 Feb 2003]:
|
||||||
|
|
||||||
o Security: Important security related bugfixes.
|
o Security: Important security related bugfixes.
|
||||||
o Enhanced compatibility with MIT Kerberos.
|
o Enhanced compatibility with MIT Kerberos.
|
||||||
@@ -288,7 +449,7 @@
|
|||||||
o SSL/TLS: now handles manual certificate chain building.
|
o SSL/TLS: now handles manual certificate chain building.
|
||||||
o SSL/TLS: certain session ID malfunctions corrected.
|
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 [30 Dec 2002]:
|
||||||
|
|
||||||
o New library section OCSP.
|
o New library section OCSP.
|
||||||
o Complete rewrite of ASN1 code.
|
o Complete rewrite of ASN1 code.
|
||||||
@@ -334,23 +495,23 @@
|
|||||||
o SSL/TLS: add callback to retrieve SSL/TLS messages.
|
o SSL/TLS: add callback to retrieve SSL/TLS messages.
|
||||||
o SSL/TLS: support AES cipher suites (RFC3268).
|
o SSL/TLS: support AES cipher suites (RFC3268).
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k:
|
Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k [30 Sep 2003]:
|
||||||
|
|
||||||
o Security: fix various ASN1 parsing bugs.
|
o Security: fix various ASN1 parsing bugs.
|
||||||
o SSL/TLS protocol fix for unrequested client certificates.
|
o SSL/TLS protocol fix for unrequested client certificates.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j:
|
Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j [10 Apr 2003]:
|
||||||
|
|
||||||
o Security: counter the Klima-Pokorny-Rosa extension of
|
o Security: counter the Klima-Pokorny-Rosa extension of
|
||||||
Bleichbacher's attack
|
Bleichbacher's attack
|
||||||
o Security: make RSA blinding default.
|
o Security: make RSA blinding default.
|
||||||
o Build: shared library support fixes.
|
o Build: shared library support fixes.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i:
|
Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i [19 Feb 2003]:
|
||||||
|
|
||||||
o Important security related bugfixes.
|
o Important security related bugfixes.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h:
|
Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h [5 Dec 2002]:
|
||||||
|
|
||||||
o New configuration targets for Tandem OSS and A/UX.
|
o New configuration targets for Tandem OSS and A/UX.
|
||||||
o New OIDs for Microsoft attributes.
|
o New OIDs for Microsoft attributes.
|
||||||
@@ -364,25 +525,25 @@
|
|||||||
o Fixes for smaller building problems.
|
o Fixes for smaller building problems.
|
||||||
o Updates of manuals, FAQ and other instructive documents.
|
o Updates of manuals, FAQ and other instructive documents.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g:
|
Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g [9 Aug 2002]:
|
||||||
|
|
||||||
o Important building fixes on Unix.
|
o Important building fixes on Unix.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f:
|
Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f [8 Aug 2002]:
|
||||||
|
|
||||||
o Various important bugfixes.
|
o Various important bugfixes.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e:
|
Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e [30 Jul 2002]:
|
||||||
|
|
||||||
o Important security related bugfixes.
|
o Important security related bugfixes.
|
||||||
o Various SSL/TLS library bugfixes.
|
o Various SSL/TLS library bugfixes.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d:
|
Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d [9 May 2002]:
|
||||||
|
|
||||||
o Various SSL/TLS library bugfixes.
|
o Various SSL/TLS library bugfixes.
|
||||||
o Fix DH parameter generation for 'non-standard' generators.
|
o Fix DH parameter generation for 'non-standard' generators.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c:
|
Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c [21 Dec 2001]:
|
||||||
|
|
||||||
o Various SSL/TLS library bugfixes.
|
o Various SSL/TLS library bugfixes.
|
||||||
o BIGNUM library fixes.
|
o BIGNUM library fixes.
|
||||||
@@ -395,7 +556,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].
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b:
|
Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b [9 Jul 2001]:
|
||||||
|
|
||||||
o Security fix: PRNG improvements.
|
o Security fix: PRNG improvements.
|
||||||
o Security fix: RSA OAEP check.
|
o Security fix: RSA OAEP check.
|
||||||
@@ -412,7 +573,7 @@
|
|||||||
o Increase default size for BIO buffering filter.
|
o Increase default size for BIO buffering filter.
|
||||||
o Compatibility fixes in some scripts.
|
o Compatibility fixes in some scripts.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a:
|
Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a [5 Apr 2001]:
|
||||||
|
|
||||||
o Security fix: change behavior of OpenSSL to avoid using
|
o Security fix: change behavior of OpenSSL to avoid using
|
||||||
environment variables when running as root.
|
environment variables when running as root.
|
||||||
@@ -437,7 +598,7 @@
|
|||||||
o New function BN_rand_range().
|
o New function BN_rand_range().
|
||||||
o Add "-rand" option to openssl s_client and s_server.
|
o Add "-rand" option to openssl s_client and s_server.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6:
|
Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6 [10 Oct 2000]:
|
||||||
|
|
||||||
o Some documentation for BIO and SSL libraries.
|
o Some documentation for BIO and SSL libraries.
|
||||||
o Enhanced chain verification using key identifiers.
|
o Enhanced chain verification using key identifiers.
|
||||||
@@ -452,7 +613,7 @@
|
|||||||
[1] The support for external crypto devices is currently a separate
|
[1] The support for external crypto devices is currently a separate
|
||||||
distribution. See the file README.ENGINE.
|
distribution. See the file README.ENGINE.
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a:
|
Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a [1 Apr 2000]:
|
||||||
|
|
||||||
o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8
|
o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8
|
||||||
o Shared library support for HPUX and Solaris-gcc
|
o Shared library support for HPUX and Solaris-gcc
|
||||||
@@ -461,7 +622,7 @@
|
|||||||
o New 'rand' application
|
o New 'rand' application
|
||||||
o New way to check for existence of algorithms from scripts
|
o New way to check for existence of algorithms from scripts
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5:
|
Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5 [25 May 2000]:
|
||||||
|
|
||||||
o S/MIME support in new 'smime' command
|
o S/MIME support in new 'smime' command
|
||||||
o Documentation for the OpenSSL command line application
|
o Documentation for the OpenSSL command line application
|
||||||
@@ -497,7 +658,7 @@
|
|||||||
o Enhanced support for Alpha Linux
|
o Enhanced support for Alpha Linux
|
||||||
o Experimental MacOS support
|
o Experimental MacOS support
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4:
|
Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4 [9 Aug 1999]:
|
||||||
|
|
||||||
o Transparent support for PKCS#8 format private keys: these are used
|
o Transparent support for PKCS#8 format private keys: these are used
|
||||||
by several software packages and are more secure than the standard
|
by several software packages and are more secure than the standard
|
||||||
@@ -508,7 +669,7 @@
|
|||||||
o New pipe-like BIO that allows using the SSL library when actual I/O
|
o New pipe-like BIO that allows using the SSL library when actual I/O
|
||||||
must be handled by the application (BIO pair)
|
must be handled by the application (BIO pair)
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3:
|
Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3 [24 May 1999]:
|
||||||
o Lots of enhancements and cleanups to the Configuration mechanism
|
o Lots of enhancements and cleanups to the Configuration mechanism
|
||||||
o RSA OEAP related fixes
|
o RSA OEAP related fixes
|
||||||
o Added `openssl ca -revoke' option for revoking a certificate
|
o Added `openssl ca -revoke' option for revoking a certificate
|
||||||
@@ -522,7 +683,7 @@
|
|||||||
o Sparc assembler bignum implementation, optimized hash functions
|
o Sparc assembler bignum implementation, optimized hash functions
|
||||||
o Option to disable selected ciphers
|
o Option to disable selected ciphers
|
||||||
|
|
||||||
Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b:
|
Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b [22 Mar 1999]:
|
||||||
o Fixed a security hole related to session resumption
|
o Fixed a security hole related to session resumption
|
||||||
o Fixed RSA encryption routines for the p < q case
|
o Fixed RSA encryption routines for the p < q case
|
||||||
o "ALL" in cipher lists now means "everything except NULL ciphers"
|
o "ALL" in cipher lists now means "everything except NULL ciphers"
|
||||||
@@ -544,7 +705,7 @@
|
|||||||
o Lots of memory leak fixes.
|
o Lots of memory leak fixes.
|
||||||
o Lots of bug fixes.
|
o Lots of bug fixes.
|
||||||
|
|
||||||
Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c:
|
Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c [23 Dec 1998]:
|
||||||
o Integration of the popular NO_RSA/NO_DSA patches
|
o Integration of the popular NO_RSA/NO_DSA patches
|
||||||
o Initial support for compression inside the SSL record layer
|
o Initial support for compression inside the SSL record layer
|
||||||
o Added BIO proxy and filtering functionality
|
o Added BIO proxy and filtering functionality
|
||||||
|
18
PROBLEMS
18
PROBLEMS
@@ -36,7 +36,9 @@ may differ on your machine.
|
|||||||
|
|
||||||
|
|
||||||
As long as Apple doesn't fix the problem with ld, this problem building
|
As long as Apple doesn't fix the problem with ld, this problem building
|
||||||
OpenSSL will remain as is.
|
OpenSSL will remain as is. Well, the problem was addressed in 0.9.8f by
|
||||||
|
passing -Wl,-search_paths_first, but it's unknown if the flag was
|
||||||
|
supported from the initial MacOS X release.
|
||||||
|
|
||||||
|
|
||||||
* Parallell make leads to errors
|
* Parallell make leads to errors
|
||||||
@@ -195,3 +197,17 @@ reconfigure with additional no-sse2 [or 386] option passed to ./config.
|
|||||||
We don't have framework to associate -ldl with no-dso, therefore the only
|
We don't have framework to associate -ldl with no-dso, therefore the only
|
||||||
way is to edit Makefile right after ./config no-dso and remove -ldl from
|
way is to edit Makefile right after ./config no-dso and remove -ldl from
|
||||||
EX_LIBS line.
|
EX_LIBS line.
|
||||||
|
|
||||||
|
* hpux-parisc2-cc no-asm build fails with SEGV in ECDSA/DH.
|
||||||
|
|
||||||
|
Compiler bug, presumably at particular patch level. Remaining
|
||||||
|
hpux*-parisc*-cc configurations can be affected too. Drop optimization
|
||||||
|
level to +O2 when compiling bn_nist.o.
|
||||||
|
|
||||||
|
* solaris64-sparcv9-cc link failure
|
||||||
|
|
||||||
|
Solaris 8 ar can fail to maintain symbol table in .a, which results in
|
||||||
|
link failures. Apply 109147-09 or later or modify Makefile generated
|
||||||
|
by ./Configure solaris64-sparcv9-cc and replace RANLIB assignment with
|
||||||
|
|
||||||
|
RANLIB= /usr/ccs/bin/ar rs
|
||||||
|
6
README
6
README
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
OpenSSL 1.0.0b-dev
|
OpenSSL 1.0.0r-dev
|
||||||
|
|
||||||
Copyright (c) 1998-2010 The OpenSSL Project
|
Copyright (c) 1998-2011 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.
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
reason as to why that feature isn't implemented.
|
reason as to why that feature isn't implemented.
|
||||||
|
|
||||||
Patches should be as up to date as possible, preferably relative to the
|
Patches should be as up to date as possible, preferably relative to the
|
||||||
current CVS or the last snapshot. They should follow the coding style of
|
current Git or the last snapshot. They should follow the coding style of
|
||||||
OpenSSL and compile without warnings. Some of the core team developer targets
|
OpenSSL and compile without warnings. Some of the core team developer targets
|
||||||
can be used for testing purposes, (debug-steve64, debug-geoff etc). OpenSSL
|
can be used for testing purposes, (debug-steve64, debug-geoff etc). OpenSSL
|
||||||
compiles on many varied platforms: try to ensure you only use portable
|
compiles on many varied platforms: try to ensure you only use portable
|
||||||
|
140
STATUS
140
STATUS
@@ -1,140 +0,0 @@
|
|||||||
|
|
||||||
OpenSSL STATUS Last modified at
|
|
||||||
______________ $Date: 2010/06/01 13:31:36 $
|
|
||||||
|
|
||||||
DEVELOPMENT STATE
|
|
||||||
|
|
||||||
o OpenSSL 1.1.0: Under development...
|
|
||||||
o OpenSSL 1.0.0a: Released on June 1st, 2010
|
|
||||||
o OpenSSL 1.0.0: Released on March 29th, 2010
|
|
||||||
o OpenSSL 0.9.8n: Released on March 24th, 2010
|
|
||||||
o OpenSSL 0.9.8m: Released on February 25th, 2010
|
|
||||||
o OpenSSL 0.9.8l: Released on November 5th, 2009
|
|
||||||
o OpenSSL 0.9.8k: Released on March 25th, 2009
|
|
||||||
o OpenSSL 0.9.8j: Released on January 7th, 2009
|
|
||||||
o OpenSSL 0.9.8i: Released on September 15th, 2008
|
|
||||||
o OpenSSL 0.9.8h: Released on May 28th, 2008
|
|
||||||
o OpenSSL 0.9.8g: Released on October 19th, 2007
|
|
||||||
o OpenSSL 0.9.8f: Released on October 11th, 2007
|
|
||||||
o OpenSSL 0.9.8e: Released on February 23rd, 2007
|
|
||||||
o OpenSSL 0.9.8d: Released on September 28th, 2006
|
|
||||||
o OpenSSL 0.9.8c: Released on September 5th, 2006
|
|
||||||
o OpenSSL 0.9.8b: Released on May 4th, 2006
|
|
||||||
o OpenSSL 0.9.8a: Released on October 11th, 2005
|
|
||||||
o OpenSSL 0.9.8: Released on July 5th, 2005
|
|
||||||
o OpenSSL 0.9.7m: Released on February 23rd, 2007
|
|
||||||
o OpenSSL 0.9.7l: Released on September 28th, 2006
|
|
||||||
o OpenSSL 0.9.7k: Released on September 5th, 2006
|
|
||||||
o OpenSSL 0.9.7j: Released on May 4th, 2006
|
|
||||||
o OpenSSL 0.9.7i: Released on October 14th, 2005
|
|
||||||
o OpenSSL 0.9.7h: Released on October 11th, 2005
|
|
||||||
o OpenSSL 0.9.7g: Released on April 11th, 2005
|
|
||||||
o OpenSSL 0.9.7f: Released on March 22nd, 2005
|
|
||||||
o OpenSSL 0.9.7e: Released on October 25th, 2004
|
|
||||||
o OpenSSL 0.9.7d: Released on March 17th, 2004
|
|
||||||
o OpenSSL 0.9.7c: Released on September 30th, 2003
|
|
||||||
o OpenSSL 0.9.7b: Released on April 10th, 2003
|
|
||||||
o OpenSSL 0.9.7a: Released on February 19th, 2003
|
|
||||||
o OpenSSL 0.9.7: Released on December 31st, 2002
|
|
||||||
o OpenSSL 0.9.6m: Released on March 17th, 2004
|
|
||||||
o OpenSSL 0.9.6l: Released on November 4th, 2003
|
|
||||||
o OpenSSL 0.9.6k: Released on September 30th, 2003
|
|
||||||
o OpenSSL 0.9.6j: Released on April 10th, 2003
|
|
||||||
o OpenSSL 0.9.6i: Released on February 19th, 2003
|
|
||||||
o OpenSSL 0.9.6h: Released on December 5th, 2002
|
|
||||||
o OpenSSL 0.9.6g: Released on August 9th, 2002
|
|
||||||
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.6b: Released on July 9th, 2001
|
|
||||||
o OpenSSL 0.9.6a: Released on April 5th, 2001
|
|
||||||
o OpenSSL 0.9.6: Released on September 24th, 2000
|
|
||||||
o OpenSSL 0.9.5a: Released on April 1st, 2000
|
|
||||||
o OpenSSL 0.9.5: Released on February 28th, 2000
|
|
||||||
o OpenSSL 0.9.4: Released on August 09th, 1999
|
|
||||||
o OpenSSL 0.9.3a: Released on May 29th, 1999
|
|
||||||
o OpenSSL 0.9.3: Released on May 25th, 1999
|
|
||||||
o OpenSSL 0.9.2b: Released on March 22th, 1999
|
|
||||||
o OpenSSL 0.9.1c: Released on December 23th, 1998
|
|
||||||
|
|
||||||
[See also http://www.openssl.org/support/rt.html]
|
|
||||||
|
|
||||||
RELEASE SHOWSTOPPERS
|
|
||||||
|
|
||||||
o The Makefiles fail with some SysV makes.
|
|
||||||
o
|
|
||||||
|
|
||||||
AVAILABLE PATCHES
|
|
||||||
|
|
||||||
o
|
|
||||||
|
|
||||||
IN PROGRESS
|
|
||||||
|
|
||||||
o Steve is currently working on (in no particular order):
|
|
||||||
ASN1 code redesign, butchery, replacement.
|
|
||||||
OCSP
|
|
||||||
EVP cipher enhancement.
|
|
||||||
Enhanced certificate chain verification.
|
|
||||||
Private key, certificate and CRL API and implementation.
|
|
||||||
Developing and bugfixing PKCS#7 (S/MIME code).
|
|
||||||
Various X509 issues: character sets, certificate request extensions.
|
|
||||||
o Richard is currently working on:
|
|
||||||
Constification
|
|
||||||
Attribute Certificate support
|
|
||||||
Certificate Pair support
|
|
||||||
Storage Engines (primarly an LDAP storage engine)
|
|
||||||
Certificate chain validation with full RFC 3280 compatibility
|
|
||||||
|
|
||||||
NEEDS PATCH
|
|
||||||
|
|
||||||
o 0.9.8-dev: COMPLEMENTOFALL and COMPLEMENTOFDEFAULT do not
|
|
||||||
handle ECCdraft cipher suites correctly.
|
|
||||||
|
|
||||||
o apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
|
|
||||||
|
|
||||||
o "OpenSSL STATUS" is never up-to-date.
|
|
||||||
|
|
||||||
OPEN ISSUES
|
|
||||||
|
|
||||||
o The Makefile hierarchy and build mechanism is still not a round thing:
|
|
||||||
|
|
||||||
1. The config vs. Configure scripts
|
|
||||||
It's the same nasty situation as for Apache with APACI vs.
|
|
||||||
src/Configure. It confuses.
|
|
||||||
Suggestion: Merge Configure and config into a single configure
|
|
||||||
script with a Autoconf style interface ;-) and remove
|
|
||||||
Configure and config. Or even let us use GNU Autoconf
|
|
||||||
itself. Then we can avoid a lot of those platform checks
|
|
||||||
which are currently in Configure.
|
|
||||||
|
|
||||||
o Support for Shared Libraries has to be added at least
|
|
||||||
for the major Unix platforms. The details we can rip from the stuff
|
|
||||||
Ralf has done for the Apache src/Configure script. Ben wants the
|
|
||||||
solution to be really simple.
|
|
||||||
|
|
||||||
Status: Ralf will look how we can easily incorporate the
|
|
||||||
compiler PIC and linker DSO flags from Apache
|
|
||||||
into the OpenSSL Configure script.
|
|
||||||
|
|
||||||
Ulf: +1 for using GNU autoconf and libtool (but not automake,
|
|
||||||
which apparently is not flexible enough to generate
|
|
||||||
libcrypto)
|
|
||||||
|
|
||||||
WISHES
|
|
||||||
|
|
||||||
o Add variants of DH_generate_parameters() and BN_generate_prime() [etc?]
|
|
||||||
where the callback function can request that the function be aborted.
|
|
||||||
[Gregory Stark <ghstark@pobox.com>, <rayyang2000@yahoo.com>]
|
|
||||||
|
|
||||||
o SRP in TLS.
|
|
||||||
[wished by:
|
|
||||||
Dj <derek@yo.net>, Tom Wu <tom@arcot.com>,
|
|
||||||
Tom Holroyd <tomh@po.crl.go.jp>]
|
|
||||||
|
|
||||||
See http://search.ietf.org/internet-drafts/draft-ietf-tls-srp-00.txt
|
|
||||||
as well as http://www-cs-students.stanford.edu/~tjw/srp/.
|
|
||||||
|
|
||||||
Tom Holroyd tells us there is a SRP patch for OpenSSH at
|
|
||||||
http://members.tripod.com/professor_tom/archives/, that could
|
|
||||||
be useful.
|
|
157
TABLE
157
TABLE
@@ -810,7 +810,7 @@ $multilib =
|
|||||||
$cc = cc
|
$cc = cc
|
||||||
$cflags = -q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst
|
$cflags = -q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = -qthreaded
|
$thread_cflag = -qthreaded -D_THREAD_SAFE
|
||||||
$sys_id = AIX
|
$sys_id = AIX
|
||||||
$lflags =
|
$lflags =
|
||||||
$bn_ops = BN_LLONG RC4_CHAR
|
$bn_ops = BN_LLONG RC4_CHAR
|
||||||
@@ -903,7 +903,7 @@ $multilib =
|
|||||||
$cc = cc
|
$cc = cc
|
||||||
$cflags = -q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst
|
$cflags = -q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = -qthreaded
|
$thread_cflag = -qthreaded -D_THREAD_SAFE
|
||||||
$sys_id = AIX
|
$sys_id = AIX
|
||||||
$lflags =
|
$lflags =
|
||||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR
|
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR
|
||||||
@@ -1287,7 +1287,7 @@ $bf_obj =
|
|||||||
$md5_obj = md5-x86_64.o
|
$md5_obj = md5-x86_64.o
|
||||||
$sha1_obj = sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
|
$sha1_obj = sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
|
||||||
$cast_obj =
|
$cast_obj =
|
||||||
$rc4_obj = rc4-x86_64.o
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$wp_obj = wp-x86_64.o
|
$wp_obj = wp-x86_64.o
|
||||||
@@ -1426,6 +1426,68 @@ $ranlib =
|
|||||||
$arflags =
|
$arflags =
|
||||||
$multilib =
|
$multilib =
|
||||||
|
|
||||||
|
*** debug-VC-WIN64A
|
||||||
|
$cc = cl
|
||||||
|
$cflags = -W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE
|
||||||
|
$unistd =
|
||||||
|
$thread_cflag =
|
||||||
|
$sys_id = WIN64A
|
||||||
|
$lflags =
|
||||||
|
$bn_ops = SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN
|
||||||
|
$cpuid_obj = x86_64cpuid.o
|
||||||
|
$bn_obj = bn_asm.o x86_64-mont.o
|
||||||
|
$des_obj =
|
||||||
|
$aes_obj = aes-x86_64.o
|
||||||
|
$bf_obj =
|
||||||
|
$md5_obj = md5-x86_64.o
|
||||||
|
$sha1_obj = sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
|
||||||
|
$cast_obj =
|
||||||
|
$rc4_obj = rc4-x86_64.o
|
||||||
|
$rmd160_obj =
|
||||||
|
$rc5_obj =
|
||||||
|
$wp_obj = wp-x86_64.o
|
||||||
|
$cmll_obj = cmll-x86_64.o cmll_misc.o
|
||||||
|
$perlasm_scheme = auto
|
||||||
|
$dso_scheme = win32
|
||||||
|
$shared_target=
|
||||||
|
$shared_cflag =
|
||||||
|
$shared_ldflag =
|
||||||
|
$shared_extension =
|
||||||
|
$ranlib =
|
||||||
|
$arflags =
|
||||||
|
$multilib =
|
||||||
|
|
||||||
|
*** debug-VC-WIN64I
|
||||||
|
$cc = cl
|
||||||
|
$cflags = -W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE
|
||||||
|
$unistd =
|
||||||
|
$thread_cflag =
|
||||||
|
$sys_id = WIN64I
|
||||||
|
$lflags =
|
||||||
|
$bn_ops = SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN
|
||||||
|
$cpuid_obj = ia64cpuid.o
|
||||||
|
$bn_obj = ia64.o
|
||||||
|
$des_obj =
|
||||||
|
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||||
|
$bf_obj =
|
||||||
|
$md5_obj = md5-ia64.o
|
||||||
|
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||||
|
$cast_obj =
|
||||||
|
$rc4_obj =
|
||||||
|
$rmd160_obj =
|
||||||
|
$rc5_obj =
|
||||||
|
$wp_obj =
|
||||||
|
$cmll_obj =
|
||||||
|
$perlasm_scheme = ias
|
||||||
|
$dso_scheme = win32
|
||||||
|
$shared_target=
|
||||||
|
$shared_cflag =
|
||||||
|
$shared_ldflag =
|
||||||
|
$shared_extension =
|
||||||
|
$ranlib =
|
||||||
|
$arflags =
|
||||||
|
$multilib =
|
||||||
|
|
||||||
*** debug-ben
|
*** debug-ben
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG_UNUSED -O2 -pedantic -Wall -Wshadow -Werror -pipe
|
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG_UNUSED -O2 -pedantic -Wall -Wshadow -Werror -pipe
|
||||||
@@ -1488,6 +1550,37 @@ $ranlib =
|
|||||||
$arflags =
|
$arflags =
|
||||||
$multilib =
|
$multilib =
|
||||||
|
|
||||||
|
*** debug-ben-debug-64
|
||||||
|
$cc = gcc
|
||||||
|
$cflags = -Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED -Wno-error=overlength-strings -Wno-error=strict-aliasing -Wno-error=uninitialized -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O3 -pipe
|
||||||
|
$unistd =
|
||||||
|
$thread_cflag = -pthread -D_THREAD_SAFE -D_REENTRANT
|
||||||
|
$sys_id =
|
||||||
|
$lflags =
|
||||||
|
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL
|
||||||
|
$cpuid_obj = x86_64cpuid.o
|
||||||
|
$bn_obj = x86_64-gcc.o x86_64-mont.o
|
||||||
|
$des_obj =
|
||||||
|
$aes_obj = aes-x86_64.o
|
||||||
|
$bf_obj =
|
||||||
|
$md5_obj = md5-x86_64.o
|
||||||
|
$sha1_obj = sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
|
||||||
|
$cast_obj =
|
||||||
|
$rc4_obj = rc4-x86_64.o
|
||||||
|
$rmd160_obj =
|
||||||
|
$rc5_obj =
|
||||||
|
$wp_obj = wp-x86_64.o
|
||||||
|
$cmll_obj = cmll-x86_64.o cmll_misc.o
|
||||||
|
$perlasm_scheme = elf
|
||||||
|
$dso_scheme = dlfcn
|
||||||
|
$shared_target= bsd-gcc-shared
|
||||||
|
$shared_cflag = -fPIC
|
||||||
|
$shared_ldflag =
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
$ranlib =
|
||||||
|
$arflags =
|
||||||
|
$multilib =
|
||||||
|
|
||||||
*** debug-ben-no-opt
|
*** debug-ben-no-opt
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3
|
$cflags = -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3
|
||||||
@@ -1614,34 +1707,34 @@ $multilib =
|
|||||||
|
|
||||||
*** debug-bodo
|
*** debug-bodo
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion
|
$cflags = -Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED -Wno-error=overlength-strings -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = -D_REENTRANT
|
$thread_cflag = -D_REENTRANT
|
||||||
$sys_id =
|
$sys_id =
|
||||||
$lflags =
|
$lflags = -ldl
|
||||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL
|
||||||
$cpuid_obj = x86cpuid.o
|
$cpuid_obj = x86_64cpuid.o
|
||||||
$bn_obj = bn-586.o co-586.o x86-mont.o
|
$bn_obj = x86_64-gcc.o x86_64-mont.o
|
||||||
$des_obj = des-586.o crypt586.o
|
$des_obj =
|
||||||
$aes_obj = aes-586.o
|
$aes_obj = aes-x86_64.o
|
||||||
$bf_obj = bf-586.o
|
$bf_obj =
|
||||||
$md5_obj = md5-586.o
|
$md5_obj = md5-x86_64.o
|
||||||
$sha1_obj = sha1-586.o sha256-586.o sha512-586.o
|
$sha1_obj = sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
|
||||||
$cast_obj = cast-586.o
|
$cast_obj =
|
||||||
$rc4_obj = rc4-586.o
|
$rc4_obj = rc4-x86_64.o
|
||||||
$rmd160_obj = rmd-586.o
|
$rmd160_obj =
|
||||||
$rc5_obj = rc5-586.o
|
$rc5_obj =
|
||||||
$wp_obj = wp_block.o wp-mmx.o
|
$wp_obj = wp-x86_64.o
|
||||||
$cmll_obj = cmll-x86.o
|
$cmll_obj = cmll-x86_64.o cmll_misc.o
|
||||||
$perlasm_scheme = elf
|
$perlasm_scheme = elf
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= linux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
$shared_ldflag =
|
$shared_ldflag = -m64
|
||||||
$shared_extension =
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
$ranlib =
|
$ranlib =
|
||||||
$arflags =
|
$arflags =
|
||||||
$multilib =
|
$multilib = 64
|
||||||
|
|
||||||
*** debug-darwin-i386-cc
|
*** debug-darwin-i386-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1769,7 +1862,7 @@ $multilib =
|
|||||||
|
|
||||||
*** debug-levitte-linux-elf
|
*** debug-levitte-linux-elf
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe
|
$cflags = -DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -ggdb -g3 -Wall
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = -D_REENTRANT
|
$thread_cflag = -D_REENTRANT
|
||||||
$sys_id =
|
$sys_id =
|
||||||
@@ -1800,7 +1893,7 @@ $multilib =
|
|||||||
|
|
||||||
*** debug-levitte-linux-elf-extreme
|
*** debug-levitte-linux-elf-extreme
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe
|
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = -D_REENTRANT
|
$thread_cflag = -D_REENTRANT
|
||||||
$sys_id =
|
$sys_id =
|
||||||
@@ -1831,7 +1924,7 @@ $multilib =
|
|||||||
|
|
||||||
*** debug-levitte-linux-noasm
|
*** debug-levitte-linux-noasm
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -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 -Wundef -Wconversion -pipe
|
$cflags = -DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -ggdb -g3 -Wall
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = -D_REENTRANT
|
$thread_cflag = -D_REENTRANT
|
||||||
$sys_id =
|
$sys_id =
|
||||||
@@ -1862,7 +1955,7 @@ $multilib =
|
|||||||
|
|
||||||
*** debug-levitte-linux-noasm-extreme
|
*** debug-levitte-linux-noasm-extreme
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -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 -Wno-long-long -Wundef -Wconversion -pipe
|
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = -D_REENTRANT
|
$thread_cflag = -D_REENTRANT
|
||||||
$sys_id =
|
$sys_id =
|
||||||
@@ -2420,7 +2513,7 @@ $multilib =
|
|||||||
|
|
||||||
*** debug-vos-gcc
|
*** debug-vos-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -O0 -g -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG
|
$cflags = -O0 -g -Wall -DOPENSSL_SYSNAME_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = (unknown)
|
$thread_cflag = (unknown)
|
||||||
$sys_id = VOS
|
$sys_id = VOS
|
||||||
@@ -4801,7 +4894,7 @@ $shared_target= solaris-shared
|
|||||||
$shared_cflag = -KPIC
|
$shared_cflag = -KPIC
|
||||||
$shared_ldflag = -xarch=v9 -G -dy -z text
|
$shared_ldflag = -xarch=v9 -G -dy -z text
|
||||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
$ranlib = /usr/ccs/bin/ar rs
|
$ranlib =
|
||||||
$arflags =
|
$arflags =
|
||||||
$multilib = /64
|
$multilib = /64
|
||||||
|
|
||||||
@@ -5241,7 +5334,7 @@ $multilib =
|
|||||||
|
|
||||||
*** vos-gcc
|
*** vos-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -O3 -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN
|
$cflags = -O3 -Wall -DOPENSSL_SYSNAME_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = (unknown)
|
$thread_cflag = (unknown)
|
||||||
$sys_id = VOS
|
$sys_id = VOS
|
||||||
|
67
VMS/install-vms.com
Executable file
67
VMS/install-vms.com
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
$! install-vms.com -- Installs the files in a given directory tree
|
||||||
|
$!
|
||||||
|
$! Author: Richard Levitte <richard@levitte.org>
|
||||||
|
$! Time of creation: 23-MAY-1998 19:22
|
||||||
|
$!
|
||||||
|
$! P1 root of the directory tree
|
||||||
|
$!
|
||||||
|
$!
|
||||||
|
$! Announce/identify.
|
||||||
|
$!
|
||||||
|
$ proc = f$environment( "procedure")
|
||||||
|
$ write sys$output "@@@ "+ -
|
||||||
|
f$parse( proc, , , "name")+ f$parse( proc, , , "type")
|
||||||
|
$!
|
||||||
|
$ on error then goto tidy
|
||||||
|
$ on control_c then goto tidy
|
||||||
|
$!
|
||||||
|
$ if p1 .eqs. ""
|
||||||
|
$ then
|
||||||
|
$ write sys$output "First argument missing."
|
||||||
|
$ write sys$output -
|
||||||
|
"Should be the directory where you want things installed."
|
||||||
|
$ exit
|
||||||
|
$ endif
|
||||||
|
$
|
||||||
|
$ if (f$getsyi( "cpu") .lt. 128)
|
||||||
|
$ then
|
||||||
|
$ arch = "VAX"
|
||||||
|
$ else
|
||||||
|
$ arch = f$edit( f$getsyi( "arch_name"), "upcase")
|
||||||
|
$ if (arch .eqs. "") then arch = "UNK"
|
||||||
|
$ endif
|
||||||
|
$
|
||||||
|
$ root = f$parse( P1, "[]A.;0", , , "SYNTAX_ONLY, NO_CONCEAL")- "A.;0"
|
||||||
|
$ root_dev = f$parse( root, , , "device", "syntax_only")
|
||||||
|
$ root_dir = f$parse( root, , , "directory", "syntax_only") - -
|
||||||
|
"[000000." - "][" - "[" - "]"
|
||||||
|
$ root = root_dev + "[" + root_dir
|
||||||
|
$
|
||||||
|
$ define /nolog wrk_sslroot 'root'.] /translation_attributes = concealed
|
||||||
|
$ define /nolog wrk_sslinclude wrk_sslroot:[include]
|
||||||
|
$
|
||||||
|
$ if f$parse( "wrk_sslroot:[000000]") .eqs. "" then -
|
||||||
|
create /directory /log wrk_sslroot:[000000]
|
||||||
|
$ if f$parse( "wrk_sslinclude:") .eqs. "" then -
|
||||||
|
create /directory /log wrk_sslinclude:
|
||||||
|
$ if f$parse( "wrk_sslroot:[vms]") .eqs. "" then -
|
||||||
|
create /directory /log wrk_sslroot:[vms]
|
||||||
|
$!
|
||||||
|
$ copy /log /protection = world:re openssl_startup.com wrk_sslroot:[vms]
|
||||||
|
$ copy /log /protection = world:re openssl_undo.com wrk_sslroot:[vms]
|
||||||
|
$ copy /log /protection = world:re openssl_utils.com wrk_sslroot:[vms]
|
||||||
|
$!
|
||||||
|
$ tidy:
|
||||||
|
$!
|
||||||
|
$ call deass wrk_sslroot
|
||||||
|
$ call deass wrk_sslinclude
|
||||||
|
$!
|
||||||
|
$ exit
|
||||||
|
$!
|
||||||
|
$ deass: subroutine
|
||||||
|
$ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "")
|
||||||
|
$ then
|
||||||
|
$ deassign /process 'p1'
|
||||||
|
$ endif
|
||||||
|
$ endsubroutine
|
||||||
|
$!
|
@@ -1,79 +0,0 @@
|
|||||||
$! INSTALL.COM -- Installs the files in a given directory tree
|
|
||||||
$!
|
|
||||||
$! Author: Richard Levitte <richard@levitte.org>
|
|
||||||
$! Time of creation: 23-MAY-1998 19:22
|
|
||||||
$!
|
|
||||||
$! P1 root of the directory tree
|
|
||||||
$!
|
|
||||||
$ IF P1 .EQS. ""
|
|
||||||
$ THEN
|
|
||||||
$ WRITE SYS$OUTPUT "First argument missing."
|
|
||||||
$ WRITE SYS$OUTPUT "Should be the directory where you want things installed."
|
|
||||||
$ EXIT
|
|
||||||
$ ENDIF
|
|
||||||
$
|
|
||||||
$ IF (F$GETSYI("CPU").LT.128)
|
|
||||||
$ THEN
|
|
||||||
$ ARCH := VAX
|
|
||||||
$ ELSE
|
|
||||||
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
|
|
||||||
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
|
|
||||||
$ ENDIF
|
|
||||||
$
|
|
||||||
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
|
|
||||||
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
|
|
||||||
$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
|
|
||||||
- "[000000." - "][" - "[" - "]"
|
|
||||||
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
|
|
||||||
$
|
|
||||||
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
|
|
||||||
$ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
|
|
||||||
$
|
|
||||||
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
|
|
||||||
CREATE/DIR/LOG WRK_SSLROOT:[000000]
|
|
||||||
$ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
|
|
||||||
CREATE/DIR/LOG WRK_SSLINCLUDE:
|
|
||||||
$ IF F$PARSE("WRK_SSLROOT:[VMS]") .EQS. "" THEN -
|
|
||||||
CREATE/DIR/LOG WRK_SSLROOT:[VMS]
|
|
||||||
$
|
|
||||||
$ IF F$SEARCH("WRK_SSLINCLUDE:vms_idhacks.h") .NES. "" THEN -
|
|
||||||
DELETE WRK_SSLINCLUDE:vms_idhacks.h;*
|
|
||||||
$
|
|
||||||
$ OPEN/WRITE SF WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM
|
|
||||||
$ WRITE SYS$OUTPUT "%OPEN-I-CREATED, ",F$SEARCH("WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM")," created."
|
|
||||||
$ WRITE SF "$! Startup file for Openssl"
|
|
||||||
$ WRITE SF "$!"
|
|
||||||
$ WRITE SF "$! Do not edit this file, as it will be regenerated during next installation."
|
|
||||||
$ WRITE SF "$! Instead, add or change SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"
|
|
||||||
$ WRITE SF "$!"
|
|
||||||
$ WRITE SF "$! P1 a qualifier to DEFINE. For example ""/SYSTEM"" to get the logical names"
|
|
||||||
$ WRITE SF "$! defined in the system logical name table."
|
|
||||||
$ WRITE SF "$!"
|
|
||||||
$ WRITE SF "$ IF (F$GETSYI(""CPU"").LT.128)"
|
|
||||||
$ WRITE SF "$ THEN"
|
|
||||||
$ WRITE SF "$ ARCH := VAX"
|
|
||||||
$ WRITE SF "$ ELSE"
|
|
||||||
$ WRITE SF "$ ARCH = F$EDIT( F$GETSYI( ""ARCH_NAME""), ""UPCASE"")"
|
|
||||||
$ WRITE SF "$ IF (ARCH .EQS. """") THEN ARCH = ""UNK"""
|
|
||||||
$ WRITE SF "$ ENDIF"
|
|
||||||
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLROOT ",ROOT,".] /TRANS=CONC"
|
|
||||||
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLLIB SSLROOT:['ARCH'_LIB]"
|
|
||||||
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLINCLUDE SSLROOT:[INCLUDE]"
|
|
||||||
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLEXE SSLROOT:['ARCH'_EXE]"
|
|
||||||
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLCERTS SSLROOT:[CERTS]"
|
|
||||||
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLPRIVATE SSLROOT:[PRIVATE]"
|
|
||||||
$ WRITE SF "$"
|
|
||||||
$ WRITE SF "$! This is program can include <openssl/{foo}.h>"
|
|
||||||
$ WRITE SF "$ DEFINE/NOLOG'P1 OPENSSL SSLINCLUDE:"
|
|
||||||
$ WRITE SF "$"
|
|
||||||
$ WRITE SF "$ IF F$SEARCH(""SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"") .NES."""" THEN -"
|
|
||||||
$ WRITE SF " @SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"
|
|
||||||
$ WRITE SF "$"
|
|
||||||
$ WRITE SF "$ EXIT"
|
|
||||||
$ CLOSE SF
|
|
||||||
$ SET FILE/PROT=WORLD:RE WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM
|
|
||||||
$
|
|
||||||
$ COPY OPENSSL_UTILS.COM WRK_SSLROOT:[VMS]/LOG
|
|
||||||
$ SET FILE/PROT=WORLD:RE WRK_SSLROOT:[VMS]OPENSSL_UTILS.COM
|
|
||||||
$
|
|
||||||
$ EXIT
|
|
261
VMS/mkshared.com
261
VMS/mkshared.com
@@ -1,85 +1,166 @@
|
|||||||
$! MKSHARED.COM -- script to created shareable images on VMS
|
$! MKSHARED.COM -- Create shareable images.
|
||||||
$!
|
$!
|
||||||
$! No command line parameters. This should be run at the start of the source
|
$! P1: "64" for 64-bit pointers.
|
||||||
$! tree (the same directory where one finds INSTALL.VMS).
|
|
||||||
$!
|
$!
|
||||||
$! Input: [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB
|
$! P2: Zlib object library path (optional).
|
||||||
$! [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]LIBSSL.OLB
|
$!
|
||||||
$! Output: [.xxx.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE
|
$! Input: [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]SSL_LIBCRYPTO[32].OLB
|
||||||
$! [.xxx.EXE.SSL]LIBSSL.OPT,.MAP,.EXE
|
$! [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]SSL_LIBSSL[32].OLB
|
||||||
|
$! [.CRYPTO.xxx]OPENSSLCONF.H
|
||||||
|
$! Output: [.xxx.EXE.CRYPTO]SSL_LIBCRYPTO_SHR[32].OPT,.MAP,.EXE
|
||||||
|
$! [.xxx.EXE.SSL]SSL_LIBSSL_SRH[32].OPT,.MAP,.EXE
|
||||||
$!
|
$!
|
||||||
$! So far, tests have only been made on VMS for Alpha. VAX will come in time.
|
$! So far, tests have only been made on VMS for Alpha. VAX will come in time.
|
||||||
$! ===========================================================================
|
$! ===========================================================================
|
||||||
$
|
$!
|
||||||
|
$! Announce/identify.
|
||||||
|
$!
|
||||||
|
$ proc = f$environment( "procedure")
|
||||||
|
$ write sys$output "@@@ "+ -
|
||||||
|
f$parse( proc, , , "name")+ f$parse( proc, , , "type")
|
||||||
|
$!
|
||||||
|
$! Save the original default device:[directory].
|
||||||
|
$!
|
||||||
|
$ def_orig = f$environment( "default")
|
||||||
|
$ on error then goto tidy
|
||||||
|
$ on control_c then goto tidy
|
||||||
|
$!
|
||||||
|
$! SET DEFAULT to the main kit directory.
|
||||||
|
$!
|
||||||
|
$ proc = f$environment("procedure")
|
||||||
|
$ proc = f$parse( "A.;", proc)- "A.;"
|
||||||
|
$ set default 'proc'
|
||||||
|
$ set default [-]
|
||||||
|
$!
|
||||||
$! ----- Prepare info for processing: version number and file info
|
$! ----- Prepare info for processing: version number and file info
|
||||||
$ gosub read_version_info
|
$ gosub read_version_info
|
||||||
$ if libver .eqs. ""
|
$ if libver .eqs. ""
|
||||||
$ then
|
$ then
|
||||||
$ write sys$error "ERROR: Couldn't find any library version info..."
|
$ write sys$error "ERROR: Couldn't find any library version info..."
|
||||||
$ exit
|
$ go to tidy:
|
||||||
$ endif
|
$ endif
|
||||||
$
|
$
|
||||||
$ if (f$getsyi("cpu").lt.128)
|
$ if (f$getsyi("cpu") .lt. 128)
|
||||||
$ then
|
$ then
|
||||||
$ arch := VAX
|
|
||||||
$ else
|
|
||||||
$ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
|
|
||||||
$ if (arch .eqs. "") then arch = "UNK"
|
|
||||||
$ endif
|
|
||||||
$
|
|
||||||
$ if arch .nes. "VAX"
|
|
||||||
$ then
|
|
||||||
$ arch_vax = 0
|
|
||||||
$ libid = "Crypto"
|
|
||||||
$ libnum = "[.UTIL]LIBEAY.NUM"
|
|
||||||
$ libdir = "[.''ARCH'.EXE.CRYPTO]"
|
|
||||||
$ libolb = "''libdir'LIBCRYPTO.OLB"
|
|
||||||
$ libopt = "''libdir'LIBCRYPTO.OPT"
|
|
||||||
$ libmap = "''libdir'LIBCRYPTO.MAP"
|
|
||||||
$ libgoal= "''libdir'LIBCRYPTO.EXE"
|
|
||||||
$ libref = ""
|
|
||||||
$ gosub create_nonvax_shr
|
|
||||||
$ libid = "SSL"
|
|
||||||
$ libnum = "[.UTIL]SSLEAY.NUM"
|
|
||||||
$ libdir = "[.''ARCH'.EXE.SSL]"
|
|
||||||
$ libolb = "''libdir'LIBSSL.OLB"
|
|
||||||
$ libopt = "''libdir'LIBSSL.OPT"
|
|
||||||
$ libmap = "''libdir'LIBSSL.MAP"
|
|
||||||
$ libgoal= "''libdir'LIBSSL.EXE"
|
|
||||||
$ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE"
|
|
||||||
$ gosub create_nonvax_shr
|
|
||||||
$ else
|
|
||||||
$ arch_vax = 1
|
$ arch_vax = 1
|
||||||
|
$ arch = "VAX"
|
||||||
|
$ else
|
||||||
|
$ arch_vax = 0
|
||||||
|
$ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
|
||||||
|
$ if (arch .eqs. "") then arch = "UNK"
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ archd = arch
|
||||||
|
$ lib32 = "32"
|
||||||
|
$ shr = "SHR32"
|
||||||
|
$!
|
||||||
|
$ if (p1 .nes. "")
|
||||||
|
$ then
|
||||||
|
$ if (p1 .eqs. "64")
|
||||||
|
$ then
|
||||||
|
$ archd = arch+ "_64"
|
||||||
|
$ lib32 = ""
|
||||||
|
$ shr = "SHR"
|
||||||
|
$ else
|
||||||
|
$ if (p1 .nes. "32")
|
||||||
|
$ then
|
||||||
|
$ write sys$output "Second argument invalid."
|
||||||
|
$ write sys$output "It should be "32", "64", or nothing."
|
||||||
|
$ exit
|
||||||
|
$ endif
|
||||||
|
$ endif
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$! ----- Prepare info for processing: disabled algorithms info
|
||||||
|
$ gosub read_disabled_algorithms_info
|
||||||
|
$!
|
||||||
|
$ ZLIB = p2
|
||||||
|
$ zlib_lib = ""
|
||||||
|
$ if (ZLIB .nes. "")
|
||||||
|
$ then
|
||||||
|
$ file2 = f$parse( ZLIB, "libz.olb", , , "syntax_only")
|
||||||
|
$ if (f$search( file2) .eqs. "")
|
||||||
|
$ then
|
||||||
|
$ write sys$output ""
|
||||||
|
$ write sys$output "The Option ", ZLIB, " Is Invalid."
|
||||||
|
$ write sys$output " Can't find library: ''file2'"
|
||||||
|
$ write sys$output ""
|
||||||
|
$ goto tidy
|
||||||
|
$ endif
|
||||||
|
$ zlib_lib = ", ''file2' /library"
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ if (arch_vax)
|
||||||
|
$ then
|
||||||
$ libtit = "CRYPTO_TRANSFER_VECTOR"
|
$ libtit = "CRYPTO_TRANSFER_VECTOR"
|
||||||
$ libid = "Crypto"
|
$ libid = "Crypto"
|
||||||
$ libnum = "[.UTIL]LIBEAY.NUM"
|
$ libnum = "[.UTIL]LIBEAY.NUM"
|
||||||
$ libdir = "[.''ARCH'.EXE.CRYPTO]"
|
$ libdir = "[.''ARCHD'.EXE.CRYPTO]"
|
||||||
$ libmar = "''libdir'LIBCRYPTO.MAR"
|
$ libmar = "''libdir'SSL_LIBCRYPTO_''shr'.MAR"
|
||||||
$ libolb = "''libdir'LIBCRYPTO.OLB"
|
$ libolb = "''libdir'SSL_LIBCRYPTO''lib32'.OLB"
|
||||||
$ libopt = "''libdir'LIBCRYPTO.OPT"
|
$ libopt = "''libdir'SSL_LIBCRYPTO_''shr'.OPT"
|
||||||
$ libobj = "''libdir'LIBCRYPTO.OBJ"
|
$ libobj = "''libdir'SSL_LIBCRYPTO_''shr'.OBJ"
|
||||||
$ libmap = "''libdir'LIBCRYPTO.MAP"
|
$ libmap = "''libdir'SSL_LIBCRYPTO_''shr'.MAP"
|
||||||
$ libgoal= "''libdir'LIBCRYPTO.EXE"
|
$ libgoal= "''libdir'SSL_LIBCRYPTO_''shr'.EXE"
|
||||||
$ libref = ""
|
$ libref = ""
|
||||||
$ libvec = "LIBCRYPTO"
|
$ libvec = "LIBCRYPTO"
|
||||||
$ gosub create_vax_shr
|
$ if f$search( libolb) .nes. "" then gosub create_vax_shr
|
||||||
$ libtit = "SSL_TRANSFER_VECTOR"
|
$ libtit = "SSL_TRANSFER_VECTOR"
|
||||||
$ libid = "SSL"
|
$ libid = "SSL"
|
||||||
$ libnum = "[.UTIL]SSLEAY.NUM"
|
$ libnum = "[.UTIL]SSLEAY.NUM"
|
||||||
$ libdir = "[.''ARCH'.EXE.SSL]"
|
$ libdir = "[.''ARCHD'.EXE.SSL]"
|
||||||
$ libmar = "''libdir'LIBSSL.MAR"
|
$ libmar = "''libdir'SSL_LIBSSL_''shr'.MAR"
|
||||||
$ libolb = "''libdir'LIBSSL.OLB"
|
$ libolb = "''libdir'SSL_LIBSSL''lib32'.OLB"
|
||||||
$ libopt = "''libdir'LIBSSL.OPT"
|
$ libopt = "''libdir'SSL_LIBSSL_''shr'.OPT"
|
||||||
$ libobj = "''libdir'LIBSSL.OBJ"
|
$ libobj = "''libdir'SSL_LIBSSL_''shr'.OBJ"
|
||||||
$ libmap = "''libdir'LIBSSL.MAP"
|
$ libmap = "''libdir'SSL_LIBSSL_''shr'.MAP"
|
||||||
$ libgoal= "''libdir'LIBSSL.EXE"
|
$ libgoal= "''libdir'SSL_LIBSSL_''shr'.EXE"
|
||||||
$ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE"
|
$ libref = "[.''ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO_''shr'.EXE"
|
||||||
$ libvec = "LIBSSL"
|
$ libvec = "LIBSSL"
|
||||||
$ gosub create_vax_shr
|
$ if f$search( libolb) .nes. "" then gosub create_vax_shr
|
||||||
|
$ else
|
||||||
|
$ libid = "Crypto"
|
||||||
|
$ libnum = "[.UTIL]LIBEAY.NUM"
|
||||||
|
$ libdir = "[.''ARCHD'.EXE.CRYPTO]"
|
||||||
|
$ libolb = "''libdir'SSL_LIBCRYPTO''lib32'.OLB"
|
||||||
|
$ libopt = "''libdir'SSL_LIBCRYPTO_''shr'.OPT"
|
||||||
|
$ libmap = "''libdir'SSL_LIBCRYPTO_''shr'.MAP"
|
||||||
|
$ libgoal= "''libdir'SSL_LIBCRYPTO_''shr'.EXE"
|
||||||
|
$ libref = ""
|
||||||
|
$ if f$search( libolb) .nes. "" then gosub create_nonvax_shr
|
||||||
|
$ libid = "SSL"
|
||||||
|
$ libnum = "[.UTIL]SSLEAY.NUM"
|
||||||
|
$ libdir = "[.''ARCHD'.EXE.SSL]"
|
||||||
|
$ libolb = "''libdir'SSL_LIBSSL''lib32'.OLB"
|
||||||
|
$ libopt = "''libdir'SSL_LIBSSL_''shr'.OPT"
|
||||||
|
$ libmap = "''libdir'SSL_LIBSSL_''shr'.MAP"
|
||||||
|
$ libgoal= "''libdir'SSL_LIBSSL_''shr'.EXE"
|
||||||
|
$ libref = "[.''ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO_''shr'.EXE"
|
||||||
|
$ if f$search( libolb) .nes. "" then gosub create_nonvax_shr
|
||||||
$ endif
|
$ endif
|
||||||
|
$!
|
||||||
|
$ tidy:
|
||||||
|
$!
|
||||||
|
$! Close any open files.
|
||||||
|
$!
|
||||||
|
$ if (f$trnlnm( "libnum", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
|
||||||
|
close libnum
|
||||||
|
$!
|
||||||
|
$ if (f$trnlnm( "mar", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
|
||||||
|
close mar
|
||||||
|
$!
|
||||||
|
$ if (f$trnlnm( "opt", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
|
||||||
|
close opt
|
||||||
|
$!
|
||||||
|
$ if (f$trnlnm( "vf", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
|
||||||
|
close vf
|
||||||
|
$!
|
||||||
|
$! Restore the original default device:[directory].
|
||||||
|
$!
|
||||||
|
$ set default 'def_orig'
|
||||||
$ exit
|
$ exit
|
||||||
$
|
$
|
||||||
$! ----- Soubroutines to build the shareable libraries
|
$! ----- Subroutines to build the shareable libraries
|
||||||
$! For each supported architecture, there's a main shareable library
|
$! For each supported architecture, there's a main shareable library
|
||||||
$! creator, which is called from the main code above.
|
$! creator, which is called from the main code above.
|
||||||
$! The creator will define a number of variables to tell the next levels of
|
$! The creator will define a number of variables to tell the next levels of
|
||||||
@@ -111,9 +192,9 @@ $! ----- Subroutines for non-VAX
|
|||||||
$! -----
|
$! -----
|
||||||
$! The creator routine
|
$! The creator routine
|
||||||
$ create_nonvax_shr:
|
$ create_nonvax_shr:
|
||||||
$ open/write opt 'libopt'
|
$ open /write opt 'libopt'
|
||||||
$ write opt "identification=""",libid," ",libverstr,""""
|
$ write opt "identification=""",libid," ",libverstr,""""
|
||||||
$ write opt libolb,"/lib"
|
$ write opt libolb, " /library"
|
||||||
$ if libref .nes. "" then write opt libref,"/SHARE"
|
$ if libref .nes. "" then write opt libref,"/SHARE"
|
||||||
$ write opt "SYMBOL_VECTOR=(-"
|
$ write opt "SYMBOL_VECTOR=(-"
|
||||||
$ libfirstentry := true
|
$ libfirstentry := true
|
||||||
@@ -124,7 +205,8 @@ $ gosub read_func_num
|
|||||||
$ write opt ")"
|
$ write opt ")"
|
||||||
$ write opt "GSMATCH=",libvmatch,",",libver
|
$ write opt "GSMATCH=",libvmatch,",",libver
|
||||||
$ close opt
|
$ close opt
|
||||||
$ link/map='libmap'/full/share='libgoal' 'libopt'/option
|
$ link /map = 'libmap' /full /share = 'libgoal' 'libopt' /options -
|
||||||
|
'zlib_lib'
|
||||||
$ return
|
$ return
|
||||||
$
|
$
|
||||||
$! The record writer routine
|
$! The record writer routine
|
||||||
@@ -158,7 +240,7 @@ $! ----- Subroutines for VAX
|
|||||||
$! -----
|
$! -----
|
||||||
$! The creator routine
|
$! The creator routine
|
||||||
$ create_vax_shr:
|
$ create_vax_shr:
|
||||||
$ open/write mar 'libmar'
|
$ open /write mar 'libmar'
|
||||||
$ type sys$input:/out=mar:
|
$ type sys$input:/out=mar:
|
||||||
;
|
;
|
||||||
; Transfer vector for VAX shareable image
|
; Transfer vector for VAX shareable image
|
||||||
@@ -193,10 +275,10 @@ $! libwriter := write_vax_vtransfer_entry
|
|||||||
$! gosub read_func_num
|
$! gosub read_func_num
|
||||||
$ write mar " .END"
|
$ write mar " .END"
|
||||||
$ close mar
|
$ close mar
|
||||||
$ open/write opt 'libopt'
|
$ open /write opt 'libopt'
|
||||||
$ write opt "identification=""",libid," ",libverstr,""""
|
$ write opt "identification=""",libid," ",libverstr,""""
|
||||||
$ write opt libobj
|
$ write opt libobj
|
||||||
$ write opt libolb,"/lib"
|
$ write opt libolb, " /library"
|
||||||
$ if libref .nes. "" then write opt libref,"/SHARE"
|
$ if libref .nes. "" then write opt libref,"/SHARE"
|
||||||
$ type sys$input:/out=opt:
|
$ type sys$input:/out=opt:
|
||||||
!
|
!
|
||||||
@@ -215,7 +297,8 @@ $ libwriter := write_vax_psect_attr
|
|||||||
$ gosub read_func_num
|
$ gosub read_func_num
|
||||||
$ close opt
|
$ close opt
|
||||||
$ macro/obj='libobj' 'libmar'
|
$ macro/obj='libobj' 'libmar'
|
||||||
$ link/map='libmap'/full/share='libgoal' 'libopt'/option
|
$ link /map = 'libmap' /full /share = 'libgoal' 'libopt' /options -
|
||||||
|
'zlib_lib'
|
||||||
$ return
|
$ return
|
||||||
$
|
$
|
||||||
$! The record writer routine for VAX functions
|
$! The record writer routine for VAX functions
|
||||||
@@ -237,9 +320,9 @@ $ return
|
|||||||
$
|
$
|
||||||
$! ----- Common subroutines
|
$! ----- Common subroutines
|
||||||
$! -----
|
$! -----
|
||||||
$! The .num file reader. This one has great responsability.
|
$! The .num file reader. This one has great responsibility.
|
||||||
$ read_func_num:
|
$ read_func_num:
|
||||||
$ open libnum 'libnum'
|
$ open /read libnum 'libnum'
|
||||||
$ goto read_nums
|
$ goto read_nums
|
||||||
$
|
$
|
||||||
$ read_nums:
|
$ read_nums:
|
||||||
@@ -247,27 +330,30 @@ $ libentrynum=0
|
|||||||
$ liblastentry:=false
|
$ liblastentry:=false
|
||||||
$ entrycount=0
|
$ entrycount=0
|
||||||
$ loop:
|
$ loop:
|
||||||
$ read/end=loop_end/err=loop_end libnum line
|
$ read /end=loop_end /err=loop_end libnum line
|
||||||
$ entrynum=f$int(f$element(1," ",f$edit(line,"COMPRESS,TRIM")))
|
$ lin = f$edit( line, "COMPRESS,TRIM")
|
||||||
$ entryinfo=f$element(2," ",f$edit(line,"COMPRESS,TRIM"))
|
$! Skip a "#" comment line.
|
||||||
$ curentry=f$element(0," ",f$edit(line,"COMPRESS,TRIM"))
|
$ if (f$extract( 0, 1, lin) .eqs. "#") then goto loop
|
||||||
$ info_exist=f$element(0,":",entryinfo)
|
$ entrynum = f$int(f$element( 1, " ", lin))
|
||||||
$ info_platforms=","+f$element(1,":",entryinfo)+","
|
$ entryinfo = f$element( 2, " ", lin)
|
||||||
$ info_kind=f$element(2,":",entryinfo)
|
$ curentry = f$element( 0, " ", lin)
|
||||||
$ info_algorithms=","+f$element(3,":",entryinfo)+","
|
$ info_exist = f$element( 0, ":", entryinfo)
|
||||||
|
$ info_platforms = ","+ f$element(1, ":", entryinfo)+ ","
|
||||||
|
$ info_kind = f$element( 2, ":", entryinfo)
|
||||||
|
$ info_algorithms = ","+ f$element( 3, ":", entryinfo)+ ","
|
||||||
$ if info_exist .eqs. "NOEXIST" then goto loop
|
$ if info_exist .eqs. "NOEXIST" then goto loop
|
||||||
$ truesum = 0
|
$ truesum = 0
|
||||||
$ falsesum = 0
|
$ falsesum = 0
|
||||||
$ negatives = 1
|
$ negatives = 1
|
||||||
$ plat_i = 0
|
$ plat_i = 0
|
||||||
$ loop1:
|
$ loop1:
|
||||||
$ plat_entry = f$element(plat_i,",",info_platforms)
|
$ plat_entry = f$element( plat_i, ",", info_platforms)
|
||||||
$ plat_i = plat_i + 1
|
$ plat_i = plat_i + 1
|
||||||
$ if plat_entry .eqs. "" then goto loop1
|
$ if plat_entry .eqs. "" then goto loop1
|
||||||
$ if plat_entry .nes. ","
|
$ if plat_entry .nes. ","
|
||||||
$ then
|
$ then
|
||||||
$ if f$extract(0,1,plat_entry) .nes. "!" then negatives = 0
|
$ if f$extract(0,1,plat_entry) .nes. "!" then negatives = 0
|
||||||
$ if f$getsyi("CPU") .lt. 128
|
$ if (arch_vax)
|
||||||
$ then
|
$ then
|
||||||
$ if plat_entry .eqs. "EXPORT_VAR_AS_FUNCTION" then -
|
$ if plat_entry .eqs. "EXPORT_VAR_AS_FUNCTION" then -
|
||||||
$ truesum = truesum + 1
|
$ truesum = truesum + 1
|
||||||
@@ -276,6 +362,7 @@ $ falsesum = falsesum + 1
|
|||||||
$ endif
|
$ endif
|
||||||
$!
|
$!
|
||||||
$ if ((plat_entry .eqs. "VMS") .or. -
|
$ if ((plat_entry .eqs. "VMS") .or. -
|
||||||
|
((plat_entry .eqs. "ZLIB") .and. (ZLIB .nes. "")) .or. -
|
||||||
(arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then -
|
(arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then -
|
||||||
truesum = truesum + 1
|
truesum = truesum + 1
|
||||||
$!
|
$!
|
||||||
@@ -301,8 +388,7 @@ $ alg_i = alg_i + 1
|
|||||||
$ if alg_entry .eqs. "" then goto loop2
|
$ if alg_entry .eqs. "" then goto loop2
|
||||||
$ if alg_entry .nes. ","
|
$ if alg_entry .nes. ","
|
||||||
$ then
|
$ then
|
||||||
$ if alg_entry .eqs. "KRB5" then goto loop ! Special for now
|
$ if disabled_algorithms - ("," + alg_entry + ",") .nes disabled_algorithms then goto loop
|
||||||
$ if alg_entry .eqs. "STATIC_ENGINE" then goto loop ! Special for now
|
|
||||||
$ if f$trnlnm("OPENSSL_NO_"+alg_entry) .nes. "" then goto loop
|
$ if f$trnlnm("OPENSSL_NO_"+alg_entry) .nes. "" then goto loop
|
||||||
$ goto loop2
|
$ goto loop2
|
||||||
$ endif
|
$ endif
|
||||||
@@ -345,7 +431,7 @@ $
|
|||||||
$! The version number reader
|
$! The version number reader
|
||||||
$ read_version_info:
|
$ read_version_info:
|
||||||
$ libver = ""
|
$ libver = ""
|
||||||
$ open/read vf [.CRYPTO]OPENSSLV.H
|
$ open /read vf [.CRYPTO]OPENSSLV.H
|
||||||
$ loop_rvi:
|
$ loop_rvi:
|
||||||
$ read/err=endloop_rvi/end=endloop_rvi vf rvi_line
|
$ read/err=endloop_rvi/end=endloop_rvi vf rvi_line
|
||||||
$ if rvi_line - "SHLIB_VERSION_NUMBER """ .eqs. rvi_line then -
|
$ if rvi_line - "SHLIB_VERSION_NUMBER """ .eqs. rvi_line then -
|
||||||
@@ -369,3 +455,22 @@ $ endif
|
|||||||
$ endloop_rvi:
|
$ endloop_rvi:
|
||||||
$ close vf
|
$ close vf
|
||||||
$ return
|
$ return
|
||||||
|
$
|
||||||
|
$! The disabled algorithms reader
|
||||||
|
$ read_disabled_algorithms_info:
|
||||||
|
$ disabled_algorithms = ","
|
||||||
|
$ open /read cf [.CRYPTO.'ARCH']OPENSSLCONF.H
|
||||||
|
$ loop_rci:
|
||||||
|
$ read/err=endloop_rci/end=endloop_rci cf rci_line
|
||||||
|
$ rci_line = f$edit(rci_line,"TRIM,COMPRESS")
|
||||||
|
$ rci_ei = 0
|
||||||
|
$ if f$extract(0,9,rci_line) .eqs. "# define " then rci_ei = 2
|
||||||
|
$ if f$extract(0,8,rci_line) .eqs. "#define " then rci_ei = 1
|
||||||
|
$ if rci_ei .eq. 0 then goto loop_rci
|
||||||
|
$ rci_e = f$element(rci_ei," ",rci_line)
|
||||||
|
$ if f$extract(0,11,rci_e) .nes. "OPENSSL_NO_" then goto loop_rci
|
||||||
|
$ disabled_algorithms = disabled_algorithms + f$extract(11,999,rci_e) + ","
|
||||||
|
$ goto loop_rci
|
||||||
|
$ endloop_rci:
|
||||||
|
$ close cf
|
||||||
|
$ return
|
||||||
|
108
VMS/openssl_startup.com
Executable file
108
VMS/openssl_startup.com
Executable file
@@ -0,0 +1,108 @@
|
|||||||
|
$!
|
||||||
|
$! Startup file for OpenSSL 1.x.
|
||||||
|
$!
|
||||||
|
$! 2011-03-05 SMS.
|
||||||
|
$!
|
||||||
|
$! This procedure must reside in the OpenSSL installation directory.
|
||||||
|
$! It will fail if it is copied to a different location.
|
||||||
|
$!
|
||||||
|
$! P1 qualifier(s) for DEFINE. For example, "/SYSTEM" to get the
|
||||||
|
$! logical names defined in the system logical name table.
|
||||||
|
$!
|
||||||
|
$! P2 "64", to use executables which were built with 64-bit pointers.
|
||||||
|
$!
|
||||||
|
$! Good (default) and bad status values.
|
||||||
|
$!
|
||||||
|
$ status = %x00010001 ! RMS$_NORMAL, normal successful completion.
|
||||||
|
$ rms_e_fnf = %x00018292 ! RMS$_FNF, file not found.
|
||||||
|
$!
|
||||||
|
$! Prepare for problems.
|
||||||
|
$!
|
||||||
|
$ orig_dev_dir = f$environment( "DEFAULT")
|
||||||
|
$ on control_y then goto clean_up
|
||||||
|
$ on error then goto clean_up
|
||||||
|
$!
|
||||||
|
$! Determine hardware architecture.
|
||||||
|
$!
|
||||||
|
$ if (f$getsyi( "cpu") .lt. 128)
|
||||||
|
$ then
|
||||||
|
$ arch_name = "VAX"
|
||||||
|
$ else
|
||||||
|
$ arch_name = f$edit( f$getsyi( "arch_name"), "upcase")
|
||||||
|
$ if (arch_name .eqs. "") then arch_name = "UNK"
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ if (p2 .eqs. "64")
|
||||||
|
$ then
|
||||||
|
$ arch_name_exe = arch_name+ "_64"
|
||||||
|
$ else
|
||||||
|
$ arch_name_exe = arch_name
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$! Derive the OpenSSL installation device:[directory] from the location
|
||||||
|
$! of this command procedure.
|
||||||
|
$!
|
||||||
|
$ proc = f$environment( "procedure")
|
||||||
|
$ proc_dev_dir = f$parse( "A.;", proc, , , "no_conceal") - "A.;"
|
||||||
|
$ proc_dev = f$parse( proc_dev_dir, , , "device", "syntax_only")
|
||||||
|
$ proc_dir = f$parse( proc_dev_dir, , , "directory", "syntax_only") - -
|
||||||
|
".][000000"- "[000000."- "]["- "["- "]"
|
||||||
|
$ proc_dev_dir = proc_dev+ "["+ proc_dir+ "]"
|
||||||
|
$ set default 'proc_dev_dir'
|
||||||
|
$ set default [-]
|
||||||
|
$ ossl_dev_dir = f$environment( "default")
|
||||||
|
$!
|
||||||
|
$! Check existence of expected directories (to see if this procedure has
|
||||||
|
$! been moved away from its proper place).
|
||||||
|
$!
|
||||||
|
$ if ((f$search( "certs.dir;1") .eqs. "") .or. -
|
||||||
|
(f$search( "include.dir;1") .eqs. "") .or. -
|
||||||
|
(f$search( "private.dir;1") .eqs. "") .or. -
|
||||||
|
(f$search( "vms.dir;1") .eqs. ""))
|
||||||
|
$ then
|
||||||
|
$ write sys$output -
|
||||||
|
" Can't find expected common OpenSSL directories in:"
|
||||||
|
$ write sys$output " ''ossl_dev_dir'"
|
||||||
|
$ status = rms_e_fnf
|
||||||
|
$ goto clean_up
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ if ((f$search( "''arch_name_exe'_exe.dir;1") .eqs. "") .or. -
|
||||||
|
(f$search( "''arch_name'_lib.dir;1") .eqs. ""))
|
||||||
|
$ then
|
||||||
|
$ write sys$output -
|
||||||
|
" Can't find expected architecture-specific OpenSSL directories in:"
|
||||||
|
$ write sys$output " ''ossl_dev_dir'"
|
||||||
|
$ status = rms_e_fnf
|
||||||
|
$ goto clean_up
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$! All seems well (enough). Define the OpenSSL logical names.
|
||||||
|
$!
|
||||||
|
$ ossl_root = ossl_dev_dir- "]"+ ".]"
|
||||||
|
$ define /translation_attributes = concealed /nolog'p1 SSLROOT 'ossl_root'
|
||||||
|
$ define /nolog 'p1' SSLCERTS sslroot:[certs]
|
||||||
|
$ define /nolog 'p1' SSLINCLUDE sslroot:[include]
|
||||||
|
$ define /nolog 'p1' SSLPRIVATE sslroot:[private]
|
||||||
|
$ define /nolog 'p1' SSLEXE sslroot:['arch_name_exe'_exe]
|
||||||
|
$ define /nolog 'p1' SSLLIB sslroot:['arch_name'_lib]
|
||||||
|
$!
|
||||||
|
$! Defining OPENSSL lets a C program use "#include <openssl/{foo}.h>":
|
||||||
|
$ define /nolog 'p1' OPENSSL SSLINCLUDE:
|
||||||
|
$!
|
||||||
|
$! Run a site-specific procedure, if it exists.
|
||||||
|
$!
|
||||||
|
$ if f$search( "sslroot:[vms]openssl_systartup.com") .nes."" then -
|
||||||
|
@ sslroot:[vms]openssl_systartup.com
|
||||||
|
$!
|
||||||
|
$! Restore the original default dev:[dir] (if known).
|
||||||
|
$!
|
||||||
|
$ clean_up:
|
||||||
|
$!
|
||||||
|
$ if (f$type( orig_dev_dir) .nes. "")
|
||||||
|
$ then
|
||||||
|
$ set default 'orig_dev_dir'
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ EXIT 'status'
|
||||||
|
$!
|
20
VMS/openssl_undo.com
Executable file
20
VMS/openssl_undo.com
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
$!
|
||||||
|
$! Deassign OpenSSL logical names.
|
||||||
|
$!
|
||||||
|
$ call deass "OPENSSL" "''p1'"
|
||||||
|
$ call deass "SSLCERTS" "''p1'"
|
||||||
|
$ call deass "SSLEXE" "''p1'"
|
||||||
|
$ call deass "SSLINCLUDE" "''p1'"
|
||||||
|
$ call deass "SSLLIB" "''p1'"
|
||||||
|
$ call deass "SSLPRIVATE" "''p1'"
|
||||||
|
$ call deass "SSLROOT" "''p1'"
|
||||||
|
$!
|
||||||
|
$ exit
|
||||||
|
$!
|
||||||
|
$deass: subroutine
|
||||||
|
$ if (f$trnlnm( p1) .nes. "")
|
||||||
|
$ then
|
||||||
|
$ deassign 'p2' 'p1'
|
||||||
|
$ endif
|
||||||
|
$ endsubroutine
|
||||||
|
$!
|
98
apps/CA.com
98
apps/CA.com
@@ -37,14 +37,25 @@ $ VERIFY = openssl + " verify"
|
|||||||
$ X509 = openssl + " x509"
|
$ X509 = openssl + " x509"
|
||||||
$ PKCS12 = openssl + " pkcs12"
|
$ PKCS12 = openssl + " pkcs12"
|
||||||
$ echo = "write sys$Output"
|
$ echo = "write sys$Output"
|
||||||
|
$ RET = 1
|
||||||
$!
|
$!
|
||||||
$ s = F$PARSE(F$ENVIRONMENT("DEFAULT"),"[]") - "].;"
|
$! 2010-12-20 SMS.
|
||||||
$ CATOP := 's'.demoCA
|
$! Use a concealed logical name to reduce command line lengths, to
|
||||||
$ CAKEY := ]cakey.pem
|
$! avoid DCL errors on VAX:
|
||||||
$ CACERT := ]cacert.pem
|
$! %DCL-W-TKNOVF, command element is too long - shorten
|
||||||
|
$! (Path segments like "openssl-1_0_1-stable-SNAP-20101217" accumulate
|
||||||
|
$! quickly.)
|
||||||
|
$!
|
||||||
|
$ CATOP = F$PARSE( F$ENVIRONMENT( "DEFAULT"), "[]")- "].;"+ ".demoCA.]"
|
||||||
|
$ define /translation_attributes = concealed CATOP 'CATOP'
|
||||||
|
$!
|
||||||
|
$ on error then goto clean_up
|
||||||
|
$ on control_y then goto clean_up
|
||||||
|
$!
|
||||||
|
$ CAKEY = "CATOP:[private]cakey.pem"
|
||||||
|
$ CACERT = "CATOP:[000000]cacert.pem"
|
||||||
$
|
$
|
||||||
$ __INPUT := SYS$COMMAND
|
$ __INPUT := SYS$COMMAND
|
||||||
$ RET = 1
|
|
||||||
$!
|
$!
|
||||||
$ i = 1
|
$ i = 1
|
||||||
$opt_loop:
|
$opt_loop:
|
||||||
@@ -55,7 +66,7 @@ $
|
|||||||
$ IF (prog_opt .EQS. "?" .OR. prog_opt .EQS. "-h" .OR. prog_opt .EQS. "-help")
|
$ IF (prog_opt .EQS. "?" .OR. prog_opt .EQS. "-h" .OR. prog_opt .EQS. "-help")
|
||||||
$ THEN
|
$ THEN
|
||||||
$ echo "usage: CA -newcert|-newreq|-newca|-sign|-verify"
|
$ echo "usage: CA -newcert|-newreq|-newca|-sign|-verify"
|
||||||
$ exit
|
$ goto clean_up
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$ IF (prog_opt .EQS. "-input")
|
$ IF (prog_opt .EQS. "-input")
|
||||||
@@ -69,7 +80,7 @@ $!
|
|||||||
$ IF (prog_opt .EQS. "-newcert")
|
$ IF (prog_opt .EQS. "-newcert")
|
||||||
$ THEN
|
$ THEN
|
||||||
$ ! Create a certificate.
|
$ ! Create a certificate.
|
||||||
$ DEFINE/USER SYS$INPUT '__INPUT'
|
$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
|
||||||
$ REQ -new -x509 -keyout newreq.pem -out newreq.pem 'DAYS'
|
$ REQ -new -x509 -keyout newreq.pem -out newreq.pem 'DAYS'
|
||||||
$ RET=$STATUS
|
$ RET=$STATUS
|
||||||
$ echo "Certificate (and private key) is in newreq.pem"
|
$ echo "Certificate (and private key) is in newreq.pem"
|
||||||
@@ -79,7 +90,7 @@ $!
|
|||||||
$ IF (prog_opt .EQS. "-newreq")
|
$ IF (prog_opt .EQS. "-newreq")
|
||||||
$ THEN
|
$ THEN
|
||||||
$ ! Create a certificate request
|
$ ! Create a certificate request
|
||||||
$ DEFINE/USER SYS$INPUT '__INPUT'
|
$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
|
||||||
$ REQ -new -keyout newreq.pem -out newreq.pem 'DAYS'
|
$ REQ -new -keyout newreq.pem -out newreq.pem 'DAYS'
|
||||||
$ RET=$STATUS
|
$ RET=$STATUS
|
||||||
$ echo "Request (and private key) is in newreq.pem"
|
$ echo "Request (and private key) is in newreq.pem"
|
||||||
@@ -90,41 +101,40 @@ $ IF (prog_opt .EQS. "-newca")
|
|||||||
$ THEN
|
$ THEN
|
||||||
$ ! If explicitly asked for or it doesn't exist then setup the directory
|
$ ! If explicitly asked for or it doesn't exist then setup the directory
|
||||||
$ ! structure that Eric likes to manage things.
|
$ ! structure that Eric likes to manage things.
|
||||||
$ IF F$SEARCH(CATOP+"]serial.") .EQS. ""
|
$ IF F$SEARCH( "CATOP:[000000]serial.") .EQS. ""
|
||||||
$ THEN
|
$ THEN
|
||||||
$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP']
|
$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[000000]
|
||||||
$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.certs]
|
$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[certs]
|
||||||
$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.crl]
|
$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[crl]
|
||||||
$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.newcerts]
|
$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[newcerts]
|
||||||
$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.private]
|
$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[private]
|
||||||
$
|
$
|
||||||
$ OPEN /WRITE ser_file 'CATOP']serial.
|
$ OPEN /WRITE ser_file CATOP:[000000]serial.
|
||||||
$ WRITE ser_file "01"
|
$ WRITE ser_file "01"
|
||||||
$ CLOSE ser_file
|
$ CLOSE ser_file
|
||||||
$ APPEND/NEW NL: 'CATOP']index.txt
|
$ APPEND /NEW_VERSION NL: CATOP:[000000]index.txt
|
||||||
$
|
$
|
||||||
$ ! The following is to make sure access() doesn't get confused. It
|
$ ! The following is to make sure access() doesn't get confused. It
|
||||||
$ ! really needs one file in the directory to give correct answers...
|
$ ! really needs one file in the directory to give correct answers...
|
||||||
$ COPY NLA0: 'CATOP'.certs].;
|
$ COPY NLA0: CATOP:[certs].;
|
||||||
$ COPY NLA0: 'CATOP'.crl].;
|
$ COPY NLA0: CATOP:[crl].;
|
||||||
$ COPY NLA0: 'CATOP'.newcerts].;
|
$ COPY NLA0: CATOP:[newcerts].;
|
||||||
$ COPY NLA0: 'CATOP'.private].;
|
$ COPY NLA0: CATOP:[private].;
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$ IF F$SEARCH(CATOP+".private"+CAKEY) .EQS. ""
|
$ IF F$SEARCH( CAKEY) .EQS. ""
|
||||||
$ THEN
|
$ THEN
|
||||||
$ READ '__INPUT' FILE -
|
$ READ '__INPUT' FILE -
|
||||||
/PROMPT="CA certificate filename (or enter to create)"
|
/PROMPT="CA certificate filename (or enter to create): "
|
||||||
$ IF (FILE .NES. "") .AND. (F$SEARCH(FILE) .NES. "")
|
$ IF (FILE .NES. "") .AND. (F$SEARCH(FILE) .NES. "")
|
||||||
$ THEN
|
$ THEN
|
||||||
$ COPY 'FILE' 'CATOP'.private'CAKEY'
|
$ COPY 'FILE' 'CAKEY'
|
||||||
$ RET=$STATUS
|
$ RET=$STATUS
|
||||||
$ ELSE
|
$ ELSE
|
||||||
$ echo "Making CA certificate ..."
|
$ echo "Making CA certificate ..."
|
||||||
$ DEFINE/USER SYS$INPUT '__INPUT'
|
$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
|
||||||
$ REQ -new -x509 -keyout 'CATOP'.private'CAKEY' -
|
$ REQ -new -x509 -keyout 'CAKEY' -out 'CACERT' 'DAYS'
|
||||||
-out 'CATOP''CACERT' 'DAYS'
|
$ RET=$STATUS
|
||||||
$ RET=$STATUS
|
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$ GOTO opt_loop_continue
|
$ GOTO opt_loop_continue
|
||||||
@@ -135,16 +145,16 @@ $ THEN
|
|||||||
$ i = i + 1
|
$ i = i + 1
|
||||||
$ cname = P'i'
|
$ cname = P'i'
|
||||||
$ IF cname .EQS. "" THEN cname = "My certificate"
|
$ IF cname .EQS. "" THEN cname = "My certificate"
|
||||||
$ PKCS12 -in newcert.pem -inkey newreq.pem -certfile 'CATOP''CACERT -
|
$ PKCS12 -in newcert.pem -inkey newreq.pem -certfile 'CACERT' -
|
||||||
-out newcert.p12 -export -name "''cname'"
|
-out newcert.p12 -export -name "''cname'"
|
||||||
$ RET=$STATUS
|
$ RET=$STATUS
|
||||||
$ exit RET
|
$ goto clean_up
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$ IF (prog_opt .EQS. "-xsign")
|
$ IF (prog_opt .EQS. "-xsign")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$ DEFINE/USER SYS$INPUT '__INPUT'
|
$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
|
||||||
$ CA -policy policy_anything -infiles newreq.pem
|
$ CA -policy policy_anything -infiles newreq.pem
|
||||||
$ RET=$STATUS
|
$ RET=$STATUS
|
||||||
$ GOTO opt_loop_continue
|
$ GOTO opt_loop_continue
|
||||||
@@ -153,7 +163,7 @@ $!
|
|||||||
$ IF ((prog_opt .EQS. "-sign") .OR. (prog_opt .EQS. "-signreq"))
|
$ IF ((prog_opt .EQS. "-sign") .OR. (prog_opt .EQS. "-signreq"))
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$ DEFINE/USER SYS$INPUT '__INPUT'
|
$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
|
||||||
$ CA -policy policy_anything -out newcert.pem -infiles newreq.pem
|
$ CA -policy policy_anything -out newcert.pem -infiles newreq.pem
|
||||||
$ RET=$STATUS
|
$ RET=$STATUS
|
||||||
$ type newcert.pem
|
$ type newcert.pem
|
||||||
@@ -165,9 +175,9 @@ $ IF (prog_opt .EQS. "-signcert")
|
|||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$ echo "Cert passphrase will be requested twice - bug?"
|
$ echo "Cert passphrase will be requested twice - bug?"
|
||||||
$ DEFINE/USER SYS$INPUT '__INPUT'
|
$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
|
||||||
$ X509 -x509toreq -in newreq.pem -signkey newreq.pem -out tmp.pem
|
$ X509 -x509toreq -in newreq.pem -signkey newreq.pem -out tmp.pem
|
||||||
$ DEFINE/USER SYS$INPUT '__INPUT'
|
$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
|
||||||
$ CA -policy policy_anything -out newcert.pem -infiles tmp.pem
|
$ CA -policy policy_anything -out newcert.pem -infiles tmp.pem
|
||||||
y
|
y
|
||||||
y
|
y
|
||||||
@@ -182,17 +192,17 @@ $!
|
|||||||
$ i = i + 1
|
$ i = i + 1
|
||||||
$ IF (p'i' .EQS. "")
|
$ IF (p'i' .EQS. "")
|
||||||
$ THEN
|
$ THEN
|
||||||
$ DEFINE/USER SYS$INPUT '__INPUT'
|
$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
|
||||||
$ VERIFY "-CAfile" 'CATOP''CACERT' newcert.pem
|
$ VERIFY "-CAfile" 'CACERT' newcert.pem
|
||||||
$ ELSE
|
$ ELSE
|
||||||
$ j = i
|
$ j = i
|
||||||
$ verify_opt_loop:
|
$ verify_opt_loop:
|
||||||
$ IF j .GT. 8 THEN GOTO verify_opt_loop_end
|
$ IF j .GT. 8 THEN GOTO verify_opt_loop_end
|
||||||
$ IF p'j' .NES. ""
|
$ IF p'j' .NES. ""
|
||||||
$ THEN
|
$ THEN
|
||||||
$ DEFINE/USER SYS$INPUT '__INPUT'
|
$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
|
||||||
$ __tmp = p'j'
|
$ __tmp = p'j'
|
||||||
$ VERIFY "-CAfile" 'CATOP''CACERT' '__tmp'
|
$ VERIFY "-CAfile" 'CACERT' '__tmp'
|
||||||
$ tmp=$STATUS
|
$ tmp=$STATUS
|
||||||
$ IF tmp .NE. 0 THEN RET=tmp
|
$ IF tmp .NE. 0 THEN RET=tmp
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
@@ -208,8 +218,8 @@ $ IF (prog_opt .NES. "")
|
|||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$ echo "Unknown argument ''prog_opt'"
|
$ echo "Unknown argument ''prog_opt'"
|
||||||
$
|
$ RET = 3
|
||||||
$ EXIT 3
|
$ goto clean_up
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$
|
$
|
||||||
$opt_loop_continue:
|
$opt_loop_continue:
|
||||||
@@ -217,4 +227,10 @@ $ i = i + 1
|
|||||||
$ GOTO opt_loop
|
$ GOTO opt_loop
|
||||||
$
|
$
|
||||||
$opt_loop_end:
|
$opt_loop_end:
|
||||||
|
$!
|
||||||
|
$clean_up:
|
||||||
|
$!
|
||||||
|
$ if f$trnlnm( "CATOP", "LNM$PROCESS") .nes. "" then -
|
||||||
|
deassign /process CATOP
|
||||||
|
$!
|
||||||
$ EXIT 'RET'
|
$ EXIT 'RET'
|
||||||
|
31
apps/apps.c
31
apps/apps.c
@@ -109,7 +109,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _POSIX_C_SOURCE
|
#if !defined(_POSIX_C_SOURCE) && defined(OPENSSL_SYS_VMS)
|
||||||
#define _POSIX_C_SOURCE 2 /* On VMS, you need to define this to get
|
#define _POSIX_C_SOURCE 2 /* On VMS, you need to define this to get
|
||||||
the declaration of fileno(). The value
|
the declaration of fileno(). The value
|
||||||
2 is to make sure no function defined
|
2 is to make sure no function defined
|
||||||
@@ -257,6 +257,8 @@ int args_from_file(char *file, int *argc, char **argv[])
|
|||||||
|
|
||||||
int str2fmt(char *s)
|
int str2fmt(char *s)
|
||||||
{
|
{
|
||||||
|
if (s == NULL)
|
||||||
|
return FORMAT_UNDEF;
|
||||||
if ((*s == 'D') || (*s == 'd'))
|
if ((*s == 'D') || (*s == 'd'))
|
||||||
return(FORMAT_ASN1);
|
return(FORMAT_ASN1);
|
||||||
else if ((*s == 'T') || (*s == 't'))
|
else if ((*s == 'T') || (*s == 't'))
|
||||||
@@ -388,6 +390,8 @@ int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[])
|
|||||||
{
|
{
|
||||||
arg->count=20;
|
arg->count=20;
|
||||||
arg->data=(char **)OPENSSL_malloc(sizeof(char *)*arg->count);
|
arg->data=(char **)OPENSSL_malloc(sizeof(char *)*arg->count);
|
||||||
|
if (arg->data == NULL)
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
for (i=0; i<arg->count; i++)
|
for (i=0; i<arg->count; i++)
|
||||||
arg->data[i]=NULL;
|
arg->data[i]=NULL;
|
||||||
@@ -584,12 +588,12 @@ int password_callback(char *buf, int bufsiz, int verify,
|
|||||||
|
|
||||||
if (ok >= 0)
|
if (ok >= 0)
|
||||||
ok = UI_add_input_string(ui,prompt,ui_flags,buf,
|
ok = UI_add_input_string(ui,prompt,ui_flags,buf,
|
||||||
PW_MIN_LENGTH,BUFSIZ-1);
|
PW_MIN_LENGTH,bufsiz-1);
|
||||||
if (ok >= 0 && verify)
|
if (ok >= 0 && verify)
|
||||||
{
|
{
|
||||||
buff = (char *)OPENSSL_malloc(bufsiz);
|
buff = (char *)OPENSSL_malloc(bufsiz);
|
||||||
ok = UI_add_verify_string(ui,prompt,ui_flags,buff,
|
ok = UI_add_verify_string(ui,prompt,ui_flags,buff,
|
||||||
PW_MIN_LENGTH,BUFSIZ-1, buf);
|
PW_MIN_LENGTH,bufsiz-1, buf);
|
||||||
}
|
}
|
||||||
if (ok >= 0)
|
if (ok >= 0)
|
||||||
do
|
do
|
||||||
@@ -796,7 +800,9 @@ X509 *load_cert(BIO *err, const char *file, int format,
|
|||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
{
|
{
|
||||||
#ifdef _IONBF
|
#ifdef _IONBF
|
||||||
|
# ifndef OPENSSL_NO_SETVBUF_IONBF
|
||||||
setvbuf(stdin, NULL, _IONBF, 0);
|
setvbuf(stdin, NULL, _IONBF, 0);
|
||||||
|
# endif /* ndef OPENSSL_NO_SETVBUF_IONBF */
|
||||||
#endif
|
#endif
|
||||||
BIO_set_fp(cert,stdin,BIO_NOCLOSE);
|
BIO_set_fp(cert,stdin,BIO_NOCLOSE);
|
||||||
}
|
}
|
||||||
@@ -897,7 +903,9 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
|
|||||||
if (file == NULL && maybe_stdin)
|
if (file == NULL && maybe_stdin)
|
||||||
{
|
{
|
||||||
#ifdef _IONBF
|
#ifdef _IONBF
|
||||||
|
# ifndef OPENSSL_NO_SETVBUF_IONBF
|
||||||
setvbuf(stdin, NULL, _IONBF, 0);
|
setvbuf(stdin, NULL, _IONBF, 0);
|
||||||
|
# endif /* ndef OPENSSL_NO_SETVBUF_IONBF */
|
||||||
#endif
|
#endif
|
||||||
BIO_set_fp(key,stdin,BIO_NOCLOSE);
|
BIO_set_fp(key,stdin,BIO_NOCLOSE);
|
||||||
}
|
}
|
||||||
@@ -986,7 +994,9 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
|
|||||||
if (file == NULL && maybe_stdin)
|
if (file == NULL && maybe_stdin)
|
||||||
{
|
{
|
||||||
#ifdef _IONBF
|
#ifdef _IONBF
|
||||||
|
# ifndef OPENSSL_NO_SETVBUF_IONBF
|
||||||
setvbuf(stdin, NULL, _IONBF, 0);
|
setvbuf(stdin, NULL, _IONBF, 0);
|
||||||
|
# endif /* ndef OPENSSL_NO_SETVBUF_IONBF */
|
||||||
#endif
|
#endif
|
||||||
BIO_set_fp(key,stdin,BIO_NOCLOSE);
|
BIO_set_fp(key,stdin,BIO_NOCLOSE);
|
||||||
}
|
}
|
||||||
@@ -1207,7 +1217,8 @@ STACK_OF(X509) *load_certs(BIO *err, const char *file, int format,
|
|||||||
const char *pass, ENGINE *e, const char *desc)
|
const char *pass, ENGINE *e, const char *desc)
|
||||||
{
|
{
|
||||||
STACK_OF(X509) *certs;
|
STACK_OF(X509) *certs;
|
||||||
load_certs_crls(err, file, format, pass, e, desc, &certs, NULL);
|
if (!load_certs_crls(err, file, format, pass, e, desc, &certs, NULL))
|
||||||
|
return NULL;
|
||||||
return certs;
|
return certs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1215,7 +1226,8 @@ STACK_OF(X509_CRL) *load_crls(BIO *err, const char *file, int format,
|
|||||||
const char *pass, ENGINE *e, const char *desc)
|
const char *pass, ENGINE *e, const char *desc)
|
||||||
{
|
{
|
||||||
STACK_OF(X509_CRL) *crls;
|
STACK_OF(X509_CRL) *crls;
|
||||||
load_certs_crls(err, file, format, pass, e, desc, NULL, &crls);
|
if (!load_certs_crls(err, file, format, pass, e, desc, NULL, &crls))
|
||||||
|
return NULL;
|
||||||
return crls;
|
return crls;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1532,6 +1544,8 @@ char *make_config_name()
|
|||||||
|
|
||||||
len=strlen(t)+strlen(OPENSSL_CONF)+2;
|
len=strlen(t)+strlen(OPENSSL_CONF)+2;
|
||||||
p=OPENSSL_malloc(len);
|
p=OPENSSL_malloc(len);
|
||||||
|
if (p == NULL)
|
||||||
|
return NULL;
|
||||||
BUF_strlcpy(p,t,len);
|
BUF_strlcpy(p,t,len);
|
||||||
#ifndef OPENSSL_SYS_VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
BUF_strlcat(p,"/",len);
|
BUF_strlcat(p,"/",len);
|
||||||
@@ -2122,7 +2136,7 @@ X509_NAME *parse_name(char *subject, long chtype, int multirdn)
|
|||||||
X509_NAME *n = NULL;
|
X509_NAME *n = NULL;
|
||||||
int nid;
|
int nid;
|
||||||
|
|
||||||
if (!buf || !ne_types || !ne_values)
|
if (!buf || !ne_types || !ne_values || !mval)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "malloc error\n");
|
BIO_printf(bio_err, "malloc error\n");
|
||||||
goto error;
|
goto error;
|
||||||
@@ -2226,6 +2240,7 @@ X509_NAME *parse_name(char *subject, long chtype, int multirdn)
|
|||||||
OPENSSL_free(ne_values);
|
OPENSSL_free(ne_values);
|
||||||
OPENSSL_free(ne_types);
|
OPENSSL_free(ne_types);
|
||||||
OPENSSL_free(buf);
|
OPENSSL_free(buf);
|
||||||
|
OPENSSL_free(mval);
|
||||||
return n;
|
return n;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
@@ -2234,6 +2249,8 @@ error:
|
|||||||
OPENSSL_free(ne_values);
|
OPENSSL_free(ne_values);
|
||||||
if (ne_types)
|
if (ne_types)
|
||||||
OPENSSL_free(ne_types);
|
OPENSSL_free(ne_types);
|
||||||
|
if (mval)
|
||||||
|
OPENSSL_free(mval);
|
||||||
if (buf)
|
if (buf)
|
||||||
OPENSSL_free(buf);
|
OPENSSL_free(buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -2759,7 +2776,7 @@ double app_tminterval(int stop,int usertime)
|
|||||||
|
|
||||||
if (proc==NULL)
|
if (proc==NULL)
|
||||||
{
|
{
|
||||||
if (GetVersion() < 0x80000000)
|
if (check_winnt())
|
||||||
proc = OpenProcess(PROCESS_QUERY_INFORMATION,FALSE,
|
proc = OpenProcess(PROCESS_QUERY_INFORMATION,FALSE,
|
||||||
GetCurrentProcessId());
|
GetCurrentProcessId());
|
||||||
if (proc==NULL) proc = (HANDLE)-1;
|
if (proc==NULL) proc = (HANDLE)-1;
|
||||||
|
@@ -408,6 +408,7 @@ static int do_generate(BIO *bio, char *genstr, char *genconf, BUF_MEM *buf)
|
|||||||
|
|
||||||
atyp = ASN1_generate_nconf(genstr, cnf);
|
atyp = ASN1_generate_nconf(genstr, cnf);
|
||||||
NCONF_free(cnf);
|
NCONF_free(cnf);
|
||||||
|
cnf = NULL;
|
||||||
|
|
||||||
if (!atyp)
|
if (!atyp)
|
||||||
return -1;
|
return -1;
|
||||||
|
@@ -1599,12 +1599,14 @@ static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
|||||||
{
|
{
|
||||||
ok=0;
|
ok=0;
|
||||||
BIO_printf(bio_err,"Signature verification problems....\n");
|
BIO_printf(bio_err,"Signature verification problems....\n");
|
||||||
|
ERR_print_errors(bio_err);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
ok=0;
|
ok=0;
|
||||||
BIO_printf(bio_err,"Signature did not match the certificate request\n");
|
BIO_printf(bio_err,"Signature did not match the certificate request\n");
|
||||||
|
ERR_print_errors(bio_err);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2536,7 +2538,7 @@ static int get_certificate_status(const char *serial, CA_DB *db)
|
|||||||
|
|
||||||
/* Make it Upper Case */
|
/* Make it Upper Case */
|
||||||
for (i=0; row[DB_serial][i] != '\0'; i++)
|
for (i=0; row[DB_serial][i] != '\0'; i++)
|
||||||
row[DB_serial][i] = toupper(row[DB_serial][i]);
|
row[DB_serial][i] = toupper((unsigned char)row[DB_serial][i]);
|
||||||
|
|
||||||
|
|
||||||
ok=1;
|
ok=1;
|
||||||
@@ -2752,6 +2754,9 @@ char *make_revocation_str(int rev_type, char *rev_arg)
|
|||||||
|
|
||||||
revtm = X509_gmtime_adj(NULL, 0);
|
revtm = X509_gmtime_adj(NULL, 0);
|
||||||
|
|
||||||
|
if (!revtm)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
i = revtm->length + 1;
|
i = revtm->length + 1;
|
||||||
|
|
||||||
if (reason) i += strlen(reason) + 1;
|
if (reason) i += strlen(reason) + 1;
|
||||||
|
@@ -96,13 +96,7 @@ int MAIN(int argc, char **argv)
|
|||||||
char buf[512];
|
char buf[512];
|
||||||
BIO *STDout=NULL;
|
BIO *STDout=NULL;
|
||||||
|
|
||||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
|
||||||
meth=SSLv23_server_method();
|
meth=SSLv23_server_method();
|
||||||
#elif !defined(OPENSSL_NO_SSL3)
|
|
||||||
meth=SSLv3_server_method();
|
|
||||||
#elif !defined(OPENSSL_NO_SSL2)
|
|
||||||
meth=SSLv2_server_method();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
|
@@ -232,6 +232,8 @@ int MAIN(int argc, char **argv)
|
|||||||
else if (!strcmp(*args,"-camellia256"))
|
else if (!strcmp(*args,"-camellia256"))
|
||||||
cipher = EVP_camellia_256_cbc();
|
cipher = EVP_camellia_256_cbc();
|
||||||
#endif
|
#endif
|
||||||
|
else if (!strcmp (*args, "-debug_decrypt"))
|
||||||
|
flags |= CMS_DEBUG_DECRYPT;
|
||||||
else if (!strcmp (*args, "-text"))
|
else if (!strcmp (*args, "-text"))
|
||||||
flags |= CMS_TEXT;
|
flags |= CMS_TEXT;
|
||||||
else if (!strcmp (*args, "-nointern"))
|
else if (!strcmp (*args, "-nointern"))
|
||||||
@@ -618,7 +620,7 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-certsout file certificate output file\n");
|
BIO_printf (bio_err, "-certsout file certificate output file\n");
|
||||||
BIO_printf (bio_err, "-signer file signer certificate file\n");
|
BIO_printf (bio_err, "-signer file signer certificate file\n");
|
||||||
BIO_printf (bio_err, "-recip file recipient certificate file for decryption\n");
|
BIO_printf (bio_err, "-recip file recipient certificate file for decryption\n");
|
||||||
BIO_printf (bio_err, "-skeyid use subject key identifier\n");
|
BIO_printf (bio_err, "-keyid use subject key identifier\n");
|
||||||
BIO_printf (bio_err, "-in file input file\n");
|
BIO_printf (bio_err, "-in file input file\n");
|
||||||
BIO_printf (bio_err, "-inform arg input format SMIME (default), PEM or DER\n");
|
BIO_printf (bio_err, "-inform arg input format SMIME (default), PEM or DER\n");
|
||||||
BIO_printf (bio_err, "-inkey file input private key (if not signer or recipient)\n");
|
BIO_printf (bio_err, "-inkey file input private key (if not signer or recipient)\n");
|
||||||
@@ -1020,6 +1022,8 @@ int MAIN(int argc, char **argv)
|
|||||||
ret = 4;
|
ret = 4;
|
||||||
if (operation == SMIME_DECRYPT)
|
if (operation == SMIME_DECRYPT)
|
||||||
{
|
{
|
||||||
|
if (flags & CMS_DEBUG_DECRYPT)
|
||||||
|
CMS_decrypt(cms, NULL, NULL, NULL, NULL, flags);
|
||||||
|
|
||||||
if (secret_key)
|
if (secret_key)
|
||||||
{
|
{
|
||||||
|
18
apps/crl.c
18
apps/crl.c
@@ -81,6 +81,9 @@ static const 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",
|
||||||
|
#ifndef OPENSSL_NO_MD5
|
||||||
|
" -hash_old - print old-style (MD5) hash value\n",
|
||||||
|
#endif
|
||||||
" -fingerprint - print the crl fingerprint\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",
|
||||||
@@ -108,6 +111,9 @@ int MAIN(int argc, char **argv)
|
|||||||
int informat,outformat;
|
int informat,outformat;
|
||||||
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;
|
||||||
|
#ifndef OPENSSL_NO_MD5
|
||||||
|
int hash_old=0;
|
||||||
|
#endif
|
||||||
int fingerprint = 0, crlnumber = 0;
|
int fingerprint = 0, crlnumber = 0;
|
||||||
const char **pp;
|
const char **pp;
|
||||||
X509_STORE *store = NULL;
|
X509_STORE *store = NULL;
|
||||||
@@ -192,6 +198,10 @@ 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;
|
||||||
|
#ifndef OPENSSL_NO_MD5
|
||||||
|
else if (strcmp(*argv,"-hash_old") == 0)
|
||||||
|
hash_old= ++num;
|
||||||
|
#endif
|
||||||
else if (strcmp(*argv,"-nameopt") == 0)
|
else if (strcmp(*argv,"-nameopt") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -304,6 +314,14 @@ bad:
|
|||||||
BIO_printf(bio_out,"%08lx\n",
|
BIO_printf(bio_out,"%08lx\n",
|
||||||
X509_NAME_hash(X509_CRL_get_issuer(x)));
|
X509_NAME_hash(X509_CRL_get_issuer(x)));
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_MD5
|
||||||
|
if (hash_old == i)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_out,"%08lx\n",
|
||||||
|
X509_NAME_hash_old(
|
||||||
|
X509_CRL_get_issuer(x)));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (lastupdate == i)
|
if (lastupdate == i)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_out,"lastUpdate=");
|
BIO_printf(bio_out,"lastUpdate=");
|
||||||
|
@@ -141,7 +141,13 @@ int MAIN(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
if(!certflst) certflst = sk_OPENSSL_STRING_new_null();
|
if(!certflst) certflst = sk_OPENSSL_STRING_new_null();
|
||||||
sk_OPENSSL_STRING_push(certflst,*(++argv));
|
if (!certflst)
|
||||||
|
goto end;
|
||||||
|
if (!sk_OPENSSL_STRING_push(certflst,*(++argv)))
|
||||||
|
{
|
||||||
|
sk_OPENSSL_STRING_free(certflst);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -415,9 +415,9 @@ int MAIN(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if (do_verify)
|
if (do_verify)
|
||||||
r = EVP_DigestVerifyInit(mctx, &pctx, md, e, sigkey);
|
r = EVP_DigestVerifyInit(mctx, &pctx, md, NULL, sigkey);
|
||||||
else
|
else
|
||||||
r = EVP_DigestSignInit(mctx, &pctx, md, e, sigkey);
|
r = EVP_DigestSignInit(mctx, &pctx, md, NULL, sigkey);
|
||||||
if (!r)
|
if (!r)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "Error setting context\n");
|
BIO_printf(bio_err, "Error setting context\n");
|
||||||
|
@@ -332,7 +332,6 @@ bad:
|
|||||||
BIO_printf(bio_err,"This is going to take a long time\n");
|
BIO_printf(bio_err,"This is going to take a long time\n");
|
||||||
if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb))
|
if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb))
|
||||||
{
|
{
|
||||||
if(dh) DH_free(dh);
|
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
@@ -105,7 +105,7 @@
|
|||||||
* in the asn1 der encoding
|
* in the asn1 der encoding
|
||||||
* possible values: named_curve (default)
|
* possible values: named_curve (default)
|
||||||
* explicit
|
* explicit
|
||||||
* -no_seed - if 'explicit' parameters are choosen do not use the seed
|
* -no_seed - if 'explicit' parameters are chosen do not use the seed
|
||||||
* -genkey - generate ec key
|
* -genkey - generate ec key
|
||||||
* -rand file - files to use for random number input
|
* -rand file - files to use for random number input
|
||||||
* -engine e - use engine e, possibly a hardware device
|
* -engine e - use engine e, possibly a hardware device
|
||||||
@@ -286,7 +286,7 @@ bad:
|
|||||||
BIO_printf(bio_err, " "
|
BIO_printf(bio_err, " "
|
||||||
" explicit\n");
|
" explicit\n");
|
||||||
BIO_printf(bio_err, " -no_seed if 'explicit'"
|
BIO_printf(bio_err, " -no_seed if 'explicit'"
|
||||||
" parameters are choosen do not"
|
" parameters are chosen do not"
|
||||||
" use the seed\n");
|
" use the seed\n");
|
||||||
BIO_printf(bio_err, " -genkey generate ec"
|
BIO_printf(bio_err, " -genkey generate ec"
|
||||||
" key\n");
|
" key\n");
|
||||||
|
@@ -67,7 +67,9 @@
|
|||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
|
#ifndef OPENSSL_NO_COMP
|
||||||
#include <openssl/comp.h>
|
#include <openssl/comp.h>
|
||||||
|
#endif
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
int set_hex(char *in,unsigned char *out,int size);
|
int set_hex(char *in,unsigned char *out,int size);
|
||||||
@@ -393,8 +395,10 @@ bad:
|
|||||||
|
|
||||||
if (inf == NULL)
|
if (inf == NULL)
|
||||||
{
|
{
|
||||||
|
#ifndef OPENSSL_NO_SETVBUF_IONBF
|
||||||
if (bufsize != NULL)
|
if (bufsize != NULL)
|
||||||
setvbuf(stdin, (char *)NULL, _IONBF, 0);
|
setvbuf(stdin, (char *)NULL, _IONBF, 0);
|
||||||
|
#endif /* ndef OPENSSL_NO_SETVBUF_IONBF */
|
||||||
BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -447,8 +451,10 @@ bad:
|
|||||||
if (outf == NULL)
|
if (outf == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
|
#ifndef OPENSSL_NO_SETVBUF_IONBF
|
||||||
if (bufsize != NULL)
|
if (bufsize != NULL)
|
||||||
setvbuf(stdout, (char *)NULL, _IONBF, 0);
|
setvbuf(stdout, (char *)NULL, _IONBF, 0);
|
||||||
|
#endif /* ndef OPENSSL_NO_SETVBUF_IONBF */
|
||||||
#ifdef OPENSSL_SYS_VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
|
107
apps/install-apps.com
Executable file
107
apps/install-apps.com
Executable file
@@ -0,0 +1,107 @@
|
|||||||
|
$! INSTALL.COM -- Installs the files in a given directory tree
|
||||||
|
$!
|
||||||
|
$! Author: Richard Levitte <richard@levitte.org>
|
||||||
|
$! Time of creation: 22-MAY-1998 10:13
|
||||||
|
$!
|
||||||
|
$! P1 root of the directory tree
|
||||||
|
$! P2 "64" for 64-bit pointers.
|
||||||
|
$!
|
||||||
|
$!
|
||||||
|
$! Announce/identify.
|
||||||
|
$!
|
||||||
|
$ proc = f$environment( "procedure")
|
||||||
|
$ write sys$output "@@@ "+ -
|
||||||
|
f$parse( proc, , , "name")+ f$parse( proc, , , "type")
|
||||||
|
$!
|
||||||
|
$ on error then goto tidy
|
||||||
|
$ on control_c then goto tidy
|
||||||
|
$!
|
||||||
|
$ if (p1 .eqs. "")
|
||||||
|
$ then
|
||||||
|
$ write sys$output "First argument missing."
|
||||||
|
$ write sys$output -
|
||||||
|
"It should be the directory where you want things installed."
|
||||||
|
$ exit
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ if (f$getsyi("cpu") .lt. 128)
|
||||||
|
$ then
|
||||||
|
$ arch = "VAX"
|
||||||
|
$ else
|
||||||
|
$ arch = f$edit( f$getsyi( "arch_name"), "upcase")
|
||||||
|
$ if (arch .eqs. "") then arch = "UNK"
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ archd = arch
|
||||||
|
$!
|
||||||
|
$ if (p2 .nes. "")
|
||||||
|
$ then
|
||||||
|
$ if (p2 .eqs. "64")
|
||||||
|
$ then
|
||||||
|
$ archd = arch+ "_64"
|
||||||
|
$ else
|
||||||
|
$ if (p2 .nes. "32")
|
||||||
|
$ then
|
||||||
|
$ write sys$output "Second argument invalid."
|
||||||
|
$ write sys$output "It should be "32", "64", or nothing."
|
||||||
|
$ exit
|
||||||
|
$ endif
|
||||||
|
$ endif
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0"
|
||||||
|
$ root_dev = f$parse(root,,,"device","syntax_only")
|
||||||
|
$ root_dir = f$parse(root,,,"directory","syntax_only") - -
|
||||||
|
"[000000." - "][" - "[" - "]"
|
||||||
|
$ root = root_dev + "[" + root_dir
|
||||||
|
$!
|
||||||
|
$ define /nolog wrk_sslroot 'root'.] /trans=conc
|
||||||
|
$ define /nolog wrk_sslxexe wrk_sslroot:['archd'_exe]
|
||||||
|
$!
|
||||||
|
$ if f$parse("wrk_sslroot:[000000]") .eqs. "" then -
|
||||||
|
create /directory /log wrk_sslroot:[000000]
|
||||||
|
$ if f$parse("wrk_sslxexe:") .eqs. "" then -
|
||||||
|
create /directory /log wrk_sslxexe:
|
||||||
|
$!
|
||||||
|
$ exe := openssl
|
||||||
|
$!
|
||||||
|
$ exe_dir := [-.'archd'.exe.apps]
|
||||||
|
$!
|
||||||
|
$! Executables.
|
||||||
|
$!
|
||||||
|
$ i = 0
|
||||||
|
$ loop_exe:
|
||||||
|
$ e = f$edit(f$element( i, ",", exe), "trim")
|
||||||
|
$ i = i + 1
|
||||||
|
$ if e .eqs. "," then goto loop_exe_end
|
||||||
|
$ set noon
|
||||||
|
$ file = exe_dir+ e+ ".exe"
|
||||||
|
$ if f$search( file) .nes. ""
|
||||||
|
$ then
|
||||||
|
$ copy /protection = w:re 'file' wrk_sslxexe: /log
|
||||||
|
$ endif
|
||||||
|
$ set on
|
||||||
|
$ goto loop_exe
|
||||||
|
$ loop_exe_end:
|
||||||
|
$!
|
||||||
|
$! Miscellaneous.
|
||||||
|
$!
|
||||||
|
$ set noon
|
||||||
|
$ copy /protection = w:re ca.com wrk_sslxexe:ca.com /log
|
||||||
|
$ copy /protection = w:re openssl-vms.cnf wrk_sslroot:[000000]openssl.cnf /log
|
||||||
|
$ set on
|
||||||
|
$!
|
||||||
|
$ tidy:
|
||||||
|
$!
|
||||||
|
$ call deass wrk_sslroot
|
||||||
|
$ call deass wrk_sslxexe
|
||||||
|
$!
|
||||||
|
$ exit
|
||||||
|
$!
|
||||||
|
$ deass: subroutine
|
||||||
|
$ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "")
|
||||||
|
$ then
|
||||||
|
$ deassign /process 'p1'
|
||||||
|
$ endif
|
||||||
|
$ endsubroutine
|
||||||
|
$!
|
@@ -1,65 +0,0 @@
|
|||||||
$! INSTALL.COM -- Installs the files in a given directory tree
|
|
||||||
$!
|
|
||||||
$! Author: Richard Levitte <richard@levitte.org>
|
|
||||||
$! Time of creation: 22-MAY-1998 10:13
|
|
||||||
$!
|
|
||||||
$! P1 root of the directory tree
|
|
||||||
$!
|
|
||||||
$
|
|
||||||
$ IF P1 .EQS. ""
|
|
||||||
$ THEN
|
|
||||||
$ WRITE SYS$OUTPUT "First argument missing."
|
|
||||||
$ WRITE SYS$OUTPUT -
|
|
||||||
"Should be the directory where you want things installed."
|
|
||||||
$ EXIT
|
|
||||||
$ ENDIF
|
|
||||||
$
|
|
||||||
$ IF (F$GETSYI("CPU").LT.128)
|
|
||||||
$ THEN
|
|
||||||
$ ARCH := VAX
|
|
||||||
$ ELSE
|
|
||||||
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
|
|
||||||
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
|
|
||||||
$ ENDIF
|
|
||||||
$
|
|
||||||
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
|
|
||||||
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
|
|
||||||
$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
|
|
||||||
- "[000000." - "][" - "[" - "]"
|
|
||||||
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
|
|
||||||
$
|
|
||||||
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
|
|
||||||
$ DEFINE/NOLOG WRK_SSLEXE WRK_SSLROOT:['ARCH'_EXE]
|
|
||||||
$
|
|
||||||
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
|
|
||||||
CREATE/DIR/LOG WRK_SSLROOT:[000000]
|
|
||||||
$ IF F$PARSE("WRK_SSLEXE:") .EQS. "" THEN -
|
|
||||||
CREATE/DIR/LOG WRK_SSLEXE:
|
|
||||||
$
|
|
||||||
$ EXE := openssl
|
|
||||||
$
|
|
||||||
$ EXE_DIR := [-.'ARCH'.EXE.APPS]
|
|
||||||
$
|
|
||||||
$ I = 0
|
|
||||||
$ LOOP_EXE:
|
|
||||||
$ E = F$EDIT(F$ELEMENT(I, ",", EXE),"TRIM")
|
|
||||||
$ I = I + 1
|
|
||||||
$ IF E .EQS. "," THEN GOTO LOOP_EXE_END
|
|
||||||
$ SET NOON
|
|
||||||
$ IF F$SEARCH(EXE_DIR+E+".EXE") .NES. ""
|
|
||||||
$ THEN
|
|
||||||
$ COPY 'EXE_DIR''E'.EXE WRK_SSLEXE:'E'.EXE/log
|
|
||||||
$ SET FILE/PROT=W:RE WRK_SSLEXE:'E'.EXE
|
|
||||||
$ ENDIF
|
|
||||||
$ SET ON
|
|
||||||
$ GOTO LOOP_EXE
|
|
||||||
$ LOOP_EXE_END:
|
|
||||||
$
|
|
||||||
$ SET NOON
|
|
||||||
$ COPY CA.COM WRK_SSLEXE:CA.COM/LOG
|
|
||||||
$ SET FILE/PROT=W:RE WRK_SSLEXE:CA.COM
|
|
||||||
$ COPY OPENSSL-VMS.CNF WRK_SSLROOT:[000000]OPENSSL.CNF/LOG
|
|
||||||
$ SET FILE/PROT=W:R WRK_SSLROOT:[000000]OPENSSL.CNF
|
|
||||||
$ SET ON
|
|
||||||
$
|
|
||||||
$ EXIT
|
|
@@ -39,11 +39,35 @@ $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
|
|||||||
$!
|
$!
|
||||||
$! P5, if defined, sets a choice of programs to compile.
|
$! P5, if defined, sets a choice of programs to compile.
|
||||||
$!
|
$!
|
||||||
|
$! P6, if defined, specifies the C pointer size. Ignored on VAX.
|
||||||
|
$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
|
||||||
|
$! Supported values are:
|
||||||
|
$!
|
||||||
|
$! "" Compile with default (/NOPOINTER_SIZE)
|
||||||
|
$! 32 Compile with /POINTER_SIZE=32 (SHORT)
|
||||||
|
$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
|
||||||
|
$! (Automatically select ARGV if compiler supports it.)
|
||||||
|
$! 64= Compile with /POINTER_SIZE=64 (LONG).
|
||||||
|
$! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
|
||||||
|
$!
|
||||||
|
$! P7, if defined, specifies a directory where ZLIB files (zlib.h,
|
||||||
|
$! libz.olb) may be found. Optionally, a non-default object library
|
||||||
|
$! name may be included ("dev:[dir]libz_64.olb", for example).
|
||||||
|
$!
|
||||||
|
$!
|
||||||
|
$! Announce/identify.
|
||||||
|
$!
|
||||||
|
$ proc = f$environment( "procedure")
|
||||||
|
$ write sys$output "@@@ "+ -
|
||||||
|
f$parse( proc, , , "name")+ f$parse( proc, , , "type")
|
||||||
|
$!
|
||||||
|
$ on control_c then goto exit
|
||||||
$!
|
$!
|
||||||
$! Define A TCP/IP Library That We Will Need To Link To.
|
$! Define A TCP/IP Library That We Will Need To Link To.
|
||||||
$! (That Is, If We Need To Link To One.)
|
$! (That Is, If We Need To Link To One.)
|
||||||
$!
|
$!
|
||||||
$ TCPIP_LIB = ""
|
$ TCPIP_LIB = ""
|
||||||
|
$ ZLIB_LIB = ""
|
||||||
$!
|
$!
|
||||||
$! Check What Architecture We Are Using.
|
$! Check What Architecture We Are Using.
|
||||||
$!
|
$!
|
||||||
@@ -67,37 +91,53 @@ $! End The Architecture Check.
|
|||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
|
$ ARCHD = ARCH
|
||||||
|
$ LIB32 = "32"
|
||||||
|
$ OPT_FILE = ""
|
||||||
|
$ POINTER_SIZE = ""
|
||||||
|
$!
|
||||||
$! Define what programs should be compiled
|
$! Define what programs should be compiled
|
||||||
$!
|
$!
|
||||||
$ PROGRAMS := OPENSSL
|
$ PROGRAMS := OPENSSL
|
||||||
$!
|
$!
|
||||||
$! Define The CRYPTO Library.
|
|
||||||
$!
|
|
||||||
$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
|
|
||||||
$!
|
|
||||||
$! Define The SSL Library.
|
|
||||||
$!
|
|
||||||
$ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB
|
|
||||||
$!
|
|
||||||
$! Define The OBJ Directory.
|
|
||||||
$!
|
|
||||||
$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.APPS]
|
|
||||||
$!
|
|
||||||
$! Define The EXE Directory.
|
|
||||||
$!
|
|
||||||
$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.APPS]
|
|
||||||
$!
|
|
||||||
$! Check To Make Sure We Have Valid Command Line Parameters.
|
$! Check To Make Sure We Have Valid Command Line Parameters.
|
||||||
$!
|
$!
|
||||||
$ GOSUB CHECK_OPTIONS
|
$ GOSUB CHECK_OPTIONS
|
||||||
$!
|
$!
|
||||||
|
$! Define The CRYPTO Library.
|
||||||
|
$!
|
||||||
|
$ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB
|
||||||
|
$!
|
||||||
|
$! Define The SSL Library.
|
||||||
|
$!
|
||||||
|
$ SSL_LIB := SYS$DISK:[-.'ARCHD'.EXE.SSL]SSL_LIBSSL'LIB32'.OLB
|
||||||
|
$!
|
||||||
|
$! Define The OBJ and EXE Directories.
|
||||||
|
$!
|
||||||
|
$ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.APPS]
|
||||||
|
$ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.APPS]
|
||||||
|
$!
|
||||||
|
$! Specify the destination directory in any /MAP option.
|
||||||
|
$!
|
||||||
|
$ if (LINKMAP .eqs. "MAP")
|
||||||
|
$ then
|
||||||
|
$ LINKMAP = LINKMAP+ "=''EXE_DIR'"
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$! Add the location prefix to the linker options file name.
|
||||||
|
$!
|
||||||
|
$ if (OPT_FILE .nes. "")
|
||||||
|
$ then
|
||||||
|
$ OPT_FILE = EXE_DIR+ OPT_FILE
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
$! Initialise logical names and such
|
$! Initialise logical names and such
|
||||||
$!
|
$!
|
||||||
$ GOSUB INITIALISE
|
$ GOSUB INITIALISE
|
||||||
$!
|
$!
|
||||||
$! Tell The User What Kind of Machine We Run On.
|
$! Tell The User What Kind of Machine We Run On.
|
||||||
$!
|
$!
|
||||||
$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
|
$ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'"
|
||||||
$!
|
$!
|
||||||
$! Check To See If The OBJ Directory Exists.
|
$! Check To See If The OBJ Directory Exists.
|
||||||
$!
|
$!
|
||||||
@@ -145,6 +185,9 @@ $ LIB_OPENSSL = "VERIFY,ASN1PARS,REQ,DGST,DH,DHPARAM,ENC,PASSWD,GENDH,ERRSTR,"+-
|
|||||||
"S_TIME,APPS,S_CB,S_SOCKET,APP_RAND,VERSION,SESS_ID,"+-
|
"S_TIME,APPS,S_CB,S_SOCKET,APP_RAND,VERSION,SESS_ID,"+-
|
||||||
"CIPHERS,NSEQ,PKCS12,PKCS8,PKEY,PKEYPARAM,PKEYUTL,"+ -
|
"CIPHERS,NSEQ,PKCS12,PKCS8,PKEY,PKEYPARAM,PKEYUTL,"+ -
|
||||||
"SPKAC,SMIME,CMS,RAND,ENGINE,OCSP,PRIME,TS"
|
"SPKAC,SMIME,CMS,RAND,ENGINE,OCSP,PRIME,TS"
|
||||||
|
$!
|
||||||
|
$ LIB_OPENSSL = LIB_OPENSSL+ ",VMS_DECC_INIT"
|
||||||
|
$!
|
||||||
$ TCPIP_PROGRAMS = ",,"
|
$ TCPIP_PROGRAMS = ",,"
|
||||||
$ IF COMPILER .EQS. "VAXC" THEN -
|
$ IF COMPILER .EQS. "VAXC" THEN -
|
||||||
TCPIP_PROGRAMS = ",OPENSSL,"
|
TCPIP_PROGRAMS = ",OPENSSL,"
|
||||||
@@ -202,7 +245,7 @@ $ LIB_COUNTER = -1
|
|||||||
$!
|
$!
|
||||||
$! Create a .OPT file for the object files
|
$! Create a .OPT file for the object files
|
||||||
$!
|
$!
|
||||||
$ OPEN/WRITE OBJECTS 'EXE_DIR''CURRENT_APP'.OPT
|
$ OPEN /WRITE OBJECTS 'EXE_DIR''CURRENT_APP'.OPT
|
||||||
$!
|
$!
|
||||||
$! Top Of The File Loop.
|
$! Top Of The File Loop.
|
||||||
$!
|
$!
|
||||||
@@ -289,34 +332,18 @@ $ GOTO NEXT_APP
|
|||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! Link The Program.
|
$! Link The Program.
|
||||||
$! Check To See If We Are To Link With A Specific TCP/IP Library.
|
|
||||||
$!
|
$!
|
||||||
$ ON WARNING THEN GOTO NEXT_APP
|
$ ON WARNING THEN GOTO NEXT_APP
|
||||||
$!
|
$!
|
||||||
$ IF (TCPIP_LIB.NES."")
|
|
||||||
$ THEN
|
|
||||||
$!
|
|
||||||
$! Don't Link With The RSAREF Routines And TCP/IP Library.
|
$! Don't Link With The RSAREF Routines And TCP/IP Library.
|
||||||
$!
|
$!
|
||||||
$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
|
$ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXE='EXE_FILE' -
|
||||||
'EXE_DIR''CURRENT_APP'.OPT/OPTION, -
|
'EXE_DIR''CURRENT_APP'.OPT /OPTIONS, -
|
||||||
'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
|
'SSL_LIB' /LIBRARY, -
|
||||||
'TCPIP_LIB','OPT_FILE'/OPTION
|
'CRYPTO_LIB' /LIBRARY -
|
||||||
$!
|
'TCPIP_LIB' -
|
||||||
$! Else...
|
'ZLIB_LIB' -
|
||||||
$!
|
,'OPT_FILE' /OPTIONS
|
||||||
$ ELSE
|
|
||||||
$!
|
|
||||||
$! Don't Link With The RSAREF Routines And Link With A TCP/IP Library.
|
|
||||||
$!
|
|
||||||
$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
|
|
||||||
'EXE_DIR''CURRENT_APP'.OPT/OPTION, -
|
|
||||||
'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
|
|
||||||
'OPT_FILE'/OPTION
|
|
||||||
$!
|
|
||||||
$! End The TCP/IP Library Check.
|
|
||||||
$!
|
|
||||||
$ ENDIF
|
|
||||||
$!
|
$!
|
||||||
$! Go Back And Do It Again.
|
$! Go Back And Do It Again.
|
||||||
$!
|
$!
|
||||||
@@ -351,7 +378,7 @@ $!
|
|||||||
$ CREATE 'OPT_FILE'
|
$ CREATE 'OPT_FILE'
|
||||||
$DECK
|
$DECK
|
||||||
!
|
!
|
||||||
! Default System Options File To Link Agianst
|
! Default System Options File To Link Against
|
||||||
! The Sharable VAX C Runtime Library.
|
! The Sharable VAX C Runtime Library.
|
||||||
!
|
!
|
||||||
SYS$SHARE:VAXCRTL.EXE/SHARE
|
SYS$SHARE:VAXCRTL.EXE/SHARE
|
||||||
@@ -380,7 +407,7 @@ $!
|
|||||||
$ CREATE 'OPT_FILE'
|
$ CREATE 'OPT_FILE'
|
||||||
$DECK
|
$DECK
|
||||||
!
|
!
|
||||||
! Default System Options File To Link Agianst
|
! Default System Options File To Link Against
|
||||||
! The Sharable C Runtime Library.
|
! The Sharable C Runtime Library.
|
||||||
!
|
!
|
||||||
GNU_CC:[000000]GCCLIB/LIBRARY
|
GNU_CC:[000000]GCCLIB/LIBRARY
|
||||||
@@ -415,7 +442,7 @@ $!
|
|||||||
$ CREATE 'OPT_FILE'
|
$ CREATE 'OPT_FILE'
|
||||||
$DECK
|
$DECK
|
||||||
!
|
!
|
||||||
! Default System Options File To Link Agianst
|
! Default System Options File To Link Against
|
||||||
! The Sharable DEC C Runtime Library.
|
! The Sharable DEC C Runtime Library.
|
||||||
!
|
!
|
||||||
SYS$SHARE:DECC$SHR.EXE/SHARE
|
SYS$SHARE:DECC$SHR.EXE/SHARE
|
||||||
@@ -430,7 +457,7 @@ $!
|
|||||||
$ CREATE 'OPT_FILE'
|
$ CREATE 'OPT_FILE'
|
||||||
$DECK
|
$DECK
|
||||||
!
|
!
|
||||||
! Default System Options File For non-VAX To Link Agianst
|
! Default System Options File For non-VAX To Link Against
|
||||||
! The Sharable C Runtime Library.
|
! The Sharable C Runtime Library.
|
||||||
!
|
!
|
||||||
SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
|
SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
|
||||||
@@ -514,14 +541,15 @@ $!
|
|||||||
$ IF (P1.EQS."NODEBUG")
|
$ IF (P1.EQS."NODEBUG")
|
||||||
$ THEN
|
$ THEN
|
||||||
$!
|
$!
|
||||||
$! P1 Is NODEBUG, So Compile Without Debugger Information.
|
$! P1 Is NODEBUG, So Compile Without Debugger Information.
|
||||||
$!
|
$!
|
||||||
$ DEBUGGER = "NODEBUG"
|
$ DEBUGGER = "NODEBUG"
|
||||||
$ TRACEBACK = "NOTRACEBACK"
|
$ LINKMAP = "NOMAP"
|
||||||
$ GCC_OPTIMIZE = "OPTIMIZE"
|
$ TRACEBACK = "NOTRACEBACK"
|
||||||
$ CC_OPTIMIZE = "OPTIMIZE"
|
$ GCC_OPTIMIZE = "OPTIMIZE"
|
||||||
$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
|
$ CC_OPTIMIZE = "OPTIMIZE"
|
||||||
$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
|
$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
|
||||||
|
$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
|
||||||
$!
|
$!
|
||||||
$! Else...
|
$! Else...
|
||||||
$!
|
$!
|
||||||
@@ -535,6 +563,7 @@ $!
|
|||||||
$! Compile With Debugger Information.
|
$! Compile With Debugger Information.
|
||||||
$!
|
$!
|
||||||
$ DEBUGGER = "DEBUG"
|
$ DEBUGGER = "DEBUG"
|
||||||
|
$ LINKMAP = "MAP"
|
||||||
$ TRACEBACK = "TRACEBACK"
|
$ TRACEBACK = "TRACEBACK"
|
||||||
$ GCC_OPTIMIZE = "NOOPTIMIZE"
|
$ GCC_OPTIMIZE = "NOOPTIMIZE"
|
||||||
$ CC_OPTIMIZE = "NOOPTIMIZE"
|
$ CC_OPTIMIZE = "NOOPTIMIZE"
|
||||||
@@ -542,7 +571,7 @@ $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
|
|||||||
$ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
|
$ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
|
||||||
$ ELSE
|
$ ELSE
|
||||||
$!
|
$!
|
||||||
$! 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 ",P1," Is Invalid. The Valid Options Are:"
|
$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
|
||||||
@@ -563,6 +592,87 @@ $! End The P1 Check.
|
|||||||
$!
|
$!
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
|
$! Check P6 (POINTER_SIZE).
|
||||||
|
$!
|
||||||
|
$ IF (P6 .NES. "") .AND. (ARCH .NES. "VAX")
|
||||||
|
$ THEN
|
||||||
|
$!
|
||||||
|
$ IF (P6 .EQS. "32")
|
||||||
|
$ THEN
|
||||||
|
$ POINTER_SIZE = " /POINTER_SIZE=32"
|
||||||
|
$ ELSE
|
||||||
|
$ POINTER_SIZE = F$EDIT( P6, "COLLAPSE, UPCASE")
|
||||||
|
$ IF ((POINTER_SIZE .EQS. "64") .OR. -
|
||||||
|
(POINTER_SIZE .EQS. "64=") .OR. -
|
||||||
|
(POINTER_SIZE .EQS. "64=ARGV"))
|
||||||
|
$ THEN
|
||||||
|
$ ARCHD = ARCH+ "_64"
|
||||||
|
$ LIB32 = ""
|
||||||
|
$ IF (F$EXTRACT( 2, 1, POINTER_SIZE) .EQS. "=")
|
||||||
|
$ THEN
|
||||||
|
$! Explicit user choice: "64" or "64=ARGV".
|
||||||
|
$ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64"
|
||||||
|
$ ELSE
|
||||||
|
$ SET NOON
|
||||||
|
$ DEFINE /USER_MODE SYS$OUTPUT NL:
|
||||||
|
$ DEFINE /USER_MODE SYS$ERROR NL:
|
||||||
|
$ CC /NOLIST /NOOBJECT /POINTER_SIZE=64=ARGV NL:
|
||||||
|
$ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000
|
||||||
|
$ THEN
|
||||||
|
$ ! If we got here, it means DCL complained like this:
|
||||||
|
$ ! %DCL-W-NOVALU, value not allowed - remove value specification
|
||||||
|
$ ! \64=\
|
||||||
|
$ !
|
||||||
|
$ ! If the compiler was run, logicals defined in /USER would
|
||||||
|
$ ! have been deassigned automatically. However, when DCL
|
||||||
|
$ ! complains, they aren't, so we do it here (it might be
|
||||||
|
$ ! unnecessary, but just in case there will be another error
|
||||||
|
$ ! message further on that we don't want to miss)
|
||||||
|
$ DEASSIGN /USER_MODE SYS$ERROR
|
||||||
|
$ DEASSIGN /USER_MODE SYS$OUTPUT
|
||||||
|
$ ELSE
|
||||||
|
$ POINTER_SIZE = POINTER_SIZE + "=ARGV"
|
||||||
|
$ ENDIF
|
||||||
|
$ SET ON
|
||||||
|
$ ENDIF
|
||||||
|
$ POINTER_SIZE = " /POINTER_SIZE=''POINTER_SIZE'"
|
||||||
|
$!
|
||||||
|
$ ELSE
|
||||||
|
$!
|
||||||
|
$! Tell The User Entered An Invalid Option.
|
||||||
|
$!
|
||||||
|
$ WRITE SYS$OUTPUT ""
|
||||||
|
$ WRITE SYS$OUTPUT "The Option ", P6, -
|
||||||
|
" Is Invalid. The Valid Options Are:"
|
||||||
|
$ WRITE SYS$OUTPUT ""
|
||||||
|
$ WRITE SYS$OUTPUT -
|
||||||
|
" """" : Compile with default (short) pointers."
|
||||||
|
$ WRITE SYS$OUTPUT -
|
||||||
|
" 32 : Compile with 32-bit (short) pointers."
|
||||||
|
$ WRITE SYS$OUTPUT -
|
||||||
|
" 64 : Compile with 64-bit (long) pointers (auto ARGV)."
|
||||||
|
$ WRITE SYS$OUTPUT -
|
||||||
|
" 64= : Compile with 64-bit (long) pointers (no ARGV)."
|
||||||
|
$ WRITE SYS$OUTPUT -
|
||||||
|
" 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
|
||||||
|
$ WRITE SYS$OUTPUT ""
|
||||||
|
$!
|
||||||
|
$! Time To EXIT.
|
||||||
|
$!
|
||||||
|
$ EXIT
|
||||||
|
$!
|
||||||
|
$ ENDIF
|
||||||
|
$!
|
||||||
|
$ ENDIF
|
||||||
|
$!
|
||||||
|
$! End The P6 (POINTER_SIZE) Check.
|
||||||
|
$!
|
||||||
|
$ ENDIF
|
||||||
|
$!
|
||||||
|
$! Set basic C compiler /INCLUDE directories.
|
||||||
|
$!
|
||||||
|
$ CC_INCLUDES = "SYS$DISK:[-],SYS$DISK:[-.CRYPTO]"
|
||||||
|
$!
|
||||||
$! Check To See If P2 Is Blank.
|
$! Check To See If P2 Is Blank.
|
||||||
$!
|
$!
|
||||||
$ IF (P2.EQS."")
|
$ IF (P2.EQS."")
|
||||||
@@ -663,11 +773,67 @@ $ CCDEFS = "MONOLITH"
|
|||||||
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
|
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
|
||||||
$ CCEXTRAFLAGS = ""
|
$ CCEXTRAFLAGS = ""
|
||||||
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
|
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
|
||||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
|
$ CCDISABLEWARNINGS = "" !!! "MAYLOSEDATA3" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
|
||||||
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
|
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. ""
|
||||||
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
|
$ THEN
|
||||||
|
$ IF CCDISABLEWARNINGS .NES. "" THEN CCDISABLEWARNINGS = CCDISABLEWARNINGS + ","
|
||||||
|
$ CCDISABLEWARNINGS = CCDISABLEWARNINGS + USER_CCDISABLEWARNINGS
|
||||||
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! Check To See If The User Entered A Valid Paramter.
|
$! Check To See If We Have A ZLIB Option.
|
||||||
|
$!
|
||||||
|
$ ZLIB = P7
|
||||||
|
$ IF (ZLIB .NES. "")
|
||||||
|
$ THEN
|
||||||
|
$!
|
||||||
|
$! Check for expected ZLIB files.
|
||||||
|
$!
|
||||||
|
$ err = 0
|
||||||
|
$ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
|
||||||
|
$ if (f$search( file1) .eqs. "")
|
||||||
|
$ then
|
||||||
|
$ WRITE SYS$OUTPUT ""
|
||||||
|
$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
|
||||||
|
$ WRITE SYS$OUTPUT " Can't find header: ''file1'"
|
||||||
|
$ err = 1
|
||||||
|
$ endif
|
||||||
|
$ file1 = f$parse( "A.;", ZLIB)- "A.;"
|
||||||
|
$!
|
||||||
|
$ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
|
||||||
|
$ if (f$search( file2) .eqs. "")
|
||||||
|
$ then
|
||||||
|
$ if (err .eq. 0)
|
||||||
|
$ then
|
||||||
|
$ WRITE SYS$OUTPUT ""
|
||||||
|
$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
|
||||||
|
$ endif
|
||||||
|
$ WRITE SYS$OUTPUT " Can't find library: ''file2'"
|
||||||
|
$ WRITE SYS$OUTPUT ""
|
||||||
|
$ err = err+ 2
|
||||||
|
$ endif
|
||||||
|
$ if (err .eq. 1)
|
||||||
|
$ then
|
||||||
|
$ WRITE SYS$OUTPUT ""
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ if (err .ne. 0)
|
||||||
|
$ then
|
||||||
|
$ EXIT
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$ CCDEFS = """ZLIB=1"", "+ CCDEFS
|
||||||
|
$ CC_INCLUDES = CC_INCLUDES+ ", "+ file1
|
||||||
|
$ ZLIB_LIB = ", ''file2' /library"
|
||||||
|
$!
|
||||||
|
$! Print info
|
||||||
|
$!
|
||||||
|
$ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
|
||||||
|
$!
|
||||||
|
$! End The ZLIB Check.
|
||||||
|
$!
|
||||||
|
$ ENDIF
|
||||||
|
$!
|
||||||
|
$! Check To See If The User Entered A Valid Parameter.
|
||||||
$!
|
$!
|
||||||
$ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC")
|
$ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC")
|
||||||
$ THEN
|
$ THEN
|
||||||
@@ -690,13 +856,13 @@ $!
|
|||||||
$ CC = "CC"
|
$ CC = "CC"
|
||||||
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
|
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
|
||||||
THEN CC = "CC/DECC"
|
THEN CC = "CC/DECC"
|
||||||
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
|
$ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
|
||||||
"/NOLIST/PREFIX=ALL" + -
|
"''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
|
||||||
"/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS
|
" /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS
|
||||||
$!
|
$!
|
||||||
$! Define The Linker Options File Name.
|
$! Define The Linker Options File Name.
|
||||||
$!
|
$!
|
||||||
$ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT"
|
$ OPT_FILE = "VAX_DECC_OPTIONS.OPT"
|
||||||
$!
|
$!
|
||||||
$! End DECC Check.
|
$! End DECC Check.
|
||||||
$!
|
$!
|
||||||
@@ -724,7 +890,7 @@ $ EXIT
|
|||||||
$ ENDIF
|
$ ENDIF
|
||||||
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
|
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
|
||||||
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
||||||
"/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS
|
"/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
|
||||||
$ CCDEFS = CCDEFS + ",""VAXC"""
|
$ CCDEFS = CCDEFS + ",""VAXC"""
|
||||||
$!
|
$!
|
||||||
$! Define <sys> As SYS$COMMON:[SYSLIB]
|
$! Define <sys> As SYS$COMMON:[SYSLIB]
|
||||||
@@ -733,7 +899,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
|
|||||||
$!
|
$!
|
||||||
$! Define The Linker Options File Name.
|
$! Define The Linker Options File Name.
|
||||||
$!
|
$!
|
||||||
$ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT"
|
$ OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
|
||||||
$!
|
$!
|
||||||
$! End VAXC Check
|
$! End VAXC Check
|
||||||
$!
|
$!
|
||||||
@@ -756,11 +922,11 @@ $! Use GNU C...
|
|||||||
$!
|
$!
|
||||||
$ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC
|
$ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC
|
||||||
$ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
$ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
||||||
"/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS
|
"/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
|
||||||
$!
|
$!
|
||||||
$! Define The Linker Options File Name.
|
$! Define The Linker Options File Name.
|
||||||
$!
|
$!
|
||||||
$ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT"
|
$ OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
|
||||||
$!
|
$!
|
||||||
$! End The GNU C Check.
|
$! End The GNU C Check.
|
||||||
$!
|
$!
|
||||||
@@ -802,7 +968,7 @@ $ THEN
|
|||||||
$!
|
$!
|
||||||
$! Set the library to use SOCKETSHR
|
$! Set the library to use SOCKETSHR
|
||||||
$!
|
$!
|
||||||
$ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT"
|
$ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
|
||||||
$!
|
$!
|
||||||
$! Done with SOCKETSHR
|
$! Done with SOCKETSHR
|
||||||
$!
|
$!
|
||||||
@@ -828,13 +994,13 @@ $ THEN
|
|||||||
$!
|
$!
|
||||||
$! Set the library to use UCX.
|
$! Set the library to use UCX.
|
||||||
$!
|
$!
|
||||||
$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT"
|
$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
|
||||||
$ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
|
$ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
|
||||||
$ THEN
|
$ THEN
|
||||||
$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT"
|
$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
|
||||||
$ ELSE
|
$ ELSE
|
||||||
$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
|
$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
|
||||||
TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT"
|
TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$!
|
$!
|
||||||
$! Done with UCX
|
$! Done with UCX
|
||||||
@@ -848,7 +1014,7 @@ $ THEN
|
|||||||
$!
|
$!
|
||||||
$! Set the library to use TCPIP.
|
$! Set the library to use TCPIP.
|
||||||
$!
|
$!
|
||||||
$ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT"
|
$ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
|
||||||
$!
|
$!
|
||||||
$! Done with TCPIP
|
$! Done with TCPIP
|
||||||
$!
|
$!
|
||||||
@@ -873,7 +1039,7 @@ $ CCDEFS = CCDEFS + ",TCPIP_TYPE_''P3'"
|
|||||||
$!
|
$!
|
||||||
$! Print info
|
$! Print info
|
||||||
$!
|
$!
|
||||||
$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
|
$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
|
||||||
$!
|
$!
|
||||||
$! Else The User Entered An Invalid Argument.
|
$! Else The User Entered An Invalid Argument.
|
||||||
$!
|
$!
|
||||||
@@ -901,15 +1067,27 @@ $! Finish up the definition of CC.
|
|||||||
$!
|
$!
|
||||||
$ IF COMPILER .EQS. "DECC"
|
$ IF COMPILER .EQS. "DECC"
|
||||||
$ THEN
|
$ THEN
|
||||||
|
$! Not all compiler versions support MAYLOSEDATA3.
|
||||||
|
$ OPT_TEST = "MAYLOSEDATA3"
|
||||||
|
$ DEFINE /USER_MODE SYS$ERROR NL:
|
||||||
|
$ DEFINE /USER_MODE SYS$OUTPUT NL:
|
||||||
|
$ 'CC' /NOCROSS_REFERENCE /NOLIST /NOOBJECT -
|
||||||
|
/WARNINGS = DISABLE = ('OPT_TEST', EMPTYFILE) NL:
|
||||||
|
$ IF ($SEVERITY)
|
||||||
|
$ THEN
|
||||||
|
$ IF CCDISABLEWARNINGS .NES. "" THEN -
|
||||||
|
CCDISABLEWARNINGS = CCDISABLEWARNINGS+ ","
|
||||||
|
$ CCDISABLEWARNINGS = CCDISABLEWARNINGS+ OPT_TEST
|
||||||
|
$ ENDIF
|
||||||
$ IF CCDISABLEWARNINGS .NES. ""
|
$ IF CCDISABLEWARNINGS .NES. ""
|
||||||
$ THEN
|
$ THEN
|
||||||
$ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
|
$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$ ELSE
|
$ ELSE
|
||||||
$ CCDISABLEWARNINGS = ""
|
$ CCDISABLEWARNINGS = ""
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$ CC2 = CC + "/DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS
|
$ CC2 = CC + " /DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS
|
||||||
$ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
|
$ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
|
||||||
$!
|
$!
|
||||||
$! Show user the result
|
$! Show user the result
|
||||||
$!
|
$!
|
||||||
@@ -975,7 +1153,7 @@ $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
|
|||||||
$!
|
$!
|
||||||
$! Set up the logical name OPENSSL to point at the include directory
|
$! Set up the logical name OPENSSL to point at the include directory
|
||||||
$!
|
$!
|
||||||
$ DEFINE OPENSSL/NOLOG '__INCLUDE'
|
$ DEFINE OPENSSL /NOLOG '__INCLUDE'
|
||||||
$!
|
$!
|
||||||
$! Done
|
$! Done
|
||||||
$!
|
$!
|
||||||
@@ -983,15 +1161,24 @@ $ RETURN
|
|||||||
$!
|
$!
|
||||||
$ CLEANUP:
|
$ CLEANUP:
|
||||||
$!
|
$!
|
||||||
$! Restore the logical name OPENSSL if it had a value
|
$! Restore the saved logical name OPENSSL, if it had a value.
|
||||||
$!
|
$!
|
||||||
$ IF __SAVE_OPENSSL .EQS. ""
|
$ if (f$type( __SAVE_OPENSSL) .nes. "")
|
||||||
$ THEN
|
$ then
|
||||||
$ DEASSIGN OPENSSL
|
$ IF __SAVE_OPENSSL .EQS. ""
|
||||||
$ ELSE
|
$ THEN
|
||||||
$ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL'
|
$ DEASSIGN OPENSSL
|
||||||
$ ENDIF
|
$ ELSE
|
||||||
|
$ DEFINE /NOLOG OPENSSL '__SAVE_OPENSSL'
|
||||||
|
$ ENDIF
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$! Close any open files.
|
||||||
|
$!
|
||||||
|
$ if (f$trnlnm( "objects", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
|
||||||
|
close objects
|
||||||
$!
|
$!
|
||||||
$! Done
|
$! Done
|
||||||
$!
|
$!
|
||||||
$ RETURN
|
$ RETURN
|
||||||
|
$!
|
||||||
|
113
apps/ocsp.c
113
apps/ocsp.c
@@ -127,6 +127,7 @@ int MAIN(int argc, char **argv)
|
|||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
char **args;
|
char **args;
|
||||||
char *host = NULL, *port = NULL, *path = "/";
|
char *host = NULL, *port = NULL, *path = "/";
|
||||||
|
char *thost = NULL, *tport = NULL, *tpath = NULL;
|
||||||
char *reqin = NULL, *respin = NULL;
|
char *reqin = NULL, *respin = NULL;
|
||||||
char *reqout = NULL, *respout = NULL;
|
char *reqout = NULL, *respout = NULL;
|
||||||
char *signfile = NULL, *keyfile = NULL;
|
char *signfile = NULL, *keyfile = NULL;
|
||||||
@@ -204,6 +205,12 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
else if (!strcmp(*args, "-url"))
|
else if (!strcmp(*args, "-url"))
|
||||||
{
|
{
|
||||||
|
if (thost)
|
||||||
|
OPENSSL_free(thost);
|
||||||
|
if (tport)
|
||||||
|
OPENSSL_free(tport);
|
||||||
|
if (tpath)
|
||||||
|
OPENSSL_free(tpath);
|
||||||
if (args[1])
|
if (args[1])
|
||||||
{
|
{
|
||||||
args++;
|
args++;
|
||||||
@@ -212,6 +219,9 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf(bio_err, "Error parsing URL\n");
|
BIO_printf(bio_err, "Error parsing URL\n");
|
||||||
badarg = 1;
|
badarg = 1;
|
||||||
}
|
}
|
||||||
|
thost = host;
|
||||||
|
tport = port;
|
||||||
|
tpath = path;
|
||||||
}
|
}
|
||||||
else badarg = 1;
|
else badarg = 1;
|
||||||
}
|
}
|
||||||
@@ -573,51 +583,52 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "OCSP utility\n");
|
BIO_printf (bio_err, "OCSP utility\n");
|
||||||
BIO_printf (bio_err, "Usage ocsp [options]\n");
|
BIO_printf (bio_err, "Usage ocsp [options]\n");
|
||||||
BIO_printf (bio_err, "where options are\n");
|
BIO_printf (bio_err, "where options are\n");
|
||||||
BIO_printf (bio_err, "-out file output filename\n");
|
BIO_printf (bio_err, "-out file output filename\n");
|
||||||
BIO_printf (bio_err, "-issuer file issuer certificate\n");
|
BIO_printf (bio_err, "-issuer file issuer certificate\n");
|
||||||
BIO_printf (bio_err, "-cert file certificate to check\n");
|
BIO_printf (bio_err, "-cert file certificate to check\n");
|
||||||
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_other 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");
|
||||||
BIO_printf (bio_err, "-text print text form of request and response\n");
|
BIO_printf (bio_err, "-text print text form of request and response\n");
|
||||||
BIO_printf (bio_err, "-reqout file write DER encoded OCSP request to \"file\"\n");
|
BIO_printf (bio_err, "-reqout file write DER encoded OCSP request to \"file\"\n");
|
||||||
BIO_printf (bio_err, "-respout file write DER encoded OCSP reponse to \"file\"\n");
|
BIO_printf (bio_err, "-respout file write DER encoded OCSP reponse to \"file\"\n");
|
||||||
BIO_printf (bio_err, "-reqin file read DER encoded OCSP request from \"file\"\n");
|
BIO_printf (bio_err, "-reqin file read DER encoded OCSP request from \"file\"\n");
|
||||||
BIO_printf (bio_err, "-respin file read DER encoded OCSP reponse from \"file\"\n");
|
BIO_printf (bio_err, "-respin file read DER encoded OCSP reponse from \"file\"\n");
|
||||||
BIO_printf (bio_err, "-nonce add OCSP nonce to request\n");
|
BIO_printf (bio_err, "-nonce add OCSP nonce to request\n");
|
||||||
BIO_printf (bio_err, "-no_nonce don't add OCSP nonce to request\n");
|
BIO_printf (bio_err, "-no_nonce don't add OCSP nonce to request\n");
|
||||||
BIO_printf (bio_err, "-url URL OCSP responder URL\n");
|
BIO_printf (bio_err, "-url URL OCSP responder URL\n");
|
||||||
BIO_printf (bio_err, "-host host:n send OCSP request to host on port n\n");
|
BIO_printf (bio_err, "-host host:n send OCSP request to host on port n\n");
|
||||||
BIO_printf (bio_err, "-path path to use in OCSP request\n");
|
BIO_printf (bio_err, "-path path to use in OCSP request\n");
|
||||||
BIO_printf (bio_err, "-CApath dir trusted certificates directory\n");
|
BIO_printf (bio_err, "-CApath dir trusted certificates directory\n");
|
||||||
BIO_printf (bio_err, "-CAfile file trusted certificates file\n");
|
BIO_printf (bio_err, "-CAfile file trusted certificates file\n");
|
||||||
BIO_printf (bio_err, "-VAfile file validator certificates file\n");
|
BIO_printf (bio_err, "-VAfile file validator certificates file\n");
|
||||||
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_other 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_signature_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 responses 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 responses 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");
|
||||||
BIO_printf (bio_err, "-ndays n number of days before next update\n");
|
BIO_printf (bio_err, "-ndays n number of days before next update\n");
|
||||||
BIO_printf (bio_err, "-resp_key_id identify reponse by signing certificate key ID\n");
|
BIO_printf (bio_err, "-resp_key_id identify reponse by signing certificate key ID\n");
|
||||||
BIO_printf (bio_err, "-nrequest n number of requests to accept (default unlimited)\n");
|
BIO_printf (bio_err, "-nrequest n number of requests to accept (default unlimited)\n");
|
||||||
BIO_printf (bio_err, "-<dgst alg> use specified digest in the request");
|
BIO_printf (bio_err, "-<dgst alg> use specified digest in the request\n");
|
||||||
|
BIO_printf (bio_err, "-timeout n timeout connection to OCSP responder after n seconds\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -920,12 +931,12 @@ end:
|
|||||||
sk_X509_pop_free(verify_other, X509_free);
|
sk_X509_pop_free(verify_other, X509_free);
|
||||||
sk_CONF_VALUE_pop_free(headers, X509V3_conf_free);
|
sk_CONF_VALUE_pop_free(headers, X509V3_conf_free);
|
||||||
|
|
||||||
if (use_ssl != -1)
|
if (thost)
|
||||||
{
|
OPENSSL_free(thost);
|
||||||
OPENSSL_free(host);
|
if (tport)
|
||||||
OPENSSL_free(port);
|
OPENSSL_free(tport);
|
||||||
OPENSSL_free(path);
|
if (tpath)
|
||||||
}
|
OPENSSL_free(tpath);
|
||||||
|
|
||||||
OPENSSL_EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
@@ -1409,7 +1420,7 @@ OCSP_RESPONSE *process_responder(BIO *err, OCSP_REQUEST *req,
|
|||||||
}
|
}
|
||||||
resp = query_responder(err, cbio, path, headers, req, req_timeout);
|
resp = query_responder(err, cbio, path, headers, req, req_timeout);
|
||||||
if (!resp)
|
if (!resp)
|
||||||
BIO_printf(bio_err, "Error querying OCSP responsder\n");
|
BIO_printf(bio_err, "Error querying OCSP responder\n");
|
||||||
end:
|
end:
|
||||||
if (cbio)
|
if (cbio)
|
||||||
BIO_free_all(cbio);
|
BIO_free_all(cbio);
|
||||||
|
@@ -145,7 +145,7 @@ localityName = Locality Name (eg, city)
|
|||||||
organizationalUnitName = Organizational Unit Name (eg, section)
|
organizationalUnitName = Organizational Unit Name (eg, section)
|
||||||
#organizationalUnitName_default =
|
#organizationalUnitName_default =
|
||||||
|
|
||||||
commonName = Common Name (eg, YOUR name)
|
commonName = Common Name (e.g. server FQDN or YOUR name)
|
||||||
commonName_max = 64
|
commonName_max = 64
|
||||||
|
|
||||||
emailAddress = Email Address
|
emailAddress = Email Address
|
||||||
|
@@ -212,8 +212,13 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
|
||||||
|
# define ARGV _Argv
|
||||||
|
#else
|
||||||
|
# define ARGV Argv
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int Argc, char *Argv[])
|
int main(int Argc, char *ARGV[])
|
||||||
{
|
{
|
||||||
ARGS arg;
|
ARGS arg;
|
||||||
#define PROG_NAME_SIZE 39
|
#define PROG_NAME_SIZE 39
|
||||||
@@ -228,6 +233,54 @@ int main(int Argc, char *Argv[])
|
|||||||
LHASH_OF(FUNCTION) *prog=NULL;
|
LHASH_OF(FUNCTION) *prog=NULL;
|
||||||
long errline;
|
long errline;
|
||||||
|
|
||||||
|
#if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
|
||||||
|
/* 2011-03-22 SMS.
|
||||||
|
* If we have 32-bit pointers everywhere, then we're safe, and
|
||||||
|
* we bypass this mess, as on non-VMS systems. (See ARGV,
|
||||||
|
* above.)
|
||||||
|
* Problem 1: Compaq/HP C before V7.3 always used 32-bit
|
||||||
|
* pointers for argv[].
|
||||||
|
* Fix 1: For a 32-bit argv[], when we're using 64-bit pointers
|
||||||
|
* everywhere else, we always allocate and use a 64-bit
|
||||||
|
* duplicate of argv[].
|
||||||
|
* Problem 2: Compaq/HP C V7.3 (Alpha, IA64) before ECO1 failed
|
||||||
|
* to NULL-terminate a 64-bit argv[]. (As this was written, the
|
||||||
|
* compiler ECO was available only on IA64.)
|
||||||
|
* Fix 2: Unless advised not to (VMS_TRUST_ARGV), we test a
|
||||||
|
* 64-bit argv[argc] for NULL, and, if necessary, use a
|
||||||
|
* (properly) NULL-terminated (64-bit) duplicate of argv[].
|
||||||
|
* The same code is used in either case to duplicate argv[].
|
||||||
|
* Some of these decisions could be handled in preprocessing,
|
||||||
|
* but the code tends to get even uglier, and the penalty for
|
||||||
|
* deciding at compile- or run-time is tiny.
|
||||||
|
*/
|
||||||
|
char **Argv = NULL;
|
||||||
|
int free_Argv = 0;
|
||||||
|
|
||||||
|
if ((sizeof( _Argv) < 8) /* 32-bit argv[]. */
|
||||||
|
# if !defined( VMS_TRUST_ARGV)
|
||||||
|
|| (_Argv[ Argc] != NULL) /* Untrusted argv[argc] not NULL. */
|
||||||
|
# endif
|
||||||
|
)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
Argv = OPENSSL_malloc( (Argc+ 1)* sizeof( char *));
|
||||||
|
if (Argv == NULL)
|
||||||
|
{ ret = -1; goto end; }
|
||||||
|
for(i = 0; i < Argc; i++)
|
||||||
|
Argv[i] = _Argv[i];
|
||||||
|
Argv[ Argc] = NULL; /* Certain NULL termination. */
|
||||||
|
free_Argv = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Use the known-good 32-bit argv[] (which needs the
|
||||||
|
* type cast to satisfy the compiler), or the trusted or
|
||||||
|
* tested-good 64-bit argv[] as-is. */
|
||||||
|
Argv = (char **)_Argv;
|
||||||
|
}
|
||||||
|
#endif /* defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64) */
|
||||||
|
|
||||||
arg.data=NULL;
|
arg.data=NULL;
|
||||||
arg.count=0;
|
arg.count=0;
|
||||||
|
|
||||||
@@ -373,6 +426,13 @@ end:
|
|||||||
BIO_free(bio_err);
|
BIO_free(bio_err);
|
||||||
bio_err=NULL;
|
bio_err=NULL;
|
||||||
}
|
}
|
||||||
|
#if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
|
||||||
|
/* Free any duplicate Argv[] storage. */
|
||||||
|
if (free_Argv)
|
||||||
|
{
|
||||||
|
OPENSSL_free(Argv);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
OPENSSL_EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -145,7 +145,7 @@ localityName = Locality Name (eg, city)
|
|||||||
organizationalUnitName = Organizational Unit Name (eg, section)
|
organizationalUnitName = Organizational Unit Name (eg, section)
|
||||||
#organizationalUnitName_default =
|
#organizationalUnitName_default =
|
||||||
|
|
||||||
commonName = Common Name (eg, YOUR name)
|
commonName = Common Name (e.g. server FQDN or YOUR name)
|
||||||
commonName_max = 64
|
commonName_max = 64
|
||||||
|
|
||||||
emailAddress = Email Address
|
emailAddress = Email Address
|
||||||
|
@@ -647,7 +647,7 @@ int MAIN(int argc, char **argv)
|
|||||||
|
|
||||||
if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass);
|
if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass);
|
||||||
|
|
||||||
if (options & INFO) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1);
|
if ((options & INFO) && p12->mac) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1);
|
||||||
if(macver) {
|
if(macver) {
|
||||||
#ifdef CRYPTO_MDEBUG
|
#ifdef CRYPTO_MDEBUG
|
||||||
CRYPTO_push_info("verify MAC");
|
CRYPTO_push_info("verify MAC");
|
||||||
|
@@ -119,17 +119,17 @@ int MAIN(int argc, char **argv)
|
|||||||
if (!strcmp(*argv,"-in"))
|
if (!strcmp(*argv,"-in"))
|
||||||
{
|
{
|
||||||
if (--argc < 1) badarg = 1;
|
if (--argc < 1) badarg = 1;
|
||||||
infile= *(++argv);
|
else infile= *(++argv);
|
||||||
}
|
}
|
||||||
else if (!strcmp(*argv,"-out"))
|
else if (!strcmp(*argv,"-out"))
|
||||||
{
|
{
|
||||||
if (--argc < 1) badarg = 1;
|
if (--argc < 1) badarg = 1;
|
||||||
outfile= *(++argv);
|
else outfile= *(++argv);
|
||||||
}
|
}
|
||||||
else if (!strcmp(*argv,"-sigfile"))
|
else if (!strcmp(*argv,"-sigfile"))
|
||||||
{
|
{
|
||||||
if (--argc < 1) badarg = 1;
|
if (--argc < 1) badarg = 1;
|
||||||
sigfile= *(++argv);
|
else sigfile= *(++argv);
|
||||||
}
|
}
|
||||||
else if(!strcmp(*argv, "-inkey"))
|
else if(!strcmp(*argv, "-inkey"))
|
||||||
{
|
{
|
||||||
@@ -159,17 +159,17 @@ int MAIN(int argc, char **argv)
|
|||||||
else if (!strcmp(*argv,"-passin"))
|
else if (!strcmp(*argv,"-passin"))
|
||||||
{
|
{
|
||||||
if (--argc < 1) badarg = 1;
|
if (--argc < 1) badarg = 1;
|
||||||
passargin= *(++argv);
|
else passargin= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-peerform") == 0)
|
else if (strcmp(*argv,"-peerform") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) badarg = 1;
|
if (--argc < 1) badarg = 1;
|
||||||
peerform=str2fmt(*(++argv));
|
else peerform=str2fmt(*(++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));
|
else keyform=str2fmt(*(++argv));
|
||||||
}
|
}
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
else if(!strcmp(*argv, "-engine"))
|
else if(!strcmp(*argv, "-engine"))
|
||||||
|
@@ -106,16 +106,16 @@ FUNCTION functions[] = {
|
|||||||
{FUNC_TYPE_GENERAL,"gendsa",gendsa_main},
|
{FUNC_TYPE_GENERAL,"gendsa",gendsa_main},
|
||||||
#endif
|
#endif
|
||||||
{FUNC_TYPE_GENERAL,"genpkey",genpkey_main},
|
{FUNC_TYPE_GENERAL,"genpkey",genpkey_main},
|
||||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
#if !defined(OPENSSL_NO_SOCK)
|
||||||
{FUNC_TYPE_GENERAL,"s_server",s_server_main},
|
{FUNC_TYPE_GENERAL,"s_server",s_server_main},
|
||||||
#endif
|
#endif
|
||||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
#if !defined(OPENSSL_NO_SOCK)
|
||||||
{FUNC_TYPE_GENERAL,"s_client",s_client_main},
|
{FUNC_TYPE_GENERAL,"s_client",s_client_main},
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_SPEED
|
#ifndef OPENSSL_NO_SPEED
|
||||||
{FUNC_TYPE_GENERAL,"speed",speed_main},
|
{FUNC_TYPE_GENERAL,"speed",speed_main},
|
||||||
#endif
|
#endif
|
||||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
#if !defined(OPENSSL_NO_SOCK)
|
||||||
{FUNC_TYPE_GENERAL,"s_time",s_time_main},
|
{FUNC_TYPE_GENERAL,"s_time",s_time_main},
|
||||||
#endif
|
#endif
|
||||||
{FUNC_TYPE_GENERAL,"version",version_main},
|
{FUNC_TYPE_GENERAL,"version",version_main},
|
||||||
@@ -125,7 +125,7 @@ FUNCTION functions[] = {
|
|||||||
#endif
|
#endif
|
||||||
{FUNC_TYPE_GENERAL,"crl2pkcs7",crl2pkcs7_main},
|
{FUNC_TYPE_GENERAL,"crl2pkcs7",crl2pkcs7_main},
|
||||||
{FUNC_TYPE_GENERAL,"sess_id",sess_id_main},
|
{FUNC_TYPE_GENERAL,"sess_id",sess_id_main},
|
||||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
#if !defined(OPENSSL_NO_SOCK)
|
||||||
{FUNC_TYPE_GENERAL,"ciphers",ciphers_main},
|
{FUNC_TYPE_GENERAL,"ciphers",ciphers_main},
|
||||||
#endif
|
#endif
|
||||||
{FUNC_TYPE_GENERAL,"nseq",nseq_main},
|
{FUNC_TYPE_GENERAL,"nseq",nseq_main},
|
||||||
|
@@ -32,7 +32,7 @@ foreach (@ARGV)
|
|||||||
push(@files,$_);
|
push(@files,$_);
|
||||||
$str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n";
|
$str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n";
|
||||||
if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/))
|
if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/))
|
||||||
{ print "#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))\n${str}#endif\n"; }
|
{ print "#if !defined(OPENSSL_NO_SOCK)\n${str}#endif\n"; }
|
||||||
elsif ( ($_ =~ /^speed$/))
|
elsif ( ($_ =~ /^speed$/))
|
||||||
{ print "#ifndef OPENSSL_NO_SPEED\n${str}#endif\n"; }
|
{ print "#ifndef OPENSSL_NO_SPEED\n${str}#endif\n"; }
|
||||||
elsif ( ($_ =~ /^engine$/))
|
elsif ( ($_ =~ /^engine$/))
|
||||||
|
28
apps/req.c
28
apps/req.c
@@ -635,6 +635,11 @@ bad:
|
|||||||
if (inrand)
|
if (inrand)
|
||||||
app_RAND_load_files(inrand);
|
app_RAND_load_files(inrand);
|
||||||
|
|
||||||
|
if (!NCONF_get_number(req_conf,SECTION,BITS, &newkey))
|
||||||
|
{
|
||||||
|
newkey=DEFAULT_KEY_LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
if (keyalg)
|
if (keyalg)
|
||||||
{
|
{
|
||||||
genctx = set_keygen_ctx(bio_err, keyalg, &pkey_type, &newkey,
|
genctx = set_keygen_ctx(bio_err, keyalg, &pkey_type, &newkey,
|
||||||
@@ -643,12 +648,6 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newkey <= 0)
|
|
||||||
{
|
|
||||||
if (!NCONF_get_number(req_conf,SECTION,BITS, &newkey))
|
|
||||||
newkey=DEFAULT_KEY_LENGTH;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newkey < MIN_KEY_LENGTH && (pkey_type == EVP_PKEY_RSA || pkey_type == EVP_PKEY_DSA))
|
if (newkey < MIN_KEY_LENGTH && (pkey_type == EVP_PKEY_RSA || pkey_type == EVP_PKEY_DSA))
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"private key length is too short,\n");
|
BIO_printf(bio_err,"private key length is too short,\n");
|
||||||
@@ -1477,7 +1476,13 @@ start:
|
|||||||
#ifdef CHARSET_EBCDIC
|
#ifdef CHARSET_EBCDIC
|
||||||
ebcdic2ascii(buf, buf, i);
|
ebcdic2ascii(buf, buf, i);
|
||||||
#endif
|
#endif
|
||||||
if(!req_check_len(i, n_min, n_max)) goto start;
|
if(!req_check_len(i, n_min, n_max))
|
||||||
|
{
|
||||||
|
if (batch || value)
|
||||||
|
return 0;
|
||||||
|
goto start;
|
||||||
|
}
|
||||||
|
|
||||||
if (!X509_NAME_add_entry_by_NID(n,nid, chtype,
|
if (!X509_NAME_add_entry_by_NID(n,nid, chtype,
|
||||||
(unsigned char *) buf, -1,-1,mval)) goto err;
|
(unsigned char *) buf, -1,-1,mval)) goto err;
|
||||||
ret=1;
|
ret=1;
|
||||||
@@ -1536,7 +1541,12 @@ start:
|
|||||||
#ifdef CHARSET_EBCDIC
|
#ifdef CHARSET_EBCDIC
|
||||||
ebcdic2ascii(buf, buf, i);
|
ebcdic2ascii(buf, buf, i);
|
||||||
#endif
|
#endif
|
||||||
if(!req_check_len(i, n_min, n_max)) goto start;
|
if(!req_check_len(i, n_min, n_max))
|
||||||
|
{
|
||||||
|
if (batch || value)
|
||||||
|
return 0;
|
||||||
|
goto start;
|
||||||
|
}
|
||||||
|
|
||||||
if(!X509_REQ_add1_attr_by_NID(req, nid, chtype,
|
if(!X509_REQ_add1_attr_by_NID(req, nid, chtype,
|
||||||
(unsigned char *)buf, -1)) {
|
(unsigned char *)buf, -1)) {
|
||||||
@@ -1636,6 +1646,8 @@ static EVP_PKEY_CTX *set_keygen_ctx(BIO *err, const char *gstr, int *pkey_type,
|
|||||||
keylen = atol(p + 1);
|
keylen = atol(p + 1);
|
||||||
*pkeylen = keylen;
|
*pkeylen = keylen;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
keylen = *pkeylen;
|
||||||
}
|
}
|
||||||
else if (p)
|
else if (p)
|
||||||
paramfile = p + 1;
|
paramfile = p + 1;
|
||||||
|
@@ -284,6 +284,7 @@ static void sc_usage(void)
|
|||||||
BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL_HOST_NAME,PORT_STR);
|
BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL_HOST_NAME,PORT_STR);
|
||||||
|
|
||||||
BIO_printf(bio_err," -verify arg - turn on peer certificate verification\n");
|
BIO_printf(bio_err," -verify arg - turn on peer certificate verification\n");
|
||||||
|
BIO_printf(bio_err," -verify_return_error - return verification errors\n");
|
||||||
BIO_printf(bio_err," -cert arg - certificate file to use, PEM format assumed\n");
|
BIO_printf(bio_err," -cert arg - certificate file to use, PEM format assumed\n");
|
||||||
BIO_printf(bio_err," -certform arg - certificate format (PEM or DER) PEM default\n");
|
BIO_printf(bio_err," -certform arg - certificate format (PEM or DER) PEM default\n");
|
||||||
BIO_printf(bio_err," -key arg - Private key file to use, in cert file if\n");
|
BIO_printf(bio_err," -key arg - Private key file to use, in cert file if\n");
|
||||||
@@ -294,6 +295,7 @@ static void sc_usage(void)
|
|||||||
BIO_printf(bio_err," -CAfile arg - PEM format file of CA's\n");
|
BIO_printf(bio_err," -CAfile arg - PEM format file of CA's\n");
|
||||||
BIO_printf(bio_err," -reconnect - Drop and re-make the connection with the same Session-ID\n");
|
BIO_printf(bio_err," -reconnect - Drop and re-make the connection with the same Session-ID\n");
|
||||||
BIO_printf(bio_err," -pause - sleep(1) after each read(2) and write(2) system call\n");
|
BIO_printf(bio_err," -pause - sleep(1) after each read(2) and write(2) system call\n");
|
||||||
|
BIO_printf(bio_err," -prexit - print session information even on connection failure\n");
|
||||||
BIO_printf(bio_err," -showcerts - show all certificates in the chain\n");
|
BIO_printf(bio_err," -showcerts - show all certificates in the chain\n");
|
||||||
BIO_printf(bio_err," -debug - extra output\n");
|
BIO_printf(bio_err," -debug - extra output\n");
|
||||||
#ifdef WATT32
|
#ifdef WATT32
|
||||||
@@ -320,6 +322,7 @@ static void sc_usage(void)
|
|||||||
BIO_printf(bio_err," -ssl3 - just use SSLv3\n");
|
BIO_printf(bio_err," -ssl3 - just use SSLv3\n");
|
||||||
BIO_printf(bio_err," -tls1 - just use TLSv1\n");
|
BIO_printf(bio_err," -tls1 - just use TLSv1\n");
|
||||||
BIO_printf(bio_err," -dtls1 - just use DTLSv1\n");
|
BIO_printf(bio_err," -dtls1 - just use DTLSv1\n");
|
||||||
|
BIO_printf(bio_err," -fallback_scsv - send TLS_FALLBACK_SCSV\n");
|
||||||
BIO_printf(bio_err," -mtu - set the link layer MTU\n");
|
BIO_printf(bio_err," -mtu - set the link layer MTU\n");
|
||||||
BIO_printf(bio_err," -no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n");
|
BIO_printf(bio_err," -no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n");
|
||||||
BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n");
|
BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n");
|
||||||
@@ -434,19 +437,14 @@ int MAIN(int argc, char **argv)
|
|||||||
char *sess_out = NULL;
|
char *sess_out = NULL;
|
||||||
struct sockaddr peer;
|
struct sockaddr peer;
|
||||||
int peerlen = sizeof(peer);
|
int peerlen = sizeof(peer);
|
||||||
|
int fallback_scsv = 0;
|
||||||
int enable_timeouts = 0 ;
|
int enable_timeouts = 0 ;
|
||||||
long socket_mtu = 0;
|
long socket_mtu = 0;
|
||||||
#ifndef OPENSSL_NO_JPAKE
|
#ifndef OPENSSL_NO_JPAKE
|
||||||
char *jpake_secret = NULL;
|
char *jpake_secret = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
|
||||||
meth=SSLv23_client_method();
|
meth=SSLv23_client_method();
|
||||||
#elif !defined(OPENSSL_NO_SSL3)
|
|
||||||
meth=SSLv3_client_method();
|
|
||||||
#elif !defined(OPENSSL_NO_SSL2)
|
|
||||||
meth=SSLv2_client_method();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
c_Pause=0;
|
c_Pause=0;
|
||||||
@@ -581,7 +579,7 @@ int MAIN(int argc, char **argv)
|
|||||||
psk_key=*(++argv);
|
psk_key=*(++argv);
|
||||||
for (j = 0; j < strlen(psk_key); j++)
|
for (j = 0; j < strlen(psk_key); j++)
|
||||||
{
|
{
|
||||||
if (isxdigit((int)psk_key[j]))
|
if (isxdigit((unsigned char)psk_key[j]))
|
||||||
continue;
|
continue;
|
||||||
BIO_printf(bio_err,"Not a hex number '%s'\n",*argv);
|
BIO_printf(bio_err,"Not a hex number '%s'\n",*argv);
|
||||||
goto bad;
|
goto bad;
|
||||||
@@ -614,6 +612,10 @@ int MAIN(int argc, char **argv)
|
|||||||
socket_mtu = atol(*(++argv));
|
socket_mtu = atol(*(++argv));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
else if (strcmp(*argv,"-fallback_scsv") == 0)
|
||||||
|
{
|
||||||
|
fallback_scsv = 1;
|
||||||
|
}
|
||||||
else if (strcmp(*argv,"-bugs") == 0)
|
else if (strcmp(*argv,"-bugs") == 0)
|
||||||
bugs=1;
|
bugs=1;
|
||||||
else if (strcmp(*argv,"-keyform") == 0)
|
else if (strcmp(*argv,"-keyform") == 0)
|
||||||
@@ -749,14 +751,13 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
psk_identity = "JPAKE";
|
psk_identity = "JPAKE";
|
||||||
|
if (cipher)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err, "JPAKE sets cipher to PSK\n");
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
cipher = "PSK";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cipher)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err, "JPAKE sets cipher to PSK\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
cipher = "PSK";
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
OpenSSL_add_ssl_algorithms();
|
OpenSSL_add_ssl_algorithms();
|
||||||
@@ -940,6 +941,10 @@ bad:
|
|||||||
SSL_set_session(con, sess);
|
SSL_set_session(con, sess);
|
||||||
SSL_SESSION_free(sess);
|
SSL_SESSION_free(sess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fallback_scsv)
|
||||||
|
SSL_set_mode(con, SSL_MODE_SEND_FALLBACK_SCSV);
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_TLSEXT
|
#ifndef OPENSSL_NO_TLSEXT
|
||||||
if (servername != NULL)
|
if (servername != NULL)
|
||||||
{
|
{
|
||||||
@@ -1013,10 +1018,22 @@ re_start:
|
|||||||
BIO_ctrl(sbio, BIO_CTRL_DGRAM_SET_SEND_TIMEOUT, 0, &timeout);
|
BIO_ctrl(sbio, BIO_CTRL_DGRAM_SET_SEND_TIMEOUT, 0, &timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (socket_mtu > 28)
|
if (socket_mtu)
|
||||||
{
|
{
|
||||||
|
if(socket_mtu < DTLS_get_link_min_mtu(con))
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"MTU too small. Must be at least %ld\n",
|
||||||
|
DTLS_get_link_min_mtu(con));
|
||||||
|
BIO_free(sbio);
|
||||||
|
goto shut;
|
||||||
|
}
|
||||||
SSL_set_options(con, SSL_OP_NO_QUERY_MTU);
|
SSL_set_options(con, SSL_OP_NO_QUERY_MTU);
|
||||||
SSL_set_mtu(con, socket_mtu - 28);
|
if(!DTLS_set_link_mtu(con, socket_mtu))
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err, "Failed to set MTU\n");
|
||||||
|
BIO_free(sbio);
|
||||||
|
goto shut;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* want to do MTU discovery */
|
/* want to do MTU discovery */
|
||||||
@@ -1603,6 +1620,8 @@ end:
|
|||||||
EVP_PKEY_free(key);
|
EVP_PKEY_free(key);
|
||||||
if (pass)
|
if (pass)
|
||||||
OPENSSL_free(pass);
|
OPENSSL_free(pass);
|
||||||
|
if (vpm)
|
||||||
|
X509_VERIFY_PARAM_free(vpm);
|
||||||
if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); }
|
if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); }
|
||||||
if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); }
|
if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); }
|
||||||
if (mbuf != NULL) { OPENSSL_cleanse(mbuf,BUFSIZZ); OPENSSL_free(mbuf); }
|
if (mbuf != NULL) { OPENSSL_cleanse(mbuf,BUFSIZZ); OPENSSL_free(mbuf); }
|
||||||
|
@@ -410,6 +410,7 @@ static void sv_usage(void)
|
|||||||
BIO_printf(bio_err," -context arg - set session ID context\n");
|
BIO_printf(bio_err," -context arg - set session ID context\n");
|
||||||
BIO_printf(bio_err," -verify arg - turn on peer certificate verification\n");
|
BIO_printf(bio_err," -verify arg - turn on peer certificate verification\n");
|
||||||
BIO_printf(bio_err," -Verify arg - turn on peer certificate verification, must have a cert.\n");
|
BIO_printf(bio_err," -Verify arg - turn on peer certificate verification, must have a cert.\n");
|
||||||
|
BIO_printf(bio_err," -verify_return_error - return verification errors\n");
|
||||||
BIO_printf(bio_err," -cert arg - certificate file to use\n");
|
BIO_printf(bio_err," -cert arg - certificate file to use\n");
|
||||||
BIO_printf(bio_err," (default is %s)\n",TEST_CERT);
|
BIO_printf(bio_err," (default is %s)\n",TEST_CERT);
|
||||||
BIO_printf(bio_err," -crl_check - check the peer certificate has not been revoked by its CA.\n" \
|
BIO_printf(bio_err," -crl_check - check the peer certificate has not been revoked by its CA.\n" \
|
||||||
@@ -473,6 +474,7 @@ static void sv_usage(void)
|
|||||||
BIO_printf(bio_err," -no_ecdhe - Disable ephemeral ECDH\n");
|
BIO_printf(bio_err," -no_ecdhe - Disable ephemeral ECDH\n");
|
||||||
#endif
|
#endif
|
||||||
BIO_printf(bio_err," -bugs - Turn on SSL bug compatibility\n");
|
BIO_printf(bio_err," -bugs - Turn on SSL bug compatibility\n");
|
||||||
|
BIO_printf(bio_err," -hack - workaround for early Netscape code\n");
|
||||||
BIO_printf(bio_err," -www - Respond to a 'GET /' with a status page\n");
|
BIO_printf(bio_err," -www - Respond to a 'GET /' with a status page\n");
|
||||||
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");
|
||||||
@@ -493,6 +495,10 @@ static void sv_usage(void)
|
|||||||
BIO_printf(bio_err," -no_ticket - disable use of RFC4507bis session tickets\n");
|
BIO_printf(bio_err," -no_ticket - disable use of RFC4507bis session tickets\n");
|
||||||
BIO_printf(bio_err," -legacy_renegotiation - enable use of legacy renegotiation (dangerous)\n");
|
BIO_printf(bio_err," -legacy_renegotiation - enable use of legacy renegotiation (dangerous)\n");
|
||||||
#endif
|
#endif
|
||||||
|
BIO_printf(bio_err," -status - respond to certificate status requests\n");
|
||||||
|
BIO_printf(bio_err," -status_verbose - enable status request verbose printout\n");
|
||||||
|
BIO_printf(bio_err," -status_timeout n - status request responder timeout\n");
|
||||||
|
BIO_printf(bio_err," -status_url URL - status request fallback URL\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int local_argc=0;
|
static int local_argc=0;
|
||||||
@@ -670,7 +676,7 @@ static int MS_CALLBACK ssl_servername_cb(SSL *s, int *ad, void *arg)
|
|||||||
|
|
||||||
if (servername)
|
if (servername)
|
||||||
{
|
{
|
||||||
if (strcmp(servername,p->servername))
|
if (strcasecmp(servername,p->servername))
|
||||||
return p->extension_error;
|
return p->extension_error;
|
||||||
if (ctx2)
|
if (ctx2)
|
||||||
{
|
{
|
||||||
@@ -872,13 +878,7 @@ int MAIN(int argc, char *argv[])
|
|||||||
/* by default do not send a PSK identity hint */
|
/* by default do not send a PSK identity hint */
|
||||||
static char *psk_identity_hint=NULL;
|
static char *psk_identity_hint=NULL;
|
||||||
#endif
|
#endif
|
||||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
|
||||||
meth=SSLv23_server_method();
|
meth=SSLv23_server_method();
|
||||||
#elif !defined(OPENSSL_NO_SSL3)
|
|
||||||
meth=SSLv3_server_method();
|
|
||||||
#elif !defined(OPENSSL_NO_SSL2)
|
|
||||||
meth=SSLv2_server_method();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
local_argc=argc;
|
local_argc=argc;
|
||||||
local_argv=argv;
|
local_argv=argv;
|
||||||
@@ -1103,7 +1103,7 @@ int MAIN(int argc, char *argv[])
|
|||||||
psk_key=*(++argv);
|
psk_key=*(++argv);
|
||||||
for (i=0; i<strlen(psk_key); i++)
|
for (i=0; i<strlen(psk_key); i++)
|
||||||
{
|
{
|
||||||
if (isxdigit((int)psk_key[i]))
|
if (isxdigit((unsigned char)psk_key[i]))
|
||||||
continue;
|
continue;
|
||||||
BIO_printf(bio_err,"Not a hex number '%s'\n",*argv);
|
BIO_printf(bio_err,"Not a hex number '%s'\n",*argv);
|
||||||
goto bad;
|
goto bad;
|
||||||
@@ -1215,6 +1215,14 @@ bad:
|
|||||||
sv_usage();
|
sv_usage();
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_DTLS1
|
||||||
|
if (www && socket_type == SOCK_DGRAM)
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,
|
||||||
|
"Can't use -HTTP, -www or -WWW with DTLS\n");
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK)
|
#if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK)
|
||||||
if (jpake_secret)
|
if (jpake_secret)
|
||||||
@@ -1715,7 +1723,15 @@ end:
|
|||||||
OPENSSL_free(pass);
|
OPENSSL_free(pass);
|
||||||
if (dpass)
|
if (dpass)
|
||||||
OPENSSL_free(dpass);
|
OPENSSL_free(dpass);
|
||||||
|
if (vpm)
|
||||||
|
X509_VERIFY_PARAM_free(vpm);
|
||||||
#ifndef OPENSSL_NO_TLSEXT
|
#ifndef OPENSSL_NO_TLSEXT
|
||||||
|
if (tlscstatp.host)
|
||||||
|
OPENSSL_free(tlscstatp.host);
|
||||||
|
if (tlscstatp.port)
|
||||||
|
OPENSSL_free(tlscstatp.port);
|
||||||
|
if (tlscstatp.path)
|
||||||
|
OPENSSL_free(tlscstatp.path);
|
||||||
if (ctx2 != NULL) SSL_CTX_free(ctx2);
|
if (ctx2 != NULL) SSL_CTX_free(ctx2);
|
||||||
if (s_cert2)
|
if (s_cert2)
|
||||||
X509_free(s_cert2);
|
X509_free(s_cert2);
|
||||||
@@ -1840,10 +1856,24 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
|||||||
BIO_ctrl(sbio, BIO_CTRL_DGRAM_SET_SEND_TIMEOUT, 0, &timeout);
|
BIO_ctrl(sbio, BIO_CTRL_DGRAM_SET_SEND_TIMEOUT, 0, &timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (socket_mtu > 28)
|
if (socket_mtu)
|
||||||
{
|
{
|
||||||
|
if(socket_mtu < DTLS_get_link_min_mtu(con))
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err,"MTU too small. Must be at least %ld\n",
|
||||||
|
DTLS_get_link_min_mtu(con));
|
||||||
|
ret = -1;
|
||||||
|
BIO_free(sbio);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
SSL_set_options(con, SSL_OP_NO_QUERY_MTU);
|
SSL_set_options(con, SSL_OP_NO_QUERY_MTU);
|
||||||
SSL_set_mtu(con, socket_mtu - 28);
|
if(!DTLS_set_link_mtu(con, socket_mtu))
|
||||||
|
{
|
||||||
|
BIO_printf(bio_err, "Failed to set MTU\n");
|
||||||
|
ret = -1;
|
||||||
|
BIO_free(sbio);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* want to do MTU discovery */
|
/* want to do MTU discovery */
|
||||||
|
@@ -275,7 +275,7 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
|
|||||||
{
|
{
|
||||||
i=0;
|
i=0;
|
||||||
i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
|
i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
|
||||||
if (i < 0) { perror("keepalive"); return(0); }
|
if (i < 0) { closesocket(s); perror("keepalive"); return(0); }
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -406,6 +406,7 @@ redoit:
|
|||||||
if (ret == INVALID_SOCKET)
|
if (ret == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
|
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
|
||||||
|
int i;
|
||||||
i=WSAGetLastError();
|
i=WSAGetLastError();
|
||||||
BIO_printf(bio_err,"accept error %d\n",i);
|
BIO_printf(bio_err,"accept error %d\n",i);
|
||||||
#else
|
#else
|
||||||
@@ -450,6 +451,7 @@ redoit:
|
|||||||
if ((*host=(char *)OPENSSL_malloc(strlen(h1->h_name)+1)) == NULL)
|
if ((*host=(char *)OPENSSL_malloc(strlen(h1->h_name)+1)) == NULL)
|
||||||
{
|
{
|
||||||
perror("OPENSSL_malloc");
|
perror("OPENSSL_malloc");
|
||||||
|
closesocket(ret);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
BUF_strlcpy(*host,h1->h_name,strlen(h1->h_name)+1);
|
BUF_strlcpy(*host,h1->h_name,strlen(h1->h_name)+1);
|
||||||
@@ -458,11 +460,13 @@ redoit:
|
|||||||
if (h2 == NULL)
|
if (h2 == NULL)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"gethostbyname failure\n");
|
BIO_printf(bio_err,"gethostbyname failure\n");
|
||||||
|
closesocket(ret);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
if (h2->h_addrtype != AF_INET)
|
if (h2->h_addrtype != AF_INET)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n");
|
BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n");
|
||||||
|
closesocket(ret);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -541,8 +541,8 @@ int MAIN(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
if (!cipher)
|
if (!cipher)
|
||||||
{
|
{
|
||||||
#ifndef OPENSSL_NO_RC2
|
#ifndef OPENSSL_NO_DES
|
||||||
cipher = EVP_rc2_40_cbc();
|
cipher = EVP_des_ede3_cbc();
|
||||||
#else
|
#else
|
||||||
BIO_printf(bio_err, "No cipher selected\n");
|
BIO_printf(bio_err, "No cipher selected\n");
|
||||||
goto end;
|
goto end;
|
||||||
|
38
apps/speed.c
38
apps/speed.c
@@ -1230,7 +1230,8 @@ int MAIN(int argc, char **argv)
|
|||||||
count*=2;
|
count*=2;
|
||||||
Time_F(START);
|
Time_F(START);
|
||||||
for (it=count; it; it--)
|
for (it=count; it; it--)
|
||||||
DES_ecb_encrypt(buf_as_des_cblock,buf_as_des_cblock,
|
DES_ecb_encrypt((DES_cblock *)buf,
|
||||||
|
(DES_cblock *)buf,
|
||||||
&sch,DES_ENCRYPT);
|
&sch,DES_ENCRYPT);
|
||||||
d=Time_F(STOP);
|
d=Time_F(STOP);
|
||||||
} while (d <3);
|
} while (d <3);
|
||||||
@@ -2607,7 +2608,11 @@ static int do_multi(int multi)
|
|||||||
fds=malloc(multi*sizeof *fds);
|
fds=malloc(multi*sizeof *fds);
|
||||||
for(n=0 ; n < multi ; ++n)
|
for(n=0 ; n < multi ; ++n)
|
||||||
{
|
{
|
||||||
pipe(fd);
|
if (pipe(fd) == -1)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "pipe failure\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
if(fork())
|
if(fork())
|
||||||
@@ -2619,7 +2624,11 @@ static int do_multi(int multi)
|
|||||||
{
|
{
|
||||||
close(fd[0]);
|
close(fd[0]);
|
||||||
close(1);
|
close(1);
|
||||||
dup(fd[1]);
|
if (dup(fd[1]) == -1)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "dup failed\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
close(fd[1]);
|
close(fd[1]);
|
||||||
mr=1;
|
mr=1;
|
||||||
usertime=0;
|
usertime=0;
|
||||||
@@ -2681,27 +2690,7 @@ static int do_multi(int multi)
|
|||||||
else
|
else
|
||||||
rsa_results[k][1]=d;
|
rsa_results[k][1]=d;
|
||||||
}
|
}
|
||||||
else if(!strncmp(buf,"+F2:",4))
|
#ifndef OPENSSL_NO_DSA
|
||||||
{
|
|
||||||
int k;
|
|
||||||
double d;
|
|
||||||
|
|
||||||
p=buf+4;
|
|
||||||
k=atoi(sstrsep(&p,sep));
|
|
||||||
sstrsep(&p,sep);
|
|
||||||
|
|
||||||
d=atof(sstrsep(&p,sep));
|
|
||||||
if(n)
|
|
||||||
rsa_results[k][0]=1/(1/rsa_results[k][0]+1/d);
|
|
||||||
else
|
|
||||||
rsa_results[k][0]=d;
|
|
||||||
|
|
||||||
d=atof(sstrsep(&p,sep));
|
|
||||||
if(n)
|
|
||||||
rsa_results[k][1]=1/(1/rsa_results[k][1]+1/d);
|
|
||||||
else
|
|
||||||
rsa_results[k][1]=d;
|
|
||||||
}
|
|
||||||
else if(!strncmp(buf,"+F3:",4))
|
else if(!strncmp(buf,"+F3:",4))
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
@@ -2723,6 +2712,7 @@ static int do_multi(int multi)
|
|||||||
else
|
else
|
||||||
dsa_results[k][1]=d;
|
dsa_results[k][1]=d;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifndef OPENSSL_NO_ECDSA
|
#ifndef OPENSSL_NO_ECDSA
|
||||||
else if(!strncmp(buf,"+F4:",4))
|
else if(!strncmp(buf,"+F4:",4))
|
||||||
{
|
{
|
||||||
|
188
apps/vms_decc_init.c
Executable file
188
apps/vms_decc_init.c
Executable file
@@ -0,0 +1,188 @@
|
|||||||
|
#if defined( __VMS) && !defined( OPENSSL_NO_DECC_INIT) && \
|
||||||
|
defined( __DECC) && !defined( __VAX) && (__CRTL_VER >= 70301000)
|
||||||
|
# define USE_DECC_INIT 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_DECC_INIT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 2010-04-26 SMS.
|
||||||
|
*
|
||||||
|
*----------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* decc_init()
|
||||||
|
*
|
||||||
|
* On non-VAX systems, uses LIB$INITIALIZE to set a collection of C
|
||||||
|
* RTL features without using the DECC$* logical name method.
|
||||||
|
*
|
||||||
|
*----------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unixlib.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* Global storage. */
|
||||||
|
|
||||||
|
/* Flag to sense if decc_init() was called. */
|
||||||
|
|
||||||
|
int decc_init_done = -1;
|
||||||
|
|
||||||
|
|
||||||
|
/* Structure to hold a DECC$* feature name and its desired value. */
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char *name;
|
||||||
|
int value;
|
||||||
|
} decc_feat_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* Array of DECC$* feature names and their desired values.
|
||||||
|
* Note: DECC$ARGV_PARSE_STYLE is the urgent one.
|
||||||
|
*/
|
||||||
|
|
||||||
|
decc_feat_t decc_feat_array[] =
|
||||||
|
{
|
||||||
|
/* Preserve command-line case with SET PROCESS/PARSE_STYLE=EXTENDED */
|
||||||
|
{ "DECC$ARGV_PARSE_STYLE", 1 },
|
||||||
|
|
||||||
|
/* Preserve case for file names on ODS5 disks. */
|
||||||
|
{ "DECC$EFS_CASE_PRESERVE", 1 },
|
||||||
|
|
||||||
|
/* Enable multiple dots (and most characters) in ODS5 file names,
|
||||||
|
* while preserving VMS-ness of ";version".
|
||||||
|
*/
|
||||||
|
{ "DECC$EFS_CHARSET", 1 },
|
||||||
|
|
||||||
|
/* List terminator. */
|
||||||
|
{ (char *)NULL, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* LIB$INITIALIZE initialization function. */
|
||||||
|
|
||||||
|
static void decc_init( void)
|
||||||
|
{
|
||||||
|
char *openssl_debug_decc_init;
|
||||||
|
int verbose = 0;
|
||||||
|
int feat_index;
|
||||||
|
int feat_value;
|
||||||
|
int feat_value_max;
|
||||||
|
int feat_value_min;
|
||||||
|
int i;
|
||||||
|
int sts;
|
||||||
|
|
||||||
|
/* Get debug option. */
|
||||||
|
openssl_debug_decc_init = getenv( "OPENSSL_DEBUG_DECC_INIT");
|
||||||
|
if (openssl_debug_decc_init != NULL)
|
||||||
|
{
|
||||||
|
verbose = strtol( openssl_debug_decc_init, NULL, 10);
|
||||||
|
if (verbose <= 0)
|
||||||
|
{
|
||||||
|
verbose = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set the global flag to indicate that LIB$INITIALIZE worked. */
|
||||||
|
decc_init_done = 1;
|
||||||
|
|
||||||
|
/* Loop through all items in the decc_feat_array[]. */
|
||||||
|
|
||||||
|
for (i = 0; decc_feat_array[ i].name != NULL; i++)
|
||||||
|
{
|
||||||
|
/* Get the feature index. */
|
||||||
|
feat_index = decc$feature_get_index( decc_feat_array[ i].name);
|
||||||
|
if (feat_index >= 0)
|
||||||
|
{
|
||||||
|
/* Valid item. Collect its properties. */
|
||||||
|
feat_value = decc$feature_get_value( feat_index, 1);
|
||||||
|
feat_value_min = decc$feature_get_value( feat_index, 2);
|
||||||
|
feat_value_max = decc$feature_get_value( feat_index, 3);
|
||||||
|
|
||||||
|
/* Check the validity of our desired value. */
|
||||||
|
if ((decc_feat_array[ i].value >= feat_value_min) &&
|
||||||
|
(decc_feat_array[ i].value <= feat_value_max))
|
||||||
|
{
|
||||||
|
/* Valid value. Set it if necessary. */
|
||||||
|
if (feat_value != decc_feat_array[ i].value)
|
||||||
|
{
|
||||||
|
sts = decc$feature_set_value( feat_index,
|
||||||
|
1,
|
||||||
|
decc_feat_array[ i].value);
|
||||||
|
|
||||||
|
if (verbose > 1)
|
||||||
|
{
|
||||||
|
fprintf( stderr, " %s = %d, sts = %d.\n",
|
||||||
|
decc_feat_array[ i].name,
|
||||||
|
decc_feat_array[ i].value,
|
||||||
|
sts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Invalid DECC feature value. */
|
||||||
|
fprintf( stderr,
|
||||||
|
" INVALID DECC$FEATURE VALUE, %d: %d <= %s <= %d.\n",
|
||||||
|
feat_value,
|
||||||
|
feat_value_min, decc_feat_array[ i].name, feat_value_max);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Invalid DECC feature name. */
|
||||||
|
fprintf( stderr,
|
||||||
|
" UNKNOWN DECC$FEATURE: %s.\n", decc_feat_array[ i].name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verbose > 0)
|
||||||
|
{
|
||||||
|
fprintf( stderr, " DECC_INIT complete.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get "decc_init()" into a valid, loaded LIB$INITIALIZE PSECT. */
|
||||||
|
|
||||||
|
#pragma nostandard
|
||||||
|
|
||||||
|
/* Establish the LIB$INITIALIZE PSECTs, with proper alignment and
|
||||||
|
* other attributes. Note that "nopic" is significant only on VAX.
|
||||||
|
*/
|
||||||
|
#pragma extern_model save
|
||||||
|
|
||||||
|
#if __INITIAL_POINTER_SIZE == 64
|
||||||
|
# define PSECT_ALIGN 3
|
||||||
|
#else
|
||||||
|
# define PSECT_ALIGN 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#pragma extern_model strict_refdef "LIB$INITIALIZ" PSECT_ALIGN, nopic, nowrt
|
||||||
|
const int spare[ 8] = { 0 };
|
||||||
|
|
||||||
|
#pragma extern_model strict_refdef "LIB$INITIALIZE" PSECT_ALIGN, nopic, nowrt
|
||||||
|
void (*const x_decc_init)() = decc_init;
|
||||||
|
|
||||||
|
#pragma extern_model restore
|
||||||
|
|
||||||
|
/* Fake reference to ensure loading the LIB$INITIALIZE PSECT. */
|
||||||
|
|
||||||
|
#pragma extern_model save
|
||||||
|
|
||||||
|
int LIB$INITIALIZE( void);
|
||||||
|
|
||||||
|
#pragma extern_model strict_refdef
|
||||||
|
int dmy_lib$initialize = (int) LIB$INITIALIZE;
|
||||||
|
|
||||||
|
#pragma extern_model restore
|
||||||
|
|
||||||
|
#pragma standard
|
||||||
|
|
||||||
|
#else /* def USE_DECC_INIT */
|
||||||
|
|
||||||
|
/* Dummy code to avoid a %CC-W-EMPTYFILE complaint. */
|
||||||
|
int decc_init_dummy( void);
|
||||||
|
|
||||||
|
#endif /* def USE_DECC_INIT */
|
@@ -987,7 +987,7 @@ bad:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
pk=load_key(bio_err,
|
pk=load_key(bio_err,
|
||||||
keyfile, FORMAT_PEM, 0,
|
keyfile, keyformat, 0,
|
||||||
passin, e, "request key");
|
passin, e, "request key");
|
||||||
if (pk == NULL) goto end;
|
if (pk == NULL) goto end;
|
||||||
}
|
}
|
||||||
|
8
config
8
config
@@ -706,7 +706,7 @@ case "$GUESSOS" in
|
|||||||
libc=/usr/lib/libc.so
|
libc=/usr/lib/libc.so
|
||||||
else # OpenBSD
|
else # OpenBSD
|
||||||
# ld searches for highest libc.so.* and so do we
|
# ld searches for highest libc.so.* and so do we
|
||||||
libc=`(ls /usr/lib/libc.so.* | tail -1) 2>/dev/null`
|
libc=`(ls /usr/lib/libc.so.* /lib/libc.so.* | tail -1) 2>/dev/null`
|
||||||
fi
|
fi
|
||||||
case "`(file -L $libc) 2>/dev/null`" in
|
case "`(file -L $libc) 2>/dev/null`" in
|
||||||
*ELF*) OUT="BSD-x86-elf" ;;
|
*ELF*) OUT="BSD-x86-elf" ;;
|
||||||
@@ -825,6 +825,12 @@ esac
|
|||||||
# options="$options -DATALLA"
|
# options="$options -DATALLA"
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
|
if expr "$options" : '.*no\-asm' > /dev/null; then :; else
|
||||||
|
sh -c "$CROSS_COMPILE${CC:-gcc} -Wa,--help -c -o /tmp/null.$$.o -x assembler /dev/null && rm /tmp/null.$$.o" 2>&1 | \
|
||||||
|
grep \\--noexecstack >/dev/null && \
|
||||||
|
options="$options -Wa,--noexecstack"
|
||||||
|
fi
|
||||||
|
|
||||||
# gcc < 2.8 does not support -march=ultrasparc
|
# gcc < 2.8 does not support -march=ultrasparc
|
||||||
if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
|
if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
|
||||||
then
|
then
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
/* $LP: LPlib/source/LPdir_vms.c,v 1.20 2004/08/26 13:36:05 _cvs_levitte Exp $ */
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@@ -40,22 +39,18 @@
|
|||||||
#ifndef LPDIR_H
|
#ifndef LPDIR_H
|
||||||
#include "LPdir.h"
|
#include "LPdir.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "vms_rms.h"
|
||||||
|
|
||||||
/* Because some compiler options hide this macor */
|
/* Some compiler options hide EVMSERR. */
|
||||||
#ifndef EVMSERR
|
#ifndef EVMSERR
|
||||||
#define EVMSERR 65535 /* error for non-translatable VMS errors */
|
# define EVMSERR 65535 /* error for non-translatable VMS errors */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct LP_dir_context_st
|
struct LP_dir_context_st
|
||||||
{
|
{
|
||||||
unsigned long VMS_context;
|
unsigned long VMS_context;
|
||||||
#ifdef NAML$C_MAXRSS
|
char filespec[ NAMX_MAXRSS+ 1];
|
||||||
char filespec[NAML$C_MAXRSS+1];
|
char result[ NAMX_MAXRSS+ 1];
|
||||||
char result[NAML$C_MAXRSS+1];
|
|
||||||
#else
|
|
||||||
char filespec[256];
|
|
||||||
char result[256];
|
|
||||||
#endif
|
|
||||||
struct dsc$descriptor_d filespec_dsc;
|
struct dsc$descriptor_d filespec_dsc;
|
||||||
struct dsc$descriptor_d result_dsc;
|
struct dsc$descriptor_d result_dsc;
|
||||||
};
|
};
|
||||||
@@ -66,6 +61,16 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
|||||||
char *p, *r;
|
char *p, *r;
|
||||||
size_t l;
|
size_t l;
|
||||||
unsigned long flags = 0;
|
unsigned long flags = 0;
|
||||||
|
|
||||||
|
/* Arrange 32-bit pointer to (copied) string storage, if needed. */
|
||||||
|
#if __INITIAL_POINTER_SIZE == 64
|
||||||
|
# pragma pointer_size save
|
||||||
|
# pragma pointer_size 32
|
||||||
|
char *ctx_filespec_32p;
|
||||||
|
# pragma pointer_size restore
|
||||||
|
char ctx_filespec_32[ NAMX_MAXRSS+ 1];
|
||||||
|
#endif /* __INITIAL_POINTER_SIZE == 64 */
|
||||||
|
|
||||||
#ifdef NAML$C_MAXRSS
|
#ifdef NAML$C_MAXRSS
|
||||||
flags |= LIB$M_FIL_LONG_NAMES;
|
flags |= LIB$M_FIL_LONG_NAMES;
|
||||||
#endif
|
#endif
|
||||||
@@ -82,6 +87,12 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
|||||||
size_t filespeclen = strlen(directory);
|
size_t filespeclen = strlen(directory);
|
||||||
char *filespec = NULL;
|
char *filespec = NULL;
|
||||||
|
|
||||||
|
if (filespeclen == 0)
|
||||||
|
{
|
||||||
|
errno = ENOENT;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* MUST be a VMS directory specification! Let's estimate if it is. */
|
/* MUST be a VMS directory specification! Let's estimate if it is. */
|
||||||
if (directory[filespeclen-1] != ']'
|
if (directory[filespeclen-1] != ']'
|
||||||
&& directory[filespeclen-1] != '>'
|
&& directory[filespeclen-1] != '>'
|
||||||
@@ -93,13 +104,7 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
|||||||
|
|
||||||
filespeclen += 4; /* "*.*;" */
|
filespeclen += 4; /* "*.*;" */
|
||||||
|
|
||||||
if (filespeclen >
|
if (filespeclen > NAMX_MAXRSS)
|
||||||
#ifdef NAML$C_MAXRSS
|
|
||||||
NAML$C_MAXRSS
|
|
||||||
#else
|
|
||||||
255
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
errno = ENAMETOOLONG;
|
errno = ENAMETOOLONG;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -115,14 +120,21 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
|||||||
|
|
||||||
strcpy((*ctx)->filespec,directory);
|
strcpy((*ctx)->filespec,directory);
|
||||||
strcat((*ctx)->filespec,"*.*;");
|
strcat((*ctx)->filespec,"*.*;");
|
||||||
|
|
||||||
|
/* Arrange 32-bit pointer to (copied) string storage, if needed. */
|
||||||
|
#if __INITIAL_POINTER_SIZE == 64
|
||||||
|
# define CTX_FILESPEC ctx_filespec_32p
|
||||||
|
/* Copy the file name to storage with a 32-bit pointer. */
|
||||||
|
ctx_filespec_32p = ctx_filespec_32;
|
||||||
|
strcpy( ctx_filespec_32p, (*ctx)->filespec);
|
||||||
|
#else /* __INITIAL_POINTER_SIZE == 64 */
|
||||||
|
# define CTX_FILESPEC (*ctx)->filespec
|
||||||
|
#endif /* __INITIAL_POINTER_SIZE == 64 [else] */
|
||||||
|
|
||||||
(*ctx)->filespec_dsc.dsc$w_length = filespeclen;
|
(*ctx)->filespec_dsc.dsc$w_length = filespeclen;
|
||||||
(*ctx)->filespec_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
(*ctx)->filespec_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||||
(*ctx)->filespec_dsc.dsc$b_class = DSC$K_CLASS_S;
|
(*ctx)->filespec_dsc.dsc$b_class = DSC$K_CLASS_S;
|
||||||
(*ctx)->filespec_dsc.dsc$a_pointer = (*ctx)->filespec;
|
(*ctx)->filespec_dsc.dsc$a_pointer = CTX_FILESPEC;
|
||||||
(*ctx)->result_dsc.dsc$w_length = 0;
|
|
||||||
(*ctx)->result_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
|
||||||
(*ctx)->result_dsc.dsc$b_class = DSC$K_CLASS_D;
|
|
||||||
(*ctx)->result_dsc.dsc$a_pointer = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(*ctx)->result_dsc.dsc$w_length = 0;
|
(*ctx)->result_dsc.dsc$w_length = 0;
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
/* $LP: LPlib/source/LPdir_win.c,v 1.10 2004/08/26 13:36:05 _cvs_levitte Exp $ */
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@@ -37,7 +36,7 @@
|
|||||||
#if defined(LP_SYS_WINCE) && !defined(FindFirstFile)
|
#if defined(LP_SYS_WINCE) && !defined(FindFirstFile)
|
||||||
# define FindFirstFile FindFirstFileW
|
# define FindFirstFile FindFirstFileW
|
||||||
#endif
|
#endif
|
||||||
#if defined(LP_SYS_WINCE) && !defined(FindFirstFile)
|
#if defined(LP_SYS_WINCE) && !defined(FindNextFile)
|
||||||
# define FindNextFile FindNextFileW
|
# define FindNextFile FindNextFileW
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -63,6 +62,16 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
if (*ctx == NULL)
|
if (*ctx == NULL)
|
||||||
{
|
{
|
||||||
|
const char *extdir = directory;
|
||||||
|
char *extdirbuf = NULL;
|
||||||
|
size_t dirlen = strlen (directory);
|
||||||
|
|
||||||
|
if (dirlen == 0)
|
||||||
|
{
|
||||||
|
errno = ENOENT;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
*ctx = (LP_DIR_CTX *)malloc(sizeof(LP_DIR_CTX));
|
*ctx = (LP_DIR_CTX *)malloc(sizeof(LP_DIR_CTX));
|
||||||
if (*ctx == NULL)
|
if (*ctx == NULL)
|
||||||
{
|
{
|
||||||
@@ -71,15 +80,35 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
|||||||
}
|
}
|
||||||
memset(*ctx, '\0', sizeof(LP_DIR_CTX));
|
memset(*ctx, '\0', sizeof(LP_DIR_CTX));
|
||||||
|
|
||||||
|
if (directory[dirlen-1] != '*')
|
||||||
|
{
|
||||||
|
extdirbuf = (char *)malloc(dirlen + 3);
|
||||||
|
if (extdirbuf == NULL)
|
||||||
|
{
|
||||||
|
free(*ctx);
|
||||||
|
*ctx = NULL;
|
||||||
|
errno = ENOMEM;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (directory[dirlen-1] != '/' && directory[dirlen-1] != '\\')
|
||||||
|
extdir = strcat(strcpy (extdirbuf,directory),"/*");
|
||||||
|
else
|
||||||
|
extdir = strcat(strcpy (extdirbuf,directory),"*");
|
||||||
|
}
|
||||||
|
|
||||||
if (sizeof(TCHAR) != sizeof(char))
|
if (sizeof(TCHAR) != sizeof(char))
|
||||||
{
|
{
|
||||||
TCHAR *wdir = NULL;
|
TCHAR *wdir = NULL;
|
||||||
/* len_0 denotes string length *with* trailing 0 */
|
/* len_0 denotes string length *with* trailing 0 */
|
||||||
size_t index = 0,len_0 = strlen(directory) + 1;
|
size_t index = 0,len_0 = strlen(extdir) + 1;
|
||||||
|
|
||||||
wdir = (TCHAR *)malloc(len_0 * sizeof(TCHAR));
|
wdir = (TCHAR *)calloc(len_0, sizeof(TCHAR));
|
||||||
if (wdir == NULL)
|
if (wdir == NULL)
|
||||||
{
|
{
|
||||||
|
if (extdirbuf != NULL)
|
||||||
|
{
|
||||||
|
free (extdirbuf);
|
||||||
|
}
|
||||||
free(*ctx);
|
free(*ctx);
|
||||||
*ctx = NULL;
|
*ctx = NULL;
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -87,17 +116,23 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LP_MULTIBYTE_AVAILABLE
|
#ifdef LP_MULTIBYTE_AVAILABLE
|
||||||
if (!MultiByteToWideChar(CP_ACP, 0, directory, len_0, (WCHAR *)wdir, len_0))
|
if (!MultiByteToWideChar(CP_ACP, 0, extdir, len_0, (WCHAR *)wdir, len_0))
|
||||||
#endif
|
#endif
|
||||||
for (index = 0; index < len_0; index++)
|
for (index = 0; index < len_0; index++)
|
||||||
wdir[index] = (TCHAR)directory[index];
|
wdir[index] = (TCHAR)extdir[index];
|
||||||
|
|
||||||
(*ctx)->handle = FindFirstFile(wdir, &(*ctx)->ctx);
|
(*ctx)->handle = FindFirstFile(wdir, &(*ctx)->ctx);
|
||||||
|
|
||||||
free(wdir);
|
free(wdir);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
(*ctx)->handle = FindFirstFile((TCHAR *)directory, &(*ctx)->ctx);
|
{
|
||||||
|
(*ctx)->handle = FindFirstFile((TCHAR *)extdir, &(*ctx)->ctx);
|
||||||
|
}
|
||||||
|
if (extdirbuf != NULL)
|
||||||
|
{
|
||||||
|
free (extdirbuf);
|
||||||
|
}
|
||||||
|
|
||||||
if ((*ctx)->handle == INVALID_HANDLE_VALUE)
|
if ((*ctx)->handle == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
@@ -114,7 +149,6 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof(TCHAR) != sizeof(char))
|
if (sizeof(TCHAR) != sizeof(char))
|
||||||
{
|
{
|
||||||
TCHAR *wdir = (*ctx)->ctx.cFileName;
|
TCHAR *wdir = (*ctx)->ctx.cFileName;
|
||||||
|
@@ -31,6 +31,7 @@ CPUID_OBJ=mem_clr.o
|
|||||||
LIBS=
|
LIBS=
|
||||||
|
|
||||||
GENERAL=Makefile README crypto-lib.com install.com
|
GENERAL=Makefile README crypto-lib.com install.com
|
||||||
|
TEST=constant_time_test.c
|
||||||
|
|
||||||
LIB= $(TOP)/libcrypto.a
|
LIB= $(TOP)/libcrypto.a
|
||||||
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
||||||
@@ -41,7 +42,8 @@ SRC= $(LIBSRC)
|
|||||||
|
|
||||||
EXHEADER= crypto.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
|
EXHEADER= crypto.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 o_str.h o_dir.h $(EXHEADER)
|
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h \
|
||||||
|
constant_time_locl.h $(EXHEADER)
|
||||||
|
|
||||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||||
|
|
||||||
@@ -51,12 +53,7 @@ top:
|
|||||||
all: shared
|
all: shared
|
||||||
|
|
||||||
buildinf.h: ../Makefile
|
buildinf.h: ../Makefile
|
||||||
( echo "#ifndef MK1MF_BUILD"; \
|
$(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h
|
||||||
echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
|
|
||||||
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
|
|
||||||
echo ' #define PLATFORM "$(PLATFORM)"'; \
|
|
||||||
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
|
||||||
echo '#endif' ) >buildinf.h
|
|
||||||
|
|
||||||
x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
|
x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
|
||||||
$(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
$(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
||||||
@@ -74,7 +71,9 @@ x86_64cpuid.s: x86_64cpuid.pl
|
|||||||
$(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
|
$(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
|
||||||
ia64cpuid.s: ia64cpuid.S
|
ia64cpuid.s: ia64cpuid.S
|
||||||
$(CC) $(CFLAGS) -E ia64cpuid.S > $@
|
$(CC) $(CFLAGS) -E ia64cpuid.S > $@
|
||||||
ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
|
ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
|
||||||
|
alphacpuid.s: alphacpuid.pl
|
||||||
|
$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
|
||||||
|
|
||||||
testapps:
|
testapps:
|
||||||
[ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \
|
[ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \
|
||||||
|
@@ -85,9 +85,9 @@ int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
|
|||||||
A[7] ^= (unsigned char)(t & 0xff);
|
A[7] ^= (unsigned char)(t & 0xff);
|
||||||
if (t > 0xff)
|
if (t > 0xff)
|
||||||
{
|
{
|
||||||
A[6] ^= (unsigned char)((t & 0xff) >> 8);
|
A[6] ^= (unsigned char)((t >> 8) & 0xff);
|
||||||
A[5] ^= (unsigned char)((t & 0xff) >> 16);
|
A[5] ^= (unsigned char)((t >> 16) & 0xff);
|
||||||
A[4] ^= (unsigned char)((t & 0xff) >> 24);
|
A[4] ^= (unsigned char)((t >> 24) & 0xff);
|
||||||
}
|
}
|
||||||
memcpy(R, B + 8, 8);
|
memcpy(R, B + 8, 8);
|
||||||
}
|
}
|
||||||
@@ -119,9 +119,9 @@ int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
|
|||||||
A[7] ^= (unsigned char)(t & 0xff);
|
A[7] ^= (unsigned char)(t & 0xff);
|
||||||
if (t > 0xff)
|
if (t > 0xff)
|
||||||
{
|
{
|
||||||
A[6] ^= (unsigned char)((t & 0xff) >> 8);
|
A[6] ^= (unsigned char)((t >> 8) & 0xff);
|
||||||
A[5] ^= (unsigned char)((t & 0xff) >> 16);
|
A[5] ^= (unsigned char)((t >> 16) & 0xff);
|
||||||
A[4] ^= (unsigned char)((t & 0xff) >> 24);
|
A[4] ^= (unsigned char)((t >> 24) & 0xff);
|
||||||
}
|
}
|
||||||
memcpy(B + 8, R, 8);
|
memcpy(B + 8, R, 8);
|
||||||
AES_decrypt(B, B, key);
|
AES_decrypt(B, B, key);
|
||||||
|
@@ -16,12 +16,20 @@
|
|||||||
# allows to merge logical or arithmetic operation with shift or rotate
|
# allows to merge logical or arithmetic operation with shift or rotate
|
||||||
# in one instruction and emit combined result every cycle. The module
|
# in one instruction and emit combined result every cycle. The module
|
||||||
# is endian-neutral. The performance is ~42 cycles/byte for 128-bit
|
# is endian-neutral. The performance is ~42 cycles/byte for 128-bit
|
||||||
# key.
|
# key [on single-issue Xscale PXA250 core].
|
||||||
|
|
||||||
# May 2007.
|
# May 2007.
|
||||||
#
|
#
|
||||||
# AES_set_[en|de]crypt_key is added.
|
# AES_set_[en|de]crypt_key is added.
|
||||||
|
|
||||||
|
# July 2010.
|
||||||
|
#
|
||||||
|
# Rescheduling for dual-issue pipeline resulted in 12% improvement on
|
||||||
|
# Cortex A8 core and ~25 cycles per byte processed with 128-bit key.
|
||||||
|
|
||||||
|
while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
|
||||||
|
open STDOUT,">$output";
|
||||||
|
|
||||||
$s0="r0";
|
$s0="r0";
|
||||||
$s1="r1";
|
$s1="r1";
|
||||||
$s2="r2";
|
$s2="r2";
|
||||||
@@ -164,24 +172,24 @@ AES_encrypt:
|
|||||||
ldrb $t2,[$rounds,#1]
|
ldrb $t2,[$rounds,#1]
|
||||||
ldrb $t3,[$rounds,#0]
|
ldrb $t3,[$rounds,#0]
|
||||||
orr $s0,$s0,$t1,lsl#8
|
orr $s0,$s0,$t1,lsl#8
|
||||||
orr $s0,$s0,$t2,lsl#16
|
|
||||||
orr $s0,$s0,$t3,lsl#24
|
|
||||||
ldrb $s1,[$rounds,#7]
|
ldrb $s1,[$rounds,#7]
|
||||||
|
orr $s0,$s0,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#6]
|
ldrb $t1,[$rounds,#6]
|
||||||
|
orr $s0,$s0,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#5]
|
ldrb $t2,[$rounds,#5]
|
||||||
ldrb $t3,[$rounds,#4]
|
ldrb $t3,[$rounds,#4]
|
||||||
orr $s1,$s1,$t1,lsl#8
|
orr $s1,$s1,$t1,lsl#8
|
||||||
orr $s1,$s1,$t2,lsl#16
|
|
||||||
orr $s1,$s1,$t3,lsl#24
|
|
||||||
ldrb $s2,[$rounds,#11]
|
ldrb $s2,[$rounds,#11]
|
||||||
|
orr $s1,$s1,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#10]
|
ldrb $t1,[$rounds,#10]
|
||||||
|
orr $s1,$s1,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#9]
|
ldrb $t2,[$rounds,#9]
|
||||||
ldrb $t3,[$rounds,#8]
|
ldrb $t3,[$rounds,#8]
|
||||||
orr $s2,$s2,$t1,lsl#8
|
orr $s2,$s2,$t1,lsl#8
|
||||||
orr $s2,$s2,$t2,lsl#16
|
|
||||||
orr $s2,$s2,$t3,lsl#24
|
|
||||||
ldrb $s3,[$rounds,#15]
|
ldrb $s3,[$rounds,#15]
|
||||||
|
orr $s2,$s2,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#14]
|
ldrb $t1,[$rounds,#14]
|
||||||
|
orr $s2,$s2,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#13]
|
ldrb $t2,[$rounds,#13]
|
||||||
ldrb $t3,[$rounds,#12]
|
ldrb $t3,[$rounds,#12]
|
||||||
orr $s3,$s3,$t1,lsl#8
|
orr $s3,$s3,$t1,lsl#8
|
||||||
@@ -196,24 +204,24 @@ AES_encrypt:
|
|||||||
mov $t3,$s0,lsr#8
|
mov $t3,$s0,lsr#8
|
||||||
strb $t1,[$rounds,#0]
|
strb $t1,[$rounds,#0]
|
||||||
strb $t2,[$rounds,#1]
|
strb $t2,[$rounds,#1]
|
||||||
strb $t3,[$rounds,#2]
|
|
||||||
strb $s0,[$rounds,#3]
|
|
||||||
mov $t1,$s1,lsr#24
|
mov $t1,$s1,lsr#24
|
||||||
|
strb $t3,[$rounds,#2]
|
||||||
mov $t2,$s1,lsr#16
|
mov $t2,$s1,lsr#16
|
||||||
|
strb $s0,[$rounds,#3]
|
||||||
mov $t3,$s1,lsr#8
|
mov $t3,$s1,lsr#8
|
||||||
strb $t1,[$rounds,#4]
|
strb $t1,[$rounds,#4]
|
||||||
strb $t2,[$rounds,#5]
|
strb $t2,[$rounds,#5]
|
||||||
strb $t3,[$rounds,#6]
|
|
||||||
strb $s1,[$rounds,#7]
|
|
||||||
mov $t1,$s2,lsr#24
|
mov $t1,$s2,lsr#24
|
||||||
|
strb $t3,[$rounds,#6]
|
||||||
mov $t2,$s2,lsr#16
|
mov $t2,$s2,lsr#16
|
||||||
|
strb $s1,[$rounds,#7]
|
||||||
mov $t3,$s2,lsr#8
|
mov $t3,$s2,lsr#8
|
||||||
strb $t1,[$rounds,#8]
|
strb $t1,[$rounds,#8]
|
||||||
strb $t2,[$rounds,#9]
|
strb $t2,[$rounds,#9]
|
||||||
strb $t3,[$rounds,#10]
|
|
||||||
strb $s2,[$rounds,#11]
|
|
||||||
mov $t1,$s3,lsr#24
|
mov $t1,$s3,lsr#24
|
||||||
|
strb $t3,[$rounds,#10]
|
||||||
mov $t2,$s3,lsr#16
|
mov $t2,$s3,lsr#16
|
||||||
|
strb $s2,[$rounds,#11]
|
||||||
mov $t3,$s3,lsr#8
|
mov $t3,$s3,lsr#8
|
||||||
strb $t1,[$rounds,#12]
|
strb $t1,[$rounds,#12]
|
||||||
strb $t2,[$rounds,#13]
|
strb $t2,[$rounds,#13]
|
||||||
@@ -230,141 +238,137 @@ AES_encrypt:
|
|||||||
.align 2
|
.align 2
|
||||||
_armv4_AES_encrypt:
|
_armv4_AES_encrypt:
|
||||||
str lr,[sp,#-4]! @ push lr
|
str lr,[sp,#-4]! @ push lr
|
||||||
ldr $t1,[$key],#16
|
ldmia $key!,{$t1-$i1}
|
||||||
ldr $t2,[$key,#-12]
|
|
||||||
ldr $t3,[$key,#-8]
|
|
||||||
ldr $i1,[$key,#-4]
|
|
||||||
ldr $rounds,[$key,#240-16]
|
|
||||||
eor $s0,$s0,$t1
|
eor $s0,$s0,$t1
|
||||||
|
ldr $rounds,[$key,#240-16]
|
||||||
eor $s1,$s1,$t2
|
eor $s1,$s1,$t2
|
||||||
eor $s2,$s2,$t3
|
eor $s2,$s2,$t3
|
||||||
eor $s3,$s3,$i1
|
eor $s3,$s3,$i1
|
||||||
sub $rounds,$rounds,#1
|
sub $rounds,$rounds,#1
|
||||||
mov lr,#255
|
mov lr,#255
|
||||||
|
|
||||||
.Lenc_loop:
|
and $i1,lr,$s0
|
||||||
and $i2,lr,$s0,lsr#8
|
and $i2,lr,$s0,lsr#8
|
||||||
and $i3,lr,$s0,lsr#16
|
and $i3,lr,$s0,lsr#16
|
||||||
and $i1,lr,$s0
|
|
||||||
mov $s0,$s0,lsr#24
|
mov $s0,$s0,lsr#24
|
||||||
|
.Lenc_loop:
|
||||||
ldr $t1,[$tbl,$i1,lsl#2] @ Te3[s0>>0]
|
ldr $t1,[$tbl,$i1,lsl#2] @ Te3[s0>>0]
|
||||||
ldr $s0,[$tbl,$s0,lsl#2] @ Te0[s0>>24]
|
|
||||||
ldr $t2,[$tbl,$i2,lsl#2] @ Te2[s0>>8]
|
|
||||||
ldr $t3,[$tbl,$i3,lsl#2] @ Te1[s0>>16]
|
|
||||||
|
|
||||||
and $i1,lr,$s1,lsr#16 @ i0
|
and $i1,lr,$s1,lsr#16 @ i0
|
||||||
|
ldr $t2,[$tbl,$i2,lsl#2] @ Te2[s0>>8]
|
||||||
and $i2,lr,$s1
|
and $i2,lr,$s1
|
||||||
|
ldr $t3,[$tbl,$i3,lsl#2] @ Te1[s0>>16]
|
||||||
and $i3,lr,$s1,lsr#8
|
and $i3,lr,$s1,lsr#8
|
||||||
|
ldr $s0,[$tbl,$s0,lsl#2] @ Te0[s0>>24]
|
||||||
mov $s1,$s1,lsr#24
|
mov $s1,$s1,lsr#24
|
||||||
|
|
||||||
ldr $i1,[$tbl,$i1,lsl#2] @ Te1[s1>>16]
|
ldr $i1,[$tbl,$i1,lsl#2] @ Te1[s1>>16]
|
||||||
ldr $s1,[$tbl,$s1,lsl#2] @ Te0[s1>>24]
|
|
||||||
ldr $i2,[$tbl,$i2,lsl#2] @ Te3[s1>>0]
|
ldr $i2,[$tbl,$i2,lsl#2] @ Te3[s1>>0]
|
||||||
ldr $i3,[$tbl,$i3,lsl#2] @ Te2[s1>>8]
|
ldr $i3,[$tbl,$i3,lsl#2] @ Te2[s1>>8]
|
||||||
eor $s0,$s0,$i1,ror#8
|
eor $s0,$s0,$i1,ror#8
|
||||||
eor $s1,$s1,$t1,ror#24
|
ldr $s1,[$tbl,$s1,lsl#2] @ Te0[s1>>24]
|
||||||
eor $t2,$t2,$i2,ror#8
|
|
||||||
eor $t3,$t3,$i3,ror#8
|
|
||||||
|
|
||||||
and $i1,lr,$s2,lsr#8 @ i0
|
and $i1,lr,$s2,lsr#8 @ i0
|
||||||
|
eor $t2,$t2,$i2,ror#8
|
||||||
and $i2,lr,$s2,lsr#16 @ i1
|
and $i2,lr,$s2,lsr#16 @ i1
|
||||||
|
eor $t3,$t3,$i3,ror#8
|
||||||
and $i3,lr,$s2
|
and $i3,lr,$s2
|
||||||
mov $s2,$s2,lsr#24
|
eor $s1,$s1,$t1,ror#24
|
||||||
ldr $i1,[$tbl,$i1,lsl#2] @ Te2[s2>>8]
|
ldr $i1,[$tbl,$i1,lsl#2] @ Te2[s2>>8]
|
||||||
|
mov $s2,$s2,lsr#24
|
||||||
|
|
||||||
ldr $i2,[$tbl,$i2,lsl#2] @ Te1[s2>>16]
|
ldr $i2,[$tbl,$i2,lsl#2] @ Te1[s2>>16]
|
||||||
ldr $s2,[$tbl,$s2,lsl#2] @ Te0[s2>>24]
|
|
||||||
ldr $i3,[$tbl,$i3,lsl#2] @ Te3[s2>>0]
|
ldr $i3,[$tbl,$i3,lsl#2] @ Te3[s2>>0]
|
||||||
eor $s0,$s0,$i1,ror#16
|
eor $s0,$s0,$i1,ror#16
|
||||||
eor $s1,$s1,$i2,ror#8
|
ldr $s2,[$tbl,$s2,lsl#2] @ Te0[s2>>24]
|
||||||
eor $s2,$s2,$t2,ror#16
|
|
||||||
eor $t3,$t3,$i3,ror#16
|
|
||||||
|
|
||||||
and $i1,lr,$s3 @ i0
|
and $i1,lr,$s3 @ i0
|
||||||
|
eor $s1,$s1,$i2,ror#8
|
||||||
and $i2,lr,$s3,lsr#8 @ i1
|
and $i2,lr,$s3,lsr#8 @ i1
|
||||||
|
eor $t3,$t3,$i3,ror#16
|
||||||
and $i3,lr,$s3,lsr#16 @ i2
|
and $i3,lr,$s3,lsr#16 @ i2
|
||||||
mov $s3,$s3,lsr#24
|
eor $s2,$s2,$t2,ror#16
|
||||||
ldr $i1,[$tbl,$i1,lsl#2] @ Te3[s3>>0]
|
ldr $i1,[$tbl,$i1,lsl#2] @ Te3[s3>>0]
|
||||||
|
mov $s3,$s3,lsr#24
|
||||||
|
|
||||||
ldr $i2,[$tbl,$i2,lsl#2] @ Te2[s3>>8]
|
ldr $i2,[$tbl,$i2,lsl#2] @ Te2[s3>>8]
|
||||||
ldr $i3,[$tbl,$i3,lsl#2] @ Te1[s3>>16]
|
ldr $i3,[$tbl,$i3,lsl#2] @ Te1[s3>>16]
|
||||||
ldr $s3,[$tbl,$s3,lsl#2] @ Te0[s3>>24]
|
|
||||||
eor $s0,$s0,$i1,ror#24
|
eor $s0,$s0,$i1,ror#24
|
||||||
|
ldr $s3,[$tbl,$s3,lsl#2] @ Te0[s3>>24]
|
||||||
eor $s1,$s1,$i2,ror#16
|
eor $s1,$s1,$i2,ror#16
|
||||||
|
ldr $i1,[$key],#16
|
||||||
eor $s2,$s2,$i3,ror#8
|
eor $s2,$s2,$i3,ror#8
|
||||||
|
ldr $t1,[$key,#-12]
|
||||||
eor $s3,$s3,$t3,ror#8
|
eor $s3,$s3,$t3,ror#8
|
||||||
|
|
||||||
ldr $t1,[$key],#16
|
ldr $t2,[$key,#-8]
|
||||||
ldr $t2,[$key,#-12]
|
eor $s0,$s0,$i1
|
||||||
ldr $t3,[$key,#-8]
|
ldr $t3,[$key,#-4]
|
||||||
ldr $i1,[$key,#-4]
|
and $i1,lr,$s0
|
||||||
eor $s0,$s0,$t1
|
eor $s1,$s1,$t1
|
||||||
eor $s1,$s1,$t2
|
and $i2,lr,$s0,lsr#8
|
||||||
eor $s2,$s2,$t3
|
eor $s2,$s2,$t2
|
||||||
eor $s3,$s3,$i1
|
and $i3,lr,$s0,lsr#16
|
||||||
|
eor $s3,$s3,$t3
|
||||||
|
mov $s0,$s0,lsr#24
|
||||||
|
|
||||||
subs $rounds,$rounds,#1
|
subs $rounds,$rounds,#1
|
||||||
bne .Lenc_loop
|
bne .Lenc_loop
|
||||||
|
|
||||||
add $tbl,$tbl,#2
|
add $tbl,$tbl,#2
|
||||||
|
|
||||||
and $i1,lr,$s0
|
|
||||||
and $i2,lr,$s0,lsr#8
|
|
||||||
and $i3,lr,$s0,lsr#16
|
|
||||||
mov $s0,$s0,lsr#24
|
|
||||||
ldrb $t1,[$tbl,$i1,lsl#2] @ Te4[s0>>0]
|
ldrb $t1,[$tbl,$i1,lsl#2] @ Te4[s0>>0]
|
||||||
ldrb $s0,[$tbl,$s0,lsl#2] @ Te4[s0>>24]
|
|
||||||
ldrb $t2,[$tbl,$i2,lsl#2] @ Te4[s0>>8]
|
|
||||||
ldrb $t3,[$tbl,$i3,lsl#2] @ Te4[s0>>16]
|
|
||||||
|
|
||||||
and $i1,lr,$s1,lsr#16 @ i0
|
and $i1,lr,$s1,lsr#16 @ i0
|
||||||
|
ldrb $t2,[$tbl,$i2,lsl#2] @ Te4[s0>>8]
|
||||||
and $i2,lr,$s1
|
and $i2,lr,$s1
|
||||||
|
ldrb $t3,[$tbl,$i3,lsl#2] @ Te4[s0>>16]
|
||||||
and $i3,lr,$s1,lsr#8
|
and $i3,lr,$s1,lsr#8
|
||||||
|
ldrb $s0,[$tbl,$s0,lsl#2] @ Te4[s0>>24]
|
||||||
mov $s1,$s1,lsr#24
|
mov $s1,$s1,lsr#24
|
||||||
|
|
||||||
ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s1>>16]
|
ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s1>>16]
|
||||||
ldrb $s1,[$tbl,$s1,lsl#2] @ Te4[s1>>24]
|
|
||||||
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s1>>0]
|
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s1>>0]
|
||||||
ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s1>>8]
|
ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s1>>8]
|
||||||
eor $s0,$i1,$s0,lsl#8
|
eor $s0,$i1,$s0,lsl#8
|
||||||
eor $s1,$t1,$s1,lsl#24
|
ldrb $s1,[$tbl,$s1,lsl#2] @ Te4[s1>>24]
|
||||||
eor $t2,$i2,$t2,lsl#8
|
|
||||||
eor $t3,$i3,$t3,lsl#8
|
|
||||||
|
|
||||||
and $i1,lr,$s2,lsr#8 @ i0
|
and $i1,lr,$s2,lsr#8 @ i0
|
||||||
|
eor $t2,$i2,$t2,lsl#8
|
||||||
and $i2,lr,$s2,lsr#16 @ i1
|
and $i2,lr,$s2,lsr#16 @ i1
|
||||||
|
eor $t3,$i3,$t3,lsl#8
|
||||||
and $i3,lr,$s2
|
and $i3,lr,$s2
|
||||||
mov $s2,$s2,lsr#24
|
eor $s1,$t1,$s1,lsl#24
|
||||||
ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s2>>8]
|
ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s2>>8]
|
||||||
|
mov $s2,$s2,lsr#24
|
||||||
|
|
||||||
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s2>>16]
|
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s2>>16]
|
||||||
ldrb $s2,[$tbl,$s2,lsl#2] @ Te4[s2>>24]
|
|
||||||
ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s2>>0]
|
ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s2>>0]
|
||||||
eor $s0,$i1,$s0,lsl#8
|
eor $s0,$i1,$s0,lsl#8
|
||||||
eor $s1,$s1,$i2,lsl#16
|
ldrb $s2,[$tbl,$s2,lsl#2] @ Te4[s2>>24]
|
||||||
eor $s2,$t2,$s2,lsl#24
|
|
||||||
eor $t3,$i3,$t3,lsl#8
|
|
||||||
|
|
||||||
and $i1,lr,$s3 @ i0
|
and $i1,lr,$s3 @ i0
|
||||||
|
eor $s1,$s1,$i2,lsl#16
|
||||||
and $i2,lr,$s3,lsr#8 @ i1
|
and $i2,lr,$s3,lsr#8 @ i1
|
||||||
|
eor $t3,$i3,$t3,lsl#8
|
||||||
and $i3,lr,$s3,lsr#16 @ i2
|
and $i3,lr,$s3,lsr#16 @ i2
|
||||||
mov $s3,$s3,lsr#24
|
eor $s2,$t2,$s2,lsl#24
|
||||||
ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s3>>0]
|
ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s3>>0]
|
||||||
|
mov $s3,$s3,lsr#24
|
||||||
|
|
||||||
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s3>>8]
|
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s3>>8]
|
||||||
ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s3>>16]
|
ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s3>>16]
|
||||||
ldrb $s3,[$tbl,$s3,lsl#2] @ Te4[s3>>24]
|
|
||||||
eor $s0,$i1,$s0,lsl#8
|
eor $s0,$i1,$s0,lsl#8
|
||||||
|
ldrb $s3,[$tbl,$s3,lsl#2] @ Te4[s3>>24]
|
||||||
|
ldr $i1,[$key,#0]
|
||||||
eor $s1,$s1,$i2,lsl#8
|
eor $s1,$s1,$i2,lsl#8
|
||||||
|
ldr $t1,[$key,#4]
|
||||||
eor $s2,$s2,$i3,lsl#16
|
eor $s2,$s2,$i3,lsl#16
|
||||||
|
ldr $t2,[$key,#8]
|
||||||
eor $s3,$t3,$s3,lsl#24
|
eor $s3,$t3,$s3,lsl#24
|
||||||
|
ldr $t3,[$key,#12]
|
||||||
|
|
||||||
ldr lr,[sp],#4 @ pop lr
|
eor $s0,$s0,$i1
|
||||||
ldr $t1,[$key,#0]
|
eor $s1,$s1,$t1
|
||||||
ldr $t2,[$key,#4]
|
eor $s2,$s2,$t2
|
||||||
ldr $t3,[$key,#8]
|
eor $s3,$s3,$t3
|
||||||
ldr $i1,[$key,#12]
|
|
||||||
eor $s0,$s0,$t1
|
|
||||||
eor $s1,$s1,$t2
|
|
||||||
eor $s2,$s2,$t3
|
|
||||||
eor $s3,$s3,$i1
|
|
||||||
|
|
||||||
sub $tbl,$tbl,#2
|
sub $tbl,$tbl,#2
|
||||||
mov pc,lr @ return
|
ldr pc,[sp],#4 @ pop and return
|
||||||
.size _armv4_AES_encrypt,.-_armv4_AES_encrypt
|
.size _armv4_AES_encrypt,.-_armv4_AES_encrypt
|
||||||
|
|
||||||
.global AES_set_encrypt_key
|
.global AES_set_encrypt_key
|
||||||
@@ -399,31 +403,31 @@ AES_set_encrypt_key:
|
|||||||
ldrb $t2,[$rounds,#1]
|
ldrb $t2,[$rounds,#1]
|
||||||
ldrb $t3,[$rounds,#0]
|
ldrb $t3,[$rounds,#0]
|
||||||
orr $s0,$s0,$t1,lsl#8
|
orr $s0,$s0,$t1,lsl#8
|
||||||
orr $s0,$s0,$t2,lsl#16
|
|
||||||
orr $s0,$s0,$t3,lsl#24
|
|
||||||
ldrb $s1,[$rounds,#7]
|
ldrb $s1,[$rounds,#7]
|
||||||
|
orr $s0,$s0,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#6]
|
ldrb $t1,[$rounds,#6]
|
||||||
|
orr $s0,$s0,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#5]
|
ldrb $t2,[$rounds,#5]
|
||||||
ldrb $t3,[$rounds,#4]
|
ldrb $t3,[$rounds,#4]
|
||||||
orr $s1,$s1,$t1,lsl#8
|
orr $s1,$s1,$t1,lsl#8
|
||||||
orr $s1,$s1,$t2,lsl#16
|
|
||||||
orr $s1,$s1,$t3,lsl#24
|
|
||||||
ldrb $s2,[$rounds,#11]
|
ldrb $s2,[$rounds,#11]
|
||||||
|
orr $s1,$s1,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#10]
|
ldrb $t1,[$rounds,#10]
|
||||||
|
orr $s1,$s1,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#9]
|
ldrb $t2,[$rounds,#9]
|
||||||
ldrb $t3,[$rounds,#8]
|
ldrb $t3,[$rounds,#8]
|
||||||
orr $s2,$s2,$t1,lsl#8
|
orr $s2,$s2,$t1,lsl#8
|
||||||
orr $s2,$s2,$t2,lsl#16
|
|
||||||
orr $s2,$s2,$t3,lsl#24
|
|
||||||
ldrb $s3,[$rounds,#15]
|
ldrb $s3,[$rounds,#15]
|
||||||
|
orr $s2,$s2,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#14]
|
ldrb $t1,[$rounds,#14]
|
||||||
|
orr $s2,$s2,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#13]
|
ldrb $t2,[$rounds,#13]
|
||||||
ldrb $t3,[$rounds,#12]
|
ldrb $t3,[$rounds,#12]
|
||||||
orr $s3,$s3,$t1,lsl#8
|
orr $s3,$s3,$t1,lsl#8
|
||||||
orr $s3,$s3,$t2,lsl#16
|
|
||||||
orr $s3,$s3,$t3,lsl#24
|
|
||||||
str $s0,[$key],#16
|
str $s0,[$key],#16
|
||||||
|
orr $s3,$s3,$t2,lsl#16
|
||||||
str $s1,[$key,#-12]
|
str $s1,[$key,#-12]
|
||||||
|
orr $s3,$s3,$t3,lsl#24
|
||||||
str $s2,[$key,#-8]
|
str $s2,[$key,#-8]
|
||||||
str $s3,[$key,#-4]
|
str $s3,[$key,#-4]
|
||||||
|
|
||||||
@@ -437,27 +441,26 @@ AES_set_encrypt_key:
|
|||||||
.L128_loop:
|
.L128_loop:
|
||||||
and $t2,lr,$s3,lsr#24
|
and $t2,lr,$s3,lsr#24
|
||||||
and $i1,lr,$s3,lsr#16
|
and $i1,lr,$s3,lsr#16
|
||||||
and $i2,lr,$s3,lsr#8
|
|
||||||
and $i3,lr,$s3
|
|
||||||
ldrb $t2,[$tbl,$t2]
|
ldrb $t2,[$tbl,$t2]
|
||||||
|
and $i2,lr,$s3,lsr#8
|
||||||
ldrb $i1,[$tbl,$i1]
|
ldrb $i1,[$tbl,$i1]
|
||||||
|
and $i3,lr,$s3
|
||||||
ldrb $i2,[$tbl,$i2]
|
ldrb $i2,[$tbl,$i2]
|
||||||
ldrb $i3,[$tbl,$i3]
|
|
||||||
ldr $t1,[$t3],#4 @ rcon[i++]
|
|
||||||
orr $t2,$t2,$i1,lsl#24
|
orr $t2,$t2,$i1,lsl#24
|
||||||
|
ldrb $i3,[$tbl,$i3]
|
||||||
orr $t2,$t2,$i2,lsl#16
|
orr $t2,$t2,$i2,lsl#16
|
||||||
|
ldr $t1,[$t3],#4 @ rcon[i++]
|
||||||
orr $t2,$t2,$i3,lsl#8
|
orr $t2,$t2,$i3,lsl#8
|
||||||
eor $t2,$t2,$t1
|
eor $t2,$t2,$t1
|
||||||
eor $s0,$s0,$t2 @ rk[4]=rk[0]^...
|
eor $s0,$s0,$t2 @ rk[4]=rk[0]^...
|
||||||
eor $s1,$s1,$s0 @ rk[5]=rk[1]^rk[4]
|
eor $s1,$s1,$s0 @ rk[5]=rk[1]^rk[4]
|
||||||
eor $s2,$s2,$s1 @ rk[6]=rk[2]^rk[5]
|
|
||||||
eor $s3,$s3,$s2 @ rk[7]=rk[3]^rk[6]
|
|
||||||
str $s0,[$key],#16
|
str $s0,[$key],#16
|
||||||
|
eor $s2,$s2,$s1 @ rk[6]=rk[2]^rk[5]
|
||||||
str $s1,[$key,#-12]
|
str $s1,[$key,#-12]
|
||||||
|
eor $s3,$s3,$s2 @ rk[7]=rk[3]^rk[6]
|
||||||
str $s2,[$key,#-8]
|
str $s2,[$key,#-8]
|
||||||
str $s3,[$key,#-4]
|
|
||||||
|
|
||||||
subs $rounds,$rounds,#1
|
subs $rounds,$rounds,#1
|
||||||
|
str $s3,[$key,#-4]
|
||||||
bne .L128_loop
|
bne .L128_loop
|
||||||
sub r2,$key,#176
|
sub r2,$key,#176
|
||||||
b .Ldone
|
b .Ldone
|
||||||
@@ -468,16 +471,16 @@ AES_set_encrypt_key:
|
|||||||
ldrb $t2,[$rounds,#17]
|
ldrb $t2,[$rounds,#17]
|
||||||
ldrb $t3,[$rounds,#16]
|
ldrb $t3,[$rounds,#16]
|
||||||
orr $i2,$i2,$t1,lsl#8
|
orr $i2,$i2,$t1,lsl#8
|
||||||
orr $i2,$i2,$t2,lsl#16
|
|
||||||
orr $i2,$i2,$t3,lsl#24
|
|
||||||
ldrb $i3,[$rounds,#23]
|
ldrb $i3,[$rounds,#23]
|
||||||
|
orr $i2,$i2,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#22]
|
ldrb $t1,[$rounds,#22]
|
||||||
|
orr $i2,$i2,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#21]
|
ldrb $t2,[$rounds,#21]
|
||||||
ldrb $t3,[$rounds,#20]
|
ldrb $t3,[$rounds,#20]
|
||||||
orr $i3,$i3,$t1,lsl#8
|
orr $i3,$i3,$t1,lsl#8
|
||||||
orr $i3,$i3,$t2,lsl#16
|
orr $i3,$i3,$t2,lsl#16
|
||||||
orr $i3,$i3,$t3,lsl#24
|
|
||||||
str $i2,[$key],#8
|
str $i2,[$key],#8
|
||||||
|
orr $i3,$i3,$t3,lsl#24
|
||||||
str $i3,[$key,#-4]
|
str $i3,[$key,#-4]
|
||||||
|
|
||||||
teq lr,#192
|
teq lr,#192
|
||||||
@@ -491,27 +494,26 @@ AES_set_encrypt_key:
|
|||||||
.L192_loop:
|
.L192_loop:
|
||||||
and $t2,lr,$i3,lsr#24
|
and $t2,lr,$i3,lsr#24
|
||||||
and $i1,lr,$i3,lsr#16
|
and $i1,lr,$i3,lsr#16
|
||||||
and $i2,lr,$i3,lsr#8
|
|
||||||
and $i3,lr,$i3
|
|
||||||
ldrb $t2,[$tbl,$t2]
|
ldrb $t2,[$tbl,$t2]
|
||||||
|
and $i2,lr,$i3,lsr#8
|
||||||
ldrb $i1,[$tbl,$i1]
|
ldrb $i1,[$tbl,$i1]
|
||||||
|
and $i3,lr,$i3
|
||||||
ldrb $i2,[$tbl,$i2]
|
ldrb $i2,[$tbl,$i2]
|
||||||
ldrb $i3,[$tbl,$i3]
|
|
||||||
ldr $t1,[$t3],#4 @ rcon[i++]
|
|
||||||
orr $t2,$t2,$i1,lsl#24
|
orr $t2,$t2,$i1,lsl#24
|
||||||
|
ldrb $i3,[$tbl,$i3]
|
||||||
orr $t2,$t2,$i2,lsl#16
|
orr $t2,$t2,$i2,lsl#16
|
||||||
|
ldr $t1,[$t3],#4 @ rcon[i++]
|
||||||
orr $t2,$t2,$i3,lsl#8
|
orr $t2,$t2,$i3,lsl#8
|
||||||
eor $i3,$t2,$t1
|
eor $i3,$t2,$t1
|
||||||
eor $s0,$s0,$i3 @ rk[6]=rk[0]^...
|
eor $s0,$s0,$i3 @ rk[6]=rk[0]^...
|
||||||
eor $s1,$s1,$s0 @ rk[7]=rk[1]^rk[6]
|
eor $s1,$s1,$s0 @ rk[7]=rk[1]^rk[6]
|
||||||
eor $s2,$s2,$s1 @ rk[8]=rk[2]^rk[7]
|
|
||||||
eor $s3,$s3,$s2 @ rk[9]=rk[3]^rk[8]
|
|
||||||
str $s0,[$key],#24
|
str $s0,[$key],#24
|
||||||
|
eor $s2,$s2,$s1 @ rk[8]=rk[2]^rk[7]
|
||||||
str $s1,[$key,#-20]
|
str $s1,[$key,#-20]
|
||||||
|
eor $s3,$s3,$s2 @ rk[9]=rk[3]^rk[8]
|
||||||
str $s2,[$key,#-16]
|
str $s2,[$key,#-16]
|
||||||
str $s3,[$key,#-12]
|
|
||||||
|
|
||||||
subs $rounds,$rounds,#1
|
subs $rounds,$rounds,#1
|
||||||
|
str $s3,[$key,#-12]
|
||||||
subeq r2,$key,#216
|
subeq r2,$key,#216
|
||||||
beq .Ldone
|
beq .Ldone
|
||||||
|
|
||||||
@@ -529,16 +531,16 @@ AES_set_encrypt_key:
|
|||||||
ldrb $t2,[$rounds,#25]
|
ldrb $t2,[$rounds,#25]
|
||||||
ldrb $t3,[$rounds,#24]
|
ldrb $t3,[$rounds,#24]
|
||||||
orr $i2,$i2,$t1,lsl#8
|
orr $i2,$i2,$t1,lsl#8
|
||||||
orr $i2,$i2,$t2,lsl#16
|
|
||||||
orr $i2,$i2,$t3,lsl#24
|
|
||||||
ldrb $i3,[$rounds,#31]
|
ldrb $i3,[$rounds,#31]
|
||||||
|
orr $i2,$i2,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#30]
|
ldrb $t1,[$rounds,#30]
|
||||||
|
orr $i2,$i2,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#29]
|
ldrb $t2,[$rounds,#29]
|
||||||
ldrb $t3,[$rounds,#28]
|
ldrb $t3,[$rounds,#28]
|
||||||
orr $i3,$i3,$t1,lsl#8
|
orr $i3,$i3,$t1,lsl#8
|
||||||
orr $i3,$i3,$t2,lsl#16
|
orr $i3,$i3,$t2,lsl#16
|
||||||
orr $i3,$i3,$t3,lsl#24
|
|
||||||
str $i2,[$key],#8
|
str $i2,[$key],#8
|
||||||
|
orr $i3,$i3,$t3,lsl#24
|
||||||
str $i3,[$key,#-4]
|
str $i3,[$key,#-4]
|
||||||
|
|
||||||
mov $rounds,#14
|
mov $rounds,#14
|
||||||
@@ -550,52 +552,51 @@ AES_set_encrypt_key:
|
|||||||
.L256_loop:
|
.L256_loop:
|
||||||
and $t2,lr,$i3,lsr#24
|
and $t2,lr,$i3,lsr#24
|
||||||
and $i1,lr,$i3,lsr#16
|
and $i1,lr,$i3,lsr#16
|
||||||
and $i2,lr,$i3,lsr#8
|
|
||||||
and $i3,lr,$i3
|
|
||||||
ldrb $t2,[$tbl,$t2]
|
ldrb $t2,[$tbl,$t2]
|
||||||
|
and $i2,lr,$i3,lsr#8
|
||||||
ldrb $i1,[$tbl,$i1]
|
ldrb $i1,[$tbl,$i1]
|
||||||
|
and $i3,lr,$i3
|
||||||
ldrb $i2,[$tbl,$i2]
|
ldrb $i2,[$tbl,$i2]
|
||||||
ldrb $i3,[$tbl,$i3]
|
|
||||||
ldr $t1,[$t3],#4 @ rcon[i++]
|
|
||||||
orr $t2,$t2,$i1,lsl#24
|
orr $t2,$t2,$i1,lsl#24
|
||||||
|
ldrb $i3,[$tbl,$i3]
|
||||||
orr $t2,$t2,$i2,lsl#16
|
orr $t2,$t2,$i2,lsl#16
|
||||||
|
ldr $t1,[$t3],#4 @ rcon[i++]
|
||||||
orr $t2,$t2,$i3,lsl#8
|
orr $t2,$t2,$i3,lsl#8
|
||||||
eor $i3,$t2,$t1
|
eor $i3,$t2,$t1
|
||||||
eor $s0,$s0,$i3 @ rk[8]=rk[0]^...
|
eor $s0,$s0,$i3 @ rk[8]=rk[0]^...
|
||||||
eor $s1,$s1,$s0 @ rk[9]=rk[1]^rk[8]
|
eor $s1,$s1,$s0 @ rk[9]=rk[1]^rk[8]
|
||||||
eor $s2,$s2,$s1 @ rk[10]=rk[2]^rk[9]
|
|
||||||
eor $s3,$s3,$s2 @ rk[11]=rk[3]^rk[10]
|
|
||||||
str $s0,[$key],#32
|
str $s0,[$key],#32
|
||||||
|
eor $s2,$s2,$s1 @ rk[10]=rk[2]^rk[9]
|
||||||
str $s1,[$key,#-28]
|
str $s1,[$key,#-28]
|
||||||
|
eor $s3,$s3,$s2 @ rk[11]=rk[3]^rk[10]
|
||||||
str $s2,[$key,#-24]
|
str $s2,[$key,#-24]
|
||||||
str $s3,[$key,#-20]
|
|
||||||
|
|
||||||
subs $rounds,$rounds,#1
|
subs $rounds,$rounds,#1
|
||||||
|
str $s3,[$key,#-20]
|
||||||
subeq r2,$key,#256
|
subeq r2,$key,#256
|
||||||
beq .Ldone
|
beq .Ldone
|
||||||
|
|
||||||
and $t2,lr,$s3
|
and $t2,lr,$s3
|
||||||
and $i1,lr,$s3,lsr#8
|
and $i1,lr,$s3,lsr#8
|
||||||
and $i2,lr,$s3,lsr#16
|
|
||||||
and $i3,lr,$s3,lsr#24
|
|
||||||
ldrb $t2,[$tbl,$t2]
|
ldrb $t2,[$tbl,$t2]
|
||||||
|
and $i2,lr,$s3,lsr#16
|
||||||
ldrb $i1,[$tbl,$i1]
|
ldrb $i1,[$tbl,$i1]
|
||||||
|
and $i3,lr,$s3,lsr#24
|
||||||
ldrb $i2,[$tbl,$i2]
|
ldrb $i2,[$tbl,$i2]
|
||||||
ldrb $i3,[$tbl,$i3]
|
|
||||||
orr $t2,$t2,$i1,lsl#8
|
orr $t2,$t2,$i1,lsl#8
|
||||||
|
ldrb $i3,[$tbl,$i3]
|
||||||
orr $t2,$t2,$i2,lsl#16
|
orr $t2,$t2,$i2,lsl#16
|
||||||
|
ldr $t1,[$key,#-48]
|
||||||
orr $t2,$t2,$i3,lsl#24
|
orr $t2,$t2,$i3,lsl#24
|
||||||
|
|
||||||
ldr $t1,[$key,#-48]
|
|
||||||
ldr $i1,[$key,#-44]
|
ldr $i1,[$key,#-44]
|
||||||
ldr $i2,[$key,#-40]
|
ldr $i2,[$key,#-40]
|
||||||
ldr $i3,[$key,#-36]
|
|
||||||
eor $t1,$t1,$t2 @ rk[12]=rk[4]^...
|
eor $t1,$t1,$t2 @ rk[12]=rk[4]^...
|
||||||
|
ldr $i3,[$key,#-36]
|
||||||
eor $i1,$i1,$t1 @ rk[13]=rk[5]^rk[12]
|
eor $i1,$i1,$t1 @ rk[13]=rk[5]^rk[12]
|
||||||
eor $i2,$i2,$i1 @ rk[14]=rk[6]^rk[13]
|
|
||||||
eor $i3,$i3,$i2 @ rk[15]=rk[7]^rk[14]
|
|
||||||
str $t1,[$key,#-16]
|
str $t1,[$key,#-16]
|
||||||
|
eor $i2,$i2,$i1 @ rk[14]=rk[6]^rk[13]
|
||||||
str $i1,[$key,#-12]
|
str $i1,[$key,#-12]
|
||||||
|
eor $i3,$i3,$i2 @ rk[15]=rk[7]^rk[14]
|
||||||
str $i2,[$key,#-8]
|
str $i2,[$key,#-8]
|
||||||
str $i3,[$key,#-4]
|
str $i3,[$key,#-4]
|
||||||
b .L256_loop
|
b .L256_loop
|
||||||
@@ -816,24 +817,24 @@ AES_decrypt:
|
|||||||
ldrb $t2,[$rounds,#1]
|
ldrb $t2,[$rounds,#1]
|
||||||
ldrb $t3,[$rounds,#0]
|
ldrb $t3,[$rounds,#0]
|
||||||
orr $s0,$s0,$t1,lsl#8
|
orr $s0,$s0,$t1,lsl#8
|
||||||
orr $s0,$s0,$t2,lsl#16
|
|
||||||
orr $s0,$s0,$t3,lsl#24
|
|
||||||
ldrb $s1,[$rounds,#7]
|
ldrb $s1,[$rounds,#7]
|
||||||
|
orr $s0,$s0,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#6]
|
ldrb $t1,[$rounds,#6]
|
||||||
|
orr $s0,$s0,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#5]
|
ldrb $t2,[$rounds,#5]
|
||||||
ldrb $t3,[$rounds,#4]
|
ldrb $t3,[$rounds,#4]
|
||||||
orr $s1,$s1,$t1,lsl#8
|
orr $s1,$s1,$t1,lsl#8
|
||||||
orr $s1,$s1,$t2,lsl#16
|
|
||||||
orr $s1,$s1,$t3,lsl#24
|
|
||||||
ldrb $s2,[$rounds,#11]
|
ldrb $s2,[$rounds,#11]
|
||||||
|
orr $s1,$s1,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#10]
|
ldrb $t1,[$rounds,#10]
|
||||||
|
orr $s1,$s1,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#9]
|
ldrb $t2,[$rounds,#9]
|
||||||
ldrb $t3,[$rounds,#8]
|
ldrb $t3,[$rounds,#8]
|
||||||
orr $s2,$s2,$t1,lsl#8
|
orr $s2,$s2,$t1,lsl#8
|
||||||
orr $s2,$s2,$t2,lsl#16
|
|
||||||
orr $s2,$s2,$t3,lsl#24
|
|
||||||
ldrb $s3,[$rounds,#15]
|
ldrb $s3,[$rounds,#15]
|
||||||
|
orr $s2,$s2,$t2,lsl#16
|
||||||
ldrb $t1,[$rounds,#14]
|
ldrb $t1,[$rounds,#14]
|
||||||
|
orr $s2,$s2,$t3,lsl#24
|
||||||
ldrb $t2,[$rounds,#13]
|
ldrb $t2,[$rounds,#13]
|
||||||
ldrb $t3,[$rounds,#12]
|
ldrb $t3,[$rounds,#12]
|
||||||
orr $s3,$s3,$t1,lsl#8
|
orr $s3,$s3,$t1,lsl#8
|
||||||
@@ -848,24 +849,24 @@ AES_decrypt:
|
|||||||
mov $t3,$s0,lsr#8
|
mov $t3,$s0,lsr#8
|
||||||
strb $t1,[$rounds,#0]
|
strb $t1,[$rounds,#0]
|
||||||
strb $t2,[$rounds,#1]
|
strb $t2,[$rounds,#1]
|
||||||
strb $t3,[$rounds,#2]
|
|
||||||
strb $s0,[$rounds,#3]
|
|
||||||
mov $t1,$s1,lsr#24
|
mov $t1,$s1,lsr#24
|
||||||
|
strb $t3,[$rounds,#2]
|
||||||
mov $t2,$s1,lsr#16
|
mov $t2,$s1,lsr#16
|
||||||
|
strb $s0,[$rounds,#3]
|
||||||
mov $t3,$s1,lsr#8
|
mov $t3,$s1,lsr#8
|
||||||
strb $t1,[$rounds,#4]
|
strb $t1,[$rounds,#4]
|
||||||
strb $t2,[$rounds,#5]
|
strb $t2,[$rounds,#5]
|
||||||
strb $t3,[$rounds,#6]
|
|
||||||
strb $s1,[$rounds,#7]
|
|
||||||
mov $t1,$s2,lsr#24
|
mov $t1,$s2,lsr#24
|
||||||
|
strb $t3,[$rounds,#6]
|
||||||
mov $t2,$s2,lsr#16
|
mov $t2,$s2,lsr#16
|
||||||
|
strb $s1,[$rounds,#7]
|
||||||
mov $t3,$s2,lsr#8
|
mov $t3,$s2,lsr#8
|
||||||
strb $t1,[$rounds,#8]
|
strb $t1,[$rounds,#8]
|
||||||
strb $t2,[$rounds,#9]
|
strb $t2,[$rounds,#9]
|
||||||
strb $t3,[$rounds,#10]
|
|
||||||
strb $s2,[$rounds,#11]
|
|
||||||
mov $t1,$s3,lsr#24
|
mov $t1,$s3,lsr#24
|
||||||
|
strb $t3,[$rounds,#10]
|
||||||
mov $t2,$s3,lsr#16
|
mov $t2,$s3,lsr#16
|
||||||
|
strb $s2,[$rounds,#11]
|
||||||
mov $t3,$s3,lsr#8
|
mov $t3,$s3,lsr#8
|
||||||
strb $t1,[$rounds,#12]
|
strb $t1,[$rounds,#12]
|
||||||
strb $t2,[$rounds,#13]
|
strb $t2,[$rounds,#13]
|
||||||
@@ -882,146 +883,143 @@ AES_decrypt:
|
|||||||
.align 2
|
.align 2
|
||||||
_armv4_AES_decrypt:
|
_armv4_AES_decrypt:
|
||||||
str lr,[sp,#-4]! @ push lr
|
str lr,[sp,#-4]! @ push lr
|
||||||
ldr $t1,[$key],#16
|
ldmia $key!,{$t1-$i1}
|
||||||
ldr $t2,[$key,#-12]
|
|
||||||
ldr $t3,[$key,#-8]
|
|
||||||
ldr $i1,[$key,#-4]
|
|
||||||
ldr $rounds,[$key,#240-16]
|
|
||||||
eor $s0,$s0,$t1
|
eor $s0,$s0,$t1
|
||||||
|
ldr $rounds,[$key,#240-16]
|
||||||
eor $s1,$s1,$t2
|
eor $s1,$s1,$t2
|
||||||
eor $s2,$s2,$t3
|
eor $s2,$s2,$t3
|
||||||
eor $s3,$s3,$i1
|
eor $s3,$s3,$i1
|
||||||
sub $rounds,$rounds,#1
|
sub $rounds,$rounds,#1
|
||||||
mov lr,#255
|
mov lr,#255
|
||||||
|
|
||||||
.Ldec_loop:
|
|
||||||
and $i1,lr,$s0,lsr#16
|
and $i1,lr,$s0,lsr#16
|
||||||
and $i2,lr,$s0,lsr#8
|
and $i2,lr,$s0,lsr#8
|
||||||
and $i3,lr,$s0
|
and $i3,lr,$s0
|
||||||
mov $s0,$s0,lsr#24
|
mov $s0,$s0,lsr#24
|
||||||
|
.Ldec_loop:
|
||||||
ldr $t1,[$tbl,$i1,lsl#2] @ Td1[s0>>16]
|
ldr $t1,[$tbl,$i1,lsl#2] @ Td1[s0>>16]
|
||||||
ldr $s0,[$tbl,$s0,lsl#2] @ Td0[s0>>24]
|
|
||||||
ldr $t2,[$tbl,$i2,lsl#2] @ Td2[s0>>8]
|
|
||||||
ldr $t3,[$tbl,$i3,lsl#2] @ Td3[s0>>0]
|
|
||||||
|
|
||||||
and $i1,lr,$s1 @ i0
|
and $i1,lr,$s1 @ i0
|
||||||
|
ldr $t2,[$tbl,$i2,lsl#2] @ Td2[s0>>8]
|
||||||
and $i2,lr,$s1,lsr#16
|
and $i2,lr,$s1,lsr#16
|
||||||
|
ldr $t3,[$tbl,$i3,lsl#2] @ Td3[s0>>0]
|
||||||
and $i3,lr,$s1,lsr#8
|
and $i3,lr,$s1,lsr#8
|
||||||
|
ldr $s0,[$tbl,$s0,lsl#2] @ Td0[s0>>24]
|
||||||
mov $s1,$s1,lsr#24
|
mov $s1,$s1,lsr#24
|
||||||
|
|
||||||
ldr $i1,[$tbl,$i1,lsl#2] @ Td3[s1>>0]
|
ldr $i1,[$tbl,$i1,lsl#2] @ Td3[s1>>0]
|
||||||
ldr $s1,[$tbl,$s1,lsl#2] @ Td0[s1>>24]
|
|
||||||
ldr $i2,[$tbl,$i2,lsl#2] @ Td1[s1>>16]
|
ldr $i2,[$tbl,$i2,lsl#2] @ Td1[s1>>16]
|
||||||
ldr $i3,[$tbl,$i3,lsl#2] @ Td2[s1>>8]
|
ldr $i3,[$tbl,$i3,lsl#2] @ Td2[s1>>8]
|
||||||
eor $s0,$s0,$i1,ror#24
|
eor $s0,$s0,$i1,ror#24
|
||||||
eor $s1,$s1,$t1,ror#8
|
ldr $s1,[$tbl,$s1,lsl#2] @ Td0[s1>>24]
|
||||||
eor $t2,$i2,$t2,ror#8
|
|
||||||
eor $t3,$i3,$t3,ror#8
|
|
||||||
|
|
||||||
and $i1,lr,$s2,lsr#8 @ i0
|
and $i1,lr,$s2,lsr#8 @ i0
|
||||||
|
eor $t2,$i2,$t2,ror#8
|
||||||
and $i2,lr,$s2 @ i1
|
and $i2,lr,$s2 @ i1
|
||||||
|
eor $t3,$i3,$t3,ror#8
|
||||||
and $i3,lr,$s2,lsr#16
|
and $i3,lr,$s2,lsr#16
|
||||||
mov $s2,$s2,lsr#24
|
eor $s1,$s1,$t1,ror#8
|
||||||
ldr $i1,[$tbl,$i1,lsl#2] @ Td2[s2>>8]
|
ldr $i1,[$tbl,$i1,lsl#2] @ Td2[s2>>8]
|
||||||
|
mov $s2,$s2,lsr#24
|
||||||
|
|
||||||
ldr $i2,[$tbl,$i2,lsl#2] @ Td3[s2>>0]
|
ldr $i2,[$tbl,$i2,lsl#2] @ Td3[s2>>0]
|
||||||
ldr $s2,[$tbl,$s2,lsl#2] @ Td0[s2>>24]
|
|
||||||
ldr $i3,[$tbl,$i3,lsl#2] @ Td1[s2>>16]
|
ldr $i3,[$tbl,$i3,lsl#2] @ Td1[s2>>16]
|
||||||
eor $s0,$s0,$i1,ror#16
|
eor $s0,$s0,$i1,ror#16
|
||||||
eor $s1,$s1,$i2,ror#24
|
ldr $s2,[$tbl,$s2,lsl#2] @ Td0[s2>>24]
|
||||||
eor $s2,$s2,$t2,ror#8
|
|
||||||
eor $t3,$i3,$t3,ror#8
|
|
||||||
|
|
||||||
and $i1,lr,$s3,lsr#16 @ i0
|
and $i1,lr,$s3,lsr#16 @ i0
|
||||||
|
eor $s1,$s1,$i2,ror#24
|
||||||
and $i2,lr,$s3,lsr#8 @ i1
|
and $i2,lr,$s3,lsr#8 @ i1
|
||||||
|
eor $t3,$i3,$t3,ror#8
|
||||||
and $i3,lr,$s3 @ i2
|
and $i3,lr,$s3 @ i2
|
||||||
mov $s3,$s3,lsr#24
|
eor $s2,$s2,$t2,ror#8
|
||||||
ldr $i1,[$tbl,$i1,lsl#2] @ Td1[s3>>16]
|
ldr $i1,[$tbl,$i1,lsl#2] @ Td1[s3>>16]
|
||||||
|
mov $s3,$s3,lsr#24
|
||||||
|
|
||||||
ldr $i2,[$tbl,$i2,lsl#2] @ Td2[s3>>8]
|
ldr $i2,[$tbl,$i2,lsl#2] @ Td2[s3>>8]
|
||||||
ldr $i3,[$tbl,$i3,lsl#2] @ Td3[s3>>0]
|
ldr $i3,[$tbl,$i3,lsl#2] @ Td3[s3>>0]
|
||||||
ldr $s3,[$tbl,$s3,lsl#2] @ Td0[s3>>24]
|
|
||||||
eor $s0,$s0,$i1,ror#8
|
eor $s0,$s0,$i1,ror#8
|
||||||
|
ldr $s3,[$tbl,$s3,lsl#2] @ Td0[s3>>24]
|
||||||
eor $s1,$s1,$i2,ror#16
|
eor $s1,$s1,$i2,ror#16
|
||||||
eor $s2,$s2,$i3,ror#24
|
eor $s2,$s2,$i3,ror#24
|
||||||
|
ldr $i1,[$key],#16
|
||||||
eor $s3,$s3,$t3,ror#8
|
eor $s3,$s3,$t3,ror#8
|
||||||
|
|
||||||
ldr $t1,[$key],#16
|
ldr $t1,[$key,#-12]
|
||||||
ldr $t2,[$key,#-12]
|
ldr $t2,[$key,#-8]
|
||||||
ldr $t3,[$key,#-8]
|
eor $s0,$s0,$i1
|
||||||
ldr $i1,[$key,#-4]
|
ldr $t3,[$key,#-4]
|
||||||
eor $s0,$s0,$t1
|
and $i1,lr,$s0,lsr#16
|
||||||
eor $s1,$s1,$t2
|
eor $s1,$s1,$t1
|
||||||
eor $s2,$s2,$t3
|
and $i2,lr,$s0,lsr#8
|
||||||
eor $s3,$s3,$i1
|
eor $s2,$s2,$t2
|
||||||
|
and $i3,lr,$s0
|
||||||
|
eor $s3,$s3,$t3
|
||||||
|
mov $s0,$s0,lsr#24
|
||||||
|
|
||||||
subs $rounds,$rounds,#1
|
subs $rounds,$rounds,#1
|
||||||
bne .Ldec_loop
|
bne .Ldec_loop
|
||||||
|
|
||||||
add $tbl,$tbl,#1024
|
add $tbl,$tbl,#1024
|
||||||
|
|
||||||
ldr $t1,[$tbl,#0] @ prefetch Td4
|
ldr $t2,[$tbl,#0] @ prefetch Td4
|
||||||
ldr $t2,[$tbl,#32]
|
ldr $t3,[$tbl,#32]
|
||||||
ldr $t3,[$tbl,#64]
|
ldr $t1,[$tbl,#64]
|
||||||
ldr $i1,[$tbl,#96]
|
ldr $t2,[$tbl,#96]
|
||||||
ldr $i2,[$tbl,#128]
|
ldr $t3,[$tbl,#128]
|
||||||
ldr $i3,[$tbl,#160]
|
ldr $t1,[$tbl,#160]
|
||||||
ldr $t1,[$tbl,#192]
|
ldr $t2,[$tbl,#192]
|
||||||
ldr $t2,[$tbl,#224]
|
ldr $t3,[$tbl,#224]
|
||||||
|
|
||||||
and $i1,lr,$s0,lsr#16
|
ldrb $s0,[$tbl,$s0] @ Td4[s0>>24]
|
||||||
and $i2,lr,$s0,lsr#8
|
|
||||||
and $i3,lr,$s0
|
|
||||||
ldrb $s0,[$tbl,$s0,lsr#24] @ Td4[s0>>24]
|
|
||||||
ldrb $t1,[$tbl,$i1] @ Td4[s0>>16]
|
ldrb $t1,[$tbl,$i1] @ Td4[s0>>16]
|
||||||
ldrb $t2,[$tbl,$i2] @ Td4[s0>>8]
|
|
||||||
ldrb $t3,[$tbl,$i3] @ Td4[s0>>0]
|
|
||||||
|
|
||||||
and $i1,lr,$s1 @ i0
|
and $i1,lr,$s1 @ i0
|
||||||
|
ldrb $t2,[$tbl,$i2] @ Td4[s0>>8]
|
||||||
and $i2,lr,$s1,lsr#16
|
and $i2,lr,$s1,lsr#16
|
||||||
|
ldrb $t3,[$tbl,$i3] @ Td4[s0>>0]
|
||||||
and $i3,lr,$s1,lsr#8
|
and $i3,lr,$s1,lsr#8
|
||||||
|
|
||||||
ldrb $i1,[$tbl,$i1] @ Td4[s1>>0]
|
ldrb $i1,[$tbl,$i1] @ Td4[s1>>0]
|
||||||
ldrb $s1,[$tbl,$s1,lsr#24] @ Td4[s1>>24]
|
ldrb $s1,[$tbl,$s1,lsr#24] @ Td4[s1>>24]
|
||||||
ldrb $i2,[$tbl,$i2] @ Td4[s1>>16]
|
ldrb $i2,[$tbl,$i2] @ Td4[s1>>16]
|
||||||
ldrb $i3,[$tbl,$i3] @ Td4[s1>>8]
|
|
||||||
eor $s0,$i1,$s0,lsl#24
|
eor $s0,$i1,$s0,lsl#24
|
||||||
|
ldrb $i3,[$tbl,$i3] @ Td4[s1>>8]
|
||||||
eor $s1,$t1,$s1,lsl#8
|
eor $s1,$t1,$s1,lsl#8
|
||||||
eor $t2,$t2,$i2,lsl#8
|
|
||||||
eor $t3,$t3,$i3,lsl#8
|
|
||||||
|
|
||||||
and $i1,lr,$s2,lsr#8 @ i0
|
and $i1,lr,$s2,lsr#8 @ i0
|
||||||
|
eor $t2,$t2,$i2,lsl#8
|
||||||
and $i2,lr,$s2 @ i1
|
and $i2,lr,$s2 @ i1
|
||||||
and $i3,lr,$s2,lsr#16
|
eor $t3,$t3,$i3,lsl#8
|
||||||
ldrb $i1,[$tbl,$i1] @ Td4[s2>>8]
|
ldrb $i1,[$tbl,$i1] @ Td4[s2>>8]
|
||||||
|
and $i3,lr,$s2,lsr#16
|
||||||
|
|
||||||
ldrb $i2,[$tbl,$i2] @ Td4[s2>>0]
|
ldrb $i2,[$tbl,$i2] @ Td4[s2>>0]
|
||||||
ldrb $s2,[$tbl,$s2,lsr#24] @ Td4[s2>>24]
|
ldrb $s2,[$tbl,$s2,lsr#24] @ Td4[s2>>24]
|
||||||
ldrb $i3,[$tbl,$i3] @ Td4[s2>>16]
|
|
||||||
eor $s0,$s0,$i1,lsl#8
|
eor $s0,$s0,$i1,lsl#8
|
||||||
|
ldrb $i3,[$tbl,$i3] @ Td4[s2>>16]
|
||||||
eor $s1,$i2,$s1,lsl#16
|
eor $s1,$i2,$s1,lsl#16
|
||||||
eor $s2,$t2,$s2,lsl#16
|
|
||||||
eor $t3,$t3,$i3,lsl#16
|
|
||||||
|
|
||||||
and $i1,lr,$s3,lsr#16 @ i0
|
and $i1,lr,$s3,lsr#16 @ i0
|
||||||
|
eor $s2,$t2,$s2,lsl#16
|
||||||
and $i2,lr,$s3,lsr#8 @ i1
|
and $i2,lr,$s3,lsr#8 @ i1
|
||||||
and $i3,lr,$s3 @ i2
|
eor $t3,$t3,$i3,lsl#16
|
||||||
ldrb $i1,[$tbl,$i1] @ Td4[s3>>16]
|
ldrb $i1,[$tbl,$i1] @ Td4[s3>>16]
|
||||||
|
and $i3,lr,$s3 @ i2
|
||||||
|
|
||||||
ldrb $i2,[$tbl,$i2] @ Td4[s3>>8]
|
ldrb $i2,[$tbl,$i2] @ Td4[s3>>8]
|
||||||
ldrb $i3,[$tbl,$i3] @ Td4[s3>>0]
|
ldrb $i3,[$tbl,$i3] @ Td4[s3>>0]
|
||||||
ldrb $s3,[$tbl,$s3,lsr#24] @ Td4[s3>>24]
|
ldrb $s3,[$tbl,$s3,lsr#24] @ Td4[s3>>24]
|
||||||
eor $s0,$s0,$i1,lsl#16
|
eor $s0,$s0,$i1,lsl#16
|
||||||
|
ldr $i1,[$key,#0]
|
||||||
eor $s1,$s1,$i2,lsl#8
|
eor $s1,$s1,$i2,lsl#8
|
||||||
|
ldr $t1,[$key,#4]
|
||||||
eor $s2,$i3,$s2,lsl#8
|
eor $s2,$i3,$s2,lsl#8
|
||||||
|
ldr $t2,[$key,#8]
|
||||||
eor $s3,$t3,$s3,lsl#24
|
eor $s3,$t3,$s3,lsl#24
|
||||||
|
ldr $t3,[$key,#12]
|
||||||
|
|
||||||
ldr lr,[sp],#4 @ pop lr
|
eor $s0,$s0,$i1
|
||||||
ldr $t1,[$key,#0]
|
eor $s1,$s1,$t1
|
||||||
ldr $t2,[$key,#4]
|
eor $s2,$s2,$t2
|
||||||
ldr $t3,[$key,#8]
|
eor $s3,$s3,$t3
|
||||||
ldr $i1,[$key,#12]
|
|
||||||
eor $s0,$s0,$t1
|
|
||||||
eor $s1,$s1,$t2
|
|
||||||
eor $s2,$s2,$t3
|
|
||||||
eor $s3,$s3,$i1
|
|
||||||
|
|
||||||
sub $tbl,$tbl,#1024
|
sub $tbl,$tbl,#1024
|
||||||
mov pc,lr @ return
|
ldr pc,[sp],#4 @ pop and return
|
||||||
.size _armv4_AES_decrypt,.-_armv4_AES_decrypt
|
.size _armv4_AES_decrypt,.-_armv4_AES_decrypt
|
||||||
.asciz "AES for ARMv4, CRYPTOGAMS by <appro\@openssl.org>"
|
.asciz "AES for ARMv4, CRYPTOGAMS by <appro\@openssl.org>"
|
||||||
.align 2
|
.align 2
|
||||||
@@ -1029,3 +1027,4 @@ ___
|
|||||||
|
|
||||||
$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm; # make it possible to compile with -march=armv4
|
$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm; # make it possible to compile with -march=armv4
|
||||||
print $code;
|
print $code;
|
||||||
|
close STDOUT; # enforce flush
|
||||||
|
@@ -1176,6 +1176,7 @@ ___
|
|||||||
# As UltraSPARC T1, a.k.a. Niagara, has shared FPU, FP nops can have
|
# As UltraSPARC T1, a.k.a. Niagara, has shared FPU, FP nops can have
|
||||||
# undesired effect, so just omit them and sacrifice some portion of
|
# undesired effect, so just omit them and sacrifice some portion of
|
||||||
# percent in performance...
|
# percent in performance...
|
||||||
$code =~ s/fmovs.*$//gem;
|
$code =~ s/fmovs.*$//gm;
|
||||||
|
|
||||||
print $code;
|
print $code;
|
||||||
|
close STDOUT; # ensure flush
|
||||||
|
@@ -36,7 +36,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
|||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open OUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
*STDOUT=*OUT;
|
||||||
|
|
||||||
$verticalspin=1; # unlike 32-bit version $verticalspin performs
|
$verticalspin=1; # unlike 32-bit version $verticalspin performs
|
||||||
# ~15% better on both AMD and Intel cores
|
# ~15% better on both AMD and Intel cores
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
print <<'___';
|
||||||
.text
|
.text
|
||||||
|
|
||||||
.set noat
|
.set noat
|
||||||
@@ -68,9 +70,9 @@ OPENSSL_wipe_cpu:
|
|||||||
OPENSSL_atomic_add:
|
OPENSSL_atomic_add:
|
||||||
.frame $30,0,$26
|
.frame $30,0,$26
|
||||||
.prologue 0
|
.prologue 0
|
||||||
1: ldl_l $0,($16)
|
1: ldl_l $0,0($16)
|
||||||
addl $0,$17,$1
|
addl $0,$17,$1
|
||||||
stl_c $1,($16)
|
stl_c $1,0($16)
|
||||||
beq $1,1b
|
beq $1,1b
|
||||||
addl $0,$17,$0
|
addl $0,$17,$0
|
||||||
ret ($26)
|
ret ($26)
|
||||||
@@ -97,19 +99,19 @@ OPENSSL_cleanse:
|
|||||||
beq $0,.Laligned
|
beq $0,.Laligned
|
||||||
|
|
||||||
.Little:
|
.Little:
|
||||||
|
subq $0,8,$0
|
||||||
ldq_u $1,0($16)
|
ldq_u $1,0($16)
|
||||||
mov $16,$2
|
mov $16,$2
|
||||||
.Lalign:
|
.Lalign:
|
||||||
mskbl $1,$16,$1
|
mskbl $1,$16,$1
|
||||||
lda $16,1($16)
|
lda $16,1($16)
|
||||||
subq $17,1,$17
|
subq $17,1,$17
|
||||||
subq $0,1,$0
|
addq $0,1,$0
|
||||||
beq $17,.Lout
|
beq $17,.Lout
|
||||||
bne $0,.Lalign
|
bne $0,.Lalign
|
||||||
.Lout: stq_u $1,0($2)
|
.Lout: stq_u $1,0($2)
|
||||||
beq $17,.Ldone
|
beq $17,.Ldone
|
||||||
bic $17,7,$at
|
bic $17,7,$at
|
||||||
mov $17,$0
|
|
||||||
beq $at,.Little
|
beq $at,.Little
|
||||||
|
|
||||||
.Laligned:
|
.Laligned:
|
||||||
@@ -118,8 +120,7 @@ OPENSSL_cleanse:
|
|||||||
lda $16,8($16)
|
lda $16,8($16)
|
||||||
bic $17,7,$at
|
bic $17,7,$at
|
||||||
bne $at,.Laligned
|
bne $at,.Laligned
|
||||||
beq $17,.Ldone
|
bne $17,.Little
|
||||||
mov $17,$0
|
|
||||||
br .Little
|
|
||||||
.Ldone: ret ($26)
|
.Ldone: ret ($26)
|
||||||
.end OPENSSL_cleanse
|
.end OPENSSL_cleanse
|
||||||
|
___
|
@@ -136,11 +136,16 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
|
|||||||
|
|
||||||
p= *pp;
|
p= *pp;
|
||||||
i= *(p++);
|
i= *(p++);
|
||||||
|
if (i > 7)
|
||||||
|
{
|
||||||
|
i=ASN1_R_INVALID_BIT_STRING_BITS_LEFT;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
/* We do this to preserve the settings. If we modify
|
/* We do this to preserve the settings. If we modify
|
||||||
* the settings, via the _set_bit function, we will recalculate
|
* the settings, via the _set_bit function, we will recalculate
|
||||||
* on output */
|
* on output */
|
||||||
ret->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear */
|
ret->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear */
|
||||||
ret->flags|=(ASN1_STRING_FLAG_BITS_LEFT|(i&0x07)); /* set */
|
ret->flags|=(ASN1_STRING_FLAG_BITS_LEFT|i); /* set */
|
||||||
|
|
||||||
if (len-- > 1) /* using one because of the bits left byte */
|
if (len-- > 1) /* using one because of the bits left byte */
|
||||||
{
|
{
|
||||||
|
@@ -57,6 +57,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <limits.h>
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include <openssl/buffer.h>
|
#include <openssl/buffer.h>
|
||||||
#include <openssl/asn1_mac.h>
|
#include <openssl/asn1_mac.h>
|
||||||
@@ -143,17 +144,11 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
BUF_MEM *b;
|
BUF_MEM *b;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
int i;
|
int i;
|
||||||
int ret=-1;
|
|
||||||
ASN1_const_CTX c;
|
ASN1_const_CTX c;
|
||||||
int want=HEADER_SIZE;
|
size_t want=HEADER_SIZE;
|
||||||
int eos=0;
|
int eos=0;
|
||||||
#if defined(__GNUC__) && defined(__ia64)
|
size_t off=0;
|
||||||
/* pathetic compiler bug in all known versions as of Nov. 2002 */
|
size_t len=0;
|
||||||
long off=0;
|
|
||||||
#else
|
|
||||||
int off=0;
|
|
||||||
#endif
|
|
||||||
int len=0;
|
|
||||||
|
|
||||||
b=BUF_MEM_new();
|
b=BUF_MEM_new();
|
||||||
if (b == NULL)
|
if (b == NULL)
|
||||||
@@ -169,7 +164,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
{
|
{
|
||||||
want-=(len-off);
|
want-=(len-off);
|
||||||
|
|
||||||
if (!BUF_MEM_grow_clean(b,len+want))
|
if (len + want < len || !BUF_MEM_grow_clean(b,len+want))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
@@ -181,7 +176,14 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
|
{
|
||||||
|
if (len+i < len)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ASN1_R_TOO_LONG);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
len+=i;
|
len+=i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* else data already loaded */
|
/* else data already loaded */
|
||||||
|
|
||||||
@@ -206,6 +208,11 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
{
|
{
|
||||||
/* no data body so go round again */
|
/* no data body so go round again */
|
||||||
eos++;
|
eos++;
|
||||||
|
if (eos < 0)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ASN1_R_HEADER_TOO_LONG);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
want=HEADER_SIZE;
|
want=HEADER_SIZE;
|
||||||
}
|
}
|
||||||
else if (eos && (c.slen == 0) && (c.tag == V_ASN1_EOC))
|
else if (eos && (c.slen == 0) && (c.tag == V_ASN1_EOC))
|
||||||
@@ -220,10 +227,16 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* suck in c.slen bytes of data */
|
/* suck in c.slen bytes of data */
|
||||||
want=(int)c.slen;
|
want=c.slen;
|
||||||
if (want > (len-off))
|
if (want > (len-off))
|
||||||
{
|
{
|
||||||
want-=(len-off);
|
want-=(len-off);
|
||||||
|
if (want > INT_MAX /* BIO_read takes an int length */ ||
|
||||||
|
len+want < len)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ASN1_R_TOO_LONG);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
if (!BUF_MEM_grow_clean(b,len+want))
|
if (!BUF_MEM_grow_clean(b,len+want))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
|
||||||
@@ -238,11 +251,18 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
ASN1_R_NOT_ENOUGH_DATA);
|
ASN1_R_NOT_ENOUGH_DATA);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
/* This can't overflow because
|
||||||
|
* |len+want| didn't overflow. */
|
||||||
len+=i;
|
len+=i;
|
||||||
want -= i;
|
want-=i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
off+=(int)c.slen;
|
if (off + c.slen < off)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ASN1_R_TOO_LONG);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
off+=c.slen;
|
||||||
if (eos <= 0)
|
if (eos <= 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -252,9 +272,15 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (off > INT_MAX)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ASN1_R_TOO_LONG);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
*pb = b;
|
*pb = b;
|
||||||
return off;
|
return off;
|
||||||
err:
|
err:
|
||||||
if (b != NULL) BUF_MEM_free(b);
|
if (b != NULL) BUF_MEM_free(b);
|
||||||
return(ret);
|
return -1;
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp)
|
|||||||
int pad=0,ret,i,neg;
|
int pad=0,ret,i,neg;
|
||||||
unsigned char *p,*n,pb=0;
|
unsigned char *p,*n,pb=0;
|
||||||
|
|
||||||
if ((a == NULL) || (a->data == NULL)) return(0);
|
if (a == NULL) return(0);
|
||||||
neg=a->type & V_ASN1_NEG;
|
neg=a->type & V_ASN1_NEG;
|
||||||
if (a->length == 0)
|
if (a->length == 0)
|
||||||
ret=1;
|
ret=1;
|
||||||
@@ -386,8 +386,8 @@ long ASN1_INTEGER_get(const ASN1_INTEGER *a)
|
|||||||
|
|
||||||
if (a->length > (int)sizeof(long))
|
if (a->length > (int)sizeof(long))
|
||||||
{
|
{
|
||||||
/* hmm... a bit ugly */
|
/* hmm... a bit ugly, return all ones */
|
||||||
return(0xffffffffL);
|
return -1;
|
||||||
}
|
}
|
||||||
if (a->data == NULL)
|
if (a->data == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -139,7 +139,7 @@ int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num)
|
|||||||
ASN1err(ASN1_F_A2D_ASN1_OBJECT,ASN1_R_INVALID_DIGIT);
|
ASN1err(ASN1_F_A2D_ASN1_OBJECT,ASN1_R_INVALID_DIGIT);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (!use_bn && l > (ULONG_MAX / 10L))
|
if (!use_bn && l >= ((ULONG_MAX - 80) / 10L))
|
||||||
{
|
{
|
||||||
use_bn = 1;
|
use_bn = 1;
|
||||||
if (!bl)
|
if (!bl)
|
||||||
@@ -283,17 +283,29 @@ err:
|
|||||||
ASN1err(ASN1_F_D2I_ASN1_OBJECT,i);
|
ASN1err(ASN1_F_D2I_ASN1_OBJECT,i);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
|
ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
|
||||||
long len)
|
long len)
|
||||||
{
|
{
|
||||||
ASN1_OBJECT *ret=NULL;
|
ASN1_OBJECT *ret=NULL;
|
||||||
const unsigned char *p;
|
const unsigned char *p;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
int i;
|
int i, length;
|
||||||
/* Sanity check OID encoding: can't have leading 0x80 in
|
|
||||||
* subidentifiers, see: X.690 8.19.2
|
/* Sanity check OID encoding.
|
||||||
|
* Need at least one content octet.
|
||||||
|
* MSB must be clear in the last octet.
|
||||||
|
* can't have leading 0x80 in subidentifiers, see: X.690 8.19.2
|
||||||
*/
|
*/
|
||||||
for (i = 0, p = *pp + 1; i < len - 1; i++, p++)
|
if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL ||
|
||||||
|
p[len - 1] & 0x80)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
/* Now 0 < len <= INT_MAX, so the cast is safe. */
|
||||||
|
length = (int)len;
|
||||||
|
for (i = 0; i < length; i++, p++)
|
||||||
{
|
{
|
||||||
if (*p == 0x80 && (!i || !(p[-1] & 0x80)))
|
if (*p == 0x80 && (!i || !(p[-1] & 0x80)))
|
||||||
{
|
{
|
||||||
@@ -316,23 +328,23 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
|
|||||||
data = (unsigned char *)ret->data;
|
data = (unsigned char *)ret->data;
|
||||||
ret->data = NULL;
|
ret->data = NULL;
|
||||||
/* once detached we can change it */
|
/* once detached we can change it */
|
||||||
if ((data == NULL) || (ret->length < len))
|
if ((data == NULL) || (ret->length < length))
|
||||||
{
|
{
|
||||||
ret->length=0;
|
ret->length=0;
|
||||||
if (data != NULL) OPENSSL_free(data);
|
if (data != NULL) OPENSSL_free(data);
|
||||||
data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1);
|
data=(unsigned char *)OPENSSL_malloc(length);
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
{ i=ERR_R_MALLOC_FAILURE; goto err; }
|
{ i=ERR_R_MALLOC_FAILURE; goto err; }
|
||||||
ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA;
|
ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA;
|
||||||
}
|
}
|
||||||
memcpy(data,p,(int)len);
|
memcpy(data,p,length);
|
||||||
/* reattach data to object, after which it remains const */
|
/* reattach data to object, after which it remains const */
|
||||||
ret->data =data;
|
ret->data =data;
|
||||||
ret->length=(int)len;
|
ret->length=length;
|
||||||
ret->sn=NULL;
|
ret->sn=NULL;
|
||||||
ret->ln=NULL;
|
ret->ln=NULL;
|
||||||
/* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */
|
/* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */
|
||||||
p+=len;
|
p+=length;
|
||||||
|
|
||||||
if (a != NULL) (*a)=ret;
|
if (a != NULL) (*a)=ret;
|
||||||
*pp=p;
|
*pp=p;
|
||||||
|
@@ -74,6 +74,11 @@
|
|||||||
|
|
||||||
#define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253)
|
#define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253)
|
||||||
|
|
||||||
|
#define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \
|
||||||
|
ASN1_STRFLGS_ESC_QUOTE | \
|
||||||
|
ASN1_STRFLGS_ESC_CTRL | \
|
||||||
|
ASN1_STRFLGS_ESC_MSB)
|
||||||
|
|
||||||
|
|
||||||
/* 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.
|
||||||
@@ -148,6 +153,13 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch
|
|||||||
if(!io_ch(arg, tmphex, 3)) return -1;
|
if(!io_ch(arg, tmphex, 3)) return -1;
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
/* If we get this far and do any escaping at all must escape
|
||||||
|
* the escape character itself: backslash.
|
||||||
|
*/
|
||||||
|
if (chtmp == '\\' && flags & ESC_FLAGS) {
|
||||||
|
if(!io_ch(arg, "\\\\", 2)) return -1;
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
if(!io_ch(arg, &chtmp, 1)) return -1;
|
if(!io_ch(arg, &chtmp, 1)) return -1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -292,11 +304,6 @@ static const signed char tag2nbyte[] = {
|
|||||||
4, -1, 2 /* 28-30 */
|
4, -1, 2 /* 28-30 */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \
|
|
||||||
ASN1_STRFLGS_ESC_QUOTE | \
|
|
||||||
ASN1_STRFLGS_ESC_CTRL | \
|
|
||||||
ASN1_STRFLGS_ESC_MSB)
|
|
||||||
|
|
||||||
/* This is the main function, print out an
|
/* This is the main function, print out an
|
||||||
* ASN1_STRING taking note of various escape
|
* ASN1_STRING taking note of various escape
|
||||||
* and display options. Returns number of
|
* and display options. Returns number of
|
||||||
@@ -560,6 +567,7 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
|||||||
if(mbflag == -1) return -1;
|
if(mbflag == -1) return -1;
|
||||||
mbflag |= MBSTRING_FLAG;
|
mbflag |= MBSTRING_FLAG;
|
||||||
stmp.data = NULL;
|
stmp.data = NULL;
|
||||||
|
stmp.length = 0;
|
||||||
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;
|
||||||
*out = stmp.data;
|
*out = stmp.data;
|
||||||
|
@@ -74,7 +74,7 @@ static int sk_table_cmp(const ASN1_STRING_TABLE * const *a,
|
|||||||
* certain software (e.g. Netscape) has problems with them.
|
* certain software (e.g. Netscape) has problems with them.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static unsigned long global_mask = 0xFFFFFFFFL;
|
static unsigned long global_mask = B_ASN1_UTF8STRING;
|
||||||
|
|
||||||
void ASN1_STRING_set_default_mask(unsigned long mask)
|
void ASN1_STRING_set_default_mask(unsigned long mask)
|
||||||
{
|
{
|
||||||
@@ -95,7 +95,7 @@ unsigned long ASN1_STRING_get_default_mask(void)
|
|||||||
* default: the default value, Printable, T61, BMP.
|
* default: the default value, Printable, T61, BMP.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ASN1_STRING_set_default_mask_asc(char *p)
|
int ASN1_STRING_set_default_mask_asc(const char *p)
|
||||||
{
|
{
|
||||||
unsigned long mask;
|
unsigned long mask;
|
||||||
char *end;
|
char *end;
|
||||||
|
@@ -113,7 +113,7 @@ IMPLEMENT_STACK_OF(ASN1_TYPE)
|
|||||||
IMPLEMENT_ASN1_SET_OF(ASN1_TYPE)
|
IMPLEMENT_ASN1_SET_OF(ASN1_TYPE)
|
||||||
|
|
||||||
/* Returns 0 if they are equal, != 0 otherwise. */
|
/* Returns 0 if they are equal, != 0 otherwise. */
|
||||||
int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b)
|
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b)
|
||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
|
|
||||||
|
@@ -196,24 +196,29 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
|
|||||||
struct tm *ts;
|
struct tm *ts;
|
||||||
struct tm data;
|
struct tm data;
|
||||||
size_t len = 20;
|
size_t len = 20;
|
||||||
|
int free_s = 0;
|
||||||
|
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
|
{
|
||||||
|
free_s = 1;
|
||||||
s=M_ASN1_UTCTIME_new();
|
s=M_ASN1_UTCTIME_new();
|
||||||
|
}
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
return(NULL);
|
goto err;
|
||||||
|
|
||||||
|
|
||||||
ts=OPENSSL_gmtime(&t, &data);
|
ts=OPENSSL_gmtime(&t, &data);
|
||||||
if (ts == NULL)
|
if (ts == NULL)
|
||||||
return(NULL);
|
goto err;
|
||||||
|
|
||||||
if (offset_day || offset_sec)
|
if (offset_day || offset_sec)
|
||||||
{
|
{
|
||||||
if (!OPENSSL_gmtime_adj(ts, offset_day, offset_sec))
|
if (!OPENSSL_gmtime_adj(ts, offset_day, offset_sec))
|
||||||
return NULL;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((ts->tm_year < 50) || (ts->tm_year >= 150))
|
if((ts->tm_year < 50) || (ts->tm_year >= 150))
|
||||||
return NULL;
|
goto err;
|
||||||
|
|
||||||
p=(char *)s->data;
|
p=(char *)s->data;
|
||||||
if ((p == NULL) || ((size_t)s->length < len))
|
if ((p == NULL) || ((size_t)s->length < len))
|
||||||
@@ -222,7 +227,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
|
|||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_ASN1_UTCTIME_ADJ,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_UTCTIME_ADJ,ERR_R_MALLOC_FAILURE);
|
||||||
return(NULL);
|
goto err;
|
||||||
}
|
}
|
||||||
if (s->data != NULL)
|
if (s->data != NULL)
|
||||||
OPENSSL_free(s->data);
|
OPENSSL_free(s->data);
|
||||||
@@ -237,6 +242,10 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
|
|||||||
ebcdic2ascii(s->data, s->data, s->length);
|
ebcdic2ascii(s->data, s->data, s->length);
|
||||||
#endif
|
#endif
|
||||||
return(s);
|
return(s);
|
||||||
|
err:
|
||||||
|
if (free_s && s)
|
||||||
|
M_ASN1_UTCTIME_free(s);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -91,6 +91,12 @@ int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (signature->type == V_ASN1_BIT_STRING && signature->flags & 0x7)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_VERIFY, ASN1_R_INVALID_BIT_STRING_BITS_LEFT);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
inl=i2d(data,NULL);
|
inl=i2d(data,NULL);
|
||||||
buf_in=OPENSSL_malloc((unsigned int)inl);
|
buf_in=OPENSSL_malloc((unsigned int)inl);
|
||||||
if (buf_in == NULL)
|
if (buf_in == NULL)
|
||||||
@@ -136,6 +142,18 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
|||||||
|
|
||||||
int mdnid, pknid;
|
int mdnid, pknid;
|
||||||
|
|
||||||
|
if (!pkey)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (signature->type == V_ASN1_BIT_STRING && signature->flags & 0x7)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ASN1_R_INVALID_BIT_STRING_BITS_LEFT);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
EVP_MD_CTX_init(&ctx);
|
EVP_MD_CTX_init(&ctx);
|
||||||
|
|
||||||
/* Convert signature OID into digest and public key OIDs */
|
/* Convert signature OID into digest and public key OIDs */
|
||||||
|
@@ -172,7 +172,6 @@ static const EVP_PKEY_ASN1_METHOD *pkey_asn1_find(int type)
|
|||||||
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type)
|
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type)
|
||||||
{
|
{
|
||||||
const EVP_PKEY_ASN1_METHOD *t;
|
const EVP_PKEY_ASN1_METHOD *t;
|
||||||
ENGINE *e;
|
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
@@ -184,6 +183,7 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type)
|
|||||||
if (pe)
|
if (pe)
|
||||||
{
|
{
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
ENGINE *e;
|
||||||
/* type will contain the final unaliased type */
|
/* type will contain the final unaliased type */
|
||||||
e = ENGINE_get_pkey_asn1_meth_engine(type);
|
e = ENGINE_get_pkey_asn1_meth_engine(type);
|
||||||
if (e)
|
if (e)
|
||||||
@@ -256,7 +256,12 @@ int EVP_PKEY_asn1_add_alias(int to, int from)
|
|||||||
if (!ameth)
|
if (!ameth)
|
||||||
return 0;
|
return 0;
|
||||||
ameth->pkey_base_id = to;
|
ameth->pkey_base_id = to;
|
||||||
return EVP_PKEY_asn1_add0(ameth);
|
if (!EVP_PKEY_asn1_add0(ameth))
|
||||||
|
{
|
||||||
|
EVP_PKEY_asn1_free(ameth);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *ppkey_base_id, int *ppkey_flags,
|
int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *ppkey_base_id, int *ppkey_flags,
|
||||||
|
@@ -777,7 +777,7 @@ DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
|
|||||||
int ASN1_TYPE_get(ASN1_TYPE *a);
|
int ASN1_TYPE_get(ASN1_TYPE *a);
|
||||||
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
|
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
|
||||||
int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
|
int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
|
||||||
int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b);
|
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
|
||||||
|
|
||||||
ASN1_OBJECT * ASN1_OBJECT_new(void );
|
ASN1_OBJECT * ASN1_OBJECT_new(void );
|
||||||
void ASN1_OBJECT_free(ASN1_OBJECT *a);
|
void ASN1_OBJECT_free(ASN1_OBJECT *a);
|
||||||
@@ -1067,7 +1067,7 @@ ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
|
|||||||
ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct);
|
ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct);
|
||||||
|
|
||||||
void ASN1_STRING_set_default_mask(unsigned long mask);
|
void ASN1_STRING_set_default_mask(unsigned long mask);
|
||||||
int ASN1_STRING_set_default_mask_asc(char *p);
|
int ASN1_STRING_set_default_mask_asc(const char *p);
|
||||||
unsigned long ASN1_STRING_get_default_mask(void);
|
unsigned long ASN1_STRING_get_default_mask(void);
|
||||||
int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
|
int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
|
||||||
int inform, unsigned long mask);
|
int inform, unsigned long mask);
|
||||||
@@ -1327,6 +1327,7 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_R_ILLEGAL_TIME_VALUE 184
|
#define ASN1_R_ILLEGAL_TIME_VALUE 184
|
||||||
#define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185
|
#define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185
|
||||||
#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128
|
#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128
|
||||||
|
#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220
|
||||||
#define ASN1_R_INVALID_BMPSTRING_LENGTH 129
|
#define ASN1_R_INVALID_BMPSTRING_LENGTH 129
|
||||||
#define ASN1_R_INVALID_DIGIT 130
|
#define ASN1_R_INVALID_DIGIT 130
|
||||||
#define ASN1_R_INVALID_MIME_TYPE 205
|
#define ASN1_R_INVALID_MIME_TYPE 205
|
||||||
@@ -1376,6 +1377,7 @@ void ERR_load_ASN1_strings(void);
|
|||||||
#define ASN1_R_TIME_NOT_ASCII_FORMAT 193
|
#define ASN1_R_TIME_NOT_ASCII_FORMAT 193
|
||||||
#define ASN1_R_TOO_LONG 155
|
#define ASN1_R_TOO_LONG 155
|
||||||
#define ASN1_R_TYPE_NOT_CONSTRUCTED 156
|
#define ASN1_R_TYPE_NOT_CONSTRUCTED 156
|
||||||
|
#define ASN1_R_TYPE_NOT_PRIMITIVE 218
|
||||||
#define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157
|
#define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157
|
||||||
#define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158
|
#define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158
|
||||||
#define ASN1_R_UNEXPECTED_EOC 159
|
#define ASN1_R_UNEXPECTED_EOC 159
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* crypto/asn1/asn1_err.c */
|
/* crypto/asn1/asn1_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999-2009 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2014 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
|
||||||
@@ -243,6 +243,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
|
|||||||
{ERR_REASON(ASN1_R_ILLEGAL_TIME_VALUE) ,"illegal time value"},
|
{ERR_REASON(ASN1_R_ILLEGAL_TIME_VALUE) ,"illegal time value"},
|
||||||
{ERR_REASON(ASN1_R_INTEGER_NOT_ASCII_FORMAT),"integer not ascii format"},
|
{ERR_REASON(ASN1_R_INTEGER_NOT_ASCII_FORMAT),"integer not ascii format"},
|
||||||
{ERR_REASON(ASN1_R_INTEGER_TOO_LARGE_FOR_LONG),"integer too large for long"},
|
{ERR_REASON(ASN1_R_INTEGER_TOO_LARGE_FOR_LONG),"integer too large for long"},
|
||||||
|
{ERR_REASON(ASN1_R_INVALID_BIT_STRING_BITS_LEFT),"invalid bit string bits left"},
|
||||||
{ERR_REASON(ASN1_R_INVALID_BMPSTRING_LENGTH),"invalid bmpstring length"},
|
{ERR_REASON(ASN1_R_INVALID_BMPSTRING_LENGTH),"invalid bmpstring length"},
|
||||||
{ERR_REASON(ASN1_R_INVALID_DIGIT) ,"invalid digit"},
|
{ERR_REASON(ASN1_R_INVALID_DIGIT) ,"invalid digit"},
|
||||||
{ERR_REASON(ASN1_R_INVALID_MIME_TYPE) ,"invalid mime type"},
|
{ERR_REASON(ASN1_R_INVALID_MIME_TYPE) ,"invalid mime type"},
|
||||||
@@ -292,6 +293,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
|
|||||||
{ERR_REASON(ASN1_R_TIME_NOT_ASCII_FORMAT),"time not ascii format"},
|
{ERR_REASON(ASN1_R_TIME_NOT_ASCII_FORMAT),"time not ascii format"},
|
||||||
{ERR_REASON(ASN1_R_TOO_LONG) ,"too long"},
|
{ERR_REASON(ASN1_R_TOO_LONG) ,"too long"},
|
||||||
{ERR_REASON(ASN1_R_TYPE_NOT_CONSTRUCTED) ,"type not constructed"},
|
{ERR_REASON(ASN1_R_TYPE_NOT_CONSTRUCTED) ,"type not constructed"},
|
||||||
|
{ERR_REASON(ASN1_R_TYPE_NOT_PRIMITIVE) ,"type not primitive"},
|
||||||
{ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY),"unable to decode rsa key"},
|
{ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY),"unable to decode rsa key"},
|
||||||
{ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY),"unable to decode rsa private key"},
|
{ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY),"unable to decode rsa private key"},
|
||||||
{ERR_REASON(ASN1_R_UNEXPECTED_EOC) ,"unexpected eoc"},
|
{ERR_REASON(ASN1_R_UNEXPECTED_EOC) ,"unexpected eoc"},
|
||||||
@@ -302,7 +304,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
|
|||||||
{ERR_REASON(ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE),"unknown public key type"},
|
{ERR_REASON(ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE),"unknown public key type"},
|
||||||
{ERR_REASON(ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM),"unknown signature algorithm"},
|
{ERR_REASON(ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM),"unknown signature algorithm"},
|
||||||
{ERR_REASON(ASN1_R_UNKNOWN_TAG) ,"unknown tag"},
|
{ERR_REASON(ASN1_R_UNKNOWN_TAG) ,"unknown tag"},
|
||||||
{ERR_REASON(ASN1_R_UNKOWN_FORMAT) ,"unkown format"},
|
{ERR_REASON(ASN1_R_UNKOWN_FORMAT) ,"unknown format"},
|
||||||
{ERR_REASON(ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE),"unsupported any defined by type"},
|
{ERR_REASON(ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE),"unsupported any defined by type"},
|
||||||
{ERR_REASON(ASN1_R_UNSUPPORTED_CIPHER) ,"unsupported cipher"},
|
{ERR_REASON(ASN1_R_UNSUPPORTED_CIPHER) ,"unsupported cipher"},
|
||||||
{ERR_REASON(ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM),"unsupported encryption algorithm"},
|
{ERR_REASON(ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM),"unsupported encryption algorithm"},
|
||||||
|
@@ -131,6 +131,9 @@ int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
|
|||||||
*pclass=xclass;
|
*pclass=xclass;
|
||||||
if (!asn1_get_length(&p,&inf,plength,(int)max)) goto err;
|
if (!asn1_get_length(&p,&inf,plength,(int)max)) goto err;
|
||||||
|
|
||||||
|
if (inf && !(ret & V_ASN1_CONSTRUCTED))
|
||||||
|
goto err;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
fprintf(stderr,"p=%d + *plength=%ld > omax=%ld + *pp=%d (%d > %d)\n",
|
fprintf(stderr,"p=%d + *plength=%ld > omax=%ld + *pp=%d (%d > %d)\n",
|
||||||
(int)p,*plength,omax,(int)*pp,(int)(p+ *plength),
|
(int)p,*plength,omax,(int)*pp,(int)(p+ *plength),
|
||||||
|
@@ -377,8 +377,12 @@ static int asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
|
|||||||
BIO *tmpbio;
|
BIO *tmpbio;
|
||||||
const ASN1_AUX *aux = it->funcs;
|
const ASN1_AUX *aux = it->funcs;
|
||||||
ASN1_STREAM_ARG sarg;
|
ASN1_STREAM_ARG sarg;
|
||||||
|
int rv = 1;
|
||||||
|
|
||||||
if (!(flags & SMIME_DETACHED))
|
/* If data is not deteched or resigning then the output BIO is
|
||||||
|
* already set up to finalise when it is written through.
|
||||||
|
*/
|
||||||
|
if (!(flags & SMIME_DETACHED) || (flags & PKCS7_REUSE_DIGEST))
|
||||||
{
|
{
|
||||||
SMIME_crlf_copy(data, out, flags);
|
SMIME_crlf_copy(data, out, flags);
|
||||||
return 1;
|
return 1;
|
||||||
@@ -405,7 +409,7 @@ static int asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
|
|||||||
|
|
||||||
/* Finalize structure */
|
/* Finalize structure */
|
||||||
if (aux->asn1_cb(ASN1_OP_DETACHED_POST, &val, it, &sarg) <= 0)
|
if (aux->asn1_cb(ASN1_OP_DETACHED_POST, &val, it, &sarg) <= 0)
|
||||||
return 0;
|
rv = 0;
|
||||||
|
|
||||||
/* Now remove any digests prepended to the BIO */
|
/* Now remove any digests prepended to the BIO */
|
||||||
|
|
||||||
@@ -416,7 +420,7 @@ static int asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
|
|||||||
sarg.ndef_bio = tmpbio;
|
sarg.ndef_bio = tmpbio;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return rv;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -486,9 +490,9 @@ ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it)
|
|||||||
|
|
||||||
if(strcmp(hdr->value, "application/x-pkcs7-signature") &&
|
if(strcmp(hdr->value, "application/x-pkcs7-signature") &&
|
||||||
strcmp(hdr->value, "application/pkcs7-signature")) {
|
strcmp(hdr->value, "application/pkcs7-signature")) {
|
||||||
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
|
||||||
ASN1err(ASN1_F_SMIME_READ_ASN1,ASN1_R_SIG_INVALID_MIME_TYPE);
|
ASN1err(ASN1_F_SMIME_READ_ASN1,ASN1_R_SIG_INVALID_MIME_TYPE);
|
||||||
ERR_add_error_data(2, "type: ", hdr->value);
|
ERR_add_error_data(2, "type: ", hdr->value);
|
||||||
|
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
||||||
sk_BIO_pop_free(parts, BIO_vfree);
|
sk_BIO_pop_free(parts, BIO_vfree);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -663,6 +667,8 @@ static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio)
|
|||||||
int len, state, save_state = 0;
|
int len, state, save_state = 0;
|
||||||
|
|
||||||
headers = sk_MIME_HEADER_new(mime_hdr_cmp);
|
headers = sk_MIME_HEADER_new(mime_hdr_cmp);
|
||||||
|
if (!headers)
|
||||||
|
return NULL;
|
||||||
while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
|
while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
|
||||||
/* If whitespace at line start then continuation line */
|
/* If whitespace at line start then continuation line */
|
||||||
if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME;
|
if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME;
|
||||||
@@ -801,7 +807,7 @@ static MIME_HEADER *mime_hdr_new(char *name, char *value)
|
|||||||
if(name) {
|
if(name) {
|
||||||
if(!(tmpname = BUF_strdup(name))) return NULL;
|
if(!(tmpname = BUF_strdup(name))) return NULL;
|
||||||
for(p = tmpname ; *p; p++) {
|
for(p = tmpname ; *p; p++) {
|
||||||
c = *p;
|
c = (unsigned char)*p;
|
||||||
if(isupper(c)) {
|
if(isupper(c)) {
|
||||||
c = tolower(c);
|
c = tolower(c);
|
||||||
*p = c;
|
*p = c;
|
||||||
@@ -811,7 +817,7 @@ static MIME_HEADER *mime_hdr_new(char *name, char *value)
|
|||||||
if(value) {
|
if(value) {
|
||||||
if(!(tmpval = BUF_strdup(value))) return NULL;
|
if(!(tmpval = BUF_strdup(value))) return NULL;
|
||||||
for(p = tmpval ; *p; p++) {
|
for(p = tmpval ; *p; p++) {
|
||||||
c = *p;
|
c = (unsigned char)*p;
|
||||||
if(isupper(c)) {
|
if(isupper(c)) {
|
||||||
c = tolower(c);
|
c = tolower(c);
|
||||||
*p = c;
|
*p = c;
|
||||||
@@ -835,7 +841,7 @@ static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value)
|
|||||||
tmpname = BUF_strdup(name);
|
tmpname = BUF_strdup(name);
|
||||||
if(!tmpname) return 0;
|
if(!tmpname) return 0;
|
||||||
for(p = tmpname ; *p; p++) {
|
for(p = tmpname ; *p; p++) {
|
||||||
c = *p;
|
c = (unsigned char)*p;
|
||||||
if(isupper(c)) {
|
if(isupper(c)) {
|
||||||
c = tolower(c);
|
c = tolower(c);
|
||||||
*p = c;
|
*p = c;
|
||||||
@@ -858,12 +864,17 @@ static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value)
|
|||||||
static int mime_hdr_cmp(const MIME_HEADER * const *a,
|
static int mime_hdr_cmp(const MIME_HEADER * const *a,
|
||||||
const MIME_HEADER * const *b)
|
const MIME_HEADER * const *b)
|
||||||
{
|
{
|
||||||
|
if (!(*a)->name || !(*b)->name)
|
||||||
|
return !!(*a)->name - !!(*b)->name;
|
||||||
|
|
||||||
return(strcmp((*a)->name, (*b)->name));
|
return(strcmp((*a)->name, (*b)->name));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mime_param_cmp(const MIME_PARAM * const *a,
|
static int mime_param_cmp(const MIME_PARAM * const *a,
|
||||||
const MIME_PARAM * const *b)
|
const MIME_PARAM * const *b)
|
||||||
{
|
{
|
||||||
|
if (!(*a)->param_name || !(*b)->param_name)
|
||||||
|
return !!(*a)->param_name - !!(*b)->param_name;
|
||||||
return(strcmp((*a)->param_name, (*b)->param_name));
|
return(strcmp((*a)->param_name, (*b)->param_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -134,15 +134,23 @@ ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, ASN1_STRING **oct)
|
|||||||
|
|
||||||
if (!(octmp->length = i2d(obj, NULL))) {
|
if (!(octmp->length = i2d(obj, NULL))) {
|
||||||
ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR);
|
ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR);
|
||||||
return NULL;
|
goto err;
|
||||||
}
|
}
|
||||||
if (!(p = OPENSSL_malloc (octmp->length))) {
|
if (!(p = OPENSSL_malloc (octmp->length))) {
|
||||||
ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE);
|
||||||
return NULL;
|
goto err;
|
||||||
}
|
}
|
||||||
octmp->data = p;
|
octmp->data = p;
|
||||||
i2d (obj, &p);
|
i2d (obj, &p);
|
||||||
return octmp;
|
return octmp;
|
||||||
|
err:
|
||||||
|
if (!oct || !*oct)
|
||||||
|
{
|
||||||
|
ASN1_STRING_free(octmp);
|
||||||
|
if (oct)
|
||||||
|
*oct = NULL;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -154,7 +154,10 @@ static int asn1_bio_new(BIO *b)
|
|||||||
if (!ctx)
|
if (!ctx)
|
||||||
return 0;
|
return 0;
|
||||||
if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE))
|
if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE))
|
||||||
|
{
|
||||||
|
OPENSSL_free(ctx);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
b->init = 1;
|
b->init = 1;
|
||||||
b->ptr = (char *)ctx;
|
b->ptr = (char *)ctx;
|
||||||
b->flags = 0;
|
b->flags = 0;
|
||||||
|
@@ -57,9 +57,6 @@
|
|||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
|
||||||
#ifndef OPENSSL_SYSNAME_NETWARE
|
|
||||||
#include <memory.h>
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/* Experimental NDEF ASN1 BIO support routines */
|
/* Experimental NDEF ASN1 BIO support routines */
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/local/bin/perl -w
|
#!/usr/local/bin/perl -w
|
||||||
|
|
||||||
|
# Written by Dr Stephen N Henson (steve@openssl.org).
|
||||||
|
# Licensed under the terms of the OpenSSL license.
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
my ($i, @arr);
|
my ($i, @arr);
|
||||||
|
@@ -66,7 +66,11 @@ int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len)
|
|||||||
ASN1_STRING *os;
|
ASN1_STRING *os;
|
||||||
|
|
||||||
if ((os=M_ASN1_OCTET_STRING_new()) == NULL) return(0);
|
if ((os=M_ASN1_OCTET_STRING_new()) == NULL) return(0);
|
||||||
if (!M_ASN1_OCTET_STRING_set(os,data,len)) return(0);
|
if (!M_ASN1_OCTET_STRING_set(os,data,len))
|
||||||
|
{
|
||||||
|
M_ASN1_OCTET_STRING_free(os);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,os);
|
ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,os);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
@@ -140,7 +140,7 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
|
|||||||
if (bs->length <= 4)
|
if (bs->length <= 4)
|
||||||
{
|
{
|
||||||
l=ASN1_INTEGER_get(bs);
|
l=ASN1_INTEGER_get(bs);
|
||||||
if (l < 0)
|
if (bs->type == V_ASN1_NEG_INTEGER)
|
||||||
{
|
{
|
||||||
l= -l;
|
l= -l;
|
||||||
neg="-";
|
neg="-";
|
||||||
@@ -440,6 +440,8 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
|
|||||||
l=80-2-obase;
|
l=80-2-obase;
|
||||||
|
|
||||||
b=X509_NAME_oneline(name,NULL,0);
|
b=X509_NAME_oneline(name,NULL,0);
|
||||||
|
if (!b)
|
||||||
|
return 0;
|
||||||
if (!*b)
|
if (!*b)
|
||||||
{
|
{
|
||||||
OPENSSL_free(b);
|
OPENSSL_free(b);
|
||||||
|
@@ -870,6 +870,14 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval,
|
|||||||
}
|
}
|
||||||
else if (cst)
|
else if (cst)
|
||||||
{
|
{
|
||||||
|
if (utype == V_ASN1_NULL || utype == V_ASN1_BOOLEAN
|
||||||
|
|| utype == V_ASN1_OBJECT || utype == V_ASN1_INTEGER
|
||||||
|
|| utype == V_ASN1_ENUMERATED)
|
||||||
|
{
|
||||||
|
ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE,
|
||||||
|
ASN1_R_TYPE_NOT_PRIMITIVE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
buf.length = 0;
|
buf.length = 0;
|
||||||
buf.max = 0;
|
buf.max = 0;
|
||||||
buf.data = NULL;
|
buf.data = NULL;
|
||||||
|
@@ -453,9 +453,14 @@ static int asn1_set_seq_out(STACK_OF(ASN1_VALUE) *sk, unsigned char **out,
|
|||||||
{
|
{
|
||||||
derlst = OPENSSL_malloc(sk_ASN1_VALUE_num(sk)
|
derlst = OPENSSL_malloc(sk_ASN1_VALUE_num(sk)
|
||||||
* sizeof(*derlst));
|
* sizeof(*derlst));
|
||||||
tmpdat = OPENSSL_malloc(skcontlen);
|
if (!derlst)
|
||||||
if (!derlst || !tmpdat)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
tmpdat = OPENSSL_malloc(skcontlen);
|
||||||
|
if (!tmpdat)
|
||||||
|
{
|
||||||
|
OPENSSL_free(derlst);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* If not sorting just output each item */
|
/* If not sorting just output each item */
|
||||||
|
@@ -446,11 +446,11 @@ static int asn1_print_fsname(BIO *out, int indent,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int asn1_print_boolean_ctx(BIO *out, const int bool,
|
static int asn1_print_boolean_ctx(BIO *out, int boolval,
|
||||||
const ASN1_PCTX *pctx)
|
const ASN1_PCTX *pctx)
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
switch (bool)
|
switch (boolval)
|
||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
str = "BOOL ABSENT";
|
str = "BOOL ABSENT";
|
||||||
@@ -574,10 +574,10 @@ static int asn1_primitive_print(BIO *out, ASN1_VALUE **fld,
|
|||||||
{
|
{
|
||||||
case V_ASN1_BOOLEAN:
|
case V_ASN1_BOOLEAN:
|
||||||
{
|
{
|
||||||
int bool = *(int *)fld;
|
int boolval = *(int *)fld;
|
||||||
if (bool == -1)
|
if (boolval == -1)
|
||||||
bool = it->size;
|
boolval = it->size;
|
||||||
ret = asn1_print_boolean_ctx(out, bool, pctx);
|
ret = asn1_print_boolean_ctx(out, boolval, pctx);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -128,3 +128,13 @@ void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b)
|
||||||
|
{
|
||||||
|
int rv;
|
||||||
|
rv = OBJ_cmp(a->algorithm, b->algorithm);
|
||||||
|
if (rv)
|
||||||
|
return rv;
|
||||||
|
if (!a->parameter && !b->parameter)
|
||||||
|
return 0;
|
||||||
|
return ASN1_TYPE_cmp(a->parameter, b->parameter);
|
||||||
|
}
|
||||||
|
@@ -270,6 +270,7 @@ static int crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
|
|||||||
{
|
{
|
||||||
/* We handle IDP and deltas */
|
/* We handle IDP and deltas */
|
||||||
if ((nid == NID_issuing_distribution_point)
|
if ((nid == NID_issuing_distribution_point)
|
||||||
|
|| (nid == NID_authority_key_identifier)
|
||||||
|| (nid == NID_delta_crl))
|
|| (nid == NID_delta_crl))
|
||||||
break;;
|
break;;
|
||||||
crl->flags |= EXFLAG_CRITICAL;
|
crl->flags |= EXFLAG_CRITICAL;
|
||||||
|
@@ -214,7 +214,9 @@ static int x509_name_ex_d2i(ASN1_VALUE **val,
|
|||||||
*val = nm.a;
|
*val = nm.a;
|
||||||
*in = p;
|
*in = p;
|
||||||
return ret;
|
return ret;
|
||||||
err:
|
err:
|
||||||
|
if (nm.x != NULL)
|
||||||
|
X509_NAME_free(nm.x);
|
||||||
ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
|
ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -397,8 +399,7 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in)
|
|||||||
/* If type not in bitmask just copy string across */
|
/* If type not in bitmask just copy string across */
|
||||||
if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON))
|
if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON))
|
||||||
{
|
{
|
||||||
out->type = in->type;
|
if (!ASN1_STRING_copy(out, in))
|
||||||
if (!ASN1_STRING_set(out, in->data, in->length))
|
|
||||||
return 0;
|
return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -464,7 +465,8 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*to++ = tolower(*from++);
|
*to++ = tolower(*from);
|
||||||
|
from++;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -171,7 +171,19 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
key->pkey = ret;
|
/* Check to see if another thread set key->pkey first */
|
||||||
|
CRYPTO_w_lock(CRYPTO_LOCK_EVP_PKEY);
|
||||||
|
if (key->pkey)
|
||||||
|
{
|
||||||
|
CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);
|
||||||
|
EVP_PKEY_free(ret);
|
||||||
|
ret = key->pkey;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
key->pkey = ret;
|
||||||
|
CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);
|
||||||
|
}
|
||||||
CRYPTO_add(&ret->references, 1, CRYPTO_LOCK_EVP_PKEY);
|
CRYPTO_add(&ret->references, 1, CRYPTO_LOCK_EVP_PKEY);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -63,7 +63,7 @@
|
|||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
|
|
||||||
ASN1_SEQUENCE(X509_CINF) = {
|
ASN1_SEQUENCE_enc(X509_CINF, enc, 0) = {
|
||||||
ASN1_EXP_OPT(X509_CINF, version, ASN1_INTEGER, 0),
|
ASN1_EXP_OPT(X509_CINF, version, ASN1_INTEGER, 0),
|
||||||
ASN1_SIMPLE(X509_CINF, serialNumber, ASN1_INTEGER),
|
ASN1_SIMPLE(X509_CINF, serialNumber, ASN1_INTEGER),
|
||||||
ASN1_SIMPLE(X509_CINF, signature, X509_ALGOR),
|
ASN1_SIMPLE(X509_CINF, signature, X509_ALGOR),
|
||||||
@@ -74,7 +74,7 @@ ASN1_SEQUENCE(X509_CINF) = {
|
|||||||
ASN1_IMP_OPT(X509_CINF, issuerUID, ASN1_BIT_STRING, 1),
|
ASN1_IMP_OPT(X509_CINF, issuerUID, ASN1_BIT_STRING, 1),
|
||||||
ASN1_IMP_OPT(X509_CINF, subjectUID, ASN1_BIT_STRING, 2),
|
ASN1_IMP_OPT(X509_CINF, subjectUID, ASN1_BIT_STRING, 2),
|
||||||
ASN1_EXP_SEQUENCE_OF_OPT(X509_CINF, extensions, X509_EXTENSION, 3)
|
ASN1_EXP_SEQUENCE_OF_OPT(X509_CINF, extensions, X509_EXTENSION, 3)
|
||||||
} ASN1_SEQUENCE_END(X509_CINF)
|
} ASN1_SEQUENCE_END_enc(X509_CINF, X509_CINF)
|
||||||
|
|
||||||
IMPLEMENT_ASN1_FUNCTIONS(X509_CINF)
|
IMPLEMENT_ASN1_FUNCTIONS(X509_CINF)
|
||||||
/* X509 top level structure needs a bit of customisation */
|
/* X509 top level structure needs a bit of customisation */
|
||||||
|
@@ -551,7 +551,30 @@ int BIO_socket_ioctl(int fd, long type, void *arg)
|
|||||||
#ifdef __DJGPP__
|
#ifdef __DJGPP__
|
||||||
i=ioctlsocket(fd,type,(char *)arg);
|
i=ioctlsocket(fd,type,(char *)arg);
|
||||||
#else
|
#else
|
||||||
i=ioctlsocket(fd,type,arg);
|
# if defined(OPENSSL_SYS_VMS)
|
||||||
|
/* 2011-02-18 SMS.
|
||||||
|
* VMS ioctl() can't tolerate a 64-bit "void *arg", but we
|
||||||
|
* observe that all the consumers pass in an "unsigned long *",
|
||||||
|
* so we arrange a local copy with a short pointer, and use
|
||||||
|
* that, instead.
|
||||||
|
*/
|
||||||
|
# if __INITIAL_POINTER_SIZE == 64
|
||||||
|
# define ARG arg_32p
|
||||||
|
# pragma pointer_size save
|
||||||
|
# pragma pointer_size 32
|
||||||
|
unsigned long arg_32;
|
||||||
|
unsigned long *arg_32p;
|
||||||
|
# pragma pointer_size restore
|
||||||
|
arg_32p = &arg_32;
|
||||||
|
arg_32 = *((unsigned long *) arg);
|
||||||
|
# else /* __INITIAL_POINTER_SIZE == 64 */
|
||||||
|
# define ARG arg
|
||||||
|
# endif /* __INITIAL_POINTER_SIZE == 64 [else] */
|
||||||
|
# else /* defined(OPENSSL_SYS_VMS) */
|
||||||
|
# define ARG arg
|
||||||
|
# endif /* defined(OPENSSL_SYS_VMS) [else] */
|
||||||
|
|
||||||
|
i=ioctlsocket(fd,type,ARG);
|
||||||
#endif /* __DJGPP__ */
|
#endif /* __DJGPP__ */
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
SYSerr(SYS_F_IOCTLSOCKET,get_last_socket_error());
|
SYSerr(SYS_F_IOCTLSOCKET,get_last_socket_error());
|
||||||
@@ -660,6 +683,7 @@ int BIO_get_accept_socket(char *host, int bind_mode)
|
|||||||
* note that commonly IPv6 wildchard socket can service
|
* note that commonly IPv6 wildchard socket can service
|
||||||
* IPv4 connections just as well... */
|
* IPv4 connections just as well... */
|
||||||
memset(&hint,0,sizeof(hint));
|
memset(&hint,0,sizeof(hint));
|
||||||
|
hint.ai_flags = AI_PASSIVE;
|
||||||
if (h)
|
if (h)
|
||||||
{
|
{
|
||||||
if (strchr(h,':'))
|
if (strchr(h,':'))
|
||||||
@@ -672,7 +696,10 @@ int BIO_get_accept_socket(char *host, int bind_mode)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (h[0]=='*' && h[1]=='\0')
|
else if (h[0]=='*' && h[1]=='\0')
|
||||||
|
{
|
||||||
|
hint.ai_family = AF_INET;
|
||||||
h=NULL;
|
h=NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break;
|
if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break;
|
||||||
@@ -933,7 +960,6 @@ int BIO_set_tcp_ndelay(int s, int on)
|
|||||||
#endif
|
#endif
|
||||||
return(ret == 0);
|
return(ret == 0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int BIO_socket_nbio(int s, int mode)
|
int BIO_socket_nbio(int s, int mode)
|
||||||
{
|
{
|
||||||
@@ -946,3 +972,4 @@ int BIO_socket_nbio(int s, int mode)
|
|||||||
#endif
|
#endif
|
||||||
return(ret == 0);
|
return(ret == 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@@ -209,7 +209,7 @@ start:
|
|||||||
/* add to buffer and return */
|
/* add to buffer and return */
|
||||||
if (i >= inl)
|
if (i >= inl)
|
||||||
{
|
{
|
||||||
memcpy(&(ctx->obuf[ctx->obuf_len]),in,inl);
|
memcpy(&(ctx->obuf[ctx->obuf_off+ctx->obuf_len]),in,inl);
|
||||||
ctx->obuf_len+=inl;
|
ctx->obuf_len+=inl;
|
||||||
return(num+inl);
|
return(num+inl);
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ start:
|
|||||||
{
|
{
|
||||||
if (i > 0) /* lets fill it up if we can */
|
if (i > 0) /* lets fill it up if we can */
|
||||||
{
|
{
|
||||||
memcpy(&(ctx->obuf[ctx->obuf_len]),in,i);
|
memcpy(&(ctx->obuf[ctx->obuf_off+ctx->obuf_len]),in,i);
|
||||||
in+=i;
|
in+=i;
|
||||||
inl-=i;
|
inl-=i;
|
||||||
num+=i;
|
num+=i;
|
||||||
@@ -294,9 +294,9 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
case BIO_C_GET_BUFF_NUM_LINES:
|
case BIO_C_GET_BUFF_NUM_LINES:
|
||||||
ret=0;
|
ret=0;
|
||||||
p1=ctx->ibuf;
|
p1=ctx->ibuf;
|
||||||
for (i=ctx->ibuf_off; i<ctx->ibuf_len; i++)
|
for (i=0; i<ctx->ibuf_len; i++)
|
||||||
{
|
{
|
||||||
if (p1[i] == '\n') ret++;
|
if (p1[ctx->ibuf_off + i] == '\n') ret++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BIO_CTRL_WPENDING:
|
case BIO_CTRL_WPENDING:
|
||||||
@@ -399,17 +399,18 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
BIO_clear_retry_flags(b);
|
BIO_clear_retry_flags(b);
|
||||||
if (ctx->obuf_len > ctx->obuf_off)
|
if (ctx->obuf_len > 0)
|
||||||
{
|
{
|
||||||
r=BIO_write(b->next_bio,
|
r=BIO_write(b->next_bio,
|
||||||
&(ctx->obuf[ctx->obuf_off]),
|
&(ctx->obuf[ctx->obuf_off]),
|
||||||
ctx->obuf_len-ctx->obuf_off);
|
ctx->obuf_len);
|
||||||
#if 0
|
#if 0
|
||||||
fprintf(stderr,"FLUSH [%3d] %3d -> %3d\n",ctx->obuf_off,ctx->obuf_len-ctx->obuf_off,r);
|
fprintf(stderr,"FLUSH [%3d] %3d -> %3d\n",ctx->obuf_off,ctx->obuf_len,r);
|
||||||
#endif
|
#endif
|
||||||
BIO_copy_next_retry(b);
|
BIO_copy_next_retry(b);
|
||||||
if (r <= 0) return((long)r);
|
if (r <= 0) return((long)r);
|
||||||
ctx->obuf_off+=r;
|
ctx->obuf_off+=r;
|
||||||
|
ctx->obuf_len-=r;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -146,6 +146,7 @@ extern "C" {
|
|||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
#define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */
|
#define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */
|
||||||
|
#define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47
|
||||||
#define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */
|
#define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */
|
||||||
#define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for
|
#define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for
|
||||||
* MTU. want to use this
|
* MTU. want to use this
|
||||||
@@ -161,7 +162,8 @@ extern "C" {
|
|||||||
#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */
|
#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */
|
||||||
|
|
||||||
#define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45 /* Next DTLS handshake timeout to
|
#define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45 /* Next DTLS handshake timeout to
|
||||||
* adjust socket timeouts */
|
* adjust socket timeouts */
|
||||||
|
#define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49
|
||||||
|
|
||||||
/* modifiers */
|
/* modifiers */
|
||||||
#define BIO_FP_READ 0x02
|
#define BIO_FP_READ 0x02
|
||||||
@@ -306,6 +308,15 @@ DECLARE_STACK_OF(BIO)
|
|||||||
|
|
||||||
typedef struct bio_f_buffer_ctx_struct
|
typedef struct bio_f_buffer_ctx_struct
|
||||||
{
|
{
|
||||||
|
/* Buffers are setup like this:
|
||||||
|
*
|
||||||
|
* <---------------------- size ----------------------->
|
||||||
|
* +---------------------------------------------------+
|
||||||
|
* | consumed | remaining | free space |
|
||||||
|
* +---------------------------------------------------+
|
||||||
|
* <-- off --><------- len ------->
|
||||||
|
*/
|
||||||
|
|
||||||
/* BIO *bio; */ /* this is now in the BIO struct */
|
/* BIO *bio; */ /* this is now in the BIO struct */
|
||||||
int ibuf_size; /* how big is the input buffer */
|
int ibuf_size; /* how big is the input buffer */
|
||||||
int obuf_size; /* how big is the output buffer */
|
int obuf_size; /* how big is the output buffer */
|
||||||
@@ -543,6 +554,8 @@ int BIO_ctrl_reset_read_request(BIO *b);
|
|||||||
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer)
|
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer)
|
||||||
#define BIO_dgram_set_peer(b,peer) \
|
#define BIO_dgram_set_peer(b,peer) \
|
||||||
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer)
|
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer)
|
||||||
|
#define BIO_dgram_get_mtu_overhead(b) \
|
||||||
|
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
|
||||||
|
|
||||||
/* These two aren't currently implemented */
|
/* These two aren't currently implemented */
|
||||||
/* int BIO_get_ex_num(BIO *bio); */
|
/* int BIO_get_ex_num(BIO *bio); */
|
||||||
|
@@ -132,8 +132,8 @@ int BIO_free(BIO *a)
|
|||||||
|
|
||||||
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
|
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
|
||||||
|
|
||||||
if ((a->method == NULL) || (a->method->destroy == NULL)) return(1);
|
if ((a->method != NULL) && (a->method->destroy != NULL))
|
||||||
a->method->destroy(a);
|
a->method->destroy(a);
|
||||||
OPENSSL_free(a);
|
OPENSSL_free(a);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
@@ -521,40 +521,40 @@ void BIO_free_all(BIO *bio)
|
|||||||
|
|
||||||
BIO *BIO_dup_chain(BIO *in)
|
BIO *BIO_dup_chain(BIO *in)
|
||||||
{
|
{
|
||||||
BIO *ret=NULL,*eoc=NULL,*bio,*new;
|
BIO *ret=NULL,*eoc=NULL,*bio,*new_bio;
|
||||||
|
|
||||||
for (bio=in; bio != NULL; bio=bio->next_bio)
|
for (bio=in; bio != NULL; bio=bio->next_bio)
|
||||||
{
|
{
|
||||||
if ((new=BIO_new(bio->method)) == NULL) goto err;
|
if ((new_bio=BIO_new(bio->method)) == NULL) goto err;
|
||||||
new->callback=bio->callback;
|
new_bio->callback=bio->callback;
|
||||||
new->cb_arg=bio->cb_arg;
|
new_bio->cb_arg=bio->cb_arg;
|
||||||
new->init=bio->init;
|
new_bio->init=bio->init;
|
||||||
new->shutdown=bio->shutdown;
|
new_bio->shutdown=bio->shutdown;
|
||||||
new->flags=bio->flags;
|
new_bio->flags=bio->flags;
|
||||||
|
|
||||||
/* This will let SSL_s_sock() work with stdin/stdout */
|
/* This will let SSL_s_sock() work with stdin/stdout */
|
||||||
new->num=bio->num;
|
new_bio->num=bio->num;
|
||||||
|
|
||||||
if (!BIO_dup_state(bio,(char *)new))
|
if (!BIO_dup_state(bio,(char *)new_bio))
|
||||||
{
|
{
|
||||||
BIO_free(new);
|
BIO_free(new_bio);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* copy app data */
|
/* copy app data */
|
||||||
if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_BIO, &new->ex_data,
|
if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_BIO, &new_bio->ex_data,
|
||||||
&bio->ex_data))
|
&bio->ex_data))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (ret == NULL)
|
if (ret == NULL)
|
||||||
{
|
{
|
||||||
eoc=new;
|
eoc=new_bio;
|
||||||
ret=eoc;
|
ret=eoc;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_push(eoc,new);
|
BIO_push(eoc,new_bio);
|
||||||
eoc=new;
|
eoc=new_bio;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
|
@@ -57,7 +57,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_DGRAM
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -65,6 +64,7 @@
|
|||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
|
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
|
#ifndef OPENSSL_NO_DGRAM
|
||||||
|
|
||||||
#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS)
|
#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS)
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
@@ -186,7 +186,7 @@ static void dgram_adjust_rcv_timeout(BIO *b)
|
|||||||
{
|
{
|
||||||
#if defined(SO_RCVTIMEO)
|
#if defined(SO_RCVTIMEO)
|
||||||
bio_dgram_data *data = (bio_dgram_data *)b->ptr;
|
bio_dgram_data *data = (bio_dgram_data *)b->ptr;
|
||||||
int sz = sizeof(int);
|
union { size_t s; int i; } sz = {0};
|
||||||
|
|
||||||
/* Is a timer active? */
|
/* Is a timer active? */
|
||||||
if (data->next_timeout.tv_sec > 0 || data->next_timeout.tv_usec > 0)
|
if (data->next_timeout.tv_sec > 0 || data->next_timeout.tv_usec > 0)
|
||||||
@@ -196,8 +196,10 @@ static void dgram_adjust_rcv_timeout(BIO *b)
|
|||||||
/* Read current socket timeout */
|
/* Read current socket timeout */
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
int timeout;
|
int timeout;
|
||||||
|
|
||||||
|
sz.i = sizeof(timeout);
|
||||||
if (getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
if (getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
||||||
(void*)&timeout, &sz) < 0)
|
(void*)&timeout, &sz.i) < 0)
|
||||||
{ perror("getsockopt"); }
|
{ perror("getsockopt"); }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -205,9 +207,12 @@ static void dgram_adjust_rcv_timeout(BIO *b)
|
|||||||
data->socket_timeout.tv_usec = (timeout % 1000) * 1000;
|
data->socket_timeout.tv_usec = (timeout % 1000) * 1000;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
sz.i = sizeof(data->socket_timeout);
|
||||||
if ( getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
if ( getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
||||||
&(data->socket_timeout), (void *)&sz) < 0)
|
&(data->socket_timeout), (void *)&sz) < 0)
|
||||||
{ perror("getsockopt"); }
|
{ perror("getsockopt"); }
|
||||||
|
else if (sizeof(sz.s)!=sizeof(sz.i) && sz.i==0)
|
||||||
|
OPENSSL_assert(sz.s<=sizeof(data->socket_timeout));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Get current time */
|
/* Get current time */
|
||||||
@@ -308,7 +313,6 @@ static int dgram_read(BIO *b, char *out, int outl)
|
|||||||
OPENSSL_assert(sa.len.s<=sizeof(sa.peer));
|
OPENSSL_assert(sa.len.s<=sizeof(sa.peer));
|
||||||
sa.len.i = (int)sa.len.s;
|
sa.len.i = (int)sa.len.s;
|
||||||
}
|
}
|
||||||
dgram_reset_rcv_timeout(b);
|
|
||||||
|
|
||||||
if ( ! data->connected && ret >= 0)
|
if ( ! data->connected && ret >= 0)
|
||||||
BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, &sa.peer);
|
BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, &sa.peer);
|
||||||
@@ -322,6 +326,8 @@ static int dgram_read(BIO *b, char *out, int outl)
|
|||||||
data->_errno = get_last_socket_error();
|
data->_errno = get_last_socket_error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dgram_reset_rcv_timeout(b);
|
||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
@@ -340,7 +346,7 @@ static int dgram_write(BIO *b, const char *in, int inl)
|
|||||||
|
|
||||||
if (data->peer.sa.sa_family == AF_INET)
|
if (data->peer.sa.sa_family == AF_INET)
|
||||||
peerlen = sizeof(data->peer.sa_in);
|
peerlen = sizeof(data->peer.sa_in);
|
||||||
#if OPENSSL_USE_IVP6
|
#if OPENSSL_USE_IPV6
|
||||||
else if (data->peer.sa.sa_family == AF_INET6)
|
else if (data->peer.sa.sa_family == AF_INET6)
|
||||||
peerlen = sizeof(data->peer.sa_in6);
|
peerlen = sizeof(data->peer.sa_in6);
|
||||||
#endif
|
#endif
|
||||||
@@ -369,17 +375,46 @@ static int dgram_write(BIO *b, const char *in, int inl)
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static long dgram_get_mtu_overhead(bio_dgram_data *data)
|
||||||
|
{
|
||||||
|
long ret;
|
||||||
|
|
||||||
|
switch (data->peer.sa.sa_family)
|
||||||
|
{
|
||||||
|
case AF_INET:
|
||||||
|
/* Assume this is UDP - 20 bytes for IP, 8 bytes for UDP */
|
||||||
|
ret = 28;
|
||||||
|
break;
|
||||||
|
#if OPENSSL_USE_IPV6
|
||||||
|
case AF_INET6:
|
||||||
|
#ifdef IN6_IS_ADDR_V4MAPPED
|
||||||
|
if (IN6_IS_ADDR_V4MAPPED(&data->peer.sa_in6.sin6_addr))
|
||||||
|
/* Assume this is UDP - 20 bytes for IP, 8 bytes for UDP */
|
||||||
|
ret = 28;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
/* Assume this is UDP - 40 bytes for IP, 8 bytes for UDP */
|
||||||
|
ret = 48;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
/* We don't know. Go with the historical default */
|
||||||
|
ret = 28;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||||
{
|
{
|
||||||
long ret=1;
|
long ret=1;
|
||||||
int *ip;
|
int *ip;
|
||||||
struct sockaddr *to = NULL;
|
struct sockaddr *to = NULL;
|
||||||
bio_dgram_data *data = NULL;
|
bio_dgram_data *data = NULL;
|
||||||
#if defined(IP_MTU_DISCOVER) || defined(IP_MTU)
|
#if defined(OPENSSL_SYS_LINUX) && (defined(IP_MTU_DISCOVER) || defined(IP_MTU))
|
||||||
long sockopt_val = 0;
|
int sockopt_val = 0;
|
||||||
unsigned int sockopt_len = 0;
|
socklen_t sockopt_len; /* assume that system supporting IP_MTU is
|
||||||
#endif
|
* modern enough to define socklen_t */
|
||||||
#ifdef OPENSSL_SYS_LINUX
|
|
||||||
socklen_t addr_len;
|
socklen_t addr_len;
|
||||||
union {
|
union {
|
||||||
struct sockaddr sa;
|
struct sockaddr sa;
|
||||||
@@ -461,7 +496,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
break;
|
break;
|
||||||
/* (Linux)kernel sets DF bit on outgoing IP packets */
|
/* (Linux)kernel sets DF bit on outgoing IP packets */
|
||||||
case BIO_CTRL_DGRAM_MTU_DISCOVER:
|
case BIO_CTRL_DGRAM_MTU_DISCOVER:
|
||||||
#ifdef OPENSSL_SYS_LINUX
|
#if defined(OPENSSL_SYS_LINUX) && defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DO)
|
||||||
addr_len = (socklen_t)sizeof(addr);
|
addr_len = (socklen_t)sizeof(addr);
|
||||||
memset((void *)&addr, 0, sizeof(addr));
|
memset((void *)&addr, 0, sizeof(addr));
|
||||||
if (getsockname(b->num, &addr.sa, &addr_len) < 0)
|
if (getsockname(b->num, &addr.sa, &addr_len) < 0)
|
||||||
@@ -469,7 +504,6 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sockopt_len = sizeof(sockopt_val);
|
|
||||||
switch (addr.sa.sa_family)
|
switch (addr.sa.sa_family)
|
||||||
{
|
{
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
@@ -478,7 +512,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
&sockopt_val, sizeof(sockopt_val))) < 0)
|
&sockopt_val, sizeof(sockopt_val))) < 0)
|
||||||
perror("setsockopt");
|
perror("setsockopt");
|
||||||
break;
|
break;
|
||||||
#if OPENSSL_USE_IPV6 && defined(IPV6_MTU_DISCOVER)
|
#if OPENSSL_USE_IPV6 && defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DO)
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
sockopt_val = IPV6_PMTUDISC_DO;
|
sockopt_val = IPV6_PMTUDISC_DO;
|
||||||
if ((ret = setsockopt(b->num, IPPROTO_IPV6, IPV6_MTU_DISCOVER,
|
if ((ret = setsockopt(b->num, IPPROTO_IPV6, IPV6_MTU_DISCOVER,
|
||||||
@@ -495,7 +529,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case BIO_CTRL_DGRAM_QUERY_MTU:
|
case BIO_CTRL_DGRAM_QUERY_MTU:
|
||||||
#ifdef OPENSSL_SYS_LINUX
|
#if defined(OPENSSL_SYS_LINUX) && defined(IP_MTU)
|
||||||
addr_len = (socklen_t)sizeof(addr);
|
addr_len = (socklen_t)sizeof(addr);
|
||||||
memset((void *)&addr, 0, sizeof(addr));
|
memset((void *)&addr, 0, sizeof(addr));
|
||||||
if (getsockname(b->num, &addr.sa, &addr_len) < 0)
|
if (getsockname(b->num, &addr.sa, &addr_len) < 0)
|
||||||
@@ -546,6 +580,28 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
case BIO_CTRL_DGRAM_GET_FALLBACK_MTU:
|
||||||
|
ret = -dgram_get_mtu_overhead(data);
|
||||||
|
switch (data->peer.sa.sa_family)
|
||||||
|
{
|
||||||
|
case AF_INET:
|
||||||
|
ret += 576;
|
||||||
|
break;
|
||||||
|
#if OPENSSL_USE_IPV6
|
||||||
|
case AF_INET6:
|
||||||
|
#ifdef IN6_IS_ADDR_V4MAPPED
|
||||||
|
if (IN6_IS_ADDR_V4MAPPED(&data->peer.sa_in6.sin6_addr))
|
||||||
|
ret += 576;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
ret += 1280;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
ret += 576;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case BIO_CTRL_DGRAM_GET_MTU:
|
case BIO_CTRL_DGRAM_GET_MTU:
|
||||||
return data->mtu;
|
return data->mtu;
|
||||||
break;
|
break;
|
||||||
@@ -636,12 +692,15 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case BIO_CTRL_DGRAM_GET_RECV_TIMEOUT:
|
case BIO_CTRL_DGRAM_GET_RECV_TIMEOUT:
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
|
||||||
{
|
{
|
||||||
int timeout, sz = sizeof(timeout);
|
union { size_t s; int i; } sz = {0};
|
||||||
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
|
int timeout;
|
||||||
struct timeval *tv = (struct timeval *)ptr;
|
struct timeval *tv = (struct timeval *)ptr;
|
||||||
|
|
||||||
|
sz.i = sizeof(timeout);
|
||||||
if (getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
if (getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
||||||
(void*)&timeout, &sz) < 0)
|
(void*)&timeout, &sz.i) < 0)
|
||||||
{ perror("getsockopt"); ret = -1; }
|
{ perror("getsockopt"); ret = -1; }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -649,12 +708,20 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
tv->tv_usec = (timeout % 1000) * 1000;
|
tv->tv_usec = (timeout % 1000) * 1000;
|
||||||
ret = sizeof(*tv);
|
ret = sizeof(*tv);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
|
sz.i = sizeof(struct timeval);
|
||||||
if ( getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
if ( getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
||||||
ptr, (void *)&ret) < 0)
|
ptr, (void *)&sz) < 0)
|
||||||
{ perror("getsockopt"); ret = -1; }
|
{ perror("getsockopt"); ret = -1; }
|
||||||
|
else if (sizeof(sz.s)!=sizeof(sz.i) && sz.i==0)
|
||||||
|
{
|
||||||
|
OPENSSL_assert(sz.s<=sizeof(struct timeval));
|
||||||
|
ret = (int)sz.s;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ret = sz.i;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if defined(SO_SNDTIMEO)
|
#if defined(SO_SNDTIMEO)
|
||||||
@@ -674,12 +741,15 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case BIO_CTRL_DGRAM_GET_SEND_TIMEOUT:
|
case BIO_CTRL_DGRAM_GET_SEND_TIMEOUT:
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
|
||||||
{
|
{
|
||||||
int timeout, sz = sizeof(timeout);
|
union { size_t s; int i; } sz = {0};
|
||||||
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
|
int timeout;
|
||||||
struct timeval *tv = (struct timeval *)ptr;
|
struct timeval *tv = (struct timeval *)ptr;
|
||||||
|
|
||||||
|
sz.i = sizeof(timeout);
|
||||||
if (getsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO,
|
if (getsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO,
|
||||||
(void*)&timeout, &sz) < 0)
|
(void*)&timeout, &sz.i) < 0)
|
||||||
{ perror("getsockopt"); ret = -1; }
|
{ perror("getsockopt"); ret = -1; }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -687,12 +757,20 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
tv->tv_usec = (timeout % 1000) * 1000;
|
tv->tv_usec = (timeout % 1000) * 1000;
|
||||||
ret = sizeof(*tv);
|
ret = sizeof(*tv);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
|
sz.i = sizeof(struct timeval);
|
||||||
if ( getsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO,
|
if ( getsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO,
|
||||||
ptr, (void *)&ret) < 0)
|
ptr, (void *)&sz) < 0)
|
||||||
{ perror("getsockopt"); ret = -1; }
|
{ perror("getsockopt"); ret = -1; }
|
||||||
|
else if (sizeof(sz.s)!=sizeof(sz.i) && sz.i==0)
|
||||||
|
{
|
||||||
|
OPENSSL_assert(sz.s<=sizeof(struct timeval));
|
||||||
|
ret = (int)sz.s;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ret = sz.i;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP:
|
case BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP:
|
||||||
@@ -721,6 +799,9 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
case BIO_CTRL_DGRAM_GET_MTU_OVERHEAD:
|
||||||
|
ret = dgram_get_mtu_overhead(data);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ret=0;
|
ret=0;
|
||||||
break;
|
break;
|
||||||
@@ -745,9 +826,13 @@ static int BIO_dgram_should_retry(int i)
|
|||||||
{
|
{
|
||||||
err=get_last_socket_error();
|
err=get_last_socket_error();
|
||||||
|
|
||||||
#if defined(OPENSSL_SYS_WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */
|
#if defined(OPENSSL_SYS_WINDOWS)
|
||||||
if ((i == -1) && (err == 0))
|
/* If the socket return value (i) is -1
|
||||||
return(1);
|
* and err is unexpectedly 0 at this point,
|
||||||
|
* the error code was overwritten by
|
||||||
|
* another system call before this error
|
||||||
|
* handling is called.
|
||||||
|
*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return(BIO_dgram_non_fatal_error(err));
|
return(BIO_dgram_non_fatal_error(err));
|
||||||
@@ -810,7 +895,6 @@ int BIO_dgram_non_fatal_error(int err)
|
|||||||
}
|
}
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void get_current_time(struct timeval *t)
|
static void get_current_time(struct timeval *t)
|
||||||
{
|
{
|
||||||
@@ -828,3 +912,5 @@ static void get_current_time(struct timeval *t)
|
|||||||
gettimeofday(t, NULL);
|
gettimeofday(t, NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -123,6 +123,7 @@ BIO *BIO_new_file(const char *filename, const char *mode)
|
|||||||
|
|
||||||
#if defined(_WIN32) && defined(CP_UTF8)
|
#if defined(_WIN32) && defined(CP_UTF8)
|
||||||
int sz, len_0 = (int)strlen(filename)+1;
|
int sz, len_0 = (int)strlen(filename)+1;
|
||||||
|
DWORD flags;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Basically there are three cases to cover: a) filename is
|
* Basically there are three cases to cover: a) filename is
|
||||||
@@ -136,17 +137,22 @@ BIO *BIO_new_file(const char *filename, const char *mode)
|
|||||||
* ERROR_NO_UNICODE_TRANSLATION, in which case we fall
|
* ERROR_NO_UNICODE_TRANSLATION, in which case we fall
|
||||||
* back to fopen...
|
* back to fopen...
|
||||||
*/
|
*/
|
||||||
if ((sz=MultiByteToWideChar(CP_UTF8,MB_ERR_INVALID_CHARS,
|
if ((sz=MultiByteToWideChar(CP_UTF8,(flags=MB_ERR_INVALID_CHARS),
|
||||||
|
filename,len_0,NULL,0))>0 ||
|
||||||
|
(GetLastError()==ERROR_INVALID_FLAGS &&
|
||||||
|
(sz=MultiByteToWideChar(CP_UTF8,(flags=0),
|
||||||
filename,len_0,NULL,0))>0)
|
filename,len_0,NULL,0))>0)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
WCHAR wmode[8];
|
WCHAR wmode[8];
|
||||||
WCHAR *wfilename = _alloca(sz*sizeof(WCHAR));
|
WCHAR *wfilename = _alloca(sz*sizeof(WCHAR));
|
||||||
|
|
||||||
if (MultiByteToWideChar(CP_UTF8,MB_ERR_INVALID_CHARS,
|
if (MultiByteToWideChar(CP_UTF8,flags,
|
||||||
filename,len_0,wfilename,sz) &&
|
filename,len_0,wfilename,sz) &&
|
||||||
MultiByteToWideChar(CP_UTF8,0,mode,strlen(mode)+1,
|
MultiByteToWideChar(CP_UTF8,0,mode,strlen(mode)+1,
|
||||||
wmode,sizeof(wmode)/sizeof(wmode[0])) &&
|
wmode,sizeof(wmode)/sizeof(wmode[0])) &&
|
||||||
(file=_wfopen(wfilename,wmode))==NULL && errno==ENOENT
|
(file=_wfopen(wfilename,wmode))==NULL &&
|
||||||
|
(errno==ENOENT || errno==EBADF)
|
||||||
) /* UTF-8 decode succeeded, but no file, filename
|
) /* UTF-8 decode succeeded, but no file, filename
|
||||||
* could still have been locale-ized... */
|
* could still have been locale-ized... */
|
||||||
file = fopen(filename,mode);
|
file = fopen(filename,mode);
|
||||||
|
@@ -75,6 +75,15 @@
|
|||||||
# include <descrip.h>
|
# include <descrip.h>
|
||||||
# include <lib$routines.h>
|
# include <lib$routines.h>
|
||||||
# include <starlet.h>
|
# include <starlet.h>
|
||||||
|
/* Some compiler options may mask the declaration of "_malloc32". */
|
||||||
|
# if __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE
|
||||||
|
# if __INITIAL_POINTER_SIZE == 64
|
||||||
|
# pragma pointer_size save
|
||||||
|
# pragma pointer_size 32
|
||||||
|
void * _malloc32 (__size_t);
|
||||||
|
# pragma pointer_size restore
|
||||||
|
# endif /* __INITIAL_POINTER_SIZE == 64 */
|
||||||
|
# endif /* __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE */
|
||||||
#elif defined(__ultrix)
|
#elif defined(__ultrix)
|
||||||
# include <sys/syslog.h>
|
# include <sys/syslog.h>
|
||||||
#elif defined(OPENSSL_SYS_NETWARE)
|
#elif defined(OPENSSL_SYS_NETWARE)
|
||||||
@@ -236,7 +245,7 @@ static int MS_CALLBACK slg_puts(BIO *bp, const char *str)
|
|||||||
|
|
||||||
static void xopenlog(BIO* bp, char* name, int level)
|
static void xopenlog(BIO* bp, char* name, int level)
|
||||||
{
|
{
|
||||||
if (GetVersion() < 0x80000000)
|
if (check_winnt())
|
||||||
bp->ptr = RegisterEventSourceA(NULL,name);
|
bp->ptr = RegisterEventSourceA(NULL,name);
|
||||||
else
|
else
|
||||||
bp->ptr = NULL;
|
bp->ptr = NULL;
|
||||||
@@ -300,7 +309,24 @@ static void xopenlog(BIO* bp, char* name, int level)
|
|||||||
static void xsyslog(BIO *bp, int priority, const char *string)
|
static void xsyslog(BIO *bp, int priority, const char *string)
|
||||||
{
|
{
|
||||||
struct dsc$descriptor_s opc_dsc;
|
struct dsc$descriptor_s opc_dsc;
|
||||||
|
|
||||||
|
/* Arrange 32-bit pointer to opcdef buffer and malloc(), if needed. */
|
||||||
|
#if __INITIAL_POINTER_SIZE == 64
|
||||||
|
# pragma pointer_size save
|
||||||
|
# pragma pointer_size 32
|
||||||
|
# define OPCDEF_TYPE __char_ptr32
|
||||||
|
# define OPCDEF_MALLOC _malloc32
|
||||||
|
#else /* __INITIAL_POINTER_SIZE == 64 */
|
||||||
|
# define OPCDEF_TYPE char *
|
||||||
|
# define OPCDEF_MALLOC OPENSSL_malloc
|
||||||
|
#endif /* __INITIAL_POINTER_SIZE == 64 [else] */
|
||||||
|
|
||||||
struct opcdef *opcdef_p;
|
struct opcdef *opcdef_p;
|
||||||
|
|
||||||
|
#if __INITIAL_POINTER_SIZE == 64
|
||||||
|
# pragma pointer_size restore
|
||||||
|
#endif /* __INITIAL_POINTER_SIZE == 64 */
|
||||||
|
|
||||||
char buf[10240];
|
char buf[10240];
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
struct dsc$descriptor_s buf_dsc;
|
struct dsc$descriptor_s buf_dsc;
|
||||||
@@ -326,8 +352,8 @@ static void xsyslog(BIO *bp, int priority, const char *string)
|
|||||||
|
|
||||||
lib$sys_fao(&fao_cmd, &len, &buf_dsc, priority_tag, string);
|
lib$sys_fao(&fao_cmd, &len, &buf_dsc, priority_tag, string);
|
||||||
|
|
||||||
/* we know there's an 8 byte header. That's documented */
|
/* We know there's an 8-byte header. That's documented. */
|
||||||
opcdef_p = (struct opcdef *) OPENSSL_malloc(8 + len);
|
opcdef_p = OPCDEF_MALLOC( 8+ len);
|
||||||
opcdef_p->opc$b_ms_type = OPC$_RQ_RQST;
|
opcdef_p->opc$b_ms_type = OPC$_RQ_RQST;
|
||||||
memcpy(opcdef_p->opc$z_ms_target_classes, &VMS_OPC_target, 3);
|
memcpy(opcdef_p->opc$z_ms_target_classes, &VMS_OPC_target, 3);
|
||||||
opcdef_p->opc$l_ms_rqstid = 0;
|
opcdef_p->opc$l_ms_rqstid = 0;
|
||||||
@@ -335,7 +361,7 @@ static void xsyslog(BIO *bp, int priority, const char *string)
|
|||||||
|
|
||||||
opc_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
opc_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||||
opc_dsc.dsc$b_class = DSC$K_CLASS_S;
|
opc_dsc.dsc$b_class = DSC$K_CLASS_S;
|
||||||
opc_dsc.dsc$a_pointer = (char *)opcdef_p;
|
opc_dsc.dsc$a_pointer = (OPCDEF_TYPE) opcdef_p;
|
||||||
opc_dsc.dsc$w_length = len + 8;
|
opc_dsc.dsc$w_length = len + 8;
|
||||||
|
|
||||||
sys$sndopr(opc_dsc, 0);
|
sys$sndopr(opc_dsc, 0);
|
||||||
|
@@ -41,8 +41,12 @@ $j="s4";
|
|||||||
$m1="s5";
|
$m1="s5";
|
||||||
|
|
||||||
$code=<<___;
|
$code=<<___;
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <asm/regdef.h>
|
||||||
|
#else
|
||||||
#include <asm.h>
|
#include <asm.h>
|
||||||
#include <regdef.h>
|
#include <regdef.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
@@ -76,7 +80,7 @@ bn_mul_mont:
|
|||||||
ldq $aj,8($ap)
|
ldq $aj,8($ap)
|
||||||
subq sp,AT,sp
|
subq sp,AT,sp
|
||||||
ldq $bi,0($bp) # bp[0]
|
ldq $bi,0($bp) # bp[0]
|
||||||
mov -4096,AT
|
lda AT,-4096(zero) # mov -4096,AT
|
||||||
ldq $n0,0($n0)
|
ldq $n0,0($n0)
|
||||||
and sp,AT,sp
|
and sp,AT,sp
|
||||||
|
|
||||||
@@ -106,9 +110,9 @@ bn_mul_mont:
|
|||||||
.align 4
|
.align 4
|
||||||
.L1st:
|
.L1st:
|
||||||
.set noreorder
|
.set noreorder
|
||||||
ldq $aj,($aj)
|
ldq $aj,0($aj)
|
||||||
addl $j,1,$j
|
addl $j,1,$j
|
||||||
ldq $nj,($nj)
|
ldq $nj,0($nj)
|
||||||
lda $tp,8($tp)
|
lda $tp,8($tp)
|
||||||
|
|
||||||
addq $alo,$hi0,$lo0
|
addq $alo,$hi0,$lo0
|
||||||
@@ -159,12 +163,12 @@ bn_mul_mont:
|
|||||||
.align 4
|
.align 4
|
||||||
.Louter:
|
.Louter:
|
||||||
s8addq $i,$bp,$bi
|
s8addq $i,$bp,$bi
|
||||||
ldq $hi0,($ap)
|
ldq $hi0,0($ap)
|
||||||
ldq $aj,8($ap)
|
ldq $aj,8($ap)
|
||||||
ldq $bi,($bi)
|
ldq $bi,0($bi)
|
||||||
ldq $hi1,($np)
|
ldq $hi1,0($np)
|
||||||
ldq $nj,8($np)
|
ldq $nj,8($np)
|
||||||
ldq $tj,(sp)
|
ldq $tj,0(sp)
|
||||||
|
|
||||||
mulq $hi0,$bi,$lo0
|
mulq $hi0,$bi,$lo0
|
||||||
umulh $hi0,$bi,$hi0
|
umulh $hi0,$bi,$hi0
|
||||||
@@ -195,10 +199,10 @@ bn_mul_mont:
|
|||||||
.set noreorder
|
.set noreorder
|
||||||
ldq $tj,8($tp) #L0
|
ldq $tj,8($tp) #L0
|
||||||
nop #U1
|
nop #U1
|
||||||
ldq $aj,($aj) #L1
|
ldq $aj,0($aj) #L1
|
||||||
s8addq $j,$np,$nj #U0
|
s8addq $j,$np,$nj #U0
|
||||||
|
|
||||||
ldq $nj,($nj) #L0
|
ldq $nj,0($nj) #L0
|
||||||
nop #U1
|
nop #U1
|
||||||
addq $alo,$hi0,$lo0 #L1
|
addq $alo,$hi0,$lo0 #L1
|
||||||
lda $tp,8($tp)
|
lda $tp,8($tp)
|
||||||
@@ -247,7 +251,7 @@ bn_mul_mont:
|
|||||||
addq $hi1,v0,$hi1
|
addq $hi1,v0,$hi1
|
||||||
|
|
||||||
addq $hi1,$hi0,$lo1
|
addq $hi1,$hi0,$lo1
|
||||||
stq $j,($tp)
|
stq $j,0($tp)
|
||||||
cmpult $lo1,$hi0,$hi1
|
cmpult $lo1,$hi0,$hi1
|
||||||
addq $lo1,$tj,$lo1
|
addq $lo1,$tj,$lo1
|
||||||
cmpult $lo1,$tj,AT
|
cmpult $lo1,$tj,AT
|
||||||
@@ -265,8 +269,8 @@ bn_mul_mont:
|
|||||||
mov 0,$hi0 # clear borrow bit
|
mov 0,$hi0 # clear borrow bit
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
.Lsub: ldq $lo0,($tp)
|
.Lsub: ldq $lo0,0($tp)
|
||||||
ldq $lo1,($np)
|
ldq $lo1,0($np)
|
||||||
lda $tp,8($tp)
|
lda $tp,8($tp)
|
||||||
lda $np,8($np)
|
lda $np,8($np)
|
||||||
subq $lo0,$lo1,$lo1 # tp[i]-np[i]
|
subq $lo0,$lo1,$lo1 # tp[i]-np[i]
|
||||||
@@ -274,7 +278,7 @@ bn_mul_mont:
|
|||||||
subq $lo1,$hi0,$lo0
|
subq $lo1,$hi0,$lo0
|
||||||
cmpult $lo1,$lo0,$hi0
|
cmpult $lo1,$lo0,$hi0
|
||||||
or $hi0,AT,$hi0
|
or $hi0,AT,$hi0
|
||||||
stq $lo0,($rp)
|
stq $lo0,0($rp)
|
||||||
cmpult $tp,$tj,v0
|
cmpult $tp,$tj,v0
|
||||||
lda $rp,8($rp)
|
lda $rp,8($rp)
|
||||||
bne v0,.Lsub
|
bne v0,.Lsub
|
||||||
@@ -288,7 +292,7 @@ bn_mul_mont:
|
|||||||
bis $bp,$ap,$ap # ap=borrow?tp:rp
|
bis $bp,$ap,$ap # ap=borrow?tp:rp
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
.Lcopy: ldq $aj,($ap) # copy or in-place refresh
|
.Lcopy: ldq $aj,0($ap) # copy or in-place refresh
|
||||||
lda $tp,8($tp)
|
lda $tp,8($tp)
|
||||||
lda $rp,8($rp)
|
lda $rp,8($rp)
|
||||||
lda $ap,8($ap)
|
lda $ap,8($ap)
|
||||||
@@ -309,8 +313,8 @@ bn_mul_mont:
|
|||||||
lda sp,48(sp)
|
lda sp,48(sp)
|
||||||
ret (ra)
|
ret (ra)
|
||||||
.end bn_mul_mont
|
.end bn_mul_mont
|
||||||
.rdata
|
.ascii "Montgomery Multiplication for Alpha, CRYPTOGAMS by <appro\@openssl.org>"
|
||||||
.asciiz "Montgomery Multiplication for Alpha, CRYPTOGAMS by <appro\@openssl.org>"
|
.align 2
|
||||||
___
|
___
|
||||||
|
|
||||||
print $code;
|
print $code;
|
||||||
|
@@ -1584,17 +1584,17 @@ LEAF(bn_sqr_comba8)
|
|||||||
dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */
|
dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_2,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_2,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
sltu t_2,c_1,t_2
|
||||||
daddu c_2,AT
|
daddu c_2,t_2
|
||||||
dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */
|
dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
@@ -1609,63 +1609,63 @@ LEAF(bn_sqr_comba8)
|
|||||||
dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */
|
dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_3,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_3,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
sltu t_2,c_2,t_2
|
||||||
daddu c_3,AT
|
daddu c_3,t_2
|
||||||
dmultu a_1,a_2 /* mul_add_c2(a[1],b[2],c1,c2,c3); */
|
dmultu a_1,a_2 /* mul_add_c2(a[1],b[2],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_3,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
|
||||||
daddu c_3,AT
|
daddu c_3,AT
|
||||||
|
sltu t_2,c_2,t_2
|
||||||
|
daddu c_3,t_2
|
||||||
sd c_1,24(a0)
|
sd c_1,24(a0)
|
||||||
|
|
||||||
dmultu a_4,a_0 /* mul_add_c2(a[4],b[0],c2,c3,c1); */
|
dmultu a_4,a_0 /* mul_add_c2(a[4],b[0],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_1,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_1,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
sltu t_2,c_3,t_2
|
||||||
daddu c_1,AT
|
daddu c_1,t_2
|
||||||
dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */
|
dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_1,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
|
||||||
daddu c_1,AT
|
daddu c_1,AT
|
||||||
|
sltu t_2,c_3,t_2
|
||||||
|
daddu c_1,t_2
|
||||||
dmultu a_2,a_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */
|
dmultu a_2,a_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
@@ -1680,93 +1680,93 @@ LEAF(bn_sqr_comba8)
|
|||||||
dmultu a_0,a_5 /* mul_add_c2(a[0],b[5],c3,c1,c2); */
|
dmultu a_0,a_5 /* mul_add_c2(a[0],b[5],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_2,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_2,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
sltu t_2,c_1,t_2
|
||||||
daddu c_2,AT
|
daddu c_2,t_2
|
||||||
dmultu a_1,a_4 /* mul_add_c2(a[1],b[4],c3,c1,c2); */
|
dmultu a_1,a_4 /* mul_add_c2(a[1],b[4],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_2,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
|
||||||
daddu c_2,AT
|
daddu c_2,AT
|
||||||
|
sltu t_2,c_1,t_2
|
||||||
|
daddu c_2,t_2
|
||||||
dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */
|
dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_2,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
|
||||||
daddu c_2,AT
|
daddu c_2,AT
|
||||||
|
sltu t_2,c_1,t_2
|
||||||
|
daddu c_2,t_2
|
||||||
sd c_3,40(a0)
|
sd c_3,40(a0)
|
||||||
|
|
||||||
dmultu a_6,a_0 /* mul_add_c2(a[6],b[0],c1,c2,c3); */
|
dmultu a_6,a_0 /* mul_add_c2(a[6],b[0],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_3,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_3,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
sltu t_2,c_2,t_2
|
||||||
daddu c_3,AT
|
daddu c_3,t_2
|
||||||
dmultu a_5,a_1 /* mul_add_c2(a[5],b[1],c1,c2,c3); */
|
dmultu a_5,a_1 /* mul_add_c2(a[5],b[1],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_3,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
|
||||||
daddu c_3,AT
|
daddu c_3,AT
|
||||||
|
sltu t_2,c_2,t_2
|
||||||
|
daddu c_3,t_2
|
||||||
dmultu a_4,a_2 /* mul_add_c2(a[4],b[2],c1,c2,c3); */
|
dmultu a_4,a_2 /* mul_add_c2(a[4],b[2],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_3,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
|
||||||
daddu c_3,AT
|
daddu c_3,AT
|
||||||
|
sltu t_2,c_2,t_2
|
||||||
|
daddu c_3,t_2
|
||||||
dmultu a_3,a_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */
|
dmultu a_3,a_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
@@ -1781,108 +1781,108 @@ LEAF(bn_sqr_comba8)
|
|||||||
dmultu a_0,a_7 /* mul_add_c2(a[0],b[7],c2,c3,c1); */
|
dmultu a_0,a_7 /* mul_add_c2(a[0],b[7],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_1,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_1,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
sltu t_2,c_3,t_2
|
||||||
daddu c_1,AT
|
daddu c_1,t_2
|
||||||
dmultu a_1,a_6 /* mul_add_c2(a[1],b[6],c2,c3,c1); */
|
dmultu a_1,a_6 /* mul_add_c2(a[1],b[6],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_1,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
|
||||||
daddu c_1,AT
|
daddu c_1,AT
|
||||||
|
sltu t_2,c_3,t_2
|
||||||
|
daddu c_1,t_2
|
||||||
dmultu a_2,a_5 /* mul_add_c2(a[2],b[5],c2,c3,c1); */
|
dmultu a_2,a_5 /* mul_add_c2(a[2],b[5],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_1,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
|
||||||
daddu c_1,AT
|
daddu c_1,AT
|
||||||
|
sltu t_2,c_3,t_2
|
||||||
|
daddu c_1,t_2
|
||||||
dmultu a_3,a_4 /* mul_add_c2(a[3],b[4],c2,c3,c1); */
|
dmultu a_3,a_4 /* mul_add_c2(a[3],b[4],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_1,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
|
||||||
daddu c_1,AT
|
daddu c_1,AT
|
||||||
|
sltu t_2,c_3,t_2
|
||||||
|
daddu c_1,t_2
|
||||||
sd c_2,56(a0)
|
sd c_2,56(a0)
|
||||||
|
|
||||||
dmultu a_7,a_1 /* mul_add_c2(a[7],b[1],c3,c1,c2); */
|
dmultu a_7,a_1 /* mul_add_c2(a[7],b[1],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_2,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_2,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
sltu t_2,c_1,t_2
|
||||||
daddu c_2,AT
|
daddu c_2,t_2
|
||||||
dmultu a_6,a_2 /* mul_add_c2(a[6],b[2],c3,c1,c2); */
|
dmultu a_6,a_2 /* mul_add_c2(a[6],b[2],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_2,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
|
||||||
daddu c_2,AT
|
daddu c_2,AT
|
||||||
|
sltu t_2,c_1,t_2
|
||||||
|
daddu c_2,t_2
|
||||||
dmultu a_5,a_3 /* mul_add_c2(a[5],b[3],c3,c1,c2); */
|
dmultu a_5,a_3 /* mul_add_c2(a[5],b[3],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_2,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
|
||||||
daddu c_2,AT
|
daddu c_2,AT
|
||||||
|
sltu t_2,c_1,t_2
|
||||||
|
daddu c_2,t_2
|
||||||
dmultu a_4,a_4 /* mul_add_c(a[4],b[4],c3,c1,c2); */
|
dmultu a_4,a_4 /* mul_add_c(a[4],b[4],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
@@ -1897,78 +1897,78 @@ LEAF(bn_sqr_comba8)
|
|||||||
dmultu a_2,a_7 /* mul_add_c2(a[2],b[7],c1,c2,c3); */
|
dmultu a_2,a_7 /* mul_add_c2(a[2],b[7],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_3,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_3,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
sltu t_2,c_2,t_2
|
||||||
daddu c_3,AT
|
daddu c_3,t_2
|
||||||
dmultu a_3,a_6 /* mul_add_c2(a[3],b[6],c1,c2,c3); */
|
dmultu a_3,a_6 /* mul_add_c2(a[3],b[6],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_3,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
|
||||||
daddu c_3,AT
|
daddu c_3,AT
|
||||||
|
sltu t_2,c_2,t_2
|
||||||
|
daddu c_3,t_2
|
||||||
dmultu a_4,a_5 /* mul_add_c2(a[4],b[5],c1,c2,c3); */
|
dmultu a_4,a_5 /* mul_add_c2(a[4],b[5],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_3,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
|
||||||
daddu c_3,AT
|
daddu c_3,AT
|
||||||
|
sltu t_2,c_2,t_2
|
||||||
|
daddu c_3,t_2
|
||||||
sd c_1,72(a0)
|
sd c_1,72(a0)
|
||||||
|
|
||||||
dmultu a_7,a_3 /* mul_add_c2(a[7],b[3],c2,c3,c1); */
|
dmultu a_7,a_3 /* mul_add_c2(a[7],b[3],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_1,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_1,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
sltu t_2,c_3,t_2
|
||||||
daddu c_1,AT
|
daddu c_1,t_2
|
||||||
dmultu a_6,a_4 /* mul_add_c2(a[6],b[4],c2,c3,c1); */
|
dmultu a_6,a_4 /* mul_add_c2(a[6],b[4],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_1,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
|
||||||
daddu c_1,AT
|
daddu c_1,AT
|
||||||
|
sltu t_2,c_3,t_2
|
||||||
|
daddu c_1,t_2
|
||||||
dmultu a_5,a_5 /* mul_add_c(a[5],b[5],c2,c3,c1); */
|
dmultu a_5,a_5 /* mul_add_c(a[5],b[5],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
@@ -1983,48 +1983,48 @@ LEAF(bn_sqr_comba8)
|
|||||||
dmultu a_4,a_7 /* mul_add_c2(a[4],b[7],c3,c1,c2); */
|
dmultu a_4,a_7 /* mul_add_c2(a[4],b[7],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_2,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_2,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
sltu t_2,c_1,t_2
|
||||||
daddu c_2,AT
|
daddu c_2,t_2
|
||||||
dmultu a_5,a_6 /* mul_add_c2(a[5],b[6],c3,c1,c2); */
|
dmultu a_5,a_6 /* mul_add_c2(a[5],b[6],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_2,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
|
||||||
daddu c_2,AT
|
daddu c_2,AT
|
||||||
|
sltu t_2,c_1,t_2
|
||||||
|
daddu c_2,t_2
|
||||||
sd c_3,88(a0)
|
sd c_3,88(a0)
|
||||||
|
|
||||||
dmultu a_7,a_5 /* mul_add_c2(a[7],b[5],c1,c2,c3); */
|
dmultu a_7,a_5 /* mul_add_c2(a[7],b[5],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_3,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_3,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
sltu t_2,c_2,t_2
|
||||||
daddu c_3,AT
|
daddu c_3,t_2
|
||||||
dmultu a_6,a_6 /* mul_add_c(a[6],b[6],c1,c2,c3); */
|
dmultu a_6,a_6 /* mul_add_c(a[6],b[6],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
@@ -2039,17 +2039,17 @@ LEAF(bn_sqr_comba8)
|
|||||||
dmultu a_6,a_7 /* mul_add_c2(a[6],b[7],c2,c3,c1); */
|
dmultu a_6,a_7 /* mul_add_c2(a[6],b[7],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_1,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_1,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
sltu t_2,c_3,t_2
|
||||||
daddu c_1,AT
|
daddu c_1,t_2
|
||||||
sd c_2,104(a0)
|
sd c_2,104(a0)
|
||||||
|
|
||||||
dmultu a_7,a_7 /* mul_add_c(a[7],b[7],c3,c1,c2); */
|
dmultu a_7,a_7 /* mul_add_c(a[7],b[7],c3,c1,c2); */
|
||||||
@@ -2070,9 +2070,9 @@ LEAF(bn_sqr_comba4)
|
|||||||
.set reorder
|
.set reorder
|
||||||
ld a_0,0(a1)
|
ld a_0,0(a1)
|
||||||
ld a_1,8(a1)
|
ld a_1,8(a1)
|
||||||
|
dmultu a_0,a_0 /* mul_add_c(a[0],b[0],c1,c2,c3); */
|
||||||
ld a_2,16(a1)
|
ld a_2,16(a1)
|
||||||
ld a_3,24(a1)
|
ld a_3,24(a1)
|
||||||
dmultu a_0,a_0 /* mul_add_c(a[0],b[0],c1,c2,c3); */
|
|
||||||
mflo c_1
|
mflo c_1
|
||||||
mfhi c_2
|
mfhi c_2
|
||||||
sd c_1,0(a0)
|
sd c_1,0(a0)
|
||||||
@@ -2093,17 +2093,17 @@ LEAF(bn_sqr_comba4)
|
|||||||
dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */
|
dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_2,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_2,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
sltu t_2,c_1,t_2
|
||||||
daddu c_2,AT
|
daddu c_2,t_2
|
||||||
dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */
|
dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
@@ -2118,48 +2118,48 @@ LEAF(bn_sqr_comba4)
|
|||||||
dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */
|
dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_3,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_3,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
sltu t_2,c_2,t_2
|
||||||
daddu c_3,AT
|
daddu c_3,t_2
|
||||||
dmultu a_1,a_2 /* mul_add_c(a2[1],b[2],c1,c2,c3); */
|
dmultu a_1,a_2 /* mul_add_c(a2[1],b[2],c1,c2,c3); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt AT,t_2,zero
|
|
||||||
daddu c_3,AT
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_1,t_1
|
daddu c_1,t_1
|
||||||
sltu AT,c_1,t_1
|
sltu AT,c_1,t_1
|
||||||
daddu t_2,AT
|
daddu c_1,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_1,t_1
|
||||||
|
daddu c_2,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu AT,c_2,AT
|
||||||
daddu c_2,t_2
|
daddu c_2,t_2
|
||||||
sltu AT,c_2,t_2
|
|
||||||
daddu c_3,AT
|
daddu c_3,AT
|
||||||
|
sltu t_2,c_2,t_2
|
||||||
|
daddu c_3,t_2
|
||||||
sd c_1,24(a0)
|
sd c_1,24(a0)
|
||||||
|
|
||||||
dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */
|
dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_1,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_2,t_1
|
daddu c_2,t_1
|
||||||
sltu AT,c_2,t_1
|
sltu AT,c_2,t_1
|
||||||
daddu t_2,AT
|
daddu c_2,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_2,t_1
|
||||||
|
daddu c_3,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_1,c_3,AT
|
||||||
daddu c_3,t_2
|
daddu c_3,t_2
|
||||||
sltu AT,c_3,t_2
|
sltu t_2,c_3,t_2
|
||||||
daddu c_1,AT
|
daddu c_1,t_2
|
||||||
dmultu a_2,a_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */
|
dmultu a_2,a_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
@@ -2174,17 +2174,17 @@ LEAF(bn_sqr_comba4)
|
|||||||
dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */
|
dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */
|
||||||
mflo t_1
|
mflo t_1
|
||||||
mfhi t_2
|
mfhi t_2
|
||||||
slt c_2,t_2,zero
|
|
||||||
dsll t_2,1
|
|
||||||
slt a2,t_1,zero
|
|
||||||
daddu t_2,a2
|
|
||||||
dsll t_1,1
|
|
||||||
daddu c_3,t_1
|
daddu c_3,t_1
|
||||||
sltu AT,c_3,t_1
|
sltu AT,c_3,t_1
|
||||||
daddu t_2,AT
|
daddu c_3,t_1
|
||||||
|
daddu AT,t_2
|
||||||
|
sltu t_1,c_3,t_1
|
||||||
|
daddu c_1,AT
|
||||||
|
daddu t_2,t_1
|
||||||
|
sltu c_2,c_1,AT
|
||||||
daddu c_1,t_2
|
daddu c_1,t_2
|
||||||
sltu AT,c_1,t_2
|
sltu t_2,c_1,t_2
|
||||||
daddu c_2,AT
|
daddu c_2,t_2
|
||||||
sd c_3,40(a0)
|
sd c_3,40(a0)
|
||||||
|
|
||||||
dmultu a_3,a_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */
|
dmultu a_3,a_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */
|
||||||
|
@@ -949,7 +949,7 @@ $data=<<EOF;
|
|||||||
addze r11,r0
|
addze r11,r0
|
||||||
#mul_add_c(a[3],b[2],c3,c1,c2);
|
#mul_add_c(a[3],b[2],c3,c1,c2);
|
||||||
$LD r6,`3*$BNSZ`(r4)
|
$LD r6,`3*$BNSZ`(r4)
|
||||||
$LD r7,`2*$BNSZ`(r4)
|
$LD r7,`2*$BNSZ`(r5)
|
||||||
$UMULL r8,r6,r7
|
$UMULL r8,r6,r7
|
||||||
$UMULH r9,r6,r7
|
$UMULH r9,r6,r7
|
||||||
addc r12,r8,r12
|
addc r12,r8,r12
|
||||||
|
@@ -69,8 +69,8 @@ bn_mul_mont:
|
|||||||
cghi $num,16 #
|
cghi $num,16 #
|
||||||
lghi %r2,0 #
|
lghi %r2,0 #
|
||||||
blr %r14 # if($num<16) return 0;
|
blr %r14 # if($num<16) return 0;
|
||||||
cghi $num,128 #
|
cghi $num,96 #
|
||||||
bhr %r14 # if($num>128) return 0;
|
bhr %r14 # if($num>96) return 0;
|
||||||
|
|
||||||
stmg %r3,%r15,24($sp)
|
stmg %r3,%r15,24($sp)
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
.ident "s390x.S, version 1.0"
|
.ident "s390x.S, version 1.1"
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
// Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
|
// Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
|
||||||
// project.
|
// project.
|
||||||
@@ -24,67 +24,67 @@ bn_mul_add_words:
|
|||||||
bler %r14 // if (len<=0) return 0;
|
bler %r14 // if (len<=0) return 0;
|
||||||
|
|
||||||
stmg %r6,%r10,48(%r15)
|
stmg %r6,%r10,48(%r15)
|
||||||
|
lghi %r10,3
|
||||||
lghi %r8,0 // carry = 0
|
lghi %r8,0 // carry = 0
|
||||||
srag %r10,%r4,2 // cnt=len/4
|
nr %r10,%r4 // len%4
|
||||||
jz .Loop1_madd
|
sra %r4,2 // cnt=len/4
|
||||||
|
jz .Loop1_madd // carry is incidentally cleared if branch taken
|
||||||
|
algr zero,zero // clear carry
|
||||||
|
|
||||||
.Loop4_madd:
|
.Loop4_madd:
|
||||||
lg %r7,0(%r2,%r3) // ap[i]
|
lg %r7,0(%r2,%r3) // ap[i]
|
||||||
mlgr %r6,%r5 // *=w
|
mlgr %r6,%r5 // *=w
|
||||||
algr %r7,%r8 // +=carry
|
alcgr %r7,%r8 // +=carry
|
||||||
alcgr %r6,zero
|
alcgr %r6,zero
|
||||||
alg %r7,0(%r2,%r1) // +=rp[i]
|
alg %r7,0(%r2,%r1) // +=rp[i]
|
||||||
alcgr %r6,zero
|
|
||||||
stg %r7,0(%r2,%r1) // rp[i]=
|
stg %r7,0(%r2,%r1) // rp[i]=
|
||||||
|
|
||||||
lg %r9,8(%r2,%r3)
|
lg %r9,8(%r2,%r3)
|
||||||
mlgr %r8,%r5
|
mlgr %r8,%r5
|
||||||
algr %r9,%r6
|
alcgr %r9,%r6
|
||||||
alcgr %r8,zero
|
alcgr %r8,zero
|
||||||
alg %r9,8(%r2,%r1)
|
alg %r9,8(%r2,%r1)
|
||||||
alcgr %r8,zero
|
|
||||||
stg %r9,8(%r2,%r1)
|
stg %r9,8(%r2,%r1)
|
||||||
|
|
||||||
lg %r7,16(%r2,%r3)
|
lg %r7,16(%r2,%r3)
|
||||||
mlgr %r6,%r5
|
mlgr %r6,%r5
|
||||||
algr %r7,%r8
|
alcgr %r7,%r8
|
||||||
alcgr %r6,zero
|
alcgr %r6,zero
|
||||||
alg %r7,16(%r2,%r1)
|
alg %r7,16(%r2,%r1)
|
||||||
alcgr %r6,zero
|
|
||||||
stg %r7,16(%r2,%r1)
|
stg %r7,16(%r2,%r1)
|
||||||
|
|
||||||
lg %r9,24(%r2,%r3)
|
lg %r9,24(%r2,%r3)
|
||||||
mlgr %r8,%r5
|
mlgr %r8,%r5
|
||||||
algr %r9,%r6
|
alcgr %r9,%r6
|
||||||
alcgr %r8,zero
|
alcgr %r8,zero
|
||||||
alg %r9,24(%r2,%r1)
|
alg %r9,24(%r2,%r1)
|
||||||
alcgr %r8,zero
|
|
||||||
stg %r9,24(%r2,%r1)
|
stg %r9,24(%r2,%r1)
|
||||||
|
|
||||||
la %r2,32(%r2) // i+=4
|
la %r2,32(%r2) // i+=4
|
||||||
brct %r10,.Loop4_madd
|
brct %r4,.Loop4_madd
|
||||||
|
|
||||||
lghi %r10,3
|
la %r10,1(%r10) // see if len%4 is zero ...
|
||||||
nr %r4,%r10 // cnt=len%4
|
brct %r10,.Loop1_madd // without touching condition code:-)
|
||||||
jz .Lend_madd
|
|
||||||
|
.Lend_madd:
|
||||||
|
alcgr %r8,zero // collect carry bit
|
||||||
|
lgr %r2,%r8
|
||||||
|
lmg %r6,%r10,48(%r15)
|
||||||
|
br %r14
|
||||||
|
|
||||||
.Loop1_madd:
|
.Loop1_madd:
|
||||||
lg %r7,0(%r2,%r3) // ap[i]
|
lg %r7,0(%r2,%r3) // ap[i]
|
||||||
mlgr %r6,%r5 // *=w
|
mlgr %r6,%r5 // *=w
|
||||||
algr %r7,%r8 // +=carry
|
alcgr %r7,%r8 // +=carry
|
||||||
alcgr %r6,zero
|
alcgr %r6,zero
|
||||||
alg %r7,0(%r2,%r1) // +=rp[i]
|
alg %r7,0(%r2,%r1) // +=rp[i]
|
||||||
alcgr %r6,zero
|
|
||||||
stg %r7,0(%r2,%r1) // rp[i]=
|
stg %r7,0(%r2,%r1) // rp[i]=
|
||||||
|
|
||||||
lgr %r8,%r6
|
lgr %r8,%r6
|
||||||
la %r2,8(%r2) // i++
|
la %r2,8(%r2) // i++
|
||||||
brct %r4,.Loop1_madd
|
brct %r10,.Loop1_madd
|
||||||
|
|
||||||
.Lend_madd:
|
j .Lend_madd
|
||||||
lgr %r2,%r8
|
|
||||||
lmg %r6,%r10,48(%r15)
|
|
||||||
br %r14
|
|
||||||
.size bn_mul_add_words,.-bn_mul_add_words
|
.size bn_mul_add_words,.-bn_mul_add_words
|
||||||
|
|
||||||
// BN_ULONG bn_mul_words(BN_ULONG *r2,BN_ULONG *r3,int r4,BN_ULONG r5);
|
// BN_ULONG bn_mul_words(BN_ULONG *r2,BN_ULONG *r3,int r4,BN_ULONG r5);
|
||||||
@@ -99,57 +99,57 @@ bn_mul_words:
|
|||||||
bler %r14 // if (len<=0) return 0;
|
bler %r14 // if (len<=0) return 0;
|
||||||
|
|
||||||
stmg %r6,%r10,48(%r15)
|
stmg %r6,%r10,48(%r15)
|
||||||
|
lghi %r10,3
|
||||||
lghi %r8,0 // carry = 0
|
lghi %r8,0 // carry = 0
|
||||||
srag %r10,%r4,2 // cnt=len/4
|
nr %r10,%r4 // len%4
|
||||||
jz .Loop1_mul
|
sra %r4,2 // cnt=len/4
|
||||||
|
jz .Loop1_mul // carry is incidentally cleared if branch taken
|
||||||
|
algr zero,zero // clear carry
|
||||||
|
|
||||||
.Loop4_mul:
|
.Loop4_mul:
|
||||||
lg %r7,0(%r2,%r3) // ap[i]
|
lg %r7,0(%r2,%r3) // ap[i]
|
||||||
mlgr %r6,%r5 // *=w
|
mlgr %r6,%r5 // *=w
|
||||||
algr %r7,%r8 // +=carry
|
alcgr %r7,%r8 // +=carry
|
||||||
alcgr %r6,zero
|
|
||||||
stg %r7,0(%r2,%r1) // rp[i]=
|
stg %r7,0(%r2,%r1) // rp[i]=
|
||||||
|
|
||||||
lg %r9,8(%r2,%r3)
|
lg %r9,8(%r2,%r3)
|
||||||
mlgr %r8,%r5
|
mlgr %r8,%r5
|
||||||
algr %r9,%r6
|
alcgr %r9,%r6
|
||||||
alcgr %r8,zero
|
|
||||||
stg %r9,8(%r2,%r1)
|
stg %r9,8(%r2,%r1)
|
||||||
|
|
||||||
lg %r7,16(%r2,%r3)
|
lg %r7,16(%r2,%r3)
|
||||||
mlgr %r6,%r5
|
mlgr %r6,%r5
|
||||||
algr %r7,%r8
|
alcgr %r7,%r8
|
||||||
alcgr %r6,zero
|
|
||||||
stg %r7,16(%r2,%r1)
|
stg %r7,16(%r2,%r1)
|
||||||
|
|
||||||
lg %r9,24(%r2,%r3)
|
lg %r9,24(%r2,%r3)
|
||||||
mlgr %r8,%r5
|
mlgr %r8,%r5
|
||||||
algr %r9,%r6
|
alcgr %r9,%r6
|
||||||
alcgr %r8,zero
|
|
||||||
stg %r9,24(%r2,%r1)
|
stg %r9,24(%r2,%r1)
|
||||||
|
|
||||||
la %r2,32(%r2) // i+=4
|
la %r2,32(%r2) // i+=4
|
||||||
brct %r10,.Loop4_mul
|
brct %r4,.Loop4_mul
|
||||||
|
|
||||||
lghi %r10,3
|
la %r10,1(%r10) // see if len%4 is zero ...
|
||||||
nr %r4,%r10 // cnt=len%4
|
brct %r10,.Loop1_mul // without touching condition code:-)
|
||||||
jz .Lend_mul
|
|
||||||
|
.Lend_mul:
|
||||||
|
alcgr %r8,zero // collect carry bit
|
||||||
|
lgr %r2,%r8
|
||||||
|
lmg %r6,%r10,48(%r15)
|
||||||
|
br %r14
|
||||||
|
|
||||||
.Loop1_mul:
|
.Loop1_mul:
|
||||||
lg %r7,0(%r2,%r3) // ap[i]
|
lg %r7,0(%r2,%r3) // ap[i]
|
||||||
mlgr %r6,%r5 // *=w
|
mlgr %r6,%r5 // *=w
|
||||||
algr %r7,%r8 // +=carry
|
alcgr %r7,%r8 // +=carry
|
||||||
alcgr %r6,zero
|
|
||||||
stg %r7,0(%r2,%r1) // rp[i]=
|
stg %r7,0(%r2,%r1) // rp[i]=
|
||||||
|
|
||||||
lgr %r8,%r6
|
lgr %r8,%r6
|
||||||
la %r2,8(%r2) // i++
|
la %r2,8(%r2) // i++
|
||||||
brct %r4,.Loop1_mul
|
brct %r10,.Loop1_mul
|
||||||
|
|
||||||
.Lend_mul:
|
j .Lend_mul
|
||||||
lgr %r2,%r8
|
|
||||||
lmg %r6,%r10,48(%r15)
|
|
||||||
br %r14
|
|
||||||
.size bn_mul_words,.-bn_mul_words
|
.size bn_mul_words,.-bn_mul_words
|
||||||
|
|
||||||
// void bn_sqr_words(BN_ULONG *r2,BN_ULONG *r2,int r4)
|
// void bn_sqr_words(BN_ULONG *r2,BN_ULONG *r2,int r4)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user