Compare commits
1324 Commits
OpenSSL_1_
...
OpenSSL_1_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b83ceba7d5 | ||
|
|
d9738d5f07 | ||
|
|
583f0bc402 | ||
|
|
e8e878bec7 | ||
|
|
6099e629f5 | ||
|
|
3570086760 | ||
|
|
acb341eb6e | ||
|
|
8fb2c9922a | ||
|
|
a97c208c5a | ||
|
|
cc6e9f9abb | ||
|
|
56cd740449 | ||
|
|
8437225d34 | ||
|
|
b4a57c4c41 | ||
|
|
faa8038edd | ||
|
|
e02863b5ac | ||
|
|
04685bc949 | ||
|
|
98a0f9660d | ||
|
|
45fe66b8ba | ||
|
|
8d7aab986b | ||
|
|
e078642dde | ||
|
|
ffd14272c4 | ||
|
|
f16f3ac559 | ||
|
|
4fb433d221 | ||
|
|
293c1e2235 | ||
|
|
d5e16a711e | ||
|
|
178c562a46 | ||
|
|
61052e891e | ||
|
|
cb951e336b | ||
|
|
37580f43b5 | ||
|
|
ef28c6d676 | ||
|
|
2175744952 | ||
|
|
2357cd2e20 | ||
|
|
5951cc004b | ||
|
|
a8565530e2 | ||
|
|
9e9ee7e37f | ||
|
|
500d67f15a | ||
|
|
40fb8587ed | ||
|
|
c14a808c51 | ||
|
|
cdf42d7b43 | ||
|
|
7858d304bc | ||
|
|
f14a6bf515 | ||
|
|
5dad57536f | ||
|
|
a5fad4d6bc | ||
|
|
d6c2e3e621 | ||
|
|
8c46748bcb | ||
|
|
86edf13b1c | ||
|
|
fcd9b1073a | ||
|
|
036df29387 | ||
|
|
60b7d3bbb5 | ||
|
|
7e9d42ce97 | ||
|
|
b3147fcbe6 | ||
|
|
feefb73ad9 | ||
|
|
8932b82f7d | ||
|
|
a4a759acec | ||
|
|
6e5a554533 | ||
|
|
2164a17a7d | ||
|
|
dc1e493808 | ||
|
|
1fe8304db0 | ||
|
|
bfd19df6d0 | ||
|
|
7f9edfd23a | ||
|
|
9673056c25 | ||
|
|
f50730d361 | ||
|
|
9beb948c0d | ||
|
|
ce5ddefc43 | ||
|
|
458f23f610 | ||
|
|
c983a77887 | ||
|
|
7516eaf492 | ||
|
|
c6a84ff351 | ||
|
|
b8b9bcb458 | ||
|
|
be617fbaf8 | ||
|
|
321ba85899 | ||
|
|
fcabfc66ae | ||
|
|
9844573039 | ||
|
|
6579603874 | ||
|
|
d68aade28a | ||
|
|
3242e5938b | ||
|
|
35384e8e5b | ||
|
|
4c21e004a3 | ||
|
|
59ee70e386 | ||
|
|
43e569921e | ||
|
|
8aaeec9f9a | ||
|
|
8454d3f924 | ||
|
|
5004c22c25 | ||
|
|
e96872f4c0 | ||
|
|
14e9a78d47 | ||
|
|
2aca9b272e | ||
|
|
26d7cb400e | ||
|
|
2db95e094d | ||
|
|
5fc8bb6ab7 | ||
|
|
244d0955ad | ||
|
|
061e68c554 | ||
|
|
3f1d582f70 | ||
|
|
8a2e5bf6b7 | ||
|
|
6c3d948723 | ||
|
|
51c5ab5d3a | ||
|
|
ff60f33811 | ||
|
|
2cfa5edb26 | ||
|
|
291a3e9629 | ||
|
|
2184a14b62 | ||
|
|
2e84084fbc | ||
|
|
26f9cfbdca | ||
|
|
7fc5f4f117 | ||
|
|
249a3e362f | ||
|
|
15d717f574 | ||
|
|
b8712b2b9a | ||
|
|
1eaccbef57 | ||
|
|
e2f69f5ce7 | ||
|
|
821bee4333 | ||
|
|
8b6205c484 | ||
|
|
e5cf62b04d | ||
|
|
b1edca2a4c | ||
|
|
e7768ebbd2 | ||
|
|
329a76c085 | ||
|
|
bbb76be9b5 | ||
|
|
b726b8a60c | ||
|
|
e298409c34 | ||
|
|
25012d5e79 | ||
|
|
09b7de77b3 | ||
|
|
9bdedec0cf | ||
|
|
f63fa8b10a | ||
|
|
d47aebbb47 | ||
|
|
08931f1cd6 | ||
|
|
6ce9687b5a | ||
|
|
20e610580e | ||
|
|
4fa17211bb | ||
|
|
d8d40fc676 | ||
|
|
3c7fcdfdd4 | ||
|
|
e356ac5c06 | ||
|
|
872e681c00 | ||
|
|
38b71ba8ff | ||
|
|
f8cf36c298 | ||
|
|
26a59d9b46 | ||
|
|
7fd4ce6a99 | ||
|
|
d9d09a8d0f | ||
|
|
2b0532f398 | ||
|
|
7d07c75c5b | ||
|
|
f34297db80 | ||
|
|
e2e5326e5b | ||
|
|
592c6e1191 | ||
|
|
8202802fad | ||
|
|
f79bb32926 | ||
|
|
7a3809fd97 | ||
|
|
f13a149088 | ||
|
|
fc586d2955 | ||
|
|
17d45dec4d | ||
|
|
6bfe55380a | ||
|
|
4e05aedbca | ||
|
|
bf3e200eb4 | ||
|
|
55614f89f0 | ||
|
|
b1620443f3 | ||
|
|
4ed98b6e25 | ||
|
|
3a33923515 | ||
|
|
f2df488a1c | ||
|
|
8d507aee7c | ||
|
|
133145686e | ||
|
|
0f04b004ac | ||
|
|
81e3a6055c | ||
|
|
bea9a17726 | ||
|
|
b537ea9ce4 | ||
|
|
13ce52be1b | ||
|
|
11853c50ec | ||
|
|
a60aa7e008 | ||
|
|
a49256a349 | ||
|
|
e517dfd3d1 | ||
|
|
74687f5979 | ||
|
|
8dc6617ad5 | ||
|
|
c2119214c2 | ||
|
|
22387f00b6 | ||
|
|
4d16915381 | ||
|
|
e7169a5835 | ||
|
|
abc2dfbcc3 | ||
|
|
23ea9f6f03 | ||
|
|
3e5df37861 | ||
|
|
4e5f9f8a9a | ||
|
|
9446ecfb3a | ||
|
|
48ecdec7a0 | ||
|
|
8f5f782253 | ||
|
|
228a77a4ad | ||
|
|
03b17a5789 | ||
|
|
391f3b5708 | ||
|
|
fe9b9a880f | ||
|
|
9f96ea4c2b | ||
|
|
41a765182f | ||
|
|
bcdd904c6c | ||
|
|
a90b1e32d2 | ||
|
|
0ed8e95c4b | ||
|
|
6b5b85f4f6 | ||
|
|
03ebf85f77 | ||
|
|
30fbe92c78 | ||
|
|
1241e77f15 | ||
|
|
1433cac53c | ||
|
|
204fb36a0e | ||
|
|
2b45603445 | ||
|
|
d70c0be4c1 | ||
|
|
9b649d9a73 | ||
|
|
abbd58559e | ||
|
|
d15d17bb64 | ||
|
|
966fe81f9b | ||
|
|
83764a989d | ||
|
|
86788e1ee6 | ||
|
|
03b04ddac1 | ||
|
|
88ae012c80 | ||
|
|
fc4f4cdb8b | ||
|
|
4e0fbdc4ec | ||
|
|
0c37aed3f3 | ||
|
|
099ccdb808 | ||
|
|
9871417fb7 | ||
|
|
fc7804ec39 | ||
|
|
e7b9d9be48 | ||
|
|
2172d4f63c | ||
|
|
c34091d47e | ||
|
|
a9f4ebd753 | ||
|
|
604c9948a8 | ||
|
|
281720c2a3 | ||
|
|
2a9023f7b4 | ||
|
|
36e8c39899 | ||
|
|
e3f009c595 | ||
|
|
fbe3baa773 | ||
|
|
690998f904 | ||
|
|
3221da845f | ||
|
|
9aeb410419 | ||
|
|
bf4519cde5 | ||
|
|
e967b94356 | ||
|
|
2316286c0e | ||
|
|
67bde7d465 | ||
|
|
cd63f94d4d | ||
|
|
2054eb771e | ||
|
|
ea0ceb11a0 | ||
|
|
00579b98c4 | ||
|
|
ee5a8d3e31 | ||
|
|
72370164c3 | ||
|
|
704422ce1e | ||
|
|
8e8d7e1b26 | ||
|
|
3ed6327571 | ||
|
|
efd4f1dfd3 | ||
|
|
00032b0ba1 | ||
|
|
a07f514fc0 | ||
|
|
b197c770a6 | ||
|
|
b7c9762598 | ||
|
|
a414bc8c3e | ||
|
|
98a3c3c514 | ||
|
|
157fd05aad | ||
|
|
9f510ceb5d | ||
|
|
675b1c2fce | ||
|
|
c923132e9d | ||
|
|
1864e3bed3 | ||
|
|
af7bcd7daa | ||
|
|
3fa2fff86f | ||
|
|
b372a64e10 | ||
|
|
e432336433 | ||
|
|
f3b0e0215c | ||
|
|
a6cc0e0a0d | ||
|
|
b2cb6dc1ef | ||
|
|
f87f88a69f | ||
|
|
6d87cd2f03 | ||
|
|
2db3ea2929 | ||
|
|
c28b055a0c | ||
|
|
02e8d46119 | ||
|
|
105a3db56e | ||
|
|
295befec25 | ||
|
|
cb34cb1f23 | ||
|
|
86f393ceb7 | ||
|
|
d6d324374e | ||
|
|
14999bcc59 | ||
|
|
046e288edf | ||
|
|
d8b11e75cb | ||
|
|
0df7959d43 | ||
|
|
5894eb1f33 | ||
|
|
6daba1dc6a | ||
|
|
69b8f2895b | ||
|
|
0ace876730 | ||
|
|
e9daf8a9ce | ||
|
|
cf0156622a | ||
|
|
86cac6d3b2 | ||
|
|
f46ea1d8e2 | ||
|
|
0980992d44 | ||
|
|
38a503fb8a | ||
|
|
fef58ce79e | ||
|
|
da0d5e78bc | ||
|
|
ad212c1ed1 | ||
|
|
e1bce59fd3 | ||
|
|
9beb75d3c4 | ||
|
|
042ef467ee | ||
|
|
01736e6c41 | ||
|
|
29411a0c7a | ||
|
|
b66f59adfa | ||
|
|
9ab788aa23 | ||
|
|
87887a7a65 | ||
|
|
5a0d057e49 | ||
|
|
aa59369b4c | ||
|
|
18c7f2fce8 | ||
|
|
6a8d6f039a | ||
|
|
5ff9c21f72 | ||
|
|
5c52c04650 | ||
|
|
6c86bf7a1e | ||
|
|
0d4d2e02eb | ||
|
|
151399a944 | ||
|
|
049615e35d | ||
|
|
6b72417a00 | ||
|
|
aabbe99fcb | ||
|
|
8011cd56e3 | ||
|
|
d3152655d5 | ||
|
|
006cd7083f | ||
|
|
bc8923b1ec | ||
|
|
1632ef7448 | ||
|
|
f1f4fbde2a | ||
|
|
1854c48005 | ||
|
|
ebda73f867 | ||
|
|
bcc311668e | ||
|
|
1dd26414df | ||
|
|
056389eb1c | ||
|
|
a07856a08d | ||
|
|
19ce768c6b | ||
|
|
aaed77c55e | ||
|
|
49270d0431 | ||
|
|
673c42b238 | ||
|
|
5541b18ba8 | ||
|
|
28e117f49f | ||
|
|
46bfc05480 | ||
|
|
427a37ca3f | ||
|
|
39ae3b338f | ||
|
|
48f5b3efce | ||
|
|
f8dc000699 | ||
|
|
bf8d6f9ab8 | ||
|
|
17e844a450 | ||
|
|
8ca7d12430 | ||
|
|
67b9c82ea2 | ||
|
|
a6f5b991eb | ||
|
|
756587dcb9 | ||
|
|
0a084f7b3a | ||
|
|
da0a95b23a | ||
|
|
599fe418a1 | ||
|
|
4519e7b839 | ||
|
|
4659b53e7d | ||
|
|
dc22495d35 | ||
|
|
ab0d964259 | ||
|
|
dac3654e2d | ||
|
|
989d87cb1a | ||
|
|
d6934a02b5 | ||
|
|
f9986e9abf | ||
|
|
1f5e321ec1 | ||
|
|
b6adb6ef58 | ||
|
|
bfdaf45141 | ||
|
|
69526a354d | ||
|
|
778f2b648c | ||
|
|
2223317bef | ||
|
|
b107586c0c | ||
|
|
d544755389 | ||
|
|
88398e9ba3 | ||
|
|
15c1ac03c8 | ||
|
|
c3c6fc7855 | ||
|
|
4d8cca8a7e | ||
|
|
d61be85581 | ||
|
|
9e456a8537 | ||
|
|
f179e2b899 | ||
|
|
6a60b41431 | ||
|
|
c6a47f988c | ||
|
|
d0666f289a | ||
|
|
d8afda60a9 | ||
|
|
804ab36df6 | ||
|
|
a41d5174e2 | ||
|
|
9c5d953a07 | ||
|
|
7b7b18c57e | ||
|
|
8eb094b946 | ||
|
|
7fa18a63cb | ||
|
|
90600a5e3b | ||
|
|
23f5908ac7 | ||
|
|
e622237d12 | ||
|
|
f0816174d2 | ||
|
|
057444f844 | ||
|
|
725c5f1ad3 | ||
|
|
9c8dc84ac1 | ||
|
|
e3899ababb | ||
|
|
3fc880ac5d | ||
|
|
602b2790ca | ||
|
|
b05a3ad765 | ||
|
|
3d8f4f23af | ||
|
|
a74bee5fc7 | ||
|
|
55c9e24875 | ||
|
|
ebe221948d | ||
|
|
b2d951e423 | ||
|
|
c5993d10a8 | ||
|
|
5be1ae28ef | ||
|
|
96db9023b8 | ||
|
|
0d7717fc9c | ||
|
|
aba7600029 | ||
|
|
00acdfbf98 | ||
|
|
51624dbdae | ||
|
|
9e29df0027 | ||
|
|
f54167d1dc | ||
|
|
6042582b62 | ||
|
|
50522642a0 | ||
|
|
bfc3424d1f | ||
|
|
1c65936882 | ||
|
|
40acdb192e | ||
|
|
4b7a4ba29c | ||
|
|
e0660c6257 | ||
|
|
b4ada742d1 | ||
|
|
a93d952cd4 | ||
|
|
5b56fec6f5 | ||
|
|
32171e4e07 | ||
|
|
48e6edabed | ||
|
|
069607124d | ||
|
|
caf55bfacf | ||
|
|
ce3631015e | ||
|
|
3ae1b53496 | ||
|
|
79bb00534d | ||
|
|
c4b16ddc8f | ||
|
|
deb3b08ff2 | ||
|
|
b45b3efd5d | ||
|
|
e420060ac9 | ||
|
|
d8ec8a4a65 | ||
|
|
040ed7b4d0 | ||
|
|
c76e5b08a1 | ||
|
|
0071215832 | ||
|
|
4a55631e4d | ||
|
|
19a68574a9 | ||
|
|
f21e6b6ecb | ||
|
|
e1549a01c7 | ||
|
|
765be74d24 | ||
|
|
9614d2c676 | ||
|
|
ad03c71ea1 | ||
|
|
4eedf86a16 | ||
|
|
eb85ee9a88 | ||
|
|
fa2026dc88 | ||
|
|
fe08007399 | ||
|
|
e3ebdcff12 | ||
|
|
cb10cf1224 | ||
|
|
c0dd71c97c | ||
|
|
51478be956 | ||
|
|
a7304e4b98 | ||
|
|
0d8776344c | ||
|
|
197e0ea817 | ||
|
|
c776a3f398 | ||
|
|
25c9fa6026 | ||
|
|
d2dc33d57c | ||
|
|
f3dcc8411e | ||
|
|
1c2c5e402a | ||
|
|
34628967f1 | ||
|
|
a6c62f0c25 | ||
|
|
ca989269a2 | ||
|
|
2ec4181ba9 | ||
|
|
0294b2be5f | ||
|
|
f1068a1ab7 | ||
|
|
cadde467a8 | ||
|
|
c2bdcba347 | ||
|
|
60df657b3a | ||
|
|
17a2d0801f | ||
|
|
accb3007ac | ||
|
|
b13dff6141 | ||
|
|
4ade6a8ca4 | ||
|
|
00fadef414 | ||
|
|
7ed244a0b3 | ||
|
|
e94a23876c | ||
|
|
041f681943 | ||
|
|
afec9f57da | ||
|
|
0ec1a77891 | ||
|
|
62c2b6d944 | ||
|
|
5b98979712 | ||
|
|
9abbf5cce7 | ||
|
|
ddfe486e4c | ||
|
|
834d30bc63 | ||
|
|
e26faa9e0c | ||
|
|
025f7dbdd1 | ||
|
|
44f4934bde | ||
|
|
453ca706cc | ||
|
|
5e1ff664f9 | ||
|
|
833a896681 | ||
|
|
34e43b909f | ||
|
|
62036c6fc3 | ||
|
|
68dd8512b7 | ||
|
|
bbf9f3c654 | ||
|
|
2583270191 | ||
|
|
3da721dac9 | ||
|
|
eb22b7ec75 | ||
|
|
b93916149d | ||
|
|
82f42a1d2e | ||
|
|
a4870de5aa | ||
|
|
39aabe59c8 | ||
|
|
f4c93b46ed | ||
|
|
4af793036f | ||
|
|
13bca90ac5 | ||
|
|
c9a6ddafc5 | ||
|
|
f4a51970d2 | ||
|
|
937f125efc | ||
|
|
4b61f6d2a6 | ||
|
|
d5bff72615 | ||
|
|
3b4be0018b | ||
|
|
125c2ed8a3 | ||
|
|
09da95542a | ||
|
|
cc53b38574 | ||
|
|
0aeeae0c9c | ||
|
|
00c991f028 | ||
|
|
55856a7b74 | ||
|
|
83a3af9f4e | ||
|
|
76bf0cf27c | ||
|
|
7cf0529b52 | ||
|
|
6c03af135b | ||
|
|
5cd1aa4f15 | ||
|
|
04b80f4003 | ||
|
|
591c55a981 | ||
|
|
cd2693862b | ||
|
|
25370e93c6 | ||
|
|
cdb6c48445 | ||
|
|
04b727b4dd | ||
|
|
cbd93a0636 | ||
|
|
b9e84f007f | ||
|
|
29a546720b | ||
|
|
0e9dd387ea | ||
|
|
79dabcc137 | ||
|
|
944bc29f90 | ||
|
|
03e1b3a153 | ||
|
|
9c95ff968a | ||
|
|
96b680f210 | ||
|
|
9ab3ce1246 | ||
|
|
3972dbe462 | ||
|
|
85615e33e5 | ||
|
|
f4cfc3444a | ||
|
|
24f599af21 | ||
|
|
bca0d7fdb5 | ||
|
|
bc4ae2cb0b | ||
|
|
ef4b9f001a | ||
|
|
08f8933fa3 | ||
|
|
41958376b5 | ||
|
|
9fe4603b82 | ||
|
|
147dbb2fe3 | ||
|
|
cbf9b4aed3 | ||
|
|
625a55324f | ||
|
|
3151e328e0 | ||
|
|
46ebd9e3bb | ||
|
|
f66db68e1f | ||
|
|
0c4b72e9c0 | ||
|
|
f88dbb8385 | ||
|
|
1113fc31ba | ||
|
|
0898147090 | ||
|
|
4d8da30fc1 | ||
|
|
579f3a631e | ||
|
|
47061af106 | ||
|
|
13e225300f | ||
|
|
26bc56d014 | ||
|
|
496681cd51 | ||
|
|
746c6f3a53 | ||
|
|
8545f73b89 | ||
|
|
32cc2479b4 | ||
|
|
f306b87d76 | ||
|
|
41cf07f0ec | ||
|
|
62f4033381 | ||
|
|
f9f6a8f96c | ||
|
|
df0d93564e | ||
|
|
0d589ac150 | ||
|
|
35d732fc2e | ||
|
|
896ddb9851 | ||
|
|
e630b3c218 | ||
|
|
f1ca56a69f | ||
|
|
529d27ea47 | ||
|
|
b2226c6c83 | ||
|
|
024de2174b | ||
|
|
125093b59f | ||
|
|
f3e99ea072 | ||
|
|
8bfd4c659f | ||
|
|
ec07246a08 | ||
|
|
04e45b52ee | ||
|
|
d5371324d9 | ||
|
|
36260233e7 | ||
|
|
cab13fc847 | ||
|
|
34ab3c8c71 | ||
|
|
25c93fd240 | ||
|
|
428c1064c3 | ||
|
|
81ce0e14e7 | ||
|
|
b908e88ec1 | ||
|
|
62e4506a7d | ||
|
|
014265eb02 | ||
|
|
9f27de170d | ||
|
|
6cb19b7681 | ||
|
|
e130841bcc | ||
|
|
2ee798880a | ||
|
|
ffcf4c6164 | ||
|
|
b286a96811 | ||
|
|
2a2df2e9f2 | ||
|
|
15481c5e42 | ||
|
|
366b60b9da | ||
|
|
4782444a35 | ||
|
|
8a17e161d1 | ||
|
|
72f27cd2df | ||
|
|
3b3674ae58 | ||
|
|
9d75e765bc | ||
|
|
bf07bd4d61 | ||
|
|
296cc7f4b8 | ||
|
|
3d92984689 | ||
|
|
51447d5db5 | ||
|
|
1dcf520fe2 | ||
|
|
fca84dabe6 | ||
|
|
3ea1e13569 | ||
|
|
dd6639bd3a | ||
|
|
bee0550397 | ||
|
|
fc57c58c81 | ||
|
|
5bb6d96558 | ||
|
|
28e1bd35bd | ||
|
|
dd83cc298d | ||
|
|
ea00598596 | ||
|
|
a650314f72 | ||
|
|
54fdc39a08 | ||
|
|
7dc98a62b2 | ||
|
|
f20ba1c9bb | ||
|
|
7c3562947a | ||
|
|
eb3a3911fc | ||
|
|
540f7c75ef | ||
|
|
d6342aab08 | ||
|
|
e7b85bc402 | ||
|
|
07eaaab2f6 | ||
|
|
96f7fafa24 | ||
|
|
487a0df700 | ||
|
|
09ef5f6258 | ||
|
|
bcc0e4ca7c | ||
|
|
caac8fefdc | ||
|
|
353e845120 | ||
|
|
d1451f18d9 | ||
|
|
c3a5b7b82a | ||
|
|
70d91d60bc | ||
|
|
bc78883017 | ||
|
|
f929f201fb | ||
|
|
554cf97f03 | ||
|
|
48ccbeefda | ||
|
|
7a217076d9 | ||
|
|
0720bf7df1 | ||
|
|
9d6727781d | ||
|
|
12c1621523 | ||
|
|
f9b48d60f2 | ||
|
|
5c29127666 | ||
|
|
78d767f5ec | ||
|
|
c8b979e929 | ||
|
|
2beaa91ca7 | ||
|
|
efa288ceac | ||
|
|
ad3bbd4a16 | ||
|
|
73913443a5 | ||
|
|
e133ff7190 | ||
|
|
25da47c3c8 | ||
|
|
4dc40f5eec | ||
|
|
a1a37575f0 | ||
|
|
c64c0e03d3 | ||
|
|
e1e882a368 | ||
|
|
36b0719793 | ||
|
|
7655044dd3 | ||
|
|
58fdd30664 | ||
|
|
7175dbaeba | ||
|
|
af454b5bb0 | ||
|
|
5b2bbf37fa | ||
|
|
6321ac9e15 | ||
|
|
eeca72f71e | ||
|
|
6e164e5c3d | ||
|
|
1b452133ae | ||
|
|
d9c34505e5 | ||
|
|
f9885acc8c | ||
|
|
fa9df48401 | ||
|
|
d414a5a0f0 | ||
|
|
9eb4460e68 | ||
|
|
6984d16671 | ||
|
|
5b9d0995a1 | ||
|
|
7ad8e1fc4e | ||
|
|
c9b31189a9 | ||
|
|
c76b7a1a82 | ||
|
|
c940e07014 | ||
|
|
88be4ebfbc | ||
|
|
effa47b80a | ||
|
|
067400b16e | ||
|
|
748628ced0 | ||
|
|
6791060eae | ||
|
|
502dfeb8de | ||
|
|
5bbed29518 | ||
|
|
2f2d33f470 | ||
|
|
be60a3feaa | ||
|
|
e504a829a0 | ||
|
|
0d829f6681 | ||
|
|
d9540579c5 | ||
|
|
ecf963b80d | ||
|
|
7fc6d35be0 | ||
|
|
e7d2a37158 | ||
|
|
531c6fc8f3 | ||
|
|
e011d0a3c4 | ||
|
|
8d5505d099 | ||
|
|
d36e0ee460 | ||
|
|
143619ccf6 | ||
|
|
9f339d75b5 | ||
|
|
28583660fb | ||
|
|
dedfe959dd | ||
|
|
4d936ace08 | ||
|
|
89bd25eb26 | ||
|
|
4a1cf50187 | ||
|
|
32e12316e5 | ||
|
|
ad7b24f145 | ||
|
|
c2770c0e0e | ||
|
|
371056f2b9 | ||
|
|
2d613908e8 | ||
|
|
18fb1fae08 | ||
|
|
39ef161c72 | ||
|
|
a7612c5066 | ||
|
|
6cbae10b5e | ||
|
|
ebe81134c0 | ||
|
|
a1d573e282 | ||
|
|
e959e24b47 | ||
|
|
3f98d7c0b5 | ||
|
|
d2f950c984 | ||
|
|
63e8f16737 | ||
|
|
9bf5fd894f | ||
|
|
6296729fae | ||
|
|
67d216801b | ||
|
|
0a5575f3f6 | ||
|
|
418044cbab | ||
|
|
8c67b13407 | ||
|
|
2a477ccf0b | ||
|
|
c34137bef9 | ||
|
|
914d91c5b3 | ||
|
|
e733dea3ce | ||
|
|
78c5d2a9bb | ||
|
|
3bf4e14cc3 | ||
|
|
d68d160cb7 | ||
|
|
202cb42fbb | ||
|
|
49f6cb968f | ||
|
|
07e120b7da | ||
|
|
f3dcae15ac | ||
|
|
25ec498dc7 | ||
|
|
9cc42cb091 | ||
|
|
bcf9cf89e7 | ||
|
|
f0729fc3e0 | ||
|
|
8186c00ef3 | ||
|
|
c0b31ccb87 | ||
|
|
267c950c5f | ||
|
|
ce1605b508 | ||
|
|
66fdb1c0d4 | ||
|
|
25bfdca16a | ||
|
|
9c284f9651 | ||
|
|
6d78c381f6 | ||
|
|
784e2080df | ||
|
|
70505bc334 | ||
|
|
8e8b247341 | ||
|
|
a8595879ec | ||
|
|
33a688e806 | ||
|
|
5c2bfad9b4 | ||
|
|
250f979237 | ||
|
|
b527b6e8ff | ||
|
|
a54ce007e6 | ||
|
|
4ed1f3490e | ||
|
|
0a082e9b37 | ||
|
|
236a99a409 | ||
|
|
04b4363ec8 | ||
|
|
37ebc20093 | ||
|
|
cef781cc87 | ||
|
|
08e4c7a967 | ||
|
|
697e4edcad | ||
|
|
b26297ca51 | ||
|
|
6ca7dba0cf | ||
|
|
f1fa05b407 | ||
|
|
02e22c35fe | ||
|
|
b935714237 | ||
|
|
a8314df902 | ||
|
|
0cd7a0325f | ||
|
|
16b7c81d55 | ||
|
|
424ba8b588 | ||
|
|
bf493e8d62 | ||
|
|
c714e43c8d | ||
|
|
cdf9d6f6ed | ||
|
|
cc4b48c27c | ||
|
|
cac9c92cc0 | ||
|
|
d40abf1689 | ||
|
|
69e9c69e70 | ||
|
|
c489ea7d01 | ||
|
|
26c6857a59 | ||
|
|
508bd3d1aa | ||
|
|
8705846710 | ||
|
|
c944a9696e | ||
|
|
943cc09d8a | ||
|
|
fc6800d19f | ||
|
|
d06f047b04 | ||
|
|
ddc899bada | ||
|
|
bd479e25c7 | ||
|
|
eaf5bd168e | ||
|
|
d7ecc206ba | ||
|
|
11ea212e8c | ||
|
|
cb29d8c11f | ||
|
|
adcea5a043 | ||
|
|
f02f7c2c4a | ||
|
|
a1e44cc14f | ||
|
|
d2d09bf68c | ||
|
|
e2dfb655f7 | ||
|
|
463e76b63c | ||
|
|
2dc4b0dbe8 | ||
|
|
7b23c126e6 | ||
|
|
25e3d2225a | ||
|
|
c8e0b5d7b6 | ||
|
|
4fb7e2b445 | ||
|
|
9138e3c061 | ||
|
|
9b2a29660b | ||
|
|
b7b4a9fa57 | ||
|
|
1fb07a7de8 | ||
|
|
b9cbcaad58 | ||
|
|
c6706a6f6c | ||
|
|
958e6a75a1 | ||
|
|
397977726c | ||
|
|
285d9189c7 | ||
|
|
767d3e0054 | ||
|
|
409d2a1b71 | ||
|
|
e0b9678d7f | ||
|
|
166dea6ac8 | ||
|
|
52bef4d677 | ||
|
|
801e5ef840 | ||
|
|
0044739ae5 | ||
|
|
4e44bd3650 | ||
|
|
0cffb0cd3e | ||
|
|
aaa3850ccd | ||
|
|
a17b5d5a4f | ||
|
|
2f97765bc3 | ||
|
|
3205ca8deb | ||
|
|
1cb4d65b87 | ||
|
|
7b2dd292bc | ||
|
|
ab585551c0 | ||
|
|
6cf0d7b999 | ||
|
|
9d972207f0 | ||
|
|
d9834ff24b | ||
|
|
d9c3ba05e7 | ||
|
|
03467ce6bd | ||
|
|
6e750fcb1e | ||
|
|
bd6941cfaa | ||
|
|
578519edd0 | ||
|
|
5c05f69450 | ||
|
|
f529dca488 | ||
|
|
296aca9dcf | ||
|
|
b170703128 | ||
|
|
b300fb7734 | ||
|
|
f89af47438 | ||
|
|
7bb4f8ff12 | ||
|
|
7dd6407a4c | ||
|
|
53de315b78 | ||
|
|
e065e6cda2 | ||
|
|
60553cc209 | ||
|
|
2d4c9ab518 | ||
|
|
50771f7ce3 | ||
|
|
242f8d644c | ||
|
|
f5575cd167 | ||
|
|
dd0ddc3e78 | ||
|
|
62308f3f4a | ||
|
|
cecafcce94 | ||
|
|
ca0efb7594 | ||
|
|
1d05ff2779 | ||
|
|
941811ccb9 | ||
|
|
700384be8e | ||
|
|
b8a22c40e0 | ||
|
|
3918de9ad1 | ||
|
|
96fe35e7d4 | ||
|
|
e87afb1518 | ||
|
|
7b467c6b81 | ||
|
|
eb8ebafe87 | ||
|
|
e559febaf1 | ||
|
|
6bcc6d38c7 | ||
|
|
8173960305 | ||
|
|
f2e590942e | ||
|
|
6a4b87eb9d | ||
|
|
edcba19c23 | ||
|
|
b140ae9137 | ||
|
|
8ee0591f28 | ||
|
|
97d0c596a1 | ||
|
|
7454cba4fa | ||
|
|
5713411893 | ||
|
|
a0cf79e841 | ||
|
|
825e1a7c56 | ||
|
|
9f2b453338 | ||
|
|
a0dce9be76 | ||
|
|
cf2b938529 | ||
|
|
62f685a9cd | ||
|
|
2c7d978c2d | ||
|
|
8cd897a42c | ||
|
|
1dc44d3130 | ||
|
|
2a6e3ef37e | ||
|
|
115d528c23 | ||
|
|
a310428527 | ||
|
|
7e0fd45ce3 | ||
|
|
b138ea54ee | ||
|
|
d7125d8d85 | ||
|
|
9c115a4acc | ||
|
|
43716567f5 | ||
|
|
0a8f00af34 | ||
|
|
b1d7429186 | ||
|
|
060a38a2c0 | ||
|
|
58402976b4 | ||
|
|
cd7b854bbb | ||
|
|
aecc0756e8 | ||
|
|
e6ccc6ed70 | ||
|
|
e959a01fac | ||
|
|
17674bfdf7 | ||
|
|
d807d4c21f | ||
|
|
b4690d2eab | ||
|
|
886657a641 | ||
|
|
db896db5a7 | ||
|
|
2357ae17e7 | ||
|
|
9f1c5491d2 | ||
|
|
70b52222f5 | ||
|
|
88cb59727c | ||
|
|
781bfdc314 | ||
|
|
b66723b23e | ||
|
|
cf96d71c22 | ||
|
|
1a111921da | ||
|
|
5d9bb428bb | ||
|
|
9833757b5d | ||
|
|
4195343c0d | ||
|
|
042bee4e5c | ||
|
|
4afba1f3d9 | ||
|
|
5999d45a5d | ||
|
|
f69e5d6a19 | ||
|
|
3517637702 | ||
|
|
e2809bfb42 | ||
|
|
68b33cc5c7 | ||
|
|
4c02cf8ecc | ||
|
|
271daaf768 | ||
|
|
efbb7ee432 | ||
|
|
6471ec71aa | ||
|
|
cb45708061 | ||
|
|
02597f2885 | ||
|
|
8c6a514edf | ||
|
|
7f3fdab793 | ||
|
|
5372f5f989 | ||
|
|
6d24c09a69 | ||
|
|
a8d72c79db | ||
|
|
1f713e0106 | ||
|
|
03f84c8260 | ||
|
|
6d5eb464c9 | ||
|
|
67f8de9ab8 | ||
|
|
2d95ceedc5 | ||
|
|
6526d765fc | ||
|
|
3d520f7c2d | ||
|
|
9c37519b55 | ||
|
|
7e9cfcd0dc | ||
|
|
a99ce1f5b1 | ||
|
|
42660b3cf1 | ||
|
|
f30258c439 | ||
|
|
93ff4c69f7 | ||
|
|
79571bb1ca | ||
|
|
f72c1a58cb | ||
|
|
2461396f69 | ||
|
|
81a071df2f | ||
|
|
6841abe842 | ||
|
|
cb70355d87 | ||
|
|
b17442bb04 | ||
|
|
4874e235fb | ||
|
|
06afa6eb94 | ||
|
|
58e4205d6c | ||
|
|
733394d6dd | ||
|
|
2de9558dea | ||
|
|
6bd173fced | ||
|
|
6b00cd746a | ||
|
|
9309ea6617 | ||
|
|
05c9e3aea5 | ||
|
|
88bac3e664 | ||
|
|
5473b6bc2f | ||
|
|
38e408076e | ||
|
|
dc100d87b5 | ||
|
|
6f6b31dadc | ||
|
|
b08b158b44 | ||
|
|
177f27d71e | ||
|
|
928bd9a149 | ||
|
|
e53113b8ac | ||
|
|
1fe83b4afe | ||
|
|
e8f31f80d1 | ||
|
|
56f5ab43c2 | ||
|
|
370385571c | ||
|
|
e34a303ce1 | ||
|
|
36f120cd20 | ||
|
|
0ae7c43fa5 | ||
|
|
c0d2943952 | ||
|
|
7d453a3b49 | ||
|
|
cd447875e6 | ||
|
|
692a94293c | ||
|
|
efebb10829 | ||
|
|
3c3f025923 | ||
|
|
5ff6e2dfbb | ||
|
|
61ac68f9f6 | ||
|
|
7f1022a8b1 | ||
|
|
edf6b025b1 | ||
|
|
d799df36b3 | ||
|
|
9e96812934 | ||
|
|
91e97cbe4c | ||
|
|
63ee3b32fe | ||
|
|
4ff1a2da10 | ||
|
|
4c3c975066 | ||
|
|
ec5d74f868 | ||
|
|
be0853358c | ||
|
|
fea15b553d | ||
|
|
88ef78745e | ||
|
|
be79342515 | ||
|
|
064a6176ac | ||
|
|
84e7485bfb | ||
|
|
f56f72f219 | ||
|
|
2bfb23f102 | ||
|
|
cf199fec52 | ||
|
|
165c20c2c4 | ||
|
|
625c6ba4c7 | ||
|
|
a32bede701 | ||
|
|
8ff5c8874f | ||
|
|
c5d38fc262 | ||
|
|
6b71970520 | ||
|
|
0209e111f6 | ||
|
|
dc01af7723 | ||
|
|
5435d0412f | ||
|
|
922ac25f64 | ||
|
|
aed53d6c5a | ||
|
|
61cdb9f36a | ||
|
|
1acd042c85 | ||
|
|
572712d82a | ||
|
|
d1697a7556 | ||
|
|
c8c6e9ecd9 | ||
|
|
90f3e4cf05 | ||
|
|
7bd8bf58bb | ||
|
|
1190d3f442 | ||
|
|
0e4f5cfbab | ||
|
|
f1c8db9f8c | ||
|
|
2c9abbd554 | ||
|
|
2305ae5d8c | ||
|
|
dec54bd0ba | ||
|
|
aade369737 | ||
|
|
2a5e042c70 | ||
|
|
1dc4c8c727 | ||
|
|
7ca035db88 | ||
|
|
a460c42f94 | ||
|
|
d16743e728 | ||
|
|
4a29fa8caf | ||
|
|
250bb54dba | ||
|
|
847d05d0b4 | ||
|
|
8315aa03fc | ||
|
|
b7a4c480d6 | ||
|
|
9a35faaa29 | ||
|
|
fbe2e28911 | ||
|
|
84968e25f3 | ||
|
|
10fd0b7b55 | ||
|
|
4a46dc6e5c | ||
|
|
0ec55604c0 | ||
|
|
500007c9ed | ||
|
|
f75abba013 | ||
|
|
dea113b428 | ||
|
|
6abc406a69 | ||
|
|
dcbe723bc5 | ||
|
|
33c98a28ac | ||
|
|
b2ddddfb20 | ||
|
|
c24367ebb9 | ||
|
|
7397b35379 | ||
|
|
baee44c3de | ||
|
|
1f2e4ecc30 | ||
|
|
955e28006d | ||
|
|
bf0736eb1f | ||
|
|
3a5b97b7f1 | ||
|
|
45bf825066 | ||
|
|
4a18d5c89b | ||
|
|
174b26c497 | ||
|
|
5cacc82f61 | ||
|
|
29a90816ff | ||
|
|
4bea454021 | ||
|
|
8bfd0ae4c4 | ||
|
|
378943ce67 | ||
|
|
c65d409afd | ||
|
|
ed1bbe2cad | ||
|
|
b0b3d09063 | ||
|
|
0ede2af7a0 | ||
|
|
e8d23f7811 | ||
|
|
907cd7217e | ||
|
|
7c402e5af3 | ||
|
|
b8d78a5520 | ||
|
|
dfa5862960 | ||
|
|
4276908f51 | ||
|
|
be23b71e87 | ||
|
|
f851acbfff | ||
|
|
78ef9b0205 | ||
|
|
ed9b0e5cba | ||
|
|
752c1a0ce9 | ||
|
|
cc30415d0c | ||
|
|
03e16611a3 | ||
|
|
8e2f3c1c83 | ||
|
|
b6d63b2516 | ||
|
|
e6b88d02bd | ||
|
|
125060ca63 | ||
|
|
b4baca9261 | ||
|
|
6342b6e332 | ||
|
|
a6dc77822b | ||
|
|
59bc67052b | ||
|
|
c090562828 | ||
|
|
69e2ec63c5 | ||
|
|
f610a516a0 | ||
|
|
2e51a4caa3 | ||
|
|
c6fa97a6d6 | ||
|
|
24d7159abd | ||
|
|
7978dc989d | ||
|
|
d99e6b5014 | ||
|
|
2cf40fc2b8 | ||
|
|
260d08b814 | ||
|
|
53dd05d8f6 | ||
|
|
fbe7055370 | ||
|
|
a5b386205f | ||
|
|
916bcab28e | ||
|
|
c7373c3dee | ||
|
|
9f2c8eb2a1 | ||
|
|
65300dcfb0 | ||
|
|
9ddc574f9a | ||
|
|
2dd9e67874 | ||
|
|
f93b03a5e6 | ||
|
|
55a47cd30f | ||
|
|
5792219d1d | ||
|
|
293c58c1e7 | ||
|
|
9f375a752e | ||
|
|
04dc5a9ca6 | ||
|
|
ae6cb5483e | ||
|
|
a168ec1d27 | ||
|
|
2a35144327 | ||
|
|
7207eca1ee | ||
|
|
9c34782478 | ||
|
|
20e6d22709 | ||
|
|
24dd0c61ef | ||
|
|
565c15363c | ||
|
|
ed67f7b7a7 | ||
|
|
6ea8d138d3 | ||
|
|
4159ac43aa | ||
|
|
419b09b053 | ||
|
|
88530f6b76 | ||
|
|
a8cb8177f6 | ||
|
|
277f8a34f4 | ||
|
|
4dde470865 | ||
|
|
ab08405984 | ||
|
|
b81fde02aa | ||
|
|
57dd2ea808 | ||
|
|
7043fa702f | ||
|
|
f98d2e5cc1 | ||
|
|
1a5538251f | ||
|
|
f4ddbb5ad1 | ||
|
|
74bf705ea8 | ||
|
|
676cd3a283 | ||
|
|
c6ead3cdd3 | ||
|
|
2d53648ce7 | ||
|
|
64ca6ac26b | ||
|
|
4fe4c00eca | ||
|
|
376838a606 | ||
|
|
d768a816aa | ||
|
|
766e0cb7d1 | ||
|
|
6a6b0c8b51 | ||
|
|
e24b01cc6f | ||
|
|
7f9ef5621a | ||
|
|
d7fc9ffc51 | ||
|
|
39348038df | ||
|
|
9472baae0d | ||
|
|
ae17b9ecd5 | ||
|
|
74096890ba | ||
|
|
889c2282a5 | ||
|
|
dca30c44f5 | ||
|
|
f2c358c6ce | ||
|
|
2ab42de1ec | ||
|
|
ac2024ccbf | ||
|
|
93164a7d64 | ||
|
|
ecff2e5ce1 | ||
|
|
c9d630dab6 | ||
|
|
d135906dbc | ||
|
|
9f427a52cb | ||
|
|
5a39d3a838 | ||
|
|
013f3d999f | ||
|
|
64d30d7adc | ||
|
|
7062cb56a9 | ||
|
|
9d57828d66 | ||
|
|
9ed8dee71b | ||
|
|
4692b3345d | ||
|
|
e59fb00735 | ||
|
|
9275853084 | ||
|
|
0c81aa29f9 | ||
|
|
01d2e27a2b | ||
|
|
dd7aadf7b2 | ||
|
|
b2fdf501c5 | ||
|
|
345e515735 | ||
|
|
945982b0b2 | ||
|
|
18ad9cbd10 | ||
|
|
f433a75569 | ||
|
|
b05389c825 | ||
|
|
68875fdf32 | ||
|
|
3393e0c02c | ||
|
|
a149b2466e | ||
|
|
13e230d505 | ||
|
|
80b3d7a3c9 | ||
|
|
4bd48de60c | ||
|
|
2eab92f8e3 | ||
|
|
2bbd82cf24 | ||
|
|
1bfd3d7f58 | ||
|
|
cd77b3e88b | ||
|
|
8c93c4dd42 | ||
|
|
45d63a5408 | ||
|
|
decef971f4 | ||
|
|
a288aaefc4 | ||
|
|
eed56c77b4 | ||
|
|
346601bc32 | ||
|
|
5080fbbef0 | ||
|
|
b5b724348d | ||
|
|
c3ee90d8ca | ||
|
|
e1435034ae | ||
|
|
bf35c5dc7f | ||
|
|
c42d223ac2 | ||
|
|
d5654d2b20 | ||
|
|
a7508fec1a | ||
|
|
c31945e682 | ||
|
|
d3203b931e | ||
|
|
947f4e90c3 | ||
|
|
d184c7b271 | ||
|
|
913488c066 | ||
|
|
7fa27d9ac6 | ||
|
|
c341b9cce5 | ||
|
|
bbbf0d45ba | ||
|
|
114c402d9e | ||
|
|
d51519eba4 | ||
|
|
e650f9988b | ||
|
|
8ed8454115 | ||
|
|
6e101bebb1 | ||
|
|
4577b38d22 | ||
|
|
a8515e2d28 | ||
|
|
964e91052e | ||
|
|
4e55e69bff | ||
|
|
e501dbb658 | ||
|
|
20e505e4b7 | ||
|
|
291a26e6e3 | ||
|
|
0383911887 | ||
|
|
a5c5eb77b5 | ||
|
|
90d02be7c5 | ||
|
|
04221983ac | ||
|
|
dfda027ae8 | ||
|
|
21b5a79121 | ||
|
|
411a388c62 | ||
|
|
61c10d42f6 | ||
|
|
68ecfb69a5 | ||
|
|
e62fee8eb3 | ||
|
|
5566d49103 | ||
|
|
48337a4a35 | ||
|
|
2c5c4fca14 | ||
|
|
4fab95ed20 | ||
|
|
6c36ca4628 | ||
|
|
9c61c57896 | ||
|
|
a618011ca1 | ||
|
|
95eef4df79 | ||
|
|
ec1e714ac1 | ||
|
|
736d658080 | ||
|
|
aa2920584e | ||
|
|
9d13bfc258 | ||
|
|
e43633011c | ||
|
|
97027f7fb3 | ||
|
|
bf5adc9be4 | ||
|
|
7665b436f0 | ||
|
|
ffca7b85c2 | ||
|
|
eef2fa00d9 | ||
|
|
c55551ad7c | ||
|
|
c91b521111 | ||
|
|
deb35e3e2c | ||
|
|
5e2d3c9ec1 | ||
|
|
dda454434b | ||
|
|
b97d371ce0 | ||
|
|
a25c98ac73 | ||
|
|
fd47013111 | ||
|
|
b3aa469c21 | ||
|
|
981c0de27a | ||
|
|
1bfe9acbbf | ||
|
|
2d1e9ce753 | ||
|
|
19043426b9 | ||
|
|
6e21ce592e | ||
|
|
975c6efbe4 | ||
|
|
972491aece | ||
|
|
1a8ecda3ee | ||
|
|
d36c7b618d | ||
|
|
251431ff4f | ||
|
|
1a3052793e | ||
|
|
84fbc56fd0 | ||
|
|
4444ff7632 | ||
|
|
7770da4b41 | ||
|
|
7202a4d42b | ||
|
|
3fa29765fd | ||
|
|
b9e468c163 | ||
|
|
0172ad2902 | ||
|
|
d9aa352ff0 | ||
|
|
945ba0300d | ||
|
|
9e15cc606e | ||
|
|
e011160f3c | ||
|
|
9447da5065 | ||
|
|
387ed39f6d | ||
|
|
e50e5f9336 | ||
|
|
6f0d9950f3 | ||
|
|
4705ff7d6d | ||
|
|
36778eb231 | ||
|
|
c6dd154b3e | ||
|
|
74b5feea7b | ||
|
|
35cae95032 | ||
|
|
11a36aa96f | ||
|
|
9b0e97ae10 | ||
|
|
02ba02604c | ||
|
|
42ecf418f5 | ||
|
|
48ce525d16 | ||
|
|
3081e2ca73 | ||
|
|
48ae85b6ff | ||
|
|
82281ce47d | ||
|
|
4ecd2bafbb | ||
|
|
308b9ad8f0 | ||
|
|
73b408c242 | ||
|
|
51c9eb321a | ||
|
|
1657fca2f4 | ||
|
|
0d25aad90d | ||
|
|
b8c1cb1c2c | ||
|
|
6e1d44fd56 | ||
|
|
528ff4b451 | ||
|
|
f6c29ba3dc | ||
|
|
160f9b5bf6 | ||
|
|
53e7985c8d | ||
|
|
9102342795 | ||
|
|
c4488936b2 | ||
|
|
4e2b990734 | ||
|
|
6ca1418587 | ||
|
|
30dd06812e | ||
|
|
b29b89ef21 | ||
|
|
81ae27d56a | ||
|
|
f90bf72280 | ||
|
|
abcf7aa591 | ||
|
|
40b6d49387 | ||
|
|
497b4f92d2 | ||
|
|
28566b4966 | ||
|
|
b4b15f68c0 | ||
|
|
1eb1cf452b | ||
|
|
c549810def | ||
|
|
0d0ed9187a | ||
|
|
2840dcd2a6 | ||
|
|
a9c5de8654 | ||
|
|
837685c522 |
32
.gitignore
vendored
32
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
# Object files
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# editor artefacts
|
||||
*.swp
|
||||
@@ -47,6 +48,21 @@
|
||||
*.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
|
||||
@@ -75,3 +91,19 @@
|
||||
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
|
||||
|
||||
651
CHANGES
651
CHANGES
@@ -2,7 +2,213 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 1.0.0m and 1.0.0n [6 Aug 2014]
|
||||
Changes between 1.0.1k and 1.0.1l [15 Jan 2015]
|
||||
|
||||
*) Build fixes for the Windows and OpenVMS platforms
|
||||
[Matt Caswell and Richard Levitte]
|
||||
|
||||
Changes between 1.0.1j and 1.0.1k [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]
|
||||
|
||||
*) Ensure that the session ID context of an SSL is updated when its
|
||||
SSL_CTX is updated via SSL_set_SSL_CTX.
|
||||
|
||||
The session ID context is typically set from the parent SSL_CTX,
|
||||
and can vary with the CTX.
|
||||
[Adam Langley]
|
||||
|
||||
*) 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]
|
||||
|
||||
*) 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]
|
||||
|
||||
*) Do not resume sessions on the server if the negotiated protocol
|
||||
version does not match the session's version. Resuming with a different
|
||||
version, while not strictly forbidden by the RFC, is of questionable
|
||||
sanity and breaks all known clients.
|
||||
[David Benjamin, Emilia K<>sper]
|
||||
|
||||
*) Tighten handling of the ChangeCipherSpec (CCS) message: reject
|
||||
early CCS messages during renegotiation. (Note that because
|
||||
renegotiation is encrypted, this early CCS was not exploitable.)
|
||||
[Emilia K<>sper]
|
||||
|
||||
*) Tighten client-side session ticket handling during renegotiation:
|
||||
ensure that the client only accepts a session ticket if the server sends
|
||||
the extension anew in the ServerHello. Previously, a TLS client would
|
||||
reuse the old extension state and thus accept a session ticket if one was
|
||||
announced in the initial ServerHello.
|
||||
|
||||
Similarly, ensure that the client requires a session ticket if one
|
||||
was advertised in the ServerHello. Previously, a TLS client would
|
||||
ignore a missing NewSessionTicket message.
|
||||
[Emilia K<>sper]
|
||||
|
||||
Changes between 1.0.1i and 1.0.1j [15 Oct 2014]
|
||||
|
||||
*) SRTP Memory Leak.
|
||||
|
||||
A flaw in the DTLS SRTP extension parsing code allows an attacker, who
|
||||
sends a carefully crafted handshake message, to cause OpenSSL to fail
|
||||
to free up to 64k of memory causing a memory leak. This could be
|
||||
exploited in a Denial Of Service attack. This issue affects OpenSSL
|
||||
1.0.1 server implementations for both SSL/TLS and DTLS regardless of
|
||||
whether SRTP is used or configured. Implementations of OpenSSL that
|
||||
have been compiled with OPENSSL_NO_SRTP defined are not affected.
|
||||
|
||||
The fix was developed by the OpenSSL team.
|
||||
(CVE-2014-3513)
|
||||
[OpenSSL team]
|
||||
|
||||
*) 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.1h and 1.0.1i [6 Aug 2014]
|
||||
|
||||
*) Fix SRP buffer overrun vulnerability. Invalid parameters passed to the
|
||||
SRP code can be overrun an internal buffer. Add sanity check that
|
||||
g, A, B < N to SRP code.
|
||||
|
||||
Thanks to Sean Devlin and Watson Ladd of Cryptography Services, NCC
|
||||
Group for discovering this issue.
|
||||
(CVE-2014-3512)
|
||||
[Steve Henson]
|
||||
|
||||
*) A flaw in the OpenSSL SSL/TLS server code causes the server to negotiate
|
||||
TLS 1.0 instead of higher protocol versions when the ClientHello message
|
||||
is badly fragmented. This allows a man-in-the-middle attacker to force a
|
||||
downgrade to TLS 1.0 even if both the server and the client support a
|
||||
higher protocol version, by modifying the client's TLS records.
|
||||
|
||||
Thanks to David Benjamin and Adam Langley (Google) for discovering and
|
||||
researching this issue.
|
||||
(CVE-2014-3511)
|
||||
[David Benjamin]
|
||||
|
||||
*) OpenSSL DTLS clients enabling anonymous (EC)DH ciphersuites are subject
|
||||
to a denial of service attack. A malicious server can crash the client
|
||||
@@ -44,6 +250,16 @@
|
||||
(CVE-2014-3509)
|
||||
[Gabor Tyukasz]
|
||||
|
||||
*) A malicious server can crash an OpenSSL client with a null pointer
|
||||
dereference (read) by specifying an SRP ciphersuite even though it was not
|
||||
properly negotiated with the client. This can be exploited through a
|
||||
Denial of Service attack.
|
||||
|
||||
Thanks to Joonas Kuorilehto and Riku Hietam<61>ki (Codenomicon) for
|
||||
discovering and researching this issue.
|
||||
(CVE-2014-5139)
|
||||
[Steve Henson]
|
||||
|
||||
*) 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
|
||||
@@ -58,7 +274,7 @@
|
||||
bogus results, with non-infinity inputs mapped to infinity too.)
|
||||
[Bodo Moeller]
|
||||
|
||||
Changes between 1.0.0l and 1.0.0m [5 Jun 2014]
|
||||
Changes between 1.0.1g and 1.0.1h [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
|
||||
@@ -102,6 +318,17 @@
|
||||
*) Fix some double frees. These are not thought to be exploitable.
|
||||
[mancha <mancha1@zoho.com>]
|
||||
|
||||
Changes between 1.0.1f and 1.0.1g [7 Apr 2014]
|
||||
|
||||
*) A missing bounds check in the handling of the TLS heartbeat extension
|
||||
can be used to reveal up to 64k of memory to a connected client or
|
||||
server.
|
||||
|
||||
Thanks for Neel Mehta of Google Security for discovering this bug and to
|
||||
Adam Langley <agl@chromium.org> and Bodo Moeller <bmoeller@acm.org> for
|
||||
preparing the fix (CVE-2014-0160)
|
||||
[Adam Langley, Bodo Moeller]
|
||||
|
||||
*) 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:
|
||||
@@ -111,7 +338,21 @@
|
||||
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]
|
||||
*) TLS pad extension: draft-agl-tls-padding-03
|
||||
|
||||
Workaround for the "TLS hang bug" (see FAQ and PR#2771): if the
|
||||
TLS client Hello record length value would otherwise be > 255 and
|
||||
less that 512 pad with a dummy extension containing zeroes so it
|
||||
is at least 512 bytes long.
|
||||
|
||||
[Adam Langley, Steve Henson]
|
||||
|
||||
Changes between 1.0.1e and 1.0.1f [6 Jan 2014]
|
||||
|
||||
*) Fix for TLS record tampering bug. A carefully crafted invalid
|
||||
handshake could crash OpenSSL with a NULL pointer exception.
|
||||
Thanks to Anton Johansson for reporting this issues.
|
||||
(CVE-2013-4353)
|
||||
|
||||
*) Keep original DTLS digest and encryption contexts in retransmission
|
||||
structures so we can use the previous session parameters if they need
|
||||
@@ -126,6 +367,410 @@
|
||||
10.8..10.8.3 and forcing users to upgrade to 10.8.4 or newer.
|
||||
[Rob Stradling, Adam Langley]
|
||||
|
||||
Changes between 1.0.1d and 1.0.1e [11 Feb 2013]
|
||||
|
||||
*) Correct fix for CVE-2013-0169. The original didn't work on AES-NI
|
||||
supporting platforms or when small records were transferred.
|
||||
[Andy Polyakov, Steve Henson]
|
||||
|
||||
Changes between 1.0.1c and 1.0.1d [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]
|
||||
|
||||
*) Fix flaw in AESNI handling of TLS 1.2 and 1.1 records for CBC mode
|
||||
ciphersuites which can be exploited in a denial of service attack.
|
||||
Thanks go to and to Adam Langley <agl@chromium.org> for discovering
|
||||
and detecting this bug and to Wolfgang Ettlinger
|
||||
<wolfgang.ettlinger@gmail.com> for independently discovering this issue.
|
||||
(CVE-2012-2686)
|
||||
[Adam Langley]
|
||||
|
||||
*) Return an error when checking OCSP signatures when key is NULL.
|
||||
This fixes a DoS attack. (CVE-2013-0166)
|
||||
[Steve Henson]
|
||||
|
||||
*) Make openssl verify return errors.
|
||||
[Chris Palmer <palmer@google.com> and Ben Laurie]
|
||||
|
||||
*) 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.
|
||||
[Rob Stradling <rob.stradling@comodo.com>]
|
||||
|
||||
*) Fix possible deadlock when decoding public keys.
|
||||
[Steve Henson]
|
||||
|
||||
*) Don't use TLS 1.0 record version number in initial client hello
|
||||
if renegotiating.
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 1.0.1b and 1.0.1c [10 May 2012]
|
||||
|
||||
*) Sanity check record length before skipping explicit IV in TLS
|
||||
1.2, 1.1 and 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]
|
||||
|
||||
*) In FIPS mode don't try to use composite ciphers as they are not
|
||||
approved.
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 1.0.1a and 1.0.1b [26 Apr 2012]
|
||||
|
||||
*) OpenSSL 1.0.0 sets SSL_OP_ALL to 0x80000FFFL and OpenSSL 1.0.1 and
|
||||
1.0.1a set SSL_OP_NO_TLSv1_1 to 0x00000400L which would unfortunately
|
||||
mean any application compiled against OpenSSL 1.0.0 headers setting
|
||||
SSL_OP_ALL would also set SSL_OP_NO_TLSv1_1, unintentionally disablng
|
||||
TLS 1.1 also. Fix this by changing the value of SSL_OP_NO_TLSv1_1 to
|
||||
0x10000000L Any application which was previously compiled against
|
||||
OpenSSL 1.0.1 or 1.0.1a headers and which cares about SSL_OP_NO_TLSv1_1
|
||||
will need to be recompiled as a result. Letting be results in
|
||||
inability to disable specifically TLS 1.1 and in client context,
|
||||
in unlike event, limit maximum offered version to TLS 1.0 [see below].
|
||||
[Steve Henson]
|
||||
|
||||
*) In order to ensure interoperabilty SSL_OP_NO_protocolX does not
|
||||
disable just protocol X, but all protocols above X *if* there are
|
||||
protocols *below* X still enabled. In more practical terms it means
|
||||
that if application wants to disable TLS1.0 in favor of TLS1.1 and
|
||||
above, it's not sufficient to pass SSL_OP_NO_TLSv1, one has to pass
|
||||
SSL_OP_NO_TLSv1|SSL_OP_NO_SSLv3|SSL_OP_NO_SSLv2. This applies to
|
||||
client side.
|
||||
[Andy Polyakov]
|
||||
|
||||
Changes between 1.0.1 and 1.0.1a [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]
|
||||
|
||||
*) Don't allow TLS 1.2 SHA-256 ciphersuites in TLS 1.0, 1.1 connections.
|
||||
[Adam Langley]
|
||||
|
||||
*) Workarounds for some broken servers that "hang" if a client hello
|
||||
record length exceeds 255 bytes.
|
||||
|
||||
1. Do not use record version number > TLS 1.0 in initial client
|
||||
hello: some (but not all) hanging servers will now work.
|
||||
2. If we set OPENSSL_MAX_TLS1_2_CIPHER_LENGTH this will truncate
|
||||
the number of ciphers sent in the client hello. This should be
|
||||
set to an even number, such as 50, for example by passing:
|
||||
-DOPENSSL_MAX_TLS1_2_CIPHER_LENGTH=50 to config or Configure.
|
||||
Most broken servers should now work.
|
||||
3. If all else fails setting OPENSSL_NO_TLS1_2_CLIENT will disable
|
||||
TLS 1.2 client support entirely.
|
||||
[Steve Henson]
|
||||
|
||||
*) Fix SEGV in Vector Permutation AES module observed in OpenSSH.
|
||||
[Andy Polyakov]
|
||||
|
||||
Changes between 1.0.0h and 1.0.1 [14 Mar 2012]
|
||||
|
||||
*) Add compatibility with old MDC2 signatures which use an ASN1 OCTET
|
||||
STRING form instead of a DigestInfo.
|
||||
[Steve Henson]
|
||||
|
||||
*) The format used for MDC2 RSA signatures is inconsistent between EVP
|
||||
and the RSA_sign/RSA_verify functions. This was made more apparent when
|
||||
OpenSSL used RSA_sign/RSA_verify for some RSA signatures in particular
|
||||
those which went through EVP_PKEY_METHOD in 1.0.0 and later. Detect
|
||||
the correct format in RSA_verify so both forms transparently work.
|
||||
[Steve Henson]
|
||||
|
||||
*) Some servers which support TLS 1.0 can choke if we initially indicate
|
||||
support for TLS 1.2 and later renegotiate using TLS 1.0 in the RSA
|
||||
encrypted premaster secret. As a workaround use the maximum pemitted
|
||||
client version in client hello, this should keep such servers happy
|
||||
and still work with previous versions of OpenSSL.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add support for TLS/DTLS heartbeats.
|
||||
[Robin Seggelmann <seggelmann@fh-muenster.de>]
|
||||
|
||||
*) Add support for SCTP.
|
||||
[Robin Seggelmann <seggelmann@fh-muenster.de>]
|
||||
|
||||
*) Improved PRNG seeding for VOS.
|
||||
[Paul Green <Paul.Green@stratus.com>]
|
||||
|
||||
*) Extensive assembler packs updates, most notably:
|
||||
|
||||
- x86[_64]: AES-NI, PCLMULQDQ, RDRAND support;
|
||||
- x86[_64]: SSSE3 support (SHA1, vector-permutation AES);
|
||||
- x86_64: bit-sliced AES implementation;
|
||||
- ARM: NEON support, contemporary platforms optimizations;
|
||||
- s390x: z196 support;
|
||||
- *: GHASH and GF(2^m) multiplication implementations;
|
||||
|
||||
[Andy Polyakov]
|
||||
|
||||
*) Make TLS-SRP code conformant with RFC 5054 API cleanup
|
||||
(removal of unnecessary code)
|
||||
[Peter Sylvester <peter.sylvester@edelweb.fr>]
|
||||
|
||||
*) Add TLS key material exporter from RFC 5705.
|
||||
[Eric Rescorla]
|
||||
|
||||
*) Add DTLS-SRTP negotiation from RFC 5764.
|
||||
[Eric Rescorla]
|
||||
|
||||
*) Add Next Protocol Negotiation,
|
||||
http://tools.ietf.org/html/draft-agl-tls-nextprotoneg-00. Can be
|
||||
disabled with a no-npn flag to config or Configure. Code donated
|
||||
by Google.
|
||||
[Adam Langley <agl@google.com> and Ben Laurie]
|
||||
|
||||
*) Add optional 64-bit optimized implementations of elliptic curves NIST-P224,
|
||||
NIST-P256, NIST-P521, with constant-time single point multiplication on
|
||||
typical inputs. Compiler support for the nonstandard type __uint128_t is
|
||||
required to use this (present in gcc 4.4 and later, for 64-bit builds).
|
||||
Code made available under Apache License version 2.0.
|
||||
|
||||
Specify "enable-ec_nistp_64_gcc_128" on the Configure (or config) command
|
||||
line to include this in your build of OpenSSL, and run "make depend" (or
|
||||
"make update"). This enables the following EC_METHODs:
|
||||
|
||||
EC_GFp_nistp224_method()
|
||||
EC_GFp_nistp256_method()
|
||||
EC_GFp_nistp521_method()
|
||||
|
||||
EC_GROUP_new_by_curve_name() will automatically use these (while
|
||||
EC_GROUP_new_curve_GFp() currently prefers the more flexible
|
||||
implementations).
|
||||
[Emilia K<>sper, Adam Langley, Bodo Moeller (Google)]
|
||||
|
||||
*) Use type ossl_ssize_t instad of ssize_t which isn't available on
|
||||
all platforms. Move ssize_t definition from e_os.h to the public
|
||||
header file e_os2.h as it now appears in public header file cms.h
|
||||
[Steve Henson]
|
||||
|
||||
*) New -sigopt option to the ca, req and x509 utilities. Additional
|
||||
signature parameters can be passed using this option and in
|
||||
particular PSS.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add RSA PSS signing function. This will generate and set the
|
||||
appropriate AlgorithmIdentifiers for PSS based on those in the
|
||||
corresponding EVP_MD_CTX structure. No application support yet.
|
||||
[Steve Henson]
|
||||
|
||||
*) Support for companion algorithm specific ASN1 signing routines.
|
||||
New function ASN1_item_sign_ctx() signs a pre-initialised
|
||||
EVP_MD_CTX structure and sets AlgorithmIdentifiers based on
|
||||
the appropriate parameters.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add new algorithm specific ASN1 verification initialisation function
|
||||
to EVP_PKEY_ASN1_METHOD: this is not in EVP_PKEY_METHOD since the ASN1
|
||||
handling will be the same no matter what EVP_PKEY_METHOD is used.
|
||||
Add a PSS handler to support verification of PSS signatures: checked
|
||||
against a number of sample certificates.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add signature printing for PSS. Add PSS OIDs.
|
||||
[Steve Henson, Martin Kaiser <lists@kaiser.cx>]
|
||||
|
||||
*) Add algorithm specific signature printing. An individual ASN1 method
|
||||
can now print out signatures instead of the standard hex dump.
|
||||
|
||||
More complex signatures (e.g. PSS) can print out more meaningful
|
||||
information. Include DSA version that prints out the signature
|
||||
parameters r, s.
|
||||
[Steve Henson]
|
||||
|
||||
*) Password based recipient info support for CMS library: implementing
|
||||
RFC3211.
|
||||
[Steve Henson]
|
||||
|
||||
*) Split password based encryption into PBES2 and PBKDF2 functions. This
|
||||
neatly separates the code into cipher and PBE sections and is required
|
||||
for some algorithms that split PBES2 into separate pieces (such as
|
||||
password based CMS).
|
||||
[Steve Henson]
|
||||
|
||||
*) Session-handling fixes:
|
||||
- Fix handling of connections that are resuming with a session ID,
|
||||
but also support Session Tickets.
|
||||
- Fix a bug that suppressed issuing of a new ticket if the client
|
||||
presented a ticket with an expired session.
|
||||
- Try to set the ticket lifetime hint to something reasonable.
|
||||
- Make tickets shorter by excluding irrelevant information.
|
||||
- On the client side, don't ignore renewed tickets.
|
||||
[Adam Langley, Bodo Moeller (Google)]
|
||||
|
||||
*) Fix PSK session representation.
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Add RC4-MD5 and AESNI-SHA1 "stitched" implementations.
|
||||
|
||||
This work was sponsored by Intel.
|
||||
[Andy Polyakov]
|
||||
|
||||
*) Add GCM support to TLS library. Some custom code is needed to split
|
||||
the IV between the fixed (from PRF) and explicit (from TLS record)
|
||||
portions. This adds all GCM ciphersuites supported by RFC5288 and
|
||||
RFC5289. Generalise some AES* cipherstrings to inlclude GCM and
|
||||
add a special AESGCM string for GCM only.
|
||||
[Steve Henson]
|
||||
|
||||
*) Expand range of ctrls for AES GCM. Permit setting invocation
|
||||
field on decrypt and retrieval of invocation field only on encrypt.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add HMAC ECC ciphersuites from RFC5289. Include SHA384 PRF support.
|
||||
As required by RFC5289 these ciphersuites cannot be used if for
|
||||
versions of TLS earlier than 1.2.
|
||||
[Steve Henson]
|
||||
|
||||
*) For FIPS capable OpenSSL interpret a NULL default public key method
|
||||
as unset and return the appopriate default but do *not* set the default.
|
||||
This means we can return the appopriate method in applications that
|
||||
swicth between FIPS and non-FIPS modes.
|
||||
[Steve Henson]
|
||||
|
||||
*) Redirect HMAC and CMAC operations to FIPS module in FIPS mode. If an
|
||||
ENGINE is used then we cannot handle that in the FIPS module so we
|
||||
keep original code iff non-FIPS operations are allowed.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add -attime option to openssl utilities.
|
||||
[Peter Eckersley <pde@eff.org>, Ben Laurie and Steve Henson]
|
||||
|
||||
*) Redirect DSA and DH operations to FIPS module in FIPS mode.
|
||||
[Steve Henson]
|
||||
|
||||
*) Redirect ECDSA and ECDH operations to FIPS module in FIPS mode. Also use
|
||||
FIPS EC methods unconditionally for now.
|
||||
[Steve Henson]
|
||||
|
||||
*) New build option no-ec2m to disable characteristic 2 code.
|
||||
[Steve Henson]
|
||||
|
||||
*) Backport libcrypto audit of return value checking from 1.1.0-dev; not
|
||||
all cases can be covered as some introduce binary incompatibilities.
|
||||
[Steve Henson]
|
||||
|
||||
*) Redirect RSA operations to FIPS module including keygen,
|
||||
encrypt, decrypt, sign and verify. Block use of non FIPS RSA methods.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add similar low level API blocking to ciphers.
|
||||
[Steve Henson]
|
||||
|
||||
*) Low level digest APIs are not approved in FIPS mode: any attempt
|
||||
to use these will cause a fatal error. Applications that *really* want
|
||||
to use them can use the private_* version instead.
|
||||
[Steve Henson]
|
||||
|
||||
*) Redirect cipher operations to FIPS module for FIPS builds.
|
||||
[Steve Henson]
|
||||
|
||||
*) Redirect digest operations to FIPS module for FIPS builds.
|
||||
[Steve Henson]
|
||||
|
||||
*) Update build system to add "fips" flag which will link in fipscanister.o
|
||||
for static and shared library builds embedding a signature if needed.
|
||||
[Steve Henson]
|
||||
|
||||
*) Output TLS supported curves in preference order instead of numerical
|
||||
order. This is currently hardcoded for the highest order curves first.
|
||||
This should be configurable so applications can judge speed vs strength.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add TLS v1.2 server support for client authentication.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add support for FIPS mode in ssl library: disable SSLv3, non-FIPS ciphers
|
||||
and enable MD5.
|
||||
[Steve Henson]
|
||||
|
||||
*) Functions FIPS_mode_set() and FIPS_mode() which call the underlying
|
||||
FIPS modules versions.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add TLS v1.2 client side support for client authentication. Keep cache
|
||||
of handshake records longer as we don't know the hash algorithm to use
|
||||
until after the certificate request message is received.
|
||||
[Steve Henson]
|
||||
|
||||
*) Initial TLS v1.2 client support. Add a default signature algorithms
|
||||
extension including all the algorithms we support. Parse new signature
|
||||
format in client key exchange. Relax some ECC signing restrictions for
|
||||
TLS v1.2 as indicated in RFC5246.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add server support for TLS v1.2 signature algorithms extension. Switch
|
||||
to new signature format when needed using client digest preference.
|
||||
All server ciphersuites should now work correctly in TLS v1.2. No client
|
||||
support yet and no support for client certificates.
|
||||
[Steve Henson]
|
||||
|
||||
*) Initial TLS v1.2 support. Add new SHA256 digest to ssl code, switch
|
||||
to SHA256 for PRF when using TLS v1.2 and later. Add new SHA256 based
|
||||
ciphersuites. At present only RSA key exchange ciphersuites work with
|
||||
TLS v1.2. Add new option for TLS v1.2 replacing the old and obsolete
|
||||
SSL_OP_PKCS1_CHECK flags with SSL_OP_NO_TLSv1_2. New TLSv1.2 methods
|
||||
and version checking.
|
||||
[Steve Henson]
|
||||
|
||||
*) New option OPENSSL_NO_SSL_INTERN. If an application can be compiled
|
||||
with this defined it will not be affected by any changes to ssl internal
|
||||
structures. Add several utility functions to allow openssl application
|
||||
to work with OPENSSL_NO_SSL_INTERN defined.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add SRP support.
|
||||
[Tom Wu <tjw@cs.stanford.edu> and Ben Laurie]
|
||||
|
||||
*) Add functions to copy EVP_PKEY_METHOD and retrieve flags and id.
|
||||
[Steve Henson]
|
||||
|
||||
*) Permit abbreviated handshakes when renegotiating using the function
|
||||
SSL_renegotiate_abbreviated().
|
||||
[Robin Seggelmann <seggelmann@fh-muenster.de>]
|
||||
|
||||
*) Add call to ENGINE_register_all_complete() to
|
||||
ENGINE_load_builtin_engines(), so some implementations get used
|
||||
automatically instead of needing explicit application support.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add support for TLS key exporter as described in RFC5705.
|
||||
[Robin Seggelmann <seggelmann@fh-muenster.de>, Steve Henson]
|
||||
|
||||
*) Initial TLSv1.1 support. Since TLSv1.1 is very similar to TLS v1.0 only
|
||||
a few changes are required:
|
||||
|
||||
Add SSL_OP_NO_TLSv1_1 flag.
|
||||
Add TLSv1_1 methods.
|
||||
Update version checking logic to handle version 1.1.
|
||||
Add explicit IV handling (ported from DTLS code).
|
||||
Add command line options to s_client/s_server.
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 1.0.0j and 1.0.0k [5 Feb 2013]
|
||||
|
||||
*) Make the decoding of SSLv3, TLS and DTLS CBC records constant time.
|
||||
|
||||
250
Configure
250
Configure
@@ -10,7 +10,7 @@ use strict;
|
||||
|
||||
# see INSTALL for instructions.
|
||||
|
||||
my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
|
||||
my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
|
||||
|
||||
# Options:
|
||||
#
|
||||
@@ -56,6 +56,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimenta
|
||||
# [no-]zlib [don't] compile support for zlib compression.
|
||||
# zlib-dynamic Like "zlib", but the zlib library is expected to be a shared
|
||||
# library and will be loaded in run-time by the OpenSSL library.
|
||||
# sctp include SCTP support
|
||||
# 386 generate 80386 code
|
||||
# no-sse2 disables IA-32 SSE2 code, above option implies no-sse2
|
||||
# no-<cipher> build without specified algorithm (rsa, idea, rc5, ...)
|
||||
@@ -123,21 +124,24 @@ my $tlib="-lnsl -lsocket";
|
||||
my $bits1="THIRTY_TWO_BIT ";
|
||||
my $bits2="SIXTY_FOUR_BIT ";
|
||||
|
||||
my $x86_asm="x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes-586.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o:cmll-x86.o";
|
||||
my $x86_asm="x86cpuid.o:bn-586.o co-586.o x86-mont.o x86-gf2m.o:des-586.o crypt586.o:aes-586.o vpaes-x86.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o:cmll-x86.o:ghash-x86.o:";
|
||||
|
||||
my $x86_elf_asm="$x86_asm:elf";
|
||||
|
||||
my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.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";
|
||||
my $ia64_asm="ia64cpuid.o:bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o:::::void";
|
||||
my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-mont.o:des_enc-sparc.o fcrypt_b.o:aes_core.o aes_cbc.o aes-sparcv9.o:::sha1-sparcv9.o sha256-sparcv9.o sha512-sparcv9.o:::::::void";
|
||||
my $sparcv8_asm=":sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::::void";
|
||||
my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o::::::::::::void";
|
||||
my $mips3_asm=":bn-mips3.o::::::::::::void";
|
||||
my $s390x_asm="s390xcap.o s390xcpuid.o:bn-s390x.o s390x-mont.o::aes-s390x.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o:::::void";
|
||||
my $armv4_asm=":bn_asm.o armv4-mont.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::void";
|
||||
my $ppc32_asm="ppccpuid.o:bn-ppc.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o::::::";
|
||||
my $ppc64_asm="ppccpuid.o:bn-ppc.o ppc-mont.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o sha512-ppc.o::::::";
|
||||
my $no_asm=":::::::::::::void";
|
||||
my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o modexp512-x86_64.o::aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o aesni-sha1-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o rc4-md5-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:ghash-x86_64.o:";
|
||||
my $ia64_asm="ia64cpuid.o:bn-ia64.o ia64-mont.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o:::::ghash-ia64.o::void";
|
||||
my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-mont.o:des_enc-sparc.o fcrypt_b.o:aes_core.o aes_cbc.o aes-sparcv9.o:::sha1-sparcv9.o sha256-sparcv9.o sha512-sparcv9.o:::::::ghash-sparcv9.o::void";
|
||||
my $sparcv8_asm=":sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::::::void";
|
||||
my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o:::::sha1-alpha.o:::::::ghash-alpha.o::void";
|
||||
my $mips32_asm=":bn-mips.o::aes_cbc.o aes-mips.o:::sha1-mips.o sha256-mips.o::::::::";
|
||||
my $mips64_asm=":bn-mips.o mips-mont.o::aes_cbc.o aes-mips.o:::sha1-mips.o sha256-mips.o sha512-mips.o::::::::";
|
||||
my $s390x_asm="s390xcap.o s390xcpuid.o:bn-s390x.o s390x-mont.o s390x-gf2m.o::aes-s390x.o aes-ctr.o aes-xts.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o:::::ghash-s390x.o:";
|
||||
my $armv4_asm="armcap.o armv4cpuid.o:bn_asm.o armv4-mont.o armv4-gf2m.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::ghash-armv4.o::void";
|
||||
my $parisc11_asm="pariscid.o:bn_asm.o parisc-mont.o::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o::32";
|
||||
my $parisc20_asm="pariscid.o:pa-risc2W.o parisc-mont.o::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o::64";
|
||||
my $ppc32_asm="ppccpuid.o ppccap.o:bn-ppc.o ppc-mont.o ppc64-mont.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o::::::::";
|
||||
my $ppc64_asm="ppccpuid.o ppccap.o:bn-ppc.o ppc-mont.o ppc64-mont.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o sha512-ppc.o::::::::";
|
||||
my $no_asm=":::::::::::::::void";
|
||||
|
||||
# As for $BSDthreads. Idea is to maintain "collective" set of flags,
|
||||
# which would cover all BSD flavors. -pthread applies to them all,
|
||||
@@ -148,7 +152,7 @@ my $no_asm=":::::::::::::void";
|
||||
# seems to be sufficient?
|
||||
my $BSDthreads="-pthread -D_THREAD_SAFE -D_REENTRANT";
|
||||
|
||||
#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $cpuid_obj : $bn_obj : $des_obj : $aes_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $wp_obj : $cmll_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags : $multilib
|
||||
#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $cpuid_obj : $bn_obj : $des_obj : $aes_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $wp_obj : $cmll_obj : $modes_obj : $engines_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags : $multilib
|
||||
|
||||
my %table=(
|
||||
# File 'TABLE' (created by 'make TABLE') contains the data from this list,
|
||||
@@ -163,33 +167,36 @@ my %table=(
|
||||
# Our development configs
|
||||
"purify", "purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::",
|
||||
"debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::",
|
||||
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG_UNUSED -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::bn86-elf.o co86-elf.o",
|
||||
"debug-ben", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DDEBUG_SAFESTACK -O2 -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-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-debug-64", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -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-macos", "cc:$gcc_devteam_warn -arch i386 -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::-Wl,-search_paths_first::::",
|
||||
"debug-ben-macos-gcc46", "gcc-mp-4.6:$gcc_devteam_warn -Wconversion -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::::::",
|
||||
"debug-ben-darwin64","cc:$gcc_devteam_warn -Wno-language-extension-token -Wno-extended-offsetof -arch x86_64 -O3 -DL_ENDIAN -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-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-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:$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-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 -Wno-overlength-strings -g::-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-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::-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 -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 -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 -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 -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-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-geoff32","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -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 -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-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes_x86core.o aes_cbc.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes_x86core.o aes_cbc.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o::ghash-x86.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-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-x86_64", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall -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-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall::-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",
|
||||
"dist", "cc:-O::(unknown)::::::",
|
||||
|
||||
# Basic configs that should work on any (32 and less bit) box
|
||||
@@ -215,7 +222,7 @@ my %table=(
|
||||
# actually recommend to consider using gcc shared build even with vendor
|
||||
# compiler:-)
|
||||
# <appro@fy.chalmers.se>
|
||||
"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64",
|
||||
"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64",
|
||||
|
||||
#### Solaris x86 with Sun C setups
|
||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -249,16 +256,16 @@ my %table=(
|
||||
|
||||
#### IRIX 5.x configs
|
||||
# -mips2 flag is added by ./config when appropriate.
|
||||
"irix-gcc","gcc:-O3 -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${no_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR:${no_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-gcc","gcc:-O3 -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${mips32_asm}:o32:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
#### IRIX 6.x configs
|
||||
# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
|
||||
# './Configure irix-cc -o32' manually.
|
||||
"irix-mips3-gcc","gcc:-mabi=n32 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_asm}:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32",
|
||||
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_asm}:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32",
|
||||
"irix-mips3-gcc","gcc:-mabi=n32 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips64_asm}:n32:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32",
|
||||
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips64_asm}:n32:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32",
|
||||
# N64 ABI builds.
|
||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_asm}:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_asm}:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips64_asm}:64:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips64_asm}:64:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
|
||||
#### Unified HP-UX ANSI C configs.
|
||||
# Special notes:
|
||||
@@ -291,17 +298,18 @@ my %table=(
|
||||
# Since there is mention of this in shlib/hpux10-cc.sh
|
||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-gcc","gcc:-march=2.0 -O3 -DB_ENDIAN -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL DES_RISC1::pa-risc2.o::::::::::::void:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o::::::::::::void:dlfcn:hpux-shared:-fpic:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_64",
|
||||
"hpux-parisc1_1-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:${parisc11_asm}:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa1.1",
|
||||
"hpux-parisc2-gcc","gcc:-march=2.0 -O3 -DB_ENDIAN -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL DES_RISC1:".eval{my $asm=$parisc20_asm;$asm=~s/2W\./2\./;$asm=~s/:64/:32/;$asm}.":dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_32",
|
||||
"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o::::::::::::::void:dlfcn:hpux-shared:-fpic:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_64",
|
||||
|
||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
||||
#
|
||||
# Chris Ruemmler <ruemmler@cup.hp.com>
|
||||
# Kevin Steves <ks@hp.se>
|
||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc1_0-cc","cc:+DAportable +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${no_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2.o::::::::::::void:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o::::::::::::void:dlfcn:hpux-shared:+Z:+DD64 -b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_64",
|
||||
"hpux-parisc1_1-cc","cc:+DA1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${parisc11_asm}:dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa1.1",
|
||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:".eval{my $asm=$parisc20_asm;$asm=~s/2W\./2\./;$asm=~s/:64/:32/;$asm}.":dl:hpux-shared:+Z:-b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_32",
|
||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:${parisc20_asm}:dlfcn:hpux-shared:+Z:+DD64 -b:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_64",
|
||||
|
||||
# HP/UX IA-64 targets
|
||||
"hpux-ia64-cc","cc:-Ae +DD32 +O2 +Olit=all -z -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:+Z:+DD32 -b:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/hpux32",
|
||||
@@ -352,8 +360,22 @@ my %table=(
|
||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
"linux-s390x", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall::-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",
|
||||
"linux64-s390x", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
#### So called "highgprs" target for z/Architecture CPUs
|
||||
# "Highgprs" is kernel feature first implemented in Linux 2.6.32, see
|
||||
# /proc/cpuinfo. The idea is to preserve most significant bits of
|
||||
# general purpose registers not only upon 32-bit process context
|
||||
# switch, but even on asynchronous signal delivery to such process.
|
||||
# This makes it possible to deploy 64-bit instructions even in legacy
|
||||
# application context and achieve better [or should we say adequate]
|
||||
# performance. The build is binary compatible with linux-generic32,
|
||||
# and the idea is to be able to install the resulting libcrypto.so
|
||||
# alongside generic one, e.g. as /lib/highgprs/libcrypto.so.x.y, for
|
||||
# ldconfig and run-time linker to autodiscover. Unfortunately it
|
||||
# doesn't work just yet, because of couple of bugs in glibc
|
||||
# sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
|
||||
"linux32-s390x", "gcc:-m31 -Wa,-mzarch -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$s390x_asm;$asm=~s/bn\-s390x\.o/bn_asm.o/;$asm}.":31:dlfcn:linux-shared:-fPIC:-m31:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/highgprs",
|
||||
#### SPARC Linux setups
|
||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||
# assisted with debugging of following two configs.
|
||||
@@ -381,6 +403,11 @@ my %table=(
|
||||
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
||||
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
||||
|
||||
# Android: linux-* but without -DTERMIO and pointers to headers and libs.
|
||||
"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### *BSD [do see comment about ${BSDthreads} above!]
|
||||
"BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -394,7 +421,7 @@ my %table=(
|
||||
# triggered by RIPEMD160 code.
|
||||
"BSD-sparc64", "gcc:-DB_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:${sparcv9_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-ia64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-x86_64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${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)",
|
||||
"BSD-x86_64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${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)",
|
||||
|
||||
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
@@ -491,15 +518,15 @@ my %table=(
|
||||
# Visual C targets
|
||||
#
|
||||
# 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-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",
|
||||
"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 ia64-mont.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ghash-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:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":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:::::::ghash-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:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32",
|
||||
# x86 Win32 target defaults to ANSI API, if you want UNICODE, complement
|
||||
# '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 -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",
|
||||
# Unified CE target
|
||||
"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -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",
|
||||
"debug-VC-WIN32","cl:-W3 -Gs0 -GF -Gy -Zi -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-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
|
||||
|
||||
# Borland C++ 4.5
|
||||
@@ -552,10 +579,12 @@ my %table=(
|
||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::",
|
||||
"darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN -Wa,-force_cpusubtype_ALL::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -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:".eval{my $asm=$x86_asm;$asm=~s/cast\-586\.o//;$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:".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",
|
||||
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -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",
|
||||
# iPhoneOS/iOS
|
||||
"iphoneos-cross","llvm-gcc:-O3 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
|
||||
##### A/UX
|
||||
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||
@@ -570,18 +599,21 @@ my %table=(
|
||||
"OS2-EMX", "gcc::::::::",
|
||||
|
||||
##### VxWorks for various targets
|
||||
"vxworks-ppc60x","ccppc:-D_REENTRANT -mrtp -mhard-float -mstrict-align -fno-implicit-fp -DPPC32_fp60x -O2 -fstrength-reduce -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip:::VXWORKS:-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common:::::",
|
||||
"vxworks-ppcgen","ccppc:-D_REENTRANT -mrtp -msoft-float -mstrict-align -O1 -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip:::VXWORKS:-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon:::::",
|
||||
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
|
||||
"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::",
|
||||
"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
|
||||
"vxworks-ppc860","ccppc:-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
|
||||
"vxworks-mipsle","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r::${no_asm}::::::ranlibmips:",
|
||||
"vxworks-simlinux","ccpentium:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DL_ENDIAN -DCPU=SIMLINUX -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/h -I\$(WIND_BASE)/target/h/wrn/coreip -DOPENSSL_NO_HW_PADLOCK:::VXWORKS:-r::${no_asm}::::::ranlibpentium:",
|
||||
"vxworks-mips","ccmips:-mrtp -mips2 -O -G 0 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DCPU=MIPS32 -msoft-float -mno-branch-likely -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/h/wrn/coreip::-D_REENTRANT:VXWORKS:-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon::${mips32_asm}:o32::::::ranlibmips:",
|
||||
|
||||
##### Compaq Non-Stop Kernel (Tandem)
|
||||
"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::",
|
||||
|
||||
# uClinux
|
||||
"uClinux-dist","$ENV{'CC'}:\$(CFLAGS)::-D_REENTRANT::\$(LDFLAGS) \$(LDLIBS):BN_LLONG:::::::::::::::$ENV{'LIBSSL_dlfcn'}:linux-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):$ENV{'RANLIB'}::",
|
||||
"uClinux-dist64","$ENV{'CC'}:\$(CFLAGS)::-D_REENTRANT::\$(LDFLAGS) \$(LDLIBS):SIXTY_FOUR_BIT_LONG:::::::::::::::$ENV{'LIBSSL_dlfcn'}:linux-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):$ENV{'RANLIB'}::",
|
||||
"uClinux-dist","$ENV{'CC'}:\$(CFLAGS)::-D_REENTRANT::\$(LDFLAGS) \$(LDLIBS):BN_LLONG:${no_asm}:$ENV{'LIBSSL_dlfcn'}:linux-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):$ENV{'RANLIB'}::",
|
||||
"uClinux-dist64","$ENV{'CC'}:\$(CFLAGS)::-D_REENTRANT::\$(LDFLAGS) \$(LDLIBS):SIXTY_FOUR_BIT_LONG:${no_asm}:$ENV{'LIBSSL_dlfcn'}:linux-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):$ENV{'RANLIB'}::",
|
||||
|
||||
);
|
||||
|
||||
@@ -613,6 +645,8 @@ my $idx_rmd160_obj = $idx++;
|
||||
my $idx_rc5_obj = $idx++;
|
||||
my $idx_wp_obj = $idx++;
|
||||
my $idx_cmll_obj = $idx++;
|
||||
my $idx_modes_obj = $idx++;
|
||||
my $idx_engines_obj = $idx++;
|
||||
my $idx_perlasm_scheme = $idx++;
|
||||
my $idx_dso_scheme = $idx++;
|
||||
my $idx_shared_target = $idx++;
|
||||
@@ -629,6 +663,9 @@ my $openssldir="";
|
||||
my $exe_ext="";
|
||||
my $install_prefix= "$ENV{'INSTALL_PREFIX'}";
|
||||
my $cross_compile_prefix="";
|
||||
my $fipsdir="/usr/local/ssl/fips-2.0";
|
||||
my $fipslibdir="";
|
||||
my $baseaddr="0xFB00000";
|
||||
my $no_threads=0;
|
||||
my $threads=0;
|
||||
my $no_shared=0; # but "no-shared" is default
|
||||
@@ -663,26 +700,35 @@ my $cmll_enc="camellia.o cmll_misc.o cmll_cbc.o";
|
||||
my $processor="";
|
||||
my $default_ranlib;
|
||||
my $perl;
|
||||
my $fips=0;
|
||||
|
||||
if (exists $ENV{FIPSDIR})
|
||||
{
|
||||
$fipsdir = $ENV{FIPSDIR};
|
||||
$fipsdir =~ s/\/$//;
|
||||
}
|
||||
|
||||
# All of the following is disabled by default (RC5 was enabled before 0.9.8):
|
||||
|
||||
my %disabled = ( # "what" => "comment" [or special keyword "experimental"]
|
||||
"ec_nistp_64_gcc_128" => "default",
|
||||
"gmp" => "default",
|
||||
"jpake" => "experimental",
|
||||
"md2" => "default",
|
||||
"rc5" => "default",
|
||||
"jpake" => "experimental",
|
||||
"md2" => "default",
|
||||
"rc5" => "default",
|
||||
"rfc3779" => "default",
|
||||
"shared" => "default",
|
||||
"sctp" => "default",
|
||||
"shared" => "default",
|
||||
"store" => "experimental",
|
||||
"zlib" => "default",
|
||||
"zlib-dynamic" => "default"
|
||||
);
|
||||
"unit-test" => "default",
|
||||
"zlib" => "default",
|
||||
"zlib-dynamic" => "default"
|
||||
);
|
||||
my @experimental = ();
|
||||
|
||||
# This is what $depflags will look like with the above defaults
|
||||
# (we need this to see if we should advise the user to run "make depend"):
|
||||
my $default_depflags = " -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE";
|
||||
my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST";
|
||||
|
||||
# Explicit "no-..." options will be collected in %disabled along with the defaults.
|
||||
# To remove something from %disabled, use "enable-foo" (unless it's experimental).
|
||||
@@ -740,6 +786,7 @@ PROCESS_ARGS:
|
||||
|
||||
# rewrite some options in "enable-..." form
|
||||
s /^-?-?shared$/enable-shared/;
|
||||
s /^sctp$/enable-sctp/;
|
||||
s /^threads$/enable-threads/;
|
||||
s /^zlib$/enable-zlib/;
|
||||
s /^zlib-dynamic$/enable-zlib-dynamic/;
|
||||
@@ -757,6 +804,11 @@ PROCESS_ARGS:
|
||||
{
|
||||
$disabled{"tls1"} = "option(tls)"
|
||||
}
|
||||
elsif ($1 eq "ssl3-method")
|
||||
{
|
||||
$disabled{"ssl3-method"} = "option(ssl)";
|
||||
$disabled{"ssl3"} = "option(ssl)";
|
||||
}
|
||||
else
|
||||
{
|
||||
$disabled{$1} = "option";
|
||||
@@ -809,6 +861,10 @@ PROCESS_ARGS:
|
||||
}
|
||||
elsif (/^386$/)
|
||||
{ $processor=386; }
|
||||
elsif (/^fips$/)
|
||||
{
|
||||
$fips=1;
|
||||
}
|
||||
elsif (/^rsaref$/)
|
||||
{
|
||||
# No RSAref support any more since it's not needed.
|
||||
@@ -823,6 +879,7 @@ PROCESS_ARGS:
|
||||
}
|
||||
elsif (/^-[^-]/ or /^\+/)
|
||||
{
|
||||
$_ =~ s/%([0-9a-f]{1,2})/chr(hex($1))/gei;
|
||||
$flags.=$_." ";
|
||||
}
|
||||
elsif (/^--prefix=(.*)$/)
|
||||
@@ -853,6 +910,18 @@ PROCESS_ARGS:
|
||||
{
|
||||
$withargs{"zlib-include"}="-I$1";
|
||||
}
|
||||
elsif (/^--with-fipsdir=(.*)$/)
|
||||
{
|
||||
$fipsdir="$1";
|
||||
}
|
||||
elsif (/^--with-fipslibdir=(.*)$/)
|
||||
{
|
||||
$fipslibdir="$1";
|
||||
}
|
||||
elsif (/^--with-baseaddr=(.*)$/)
|
||||
{
|
||||
$baseaddr="$1";
|
||||
}
|
||||
elsif (/^--cross-compile-prefix=(.*)$/)
|
||||
{
|
||||
$cross_compile_prefix=$1;
|
||||
@@ -927,6 +996,17 @@ if (defined($disabled{"md5"}) || defined($disabled{"rsa"}))
|
||||
$disabled{"ssl2"} = "forced";
|
||||
}
|
||||
|
||||
if ($fips && $fipslibdir eq "")
|
||||
{
|
||||
$fipslibdir = $fipsdir . "/lib/";
|
||||
}
|
||||
|
||||
# RSAX ENGINE sets default non-FIPS RSA method.
|
||||
if ($fips)
|
||||
{
|
||||
$disabled{"rsax"} = "forced";
|
||||
}
|
||||
|
||||
# SSL 3.0 and TLS requires MD5 and SHA and either RSA or DSA+DH
|
||||
if (defined($disabled{"md5"}) || defined($disabled{"sha"})
|
||||
|| (defined($disabled{"rsa"})
|
||||
@@ -947,6 +1027,13 @@ if (defined($disabled{"ec"}) || defined($disabled{"dsa"})
|
||||
$disabled{"gost"} = "forced";
|
||||
}
|
||||
|
||||
# SRP and HEARTBEATS require TLSEXT
|
||||
if (defined($disabled{"tlsext"}))
|
||||
{
|
||||
$disabled{"srp"} = "forced";
|
||||
$disabled{"heartbeats"} = "forced";
|
||||
}
|
||||
|
||||
if ($target eq "TABLE") {
|
||||
foreach $target (sort keys %table) {
|
||||
print_table_entry($target);
|
||||
@@ -996,7 +1083,7 @@ foreach (sort (keys %disabled))
|
||||
else
|
||||
{
|
||||
my ($ALGO, $algo);
|
||||
($ALGO = $algo = $_) =~ tr/[a-z]/[A-Z]/;
|
||||
($ALGO = $algo = $_) =~ tr/[\-a-z]/[_A-Z]/;
|
||||
|
||||
if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/)
|
||||
{
|
||||
@@ -1088,6 +1175,8 @@ my $rmd160_obj = $fields[$idx_rmd160_obj];
|
||||
my $rc5_obj = $fields[$idx_rc5_obj];
|
||||
my $wp_obj = $fields[$idx_wp_obj];
|
||||
my $cmll_obj = $fields[$idx_cmll_obj];
|
||||
my $modes_obj = $fields[$idx_modes_obj];
|
||||
my $engines_obj = $fields[$idx_engines_obj];
|
||||
my $perlasm_scheme = $fields[$idx_perlasm_scheme];
|
||||
my $dso_scheme = $fields[$idx_dso_scheme];
|
||||
my $shared_target = $fields[$idx_shared_target];
|
||||
@@ -1248,7 +1337,7 @@ if ($no_asm)
|
||||
{
|
||||
$cpuid_obj=$bn_obj=
|
||||
$des_obj=$aes_obj=$bf_obj=$cast_obj=$rc4_obj=$rc5_obj=$cmll_obj=
|
||||
$sha1_obj=$md5_obj=$rmd160_obj=$wp_obj="";
|
||||
$modes_obj=$sha1_obj=$md5_obj=$rmd160_obj=$wp_obj=$engines_obj="";
|
||||
}
|
||||
|
||||
if (!$no_shared)
|
||||
@@ -1312,7 +1401,7 @@ if (!$IsMK1MF)
|
||||
}
|
||||
}
|
||||
|
||||
$cpuid_obj.=" uplink.o uplink-cof.o" if ($cflags =~ /\-DOPENSSL_USE_APPLINK/);
|
||||
$cpuid_obj.=" uplink.o uplink-x86.o" if ($cflags =~ /\-DOPENSSL_USE_APPLINK/);
|
||||
|
||||
#
|
||||
# Platform fix-ups
|
||||
@@ -1380,6 +1469,14 @@ $cflags.=" -DOPENSSL_BN_ASM_PART_WORDS" if ($bn_obj =~ /bn-586/);
|
||||
$cflags.=" -DOPENSSL_IA32_SSE2" if (!$no_sse2 && $bn_obj =~ /86/);
|
||||
|
||||
$cflags.=" -DOPENSSL_BN_ASM_MONT" if ($bn_obj =~ /-mont/);
|
||||
$cflags.=" -DOPENSSL_BN_ASM_MONT5" if ($bn_obj =~ /-mont5/);
|
||||
$cflags.=" -DOPENSSL_BN_ASM_GF2m" if ($bn_obj =~ /-gf2m/);
|
||||
|
||||
if ($fips)
|
||||
{
|
||||
$openssl_other_defines.="#define OPENSSL_FIPS\n";
|
||||
$cflags .= " -I\$(FIPSDIR)/include";
|
||||
}
|
||||
|
||||
$cpuid_obj="mem_clr.o" unless ($cpuid_obj =~ /\.o$/);
|
||||
$des_obj=$des_enc unless ($des_obj =~ /\.o$/);
|
||||
@@ -1413,6 +1510,14 @@ if ($rmd160_obj =~ /\.o$/)
|
||||
if ($aes_obj =~ /\.o$/)
|
||||
{
|
||||
$cflags.=" -DAES_ASM";
|
||||
# aes-ctr.o is not a real file, only indication that assembler
|
||||
# module implements AES_ctr32_encrypt...
|
||||
$cflags.=" -DAES_CTR_ASM" if ($aes_obj =~ s/\s*aes\-ctr\.o//);
|
||||
# aes-xts.o indicates presense of AES_xts_[en|de]crypt...
|
||||
$cflags.=" -DAES_XTS_ASM" if ($aes_obj =~ s/\s*aes\-xts\.o//);
|
||||
$aes_obj =~ s/\s*(vpaes|aesni)\-x86\.o//g if ($no_sse2);
|
||||
$cflags.=" -DVPAES_ASM" if ($aes_obj =~ m/vpaes/);
|
||||
$cflags.=" -DBSAES_ASM" if ($aes_obj =~ m/bsaes/);
|
||||
}
|
||||
else {
|
||||
$aes_obj=$aes_enc;
|
||||
@@ -1426,6 +1531,10 @@ else {
|
||||
$wp_obj="wp_block.o";
|
||||
}
|
||||
$cmll_obj=$cmll_enc unless ($cmll_obj =~ /.o$/);
|
||||
if ($modes_obj =~ /ghash/)
|
||||
{
|
||||
$cflags.=" -DGHASH_ASM";
|
||||
}
|
||||
|
||||
# "Stringify" the C flags string. This permits it to be made part of a string
|
||||
# and works as well on command lines.
|
||||
@@ -1540,6 +1649,8 @@ while (<IN>)
|
||||
s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
|
||||
s/^WP_ASM_OBJ=.*$/WP_ASM_OBJ= $wp_obj/;
|
||||
s/^CMLL_ENC=.*$/CMLL_ENC= $cmll_obj/;
|
||||
s/^MODES_ASM_OBJ.=*$/MODES_ASM_OBJ= $modes_obj/;
|
||||
s/^ENGINES_ASM_OBJ.=*$/ENGINES_ASM_OBJ= $engines_obj/;
|
||||
s/^PERLASM_SCHEME=.*$/PERLASM_SCHEME= $perlasm_scheme/;
|
||||
s/^PROCESSOR=.*/PROCESSOR= $processor/;
|
||||
s/^ARFLAGS=.*/ARFLAGS= $arflags/;
|
||||
@@ -1548,6 +1659,12 @@ while (<IN>)
|
||||
s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/;
|
||||
s/^LIBZLIB=.*/LIBZLIB=$withargs{"zlib-lib"}/;
|
||||
s/^ZLIB_INCLUDE=.*/ZLIB_INCLUDE=$withargs{"zlib-include"}/;
|
||||
|
||||
s/^FIPSDIR=.*/FIPSDIR=$fipsdir/;
|
||||
s/^FIPSLIBDIR=.*/FIPSLIBDIR=$fipslibdir/;
|
||||
s/^FIPSCANLIB=.*/FIPSCANLIB=libcrypto/ if $fips;
|
||||
s/^BASEADDR=.*/BASEADDR=$baseaddr/;
|
||||
|
||||
s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/;
|
||||
s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/;
|
||||
s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared);
|
||||
@@ -1591,7 +1708,9 @@ print "RC5_ENC =$rc5_obj\n";
|
||||
print "MD5_OBJ_ASM =$md5_obj\n";
|
||||
print "SHA1_OBJ_ASM =$sha1_obj\n";
|
||||
print "RMD160_OBJ_ASM=$rmd160_obj\n";
|
||||
print "CMLL_ENC= =$cmll_obj\n";
|
||||
print "CMLL_ENC =$cmll_obj\n";
|
||||
print "MODES_OBJ =$modes_obj\n";
|
||||
print "ENGINES_OBJ =$engines_obj\n";
|
||||
print "PROCESSOR =$processor\n";
|
||||
print "RANLIB =$ranlib\n";
|
||||
print "ARFLAGS =$arflags\n";
|
||||
@@ -1653,6 +1772,9 @@ open(OUT,'>crypto/opensslconf.h.new') || die "unable to create crypto/opensslcon
|
||||
print OUT "/* opensslconf.h */\n";
|
||||
print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n";
|
||||
|
||||
print OUT "#ifdef __cplusplus\n";
|
||||
print OUT "extern \"C\" {\n";
|
||||
print OUT "#endif\n";
|
||||
print OUT "/* OpenSSL was configured with the following options: */\n";
|
||||
my $openssl_algorithm_defines_trans = $openssl_algorithm_defines;
|
||||
$openssl_experimental_defines =~ s/^\s*#\s*define\s+OPENSSL_NO_(.*)/#ifndef OPENSSL_EXPERIMENTAL_$1\n# ifndef OPENSSL_NO_$1\n# define OPENSSL_NO_$1\n# endif\n#endif/mg;
|
||||
@@ -1757,6 +1879,9 @@ while (<IN>)
|
||||
{ print OUT $_; }
|
||||
}
|
||||
close(IN);
|
||||
print OUT "#ifdef __cplusplus\n";
|
||||
print OUT "}\n";
|
||||
print OUT "#endif\n";
|
||||
close(OUT);
|
||||
rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h";
|
||||
rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n";
|
||||
@@ -1984,7 +2109,8 @@ sub print_table_entry
|
||||
(my $cc,my $cflags,my $unistd,my $thread_cflag,my $sys_id,my $lflags,
|
||||
my $bn_ops,my $cpuid_obj,my $bn_obj,my $des_obj,my $aes_obj, my $bf_obj,
|
||||
my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
|
||||
my $rc5_obj,my $wp_obj,my $cmll_obj,my $perlasm_scheme,my $dso_scheme,my $shared_target,my $shared_cflag,
|
||||
my $rc5_obj,my $wp_obj,my $cmll_obj,my $modes_obj, my $engines_obj,
|
||||
my $perlasm_scheme,my $dso_scheme,my $shared_target,my $shared_cflag,
|
||||
my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags,my $multilib)=
|
||||
split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||
|
||||
@@ -2011,6 +2137,8 @@ sub print_table_entry
|
||||
\$rc5_obj = $rc5_obj
|
||||
\$wp_obj = $wp_obj
|
||||
\$cmll_obj = $cmll_obj
|
||||
\$modes_obj = $modes_obj
|
||||
\$engines_obj = $engines_obj
|
||||
\$perlasm_scheme = $perlasm_scheme
|
||||
\$dso_scheme = $dso_scheme
|
||||
\$shared_target= $shared_target
|
||||
|
||||
2
FAQ
2
FAQ
@@ -83,7 +83,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 1.0.1c was released on Feb 5th, 2013.
|
||||
OpenSSL 1.0.1e was released on Feb 11th, 2013.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
|
||||
59
Makefile.org
59
Makefile.org
@@ -69,7 +69,7 @@ RANLIB= ranlib
|
||||
NM= nm
|
||||
PERL= perl
|
||||
TAR= tar
|
||||
TARFLAGS= --no-recursion
|
||||
TARFLAGS= --no-recursion --record-size=10240
|
||||
MAKEDEPPROG=makedepend
|
||||
LIBDIR=lib
|
||||
|
||||
@@ -99,6 +99,8 @@ SHA1_ASM_OBJ=
|
||||
RMD160_ASM_OBJ=
|
||||
WP_ASM_OBJ=
|
||||
CMLL_ENC=
|
||||
MODES_ASM_OBJ=
|
||||
ENGINES_ASM_OBJ=
|
||||
PERLASM_SCHEME=
|
||||
|
||||
# KRB5 stuff
|
||||
@@ -109,6 +111,30 @@ LIBKRB5=
|
||||
ZLIB_INCLUDE=
|
||||
LIBZLIB=
|
||||
|
||||
# TOP level FIPS install directory.
|
||||
FIPSDIR=
|
||||
|
||||
# This is the location of fipscanister.o and friends.
|
||||
# The FIPS module build will place it $(INSTALLTOP)/lib
|
||||
# but since $(INSTALLTOP) can only take the default value
|
||||
# when the module is built it will be in /usr/local/ssl/lib
|
||||
# $(INSTALLTOP) for this build may be different so hard
|
||||
# code the path.
|
||||
|
||||
FIPSLIBDIR=
|
||||
|
||||
# The location of the library which contains fipscanister.o
|
||||
# normally it will be libcrypto unless fipsdso is set in which
|
||||
# case it will be libfips. If not compiling in FIPS mode at all
|
||||
# this is empty making it a useful test for a FIPS compile.
|
||||
|
||||
FIPSCANLIB=
|
||||
|
||||
# Shared library base address. Currently only used on Windows.
|
||||
#
|
||||
|
||||
BASEADDR=
|
||||
|
||||
DIRS= crypto ssl engines apps test tools
|
||||
ENGDIRS= ccgost
|
||||
SHLIBDIRS= crypto ssl
|
||||
@@ -121,7 +147,7 @@ SDIRS= \
|
||||
bn ec rsa dsa ecdsa dh ecdh dso engine \
|
||||
buffer bio stack lhash rand err \
|
||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
|
||||
cms pqueue ts jpake store
|
||||
cms pqueue ts jpake srp store cmac
|
||||
# keep in mind that the above list is adjusted by ./Configure
|
||||
# according to no-xxx arguments...
|
||||
|
||||
@@ -204,7 +230,12 @@ BUILDENV= PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
|
||||
MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
|
||||
RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
|
||||
WP_ASM_OBJ='$(WP_ASM_OBJ)' \
|
||||
MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \
|
||||
ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)' \
|
||||
PERLASM_SCHEME='$(PERLASM_SCHEME)' \
|
||||
FIPSLIBDIR='${FIPSLIBDIR}' \
|
||||
FIPSDIR='${FIPSDIR}' \
|
||||
FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
|
||||
THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
|
||||
# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
|
||||
# which in turn eliminates ambiguities in variable treatment with -e.
|
||||
@@ -258,9 +289,21 @@ all_testapps: build_libs build_testapps
|
||||
build_testapps:
|
||||
@dir=crypto; target=testapps; $(BUILD_ONE_CMD)
|
||||
|
||||
libcrypto$(SHLIB_EXT): libcrypto.a
|
||||
fips_premain_dso$(EXE_EXT): libcrypto.a
|
||||
[ -z "$(FIPSCANLIB)" ] || $(CC) $(CFLAG) -Iinclude \
|
||||
-DFINGERPRINT_PREMAIN_DSO_LOAD -o $@ \
|
||||
$(FIPSLIBDIR)fips_premain.c $(FIPSLIBDIR)fipscanister.o \
|
||||
libcrypto.a $(EX_LIBS)
|
||||
|
||||
libcrypto$(SHLIB_EXT): libcrypto.a fips_premain_dso$(EXE_EXT)
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
$(MAKE) SHLIBDIRS=crypto build-shared; \
|
||||
if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
|
||||
FIPSLD_LIBCRYPTO=libcrypto.a ; \
|
||||
FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \
|
||||
export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \
|
||||
fi; \
|
||||
$(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared && \
|
||||
(touch -c fips_premain_dso$(EXE_EXT) || :); \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2; \
|
||||
exit 1; \
|
||||
@@ -360,7 +403,7 @@ Makefile: Makefile.org Configure config
|
||||
@false
|
||||
|
||||
libclean:
|
||||
rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
|
||||
rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
|
||||
|
||||
clean: libclean
|
||||
rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
|
||||
@@ -402,7 +445,7 @@ rehash.time: certs apps
|
||||
[ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
|
||||
OPENSSL_DEBUG_MEMORY=on; \
|
||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||
$(PERL) tools/c_rehash certs) && \
|
||||
$(PERL) tools/c_rehash certs/demo) && \
|
||||
touch rehash.time; \
|
||||
else :; fi
|
||||
|
||||
@@ -427,9 +470,9 @@ tags:
|
||||
find . -name '[^.]*.[ch]' | xargs etags -a
|
||||
|
||||
errors:
|
||||
$(PERL) util/ck_errf.pl -strict */*.c */*/*.c
|
||||
$(PERL) util/mkerr.pl -recurse -write
|
||||
(cd engines; $(MAKE) PERL=$(PERL) errors)
|
||||
$(PERL) util/ck_errf.pl */*.c */*/*.c
|
||||
|
||||
stacks:
|
||||
$(PERL) util/mkstack.pl -write
|
||||
@@ -512,7 +555,7 @@ install_sw:
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
@set -e; target=install; $(RECURSIVE_BUILD_CMD)
|
||||
@set -e; for i in $(LIBS) ;\
|
||||
@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
|
||||
90
NEWS
90
NEWS
@@ -5,36 +5,104 @@
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Major changes between OpenSSL 1.0.0m and OpenSSL 1.0.0n [6 Aug 2014]
|
||||
Major changes between OpenSSL 1.0.1k and OpenSSL 1.0.1l [15 Jan 2015]
|
||||
|
||||
o Build fixes for the Windows and OpenVMS platforms
|
||||
|
||||
Major changes between OpenSSL 1.0.1j and OpenSSL 1.0.1k [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.1i and OpenSSL 1.0.1j [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.1h and OpenSSL 1.0.1i [6 Aug 2014]
|
||||
|
||||
o Fix for CVE-2014-3512
|
||||
o Fix for CVE-2014-3511
|
||||
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-5139
|
||||
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]
|
||||
Major changes between OpenSSL 1.0.1g and OpenSSL 1.0.1h [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]
|
||||
Major changes between OpenSSL 1.0.1f and OpenSSL 1.0.1g [7 Apr 2014]
|
||||
|
||||
o Fix for CVE-2014-0160
|
||||
o Add TLS padding extension workaround for broken servers.
|
||||
o Fix for CVE-2014-0076
|
||||
|
||||
Major changes between OpenSSL 1.0.1e and OpenSSL 1.0.1f [6 Jan 2014]
|
||||
|
||||
o Don't include gmt_unix_time in TLS server and client random values
|
||||
o Fix for TLS record tampering bug CVE-2013-4353
|
||||
o Fix for TLS version checking bug CVE-2013-6449
|
||||
o Fix for DTLS retransmission bug CVE-2013-6450
|
||||
|
||||
Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e [11 Feb 2013]:
|
||||
|
||||
o Corrected fix for CVE-2013-0169
|
||||
|
||||
Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d [4 Feb 2013]:
|
||||
|
||||
o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version.
|
||||
o Include the fips configuration module.
|
||||
o Fix OCSP bad key DoS attack CVE-2013-0166
|
||||
o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169
|
||||
o Fix for TLS AESNI record handling flaw CVE-2012-2686
|
||||
|
||||
Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c [10 May 2012]:
|
||||
|
||||
o Fix TLS/DTLS record length checking bug CVE-2012-2333
|
||||
o Don't attempt to use non-FIPS composite ciphers in FIPS mode.
|
||||
|
||||
Major changes between OpenSSL 1.0.1a and OpenSSL 1.0.1b [26 Apr 2012]:
|
||||
|
||||
o Fix compilation error on non-x86 platforms.
|
||||
o Make FIPS capable OpenSSL ciphers work in non-FIPS mode.
|
||||
o Fix SSL_OP_NO_TLSv1_1 clash with SSL_OP_ALL in OpenSSL 1.0.0
|
||||
|
||||
Major changes between OpenSSL 1.0.1 and OpenSSL 1.0.1a [19 Apr 2012]:
|
||||
|
||||
o Fix for ASN1 overflow bug CVE-2012-2110
|
||||
o Workarounds for some servers that hang on long client hellos.
|
||||
o Fix SEGV in AES code.
|
||||
|
||||
Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.1 [14 Mar 2012]:
|
||||
|
||||
o TLS/DTLS heartbeat support.
|
||||
o SCTP support.
|
||||
o RFC 5705 TLS key material exporter.
|
||||
o RFC 5764 DTLS-SRTP negotiation.
|
||||
o Next Protocol Negotiation.
|
||||
o PSS signatures in certificates, requests and CRLs.
|
||||
o Support for password based recipient info for CMS.
|
||||
o Support TLS v1.2 and TLS v1.1.
|
||||
o Preliminary FIPS capability for unvalidated 2.0 FIPS module.
|
||||
o SRP support.
|
||||
|
||||
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
|
||||
|
||||
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 1.0.0n 6 Aug 2014
|
||||
OpenSSL 1.0.1l 15 Jan 2015
|
||||
|
||||
Copyright (c) 1998-2011 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
|
||||
167
apps/Makefile
167
apps/Makefile
@@ -39,7 +39,7 @@ E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \
|
||||
ca crl rsa rsautl dsa dsaparam ec ecparam \
|
||||
x509 genrsa gendsa genpkey s_server s_client speed \
|
||||
s_time version pkcs7 cms crl2pkcs7 sess_id ciphers nseq pkcs12 \
|
||||
pkcs8 pkey pkeyparam pkeyutl spkac smime rand engine ocsp prime ts
|
||||
pkcs8 pkey pkeyparam pkeyutl spkac smime rand engine ocsp prime ts srp
|
||||
|
||||
PROGS= $(PROGRAM).c
|
||||
|
||||
@@ -56,7 +56,7 @@ E_OBJ= verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o er
|
||||
x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o \
|
||||
s_time.o $(A_OBJ) $(S_OBJ) $(RAND_OBJ) version.o sess_id.o \
|
||||
ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o \
|
||||
spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o
|
||||
spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o
|
||||
|
||||
E_SRC= verify.c asn1pars.c req.c dgst.c dh.c enc.c passwd.c gendh.c errstr.c ca.c \
|
||||
pkcs7.c crl2p7.c crl.c \
|
||||
@@ -64,7 +64,7 @@ E_SRC= verify.c asn1pars.c req.c dgst.c dh.c enc.c passwd.c gendh.c errstr.c ca.
|
||||
x509.c genrsa.c gendsa.c genpkey.c s_server.c s_client.c speed.c \
|
||||
s_time.c $(A_SRC) $(S_SRC) $(RAND_SRC) version.c sess_id.c \
|
||||
ciphers.c nseq.c pkcs12.c pkcs8.c pkey.c pkeyparam.c pkeyutl.c \
|
||||
spkac.c smime.c cms.c rand.c engine.c ocsp.c prime.c ts.c
|
||||
spkac.c smime.c cms.c rand.c engine.c ocsp.c prime.c ts.c srp.c
|
||||
|
||||
SRC=$(E_SRC)
|
||||
|
||||
@@ -153,6 +153,8 @@ $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
||||
$(RM) $(EXE)
|
||||
shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
shlib_target="$(SHLIB_TARGET)"; \
|
||||
elif [ -n "$(FIPSCANLIB)" ]; then \
|
||||
FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; export CC FIPSLD_CC; \
|
||||
fi; \
|
||||
LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \
|
||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||
@@ -245,13 +247,13 @@ ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
ciphers.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ciphers.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
ciphers.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
ciphers.o: ciphers.c
|
||||
ciphers.o: ../include/openssl/sha.h ../include/openssl/srtp.h
|
||||
ciphers.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
ciphers.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
ciphers.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
ciphers.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
ciphers.o: ../include/openssl/x509v3.h apps.h ciphers.c
|
||||
cms.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
cms.o: ../include/openssl/buffer.h ../include/openssl/cms.h
|
||||
cms.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
@@ -427,13 +429,13 @@ engine.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
engine.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
engine.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
engine.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
engine.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
engine.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
engine.o: engine.c
|
||||
engine.o: ../include/openssl/sha.h ../include/openssl/srtp.h
|
||||
engine.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
engine.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
engine.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
engine.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
engine.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
engine.o: ../include/openssl/x509v3.h apps.h engine.c
|
||||
errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
errstr.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
errstr.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
@@ -448,13 +450,13 @@ errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
errstr.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
errstr.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
errstr.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
errstr.o: errstr.c
|
||||
errstr.o: ../include/openssl/sha.h ../include/openssl/srtp.h
|
||||
errstr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
errstr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
errstr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
errstr.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
errstr.o: ../include/openssl/x509v3.h apps.h errstr.c
|
||||
gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
@@ -556,12 +558,12 @@ ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
|
||||
ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c
|
||||
ocsp.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
|
||||
ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ocsp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c
|
||||
openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
openssl.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
openssl.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
@@ -575,8 +577,9 @@ openssl.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
|
||||
openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
openssl.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
openssl.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
|
||||
openssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
openssl.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
|
||||
openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
openssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
@@ -791,12 +794,13 @@ s_cb.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_cb.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_cb.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
|
||||
s_cb.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_cb.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_cb.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_cb.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s_cb.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
s_cb.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
s_cb.o: ../include/openssl/x509v3.h apps.h s_apps.h s_cb.c
|
||||
s_cb.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
|
||||
s_cb.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s_cb.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s_cb.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_cb.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
s_cb.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
s_cb.o: s_apps.h s_cb.c
|
||||
s_client.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_client.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s_client.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
@@ -812,7 +816,8 @@ s_client.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_client.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
|
||||
s_client.o: ../include/openssl/rand.h ../include/openssl/safestack.h
|
||||
s_client.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_client.o: ../include/openssl/sha.h ../include/openssl/srp.h
|
||||
s_client.o: ../include/openssl/srtp.h ../include/openssl/ssl.h
|
||||
s_client.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s_client.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s_client.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
@@ -836,6 +841,7 @@ s_server.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_server.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
|
||||
s_server.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
s_server.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_server.o: ../include/openssl/srp.h ../include/openssl/srtp.h
|
||||
s_server.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_server.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_server.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
@@ -857,13 +863,13 @@ s_socket.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_socket.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_socket.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_socket.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
s_socket.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_socket.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s_socket.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s_socket.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_socket.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
s_socket.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
s_socket.o: s_apps.h s_socket.c
|
||||
s_socket.o: ../include/openssl/sha.h ../include/openssl/srtp.h
|
||||
s_socket.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_socket.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_socket.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s_socket.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
s_socket.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
s_socket.o: ../include/openssl/x509v3.h apps.h s_apps.h s_socket.c
|
||||
s_time.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_time.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_time.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
@@ -878,13 +884,13 @@ s_time.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_time.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_time.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_time.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
s_time.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_time.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s_time.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s_time.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_time.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
s_time.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
s_time.o: s_apps.h s_time.c
|
||||
s_time.o: ../include/openssl/sha.h ../include/openssl/srtp.h
|
||||
s_time.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_time.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_time.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s_time.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
s_time.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
s_time.o: ../include/openssl/x509v3.h apps.h s_apps.h s_time.c
|
||||
sess_id.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
sess_id.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
sess_id.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
@@ -899,13 +905,13 @@ sess_id.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
sess_id.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
sess_id.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
sess_id.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
sess_id.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
sess_id.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
sess_id.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
sess_id.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
sess_id.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
sess_id.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
sess_id.o: sess_id.c
|
||||
sess_id.o: ../include/openssl/sha.h ../include/openssl/srtp.h
|
||||
sess_id.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
sess_id.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
sess_id.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
sess_id.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
sess_id.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
sess_id.o: ../include/openssl/x509v3.h apps.h sess_id.c
|
||||
smime.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
smime.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
smime.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
@@ -935,19 +941,19 @@ speed.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
speed.o: ../include/openssl/hmac.h ../include/openssl/idea.h
|
||||
speed.o: ../include/openssl/lhash.h ../include/openssl/md4.h
|
||||
speed.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||
speed.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
speed.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
|
||||
speed.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
speed.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
speed.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||
speed.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||
speed.o: ../include/openssl/safestack.h ../include/openssl/seed.h
|
||||
speed.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
speed.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
speed.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
|
||||
speed.o: ../include/openssl/whrlpool.h ../include/openssl/x509.h
|
||||
speed.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
speed.o: speed.c testdsa.h testrsa.h
|
||||
speed.o: ../include/openssl/modes.h ../include/openssl/obj_mac.h
|
||||
speed.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
|
||||
speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
speed.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
|
||||
speed.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
||||
speed.o: ../include/openssl/rc4.h ../include/openssl/ripemd.h
|
||||
speed.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
speed.o: ../include/openssl/seed.h ../include/openssl/sha.h
|
||||
speed.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
speed.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
|
||||
speed.o: ../include/openssl/ui_compat.h ../include/openssl/whrlpool.h
|
||||
speed.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
speed.o: ../include/openssl/x509v3.h apps.h speed.c testdsa.h testrsa.h
|
||||
spkac.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
spkac.o: ../include/openssl/buffer.h ../include/openssl/conf.h
|
||||
spkac.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
@@ -964,6 +970,21 @@ spkac.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
spkac.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
spkac.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
spkac.o: spkac.c
|
||||
srp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
srp.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
srp.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
srp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
srp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
srp.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
srp.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
srp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
srp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
|
||||
srp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
srp.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
|
||||
srp.o: ../include/openssl/sha.h ../include/openssl/srp.h
|
||||
srp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
srp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
srp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h srp.c
|
||||
ts.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ts.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ts.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
|
||||
69
apps/apps.c
69
apps/apps.c
@@ -2265,6 +2265,7 @@ int args_verify(char ***pargs, int *pargc,
|
||||
int purpose = 0, depth = -1;
|
||||
char **oldargs = *pargs;
|
||||
char *arg = **pargs, *argn = (*pargs)[1];
|
||||
time_t at_time = 0;
|
||||
if (!strcmp(arg, "-policy"))
|
||||
{
|
||||
if (!argn)
|
||||
@@ -2317,6 +2318,27 @@ int args_verify(char ***pargs, int *pargc,
|
||||
}
|
||||
(*pargs)++;
|
||||
}
|
||||
else if (strcmp(arg,"-attime") == 0)
|
||||
{
|
||||
if (!argn)
|
||||
*badarg = 1;
|
||||
else
|
||||
{
|
||||
long timestamp;
|
||||
/* interpret the -attime argument as seconds since
|
||||
* Epoch */
|
||||
if (sscanf(argn, "%li", ×tamp) != 1)
|
||||
{
|
||||
BIO_printf(bio_err,
|
||||
"Error parsing timestamp %s\n",
|
||||
argn);
|
||||
*badarg = 1;
|
||||
}
|
||||
/* on some platforms time_t may be a float */
|
||||
at_time = (time_t) timestamp;
|
||||
}
|
||||
(*pargs)++;
|
||||
}
|
||||
else if (!strcmp(arg, "-ignore_critical"))
|
||||
flags |= X509_V_FLAG_IGNORE_CRITICAL;
|
||||
else if (!strcmp(arg, "-issuer_checks"))
|
||||
@@ -2371,6 +2393,9 @@ int args_verify(char ***pargs, int *pargc,
|
||||
if (depth >= 0)
|
||||
X509_VERIFY_PARAM_set_depth(*pm, depth);
|
||||
|
||||
if (at_time)
|
||||
X509_VERIFY_PARAM_set_time(*pm, at_time);
|
||||
|
||||
end:
|
||||
|
||||
(*pargs)++;
|
||||
@@ -2702,6 +2727,50 @@ void jpake_server_auth(BIO *out, BIO *conn, const char *secret)
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
/* next_protos_parse parses a comma separated list of strings into a string
|
||||
* in a format suitable for passing to SSL_CTX_set_next_protos_advertised.
|
||||
* outlen: (output) set to the length of the resulting buffer on success.
|
||||
* err: (maybe NULL) on failure, an error message line is written to this BIO.
|
||||
* in: a NUL termianted string like "abc,def,ghi"
|
||||
*
|
||||
* returns: a malloced buffer or NULL on failure.
|
||||
*/
|
||||
unsigned char *next_protos_parse(unsigned short *outlen, const char *in)
|
||||
{
|
||||
size_t len;
|
||||
unsigned char *out;
|
||||
size_t i, start = 0;
|
||||
|
||||
len = strlen(in);
|
||||
if (len >= 65535)
|
||||
return NULL;
|
||||
|
||||
out = OPENSSL_malloc(strlen(in) + 1);
|
||||
if (!out)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i <= len; ++i)
|
||||
{
|
||||
if (i == len || in[i] == ',')
|
||||
{
|
||||
if (i - start > 255)
|
||||
{
|
||||
OPENSSL_free(out);
|
||||
return NULL;
|
||||
}
|
||||
out[start] = i - start;
|
||||
start = i + 1;
|
||||
}
|
||||
else
|
||||
out[i+1] = in[i];
|
||||
}
|
||||
|
||||
*outlen = len + 1;
|
||||
return out;
|
||||
}
|
||||
#endif /* !OPENSSL_NO_TLSEXT && !OPENSSL_NO_NEXTPROTONEG */
|
||||
|
||||
/*
|
||||
* Platform-specific sections
|
||||
*/
|
||||
|
||||
15
apps/apps.h
15
apps/apps.h
@@ -188,6 +188,7 @@ extern BIO *bio_err;
|
||||
do { CONF_modules_unload(1); destroy_ui_method(); \
|
||||
OBJ_cleanup(); EVP_cleanup(); ENGINE_cleanup(); \
|
||||
CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \
|
||||
RAND_cleanup(); \
|
||||
ERR_free_strings(); zlib_cleanup();} while(0)
|
||||
# else
|
||||
# define apps_startup() \
|
||||
@@ -198,6 +199,7 @@ extern BIO *bio_err;
|
||||
do { CONF_modules_unload(1); destroy_ui_method(); \
|
||||
OBJ_cleanup(); EVP_cleanup(); \
|
||||
CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \
|
||||
RAND_cleanup(); \
|
||||
ERR_free_strings(); zlib_cleanup(); } while(0)
|
||||
# endif
|
||||
#endif
|
||||
@@ -317,6 +319,12 @@ int bio_to_mem(unsigned char **out, int maxlen, BIO *in);
|
||||
int pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value);
|
||||
int init_gen_str(BIO *err, EVP_PKEY_CTX **pctx,
|
||||
const char *algname, ENGINE *e, int do_param);
|
||||
int do_X509_sign(BIO *err, X509 *x, EVP_PKEY *pkey, const EVP_MD *md,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts);
|
||||
int do_X509_REQ_sign(BIO *err, X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts);
|
||||
int do_X509_CRL_sign(BIO *err, X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts);
|
||||
#ifndef OPENSSL_NO_PSK
|
||||
extern char *psk_key;
|
||||
#endif
|
||||
@@ -325,6 +333,10 @@ void jpake_client_auth(BIO *out, BIO *conn, const char *secret);
|
||||
void jpake_server_auth(BIO *out, BIO *conn, const char *secret);
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
unsigned char *next_protos_parse(unsigned short *outlen, const char *in);
|
||||
#endif /* !OPENSSL_NO_TLSEXT && !OPENSSL_NO_NEXTPROTONEG */
|
||||
|
||||
#define FORMAT_UNDEF 0
|
||||
#define FORMAT_ASN1 1
|
||||
#define FORMAT_TEXT 2
|
||||
@@ -357,4 +369,7 @@ int raw_write_stdout(const void *,int);
|
||||
#define TM_START 0
|
||||
#define TM_STOP 1
|
||||
double app_tminterval (int stop,int usertime);
|
||||
|
||||
#define OPENSSL_NO_SSL_INTERN
|
||||
|
||||
#endif
|
||||
|
||||
67
apps/ca.c
67
apps/ca.c
@@ -197,26 +197,30 @@ extern int EF_ALIGNMENT;
|
||||
|
||||
static void lookup_fail(const char *name, const char *tag);
|
||||
static int certify(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
|
||||
const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,CA_DB *db,
|
||||
const EVP_MD *dgst,STACK_OF(OPENSSL_STRING) *sigopts,
|
||||
STACK_OF(CONF_VALUE) *policy,CA_DB *db,
|
||||
BIGNUM *serial, char *subj,unsigned long chtype, int multirdn, int email_dn, char *startdate,
|
||||
char *enddate, long days, int batch, char *ext_sect, CONF *conf,
|
||||
int verbose, unsigned long certopt, unsigned long nameopt,
|
||||
int default_op, int ext_copy, int selfsign);
|
||||
static int certify_cert(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
|
||||
const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,
|
||||
const EVP_MD *dgst,STACK_OF(OPENSSL_STRING) *sigopts,
|
||||
STACK_OF(CONF_VALUE) *policy,
|
||||
CA_DB *db, BIGNUM *serial, char *subj,unsigned long chtype, int multirdn, int email_dn,
|
||||
char *startdate, char *enddate, long days, int batch,
|
||||
char *ext_sect, CONF *conf,int verbose, unsigned long certopt,
|
||||
unsigned long nameopt, int default_op, int ext_copy,
|
||||
ENGINE *e);
|
||||
static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
|
||||
const EVP_MD *dgst,STACK_OF(CONF_VALUE) *policy,
|
||||
const EVP_MD *dgst,STACK_OF(OPENSSL_STRING) *sigopts,
|
||||
STACK_OF(CONF_VALUE) *policy,
|
||||
CA_DB *db, BIGNUM *serial,char *subj,unsigned long chtype, int multirdn, int email_dn,
|
||||
char *startdate, char *enddate, long days, char *ext_sect,
|
||||
CONF *conf, int verbose, unsigned long certopt,
|
||||
unsigned long nameopt, int default_op, int ext_copy);
|
||||
static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext);
|
||||
static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts,
|
||||
STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial,char *subj,unsigned long chtype, int multirdn,
|
||||
int email_dn, char *startdate, char *enddate, long days, int batch,
|
||||
int verbose, X509_REQ *req, char *ext_sect, CONF *conf,
|
||||
@@ -311,6 +315,7 @@ int MAIN(int argc, char **argv)
|
||||
const EVP_MD *dgst=NULL;
|
||||
STACK_OF(CONF_VALUE) *attribs=NULL;
|
||||
STACK_OF(X509) *cert_sk=NULL;
|
||||
STACK_OF(OPENSSL_STRING) *sigopts = NULL;
|
||||
#undef BSIZE
|
||||
#define BSIZE 256
|
||||
MS_STATIC char buf[3][BSIZE];
|
||||
@@ -435,6 +440,15 @@ EF_ALIGNMENT=0;
|
||||
if (--argc < 1) goto bad;
|
||||
outdir= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-sigopt") == 0)
|
||||
{
|
||||
if (--argc < 1)
|
||||
goto bad;
|
||||
if (!sigopts)
|
||||
sigopts = sk_OPENSSL_STRING_new_null();
|
||||
if (!sigopts || !sk_OPENSSL_STRING_push(sigopts, *(++argv)))
|
||||
goto bad;
|
||||
}
|
||||
else if (strcmp(*argv,"-notext") == 0)
|
||||
notext=1;
|
||||
else if (strcmp(*argv,"-batch") == 0)
|
||||
@@ -689,7 +703,7 @@ bad:
|
||||
ERR_clear_error();
|
||||
#ifdef RL_DEBUG
|
||||
if (!p)
|
||||
BIO_printf(bio_err, "DEBUG: unique_subject undefined\n", p);
|
||||
BIO_printf(bio_err, "DEBUG: unique_subject undefined\n");
|
||||
#endif
|
||||
#ifdef RL_DEBUG
|
||||
BIO_printf(bio_err, "DEBUG: configured unique_subject is %d\n",
|
||||
@@ -1170,8 +1184,9 @@ bad:
|
||||
if (spkac_file != NULL)
|
||||
{
|
||||
total++;
|
||||
j=certify_spkac(&x,spkac_file,pkey,x509,dgst,attribs,db,
|
||||
serial,subj,chtype,multirdn,email_dn,startdate,enddate,days,extensions,
|
||||
j=certify_spkac(&x,spkac_file,pkey,x509,dgst,sigopts,
|
||||
attribs,db, serial,subj,chtype,multirdn,
|
||||
email_dn,startdate,enddate,days,extensions,
|
||||
conf,verbose,certopt,nameopt,default_op,ext_copy);
|
||||
if (j < 0) goto err;
|
||||
if (j > 0)
|
||||
@@ -1194,7 +1209,8 @@ bad:
|
||||
if (ss_cert_file != NULL)
|
||||
{
|
||||
total++;
|
||||
j=certify_cert(&x,ss_cert_file,pkey,x509,dgst,attribs,
|
||||
j=certify_cert(&x,ss_cert_file,pkey,x509,dgst,sigopts,
|
||||
attribs,
|
||||
db,serial,subj,chtype,multirdn,email_dn,startdate,enddate,days,batch,
|
||||
extensions,conf,verbose, certopt, nameopt,
|
||||
default_op, ext_copy, e);
|
||||
@@ -1214,7 +1230,7 @@ bad:
|
||||
if (infile != NULL)
|
||||
{
|
||||
total++;
|
||||
j=certify(&x,infile,pkey,x509p,dgst,attribs,db,
|
||||
j=certify(&x,infile,pkey,x509p,dgst,sigopts, attribs,db,
|
||||
serial,subj,chtype,multirdn,email_dn,startdate,enddate,days,batch,
|
||||
extensions,conf,verbose, certopt, nameopt,
|
||||
default_op, ext_copy, selfsign);
|
||||
@@ -1234,7 +1250,7 @@ bad:
|
||||
for (i=0; i<argc; i++)
|
||||
{
|
||||
total++;
|
||||
j=certify(&x,argv[i],pkey,x509p,dgst,attribs,db,
|
||||
j=certify(&x,argv[i],pkey,x509p,dgst,sigopts,attribs,db,
|
||||
serial,subj,chtype,multirdn,email_dn,startdate,enddate,days,batch,
|
||||
extensions,conf,verbose, certopt, nameopt,
|
||||
default_op, ext_copy, selfsign);
|
||||
@@ -1392,6 +1408,7 @@ bad:
|
||||
if (!NCONF_get_number(conf,section,
|
||||
ENV_DEFAULT_CRL_HOURS, &crlhours))
|
||||
crlhours = 0;
|
||||
ERR_clear_error();
|
||||
}
|
||||
if ((crldays == 0) && (crlhours == 0) && (crlsec == 0))
|
||||
{
|
||||
@@ -1483,7 +1500,7 @@ bad:
|
||||
crlnumber = NULL;
|
||||
}
|
||||
|
||||
if (!X509_CRL_sign(crl,pkey,dgst)) goto err;
|
||||
if (!do_X509_CRL_sign(bio_err,crl,pkey,dgst,sigopts)) goto err;
|
||||
|
||||
PEM_write_bio_X509_CRL(Sout,crl);
|
||||
|
||||
@@ -1537,6 +1554,8 @@ err:
|
||||
BN_free(serial);
|
||||
BN_free(crlnumber);
|
||||
free_index(db);
|
||||
if (sigopts)
|
||||
sk_OPENSSL_STRING_free(sigopts);
|
||||
EVP_PKEY_free(pkey);
|
||||
if (x509) X509_free(x509);
|
||||
X509_CRL_free(crl);
|
||||
@@ -1553,8 +1572,10 @@ static void lookup_fail(const char *name, const char *tag)
|
||||
}
|
||||
|
||||
static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db,
|
||||
BIGNUM *serial, char *subj,unsigned long chtype, int multirdn, int email_dn, char *startdate, char *enddate,
|
||||
const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts,
|
||||
STACK_OF(CONF_VALUE) *policy, CA_DB *db,
|
||||
BIGNUM *serial, char *subj,unsigned long chtype, int multirdn,
|
||||
int email_dn, char *startdate, char *enddate,
|
||||
long days, int batch, char *ext_sect, CONF *lconf, int verbose,
|
||||
unsigned long certopt, unsigned long nameopt, int default_op,
|
||||
int ext_copy, int selfsign)
|
||||
@@ -1612,7 +1633,8 @@ static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
else
|
||||
BIO_printf(bio_err,"Signature ok\n");
|
||||
|
||||
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,chtype,multirdn, email_dn,
|
||||
ok=do_body(xret,pkey,x509,dgst,sigopts, policy,db,serial,subj,chtype,
|
||||
multirdn, email_dn,
|
||||
startdate,enddate,days,batch,verbose,req,ext_sect,lconf,
|
||||
certopt, nameopt, default_op, ext_copy, selfsign);
|
||||
|
||||
@@ -1623,7 +1645,8 @@ err:
|
||||
}
|
||||
|
||||
static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db,
|
||||
const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts,
|
||||
STACK_OF(CONF_VALUE) *policy, CA_DB *db,
|
||||
BIGNUM *serial, char *subj, unsigned long chtype, int multirdn, int email_dn, char *startdate, char *enddate,
|
||||
long days, int batch, char *ext_sect, CONF *lconf, int verbose,
|
||||
unsigned long certopt, unsigned long nameopt, int default_op,
|
||||
@@ -1666,7 +1689,7 @@ static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
if ((rreq=X509_to_X509_REQ(req,NULL,EVP_md5())) == NULL)
|
||||
goto err;
|
||||
|
||||
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,chtype,multirdn,email_dn,startdate,enddate,
|
||||
ok=do_body(xret,pkey,x509,dgst,sigopts,policy,db,serial,subj,chtype,multirdn,email_dn,startdate,enddate,
|
||||
days,batch,verbose,rreq,ext_sect,lconf, certopt, nameopt, default_op,
|
||||
ext_copy, 0);
|
||||
|
||||
@@ -1677,7 +1700,8 @@ err:
|
||||
}
|
||||
|
||||
static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||
STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts, STACK_OF(CONF_VALUE) *policy,
|
||||
CA_DB *db, BIGNUM *serial, char *subj,
|
||||
unsigned long chtype, int multirdn,
|
||||
int email_dn, char *startdate, char *enddate, long days, int batch,
|
||||
int verbose, X509_REQ *req, char *ext_sect, CONF *lconf,
|
||||
@@ -2148,7 +2172,7 @@ again2:
|
||||
EVP_PKEY_copy_parameters(pktmp,pkey);
|
||||
EVP_PKEY_free(pktmp);
|
||||
|
||||
if (!X509_sign(ret,pkey,dgst))
|
||||
if (!do_X509_sign(bio_err, ret,pkey,dgst, sigopts))
|
||||
goto err;
|
||||
|
||||
/* We now just add it to the database */
|
||||
@@ -2242,7 +2266,8 @@ static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext)
|
||||
}
|
||||
|
||||
static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, CA_DB *db,
|
||||
const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts,
|
||||
STACK_OF(CONF_VALUE) *policy, CA_DB *db,
|
||||
BIGNUM *serial, char *subj,unsigned long chtype, int multirdn, int email_dn, char *startdate, char *enddate,
|
||||
long days, char *ext_sect, CONF *lconf, int verbose, unsigned long certopt,
|
||||
unsigned long nameopt, int default_op, int ext_copy)
|
||||
@@ -2368,9 +2393,9 @@ static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
|
||||
X509_REQ_set_pubkey(req,pktmp);
|
||||
EVP_PKEY_free(pktmp);
|
||||
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,subj,chtype,multirdn,email_dn,startdate,enddate,
|
||||
days,1,verbose,req,ext_sect,lconf, certopt, nameopt, default_op,
|
||||
ext_copy, 0);
|
||||
ok=do_body(xret,pkey,x509,dgst,sigopts,policy,db,serial,subj,chtype,
|
||||
multirdn,email_dn,startdate,enddate, days,1,verbose,req,
|
||||
ext_sect,lconf, certopt, nameopt, default_op, ext_copy, 0);
|
||||
err:
|
||||
if (req != NULL) X509_REQ_free(req);
|
||||
if (parms != NULL) CONF_free(parms);
|
||||
|
||||
@@ -190,7 +190,7 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
if (Verbose)
|
||||
{
|
||||
unsigned long id = c->id;
|
||||
unsigned long id = SSL_CIPHER_get_id(c);
|
||||
int id0 = (int)(id >> 24);
|
||||
int id1 = (int)((id >> 16) & 0xffL);
|
||||
int id2 = (int)((id >> 8) & 0xffL);
|
||||
|
||||
@@ -1,24 +1,52 @@
|
||||
issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
|
||||
subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Client test cert (512 bit)
|
||||
subject= C = UK, O = OpenSSL Group, OU = FOR TESTING PURPOSES ONLY, CN = Test Client Cert
|
||||
issuer= C = UK, O = OpenSSL Group, OU = FOR TESTING PURPOSES ONLY, CN = OpenSSL Test Intermediate CA
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB6TCCAVICAQIwDQYJKoZIhvcNAQEEBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV
|
||||
BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD
|
||||
VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNOTcwNjA5MTM1NzU2WhcNOTgwNjA5
|
||||
MTM1NzU2WjBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG
|
||||
A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGkNsaWVudCB0ZXN0IGNl
|
||||
cnQgKDUxMiBiaXQpMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALtv55QyzG6i2Plw
|
||||
Z1pah7++Gv8L5j6Hnyr/uTZE1NLG0ABDDexmq/R4KedLjFEIYjocDui+IXs62NNt
|
||||
XrT8odkCAwEAATANBgkqhkiG9w0BAQQFAAOBgQBwtMmI7oGUG8nKmftQssATViH5
|
||||
NRRtoEw07DxJp/LfatHdrhqQB73eGdL5WILZJXk46Xz2e9WMSUjVCSYhdKxtflU3
|
||||
UR2Ajv1Oo0sTNdfz0wDqJNirLNtzyhhsaq8qMTrLwXrCP31VxBiigFSQSUFnZyTE
|
||||
9TKwhS4GlwbtCfxSKQ==
|
||||
MIID5zCCAs+gAwIBAgIJALnu1NlVpZ6yMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNV
|
||||
BAYTAlVLMRYwFAYDVQQKDA1PcGVuU1NMIEdyb3VwMSIwIAYDVQQLDBlGT1IgVEVT
|
||||
VElORyBQVVJQT1NFUyBPTkxZMSUwIwYDVQQDDBxPcGVuU1NMIFRlc3QgSW50ZXJt
|
||||
ZWRpYXRlIENBMB4XDTExMTIwODE0MDE0OFoXDTIxMTAxNjE0MDE0OFowZDELMAkG
|
||||
A1UEBhMCVUsxFjAUBgNVBAoMDU9wZW5TU0wgR3JvdXAxIjAgBgNVBAsMGUZPUiBU
|
||||
RVNUSU5HIFBVUlBPU0VTIE9OTFkxGTAXBgNVBAMMEFRlc3QgQ2xpZW50IENlcnQw
|
||||
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0ranbHRLcLVqN+0BzcZpY
|
||||
+yOLqxzDWT1LD9eW1stC4NzXX9/DCtSIVyN7YIHdGLrIPr64IDdXXaMRzgZ2rOKs
|
||||
lmHCAiFpO/ja99gGCJRxH0xwQatqAULfJVHeUhs7OEGOZc2nWifjqKvGfNTilP7D
|
||||
nwi69ipQFq9oS19FmhwVHk2wg7KZGHI1qDyG04UrfCZMRitvS9+UVhPpIPjuiBi2
|
||||
x3/FZIpL5gXJvvFK6xHY63oq2asyzBATntBgnP4qJFWWcvRx24wF1PnZabxuVoL2
|
||||
bPnQ/KvONDrw3IdqkKhYNTul7jEcu3OlcZIMw+7DiaKJLAzKb/bBF5gm/pwW6As9
|
||||
AgMBAAGjgY8wgYwwDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCBeAwLAYJYIZI
|
||||
AYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQW
|
||||
BBSZHKyLoTh7Mb409Zn/mK1ceSDAjDAfBgNVHSMEGDAWgBQ2w2yI55X+sL3szj49
|
||||
hqshgYfa2jANBgkqhkiG9w0BAQUFAAOCAQEAD0mL7PtPYgCEuDyOQSbLpeND5hVS
|
||||
curxQdGnrJ6Acrhodb7E9ccATokeb0PLx6HBLQUicxhTZIQ9FbO43YkQcOU6C3BB
|
||||
IlwskqmtN6+VmrQzNolHCDzvxNZs9lYL2VbGPGqVRyjZeHpoAlf9cQr8PgDb4d4b
|
||||
vUx2KAhHQvV2nkmYvKyXcgnRuHggumF87mkxidriGAEFwH4qfOqetUg64WyxP7P2
|
||||
QLipm04SyQa7ONtIApfVXgHcE42Py4/f4arzCzMjKe3VyhGkS7nsT55X/fWgTaRm
|
||||
CQPkO+H94P958WTvQDt77bQ+D3IvYaVvfil8n6HJMOJfFT0LJuSUbpSXJg==
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIBOwIBAAJBALtv55QyzG6i2PlwZ1pah7++Gv8L5j6Hnyr/uTZE1NLG0ABDDexm
|
||||
q/R4KedLjFEIYjocDui+IXs62NNtXrT8odkCAwEAAQJAbwXq0vJ/+uyEvsNgxLko
|
||||
/V86mGXQ/KrSkeKlL0r4ENxjcyeMAGoKu6J9yMY7+X9+Zm4nxShNfTsf/+Freoe1
|
||||
HQIhAPOSm5Q1YI+KIsII2GeVJx1U69+wnd71OasIPakS1L1XAiEAxQAW+J3/JWE0
|
||||
ftEYakbhUOKL8tD1OaFZS71/5GdG7E8CIQCefUMmySSvwd6kC0VlATSWbW+d+jp/
|
||||
nWmM1KvqnAo5uQIhALqEADu5U1Wvt8UN8UDGBRPQulHWNycuNV45d3nnskWPAiAw
|
||||
ueTyr6WsZ5+SD8g/Hy3xuvF3nPmJRH+rwvVihlcFOg==
|
||||
MIIEpQIBAAKCAQEAtK2p2x0S3C1ajftAc3GaWPsji6scw1k9Sw/XltbLQuDc11/f
|
||||
wwrUiFcje2CB3Ri6yD6+uCA3V12jEc4GdqzirJZhwgIhaTv42vfYBgiUcR9McEGr
|
||||
agFC3yVR3lIbOzhBjmXNp1on46irxnzU4pT+w58IuvYqUBavaEtfRZocFR5NsIOy
|
||||
mRhyNag8htOFK3wmTEYrb0vflFYT6SD47ogYtsd/xWSKS+YFyb7xSusR2Ot6Ktmr
|
||||
MswQE57QYJz+KiRVlnL0cduMBdT52Wm8blaC9mz50PyrzjQ68NyHapCoWDU7pe4x
|
||||
HLtzpXGSDMPuw4miiSwMym/2wReYJv6cFugLPQIDAQABAoIBAAZOyc9MhIwLSU4L
|
||||
p4RgQvM4UVVe8/Id+3XTZ8NsXExJbWxXfIhiqGjaIfL8u4vsgRjcl+v1s/jo2/iT
|
||||
KMab4o4D8gXD7UavQVDjtjb/ta79WL3SjRl2Uc9YjjMkyq6WmDNQeo2NKDdafCTB
|
||||
1uzSJtLNipB8Z53ELPuHJhxX9QMHrMnuha49riQgXZ7buP9iQrHJFhImBjSzbxJx
|
||||
L+TI6rkyLSf9Wi0Pd3L27Ob3QWNfNRYNSeTE+08eSRChkur5W0RuXAcuAICdQlCl
|
||||
LBvWO/LmmvbzCqiDcgy/TliSb6CGGwgiNG7LJZmlkYNj8laGwalNlYZs3UrVv6NO
|
||||
Br2loAECgYEA2kvCvPGj0Dg/6g7WhXDvAkEbcaL1tSeCxBbNH+6HS2UWMWvyTtCn
|
||||
/bbD519QIdkvayy1QjEf32GV/UjUVmlULMLBcDy0DGjtL3+XpIhLKWDNxN1v1/ai
|
||||
1oz23ZJCOgnk6K4qtFtlRS1XtynjA+rBetvYvLP9SKeFrnpzCgaA2r0CgYEA0+KX
|
||||
1ACXDTNH5ySX3kMjSS9xdINf+OOw4CvPHFwbtc9aqk2HePlEsBTz5I/W3rKwXva3
|
||||
NqZ/bRqVVeZB/hHKFywgdUQk2Uc5z/S7Lw70/w1HubNTXGU06Ngb6zOFAo/o/TwZ
|
||||
zTP1BMIKSOB6PAZPS3l+aLO4FRIRotfFhgRHOoECgYEAmiZbqt8cJaJDB/5YYDzC
|
||||
mp3tSk6gIb936Q6M5VqkMYp9pIKsxhk0N8aDCnTU+kIK6SzWBpr3/d9Ecmqmfyq7
|
||||
5SvWO3KyVf0WWK9KH0abhOm2BKm2HBQvI0DB5u8sUx2/hsvOnjPYDISbZ11t0MtK
|
||||
u35Zy89yMYcSsIYJjG/ROCUCgYEAgI2P9G5PNxEP5OtMwOsW84Y3Xat/hPAQFlI+
|
||||
HES+AzbFGWJkeT8zL2nm95tVkFP1sggZ7Kxjz3w7cpx7GX0NkbWSE9O+T51pNASV
|
||||
tN1sQ3p5M+/a+cnlqgfEGJVvc7iAcXQPa3LEi5h2yPR49QYXAgG6cifn3dDSpmwn
|
||||
SUI7PQECgYEApGCIIpSRPLAEHTGmP87RBL1smurhwmy2s/pghkvUkWehtxg0sGHh
|
||||
kuaqDWcskogv+QC0sVdytiLSz8G0DwcEcsHK1Fkyb8A+ayiw6jWJDo2m9+IF4Fww
|
||||
1Te6jFPYDESnbhq7+TLGgHGhtwcu5cnb4vSuYXGXKupZGzoLOBbv1Zw=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
|
||||
35
apps/cms.c
35
apps/cms.c
@@ -136,6 +136,7 @@ int MAIN(int argc, char **argv)
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
unsigned char *secret_key = NULL, *secret_keyid = NULL;
|
||||
unsigned char *pwri_pass = NULL, *pwri_tmp = NULL;
|
||||
size_t secret_keylen = 0, secret_keyidlen = 0;
|
||||
|
||||
ASN1_OBJECT *econtent_type = NULL;
|
||||
@@ -328,6 +329,13 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
secret_keyidlen = (size_t)ltmp;
|
||||
}
|
||||
else if (!strcmp(*args,"-pwri_password"))
|
||||
{
|
||||
if (!args[1])
|
||||
goto argerr;
|
||||
args++;
|
||||
pwri_pass = (unsigned char *)*args;
|
||||
}
|
||||
else if (!strcmp(*args,"-econtent_type"))
|
||||
{
|
||||
if (!args[1])
|
||||
@@ -561,7 +569,7 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
else if (operation == SMIME_DECRYPT)
|
||||
{
|
||||
if (!recipfile && !keyfile && !secret_key)
|
||||
if (!recipfile && !keyfile && !secret_key && !pwri_pass)
|
||||
{
|
||||
BIO_printf(bio_err, "No recipient certificate or key specified\n");
|
||||
badarg = 1;
|
||||
@@ -569,7 +577,7 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
else if (operation == SMIME_ENCRYPT)
|
||||
{
|
||||
if (!*args && !secret_key)
|
||||
if (!*args && !secret_key && !pwri_pass)
|
||||
{
|
||||
BIO_printf(bio_err, "No recipient(s) certificate(s) specified\n");
|
||||
badarg = 1;
|
||||
@@ -919,6 +927,17 @@ int MAIN(int argc, char **argv)
|
||||
secret_key = NULL;
|
||||
secret_keyid = NULL;
|
||||
}
|
||||
if (pwri_pass)
|
||||
{
|
||||
pwri_tmp = (unsigned char *)BUF_strdup((char *)pwri_pass);
|
||||
if (!pwri_tmp)
|
||||
goto end;
|
||||
if (!CMS_add0_recipient_password(cms,
|
||||
-1, NID_undef, NID_undef,
|
||||
pwri_tmp, -1, NULL))
|
||||
goto end;
|
||||
pwri_tmp = NULL;
|
||||
}
|
||||
if (!(flags & CMS_STREAM))
|
||||
{
|
||||
if (!CMS_final(cms, in, NULL, flags))
|
||||
@@ -1047,6 +1066,16 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (pwri_pass)
|
||||
{
|
||||
if (!CMS_decrypt_set1_password(cms, pwri_pass, -1))
|
||||
{
|
||||
BIO_puts(bio_err,
|
||||
"Error decrypting CMS using password\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (!CMS_decrypt(cms, NULL, NULL, indata, out, flags))
|
||||
{
|
||||
BIO_printf(bio_err, "Error decrypting CMS structure\n");
|
||||
@@ -1171,6 +1200,8 @@ end:
|
||||
OPENSSL_free(secret_key);
|
||||
if (secret_keyid)
|
||||
OPENSSL_free(secret_keyid);
|
||||
if (pwri_tmp)
|
||||
OPENSSL_free(pwri_tmp);
|
||||
if (econtent_type)
|
||||
ASN1_OBJECT_free(econtent_type);
|
||||
if (rr)
|
||||
|
||||
6
apps/demoSRP/srp_verifier.txt
Normal file
6
apps/demoSRP/srp_verifier.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
# This is a file that will be filled by the openssl srp routine.
|
||||
# You can initialize the file with additional groups, these are
|
||||
# records starting with a I followed by the g and N values and the id.
|
||||
# The exact values ... you have to dig this out from the source of srp.c
|
||||
# or srp_vfy.c
|
||||
# The last value of an I is used as the default group for new users.
|
||||
1
apps/demoSRP/srp_verifier.txt.attr
Normal file
1
apps/demoSRP/srp_verifier.txt.attr
Normal file
@@ -0,0 +1 @@
|
||||
unique_subject = yes
|
||||
14
apps/dgst.c
14
apps/dgst.c
@@ -127,6 +127,7 @@ int MAIN(int argc, char **argv)
|
||||
#endif
|
||||
char *hmac_key=NULL;
|
||||
char *mac_name=NULL;
|
||||
int non_fips_allow = 0;
|
||||
STACK_OF(OPENSSL_STRING) *sigopts = NULL, *macopts = NULL;
|
||||
|
||||
apps_startup();
|
||||
@@ -215,6 +216,10 @@ int MAIN(int argc, char **argv)
|
||||
out_bin = 1;
|
||||
else if (strcmp(*argv,"-d") == 0)
|
||||
debug=1;
|
||||
else if (!strcmp(*argv,"-fips-fingerprint"))
|
||||
hmac_key = "etaonrishdlcupfm";
|
||||
else if (strcmp(*argv,"-non-fips-allow") == 0)
|
||||
non_fips_allow=1;
|
||||
else if (!strcmp(*argv,"-hmac"))
|
||||
{
|
||||
if (--argc < 1)
|
||||
@@ -268,6 +273,8 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err,"-d to output debug info\n");
|
||||
BIO_printf(bio_err,"-hex output as hex dump\n");
|
||||
BIO_printf(bio_err,"-binary output in binary form\n");
|
||||
BIO_printf(bio_err,"-hmac arg set the HMAC key to arg\n");
|
||||
BIO_printf(bio_err,"-non-fips-allow allow use of non FIPS digest\n");
|
||||
BIO_printf(bio_err,"-sign file sign digest using private key in file\n");
|
||||
BIO_printf(bio_err,"-verify file verify a signature using public key in file\n");
|
||||
BIO_printf(bio_err,"-prverify file verify a signature using private key in file\n");
|
||||
@@ -395,6 +402,13 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (non_fips_allow)
|
||||
{
|
||||
EVP_MD_CTX *md_ctx;
|
||||
BIO_get_md_ctx(bmd,&md_ctx);
|
||||
EVP_MD_CTX_set_flags(md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
|
||||
}
|
||||
|
||||
if (hmac_key)
|
||||
{
|
||||
sigkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, e,
|
||||
|
||||
@@ -326,6 +326,7 @@ bad:
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
ERR_print_errors(bio_err);
|
||||
BIO_printf(bio_err,"Error, DSA key generation failed\n");
|
||||
goto end;
|
||||
}
|
||||
@@ -429,13 +430,19 @@ bad:
|
||||
|
||||
assert(need_rand);
|
||||
if ((dsakey=DSAparams_dup(dsa)) == NULL) goto end;
|
||||
if (!DSA_generate_key(dsakey)) goto end;
|
||||
if (!DSA_generate_key(dsakey))
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
DSA_free(dsakey);
|
||||
goto end;
|
||||
}
|
||||
if (outformat == FORMAT_ASN1)
|
||||
i=i2d_DSAPrivateKey_bio(out,dsakey);
|
||||
else if (outformat == FORMAT_PEM)
|
||||
i=PEM_write_bio_DSAPrivateKey(out,dsakey,NULL,NULL,0,NULL,NULL);
|
||||
else {
|
||||
BIO_printf(bio_err,"bad output format specified for outfile\n");
|
||||
DSA_free(dsakey);
|
||||
goto end;
|
||||
}
|
||||
DSA_free(dsakey);
|
||||
|
||||
20
apps/enc.c
20
apps/enc.c
@@ -131,6 +131,7 @@ int MAIN(int argc, char **argv)
|
||||
char *engine = NULL;
|
||||
#endif
|
||||
const EVP_MD *dgst=NULL;
|
||||
int non_fips_allow = 0;
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -283,6 +284,8 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
md= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-non-fips-allow") == 0)
|
||||
non_fips_allow = 1;
|
||||
else if ((argv[0][0] == '-') &&
|
||||
((c=EVP_get_cipherbyname(&(argv[0][1]))) != NULL))
|
||||
{
|
||||
@@ -330,6 +333,18 @@ bad:
|
||||
setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER)
|
||||
{
|
||||
BIO_printf(bio_err, "AEAD ciphers not supported by the enc utility\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (cipher && (EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE))
|
||||
{
|
||||
BIO_printf(bio_err, "Ciphers in XTS mode are not supported by the enc utility\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (md && (dgst=EVP_get_digestbyname(md)) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"%s is an unsupported message digest type\n",md);
|
||||
@@ -591,6 +606,11 @@ bad:
|
||||
*/
|
||||
|
||||
BIO_get_cipher_ctx(benc, &ctx);
|
||||
|
||||
if (non_fips_allow)
|
||||
EVP_CIPHER_CTX_set_flags(ctx,
|
||||
EVP_CIPH_FLAG_NON_FIPS_ALLOW);
|
||||
|
||||
if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc))
|
||||
{
|
||||
BIO_printf(bio_err, "Error setting cipher %s\n",
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#define DEFBITS 512
|
||||
#define DEFBITS 1024
|
||||
#undef PROG
|
||||
#define PROG genrsa_main
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ $ LIB_OPENSSL = "VERIFY,ASN1PARS,REQ,DGST,DH,DHPARAM,ENC,PASSWD,GENDH,ERRSTR,"+-
|
||||
"X509,GENRSA,GENDSA,GENPKEY,S_SERVER,S_CLIENT,SPEED,"+-
|
||||
"S_TIME,APPS,S_CB,S_SOCKET,APP_RAND,VERSION,SESS_ID,"+-
|
||||
"CIPHERS,NSEQ,PKCS12,PKCS8,PKEY,PKEYPARAM,PKEYUTL,"+ -
|
||||
"SPKAC,SMIME,CMS,RAND,ENGINE,OCSP,PRIME,TS"
|
||||
"SPKAC,SMIME,CMS,RAND,ENGINE,OCSP,PRIME,TS,SRP"
|
||||
$!
|
||||
$ LIB_OPENSSL = LIB_OPENSSL+ ",VMS_DECC_INIT"
|
||||
$!
|
||||
@@ -773,9 +773,12 @@ $ CCDEFS = "MONOLITH"
|
||||
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
|
||||
$ CCEXTRAFLAGS = ""
|
||||
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
|
||||
$ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
|
||||
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
|
||||
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
|
||||
$ CCDISABLEWARNINGS = "" !!! "MAYLOSEDATA3" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
|
||||
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. ""
|
||||
$ THEN
|
||||
$ IF CCDISABLEWARNINGS .NES. "" THEN CCDISABLEWARNINGS = CCDISABLEWARNINGS + ","
|
||||
$ CCDISABLEWARNINGS = CCDISABLEWARNINGS + USER_CCDISABLEWARNINGS
|
||||
$ ENDIF
|
||||
$!
|
||||
$! Check To See If We Have A ZLIB Option.
|
||||
$!
|
||||
@@ -1064,6 +1067,18 @@ $! Finish up the definition of CC.
|
||||
$!
|
||||
$ IF COMPILER .EQS. "DECC"
|
||||
$ 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. ""
|
||||
$ THEN
|
||||
$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
|
||||
|
||||
98
apps/ocsp.c
98
apps/ocsp.c
@@ -583,51 +583,52 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf (bio_err, "OCSP utility\n");
|
||||
BIO_printf (bio_err, "Usage ocsp [options]\n");
|
||||
BIO_printf (bio_err, "where options are\n");
|
||||
BIO_printf (bio_err, "-out file output filename\n");
|
||||
BIO_printf (bio_err, "-issuer file issuer certificate\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, "-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, "-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, "-req_text print text form of request\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, "-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, "-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, "-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, "-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, "-path path to use in OCSP request\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, "-VAfile file validator certificates file\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, "-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, "-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, "-out file output filename\n");
|
||||
BIO_printf (bio_err, "-issuer file issuer certificate\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, "-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, "-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, "-req_text print text form of request\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, "-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, "-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, "-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, "-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, "-path path to use in OCSP request\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, "-VAfile file validator certificates file\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, "-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, "-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_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_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, "-port num port to run responder on\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, "-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, "-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, "-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, "-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, "-<dgst alg> use specified digest in the request\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_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, "-index file certificate status index file\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, "-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, "-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, "-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, "-nrequest n number of requests to accept (default unlimited)\n");
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1398,16 +1399,7 @@ OCSP_RESPONSE *process_responder(BIO *err, OCSP_REQUEST *req,
|
||||
if (use_ssl == 1)
|
||||
{
|
||||
BIO *sbio;
|
||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
||||
ctx = SSL_CTX_new(SSLv23_client_method());
|
||||
#elif !defined(OPENSSL_NO_SSL3)
|
||||
ctx = SSL_CTX_new(SSLv3_client_method());
|
||||
#elif !defined(OPENSSL_NO_SSL2)
|
||||
ctx = SSL_CTX_new(SSLv2_client_method());
|
||||
#else
|
||||
BIO_printf(err, "SSL is disabled\n");
|
||||
goto end;
|
||||
#endif
|
||||
if (ctx == NULL)
|
||||
{
|
||||
BIO_printf(err, "Error creating SSL context.\n");
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
#include "apps.h"
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/x509.h>
|
||||
@@ -129,6 +130,9 @@
|
||||
#include "progs.h"
|
||||
#include "s_apps.h"
|
||||
#include <openssl/err.h>
|
||||
#ifdef OPENSSL_FIPS
|
||||
#include <openssl/fips.h>
|
||||
#endif
|
||||
|
||||
/* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the
|
||||
* base prototypes (we cast each variable inside the function to the required
|
||||
@@ -310,6 +314,19 @@ int main(int Argc, char *ARGV[])
|
||||
CRYPTO_set_locking_callback(lock_dbg_cb);
|
||||
}
|
||||
|
||||
if(getenv("OPENSSL_FIPS")) {
|
||||
#ifdef OPENSSL_FIPS
|
||||
if (!FIPS_mode_set(1)) {
|
||||
ERR_load_crypto_strings();
|
||||
ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE));
|
||||
EXIT(1);
|
||||
}
|
||||
#else
|
||||
fprintf(stderr, "FIPS mode not supported.\n");
|
||||
EXIT(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
apps_startup();
|
||||
|
||||
/* Lets load up our environment a little */
|
||||
@@ -418,9 +435,7 @@ end:
|
||||
if (prog != NULL) lh_FUNCTION_free(prog);
|
||||
if (arg.data != NULL) OPENSSL_free(arg.data);
|
||||
|
||||
apps_shutdown();
|
||||
|
||||
CRYPTO_mem_leaks(bio_err);
|
||||
if (bio_err != NULL)
|
||||
{
|
||||
BIO_free(bio_err);
|
||||
@@ -433,6 +448,9 @@ end:
|
||||
OPENSSL_free(Argv);
|
||||
}
|
||||
#endif
|
||||
apps_shutdown();
|
||||
CRYPTO_mem_leaks(bio_err);
|
||||
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ int MAIN(int argc, char **argv)
|
||||
int maciter = PKCS12_DEFAULT_ITER;
|
||||
int twopass = 0;
|
||||
int keytype = 0;
|
||||
int cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC;
|
||||
int cert_pbe;
|
||||
int key_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
|
||||
int ret = 1;
|
||||
int macver = 1;
|
||||
@@ -130,6 +130,13 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
apps_startup();
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
if (FIPS_mode())
|
||||
cert_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
|
||||
else
|
||||
#endif
|
||||
cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC;
|
||||
|
||||
enc = EVP_des_ede3_cbc();
|
||||
if (bio_err == NULL ) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ extern int engine_main(int argc,char *argv[]);
|
||||
extern int ocsp_main(int argc,char *argv[]);
|
||||
extern int prime_main(int argc,char *argv[]);
|
||||
extern int ts_main(int argc,char *argv[]);
|
||||
extern int srp_main(int argc,char *argv[]);
|
||||
|
||||
#define FUNC_TYPE_GENERAL 1
|
||||
#define FUNC_TYPE_MD 2
|
||||
@@ -147,6 +148,9 @@ FUNCTION functions[] = {
|
||||
#endif
|
||||
{FUNC_TYPE_GENERAL,"prime",prime_main},
|
||||
{FUNC_TYPE_GENERAL,"ts",ts_main},
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
{FUNC_TYPE_GENERAL,"srp",srp_main},
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_MD2
|
||||
{FUNC_TYPE_MD,"md2",dgst_main},
|
||||
#endif
|
||||
|
||||
@@ -51,6 +51,8 @@ foreach (@ARGV)
|
||||
{ print "#ifndef OPENSSL_NO_CMS\n${str}#endif\n"; }
|
||||
elsif ( ($_ =~ /^ocsp$/))
|
||||
{ print "#ifndef OPENSSL_NO_OCSP\n${str}#endif\n"; }
|
||||
elsif ( ($_ =~ /^srp$/))
|
||||
{ print "#ifndef OPENSSL_NO_SRP\n${str}#endif\n"; }
|
||||
else
|
||||
{ print $str; }
|
||||
}
|
||||
|
||||
86
apps/req.c
86
apps/req.c
@@ -165,7 +165,7 @@ int MAIN(int argc, char **argv)
|
||||
EVP_PKEY_CTX *genctx = NULL;
|
||||
const char *keyalg = NULL;
|
||||
char *keyalgstr = NULL;
|
||||
STACK_OF(OPENSSL_STRING) *pkeyopts = NULL;
|
||||
STACK_OF(OPENSSL_STRING) *pkeyopts = NULL, *sigopts = NULL;
|
||||
EVP_PKEY *pkey=NULL;
|
||||
int i=0,badops=0,newreq=0,verbose=0,pkey_type=-1;
|
||||
long newkey = -1;
|
||||
@@ -310,6 +310,15 @@ int MAIN(int argc, char **argv)
|
||||
if (!pkeyopts || !sk_OPENSSL_STRING_push(pkeyopts, *(++argv)))
|
||||
goto bad;
|
||||
}
|
||||
else if (strcmp(*argv,"-sigopt") == 0)
|
||||
{
|
||||
if (--argc < 1)
|
||||
goto bad;
|
||||
if (!sigopts)
|
||||
sigopts = sk_OPENSSL_STRING_new_null();
|
||||
if (!sigopts || !sk_OPENSSL_STRING_push(sigopts, *(++argv)))
|
||||
goto bad;
|
||||
}
|
||||
else if (strcmp(*argv,"-batch") == 0)
|
||||
batch=1;
|
||||
else if (strcmp(*argv,"-newhdr") == 0)
|
||||
@@ -857,8 +866,9 @@ loop:
|
||||
extensions);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!(i=X509_sign(x509ss,pkey,digest)))
|
||||
|
||||
i=do_X509_sign(bio_err, x509ss, pkey, digest, sigopts);
|
||||
if (!i)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
@@ -882,7 +892,8 @@ loop:
|
||||
req_exts);
|
||||
goto end;
|
||||
}
|
||||
if (!(i=X509_REQ_sign(req,pkey,digest)))
|
||||
i=do_X509_REQ_sign(bio_err, req, pkey, digest, sigopts);
|
||||
if (!i)
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
@@ -1083,6 +1094,8 @@ end:
|
||||
EVP_PKEY_CTX_free(genctx);
|
||||
if (pkeyopts)
|
||||
sk_OPENSSL_STRING_free(pkeyopts);
|
||||
if (sigopts)
|
||||
sk_OPENSSL_STRING_free(sigopts);
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (gen_eng)
|
||||
ENGINE_free(gen_eng);
|
||||
@@ -1768,3 +1781,68 @@ static int genpkey_cb(EVP_PKEY_CTX *ctx)
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int do_sign_init(BIO *err, EVP_MD_CTX *ctx, EVP_PKEY *pkey,
|
||||
const EVP_MD *md, STACK_OF(OPENSSL_STRING) *sigopts)
|
||||
{
|
||||
EVP_PKEY_CTX *pkctx = NULL;
|
||||
int i;
|
||||
EVP_MD_CTX_init(ctx);
|
||||
if (!EVP_DigestSignInit(ctx, &pkctx, md, NULL, pkey))
|
||||
return 0;
|
||||
for (i = 0; i < sk_OPENSSL_STRING_num(sigopts); i++)
|
||||
{
|
||||
char *sigopt = sk_OPENSSL_STRING_value(sigopts, i);
|
||||
if (pkey_ctrl_string(pkctx, sigopt) <= 0)
|
||||
{
|
||||
BIO_printf(err, "parameter error \"%s\"\n", sigopt);
|
||||
ERR_print_errors(bio_err);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_X509_sign(BIO *err, X509 *x, EVP_PKEY *pkey, const EVP_MD *md,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts)
|
||||
{
|
||||
int rv;
|
||||
EVP_MD_CTX mctx;
|
||||
EVP_MD_CTX_init(&mctx);
|
||||
rv = do_sign_init(err, &mctx, pkey, md, sigopts);
|
||||
if (rv > 0)
|
||||
rv = X509_sign_ctx(x, &mctx);
|
||||
EVP_MD_CTX_cleanup(&mctx);
|
||||
return rv > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
int do_X509_REQ_sign(BIO *err, X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts)
|
||||
{
|
||||
int rv;
|
||||
EVP_MD_CTX mctx;
|
||||
EVP_MD_CTX_init(&mctx);
|
||||
rv = do_sign_init(err, &mctx, pkey, md, sigopts);
|
||||
if (rv > 0)
|
||||
rv = X509_REQ_sign_ctx(x, &mctx);
|
||||
EVP_MD_CTX_cleanup(&mctx);
|
||||
return rv > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int do_X509_CRL_sign(BIO *err, X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts)
|
||||
{
|
||||
int rv;
|
||||
EVP_MD_CTX mctx;
|
||||
EVP_MD_CTX_init(&mctx);
|
||||
rv = do_sign_init(err, &mctx, pkey, md, sigopts);
|
||||
if (rv > 0)
|
||||
rv = X509_CRL_sign_ctx(x, &mctx);
|
||||
EVP_MD_CTX_cleanup(&mctx);
|
||||
return rv > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
84
apps/s_cb.c
84
apps/s_cb.c
@@ -237,8 +237,8 @@ int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file)
|
||||
|
||||
/* If we are using DSA, we can copy the parameters from
|
||||
* the private key */
|
||||
|
||||
|
||||
|
||||
|
||||
/* Now we know that a key and cert have been set against
|
||||
* the SSL context */
|
||||
if (!SSL_CTX_check_private_key(ctx))
|
||||
@@ -357,6 +357,12 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||
case TLS1_VERSION:
|
||||
str_version = "TLS 1.0 ";
|
||||
break;
|
||||
case TLS1_1_VERSION:
|
||||
str_version = "TLS 1.1 ";
|
||||
break;
|
||||
case TLS1_2_VERSION:
|
||||
str_version = "TLS 1.2 ";
|
||||
break;
|
||||
case DTLS1_VERSION:
|
||||
str_version = "DTLS 1.0 ";
|
||||
break;
|
||||
@@ -430,6 +436,8 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||
|
||||
if (version == SSL3_VERSION ||
|
||||
version == TLS1_VERSION ||
|
||||
version == TLS1_1_VERSION ||
|
||||
version == TLS1_2_VERSION ||
|
||||
version == DTLS1_VERSION ||
|
||||
version == DTLS1_BAD_VER)
|
||||
{
|
||||
@@ -549,6 +557,9 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||
case 114:
|
||||
str_details2 = " bad_certificate_hash_value";
|
||||
break;
|
||||
case 115:
|
||||
str_details2 = " unknown_psk_identity";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -597,6 +608,26 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_HEARTBEATS
|
||||
if (content_type == 24) /* Heartbeat */
|
||||
{
|
||||
str_details1 = ", Heartbeat";
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
switch (((const unsigned char*)buf)[0])
|
||||
{
|
||||
case 1:
|
||||
str_details1 = ", HeartbeatRequest";
|
||||
break;
|
||||
case 2:
|
||||
str_details1 = ", HeartbeatResponse";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
BIO_printf(bio, "%s %s%s [length %04lx]%s%s\n", str_write_p, str_version, str_content_type, (unsigned long)len, str_details1, str_details2);
|
||||
@@ -657,6 +688,22 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
|
||||
extname = "status request";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_user_mapping:
|
||||
extname = "user mapping";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_client_authz:
|
||||
extname = "client authz";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_server_authz:
|
||||
extname = "server authz";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_cert_type:
|
||||
extname = "cert type";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_elliptic_curves:
|
||||
extname = "elliptic curves";
|
||||
break;
|
||||
@@ -665,12 +712,28 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
|
||||
extname = "EC point formats";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_session_ticket:
|
||||
extname = "server ticket";
|
||||
case TLSEXT_TYPE_srp:
|
||||
extname = "SRP";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_renegotiate:
|
||||
extname = "renegotiate";
|
||||
case TLSEXT_TYPE_signature_algorithms:
|
||||
extname = "signature algorithms";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_use_srtp:
|
||||
extname = "use SRTP";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_heartbeat:
|
||||
extname = "heartbeat";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_session_ticket:
|
||||
extname = "session ticket";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_renegotiate:
|
||||
extname = "renegotiation info";
|
||||
break;
|
||||
|
||||
#ifdef TLSEXT_TYPE_opaque_prf_input
|
||||
@@ -678,6 +741,15 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
|
||||
extname = "opaque PRF input";
|
||||
break;
|
||||
#endif
|
||||
#ifdef TLSEXT_TYPE_next_proto_neg
|
||||
case TLSEXT_TYPE_next_proto_neg:
|
||||
extname = "next protocol";
|
||||
break;
|
||||
#endif
|
||||
|
||||
case TLSEXT_TYPE_padding:
|
||||
extname = "TLS padding";
|
||||
break;
|
||||
|
||||
default:
|
||||
extname = "unknown";
|
||||
|
||||
419
apps/s_client.c
419
apps/s_client.c
@@ -163,6 +163,9 @@ typedef unsigned int u_int;
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/ocsp.h>
|
||||
#include <openssl/bn.h>
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
#include <openssl/srp.h>
|
||||
#endif
|
||||
#include "s_apps.h"
|
||||
#include "timeouts.h"
|
||||
|
||||
@@ -203,6 +206,9 @@ static int c_status_req=0;
|
||||
static int c_msg=0;
|
||||
static int c_showcerts=0;
|
||||
|
||||
static char *keymatexportlabel=NULL;
|
||||
static int keymatexportlen=20;
|
||||
|
||||
static void sc_usage(void);
|
||||
static void print_stuff(BIO *berr,SSL *con,int full);
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
@@ -317,13 +323,25 @@ static void sc_usage(void)
|
||||
# ifndef OPENSSL_NO_JPAKE
|
||||
BIO_printf(bio_err," -jpake arg - JPAKE secret to use\n");
|
||||
# endif
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
BIO_printf(bio_err," -srpuser user - SRP authentification for 'user'\n");
|
||||
BIO_printf(bio_err," -srppass arg - password for 'user'\n");
|
||||
BIO_printf(bio_err," -srp_lateuser - SRP username into second ClientHello message\n");
|
||||
BIO_printf(bio_err," -srp_moregroups - Tolerate other than the known g N values.\n");
|
||||
BIO_printf(bio_err," -srp_strength int - minimal length in bits for N (default %d).\n",SRP_MINIMAL_N);
|
||||
#endif
|
||||
BIO_printf(bio_err," -ssl2 - just use SSLv2\n");
|
||||
#ifndef OPENSSL_NO_SSL3_METHOD
|
||||
BIO_printf(bio_err," -ssl3 - just use SSLv3\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -tls1_2 - just use TLSv1.2\n");
|
||||
BIO_printf(bio_err," -tls1_1 - just use TLSv1.1\n");
|
||||
BIO_printf(bio_err," -tls1 - just use TLSv1\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," -no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n");
|
||||
BIO_printf(bio_err," -no_tls1_2/-no_tls1_1/-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," -serverpref - Use server's cipher preferences (only SSLv2)\n");
|
||||
BIO_printf(bio_err," -cipher - preferred cipher to use, use the 'openssl ciphers'\n");
|
||||
@@ -344,8 +362,16 @@ static void sc_usage(void)
|
||||
BIO_printf(bio_err," -tlsextdebug - hex dump of all TLS extensions received\n");
|
||||
BIO_printf(bio_err," -status - request certificate status from server\n");
|
||||
BIO_printf(bio_err," -no_ticket - disable use of RFC4507bis session tickets\n");
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
BIO_printf(bio_err," -nextprotoneg arg - enable NPN extension, considering named protocols supported (comma-separated list)\n");
|
||||
# endif
|
||||
#endif
|
||||
BIO_printf(bio_err," -legacy_renegotiation - enable use of legacy renegotiation (dangerous)\n");
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
BIO_printf(bio_err," -use_srtp profiles - Offer SRTP key management with a colon-separated profile list\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -keymatexport label - Export keying material using label\n");
|
||||
BIO_printf(bio_err," -keymatexportlen len - Export len bytes of keying material (default 20)\n");
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
@@ -368,6 +394,158 @@ static int MS_CALLBACK ssl_servername_cb(SSL *s, int *ad, void *arg)
|
||||
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
|
||||
/* This is a context that we pass to all callbacks */
|
||||
typedef struct srp_arg_st
|
||||
{
|
||||
char *srppassin;
|
||||
char *srplogin;
|
||||
int msg; /* copy from c_msg */
|
||||
int debug; /* copy from c_debug */
|
||||
int amp; /* allow more groups */
|
||||
int strength /* minimal size for N */ ;
|
||||
} SRP_ARG;
|
||||
|
||||
#define SRP_NUMBER_ITERATIONS_FOR_PRIME 64
|
||||
|
||||
static int srp_Verify_N_and_g(BIGNUM *N, BIGNUM *g)
|
||||
{
|
||||
BN_CTX *bn_ctx = BN_CTX_new();
|
||||
BIGNUM *p = BN_new();
|
||||
BIGNUM *r = BN_new();
|
||||
int ret =
|
||||
g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) &&
|
||||
BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) &&
|
||||
p != NULL && BN_rshift1(p, N) &&
|
||||
|
||||
/* p = (N-1)/2 */
|
||||
BN_is_prime_ex(p, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) &&
|
||||
r != NULL &&
|
||||
|
||||
/* verify g^((N-1)/2) == -1 (mod N) */
|
||||
BN_mod_exp(r, g, p, N, bn_ctx) &&
|
||||
BN_add_word(r, 1) &&
|
||||
BN_cmp(r, N) == 0;
|
||||
|
||||
if(r)
|
||||
BN_free(r);
|
||||
if(p)
|
||||
BN_free(p);
|
||||
if(bn_ctx)
|
||||
BN_CTX_free(bn_ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* This callback is used here for two purposes:
|
||||
- extended debugging
|
||||
- making some primality tests for unknown groups
|
||||
The callback is only called for a non default group.
|
||||
|
||||
An application does not need the call back at all if
|
||||
only the stanard groups are used. In real life situations,
|
||||
client and server already share well known groups,
|
||||
thus there is no need to verify them.
|
||||
Furthermore, in case that a server actually proposes a group that
|
||||
is not one of those defined in RFC 5054, it is more appropriate
|
||||
to add the group to a static list and then compare since
|
||||
primality tests are rather cpu consuming.
|
||||
*/
|
||||
|
||||
static int MS_CALLBACK ssl_srp_verify_param_cb(SSL *s, void *arg)
|
||||
{
|
||||
SRP_ARG *srp_arg = (SRP_ARG *)arg;
|
||||
BIGNUM *N = NULL, *g = NULL;
|
||||
if (!(N = SSL_get_srp_N(s)) || !(g = SSL_get_srp_g(s)))
|
||||
return 0;
|
||||
if (srp_arg->debug || srp_arg->msg || srp_arg->amp == 1)
|
||||
{
|
||||
BIO_printf(bio_err, "SRP parameters:\n");
|
||||
BIO_printf(bio_err,"\tN="); BN_print(bio_err,N);
|
||||
BIO_printf(bio_err,"\n\tg="); BN_print(bio_err,g);
|
||||
BIO_printf(bio_err,"\n");
|
||||
}
|
||||
|
||||
if (SRP_check_known_gN_param(g,N))
|
||||
return 1;
|
||||
|
||||
if (srp_arg->amp == 1)
|
||||
{
|
||||
if (srp_arg->debug)
|
||||
BIO_printf(bio_err, "SRP param N and g are not known params, going to check deeper.\n");
|
||||
|
||||
/* The srp_moregroups is a real debugging feature.
|
||||
Implementors should rather add the value to the known ones.
|
||||
The minimal size has already been tested.
|
||||
*/
|
||||
if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N,g))
|
||||
return 1;
|
||||
}
|
||||
BIO_printf(bio_err, "SRP param N and g rejected.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define PWD_STRLEN 1024
|
||||
|
||||
static char * MS_CALLBACK ssl_give_srp_client_pwd_cb(SSL *s, void *arg)
|
||||
{
|
||||
SRP_ARG *srp_arg = (SRP_ARG *)arg;
|
||||
char *pass = (char *)OPENSSL_malloc(PWD_STRLEN+1);
|
||||
PW_CB_DATA cb_tmp;
|
||||
int l;
|
||||
|
||||
cb_tmp.password = (char *)srp_arg->srppassin;
|
||||
cb_tmp.prompt_info = "SRP user";
|
||||
if ((l = password_callback(pass, PWD_STRLEN, 0, &cb_tmp))<0)
|
||||
{
|
||||
BIO_printf (bio_err, "Can't read Password\n");
|
||||
OPENSSL_free(pass);
|
||||
return NULL;
|
||||
}
|
||||
*(pass+l)= '\0';
|
||||
|
||||
return pass;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
char *srtp_profiles = NULL;
|
||||
#endif
|
||||
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
/* This the context that we pass to next_proto_cb */
|
||||
typedef struct tlsextnextprotoctx_st {
|
||||
unsigned char *data;
|
||||
unsigned short len;
|
||||
int status;
|
||||
} tlsextnextprotoctx;
|
||||
|
||||
static tlsextnextprotoctx next_proto;
|
||||
|
||||
static int next_proto_cb(SSL *s, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
|
||||
{
|
||||
tlsextnextprotoctx *ctx = arg;
|
||||
|
||||
if (!c_quiet)
|
||||
{
|
||||
/* We can assume that |in| is syntactically valid. */
|
||||
unsigned i;
|
||||
BIO_printf(bio_c_out, "Protocols advertised by server: ");
|
||||
for (i = 0; i < inlen; )
|
||||
{
|
||||
if (i)
|
||||
BIO_write(bio_c_out, ", ", 2);
|
||||
BIO_write(bio_c_out, &in[i + 1], in[i]);
|
||||
i += in[i] + 1;
|
||||
}
|
||||
BIO_write(bio_c_out, "\n", 1);
|
||||
}
|
||||
|
||||
ctx->status = SSL_select_next_proto(out, outlen, in, inlen, ctx->data, ctx->len);
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
# endif /* ndef OPENSSL_NO_NEXTPROTONEG */
|
||||
#endif
|
||||
|
||||
enum
|
||||
@@ -386,6 +564,9 @@ int MAIN(int argc, char **argv)
|
||||
{
|
||||
unsigned int off=0, clr=0;
|
||||
SSL *con=NULL;
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
KSSL_CTX *kctx;
|
||||
#endif
|
||||
int s,k,width,state=0;
|
||||
char *cbuf=NULL,*sbuf=NULL,*mbuf=NULL;
|
||||
int cbuf_len,cbuf_off;
|
||||
@@ -431,16 +612,25 @@ int MAIN(int argc, char **argv)
|
||||
char *servername = NULL;
|
||||
tlsextctx tlsextcbp =
|
||||
{NULL,0};
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
const char *next_proto_neg_in = NULL;
|
||||
# endif
|
||||
#endif
|
||||
char *sess_in = NULL;
|
||||
char *sess_out = NULL;
|
||||
struct sockaddr peer;
|
||||
int peerlen = sizeof(peer);
|
||||
int fallback_scsv = 0;
|
||||
int enable_timeouts = 0 ;
|
||||
long socket_mtu = 0;
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
char *jpake_secret = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
char * srppass = NULL;
|
||||
int srp_lateuser = 0;
|
||||
SRP_ARG srp_arg = {NULL,NULL,0,0,0,1024};
|
||||
#endif
|
||||
|
||||
meth=SSLv23_client_method();
|
||||
|
||||
@@ -584,15 +774,50 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
else if (strcmp(*argv,"-srpuser") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
srp_arg.srplogin= *(++argv);
|
||||
meth=TLSv1_client_method();
|
||||
}
|
||||
else if (strcmp(*argv,"-srppass") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
srppass= *(++argv);
|
||||
meth=TLSv1_client_method();
|
||||
}
|
||||
else if (strcmp(*argv,"-srp_strength") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
srp_arg.strength=atoi(*(++argv));
|
||||
BIO_printf(bio_err,"SRP minimal length for N is %d\n",srp_arg.strength);
|
||||
meth=TLSv1_client_method();
|
||||
}
|
||||
else if (strcmp(*argv,"-srp_lateuser") == 0)
|
||||
{
|
||||
srp_lateuser= 1;
|
||||
meth=TLSv1_client_method();
|
||||
}
|
||||
else if (strcmp(*argv,"-srp_moregroups") == 0)
|
||||
{
|
||||
srp_arg.amp=1;
|
||||
meth=TLSv1_client_method();
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
else if (strcmp(*argv,"-ssl2") == 0)
|
||||
meth=SSLv2_client_method();
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SSL3
|
||||
#ifndef OPENSSL_NO_SSL3_METHOD
|
||||
else if (strcmp(*argv,"-ssl3") == 0)
|
||||
meth=SSLv3_client_method();
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_TLS1
|
||||
else if (strcmp(*argv,"-tls1_2") == 0)
|
||||
meth=TLSv1_2_client_method();
|
||||
else if (strcmp(*argv,"-tls1_1") == 0)
|
||||
meth=TLSv1_1_client_method();
|
||||
else if (strcmp(*argv,"-tls1") == 0)
|
||||
meth=TLSv1_client_method();
|
||||
#endif
|
||||
@@ -602,6 +827,10 @@ int MAIN(int argc, char **argv)
|
||||
meth=DTLSv1_client_method();
|
||||
socket_type=SOCK_DGRAM;
|
||||
}
|
||||
else if (strcmp(*argv,"-fallback_scsv") == 0)
|
||||
{
|
||||
fallback_scsv = 1;
|
||||
}
|
||||
else if (strcmp(*argv,"-timeout") == 0)
|
||||
enable_timeouts=1;
|
||||
else if (strcmp(*argv,"-mtu") == 0)
|
||||
@@ -641,6 +870,10 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
CAfile= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-no_tls1_2") == 0)
|
||||
off|=SSL_OP_NO_TLSv1_2;
|
||||
else if (strcmp(*argv,"-no_tls1_1") == 0)
|
||||
off|=SSL_OP_NO_TLSv1_1;
|
||||
else if (strcmp(*argv,"-no_tls1") == 0)
|
||||
off|=SSL_OP_NO_TLSv1;
|
||||
else if (strcmp(*argv,"-no_ssl3") == 0)
|
||||
@@ -652,6 +885,13 @@ int MAIN(int argc, char **argv)
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
else if (strcmp(*argv,"-no_ticket") == 0)
|
||||
{ off|=SSL_OP_NO_TICKET; }
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
else if (strcmp(*argv,"-nextprotoneg") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
next_proto_neg_in = *(++argv);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
else if (strcmp(*argv,"-serverpref") == 0)
|
||||
off|=SSL_OP_CIPHER_SERVER_PREFERENCE;
|
||||
@@ -719,7 +959,25 @@ int MAIN(int argc, char **argv)
|
||||
jpake_secret = *++argv;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
else if (strcmp(*argv,"-use_srtp") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
srtp_profiles = *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-keymatexport") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
keymatexportlabel= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-keymatexportlen") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
keymatexportlen=atoi(*(++argv));
|
||||
if (keymatexportlen == 0) goto bad;
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||
badop=1;
|
||||
@@ -757,6 +1015,21 @@ bad:
|
||||
OpenSSL_add_ssl_algorithms();
|
||||
SSL_load_error_strings();
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
next_proto.status = -1;
|
||||
if (next_proto_neg_in)
|
||||
{
|
||||
next_proto.data = next_protos_parse(&next_proto.len, next_proto_neg_in);
|
||||
if (next_proto.data == NULL)
|
||||
{
|
||||
BIO_printf(bio_err, "Error parsing -nextprotoneg argument\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
else
|
||||
next_proto.data = NULL;
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine_id, 1);
|
||||
if (ssl_client_engine_id)
|
||||
@@ -830,6 +1103,14 @@ bad:
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
if(!app_passwd(bio_err, srppass, NULL, &srp_arg.srppassin, NULL))
|
||||
{
|
||||
BIO_printf(bio_err, "Error getting password\n");
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
|
||||
ctx=SSL_CTX_new(meth);
|
||||
if (ctx == NULL)
|
||||
{
|
||||
@@ -865,6 +1146,10 @@ bad:
|
||||
BIO_printf(bio_c_out, "PSK key given or JPAKE in use, setting client callback\n");
|
||||
SSL_CTX_set_psk_client_callback(ctx, psk_client_cb);
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
if (srtp_profiles != NULL)
|
||||
SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles);
|
||||
#endif
|
||||
if (bugs)
|
||||
SSL_CTX_set_options(ctx,SSL_OP_ALL|off);
|
||||
@@ -878,6 +1163,11 @@ bad:
|
||||
*/
|
||||
if (socket_type == SOCK_DGRAM) SSL_CTX_set_read_ahead(ctx, 1);
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
if (next_proto.data)
|
||||
SSL_CTX_set_next_proto_select_cb(ctx, next_proto_cb, &next_proto);
|
||||
#endif
|
||||
|
||||
if (state) SSL_CTX_set_info_callback(ctx,apps_ssl_info_callback);
|
||||
if (cipher != NULL)
|
||||
if(!SSL_CTX_set_cipher_list(ctx,cipher)) {
|
||||
@@ -909,6 +1199,24 @@ bad:
|
||||
SSL_CTX_set_tlsext_servername_callback(ctx, ssl_servername_cb);
|
||||
SSL_CTX_set_tlsext_servername_arg(ctx, &tlsextcbp);
|
||||
}
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
if (srp_arg.srplogin)
|
||||
{
|
||||
if (!srp_lateuser && !SSL_CTX_set_srp_username(ctx, srp_arg.srplogin))
|
||||
{
|
||||
BIO_printf(bio_err,"Unable to set SRP username\n");
|
||||
goto end;
|
||||
}
|
||||
srp_arg.msg = c_msg;
|
||||
srp_arg.debug = c_debug ;
|
||||
SSL_CTX_set_srp_cb_arg(ctx,&srp_arg);
|
||||
SSL_CTX_set_srp_client_pwd_callback(ctx, ssl_give_srp_client_pwd_cb);
|
||||
SSL_CTX_set_srp_strength(ctx, srp_arg.strength);
|
||||
if (c_msg || c_debug || srp_arg.amp == 0)
|
||||
SSL_CTX_set_srp_verify_param_callback(ctx, ssl_srp_verify_param_cb);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
con=SSL_new(ctx);
|
||||
@@ -935,6 +1243,10 @@ bad:
|
||||
SSL_set_session(con, sess);
|
||||
SSL_SESSION_free(sess);
|
||||
}
|
||||
|
||||
if (fallback_scsv)
|
||||
SSL_set_mode(con, SSL_MODE_SEND_FALLBACK_SCSV);
|
||||
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
if (servername != NULL)
|
||||
{
|
||||
@@ -947,9 +1259,10 @@ bad:
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
if (con && (con->kssl_ctx = kssl_ctx_new()) != NULL)
|
||||
if (con && (kctx = kssl_ctx_new()) != NULL)
|
||||
{
|
||||
kssl_ctx_setstring(con->kssl_ctx, KSSL_SERVER, host);
|
||||
SSL_set0_kssl_ctx(con, kctx);
|
||||
kssl_ctx_setstring(kctx, KSSL_SERVER, host);
|
||||
}
|
||||
#endif /* OPENSSL_NO_KRB5 */
|
||||
/* SSL_set_cipher_list(con,"RC4-MD5"); */
|
||||
@@ -981,7 +1294,7 @@ re_start:
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (c_Pause & 0x01) con->debug=1;
|
||||
if (c_Pause & 0x01) SSL_set_debug(con, 1);
|
||||
|
||||
if ( SSL_version(con) == DTLS1_VERSION)
|
||||
{
|
||||
@@ -1008,10 +1321,22 @@ re_start:
|
||||
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_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
|
||||
/* want to do MTU discovery */
|
||||
@@ -1030,7 +1355,7 @@ re_start:
|
||||
|
||||
if (c_debug)
|
||||
{
|
||||
con->debug=1;
|
||||
SSL_set_debug(con, 1);
|
||||
BIO_set_callback(sbio,bio_dump_callback);
|
||||
BIO_set_callback_arg(sbio,(char *)bio_c_out);
|
||||
}
|
||||
@@ -1564,6 +1889,14 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
|
||||
SSL_renegotiate(con);
|
||||
cbuf_len=0;
|
||||
}
|
||||
#ifndef OPENSSL_NO_HEARTBEATS
|
||||
else if ((!c_ign_eof) && (cbuf[0] == 'B'))
|
||||
{
|
||||
BIO_printf(bio_err,"HEARTBEATING\n");
|
||||
SSL_heartbeat(con);
|
||||
cbuf_len=0;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
cbuf_len=i;
|
||||
@@ -1591,6 +1924,10 @@ end:
|
||||
print_stuff(bio_c_out,con,1);
|
||||
SSL_free(con);
|
||||
}
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
if (next_proto.data)
|
||||
OPENSSL_free(next_proto.data);
|
||||
#endif
|
||||
if (ctx != NULL) SSL_CTX_free(ctx);
|
||||
if (cert)
|
||||
X509_free(cert);
|
||||
@@ -1627,6 +1964,7 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
||||
#ifndef OPENSSL_NO_COMP
|
||||
const COMP_METHOD *comp, *expansion;
|
||||
#endif
|
||||
unsigned char *exportedkeymat;
|
||||
|
||||
if (full)
|
||||
{
|
||||
@@ -1717,7 +2055,7 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
||||
BIO_number_read(SSL_get_rbio(s)),
|
||||
BIO_number_written(SSL_get_wbio(s)));
|
||||
}
|
||||
BIO_printf(bio,((s->hit)?"---\nReused, ":"---\nNew, "));
|
||||
BIO_printf(bio,(SSL_cache_hit(s)?"---\nReused, ":"---\nNew, "));
|
||||
c=SSL_get_current_cipher(s);
|
||||
BIO_printf(bio,"%s, Cipher is %s\n",
|
||||
SSL_CIPHER_get_version(c),
|
||||
@@ -1739,7 +2077,68 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
||||
BIO_printf(bio,"Expansion: %s\n",
|
||||
expansion ? SSL_COMP_get_name(expansion) : "NONE");
|
||||
#endif
|
||||
|
||||
#ifdef SSL_DEBUG
|
||||
{
|
||||
/* Print out local port of connection: useful for debugging */
|
||||
int sock;
|
||||
struct sockaddr_in ladd;
|
||||
socklen_t ladd_size = sizeof(ladd);
|
||||
sock = SSL_get_fd(s);
|
||||
getsockname(sock, (struct sockaddr *)&ladd, &ladd_size);
|
||||
BIO_printf(bio_c_out, "LOCAL PORT is %u\n", ntohs(ladd.sin_port));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
if (next_proto.status != -1) {
|
||||
const unsigned char *proto;
|
||||
unsigned int proto_len;
|
||||
SSL_get0_next_proto_negotiated(s, &proto, &proto_len);
|
||||
BIO_printf(bio, "Next protocol: (%d) ", next_proto.status);
|
||||
BIO_write(bio, proto, proto_len);
|
||||
BIO_write(bio, "\n", 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
{
|
||||
SRTP_PROTECTION_PROFILE *srtp_profile=SSL_get_selected_srtp_profile(s);
|
||||
|
||||
if(srtp_profile)
|
||||
BIO_printf(bio,"SRTP Extension negotiated, profile=%s\n",
|
||||
srtp_profile->name);
|
||||
}
|
||||
#endif
|
||||
|
||||
SSL_SESSION_print(bio,SSL_get_session(s));
|
||||
if (keymatexportlabel != NULL)
|
||||
{
|
||||
BIO_printf(bio, "Keying material exporter:\n");
|
||||
BIO_printf(bio, " Label: '%s'\n", keymatexportlabel);
|
||||
BIO_printf(bio, " Length: %i bytes\n", keymatexportlen);
|
||||
exportedkeymat = OPENSSL_malloc(keymatexportlen);
|
||||
if (exportedkeymat != NULL)
|
||||
{
|
||||
if (!SSL_export_keying_material(s, exportedkeymat,
|
||||
keymatexportlen,
|
||||
keymatexportlabel,
|
||||
strlen(keymatexportlabel),
|
||||
NULL, 0, 0))
|
||||
{
|
||||
BIO_printf(bio, " Error\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio, " Keying material: ");
|
||||
for (i=0; i<keymatexportlen; i++)
|
||||
BIO_printf(bio, "%02X",
|
||||
exportedkeymat[i]);
|
||||
BIO_printf(bio, "\n");
|
||||
}
|
||||
OPENSSL_free(exportedkeymat);
|
||||
}
|
||||
}
|
||||
BIO_printf(bio,"---\n");
|
||||
if (peer != NULL)
|
||||
X509_free(peer);
|
||||
|
||||
389
apps/s_server.c
389
apps/s_server.c
@@ -186,6 +186,9 @@ typedef unsigned int u_int;
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#include <openssl/rsa.h>
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
#include <openssl/srp.h>
|
||||
#endif
|
||||
#include "s_apps.h"
|
||||
#include "timeouts.h"
|
||||
|
||||
@@ -290,6 +293,9 @@ static int cert_status_cb(SSL *s, void *arg);
|
||||
static int s_msg=0;
|
||||
static int s_quiet=0;
|
||||
|
||||
static char *keymatexportlabel=NULL;
|
||||
static int keymatexportlen=20;
|
||||
|
||||
static int hack=0;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
static char *engine_id=NULL;
|
||||
@@ -302,6 +308,7 @@ static long socket_mtu;
|
||||
static int cert_chain = 0;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef OPENSSL_NO_PSK
|
||||
static char *psk_identity="Client_identity";
|
||||
char *psk_key=NULL; /* by default PSK is not used */
|
||||
@@ -369,6 +376,52 @@ static unsigned int psk_server_cb(SSL *ssl, const char *identity,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
/* This is a context that we pass to callbacks */
|
||||
typedef struct srpsrvparm_st
|
||||
{
|
||||
char *login;
|
||||
SRP_VBASE *vb;
|
||||
SRP_user_pwd *user;
|
||||
} srpsrvparm;
|
||||
|
||||
/* This callback pretends to require some asynchronous logic in order to obtain
|
||||
a verifier. When the callback is called for a new connection we return
|
||||
with a negative value. This will provoke the accept etc to return with
|
||||
an LOOKUP_X509. The main logic of the reinvokes the suspended call
|
||||
(which would normally occur after a worker has finished) and we
|
||||
set the user parameters.
|
||||
*/
|
||||
static int MS_CALLBACK ssl_srp_server_param_cb(SSL *s, int *ad, void *arg)
|
||||
{
|
||||
srpsrvparm *p = (srpsrvparm *)arg;
|
||||
if (p->login == NULL && p->user == NULL )
|
||||
{
|
||||
p->login = SSL_get_srp_username(s);
|
||||
BIO_printf(bio_err, "SRP username = \"%s\"\n", p->login);
|
||||
return (-1) ;
|
||||
}
|
||||
|
||||
if (p->user == NULL)
|
||||
{
|
||||
BIO_printf(bio_err, "User %s doesn't exist\n", p->login);
|
||||
return SSL3_AL_FATAL;
|
||||
}
|
||||
if (SSL_set_srp_server_param(s, p->user->N, p->user->g, p->user->s, p->user->v,
|
||||
p->user->info) < 0)
|
||||
{
|
||||
*ad = SSL_AD_INTERNAL_ERROR;
|
||||
return SSL3_AL_FATAL;
|
||||
}
|
||||
BIO_printf(bio_err, "SRP parameters set: username = \"%s\" info=\"%s\" \n", p->login,p->user->info);
|
||||
/* need to check whether there are memory leaks */
|
||||
p->user = NULL;
|
||||
p->login = NULL;
|
||||
return SSL_ERROR_NONE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MONOLITH
|
||||
static void s_server_init(void)
|
||||
{
|
||||
@@ -456,9 +509,17 @@ static void sv_usage(void)
|
||||
# ifndef OPENSSL_NO_JPAKE
|
||||
BIO_printf(bio_err," -jpake arg - JPAKE secret to use\n");
|
||||
# endif
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
BIO_printf(bio_err," -srpvfile file - The verifier file for SRP\n");
|
||||
BIO_printf(bio_err," -srpuserseed string - A seed string for a default user salt.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -ssl2 - Just talk SSLv2\n");
|
||||
#ifndef OPENSSL_NO_SSL3_METHOD
|
||||
BIO_printf(bio_err," -ssl3 - Just talk SSLv3\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -tls1_2 - Just talk TLSv1.2\n");
|
||||
BIO_printf(bio_err," -tls1_1 - Just talk TLSv1.1\n");
|
||||
BIO_printf(bio_err," -tls1 - Just talk TLSv1\n");
|
||||
BIO_printf(bio_err," -dtls1 - Just talk DTLSv1\n");
|
||||
BIO_printf(bio_err," -timeout - Enable timeouts\n");
|
||||
@@ -467,6 +528,8 @@ static void sv_usage(void)
|
||||
BIO_printf(bio_err," -no_ssl2 - Just disable SSLv2\n");
|
||||
BIO_printf(bio_err," -no_ssl3 - Just disable SSLv3\n");
|
||||
BIO_printf(bio_err," -no_tls1 - Just disable TLSv1\n");
|
||||
BIO_printf(bio_err," -no_tls1_1 - Just disable TLSv1.1\n");
|
||||
BIO_printf(bio_err," -no_tls1_2 - Just disable TLSv1.2\n");
|
||||
#ifndef OPENSSL_NO_DH
|
||||
BIO_printf(bio_err," -no_dhe - Disable ephemeral DH\n");
|
||||
#endif
|
||||
@@ -494,7 +557,15 @@ static void sv_usage(void)
|
||||
BIO_printf(bio_err," -tlsextdebug - hex dump of all TLS extensions received\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");
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
BIO_printf(bio_err," -nextprotoneg arg - set the advertised protocols for the NPN extension (comma-separated list)\n");
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_SRTP
|
||||
BIO_printf(bio_err," -use_srtp profiles - Offer SRTP key management with a colon-separated profile list\n");
|
||||
# endif
|
||||
#endif
|
||||
BIO_printf(bio_err," -keymatexport label - Export keying material using label\n");
|
||||
BIO_printf(bio_err," -keymatexportlen len - Export len bytes of keying material (default 20)\n");
|
||||
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");
|
||||
@@ -832,6 +903,26 @@ BIO_printf(err, "cert_status: received %d ids\n", sk_OCSP_RESPID_num(ids));
|
||||
ret = SSL_TLSEXT_ERR_ALERT_FATAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
/* This is the context that we pass to next_proto_cb */
|
||||
typedef struct tlsextnextprotoctx_st {
|
||||
unsigned char *data;
|
||||
unsigned int len;
|
||||
} tlsextnextprotoctx;
|
||||
|
||||
static int next_proto_cb(SSL *s, const unsigned char **data, unsigned int *len, void *arg)
|
||||
{
|
||||
tlsextnextprotoctx *next_proto = arg;
|
||||
|
||||
*data = next_proto->data;
|
||||
*len = next_proto->len;
|
||||
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
# endif /* ndef OPENSSL_NO_NEXTPROTONEG */
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
int MAIN(int, char **);
|
||||
@@ -839,6 +930,12 @@ int MAIN(int, char **);
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
static char *jpake_secret = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
static srpsrvparm srp_callback_parm;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
static char *srtp_profiles = NULL;
|
||||
#endif
|
||||
|
||||
int MAIN(int argc, char *argv[])
|
||||
{
|
||||
@@ -870,13 +967,19 @@ int MAIN(int argc, char *argv[])
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
EVP_PKEY *s_key2 = NULL;
|
||||
X509 *s_cert2 = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
tlsextctx tlsextcbp = {NULL, NULL, SSL_TLSEXT_ERR_ALERT_WARNING};
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
const char *next_proto_neg_in = NULL;
|
||||
tlsextnextprotoctx next_proto;
|
||||
# endif
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_PSK
|
||||
/* by default do not send a PSK identity hint */
|
||||
static char *psk_identity_hint=NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
char *srpuserseed = NULL;
|
||||
char *srp_verifier_file = NULL;
|
||||
#endif
|
||||
meth=SSLv23_server_method();
|
||||
|
||||
@@ -1109,6 +1212,20 @@ int MAIN(int argc, char *argv[])
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
else if (strcmp(*argv, "-srpvfile") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
srp_verifier_file = *(++argv);
|
||||
meth = TLSv1_server_method();
|
||||
}
|
||||
else if (strcmp(*argv, "-srpuserseed") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
srpuserseed = *(++argv);
|
||||
meth = TLSv1_server_method();
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-www") == 0)
|
||||
{ www=1; }
|
||||
@@ -1122,6 +1239,10 @@ int MAIN(int argc, char *argv[])
|
||||
{ off|=SSL_OP_NO_SSLv3; }
|
||||
else if (strcmp(*argv,"-no_tls1") == 0)
|
||||
{ off|=SSL_OP_NO_TLSv1; }
|
||||
else if (strcmp(*argv,"-no_tls1_1") == 0)
|
||||
{ off|=SSL_OP_NO_TLSv1_1; }
|
||||
else if (strcmp(*argv,"-no_tls1_2") == 0)
|
||||
{ off|=SSL_OP_NO_TLSv1_2; }
|
||||
else if (strcmp(*argv,"-no_comp") == 0)
|
||||
{ off|=SSL_OP_NO_COMPRESSION; }
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
@@ -1132,13 +1253,17 @@ int MAIN(int argc, char *argv[])
|
||||
else if (strcmp(*argv,"-ssl2") == 0)
|
||||
{ meth=SSLv2_server_method(); }
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SSL3
|
||||
#ifndef OPENSSL_NO_SSL3_METHOD
|
||||
else if (strcmp(*argv,"-ssl3") == 0)
|
||||
{ meth=SSLv3_server_method(); }
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_TLS1
|
||||
else if (strcmp(*argv,"-tls1") == 0)
|
||||
{ meth=TLSv1_server_method(); }
|
||||
else if (strcmp(*argv,"-tls1_1") == 0)
|
||||
{ meth=TLSv1_1_server_method(); }
|
||||
else if (strcmp(*argv,"-tls1_2") == 0)
|
||||
{ meth=TLSv1_2_server_method(); }
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DTLS1
|
||||
else if (strcmp(*argv,"-dtls1") == 0)
|
||||
@@ -1191,7 +1316,13 @@ int MAIN(int argc, char *argv[])
|
||||
if (--argc < 1) goto bad;
|
||||
s_key_file2= *(++argv);
|
||||
}
|
||||
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
else if (strcmp(*argv,"-nextprotoneg") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
next_proto_neg_in = *(++argv);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK)
|
||||
else if (strcmp(*argv,"-jpake") == 0)
|
||||
@@ -1200,6 +1331,24 @@ int MAIN(int argc, char *argv[])
|
||||
jpake_secret = *(++argv);
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
else if (strcmp(*argv,"-use_srtp") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
srtp_profiles = *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-keymatexport") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
keymatexportlabel= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-keymatexportlen") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
keymatexportlen=atoi(*(++argv));
|
||||
if (keymatexportlen == 0) goto bad;
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||
@@ -1307,6 +1456,21 @@ bad:
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
if (next_proto_neg_in)
|
||||
{
|
||||
unsigned short len;
|
||||
next_proto.data = next_protos_parse(&len, next_proto_neg_in);
|
||||
if (next_proto.data == NULL)
|
||||
goto end;
|
||||
next_proto.len = len;
|
||||
}
|
||||
else
|
||||
{
|
||||
next_proto.data = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (s_dcert_file)
|
||||
{
|
||||
@@ -1407,6 +1571,11 @@ bad:
|
||||
else
|
||||
SSL_CTX_sess_set_cache_size(ctx,128);
|
||||
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
if (srtp_profiles != NULL)
|
||||
SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if (cipher == NULL) cipher=getenv("SSL_CIPHER");
|
||||
#endif
|
||||
@@ -1484,6 +1653,11 @@ bad:
|
||||
if (vpm)
|
||||
SSL_CTX_set1_param(ctx2, vpm);
|
||||
}
|
||||
|
||||
# ifndef OPENSSL_NO_NEXTPROTONEG
|
||||
if (next_proto.data)
|
||||
SSL_CTX_set_next_protos_advertised_cb(ctx, next_proto_cb, &next_proto);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
@@ -1579,7 +1753,7 @@ bad:
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!set_cert_key_stuff(ctx,s_cert,s_key))
|
||||
if (!set_cert_key_stuff(ctx, s_cert, s_key))
|
||||
goto end;
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
if (ctx2 && !set_cert_key_stuff(ctx2,s_cert2,s_key2))
|
||||
@@ -1587,7 +1761,7 @@ bad:
|
||||
#endif
|
||||
if (s_dcert != NULL)
|
||||
{
|
||||
if (!set_cert_key_stuff(ctx,s_dcert,s_dkey))
|
||||
if (!set_cert_key_stuff(ctx, s_dcert, s_dkey))
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -1692,6 +1866,25 @@ bad:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
if (srp_verifier_file != NULL)
|
||||
{
|
||||
srp_callback_parm.vb = SRP_VBASE_new(srpuserseed);
|
||||
srp_callback_parm.user = NULL;
|
||||
srp_callback_parm.login = NULL;
|
||||
if ((ret = SRP_VBASE_init(srp_callback_parm.vb, srp_verifier_file)) != SRP_NO_ERROR)
|
||||
{
|
||||
BIO_printf(bio_err,
|
||||
"Cannot initialize SRP verifier file \"%s\":ret=%d\n",
|
||||
srp_verifier_file, ret);
|
||||
goto end;
|
||||
}
|
||||
SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE,verify_callback);
|
||||
SSL_CTX_set_srp_cb_arg(ctx, &srp_callback_parm);
|
||||
SSL_CTX_set_srp_username_callback(ctx, ssl_srp_server_param_cb);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (CAfile != NULL)
|
||||
{
|
||||
SSL_CTX_set_client_CA_list(ctx,SSL_load_client_CA_file(CAfile));
|
||||
@@ -1781,6 +1974,9 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
unsigned long l;
|
||||
SSL *con=NULL;
|
||||
BIO *sbio;
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
KSSL_CTX *kctx;
|
||||
#endif
|
||||
struct timeval timeout;
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_BEOS_R5)
|
||||
struct timeval tv;
|
||||
@@ -1821,12 +2017,11 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
if ((con->kssl_ctx = kssl_ctx_new()) != NULL)
|
||||
if ((kctx = kssl_ctx_new()) != NULL)
|
||||
{
|
||||
kssl_ctx_setstring(con->kssl_ctx, KSSL_SERVICE,
|
||||
KRB5SVC);
|
||||
kssl_ctx_setstring(con->kssl_ctx, KSSL_KEYTAB,
|
||||
KRB5KEYTAB);
|
||||
SSL_set0_kssl_ctx(con, kctx);
|
||||
kssl_ctx_setstring(kctx, KSSL_SERVICE, KRB5SVC);
|
||||
kssl_ctx_setstring(kctx, KSSL_KEYTAB, KRB5KEYTAB);
|
||||
}
|
||||
#endif /* OPENSSL_NO_KRB5 */
|
||||
if(context)
|
||||
@@ -1856,10 +2051,24 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
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_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
|
||||
/* want to do MTU discovery */
|
||||
@@ -1889,7 +2098,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
|
||||
if (s_debug)
|
||||
{
|
||||
con->debug=1;
|
||||
SSL_set_debug(con, 1);
|
||||
BIO_set_callback(SSL_get_rbio(con),bio_dump_callback);
|
||||
BIO_set_callback_arg(SSL_get_rbio(con),(char *)bio_s_out);
|
||||
}
|
||||
@@ -2018,6 +2227,16 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
goto err;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_HEARTBEATS
|
||||
if ((buf[0] == 'B') &&
|
||||
((buf[1] == '\n') || (buf[1] == '\r')))
|
||||
{
|
||||
BIO_printf(bio_err,"HEARTBEATING\n");
|
||||
SSL_heartbeat(con);
|
||||
i=0;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if ((buf[0] == 'r') &&
|
||||
((buf[1] == '\n') || (buf[1] == '\r')))
|
||||
{
|
||||
@@ -2061,6 +2280,18 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
{ static count=0; if (++count == 100) { count=0; SSL_renegotiate(con); } }
|
||||
#endif
|
||||
k=SSL_write(con,&(buf[l]),(unsigned int)i);
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
while (SSL_get_error(con,k) == SSL_ERROR_WANT_X509_LOOKUP)
|
||||
{
|
||||
BIO_printf(bio_s_out,"LOOKUP renego during write\n");
|
||||
srp_callback_parm.user = SRP_VBASE_get_by_user(srp_callback_parm.vb, srp_callback_parm.login);
|
||||
if (srp_callback_parm.user)
|
||||
BIO_printf(bio_s_out,"LOOKUP done %s\n",srp_callback_parm.user->info);
|
||||
else
|
||||
BIO_printf(bio_s_out,"LOOKUP not successful\n");
|
||||
k=SSL_write(con,&(buf[l]),(unsigned int)i);
|
||||
}
|
||||
#endif
|
||||
switch (SSL_get_error(con,k))
|
||||
{
|
||||
case SSL_ERROR_NONE:
|
||||
@@ -2108,6 +2339,18 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
{
|
||||
again:
|
||||
i=SSL_read(con,(char *)buf,bufsize);
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
while (SSL_get_error(con,i) == SSL_ERROR_WANT_X509_LOOKUP)
|
||||
{
|
||||
BIO_printf(bio_s_out,"LOOKUP renego during read\n");
|
||||
srp_callback_parm.user = SRP_VBASE_get_by_user(srp_callback_parm.vb, srp_callback_parm.login);
|
||||
if (srp_callback_parm.user)
|
||||
BIO_printf(bio_s_out,"LOOKUP done %s\n",srp_callback_parm.user->info);
|
||||
else
|
||||
BIO_printf(bio_s_out,"LOOKUP not successful\n");
|
||||
i=SSL_read(con,(char *)buf,bufsize);
|
||||
}
|
||||
#endif
|
||||
switch (SSL_get_error(con,i))
|
||||
{
|
||||
case SSL_ERROR_NONE:
|
||||
@@ -2120,7 +2363,6 @@ again:
|
||||
break;
|
||||
case SSL_ERROR_WANT_WRITE:
|
||||
case SSL_ERROR_WANT_READ:
|
||||
case SSL_ERROR_WANT_X509_LOOKUP:
|
||||
BIO_printf(bio_s_out,"Read BLOCK\n");
|
||||
break;
|
||||
case SSL_ERROR_SYSCALL:
|
||||
@@ -2175,8 +2417,30 @@ static int init_ssl_connection(SSL *con)
|
||||
X509 *peer;
|
||||
long verify_error;
|
||||
MS_STATIC char buf[BUFSIZ];
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
char *client_princ;
|
||||
#endif
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
const unsigned char *next_proto_neg;
|
||||
unsigned next_proto_neg_len;
|
||||
#endif
|
||||
unsigned char *exportedkeymat;
|
||||
|
||||
if ((i=SSL_accept(con)) <= 0)
|
||||
|
||||
i=SSL_accept(con);
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
while (i <= 0 && SSL_get_error(con,i) == SSL_ERROR_WANT_X509_LOOKUP)
|
||||
{
|
||||
BIO_printf(bio_s_out,"LOOKUP during accept %s\n",srp_callback_parm.login);
|
||||
srp_callback_parm.user = SRP_VBASE_get_by_user(srp_callback_parm.vb, srp_callback_parm.login);
|
||||
if (srp_callback_parm.user)
|
||||
BIO_printf(bio_s_out,"LOOKUP done %s\n",srp_callback_parm.user->info);
|
||||
else
|
||||
BIO_printf(bio_s_out,"LOOKUP not successful\n");
|
||||
i=SSL_accept(con);
|
||||
}
|
||||
#endif
|
||||
if (i <= 0)
|
||||
{
|
||||
if (BIO_sock_should_retry(i))
|
||||
{
|
||||
@@ -2214,19 +2478,70 @@ static int init_ssl_connection(SSL *con)
|
||||
BIO_printf(bio_s_out,"Shared ciphers:%s\n",buf);
|
||||
str=SSL_CIPHER_get_name(SSL_get_current_cipher(con));
|
||||
BIO_printf(bio_s_out,"CIPHER is %s\n",(str != NULL)?str:"(NONE)");
|
||||
if (con->hit) BIO_printf(bio_s_out,"Reused session-id\n");
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||
SSL_get0_next_proto_negotiated(con, &next_proto_neg, &next_proto_neg_len);
|
||||
if (next_proto_neg)
|
||||
{
|
||||
BIO_printf(bio_s_out,"NEXTPROTO is ");
|
||||
BIO_write(bio_s_out, next_proto_neg, next_proto_neg_len);
|
||||
BIO_printf(bio_s_out, "\n");
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SRTP
|
||||
{
|
||||
SRTP_PROTECTION_PROFILE *srtp_profile
|
||||
= SSL_get_selected_srtp_profile(con);
|
||||
|
||||
if(srtp_profile)
|
||||
BIO_printf(bio_s_out,"SRTP Extension negotiated, profile=%s\n",
|
||||
srtp_profile->name);
|
||||
}
|
||||
#endif
|
||||
if (SSL_cache_hit(con)) BIO_printf(bio_s_out,"Reused session-id\n");
|
||||
if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
|
||||
TLS1_FLAGS_TLS_PADDING_BUG)
|
||||
BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n");
|
||||
BIO_printf(bio_s_out,
|
||||
"Peer has incorrect TLSv1 block padding\n");
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
if (con->kssl_ctx->client_princ != NULL)
|
||||
client_princ = kssl_ctx_get0_client_princ(SSL_get0_kssl_ctx(con));
|
||||
if (client_princ != NULL)
|
||||
{
|
||||
BIO_printf(bio_s_out,"Kerberos peer principal is %s\n",
|
||||
con->kssl_ctx->client_princ);
|
||||
client_princ);
|
||||
}
|
||||
#endif /* OPENSSL_NO_KRB5 */
|
||||
BIO_printf(bio_s_out, "Secure Renegotiation IS%s supported\n",
|
||||
SSL_get_secure_renegotiation_support(con) ? "" : " NOT");
|
||||
if (keymatexportlabel != NULL)
|
||||
{
|
||||
BIO_printf(bio_s_out, "Keying material exporter:\n");
|
||||
BIO_printf(bio_s_out, " Label: '%s'\n", keymatexportlabel);
|
||||
BIO_printf(bio_s_out, " Length: %i bytes\n",
|
||||
keymatexportlen);
|
||||
exportedkeymat = OPENSSL_malloc(keymatexportlen);
|
||||
if (exportedkeymat != NULL)
|
||||
{
|
||||
if (!SSL_export_keying_material(con, exportedkeymat,
|
||||
keymatexportlen,
|
||||
keymatexportlabel,
|
||||
strlen(keymatexportlabel),
|
||||
NULL, 0, 0))
|
||||
{
|
||||
BIO_printf(bio_s_out, " Error\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_s_out, " Keying material: ");
|
||||
for (i=0; i<keymatexportlen; i++)
|
||||
BIO_printf(bio_s_out, "%02X",
|
||||
exportedkeymat[i]);
|
||||
BIO_printf(bio_s_out, "\n");
|
||||
}
|
||||
OPENSSL_free(exportedkeymat);
|
||||
}
|
||||
}
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -2244,6 +2559,9 @@ err:
|
||||
return(ret);
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
char *client_princ;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static int load_CA(SSL_CTX *ctx, char *file)
|
||||
@@ -2274,6 +2592,9 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
SSL *con;
|
||||
const SSL_CIPHER *c;
|
||||
BIO *io,*ssl_bio,*sbio;
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
KSSL_CTX *kctx;
|
||||
#endif
|
||||
|
||||
buf=OPENSSL_malloc(bufsize);
|
||||
if (buf == NULL) return(0);
|
||||
@@ -2305,10 +2626,10 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
}
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
if ((con->kssl_ctx = kssl_ctx_new()) != NULL)
|
||||
if ((kctx = kssl_ctx_new()) != NULL)
|
||||
{
|
||||
kssl_ctx_setstring(con->kssl_ctx, KSSL_SERVICE, KRB5SVC);
|
||||
kssl_ctx_setstring(con->kssl_ctx, KSSL_KEYTAB, KRB5KEYTAB);
|
||||
kssl_ctx_setstring(kctx, KSSL_SERVICE, KRB5SVC);
|
||||
kssl_ctx_setstring(kctx, KSSL_KEYTAB, KRB5KEYTAB);
|
||||
}
|
||||
#endif /* OPENSSL_NO_KRB5 */
|
||||
if(context) SSL_set_session_id_context(con, context,
|
||||
@@ -2334,7 +2655,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
|
||||
if (s_debug)
|
||||
{
|
||||
con->debug=1;
|
||||
SSL_set_debug(con, 1);
|
||||
BIO_set_callback(SSL_get_rbio(con),bio_dump_callback);
|
||||
BIO_set_callback_arg(SSL_get_rbio(con),(char *)bio_s_out);
|
||||
}
|
||||
@@ -2349,7 +2670,18 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
if (hack)
|
||||
{
|
||||
i=SSL_accept(con);
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
while (i <= 0 && SSL_get_error(con,i) == SSL_ERROR_WANT_X509_LOOKUP)
|
||||
{
|
||||
BIO_printf(bio_s_out,"LOOKUP during accept %s\n",srp_callback_parm.login);
|
||||
srp_callback_parm.user = SRP_VBASE_get_by_user(srp_callback_parm.vb, srp_callback_parm.login);
|
||||
if (srp_callback_parm.user)
|
||||
BIO_printf(bio_s_out,"LOOKUP done %s\n",srp_callback_parm.user->info);
|
||||
else
|
||||
BIO_printf(bio_s_out,"LOOKUP not successful\n");
|
||||
i=SSL_accept(con);
|
||||
}
|
||||
#endif
|
||||
switch (SSL_get_error(con,i))
|
||||
{
|
||||
case SSL_ERROR_NONE:
|
||||
@@ -2417,6 +2749,11 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
}
|
||||
BIO_puts(io,"\n");
|
||||
|
||||
BIO_printf(io,
|
||||
"Secure Renegotiation IS%s supported\n",
|
||||
SSL_get_secure_renegotiation_support(con) ?
|
||||
"" : " NOT");
|
||||
|
||||
/* The following is evil and should not really
|
||||
* be done */
|
||||
BIO_printf(io,"Ciphers supported in s_server binary\n");
|
||||
@@ -2455,7 +2792,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
}
|
||||
BIO_puts(io,"\n");
|
||||
}
|
||||
BIO_printf(io,((con->hit)
|
||||
BIO_printf(io,(SSL_cache_hit(con)
|
||||
?"---\nReused, "
|
||||
:"---\nNew, "));
|
||||
c=SSL_get_current_cipher(con);
|
||||
|
||||
@@ -238,11 +238,10 @@ int init_client(int *sock, char *host, int port, int type)
|
||||
{
|
||||
unsigned char ip[4];
|
||||
|
||||
memset(ip, '\0', sizeof ip);
|
||||
if (!host_ip(host,&(ip[0])))
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
return(init_client_ip(sock,ip,port,type));
|
||||
return 0;
|
||||
return init_client_ip(sock,ip,port,type);
|
||||
}
|
||||
|
||||
static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
|
||||
|
||||
@@ -349,13 +349,7 @@ int MAIN(int argc, char **argv)
|
||||
if (bio_err == NULL)
|
||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||
|
||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
||||
s_time_meth=SSLv23_client_method();
|
||||
#elif !defined(OPENSSL_NO_SSL3)
|
||||
s_time_meth=SSLv3_client_method();
|
||||
#elif !defined(OPENSSL_NO_SSL2)
|
||||
s_time_meth=SSLv2_client_method();
|
||||
#endif
|
||||
|
||||
/* parse the command line arguments */
|
||||
if( parseArgs( argc, argv ) < 0 )
|
||||
|
||||
413
apps/server.pem
413
apps/server.pem
@@ -1,369 +1,52 @@
|
||||
issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
|
||||
subject= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Server test cert (512 bit)
|
||||
subject= C = UK, O = OpenSSL Group, OU = FOR TESTING PURPOSES ONLY, CN = Test Server Cert
|
||||
issuer= C = UK, O = OpenSSL Group, OU = FOR TESTING PURPOSES ONLY, CN = OpenSSL Test Intermediate CA
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB6TCCAVICAQYwDQYJKoZIhvcNAQEEBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV
|
||||
BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD
|
||||
VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNMDAxMDE2MjIzMTAzWhcNMDMwMTE0
|
||||
MjIzMTAzWjBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG
|
||||
A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGlNlcnZlciB0ZXN0IGNl
|
||||
cnQgKDUxMiBiaXQpMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ+zw4Qnlf8SMVIP
|
||||
Fe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVDTGiXav6ooKXfX3j/7tdkuD8Ey2//
|
||||
Kv7+ue0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQCT0grFQeZaqYb5EYfk20XixZV4
|
||||
GmyAbXMftG1Eo7qGiMhYzRwGNWxEYojf5PZkYZXvSqZ/ZXHXa4g59jK/rJNnaVGM
|
||||
k+xIX8mxQvlV0n5O9PIha5BX5teZnkHKgL8aKKLKW1BK7YTngsfSzzaeame5iKfz
|
||||
itAE+OjGF+PFKbwX8Q==
|
||||
MIID5zCCAs+gAwIBAgIJALnu1NlVpZ6zMA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNV
|
||||
BAYTAlVLMRYwFAYDVQQKDA1PcGVuU1NMIEdyb3VwMSIwIAYDVQQLDBlGT1IgVEVT
|
||||
VElORyBQVVJQT1NFUyBPTkxZMSUwIwYDVQQDDBxPcGVuU1NMIFRlc3QgSW50ZXJt
|
||||
ZWRpYXRlIENBMB4XDTExMTIwODE0MDE0OFoXDTIxMTAxNjE0MDE0OFowZDELMAkG
|
||||
A1UEBhMCVUsxFjAUBgNVBAoMDU9wZW5TU0wgR3JvdXAxIjAgBgNVBAsMGUZPUiBU
|
||||
RVNUSU5HIFBVUlBPU0VTIE9OTFkxGTAXBgNVBAMMEFRlc3QgU2VydmVyIENlcnQw
|
||||
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDzhPOSNtyyRspmeuUpxfNJ
|
||||
KCLTuf7g3uQ4zu4iHOmRO5TQci+HhVlLZrHF9XqFXcIP0y4pWDbMSGuiorUmzmfi
|
||||
R7bfSdI/+qIQt8KXRH6HNG1t8ou0VSvWId5TS5Dq/er5ODUr9OaaDva7EquHIcMv
|
||||
vPQGuI+OEAcnleVCy9HVEIySrO4P3CNIicnGkwwiAud05yUAq/gPXBC1hTtmlPD7
|
||||
TVcGVSEiJdvzqqlgv02qedGrkki6GY4S7GjZxrrf7Foc2EP+51LJzwLQx3/JfrCU
|
||||
41NEWAsu/Sl0tQabXESN+zJ1pDqoZ3uHMgpQjeGiE0olr+YcsSW/tJmiU9OiAr8R
|
||||
AgMBAAGjgY8wgYwwDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCBeAwLAYJYIZI
|
||||
AYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQW
|
||||
BBSCvM8AABPR9zklmifnr9LvIBturDAfBgNVHSMEGDAWgBQ2w2yI55X+sL3szj49
|
||||
hqshgYfa2jANBgkqhkiG9w0BAQUFAAOCAQEAqb1NV0B0/pbpK9Z4/bNjzPQLTRLK
|
||||
WnSNm/Jh5v0GEUOE/Beg7GNjNrmeNmqxAlpqWz9qoeoFZax+QBpIZYjROU3TS3fp
|
||||
yLsrnlr0CDQ5R7kCCDGa8dkXxemmpZZLbUCpW2Uoy8sAA4JjN9OtsZY7dvUXFgJ7
|
||||
vVNTRnI01ghknbtD+2SxSQd3CWF6QhcRMAzZJ1z1cbbwGDDzfvGFPzJ+Sq+zEPds
|
||||
xoVLLSetCiBc+40ZcDS5dV98h9XD7JMTQfxzA7mNGv73JoZJA6nFgj+ADSlJsY/t
|
||||
JBv+z1iQRueoh9Qeee+ZbRifPouCB8FDx+AltvHTANdAq0t/K3o+pplMVA==
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIBPAIBAAJBAJ+zw4Qnlf8SMVIPFe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVD
|
||||
TGiXav6ooKXfX3j/7tdkuD8Ey2//Kv7+ue0CAwEAAQJAN6W31vDEP2DjdqhzCDDu
|
||||
OA4NACqoiFqyblo7yc2tM4h4xMbC3Yx5UKMN9ZkCtX0gzrz6DyF47bdKcWBzNWCj
|
||||
gQIhANEoojVt7hq+SQ6MCN6FTAysGgQf56Q3TYoJMoWvdiXVAiEAw3e3rc+VJpOz
|
||||
rHuDo6bgpjUAAXM+v3fcpsfZSNO6V7kCIQCtbVjanpUwvZkMI9by02oUk9taki3b
|
||||
PzPfAfNPYAbCJQIhAJXNQDWyqwn/lGmR11cqY2y9nZ1+5w3yHGatLrcDnQHxAiEA
|
||||
vnlEGo8K85u+KwIOimM48ZG8oTk7iFdkqLJR1utT3aU=
|
||||
MIIEpAIBAAKCAQEA84TzkjbcskbKZnrlKcXzSSgi07n+4N7kOM7uIhzpkTuU0HIv
|
||||
h4VZS2axxfV6hV3CD9MuKVg2zEhroqK1Js5n4ke230nSP/qiELfCl0R+hzRtbfKL
|
||||
tFUr1iHeU0uQ6v3q+Tg1K/Tmmg72uxKrhyHDL7z0BriPjhAHJ5XlQsvR1RCMkqzu
|
||||
D9wjSInJxpMMIgLndOclAKv4D1wQtYU7ZpTw+01XBlUhIiXb86qpYL9NqnnRq5JI
|
||||
uhmOEuxo2ca63+xaHNhD/udSyc8C0Md/yX6wlONTRFgLLv0pdLUGm1xEjfsydaQ6
|
||||
qGd7hzIKUI3hohNKJa/mHLElv7SZolPTogK/EQIDAQABAoIBAADq9FwNtuE5IRQn
|
||||
zGtO4q7Y5uCzZ8GDNYr9RKp+P2cbuWDbvVAecYq2NV9QoIiWJOAYZKklOvekIju3
|
||||
r0UZLA0PRiIrTg6NrESx3JrjWDK8QNlUO7CPTZ39/K+FrmMkV9lem9yxjJjyC34D
|
||||
AQB+YRTx+l14HppjdxNwHjAVQpIx/uO2F5xAMuk32+3K+pq9CZUtrofe1q4Agj9R
|
||||
5s8mSy9pbRo9kW9wl5xdEotz1LivFOEiqPUJTUq5J5PeMKao3vdK726XI4Z455Nm
|
||||
W2/MA0YV0ug2FYinHcZdvKM6dimH8GLfa3X8xKRfzjGjTiMSwsdjgMa4awY3tEHH
|
||||
674jhAECgYEA/zqMrc0zsbNk83sjgaYIug5kzEpN4ic020rSZsmQxSCerJTgNhmg
|
||||
utKSCt0Re09Jt3LqG48msahX8ycqDsHNvlEGPQSbMu9IYeO3Wr3fAm75GEtFWePY
|
||||
BhM73I7gkRt4s8bUiUepMG/wY45c5tRF23xi8foReHFFe9MDzh8fJFECgYEA9EFX
|
||||
4qAik1pOJGNei9BMwmx0I0gfVEIgu0tzeVqT45vcxbxr7RkTEaDoAG6PlbWP6D9a
|
||||
WQNLp4gsgRM90ZXOJ4up5DsAWDluvaF4/omabMA+MJJ5kGZ0gCj5rbZbKqUws7x8
|
||||
bp+6iBfUPJUbcqNqFmi/08Yt7vrDnMnyMw2A/sECgYEAiiuRMxnuzVm34hQcsbhH
|
||||
6ymVqf7j0PW2qK0F4H1ocT9qhzWFd+RB3kHWrCjnqODQoI6GbGr/4JepHUpre1ex
|
||||
4UEN5oSS3G0ru0rC3U4C59dZ5KwDHFm7ffZ1pr52ljfQDUsrjjIMRtuiwNK2OoRa
|
||||
WSsqiaL+SDzSB+nBmpnAizECgYBdt/y6rerWUx4MhDwwtTnel7JwHyo2MDFS6/5g
|
||||
n8qC2Lj6/fMDRE22w+CA2esp7EJNQJGv+b27iFpbJEDh+/Lf5YzIT4MwVskQ5bYB
|
||||
JFcmRxUVmf4e09D7o705U/DjCgMH09iCsbLmqQ38ONIRSHZaJtMDtNTHD1yi+jF+
|
||||
OT43gQKBgQC/2OHZoko6iRlNOAQ/tMVFNq7fL81GivoQ9F1U0Qr+DH3ZfaH8eIkX
|
||||
xT0ToMPJUzWAn8pZv0snA0um6SIgvkCuxO84OkANCVbttzXImIsL7pFzfcwV/ERK
|
||||
UM6j0ZuSMFOCr/lGPAoOQU0fskidGEHi1/kW+suSr28TqsyYZpwBDQ==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
subject=/C=US/O=AT&T Bell Laboratories/OU=Prototype Research CA
|
||||
issuer= /C=US/O=AT&T Bell Laboratories/OU=Prototype Research CA
|
||||
notBefore=950413210656Z
|
||||
notAfter =970412210656Z
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
|
||||
MIICCDCCAXECAQAwDQYJKoZIhvcNAQEEBQAwTjELMAkGA1UEBhMCVVMxHzAdBgNV
|
||||
BAoUFkFUJlQgQmVsbCBMYWJvcmF0b3JpZXMxHjAcBgNVBAsUFVByb3RvdHlwZSBS
|
||||
ZXNlYXJjaCBDQTAeFw05NTA0MTMyMTA2NTZaFw05NzA0MTIyMTA2NTZaME4xCzAJ
|
||||
BgNVBAYTAlVTMR8wHQYDVQQKFBZBVCZUIEJlbGwgTGFib3JhdG9yaWVzMR4wHAYD
|
||||
VQQLFBVQcm90b3R5cGUgUmVzZWFyY2ggQ0EwgZwwDQYJKoZIhvcNAQEBBQADgYoA
|
||||
MIGGAoGAebOmgtSCl+wCYZc86UGYeTLY8cjmW2P0FN8ToT/u2pECCoFdrlycX0OR
|
||||
3wt0ZhpFXLVNeDnHwEE9veNUih7pCL2ZBFqoIoQkB1lZmXRiVtjGonz8BLm/qrFM
|
||||
YHb0lme/Ol+s118mwKVxnn6bSAeI/OXKhLaVdYZWk+aEaxEDkVkCAQ8wDQYJKoZI
|
||||
hvcNAQEEBQADgYEAAZMG14lZmZ8bahkaHaTV9dQf4p2FZiQTFwHP9ZyGsXPC+LT5
|
||||
dG5iTaRmyjNIJdPWohZDl97kAci79aBndvuEvRKOjLHs3WRGBIwERnAcnY9Mz8u/
|
||||
zIHK23PjYVxGGaZd669OJwD0CYyqH22HH9nFUGaoJdsv39ChW0NRdLE9+y8=
|
||||
-----END X509 CERTIFICATE-----
|
||||
issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit)
|
||||
subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICJjCCAY8CAQAwDQYJKoZIhvcNAQEEBQAwXDELMAkGA1UEBhMCQVUxEzARBgNV
|
||||
BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYD
|
||||
VQQDExNUZXN0IFBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTc0M1oXDTAxMDYw
|
||||
OTEzNTc0M1owWzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY
|
||||
BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYDVQQDExJUZXN0IENBICgxMDI0
|
||||
IGJpdCkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKO7o8t116VP6cgybTsZ
|
||||
DCZhr95nYlZuya3aCi1IKoztqwWnjbmDFIriOqGFPrZQ+moMETC9D59iRW/dFXSv
|
||||
1F65ka/XY2hLh9exCCo7XuUcDs53Qp3bI3AmMqHjgzE8oO3ajyJAzJkTTOUecQU2
|
||||
mw/gI4tMM0LqWMQS7luTy4+xAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAM7achv3v
|
||||
hLQJcv/65eGEpBXM40ZDVoFQFFJWaY5p883HTqLB1x4FdzsXHH0QKBTcKpWwqyu4
|
||||
YDm3fb8oDugw72bCzfyZK/zVZPR/hVlqI/fvU109Qoc+7oPvIXWky71HfcK6ZBCA
|
||||
q30KIqGM/uoM60INq97qjDmCJapagcNBGQs=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXQIBAAKBgQCju6PLddelT+nIMm07GQwmYa/eZ2JWbsmt2gotSCqM7asFp425
|
||||
gxSK4jqhhT62UPpqDBEwvQ+fYkVv3RV0r9ReuZGv12NoS4fXsQgqO17lHA7Od0Kd
|
||||
2yNwJjKh44MxPKDt2o8iQMyZE0zlHnEFNpsP4COLTDNC6ljEEu5bk8uPsQIDAQAB
|
||||
AoGAVZmpFZsDZfr0l2S9tLLwpjRWNOlKATQkno6q2WesT0eGLQufTciY+c8ypfU6
|
||||
hyio8r5iUl/VhhdjhAtKx1mRpiotftHo/eYf8rtsrnprOnWG0bWjLjtIoMbcxGn2
|
||||
J3bN6LJmbJMjDs0eJ3KnTu646F3nDUw2oGAwmpzKXA1KAP0CQQDRvQhxk2D3Pehs
|
||||
HvG665u2pB5ipYQngEFlZO7RHJZzJOZEWSLuuMqaF/7pTfA5jiBvWqCgJeCRRInL
|
||||
21ru4dlPAkEAx9jj7BgKn5TYnMoBSSe0afjsV9oApVpN1Nacb1YDtCwy+scp3++s
|
||||
nFxlv98wxIlSdpwMUn+AUWfjiWR7Tu/G/wJBAJ/KjwZIrFVxewP0x2ILYsTRYLzz
|
||||
MS4PDsO7FB+I0i7DbBOifXS2oNSpd3I0CNMwrxFnUHzynpbOStVfN3ZL5w0CQQCa
|
||||
pwFahxBRhkJKsxhjoFJBX9yl75JoY4Wvm5Tbo9ih6UJaRx3kqfkN14L2BKYcsZgb
|
||||
KY9vmDOYy6iNfjDeWTfJAkBkfPUb8oTJ/nSP5zN6sqGxSY4krc4xLxpRmxoJ8HL2
|
||||
XfhqXkTzbU13RX9JJ/NZ8vQN9Vm2NhxRGJocQkmcdVtJ
|
||||
-----END RSA PRIVATE KEY-----
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
MIICYDCCAiACAgEoMAkGBSsOAwINBQAwfDELMAkGA1UEBhMCVVMxNjA0BgNVBAoT
|
||||
LU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFuZCBTcGFjZSBBZG1pbmlzdHJhdGlvbjEZ
|
||||
MBcGA1UECxMQVGVzdCBFbnZpcm9ubWVudDEaMBgGA1UECxMRRFNTLU5BU0EtUGls
|
||||
b3QtQ0EwHhcNOTYwMjI2MTYzMjQ1WhcNOTcwMjI1MTYzMjQ1WjB8MQswCQYDVQQG
|
||||
EwJVUzE2MDQGA1UEChMtTmF0aW9uYWwgQWVyb25hdXRpY3MgYW5kIFNwYWNlIEFk
|
||||
bWluaXN0cmF0aW9uMRkwFwYDVQQLExBUZXN0IEVudmlyb25tZW50MRowGAYDVQQL
|
||||
ExFEU1MtTkFTQS1QaWxvdC1DQTCB8jAJBgUrDgMCDAUAA4HkADCB4AJBAMA/ssKb
|
||||
hPNUG7ZlASfVwEJU21O5OyF/iyBzgHI1O8eOhJGUYO8cc8wDMjR508Mr9cp6Uhl/
|
||||
ZB7FV5GkLNEnRHYCQQDUEaSg45P2qrDwixTRhFhmWz5Nvc4lRFQ/42XPcchiJBLb
|
||||
bn3QK74T2IxY1yY+kCNq8XrIqf5fJJzIH0J/xUP3AhUAsg2wsQHfDGYk/BOSulX3
|
||||
fVd0geUCQQCzCFUQAh+ZkEmp5804cs6ZWBhrUAfnra8lJItYo9xPcXgdIfLfibcX
|
||||
R71UsyO77MRD7B0+Ag2tq794IleCVcEEMAkGBSsOAwINBQADLwAwLAIUUayDfreR
|
||||
Yh2WeU86/pHNdkUC1IgCFEfxe1f0oMpxJyrJ5XIxTi7vGdoK
|
||||
-----END X509 CERTIFICATE-----
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
|
||||
MIICGTCCAdgCAwCqTDAJBgUrDgMCDQUAMHwxCzAJBgNVBAYTAlVTMTYwNAYDVQQK
|
||||
Ey1OYXRpb25hbCBBZXJvbmF1dGljcyBhbmQgU3BhY2UgQWRtaW5pc3RyYXRpb24x
|
||||
GTAXBgNVBAsTEFRlc3QgRW52aXJvbm1lbnQxGjAYBgNVBAsTEURTUy1OQVNBLVBp
|
||||
bG90LUNBMB4XDTk2MDUxNDE3MDE0MVoXDTk3MDUxNDE3MDE0MVowMzELMAkGA1UE
|
||||
BhMCQVUxDzANBgNVBAoTBk1pbmNvbTETMBEGA1UEAxMKRXJpYyBZb3VuZzCB8jAJ
|
||||
BgUrDgMCDAUAA4HkADCB4AJBAKbfHz6vE6pXXMTpswtGUec2tvnfLJUsoxE9qs4+
|
||||
ObZX7LmLvragNPUeiTJx7UOWZ5DfBj6bXLc8eYne0lP1g3ACQQDUEaSg45P2qrDw
|
||||
ixTRhFhmWz5Nvc4lRFQ/42XPcchiJBLbbn3QK74T2IxY1yY+kCNq8XrIqf5fJJzI
|
||||
H0J/xUP3AhUAsg2wsQHfDGYk/BOSulX3fVd0geUCQQCzCFUQAh+ZkEmp5804cs6Z
|
||||
WBhrUAfnra8lJItYo9xPcXgdIfLfibcXR71UsyO77MRD7B0+Ag2tq794IleCVcEE
|
||||
MAkGBSsOAwINBQADMAAwLQIUWsuuJRE3VT4ueWkWMAJMJaZjj1ECFQCYY0zX4bzM
|
||||
LC7obsrHD8XAHG+ZRG==
|
||||
-----END X509 CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICTTCCAbagAwIBAgIBADANBgkqhkiG9w0BAQQFADBMMQswCQYDVQQGEwJHQjEM
|
||||
MAoGA1UEChMDVUNMMRgwFgYDVQQLEw9JQ0UtVEVMIFByb2plY3QxFTATBgNVBAMT
|
||||
DFRydXN0RmFjdG9yeTAeFw05NzA0MjIxNDM5MTRaFw05ODA0MjIxNDM5MTRaMEwx
|
||||
CzAJBgNVBAYTAkdCMQwwCgYDVQQKEwNVQ0wxGDAWBgNVBAsTD0lDRS1URUwgUHJv
|
||||
amVjdDEVMBMGA1UEAxMMVHJ1c3RGYWN0b3J5MIGcMAoGBFUIAQECAgQAA4GNADCB
|
||||
iQKBgQCEieR8NcXkUW1f0G6aC6u0i8q/98JqS6RxK5YmHIGKCkuTWAUjzLfUa4dt
|
||||
U9igGCjTuxaDqlzEim+t/02pmiBZT9HaX++35MjQPUWmsChcYU5WyzGErXi+rQaw
|
||||
zlwS73zM8qiPj/97lXYycWhgL0VaiDSPxRXEUdWoaGruom4mNQIDAQABo0IwQDAd
|
||||
BgNVHQ4EFgQUHal1LZr7oVg5z6lYzrhTgZRCmcUwDgYDVR0PAQH/BAQDAgH2MA8G
|
||||
A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAfaggfl6FZoioecjv0dq8
|
||||
/DXo/u11iMZvXn08gjX/zl2b4wtPbShOSY5FhkSm8GeySasz+/Nwb/uzfnIhokWi
|
||||
lfPZHtlCWtXbIy/TN51eJyq04ceDCQDWvLC2enVg9KB+GJ34b5c5VaPRzq8MBxsA
|
||||
S7ELuYGtmYgYm9NZOIr7yU0=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB6jCCAZQCAgEtMA0GCSqGSIb3DQEBBAUAMIGAMQswCQYDVQQGEwJVUzE2MDQG
|
||||
A1UEChMtTmF0aW9uYWwgQWVyb25hdXRpY3MgYW5kIFNwYWNlIEFkbWluaXN0cmF0
|
||||
aW9uMRkwFwYDVQQLExBUZXN0IEVudmlyb25tZW50MR4wHAYDVQQLExVNRDUtUlNB
|
||||
LU5BU0EtUGlsb3QtQ0EwHhcNOTYwNDMwMjIwNTAwWhcNOTcwNDMwMjIwNTAwWjCB
|
||||
gDELMAkGA1UEBhMCVVMxNjA0BgNVBAoTLU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFu
|
||||
ZCBTcGFjZSBBZG1pbmlzdHJhdGlvbjEZMBcGA1UECxMQVGVzdCBFbnZpcm9ubWVu
|
||||
dDEeMBwGA1UECxMVTUQ1LVJTQS1OQVNBLVBpbG90LUNBMFkwCgYEVQgBAQICAgAD
|
||||
SwAwSAJBALmmX5+GqAvcrWK13rfDrNX9UfeA7f+ijyBgeFQjYUoDpFqapw4nzQBL
|
||||
bAXug8pKkRwa2Zh8YODhXsRWu2F/UckCAwEAATANBgkqhkiG9w0BAQQFAANBAH9a
|
||||
OBA+QCsjxXgnSqHx04gcU8S49DVUb1f2XVoLnHlIb8RnX0k5O6mpHT5eti9bLkiW
|
||||
GJNMJ4L0AJ/ac+SmHZc=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICajCCAdMCBDGA0QUwDQYJKoZIhvcNAQEEBQAwfTELMAkGA1UEBhMCQ2ExDzAN
|
||||
BgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmlsaXR5IEFjY2VwdGVkMR8w
|
||||
HQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRwwGgYDVQQDExNFbnRydXN0
|
||||
IERlbW8gV2ViIENBMB4XDTk2MDQyNjEzMzUwMVoXDTA2MDQyNjEzMzUwMVowfTEL
|
||||
MAkGA1UEBhMCQ2ExDzANBgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmls
|
||||
aXR5IEFjY2VwdGVkMR8wHQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRww
|
||||
GgYDVQQDExNFbnRydXN0IERlbW8gV2ViIENBMIGdMA0GCSqGSIb3DQEBAQUAA4GL
|
||||
ADCBhwKBgQCaroS7O1DA0hm4IefNYU1cx/nqOmzEnk291d1XqznDeF4wEgakbkCc
|
||||
zTKxK791yNpXG5RmngqH7cygDRTHZJ6mfCRn0wGC+AI00F2vYTGqPGRQL1N3lZT0
|
||||
YDKFC0SQeMMjFIZ1aeQigroFQnHo0VB3zWIMpNkka8PY9lxHZAmWwQIBAzANBgkq
|
||||
hkiG9w0BAQQFAAOBgQBAx0UMVA1s54lMQyXjMX5kj99FJN5itb8bK1Rk+cegPQPF
|
||||
cWO9SEWyEjjBjIkjjzAwBkaEszFsNGxemxtXvwjIm1xEUMTVlPEWTs2qnDvAUA9W
|
||||
YqhWbhH0toGT36236QAsqCZ76rbTRVSSX2BHyJwJMG2tCRv7kRJ//NIgxj3H4w==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit)
|
||||
subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit)
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICJzCCAZACAQAwDQYJKoZIhvcNAQEEBQAwXDELMAkGA1UEBhMCQVUxEzARBgNV
|
||||
BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYD
|
||||
VQQDExNUZXN0IFBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTczN1oXDTAxMDYw
|
||||
OTEzNTczN1owXDELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY
|
||||
BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYDVQQDExNUZXN0IFBDQSAoMTAy
|
||||
NCBiaXQpMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdoWk/3+WcMlfjIrkg
|
||||
40ketmnQaEogQe1LLcuOJV6rKfUSAsPgwgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp
|
||||
22Jp85PmemiDzyUIStwk72qhp1imbANZvlmlCFKiQrjUyuDfu4TABmn+kkt3vR1Y
|
||||
BEOGt+IFye1UBVSATVdRJ2UVhwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABNA1u/S
|
||||
Cg/LJZWb7GliiKJsvuhxlE4E5JxQF2zMub/CSNbF97//tYSyj96sxeFQxZXbcjm9
|
||||
xt6mr/xNLA4szNQMJ4P+L7b5e/jC5DSqlwS+CUYJgaFs/SP+qJoCSu1bR3IM9XWO
|
||||
cRBpDmcBbYLkSyB92WURvsZ1LtjEcn+cdQVI
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXAIBAAKBgQCdoWk/3+WcMlfjIrkg40ketmnQaEogQe1LLcuOJV6rKfUSAsPg
|
||||
wgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp22Jp85PmemiDzyUIStwk72qhp1imbANZ
|
||||
vlmlCFKiQrjUyuDfu4TABmn+kkt3vR1YBEOGt+IFye1UBVSATVdRJ2UVhwIDAQAB
|
||||
AoGAba4fTtuap5l7/8ZsbE7Z1O32KJY4ZcOZukLOLUUhXxXduT+FTgGWujc0/rgc
|
||||
z9qYCLlNZHOouMYTgtSfYvuMuLZ11VIt0GYH+nRioLShE59Yy+zCRyC+gPigS1kz
|
||||
xvo14AsOIPYV14Tk/SsHyq6E0eTk7VzaIE197giiINUERPECQQDSKmtPTh/lRKw7
|
||||
HSZSM0I1mFWn/1zqrAbontRQY5w98QWIOe5qmzYyFbPXYT3d9BzlsMyhgiRNoBbD
|
||||
yvohSHXJAkEAwAHx6ezAZeWWzD5yXD36nyjpkVCw7Tk7TSmOceLJMWt1QcrCfqlS
|
||||
xA5jjpQ6Z8suU5DdtWAryM2sAir1WisYzwJAd6Zcx56jvAQ3xcPXsE6scBTVFzrj
|
||||
7FqZ6E+cclPzfLQ+QQsyOBE7bpI6e/FJppY26XGZXo3YGzV8IGXrt40oOQJALETG
|
||||
h86EFXo3qGOFbmsDy4pdP5nBERCu8X1xUCSfintiD4c2DInxgS5oGclnJeMcjTvL
|
||||
QjQoJCX3UJCi/OUO1QJBAKgcDHWjMvt+l1pjJBsSEZ0HX9AAIIVx0RQmbFGS+F2Q
|
||||
hhu5l77WnnZOQ9vvhV5u7NPCUF9nhU3jh60qWWO8mkc=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
subject=/C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority
|
||||
issuer= /C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority
|
||||
notBefore=941104185834Z
|
||||
notAfter =991103185834Z
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
|
||||
MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw
|
||||
HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy
|
||||
Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
|
||||
OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
|
||||
ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
|
||||
IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
|
||||
975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
|
||||
touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
|
||||
7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
|
||||
9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
|
||||
0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb
|
||||
MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
|
||||
-----END X509 CERTIFICATE-----
|
||||
subject=/C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
|
||||
issuer= /C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
|
||||
notBefore=941109235417Z
|
||||
notAfter =991231235417Z
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
|
||||
MIICKTCCAZYCBQJBAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMSAw
|
||||
HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJl
|
||||
IFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDkyMzU0MTda
|
||||
Fw05OTEyMzEyMzU0MTdaMF8xCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0
|
||||
YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJlIFNlcnZlciBDZXJ0aWZp
|
||||
Y2F0aW9uIEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCSznrB
|
||||
roM+WqqJg1esJQF2DK2ujiw3zus1eGRUA+WEQFHJv48I4oqCCNIWhjdV6bEhAq12
|
||||
aIGaBaJLyUslZiJWbIgHj/eBWW2EB2VwE3F2Ppt3TONQiVaYSLkdpykaEy5KEVmc
|
||||
HhXVSVQsczppgrGXOZxtcGdI5d0t1sgeewIDAQABMA0GCSqGSIb3DQEBAgUAA34A
|
||||
iNHReSHO4ovo+MF9NFM/YYPZtgs4F7boviGNjwC4i1N+RGceIr2XJ+CchcxK9oU7
|
||||
suK+ktPlDemvXA4MRpX/oRxePug2WHpzpgr4IhFrwwk4fia7c+8AvQKk8xQNMD9h
|
||||
cHsg/jKjn7P0Z1LctO6EjJY2IN6BCINxIYoPnqk=
|
||||
-----END X509 CERTIFICATE-----
|
||||
subject=/C=ZA/SP=Western Cape/L=Cape Town/O=Thawte Consulting cc
|
||||
/OU=Certification Services Division/CN=Thawte Server CA
|
||||
/Email=server-certs@thawte.com
|
||||
issuer= /C=ZA/SP=Western Cape/L=Cape Town/O=Thawte Consulting cc
|
||||
/OU=Certification Services Division/CN=Thawte Server CA
|
||||
/Email=server-certs@thawte.com
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC+TCCAmICAQAwDQYJKoZIhvcNAQEEBQAwgcQxCzAJBgNVBAYTAlpBMRUwEwYD
|
||||
VQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU
|
||||
VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy
|
||||
dmljZXMgRGl2aXNpb24xGTAXBgNVBAMTEFRoYXd0ZSBTZXJ2ZXIgQ0ExJjAkBgkq
|
||||
hkiG9w0BCQEWF3NlcnZlci1jZXJ0c0B0aGF3dGUuY29tMB4XDTk2MDcyNzE4MDc1
|
||||
N1oXDTk4MDcyNzE4MDc1N1owgcQxCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0
|
||||
ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMUVGhhd3RlIENv
|
||||
bnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2
|
||||
aXNpb24xGTAXBgNVBAMTEFRoYXd0ZSBTZXJ2ZXIgQ0ExJjAkBgkqhkiG9w0BCQEW
|
||||
F3NlcnZlci1jZXJ0c0B0aGF3dGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
|
||||
iQKBgQDTpFBuyP9Wa+bPXbbqDGh1R6KqwtqEJfyo9EdR2oW1IHSUhh4PdcnpCGH1
|
||||
Bm0wbhUZAulSwGLbTZme4moMRDjN/r7jZAlwxf6xaym2L0nIO9QnBCUQly/nkG3A
|
||||
KEKZ10xD3sP1IW1Un13DWOHA5NlbsLjctHvfNjrCtWYiEtaHDQIDAQABMA0GCSqG
|
||||
SIb3DQEBBAUAA4GBAIsvn7ifX3RUIrvYXtpI4DOfARkTogwm6o7OwVdl93yFhDcX
|
||||
7h5t0XZ11MUAMziKdde3rmTvzUYIUCYoY5b032IwGMTvdiclK+STN6NP2m5nvFAM
|
||||
qJT5gC5O+j/jBuZRQ4i0AMYQr5F4lT8oBJnhgafw6PL8aDY2vMHGSPl9+7uf
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDDTCCAnYCAQAwDQYJKoZIhvcNAQEEBQAwgc4xCzAJBgNVBAYTAlpBMRUwEwYD
|
||||
VQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU
|
||||
VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy
|
||||
dmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBD
|
||||
QTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTAeFw05
|
||||
NjA3MjcxODA3MTRaFw05ODA3MjcxODA3MTRaMIHOMQswCQYDVQQGEwJaQTEVMBMG
|
||||
A1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xHTAbBgNVBAoT
|
||||
FFRoYXd0ZSBDb25zdWx0aW5nIGNjMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNl
|
||||
cnZpY2VzIERpdmlzaW9uMSEwHwYDVQQDExhUaGF3dGUgUHJlbWl1bSBTZXJ2ZXIg
|
||||
Q0ExKDAmBgkqhkiG9w0BCQEWGXByZW1pdW0tc2VydmVyQHRoYXd0ZS5jb20wgZ8w
|
||||
DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANI2NmqL18JbntqBQWKPOO5JBFXW0O8c
|
||||
G5UWR+8YSDU6UvQragaPOy/qVuOvho2eF/eetGV1Ak3vywmiIVHYm9Bn0LoNkgYU
|
||||
c9STy5cqAJxcTgy8+hVS/PJEbtoRSm4Iny8t4/mqOoZztkZTWMiJBb2DEbhzP6oH
|
||||
jfRCTedAnRw3AgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAutFIgTRZVYerIZfL9lvR
|
||||
w9Eifvvo5KTZ3h+Bj+VzNnyw4Qc/IyXkPOu6SIiH9LQ3sCmWBdxpe+qr4l77rLj2
|
||||
GYuMtESFfn1XVALzkYgC7JcPuTOjMfIiMByt+uFf8AV8x0IW/Qkuv+hEQcyM9vxK
|
||||
3VZdLbCVIhNoEsysrxCpxcI=
|
||||
-----END CERTIFICATE-----
|
||||
Tims test GCI CA
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB8DCCAZoCAQAwDQYJKoZIhvcNAQEEBQAwgYIxCzAJBgNVBAYTAkFVMRMwEQYD
|
||||
VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5
|
||||
cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2RldmVsb3BtZW50MRkwFwYDVQQDExBD
|
||||
cnlwdFNvZnQgRGV2IENBMB4XDTk3MDMyMjEzMzQwNFoXDTk4MDMyMjEzMzQwNFow
|
||||
gYIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhC
|
||||
cmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2Rl
|
||||
dmVsb3BtZW50MRkwFwYDVQQDExBDcnlwdFNvZnQgRGV2IENBMFwwDQYJKoZIhvcN
|
||||
AQEBBQADSwAwSAJBAOAOAqogG5QwAmLhzyO4CoRnx/wVy4NZP4dxJy83O1EnL0rw
|
||||
OdsamJKvPOLHgSXo3gDu9uVyvCf/QJmZAmC5ml8CAwEAATANBgkqhkiG9w0BAQQF
|
||||
AANBADRRS/GVdd7rAqRW6SdmgLJduOU2yq3avBu99kRqbp9A/dLu6r6jU+eP4oOA
|
||||
TfdbFZtAAD2Hx9jUtY3tfdrJOb8=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICVjCCAgACAQAwDQYJKoZIhvcNAQEEBQAwgbUxCzAJBgNVBAYTAkFVMRMwEQYD
|
||||
VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5
|
||||
cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsTI1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9O
|
||||
IEFVVEhPUklUSUVTMTQwMgYDVQQDEytaRVJPIFZBTFVFIENBIC0gREVNT05TVFJB
|
||||
VElPTiBQVVJQT1NFUyBPTkxZMB4XDTk3MDQwMzEzMjI1NFoXDTk4MDQwMzEzMjI1
|
||||
NFowgbUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH
|
||||
EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsT
|
||||
I1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9OIEFVVEhPUklUSUVTMTQwMgYDVQQDEyta
|
||||
RVJPIFZBTFVFIENBIC0gREVNT05TVFJBVElPTiBQVVJQT1NFUyBPTkxZMFwwDQYJ
|
||||
KoZIhvcNAQEBBQADSwAwSAJBAOZ7T7yqP/tyspcko3yPY1y0Cm2EmwNvzW4QgVXR
|
||||
Fjs3HmJ4xtSpXdo6mwcGezL3Abt/aQXaxv9PU8xt+Jr0OFUCAwEAATANBgkqhkiG
|
||||
9w0BAQQFAANBAOQpYmGgyCqCy1OljgJhCqQOu627oVlHzK1L+t9vBaMfn40AVUR4
|
||||
WzQVWO31KTgi5vTK1U+3h46fgUWqQ0h+6rU=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIAwgKADAgECAgEAMA0GCSqGSIb3DQEBBAUAMGIxETAPBgNVBAcTCEludGVybmV0
|
||||
MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24gQ2xh
|
||||
c3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjAeFw05NjA0MDgxMDIwMjda
|
||||
Fw05NzA0MDgxMDIwMjdaMGIxETAPBgNVBAcTCEludGVybmV0MRcwFQYDVQQKEw5W
|
||||
ZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24gQ2xhc3MgMSBDQSAtIElu
|
||||
ZGl2aWR1YWwgU3Vic2NyaWJlcjCAMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2
|
||||
FKbPTdAFDdjKI9BvqrQpkmOOLPhvltcunXZLEbE2jVfJw/0cxrr+Hgi6M8qV6r7j
|
||||
W80GqLd5HUQq7XPysVKDaBBwZJHXPmv5912dFEObbpdFmIFH0S3L3bty10w/cari
|
||||
QPJUObwW7s987LrbP2wqsxaxhhKdrpM01bjV0Pc+qQIDAQABAAAAADANBgkqhkiG
|
||||
9w0BAQQFAAOBgQA+1nJryNt8VBRjRr07ArDAV/3jAH7GjDc9jsrxZS68ost9v06C
|
||||
TvTNKGL+LISNmFLXl+JXhgGB0JZ9fvyYzNgHQ46HBUng1H6voalfJgS2KdEo50wW
|
||||
8EFZYMDkT1k4uynwJqkVN2QJK/2q4/A/VCov5h6SlM8Affg2W+1TLqvqkwAA
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
subject=/L=Internet/O=VeriSign, Inc./OU=VeriSign Class 2 CA - Individual Subscriber
|
||||
issuer= /L=Internet/O=VeriSign, Inc./OU=VeriSign Class 2 CA - Individual Subscriber
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEkzCCA/ygAwIBAgIRANDTUpSRL3nTFeMrMayFSPAwDQYJKoZIhvcNAQECBQAw
|
||||
YjERMA8GA1UEBxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQw
|
||||
MgYDVQQLEytWZXJpU2lnbiBDbGFzcyAyIENBIC0gSW5kaXZpZHVhbCBTdWJzY3Jp
|
||||
YmVyMB4XDTk2MDYwNDAwMDAwMFoXDTk4MDYwNDIzNTk1OVowYjERMA8GA1UEBxMI
|
||||
SW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJp
|
||||
U2lnbiBDbGFzcyAyIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMIGfMA0GCSqG
|
||||
SIb3DQEBAQUAA4GNADCBiQKBgQC6A+2czKGRcYMfm8gdnk+0de99TDDzsqo0v5nb
|
||||
RsbUmMcdRQ7nsMbRWe0SAb/9QoLTZ/cJ0iOBqdrkz7UpqqKarVoTSdlSMVM92tWp
|
||||
3bJncZHQD1t4xd6lQVdI1/T6R+5J0T1ukOdsI9Jmf+F28S6g3R3L1SFwiHKeZKZv
|
||||
z+793wIDAQABo4ICRzCCAkMwggIpBgNVHQMBAf8EggIdMIICGTCCAhUwggIRBgtg
|
||||
hkgBhvhFAQcBATCCAgAWggGrVGhpcyBjZXJ0aWZpY2F0ZSBpbmNvcnBvcmF0ZXMg
|
||||
YnkgcmVmZXJlbmNlLCBhbmQgaXRzIHVzZSBpcyBzdHJpY3RseSBzdWJqZWN0IHRv
|
||||
LCB0aGUgVmVyaVNpZ24gQ2VydGlmaWNhdGlvbiBQcmFjdGljZSBTdGF0ZW1lbnQg
|
||||
KENQUyksIGF2YWlsYWJsZSBhdDogaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL0NQ
|
||||
Uy0xLjA7IGJ5IEUtbWFpbCBhdCBDUFMtcmVxdWVzdHNAdmVyaXNpZ24uY29tOyBv
|
||||
ciBieSBtYWlsIGF0IFZlcmlTaWduLCBJbmMuLCAyNTkzIENvYXN0IEF2ZS4sIE1v
|
||||
dW50YWluIFZpZXcsIENBIDk0MDQzIFVTQSBUZWwuICsxICg0MTUpIDk2MS04ODMw
|
||||
IENvcHlyaWdodCAoYykgMTk5NiBWZXJpU2lnbiwgSW5jLiAgQWxsIFJpZ2h0cyBS
|
||||
ZXNlcnZlZC4gQ0VSVEFJTiBXQVJSQU5USUVTIERJU0NMQUlNRUQgYW5kIExJQUJJ
|
||||
TElUWSBMSU1JVEVELqAOBgxghkgBhvhFAQcBAQGhDgYMYIZIAYb4RQEHAQECMC8w
|
||||
LRYraHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEuMDAU
|
||||
BglghkgBhvhCAQEBAf8EBAMCAgQwDQYJKoZIhvcNAQECBQADgYEApRJRkNBqLLgs
|
||||
53IR/d18ODdLOWMTZ+QOOxBrq460iBEdUwgF8vmPRX1ku7UiDeNzaLlurE6eFqHq
|
||||
2zPyK5j60zfTLVJMWKcQWwTJLjHtXrW8pxhNtFc6Fdvy5ZkHnC/9NIl7/t4U6WqB
|
||||
p4y+p7SdMIkEwIZfds0VbnQyX5MRUJY=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
|
||||
issuer= /C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICMTCCAZoCBQKhAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw
|
||||
FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMg
|
||||
UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa
|
||||
Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln
|
||||
biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp
|
||||
Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAyVxZ
|
||||
nvIbigEUtBDfBEDb41evakVAj4QMC9Ez2dkRz+4CWB8l9yqoRAWq7AMfeH+ek7ma
|
||||
AKojfdashaJjRcdyJ8z0TMZ1cdI5709C8HXfCpDGjiBvmA/4rCNfcCk2pMmG57Ga
|
||||
IMtTpYXnPb59mv4kRTPcdhXtD6JxZExlLoFoRacCAwEAATANBgkqhkiG9w0BAQIF
|
||||
AAOBgQB1Zmw+0c2B27X4LzZRtvdCvM1Cr9wO+hVs+GeTVzrrtpLotgHKjLeOQ7RJ
|
||||
Zfk+7r11Ri7J/CVdqMcvi5uPaM+0nJcYwE3vH9mvgrPmZLiEXIqaB1JDYft0nls6
|
||||
NvxMsvwaPxUupVs8G5DsiCnkWRb5zget7Ond2tIxik/W2O8XjQ==
|
||||
-----END CERTIFICATE-----
|
||||
subject=/C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority
|
||||
issuer= /C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICMTCCAZoCBQKmAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw
|
||||
FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMg
|
||||
UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa
|
||||
Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln
|
||||
biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp
|
||||
Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LJ1
|
||||
9njQrlpQ9OlQqZ+M1++RlHDo0iSQdomF1t+s5gEXMoDwnZNHvJplnR+Xrr/phnVj
|
||||
IIm9gFidBAydqMEk6QvlMXi9/C0MN2qeeIDpRnX57aP7E3vIwUzSo+/1PLBij0pd
|
||||
O92VZ48TucE81qcmm+zDO3rZTbxtm+gVAePwR6kCAwEAATANBgkqhkiG9w0BAQIF
|
||||
AAOBgQBT3dPwnCR+QKri/AAa19oM/DJhuBUNlvP6Vxt/M3yv6ZiaYch6s7f/sdyZ
|
||||
g9ysEvxwyR84Qu1E9oAuW2szaayc01znX1oYx7EteQSWQZGZQbE8DbqEOcY7l/Am
|
||||
yY7uvcxClf8exwI/VAx49byqYHwCaejcrOICdmHEPgPq0ook0Q==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
420
apps/server2.pem
420
apps/server2.pem
@@ -1,376 +1,52 @@
|
||||
issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
|
||||
subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Server test cert (1024 bit)
|
||||
subject= C = UK, O = OpenSSL Group, OU = FOR TESTING PURPOSES ONLY, CN = Test Server Cert #2
|
||||
issuer= C = UK, O = OpenSSL Group, OU = FOR TESTING PURPOSES ONLY, CN = OpenSSL Test Intermediate CA
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICLjCCAZcCAQEwDQYJKoZIhvcNAQEEBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV
|
||||
BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD
|
||||
VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNOTcwNjA5MTM1NzU0WhcNOTgwNjA5
|
||||
MTM1NzU0WjBkMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG
|
||||
A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxJDAiBgNVBAMTG1NlcnZlciB0ZXN0IGNl
|
||||
cnQgKDEwMjQgYml0KTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsxH1PBPm
|
||||
RkxrR11eV4bzNi4N9n11CI8nV29+ARlT1+qDe/mjVUvXlmsr1v/vf71G9GgqopSa
|
||||
6RXrICLVdk/FYYYzhPvl1M+OrjaXDFO8BzBAF1Lnz6c7aRZvGRJNrRSr2nZEkqDf
|
||||
JW9dY7r2VZEpD5QeuaRYUnuECkqeieB65GMCAwEAATANBgkqhkiG9w0BAQQFAAOB
|
||||
gQCWsOta6C0wiVzXz8wPmJKyTrurMlgUss2iSuW9366iwofZddsNg7FXniMzkIf6
|
||||
dp7jnmWZwKZ9cXsNUS2o4OL07qOk2HOywC0YsNZQsOBu1CBTYYkIefDiKFL1zQHh
|
||||
8lwwNd4NP+OE3NzUNkCfh4DnFfg9WHkXUlD5UpxNRJ4gJA==
|
||||
MIID6jCCAtKgAwIBAgIJALnu1NlVpZ60MA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNV
|
||||
BAYTAlVLMRYwFAYDVQQKDA1PcGVuU1NMIEdyb3VwMSIwIAYDVQQLDBlGT1IgVEVT
|
||||
VElORyBQVVJQT1NFUyBPTkxZMSUwIwYDVQQDDBxPcGVuU1NMIFRlc3QgSW50ZXJt
|
||||
ZWRpYXRlIENBMB4XDTExMTIwODE0MDE0OFoXDTIxMTAxNjE0MDE0OFowZzELMAkG
|
||||
A1UEBhMCVUsxFjAUBgNVBAoMDU9wZW5TU0wgR3JvdXAxIjAgBgNVBAsMGUZPUiBU
|
||||
RVNUSU5HIFBVUlBPU0VTIE9OTFkxHDAaBgNVBAMME1Rlc3QgU2VydmVyIENlcnQg
|
||||
IzIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDrdi7j9yctG+L4EjBy
|
||||
gjPmEqZzOJEQba26MoQGzglU7e5Xf59Rb/hgVQuKAoiZe7/R8rK4zJ4W7iXdXw0L
|
||||
qBpyG8B5aGKeI32w+A9TcBApoXXL2CrYQEQjZwUIpLlYBIi2NkJj3nVkq5dgl1gO
|
||||
ALiQ+W8jg3kzg5Ec9rimp9r93N8wsSL3awsafurmYCvOf7leHaMP1WJ/zDRGUNHG
|
||||
/WtDjXc8ZUG1+6EXU9Jc2Fs+2Omf7fcN0l00AK/wPg8OaNS0rKyGq9JdIT9FRGV1
|
||||
bXe/rx58FaE5CItdwCSYhJvF/O95LWQoxJXye5bCFLmvDTEyVq9FMSCptfsmbXjE
|
||||
ZGsXAgMBAAGjgY8wgYwwDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCBeAwLAYJ
|
||||
YIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1Ud
|
||||
DgQWBBR52UaWWTKzZGDH/X4mWNcuqeQVazAfBgNVHSMEGDAWgBQ2w2yI55X+sL3s
|
||||
zj49hqshgYfa2jANBgkqhkiG9w0BAQUFAAOCAQEANBW+XYLlHBqVY/31ie+3gRlS
|
||||
LPfy4SIqn0t3RJjagT29MXprblBO2cbMO8VGjkQdKGpmMXjxbht2arOOUXRHX4n/
|
||||
XTyn/QHEf0bcwIITMReO3DZUPAEw8hSjn9xEOM0IRVOCP+mH5fi74QzzQaZVCyYg
|
||||
5VtLKdww/+sc0nCbKl2KWgDluriH0nfVx95qgW3mg9dhXRr0zmf1w2zkBHYpARYL
|
||||
Dew6Z8EE4tS3HJu8/qM6meWzNtrfonQ3eiiMxjZBxzV46jchBwa2z9XYhP6AmpPb
|
||||
oeTSzcQNbWsxaGYzWo46oLDUZmJOwSBawbS31bZNMCoPIY6ukoesCzFSsUKZww==
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXgIBAAKBgQCzEfU8E+ZGTGtHXV5XhvM2Lg32fXUIjydXb34BGVPX6oN7+aNV
|
||||
S9eWayvW/+9/vUb0aCqilJrpFesgItV2T8VhhjOE++XUz46uNpcMU7wHMEAXUufP
|
||||
pztpFm8ZEk2tFKvadkSSoN8lb11juvZVkSkPlB65pFhSe4QKSp6J4HrkYwIDAQAB
|
||||
AoGBAKy8jvb0Lzby8q11yNLf7+78wCVdYi7ugMHcYA1JVFK8+zb1WfSm44FLQo/0
|
||||
dSChAjgz36TTexeLODPYxleJndjVcOMVzsLJjSM8dLpXsTS4FCeMbhw2s2u+xqKY
|
||||
bbPWfk+HOTyJjfnkcC5Nbg44eOmruq0gSmBeUXVM5UntlTnxAkEA7TGCA3h7kx5E
|
||||
Bl4zl2pc3gPAGt+dyfk5Po9mGJUUXhF5p2zueGmYWW74TmOWB1kzt4QRdYMzFePq
|
||||
zfDNXEa1CwJBAMFErdY0xp0UJ13WwBbUTk8rujqQdHtjw0klhpbuKkjxu2hN0wwM
|
||||
6p0D9qxF7JHaghqVRI0fAW/EE0OzdHMR9QkCQQDNR26dMFXKsoPu+vItljj/UEGf
|
||||
QG7gERiQ4yxaFBPHgdpGo0kT31eh9x9hQGDkxTe0GNG/YSgCRvm8+C3TMcKXAkBD
|
||||
dhGn36wkUFCddMSAM4NSJ1VN8/Z0y5HzCmI8dM3VwGtGMUQlxKxwOl30LEQzdS5M
|
||||
0SWojNYXiT2gOBfBwtbhAkEAhafl5QEOIgUz+XazS/IlZ8goNKdDVfYgK3mHHjvv
|
||||
nY5G+AuGebdNkXJr4KSWxDcN+C2i47zuj4QXA16MAOandA==
|
||||
MIIEowIBAAKCAQEA63Yu4/cnLRvi+BIwcoIz5hKmcziREG2tujKEBs4JVO3uV3+f
|
||||
UW/4YFULigKImXu/0fKyuMyeFu4l3V8NC6gachvAeWhiniN9sPgPU3AQKaF1y9gq
|
||||
2EBEI2cFCKS5WASItjZCY951ZKuXYJdYDgC4kPlvI4N5M4ORHPa4pqfa/dzfMLEi
|
||||
92sLGn7q5mArzn+5Xh2jD9Vif8w0RlDRxv1rQ413PGVBtfuhF1PSXNhbPtjpn+33
|
||||
DdJdNACv8D4PDmjUtKyshqvSXSE/RURldW13v68efBWhOQiLXcAkmISbxfzveS1k
|
||||
KMSV8nuWwhS5rw0xMlavRTEgqbX7Jm14xGRrFwIDAQABAoIBAHLsTPihIfLnYIE5
|
||||
x4GsQQ5zXeBw5ITDM37ktwHnQDC+rIzyUl1aLD1AZRBoKinXd4lOTqLZ4/NHKx4A
|
||||
DYr58mZtWyUmqLOMmQVuHXTZBlp7XtYuXMMNovQwjQlp9LicBeoBU6gQ5PVMtubD
|
||||
F4xGF89Sn0cTHW3iMkqTtQ5KcR1j57OcJO0FEb1vPvk2MXI5ZyAatUYE7YacbEzd
|
||||
rg02uIwx3FqNSkuSI79uz4hMdV5TPtuhxx9nTwj9aLUhXFeZ0mn2PVgVzEnnMoJb
|
||||
+znlsZDgzDlJqdaD744YGWh8Z3OEssB35KfzFcdOeO6yH8lmv2Zfznk7pNPT7LTb
|
||||
Lae9VgkCgYEA92p1qnAB3NtJtNcaW53i0S5WJgS1hxWKvUDx3lTB9s8X9fHpqL1a
|
||||
E94fDfWzp/hax6FefUKIvBOukPLQ6bYjTMiFoOHzVirghAIuIUoMI5VtLhwD1hKs
|
||||
Lr7l/dptMgKb1nZHyXoKHRBthsy3K4+udsPi8TzMvYElgEqyQIe/Rk0CgYEA86GL
|
||||
8HC6zLszzKERDPBxrboRmoFvVUCTQDhsfj1M8aR3nQ8V5LkdIJc7Wqm/Ggfk9QRf
|
||||
rJ8M2WUMlU5CNnCn/KCrKzCNZIReze3fV+HnKdbcXGLvgbHPrhnz8yYehUFG+RGq
|
||||
bVyDWRU94T38izy2s5qMYrMJWZEYyXncSPbfcPMCgYAtaXfxcZ+V5xYPQFARMtiX
|
||||
5nZfggvDoJuXgx0h3tK/N2HBfcaSdzbaYLG4gTmZggc/jwnl2dl5E++9oSPhUdIG
|
||||
3ONSFUbxsOsGr9PBvnKd8WZZyUCXAVRjPBzAzF+whzQNWCZy/5htnz9LN7YDI9s0
|
||||
5113Q96cheDZPFydZY0hHQKBgQDVbEhNukM5xCiNcu+f2SaMnLp9EjQ4h5g3IvaP
|
||||
5B16daw/Dw8LzcohWboqIxeAsze0GD/D1ZUJAEd0qBjC3g+a9BjefervCjKOzXng
|
||||
38mEUm+6EwVjJSQcjSmycEs+Sr/kwr/8i5WYvU32+jk4tFgMoC+o6tQe/Uesf68k
|
||||
z/dPVwKBgGbF7Vv1/3SmhlOy+zYyvJ0CrWtKxH9QP6tLIEgEpd8x7YTSuCH94yok
|
||||
kToMXYA3sWNPt22GbRDZ+rcp4c7HkDx6I6vpdP9aQEwJTp0EPy0sgWr2XwYmreIQ
|
||||
NFmkk8Itn9EY2R9VBaP7GLv5kvwxDdLAnmwGmzVtbmaVdxCaBwUk
|
||||
-----END RSA PRIVATE KEY-----
|
||||
subject=/C=US/O=AT&T Bell Laboratories/OU=Prototype Research CA
|
||||
issuer= /C=US/O=AT&T Bell Laboratories/OU=Prototype Research CA
|
||||
notBefore=950413210656Z
|
||||
notAfter =970412210656Z
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
|
||||
MIICCDCCAXECAQAwDQYJKoZIhvcNAQEEBQAwTjELMAkGA1UEBhMCVVMxHzAdBgNV
|
||||
BAoUFkFUJlQgQmVsbCBMYWJvcmF0b3JpZXMxHjAcBgNVBAsUFVByb3RvdHlwZSBS
|
||||
ZXNlYXJjaCBDQTAeFw05NTA0MTMyMTA2NTZaFw05NzA0MTIyMTA2NTZaME4xCzAJ
|
||||
BgNVBAYTAlVTMR8wHQYDVQQKFBZBVCZUIEJlbGwgTGFib3JhdG9yaWVzMR4wHAYD
|
||||
VQQLFBVQcm90b3R5cGUgUmVzZWFyY2ggQ0EwgZwwDQYJKoZIhvcNAQEBBQADgYoA
|
||||
MIGGAoGAebOmgtSCl+wCYZc86UGYeTLY8cjmW2P0FN8ToT/u2pECCoFdrlycX0OR
|
||||
3wt0ZhpFXLVNeDnHwEE9veNUih7pCL2ZBFqoIoQkB1lZmXRiVtjGonz8BLm/qrFM
|
||||
YHb0lme/Ol+s118mwKVxnn6bSAeI/OXKhLaVdYZWk+aEaxEDkVkCAQ8wDQYJKoZI
|
||||
hvcNAQEEBQADgYEAAZMG14lZmZ8bahkaHaTV9dQf4p2FZiQTFwHP9ZyGsXPC+LT5
|
||||
dG5iTaRmyjNIJdPWohZDl97kAci79aBndvuEvRKOjLHs3WRGBIwERnAcnY9Mz8u/
|
||||
zIHK23PjYVxGGaZd669OJwD0CYyqH22HH9nFUGaoJdsv39ChW0NRdLE9+y8=
|
||||
-----END X509 CERTIFICATE-----
|
||||
issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit)
|
||||
subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICJjCCAY8CAQAwDQYJKoZIhvcNAQEEBQAwXDELMAkGA1UEBhMCQVUxEzARBgNV
|
||||
BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYD
|
||||
VQQDExNUZXN0IFBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTc0M1oXDTAxMDYw
|
||||
OTEzNTc0M1owWzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY
|
||||
BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYDVQQDExJUZXN0IENBICgxMDI0
|
||||
IGJpdCkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKO7o8t116VP6cgybTsZ
|
||||
DCZhr95nYlZuya3aCi1IKoztqwWnjbmDFIriOqGFPrZQ+moMETC9D59iRW/dFXSv
|
||||
1F65ka/XY2hLh9exCCo7XuUcDs53Qp3bI3AmMqHjgzE8oO3ajyJAzJkTTOUecQU2
|
||||
mw/gI4tMM0LqWMQS7luTy4+xAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAM7achv3v
|
||||
hLQJcv/65eGEpBXM40ZDVoFQFFJWaY5p883HTqLB1x4FdzsXHH0QKBTcKpWwqyu4
|
||||
YDm3fb8oDugw72bCzfyZK/zVZPR/hVlqI/fvU109Qoc+7oPvIXWky71HfcK6ZBCA
|
||||
q30KIqGM/uoM60INq97qjDmCJapagcNBGQs=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXQIBAAKBgQCju6PLddelT+nIMm07GQwmYa/eZ2JWbsmt2gotSCqM7asFp425
|
||||
gxSK4jqhhT62UPpqDBEwvQ+fYkVv3RV0r9ReuZGv12NoS4fXsQgqO17lHA7Od0Kd
|
||||
2yNwJjKh44MxPKDt2o8iQMyZE0zlHnEFNpsP4COLTDNC6ljEEu5bk8uPsQIDAQAB
|
||||
AoGAVZmpFZsDZfr0l2S9tLLwpjRWNOlKATQkno6q2WesT0eGLQufTciY+c8ypfU6
|
||||
hyio8r5iUl/VhhdjhAtKx1mRpiotftHo/eYf8rtsrnprOnWG0bWjLjtIoMbcxGn2
|
||||
J3bN6LJmbJMjDs0eJ3KnTu646F3nDUw2oGAwmpzKXA1KAP0CQQDRvQhxk2D3Pehs
|
||||
HvG665u2pB5ipYQngEFlZO7RHJZzJOZEWSLuuMqaF/7pTfA5jiBvWqCgJeCRRInL
|
||||
21ru4dlPAkEAx9jj7BgKn5TYnMoBSSe0afjsV9oApVpN1Nacb1YDtCwy+scp3++s
|
||||
nFxlv98wxIlSdpwMUn+AUWfjiWR7Tu/G/wJBAJ/KjwZIrFVxewP0x2ILYsTRYLzz
|
||||
MS4PDsO7FB+I0i7DbBOifXS2oNSpd3I0CNMwrxFnUHzynpbOStVfN3ZL5w0CQQCa
|
||||
pwFahxBRhkJKsxhjoFJBX9yl75JoY4Wvm5Tbo9ih6UJaRx3kqfkN14L2BKYcsZgb
|
||||
KY9vmDOYy6iNfjDeWTfJAkBkfPUb8oTJ/nSP5zN6sqGxSY4krc4xLxpRmxoJ8HL2
|
||||
XfhqXkTzbU13RX9JJ/NZ8vQN9Vm2NhxRGJocQkmcdVtJ
|
||||
-----END RSA PRIVATE KEY-----
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
MIICYDCCAiACAgEoMAkGBSsOAwINBQAwfDELMAkGA1UEBhMCVVMxNjA0BgNVBAoT
|
||||
LU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFuZCBTcGFjZSBBZG1pbmlzdHJhdGlvbjEZ
|
||||
MBcGA1UECxMQVGVzdCBFbnZpcm9ubWVudDEaMBgGA1UECxMRRFNTLU5BU0EtUGls
|
||||
b3QtQ0EwHhcNOTYwMjI2MTYzMjQ1WhcNOTcwMjI1MTYzMjQ1WjB8MQswCQYDVQQG
|
||||
EwJVUzE2MDQGA1UEChMtTmF0aW9uYWwgQWVyb25hdXRpY3MgYW5kIFNwYWNlIEFk
|
||||
bWluaXN0cmF0aW9uMRkwFwYDVQQLExBUZXN0IEVudmlyb25tZW50MRowGAYDVQQL
|
||||
ExFEU1MtTkFTQS1QaWxvdC1DQTCB8jAJBgUrDgMCDAUAA4HkADCB4AJBAMA/ssKb
|
||||
hPNUG7ZlASfVwEJU21O5OyF/iyBzgHI1O8eOhJGUYO8cc8wDMjR508Mr9cp6Uhl/
|
||||
ZB7FV5GkLNEnRHYCQQDUEaSg45P2qrDwixTRhFhmWz5Nvc4lRFQ/42XPcchiJBLb
|
||||
bn3QK74T2IxY1yY+kCNq8XrIqf5fJJzIH0J/xUP3AhUAsg2wsQHfDGYk/BOSulX3
|
||||
fVd0geUCQQCzCFUQAh+ZkEmp5804cs6ZWBhrUAfnra8lJItYo9xPcXgdIfLfibcX
|
||||
R71UsyO77MRD7B0+Ag2tq794IleCVcEEMAkGBSsOAwINBQADLwAwLAIUUayDfreR
|
||||
Yh2WeU86/pHNdkUC1IgCFEfxe1f0oMpxJyrJ5XIxTi7vGdoK
|
||||
-----END X509 CERTIFICATE-----
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
|
||||
MIICGTCCAdgCAwCqTDAJBgUrDgMCDQUAMHwxCzAJBgNVBAYTAlVTMTYwNAYDVQQK
|
||||
Ey1OYXRpb25hbCBBZXJvbmF1dGljcyBhbmQgU3BhY2UgQWRtaW5pc3RyYXRpb24x
|
||||
GTAXBgNVBAsTEFRlc3QgRW52aXJvbm1lbnQxGjAYBgNVBAsTEURTUy1OQVNBLVBp
|
||||
bG90LUNBMB4XDTk2MDUxNDE3MDE0MVoXDTk3MDUxNDE3MDE0MVowMzELMAkGA1UE
|
||||
BhMCQVUxDzANBgNVBAoTBk1pbmNvbTETMBEGA1UEAxMKRXJpYyBZb3VuZzCB8jAJ
|
||||
BgUrDgMCDAUAA4HkADCB4AJBAKbfHz6vE6pXXMTpswtGUec2tvnfLJUsoxE9qs4+
|
||||
ObZX7LmLvragNPUeiTJx7UOWZ5DfBj6bXLc8eYne0lP1g3ACQQDUEaSg45P2qrDw
|
||||
ixTRhFhmWz5Nvc4lRFQ/42XPcchiJBLbbn3QK74T2IxY1yY+kCNq8XrIqf5fJJzI
|
||||
H0J/xUP3AhUAsg2wsQHfDGYk/BOSulX3fVd0geUCQQCzCFUQAh+ZkEmp5804cs6Z
|
||||
WBhrUAfnra8lJItYo9xPcXgdIfLfibcXR71UsyO77MRD7B0+Ag2tq794IleCVcEE
|
||||
MAkGBSsOAwINBQADMAAwLQIUWsuuJRE3VT4ueWkWMAJMJaZjj1ECFQCYY0zX4bzM
|
||||
LC7obsrHD8XAHG+ZRG==
|
||||
-----END X509 CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICTTCCAbagAwIBAgIBADANBgkqhkiG9w0BAQQFADBMMQswCQYDVQQGEwJHQjEM
|
||||
MAoGA1UEChMDVUNMMRgwFgYDVQQLEw9JQ0UtVEVMIFByb2plY3QxFTATBgNVBAMT
|
||||
DFRydXN0RmFjdG9yeTAeFw05NzA0MjIxNDM5MTRaFw05ODA0MjIxNDM5MTRaMEwx
|
||||
CzAJBgNVBAYTAkdCMQwwCgYDVQQKEwNVQ0wxGDAWBgNVBAsTD0lDRS1URUwgUHJv
|
||||
amVjdDEVMBMGA1UEAxMMVHJ1c3RGYWN0b3J5MIGcMAoGBFUIAQECAgQAA4GNADCB
|
||||
iQKBgQCEieR8NcXkUW1f0G6aC6u0i8q/98JqS6RxK5YmHIGKCkuTWAUjzLfUa4dt
|
||||
U9igGCjTuxaDqlzEim+t/02pmiBZT9HaX++35MjQPUWmsChcYU5WyzGErXi+rQaw
|
||||
zlwS73zM8qiPj/97lXYycWhgL0VaiDSPxRXEUdWoaGruom4mNQIDAQABo0IwQDAd
|
||||
BgNVHQ4EFgQUHal1LZr7oVg5z6lYzrhTgZRCmcUwDgYDVR0PAQH/BAQDAgH2MA8G
|
||||
A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAfaggfl6FZoioecjv0dq8
|
||||
/DXo/u11iMZvXn08gjX/zl2b4wtPbShOSY5FhkSm8GeySasz+/Nwb/uzfnIhokWi
|
||||
lfPZHtlCWtXbIy/TN51eJyq04ceDCQDWvLC2enVg9KB+GJ34b5c5VaPRzq8MBxsA
|
||||
S7ELuYGtmYgYm9NZOIr7yU0=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB6jCCAZQCAgEtMA0GCSqGSIb3DQEBBAUAMIGAMQswCQYDVQQGEwJVUzE2MDQG
|
||||
A1UEChMtTmF0aW9uYWwgQWVyb25hdXRpY3MgYW5kIFNwYWNlIEFkbWluaXN0cmF0
|
||||
aW9uMRkwFwYDVQQLExBUZXN0IEVudmlyb25tZW50MR4wHAYDVQQLExVNRDUtUlNB
|
||||
LU5BU0EtUGlsb3QtQ0EwHhcNOTYwNDMwMjIwNTAwWhcNOTcwNDMwMjIwNTAwWjCB
|
||||
gDELMAkGA1UEBhMCVVMxNjA0BgNVBAoTLU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFu
|
||||
ZCBTcGFjZSBBZG1pbmlzdHJhdGlvbjEZMBcGA1UECxMQVGVzdCBFbnZpcm9ubWVu
|
||||
dDEeMBwGA1UECxMVTUQ1LVJTQS1OQVNBLVBpbG90LUNBMFkwCgYEVQgBAQICAgAD
|
||||
SwAwSAJBALmmX5+GqAvcrWK13rfDrNX9UfeA7f+ijyBgeFQjYUoDpFqapw4nzQBL
|
||||
bAXug8pKkRwa2Zh8YODhXsRWu2F/UckCAwEAATANBgkqhkiG9w0BAQQFAANBAH9a
|
||||
OBA+QCsjxXgnSqHx04gcU8S49DVUb1f2XVoLnHlIb8RnX0k5O6mpHT5eti9bLkiW
|
||||
GJNMJ4L0AJ/ac+SmHZc=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICajCCAdMCBDGA0QUwDQYJKoZIhvcNAQEEBQAwfTELMAkGA1UEBhMCQ2ExDzAN
|
||||
BgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmlsaXR5IEFjY2VwdGVkMR8w
|
||||
HQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRwwGgYDVQQDExNFbnRydXN0
|
||||
IERlbW8gV2ViIENBMB4XDTk2MDQyNjEzMzUwMVoXDTA2MDQyNjEzMzUwMVowfTEL
|
||||
MAkGA1UEBhMCQ2ExDzANBgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmls
|
||||
aXR5IEFjY2VwdGVkMR8wHQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRww
|
||||
GgYDVQQDExNFbnRydXN0IERlbW8gV2ViIENBMIGdMA0GCSqGSIb3DQEBAQUAA4GL
|
||||
ADCBhwKBgQCaroS7O1DA0hm4IefNYU1cx/nqOmzEnk291d1XqznDeF4wEgakbkCc
|
||||
zTKxK791yNpXG5RmngqH7cygDRTHZJ6mfCRn0wGC+AI00F2vYTGqPGRQL1N3lZT0
|
||||
YDKFC0SQeMMjFIZ1aeQigroFQnHo0VB3zWIMpNkka8PY9lxHZAmWwQIBAzANBgkq
|
||||
hkiG9w0BAQQFAAOBgQBAx0UMVA1s54lMQyXjMX5kj99FJN5itb8bK1Rk+cegPQPF
|
||||
cWO9SEWyEjjBjIkjjzAwBkaEszFsNGxemxtXvwjIm1xEUMTVlPEWTs2qnDvAUA9W
|
||||
YqhWbhH0toGT36236QAsqCZ76rbTRVSSX2BHyJwJMG2tCRv7kRJ//NIgxj3H4w==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit)
|
||||
subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit)
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICJzCCAZACAQAwDQYJKoZIhvcNAQEEBQAwXDELMAkGA1UEBhMCQVUxEzARBgNV
|
||||
BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYD
|
||||
VQQDExNUZXN0IFBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTczN1oXDTAxMDYw
|
||||
OTEzNTczN1owXDELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY
|
||||
BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYDVQQDExNUZXN0IFBDQSAoMTAy
|
||||
NCBiaXQpMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdoWk/3+WcMlfjIrkg
|
||||
40ketmnQaEogQe1LLcuOJV6rKfUSAsPgwgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp
|
||||
22Jp85PmemiDzyUIStwk72qhp1imbANZvlmlCFKiQrjUyuDfu4TABmn+kkt3vR1Y
|
||||
BEOGt+IFye1UBVSATVdRJ2UVhwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABNA1u/S
|
||||
Cg/LJZWb7GliiKJsvuhxlE4E5JxQF2zMub/CSNbF97//tYSyj96sxeFQxZXbcjm9
|
||||
xt6mr/xNLA4szNQMJ4P+L7b5e/jC5DSqlwS+CUYJgaFs/SP+qJoCSu1bR3IM9XWO
|
||||
cRBpDmcBbYLkSyB92WURvsZ1LtjEcn+cdQVI
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXAIBAAKBgQCdoWk/3+WcMlfjIrkg40ketmnQaEogQe1LLcuOJV6rKfUSAsPg
|
||||
wgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp22Jp85PmemiDzyUIStwk72qhp1imbANZ
|
||||
vlmlCFKiQrjUyuDfu4TABmn+kkt3vR1YBEOGt+IFye1UBVSATVdRJ2UVhwIDAQAB
|
||||
AoGAba4fTtuap5l7/8ZsbE7Z1O32KJY4ZcOZukLOLUUhXxXduT+FTgGWujc0/rgc
|
||||
z9qYCLlNZHOouMYTgtSfYvuMuLZ11VIt0GYH+nRioLShE59Yy+zCRyC+gPigS1kz
|
||||
xvo14AsOIPYV14Tk/SsHyq6E0eTk7VzaIE197giiINUERPECQQDSKmtPTh/lRKw7
|
||||
HSZSM0I1mFWn/1zqrAbontRQY5w98QWIOe5qmzYyFbPXYT3d9BzlsMyhgiRNoBbD
|
||||
yvohSHXJAkEAwAHx6ezAZeWWzD5yXD36nyjpkVCw7Tk7TSmOceLJMWt1QcrCfqlS
|
||||
xA5jjpQ6Z8suU5DdtWAryM2sAir1WisYzwJAd6Zcx56jvAQ3xcPXsE6scBTVFzrj
|
||||
7FqZ6E+cclPzfLQ+QQsyOBE7bpI6e/FJppY26XGZXo3YGzV8IGXrt40oOQJALETG
|
||||
h86EFXo3qGOFbmsDy4pdP5nBERCu8X1xUCSfintiD4c2DInxgS5oGclnJeMcjTvL
|
||||
QjQoJCX3UJCi/OUO1QJBAKgcDHWjMvt+l1pjJBsSEZ0HX9AAIIVx0RQmbFGS+F2Q
|
||||
hhu5l77WnnZOQ9vvhV5u7NPCUF9nhU3jh60qWWO8mkc=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
subject=/C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority
|
||||
issuer= /C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority
|
||||
notBefore=941104185834Z
|
||||
notAfter =991103185834Z
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
|
||||
MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw
|
||||
HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy
|
||||
Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
|
||||
OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
|
||||
ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
|
||||
IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
|
||||
975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
|
||||
touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
|
||||
7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
|
||||
9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
|
||||
0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb
|
||||
MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
|
||||
-----END X509 CERTIFICATE-----
|
||||
subject=/C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
|
||||
issuer= /C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
|
||||
notBefore=941109235417Z
|
||||
notAfter =991231235417Z
|
||||
-----BEGIN X509 CERTIFICATE-----
|
||||
|
||||
MIICKTCCAZYCBQJBAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMSAw
|
||||
HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJl
|
||||
IFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDkyMzU0MTda
|
||||
Fw05OTEyMzEyMzU0MTdaMF8xCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0
|
||||
YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJlIFNlcnZlciBDZXJ0aWZp
|
||||
Y2F0aW9uIEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCSznrB
|
||||
roM+WqqJg1esJQF2DK2ujiw3zus1eGRUA+WEQFHJv48I4oqCCNIWhjdV6bEhAq12
|
||||
aIGaBaJLyUslZiJWbIgHj/eBWW2EB2VwE3F2Ppt3TONQiVaYSLkdpykaEy5KEVmc
|
||||
HhXVSVQsczppgrGXOZxtcGdI5d0t1sgeewIDAQABMA0GCSqGSIb3DQEBAgUAA34A
|
||||
iNHReSHO4ovo+MF9NFM/YYPZtgs4F7boviGNjwC4i1N+RGceIr2XJ+CchcxK9oU7
|
||||
suK+ktPlDemvXA4MRpX/oRxePug2WHpzpgr4IhFrwwk4fia7c+8AvQKk8xQNMD9h
|
||||
cHsg/jKjn7P0Z1LctO6EjJY2IN6BCINxIYoPnqk=
|
||||
-----END X509 CERTIFICATE-----
|
||||
subject=/C=ZA/SP=Western Cape/L=Cape Town/O=Thawte Consulting cc
|
||||
/OU=Certification Services Division/CN=Thawte Server CA
|
||||
/Email=server-certs@thawte.com
|
||||
issuer= /C=ZA/SP=Western Cape/L=Cape Town/O=Thawte Consulting cc
|
||||
/OU=Certification Services Division/CN=Thawte Server CA
|
||||
/Email=server-certs@thawte.com
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC+TCCAmICAQAwDQYJKoZIhvcNAQEEBQAwgcQxCzAJBgNVBAYTAlpBMRUwEwYD
|
||||
VQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU
|
||||
VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy
|
||||
dmljZXMgRGl2aXNpb24xGTAXBgNVBAMTEFRoYXd0ZSBTZXJ2ZXIgQ0ExJjAkBgkq
|
||||
hkiG9w0BCQEWF3NlcnZlci1jZXJ0c0B0aGF3dGUuY29tMB4XDTk2MDcyNzE4MDc1
|
||||
N1oXDTk4MDcyNzE4MDc1N1owgcQxCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0
|
||||
ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMUVGhhd3RlIENv
|
||||
bnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2
|
||||
aXNpb24xGTAXBgNVBAMTEFRoYXd0ZSBTZXJ2ZXIgQ0ExJjAkBgkqhkiG9w0BCQEW
|
||||
F3NlcnZlci1jZXJ0c0B0aGF3dGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
|
||||
iQKBgQDTpFBuyP9Wa+bPXbbqDGh1R6KqwtqEJfyo9EdR2oW1IHSUhh4PdcnpCGH1
|
||||
Bm0wbhUZAulSwGLbTZme4moMRDjN/r7jZAlwxf6xaym2L0nIO9QnBCUQly/nkG3A
|
||||
KEKZ10xD3sP1IW1Un13DWOHA5NlbsLjctHvfNjrCtWYiEtaHDQIDAQABMA0GCSqG
|
||||
SIb3DQEBBAUAA4GBAIsvn7ifX3RUIrvYXtpI4DOfARkTogwm6o7OwVdl93yFhDcX
|
||||
7h5t0XZ11MUAMziKdde3rmTvzUYIUCYoY5b032IwGMTvdiclK+STN6NP2m5nvFAM
|
||||
qJT5gC5O+j/jBuZRQ4i0AMYQr5F4lT8oBJnhgafw6PL8aDY2vMHGSPl9+7uf
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDDTCCAnYCAQAwDQYJKoZIhvcNAQEEBQAwgc4xCzAJBgNVBAYTAlpBMRUwEwYD
|
||||
VQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU
|
||||
VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy
|
||||
dmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBD
|
||||
QTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTAeFw05
|
||||
NjA3MjcxODA3MTRaFw05ODA3MjcxODA3MTRaMIHOMQswCQYDVQQGEwJaQTEVMBMG
|
||||
A1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xHTAbBgNVBAoT
|
||||
FFRoYXd0ZSBDb25zdWx0aW5nIGNjMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNl
|
||||
cnZpY2VzIERpdmlzaW9uMSEwHwYDVQQDExhUaGF3dGUgUHJlbWl1bSBTZXJ2ZXIg
|
||||
Q0ExKDAmBgkqhkiG9w0BCQEWGXByZW1pdW0tc2VydmVyQHRoYXd0ZS5jb20wgZ8w
|
||||
DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANI2NmqL18JbntqBQWKPOO5JBFXW0O8c
|
||||
G5UWR+8YSDU6UvQragaPOy/qVuOvho2eF/eetGV1Ak3vywmiIVHYm9Bn0LoNkgYU
|
||||
c9STy5cqAJxcTgy8+hVS/PJEbtoRSm4Iny8t4/mqOoZztkZTWMiJBb2DEbhzP6oH
|
||||
jfRCTedAnRw3AgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAutFIgTRZVYerIZfL9lvR
|
||||
w9Eifvvo5KTZ3h+Bj+VzNnyw4Qc/IyXkPOu6SIiH9LQ3sCmWBdxpe+qr4l77rLj2
|
||||
GYuMtESFfn1XVALzkYgC7JcPuTOjMfIiMByt+uFf8AV8x0IW/Qkuv+hEQcyM9vxK
|
||||
3VZdLbCVIhNoEsysrxCpxcI=
|
||||
-----END CERTIFICATE-----
|
||||
Tims test GCI CA
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB8DCCAZoCAQAwDQYJKoZIhvcNAQEEBQAwgYIxCzAJBgNVBAYTAkFVMRMwEQYD
|
||||
VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5
|
||||
cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2RldmVsb3BtZW50MRkwFwYDVQQDExBD
|
||||
cnlwdFNvZnQgRGV2IENBMB4XDTk3MDMyMjEzMzQwNFoXDTk4MDMyMjEzMzQwNFow
|
||||
gYIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhC
|
||||
cmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2Rl
|
||||
dmVsb3BtZW50MRkwFwYDVQQDExBDcnlwdFNvZnQgRGV2IENBMFwwDQYJKoZIhvcN
|
||||
AQEBBQADSwAwSAJBAOAOAqogG5QwAmLhzyO4CoRnx/wVy4NZP4dxJy83O1EnL0rw
|
||||
OdsamJKvPOLHgSXo3gDu9uVyvCf/QJmZAmC5ml8CAwEAATANBgkqhkiG9w0BAQQF
|
||||
AANBADRRS/GVdd7rAqRW6SdmgLJduOU2yq3avBu99kRqbp9A/dLu6r6jU+eP4oOA
|
||||
TfdbFZtAAD2Hx9jUtY3tfdrJOb8=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICVjCCAgACAQAwDQYJKoZIhvcNAQEEBQAwgbUxCzAJBgNVBAYTAkFVMRMwEQYD
|
||||
VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5
|
||||
cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsTI1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9O
|
||||
IEFVVEhPUklUSUVTMTQwMgYDVQQDEytaRVJPIFZBTFVFIENBIC0gREVNT05TVFJB
|
||||
VElPTiBQVVJQT1NFUyBPTkxZMB4XDTk3MDQwMzEzMjI1NFoXDTk4MDQwMzEzMjI1
|
||||
NFowgbUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH
|
||||
EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsT
|
||||
I1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9OIEFVVEhPUklUSUVTMTQwMgYDVQQDEyta
|
||||
RVJPIFZBTFVFIENBIC0gREVNT05TVFJBVElPTiBQVVJQT1NFUyBPTkxZMFwwDQYJ
|
||||
KoZIhvcNAQEBBQADSwAwSAJBAOZ7T7yqP/tyspcko3yPY1y0Cm2EmwNvzW4QgVXR
|
||||
Fjs3HmJ4xtSpXdo6mwcGezL3Abt/aQXaxv9PU8xt+Jr0OFUCAwEAATANBgkqhkiG
|
||||
9w0BAQQFAANBAOQpYmGgyCqCy1OljgJhCqQOu627oVlHzK1L+t9vBaMfn40AVUR4
|
||||
WzQVWO31KTgi5vTK1U+3h46fgUWqQ0h+6rU=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIAwgKADAgECAgEAMA0GCSqGSIb3DQEBBAUAMGIxETAPBgNVBAcTCEludGVybmV0
|
||||
MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24gQ2xh
|
||||
c3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjAeFw05NjA0MDgxMDIwMjda
|
||||
Fw05NzA0MDgxMDIwMjdaMGIxETAPBgNVBAcTCEludGVybmV0MRcwFQYDVQQKEw5W
|
||||
ZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24gQ2xhc3MgMSBDQSAtIElu
|
||||
ZGl2aWR1YWwgU3Vic2NyaWJlcjCAMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2
|
||||
FKbPTdAFDdjKI9BvqrQpkmOOLPhvltcunXZLEbE2jVfJw/0cxrr+Hgi6M8qV6r7j
|
||||
W80GqLd5HUQq7XPysVKDaBBwZJHXPmv5912dFEObbpdFmIFH0S3L3bty10w/cari
|
||||
QPJUObwW7s987LrbP2wqsxaxhhKdrpM01bjV0Pc+qQIDAQABAAAAADANBgkqhkiG
|
||||
9w0BAQQFAAOBgQA+1nJryNt8VBRjRr07ArDAV/3jAH7GjDc9jsrxZS68ost9v06C
|
||||
TvTNKGL+LISNmFLXl+JXhgGB0JZ9fvyYzNgHQ46HBUng1H6voalfJgS2KdEo50wW
|
||||
8EFZYMDkT1k4uynwJqkVN2QJK/2q4/A/VCov5h6SlM8Affg2W+1TLqvqkwAA
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
subject=/L=Internet/O=VeriSign, Inc./OU=VeriSign Class 2 CA - Individual Subscriber
|
||||
issuer= /L=Internet/O=VeriSign, Inc./OU=VeriSign Class 2 CA - Individual Subscriber
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEkzCCA/ygAwIBAgIRANDTUpSRL3nTFeMrMayFSPAwDQYJKoZIhvcNAQECBQAw
|
||||
YjERMA8GA1UEBxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQw
|
||||
MgYDVQQLEytWZXJpU2lnbiBDbGFzcyAyIENBIC0gSW5kaXZpZHVhbCBTdWJzY3Jp
|
||||
YmVyMB4XDTk2MDYwNDAwMDAwMFoXDTk4MDYwNDIzNTk1OVowYjERMA8GA1UEBxMI
|
||||
SW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJp
|
||||
U2lnbiBDbGFzcyAyIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMIGfMA0GCSqG
|
||||
SIb3DQEBAQUAA4GNADCBiQKBgQC6A+2czKGRcYMfm8gdnk+0de99TDDzsqo0v5nb
|
||||
RsbUmMcdRQ7nsMbRWe0SAb/9QoLTZ/cJ0iOBqdrkz7UpqqKarVoTSdlSMVM92tWp
|
||||
3bJncZHQD1t4xd6lQVdI1/T6R+5J0T1ukOdsI9Jmf+F28S6g3R3L1SFwiHKeZKZv
|
||||
z+793wIDAQABo4ICRzCCAkMwggIpBgNVHQMBAf8EggIdMIICGTCCAhUwggIRBgtg
|
||||
hkgBhvhFAQcBATCCAgAWggGrVGhpcyBjZXJ0aWZpY2F0ZSBpbmNvcnBvcmF0ZXMg
|
||||
YnkgcmVmZXJlbmNlLCBhbmQgaXRzIHVzZSBpcyBzdHJpY3RseSBzdWJqZWN0IHRv
|
||||
LCB0aGUgVmVyaVNpZ24gQ2VydGlmaWNhdGlvbiBQcmFjdGljZSBTdGF0ZW1lbnQg
|
||||
KENQUyksIGF2YWlsYWJsZSBhdDogaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL0NQ
|
||||
Uy0xLjA7IGJ5IEUtbWFpbCBhdCBDUFMtcmVxdWVzdHNAdmVyaXNpZ24uY29tOyBv
|
||||
ciBieSBtYWlsIGF0IFZlcmlTaWduLCBJbmMuLCAyNTkzIENvYXN0IEF2ZS4sIE1v
|
||||
dW50YWluIFZpZXcsIENBIDk0MDQzIFVTQSBUZWwuICsxICg0MTUpIDk2MS04ODMw
|
||||
IENvcHlyaWdodCAoYykgMTk5NiBWZXJpU2lnbiwgSW5jLiAgQWxsIFJpZ2h0cyBS
|
||||
ZXNlcnZlZC4gQ0VSVEFJTiBXQVJSQU5USUVTIERJU0NMQUlNRUQgYW5kIExJQUJJ
|
||||
TElUWSBMSU1JVEVELqAOBgxghkgBhvhFAQcBAQGhDgYMYIZIAYb4RQEHAQECMC8w
|
||||
LRYraHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEuMDAU
|
||||
BglghkgBhvhCAQEBAf8EBAMCAgQwDQYJKoZIhvcNAQECBQADgYEApRJRkNBqLLgs
|
||||
53IR/d18ODdLOWMTZ+QOOxBrq460iBEdUwgF8vmPRX1ku7UiDeNzaLlurE6eFqHq
|
||||
2zPyK5j60zfTLVJMWKcQWwTJLjHtXrW8pxhNtFc6Fdvy5ZkHnC/9NIl7/t4U6WqB
|
||||
p4y+p7SdMIkEwIZfds0VbnQyX5MRUJY=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
|
||||
issuer= /C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICMTCCAZoCBQKhAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw
|
||||
FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMg
|
||||
UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa
|
||||
Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln
|
||||
biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp
|
||||
Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAyVxZ
|
||||
nvIbigEUtBDfBEDb41evakVAj4QMC9Ez2dkRz+4CWB8l9yqoRAWq7AMfeH+ek7ma
|
||||
AKojfdashaJjRcdyJ8z0TMZ1cdI5709C8HXfCpDGjiBvmA/4rCNfcCk2pMmG57Ga
|
||||
IMtTpYXnPb59mv4kRTPcdhXtD6JxZExlLoFoRacCAwEAATANBgkqhkiG9w0BAQIF
|
||||
AAOBgQB1Zmw+0c2B27X4LzZRtvdCvM1Cr9wO+hVs+GeTVzrrtpLotgHKjLeOQ7RJ
|
||||
Zfk+7r11Ri7J/CVdqMcvi5uPaM+0nJcYwE3vH9mvgrPmZLiEXIqaB1JDYft0nls6
|
||||
NvxMsvwaPxUupVs8G5DsiCnkWRb5zget7Ond2tIxik/W2O8XjQ==
|
||||
-----END CERTIFICATE-----
|
||||
subject=/C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority
|
||||
issuer= /C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICMTCCAZoCBQKmAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw
|
||||
FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMg
|
||||
UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa
|
||||
Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln
|
||||
biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp
|
||||
Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LJ1
|
||||
9njQrlpQ9OlQqZ+M1++RlHDo0iSQdomF1t+s5gEXMoDwnZNHvJplnR+Xrr/phnVj
|
||||
IIm9gFidBAydqMEk6QvlMXi9/C0MN2qeeIDpRnX57aP7E3vIwUzSo+/1PLBij0pd
|
||||
O92VZ48TucE81qcmm+zDO3rZTbxtm+gVAePwR6kCAwEAATANBgkqhkiG9w0BAQIF
|
||||
AAOBgQBT3dPwnCR+QKri/AAa19oM/DJhuBUNlvP6Vxt/M3yv6ZiaYch6s7f/sdyZ
|
||||
g9ysEvxwyR84Qu1E9oAuW2szaayc01znX1oYx7EteQSWQZGZQbE8DbqEOcY7l/Am
|
||||
yY7uvcxClf8exwI/VAx49byqYHwCaejcrOICdmHEPgPq0ook0Q==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
@@ -90,6 +90,7 @@ int MAIN(int, char **);
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
SSL_SESSION *x=NULL;
|
||||
X509 *peer = NULL;
|
||||
int ret=1,i,num,badops=0;
|
||||
BIO *out=NULL;
|
||||
int informat,outformat;
|
||||
@@ -163,16 +164,17 @@ bad:
|
||||
ERR_load_crypto_strings();
|
||||
x=load_sess_id(infile,informat);
|
||||
if (x == NULL) { goto end; }
|
||||
peer = SSL_SESSION_get0_peer(x);
|
||||
|
||||
if(context)
|
||||
{
|
||||
x->sid_ctx_length=strlen(context);
|
||||
if(x->sid_ctx_length > SSL_MAX_SID_CTX_LENGTH)
|
||||
size_t ctx_len = strlen(context);
|
||||
if(ctx_len > SSL_MAX_SID_CTX_LENGTH)
|
||||
{
|
||||
BIO_printf(bio_err,"Context too long\n");
|
||||
goto end;
|
||||
}
|
||||
memcpy(x->sid_ctx,context,x->sid_ctx_length);
|
||||
SSL_SESSION_set1_id_context(x, (unsigned char *)context, ctx_len);
|
||||
}
|
||||
|
||||
#ifdef undef
|
||||
@@ -231,10 +233,10 @@ bad:
|
||||
|
||||
if (cert)
|
||||
{
|
||||
if (x->peer == NULL)
|
||||
if (peer == NULL)
|
||||
BIO_puts(out,"No certificate present\n");
|
||||
else
|
||||
X509_print(out,x->peer);
|
||||
X509_print(out,peer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,12 +255,12 @@ bad:
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
else if (!noout && (x->peer != NULL)) /* just print the certificate */
|
||||
else if (!noout && (peer != NULL)) /* just print the certificate */
|
||||
{
|
||||
if (outformat == FORMAT_ASN1)
|
||||
i=(int)i2d_X509_bio(out,x->peer);
|
||||
i=(int)i2d_X509_bio(out,peer);
|
||||
else if (outformat == FORMAT_PEM)
|
||||
i=PEM_write_bio_X509(out,x->peer);
|
||||
i=PEM_write_bio_X509(out,peer);
|
||||
else {
|
||||
BIO_printf(bio_err,"bad output format specified for outfile\n");
|
||||
goto end;
|
||||
|
||||
86
apps/speed.c
86
apps/speed.c
@@ -108,8 +108,14 @@
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#include <windows.h>
|
||||
# if defined(__CYGWIN__) && !defined(_WIN32)
|
||||
/* <windows.h> should define _WIN32, which normally is mutually
|
||||
* exclusive with __CYGWIN__, but if it didn't... */
|
||||
# define _WIN32
|
||||
/* this is done because Cygwin alarm() fails sometimes. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <openssl/bn.h>
|
||||
@@ -183,6 +189,25 @@
|
||||
#ifndef OPENSSL_NO_ECDH
|
||||
#include <openssl/ecdh.h>
|
||||
#endif
|
||||
#include <openssl/modes.h>
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
#ifdef OPENSSL_DOING_MAKEDEPEND
|
||||
#undef AES_set_encrypt_key
|
||||
#undef AES_set_decrypt_key
|
||||
#undef DES_set_key_unchecked
|
||||
#endif
|
||||
#define BF_set_key private_BF_set_key
|
||||
#define CAST_set_key private_CAST_set_key
|
||||
#define idea_set_encrypt_key private_idea_set_encrypt_key
|
||||
#define SEED_set_key private_SEED_set_key
|
||||
#define RC2_set_key private_RC2_set_key
|
||||
#define RC4_set_key private_RC4_set_key
|
||||
#define DES_set_key_unchecked private_DES_set_key_unchecked
|
||||
#define AES_set_encrypt_key private_AES_set_encrypt_key
|
||||
#define AES_set_decrypt_key private_AES_set_decrypt_key
|
||||
#define Camellia_set_key private_Camellia_set_key
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FORK
|
||||
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE)
|
||||
@@ -200,7 +225,7 @@
|
||||
|
||||
#undef BUFSIZE
|
||||
#define BUFSIZE ((long)1024*8+1)
|
||||
int run=0;
|
||||
static volatile int run=0;
|
||||
|
||||
static int mr=0;
|
||||
static int usertime=1;
|
||||
@@ -214,7 +239,7 @@ static void print_result(int alg,int run_no,int count,double time_used);
|
||||
static int do_multi(int multi);
|
||||
#endif
|
||||
|
||||
#define ALGOR_NUM 29
|
||||
#define ALGOR_NUM 30
|
||||
#define SIZE_NUM 5
|
||||
#define RSA_NUM 4
|
||||
#define DSA_NUM 3
|
||||
@@ -229,7 +254,7 @@ static const char *names[ALGOR_NUM]={
|
||||
"aes-128 cbc","aes-192 cbc","aes-256 cbc",
|
||||
"camellia-128 cbc","camellia-192 cbc","camellia-256 cbc",
|
||||
"evp","sha256","sha512","whirlpool",
|
||||
"aes-128 ige","aes-192 ige","aes-256 ige"};
|
||||
"aes-128 ige","aes-192 ige","aes-256 ige","ghash" };
|
||||
static double results[ALGOR_NUM][SIZE_NUM];
|
||||
static int lengths[SIZE_NUM]={16,64,256,1024,8*1024};
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
@@ -273,9 +298,12 @@ static SIGRETTYPE sig_done(int sig)
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
#define SIGALRM
|
||||
#if !defined(SIGALRM)
|
||||
# define SIGALRM
|
||||
#endif
|
||||
static unsigned int lapse,schlock;
|
||||
static void alarm(unsigned int secs) { lapse = secs*1000; }
|
||||
static void alarm_win32(unsigned int secs) { lapse = secs*1000; }
|
||||
#define alarm alarm_win32
|
||||
|
||||
static DWORD WINAPI sleepy(VOID *arg)
|
||||
{
|
||||
@@ -469,6 +497,7 @@ int MAIN(int argc, char **argv)
|
||||
#define D_IGE_128_AES 26
|
||||
#define D_IGE_192_AES 27
|
||||
#define D_IGE_256_AES 28
|
||||
#define D_GHASH 29
|
||||
double d=0.0;
|
||||
long c[ALGOR_NUM][SIZE_NUM];
|
||||
#define R_DSA_512 0
|
||||
@@ -894,6 +923,10 @@ int MAIN(int argc, char **argv)
|
||||
doit[D_CBC_192_AES]=1;
|
||||
doit[D_CBC_256_AES]=1;
|
||||
}
|
||||
else if (strcmp(*argv,"ghash") == 0)
|
||||
{
|
||||
doit[D_GHASH]=1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_CAMELLIA
|
||||
@@ -1264,6 +1297,7 @@ int MAIN(int argc, char **argv)
|
||||
c[D_IGE_128_AES][0]=count;
|
||||
c[D_IGE_192_AES][0]=count;
|
||||
c[D_IGE_256_AES][0]=count;
|
||||
c[D_GHASH][0]=count;
|
||||
|
||||
for (i=1; i<SIZE_NUM; i++)
|
||||
{
|
||||
@@ -1458,7 +1492,7 @@ int MAIN(int argc, char **argv)
|
||||
# error "You cannot disable DES on systems without SIGALRM."
|
||||
#endif /* OPENSSL_NO_DES */
|
||||
#else
|
||||
#define COND(c) (run)
|
||||
#define COND(c) (run && count<0x7fffffff)
|
||||
#define COUNT(d) (count)
|
||||
#ifndef _WIN32
|
||||
signal(SIGALRM,sig_done);
|
||||
@@ -1754,7 +1788,22 @@ int MAIN(int argc, char **argv)
|
||||
print_result(D_IGE_256_AES,j,count,d);
|
||||
}
|
||||
}
|
||||
if (doit[D_GHASH])
|
||||
{
|
||||
GCM128_CONTEXT *ctx = CRYPTO_gcm128_new(&aes_ks1,(block128_f)AES_encrypt);
|
||||
CRYPTO_gcm128_setiv (ctx,(unsigned char *)"0123456789ab",12);
|
||||
|
||||
for (j=0; j<SIZE_NUM; j++)
|
||||
{
|
||||
print_message(names[D_GHASH],c[D_GHASH][j],lengths[j]);
|
||||
Time_F(START);
|
||||
for (count=0,run=1; COND(c[D_GHASH][j]); count++)
|
||||
CRYPTO_gcm128_aad(ctx,buf,lengths[j]);
|
||||
d=Time_F(STOP);
|
||||
print_result(D_GHASH,j,count,d);
|
||||
}
|
||||
CRYPTO_gcm128_release(ctx);
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_CAMELLIA
|
||||
@@ -2548,7 +2597,7 @@ static void pkey_print_message(const char *str, const char *str2, long num,
|
||||
BIO_printf(bio_err,mr ? "+DTP:%d:%s:%s:%d\n"
|
||||
: "Doing %d bit %s %s's for %ds: ",bits,str,str2,tm);
|
||||
(void)BIO_flush(bio_err);
|
||||
alarm(RSA_SECONDS);
|
||||
alarm(tm);
|
||||
#else
|
||||
BIO_printf(bio_err,mr ? "+DNP:%ld:%d:%s:%s\n"
|
||||
: "Doing %ld %d bit %s %s's: ",num,bits,str,str2);
|
||||
@@ -2678,27 +2727,6 @@ static int do_multi(int multi)
|
||||
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,"+F2:",4))
|
||||
{
|
||||
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);
|
||||
|
||||
756
apps/srp.c
Normal file
756
apps/srp.c
Normal file
@@ -0,0 +1,756 @@
|
||||
/* apps/srp.c */
|
||||
/* Written by Peter Sylvester (peter.sylvester@edelweb.fr)
|
||||
* for the EdelKey project and contributed to the OpenSSL project 2004.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2004 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* licensing@OpenSSL.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/txt_db.h>
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/srp.h>
|
||||
|
||||
#include "apps.h"
|
||||
|
||||
#undef PROG
|
||||
#define PROG srp_main
|
||||
|
||||
#define BASE_SECTION "srp"
|
||||
#define CONFIG_FILE "openssl.cnf"
|
||||
|
||||
#define ENV_RANDFILE "RANDFILE"
|
||||
|
||||
#define ENV_DATABASE "srpvfile"
|
||||
#define ENV_DEFAULT_SRP "default_srp"
|
||||
|
||||
static char *srp_usage[]={
|
||||
"usage: srp [args] [user] \n",
|
||||
"\n",
|
||||
" -verbose Talk alot while doing things\n",
|
||||
" -config file A config file\n",
|
||||
" -name arg The particular srp definition to use\n",
|
||||
" -srpvfile arg The srp verifier file name\n",
|
||||
" -add add an user and srp verifier\n",
|
||||
" -modify modify the srp verifier of an existing user\n",
|
||||
" -delete delete user from verifier file\n",
|
||||
" -list list user\n",
|
||||
" -gn arg g and N values to be used for new verifier\n",
|
||||
" -userinfo arg additional info to be set for user\n",
|
||||
" -passin arg input file pass phrase source\n",
|
||||
" -passout arg output file pass phrase source\n",
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
" -engine e - use engine e, possibly a hardware device.\n",
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifdef EFENCE
|
||||
extern int EF_PROTECT_FREE;
|
||||
extern int EF_PROTECT_BELOW;
|
||||
extern int EF_ALIGNMENT;
|
||||
#endif
|
||||
|
||||
static CONF *conf=NULL;
|
||||
static char *section=NULL;
|
||||
|
||||
#define VERBOSE if (verbose)
|
||||
#define VVERBOSE if (verbose>1)
|
||||
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
static int get_index(CA_DB *db, char* id, char type)
|
||||
{
|
||||
char ** pp;
|
||||
int i;
|
||||
if (id == NULL) return -1;
|
||||
if (type == DB_SRP_INDEX)
|
||||
for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++)
|
||||
{
|
||||
pp = sk_OPENSSL_PSTRING_value(db->db->data,i);
|
||||
if (pp[DB_srptype][0] == DB_SRP_INDEX && !strcmp(id,pp[DB_srpid]))
|
||||
return i;
|
||||
}
|
||||
else for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++)
|
||||
{
|
||||
pp = sk_OPENSSL_PSTRING_value(db->db->data,i);
|
||||
|
||||
if (pp[DB_srptype][0] != DB_SRP_INDEX && !strcmp(id,pp[DB_srpid]))
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1 ;
|
||||
}
|
||||
|
||||
static void print_entry(CA_DB *db, BIO *bio, int indx, int verbose, char *s)
|
||||
{
|
||||
if (indx >= 0 && verbose)
|
||||
{
|
||||
int j;
|
||||
char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);
|
||||
BIO_printf(bio, "%s \"%s\"\n", s, pp[DB_srpid]);
|
||||
for (j = 0; j < DB_NUMBER; j++)
|
||||
{
|
||||
BIO_printf(bio_err," %d = \"%s\"\n", j, pp[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void print_index(CA_DB *db, BIO *bio, int indexindex, int verbose)
|
||||
{
|
||||
print_entry(db, bio, indexindex, verbose, "g N entry") ;
|
||||
}
|
||||
|
||||
static void print_user(CA_DB *db, BIO *bio, int userindex, int verbose)
|
||||
{
|
||||
if (verbose > 0)
|
||||
{
|
||||
char **pp = sk_OPENSSL_PSTRING_value(db->db->data,userindex);
|
||||
|
||||
if (pp[DB_srptype][0] != 'I')
|
||||
{
|
||||
print_entry(db, bio, userindex, verbose, "User entry");
|
||||
print_entry(db, bio, get_index(db, pp[DB_srpgN], 'I'), verbose, "g N entry");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static int update_index(CA_DB *db, BIO *bio, char **row)
|
||||
{
|
||||
char ** irow;
|
||||
int i;
|
||||
|
||||
if ((irow=(char **)OPENSSL_malloc(sizeof(char *)*(DB_NUMBER+1))) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"Memory allocation failure\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i=0; i<DB_NUMBER; i++)
|
||||
{
|
||||
irow[i]=row[i];
|
||||
row[i]=NULL;
|
||||
}
|
||||
irow[DB_NUMBER]=NULL;
|
||||
|
||||
if (!TXT_DB_insert(db->db,irow))
|
||||
{
|
||||
BIO_printf(bio,"failed to update srpvfile\n");
|
||||
BIO_printf(bio,"TXT_DB error number %ld\n",db->db->error);
|
||||
OPENSSL_free(irow);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void lookup_fail(const char *name, char *tag)
|
||||
{
|
||||
BIO_printf(bio_err,"variable lookup failed for %s::%s\n",name,tag);
|
||||
}
|
||||
|
||||
|
||||
static char *srp_verify_user(const char *user, const char *srp_verifier,
|
||||
char *srp_usersalt, const char *g, const char *N,
|
||||
const char *passin, BIO *bio, int verbose)
|
||||
{
|
||||
char password[1024];
|
||||
PW_CB_DATA cb_tmp;
|
||||
char *verifier = NULL;
|
||||
char *gNid = NULL;
|
||||
|
||||
cb_tmp.prompt_info = user;
|
||||
cb_tmp.password = passin;
|
||||
|
||||
if (password_callback(password, 1024, 0, &cb_tmp) >0)
|
||||
{
|
||||
VERBOSE BIO_printf(bio,"Validating\n user=\"%s\"\n srp_verifier=\"%s\"\n srp_usersalt=\"%s\"\n g=\"%s\"\n N=\"%s\"\n",user,srp_verifier,srp_usersalt, g, N);
|
||||
BIO_printf(bio, "Pass %s\n", password);
|
||||
|
||||
if (!(gNid=SRP_create_verifier(user, password, &srp_usersalt, &verifier, N, g)))
|
||||
{
|
||||
BIO_printf(bio, "Internal error validating SRP verifier\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcmp(verifier, srp_verifier))
|
||||
gNid = NULL;
|
||||
OPENSSL_free(verifier);
|
||||
}
|
||||
}
|
||||
return gNid;
|
||||
}
|
||||
|
||||
static char *srp_create_user(char *user, char **srp_verifier,
|
||||
char **srp_usersalt, char *g, char *N,
|
||||
char *passout, BIO *bio, int verbose)
|
||||
{
|
||||
char password[1024];
|
||||
PW_CB_DATA cb_tmp;
|
||||
char *gNid = NULL;
|
||||
char *salt = NULL;
|
||||
cb_tmp.prompt_info = user;
|
||||
cb_tmp.password = passout;
|
||||
|
||||
if (password_callback(password,1024,1,&cb_tmp) >0)
|
||||
{
|
||||
VERBOSE BIO_printf(bio,"Creating\n user=\"%s\"\n g=\"%s\"\n N=\"%s\"\n",user,g,N);
|
||||
if (!(gNid =SRP_create_verifier(user, password, &salt, srp_verifier, N, g)))
|
||||
{
|
||||
BIO_printf(bio,"Internal error creating SRP verifier\n");
|
||||
}
|
||||
else
|
||||
*srp_usersalt = salt;
|
||||
VVERBOSE BIO_printf(bio,"gNid=%s salt =\"%s\"\n verifier =\"%s\"\n", gNid,salt, *srp_verifier);
|
||||
|
||||
}
|
||||
return gNid;
|
||||
}
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
int add_user = 0;
|
||||
int list_user= 0;
|
||||
int delete_user= 0;
|
||||
int modify_user= 0;
|
||||
char * user = NULL;
|
||||
|
||||
char *passargin = NULL, *passargout = NULL;
|
||||
char *passin = NULL, *passout = NULL;
|
||||
char * gN = NULL;
|
||||
int gNindex = -1;
|
||||
char ** gNrow = NULL;
|
||||
int maxgN = -1;
|
||||
|
||||
char * userinfo = NULL;
|
||||
|
||||
int badops=0;
|
||||
int ret=1;
|
||||
int errors=0;
|
||||
int verbose=0;
|
||||
int doupdatedb=0;
|
||||
char *configfile=NULL;
|
||||
char *dbfile=NULL;
|
||||
CA_DB *db=NULL;
|
||||
char **pp ;
|
||||
int i;
|
||||
long errorline = -1;
|
||||
char *randfile=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine = NULL;
|
||||
#endif
|
||||
char *tofree=NULL;
|
||||
DB_ATTR db_attr;
|
||||
|
||||
#ifdef EFENCE
|
||||
EF_PROTECT_FREE=1;
|
||||
EF_PROTECT_BELOW=1;
|
||||
EF_ALIGNMENT=0;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
conf = NULL;
|
||||
section = NULL;
|
||||
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
|
||||
argc--;
|
||||
argv++;
|
||||
while (argc >= 1 && badops == 0)
|
||||
{
|
||||
if (strcmp(*argv,"-verbose") == 0)
|
||||
verbose++;
|
||||
else if (strcmp(*argv,"-config") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
configfile= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-name") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
section= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-srpvfile") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
dbfile= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-add") == 0)
|
||||
add_user=1;
|
||||
else if (strcmp(*argv,"-delete") == 0)
|
||||
delete_user=1;
|
||||
else if (strcmp(*argv,"-modify") == 0)
|
||||
modify_user=1;
|
||||
else if (strcmp(*argv,"-list") == 0)
|
||||
list_user=1;
|
||||
else if (strcmp(*argv,"-gn") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
gN= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-userinfo") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
userinfo= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-passin") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
passargin= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-passout") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
passargout= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
|
||||
else if (**argv == '-')
|
||||
{
|
||||
bad:
|
||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||
badops=1;
|
||||
break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
|
||||
if (dbfile && configfile)
|
||||
{
|
||||
BIO_printf(bio_err,"-dbfile and -configfile cannot be specified together.\n");
|
||||
badops = 1;
|
||||
}
|
||||
if (add_user+delete_user+modify_user+list_user != 1)
|
||||
{
|
||||
BIO_printf(bio_err,"Exactly one of the options -add, -delete, -modify -list must be specified.\n");
|
||||
badops = 1;
|
||||
}
|
||||
if (delete_user+modify_user+delete_user== 1 && argc <= 0)
|
||||
{
|
||||
BIO_printf(bio_err,"Need at least one user for options -add, -delete, -modify. \n");
|
||||
badops = 1;
|
||||
}
|
||||
if ((passin || passout) && argc != 1 )
|
||||
{
|
||||
BIO_printf(bio_err,"-passin, -passout arguments only valid with one user.\n");
|
||||
badops = 1;
|
||||
}
|
||||
|
||||
if (badops)
|
||||
{
|
||||
for (pp=srp_usage; (*pp != NULL); pp++)
|
||||
BIO_printf(bio_err,"%s",*pp);
|
||||
|
||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
BIO_printf(bio_err," load the file (or the files in the directory) into\n");
|
||||
BIO_printf(bio_err," the random number generator\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout))
|
||||
{
|
||||
BIO_printf(bio_err, "Error getting passwords\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!dbfile)
|
||||
{
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
tofree=NULL;
|
||||
if (configfile == NULL) configfile = getenv("OPENSSL_CONF");
|
||||
if (configfile == NULL) configfile = getenv("SSLEAY_CONF");
|
||||
if (configfile == NULL)
|
||||
{
|
||||
const char *s=X509_get_default_cert_area();
|
||||
size_t len;
|
||||
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
len = strlen(s)+sizeof(CONFIG_FILE);
|
||||
tofree=OPENSSL_malloc(len);
|
||||
strcpy(tofree,s);
|
||||
#else
|
||||
len = strlen(s)+sizeof(CONFIG_FILE)+1;
|
||||
tofree=OPENSSL_malloc(len);
|
||||
BUF_strlcpy(tofree,s,len);
|
||||
BUF_strlcat(tofree,"/",len);
|
||||
#endif
|
||||
BUF_strlcat(tofree,CONFIG_FILE,len);
|
||||
configfile=tofree;
|
||||
}
|
||||
|
||||
VERBOSE BIO_printf(bio_err,"Using configuration from %s\n",configfile);
|
||||
conf = NCONF_new(NULL);
|
||||
if (NCONF_load(conf,configfile,&errorline) <= 0)
|
||||
{
|
||||
if (errorline <= 0)
|
||||
BIO_printf(bio_err,"error loading the config file '%s'\n",
|
||||
configfile);
|
||||
else
|
||||
BIO_printf(bio_err,"error on line %ld of config file '%s'\n"
|
||||
,errorline,configfile);
|
||||
goto err;
|
||||
}
|
||||
if(tofree)
|
||||
{
|
||||
OPENSSL_free(tofree);
|
||||
tofree = NULL;
|
||||
}
|
||||
|
||||
if (!load_config(bio_err, conf))
|
||||
goto err;
|
||||
|
||||
/* Lets get the config section we are using */
|
||||
if (section == NULL)
|
||||
{
|
||||
VERBOSE BIO_printf(bio_err,"trying to read " ENV_DEFAULT_SRP " in \" BASE_SECTION \"\n");
|
||||
|
||||
section=NCONF_get_string(conf,BASE_SECTION,ENV_DEFAULT_SRP);
|
||||
if (section == NULL)
|
||||
{
|
||||
lookup_fail(BASE_SECTION,ENV_DEFAULT_SRP);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
if (randfile == NULL && conf)
|
||||
randfile = NCONF_get_string(conf, BASE_SECTION, "RANDFILE");
|
||||
|
||||
|
||||
VERBOSE BIO_printf(bio_err,"trying to read " ENV_DATABASE " in section \"%s\"\n",section);
|
||||
|
||||
if ((dbfile=NCONF_get_string(conf,section,ENV_DATABASE)) == NULL)
|
||||
{
|
||||
lookup_fail(section,ENV_DATABASE);
|
||||
goto err;
|
||||
}
|
||||
|
||||
}
|
||||
if (randfile == NULL)
|
||||
ERR_clear_error();
|
||||
else
|
||||
app_RAND_load_file(randfile, bio_err, 0);
|
||||
|
||||
VERBOSE BIO_printf(bio_err,"Trying to read SRP verifier file \"%s\"\n",dbfile);
|
||||
|
||||
db = load_index(dbfile, &db_attr);
|
||||
if (db == NULL) goto err;
|
||||
|
||||
/* Lets check some fields */
|
||||
for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++)
|
||||
{
|
||||
pp = sk_OPENSSL_PSTRING_value(db->db->data, i);
|
||||
|
||||
if (pp[DB_srptype][0] == DB_SRP_INDEX)
|
||||
{
|
||||
maxgN = i;
|
||||
if (gNindex < 0 && gN != NULL && !strcmp(gN, pp[DB_srpid]))
|
||||
gNindex = i;
|
||||
|
||||
print_index(db, bio_err, i, verbose > 1);
|
||||
}
|
||||
}
|
||||
|
||||
VERBOSE BIO_printf(bio_err, "Database initialised\n");
|
||||
|
||||
if (gNindex >= 0)
|
||||
{
|
||||
gNrow = sk_OPENSSL_PSTRING_value(db->db->data,gNindex);
|
||||
print_entry(db, bio_err, gNindex, verbose > 1, "Default g and N");
|
||||
}
|
||||
else if (maxgN > 0 && !SRP_get_default_gN(gN))
|
||||
{
|
||||
BIO_printf(bio_err, "No g and N value for index \"%s\"\n", gN);
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
{
|
||||
VERBOSE BIO_printf(bio_err, "Database has no g N information.\n");
|
||||
gNrow = NULL;
|
||||
}
|
||||
|
||||
|
||||
VVERBOSE BIO_printf(bio_err,"Starting user processing\n");
|
||||
|
||||
if (argc > 0)
|
||||
user = *(argv++) ;
|
||||
|
||||
while (list_user || user)
|
||||
{
|
||||
int userindex = -1;
|
||||
if (user)
|
||||
VVERBOSE BIO_printf(bio_err, "Processing user \"%s\"\n", user);
|
||||
if ((userindex = get_index(db, user, 'U')) >= 0)
|
||||
{
|
||||
print_user(db, bio_err, userindex, (verbose > 0) || list_user);
|
||||
}
|
||||
|
||||
if (list_user)
|
||||
{
|
||||
if (user == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"List all users\n");
|
||||
|
||||
for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++)
|
||||
{
|
||||
print_user(db,bio_err, i, 1);
|
||||
}
|
||||
list_user = 0;
|
||||
}
|
||||
else if (userindex < 0)
|
||||
{
|
||||
BIO_printf(bio_err, "user \"%s\" does not exist, ignored. t\n",
|
||||
user);
|
||||
errors++;
|
||||
}
|
||||
}
|
||||
else if (add_user)
|
||||
{
|
||||
if (userindex >= 0)
|
||||
{
|
||||
/* reactivation of a new user */
|
||||
char **row = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
|
||||
BIO_printf(bio_err, "user \"%s\" reactivated.\n", user);
|
||||
row[DB_srptype][0] = 'V';
|
||||
|
||||
doupdatedb = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *row[DB_NUMBER] ; char *gNid;
|
||||
row[DB_srpverifier] = NULL;
|
||||
row[DB_srpsalt] = NULL;
|
||||
row[DB_srpinfo] = NULL;
|
||||
if (!(gNid = srp_create_user(user,&(row[DB_srpverifier]), &(row[DB_srpsalt]),gNrow?gNrow[DB_srpsalt]:gN,gNrow?gNrow[DB_srpverifier]:NULL, passout, bio_err,verbose)))
|
||||
{
|
||||
BIO_printf(bio_err, "Cannot create srp verifier for user \"%s\", operation abandoned .\n", user);
|
||||
errors++;
|
||||
goto err;
|
||||
}
|
||||
row[DB_srpid] = BUF_strdup(user);
|
||||
row[DB_srptype] = BUF_strdup("v");
|
||||
row[DB_srpgN] = BUF_strdup(gNid);
|
||||
|
||||
if (!row[DB_srpid] || !row[DB_srpgN] || !row[DB_srptype] || !row[DB_srpverifier] || !row[DB_srpsalt] ||
|
||||
(userinfo && (!(row[DB_srpinfo] = BUF_strdup(userinfo)))) ||
|
||||
!update_index(db, bio_err, row))
|
||||
{
|
||||
if (row[DB_srpid]) OPENSSL_free(row[DB_srpid]);
|
||||
if (row[DB_srpgN]) OPENSSL_free(row[DB_srpgN]);
|
||||
if (row[DB_srpinfo]) OPENSSL_free(row[DB_srpinfo]);
|
||||
if (row[DB_srptype]) OPENSSL_free(row[DB_srptype]);
|
||||
if (row[DB_srpverifier]) OPENSSL_free(row[DB_srpverifier]);
|
||||
if (row[DB_srpsalt]) OPENSSL_free(row[DB_srpsalt]);
|
||||
goto err;
|
||||
}
|
||||
doupdatedb = 1;
|
||||
}
|
||||
}
|
||||
else if (modify_user)
|
||||
{
|
||||
if (userindex < 0)
|
||||
{
|
||||
BIO_printf(bio_err,"user \"%s\" does not exist, operation ignored.\n",user);
|
||||
errors++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
char **row = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
|
||||
char type = row[DB_srptype][0];
|
||||
if (type == 'v')
|
||||
{
|
||||
BIO_printf(bio_err,"user \"%s\" already updated, operation ignored.\n",user);
|
||||
errors++;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *gNid;
|
||||
|
||||
if (row[DB_srptype][0] == 'V')
|
||||
{
|
||||
int user_gN;
|
||||
char **irow = NULL;
|
||||
VERBOSE BIO_printf(bio_err,"Verifying password for user \"%s\"\n",user);
|
||||
if ( (user_gN = get_index(db, row[DB_srpgN], DB_SRP_INDEX)) >= 0)
|
||||
irow = (char **)sk_OPENSSL_PSTRING_value(db->db->data, userindex);
|
||||
|
||||
if (!srp_verify_user(user, row[DB_srpverifier], row[DB_srpsalt], irow ? irow[DB_srpsalt] : row[DB_srpgN], irow ? irow[DB_srpverifier] : NULL, passin, bio_err, verbose))
|
||||
{
|
||||
BIO_printf(bio_err, "Invalid password for user \"%s\", operation abandoned.\n", user);
|
||||
errors++;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
VERBOSE BIO_printf(bio_err,"Password for user \"%s\" ok.\n",user);
|
||||
|
||||
if (!(gNid=srp_create_user(user,&(row[DB_srpverifier]), &(row[DB_srpsalt]),gNrow?gNrow[DB_srpsalt]:NULL, gNrow?gNrow[DB_srpverifier]:NULL, passout, bio_err,verbose)))
|
||||
{
|
||||
BIO_printf(bio_err, "Cannot create srp verifier for user \"%s\", operation abandoned.\n", user);
|
||||
errors++;
|
||||
goto err;
|
||||
}
|
||||
|
||||
row[DB_srptype][0] = 'v';
|
||||
row[DB_srpgN] = BUF_strdup(gNid);
|
||||
|
||||
if (!row[DB_srpid] || !row[DB_srpgN] || !row[DB_srptype] || !row[DB_srpverifier] || !row[DB_srpsalt] ||
|
||||
(userinfo && (!(row[DB_srpinfo] = BUF_strdup(userinfo)))))
|
||||
goto err;
|
||||
|
||||
doupdatedb = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (delete_user)
|
||||
{
|
||||
if (userindex < 0)
|
||||
{
|
||||
BIO_printf(bio_err, "user \"%s\" does not exist, operation ignored. t\n", user);
|
||||
errors++;
|
||||
}
|
||||
else
|
||||
{
|
||||
char **xpp = sk_OPENSSL_PSTRING_value(db->db->data,userindex);
|
||||
BIO_printf(bio_err, "user \"%s\" revoked. t\n", user);
|
||||
|
||||
xpp[DB_srptype][0] = 'R';
|
||||
|
||||
doupdatedb = 1;
|
||||
}
|
||||
}
|
||||
if (--argc > 0)
|
||||
user = *(argv++) ;
|
||||
else
|
||||
{
|
||||
user = NULL;
|
||||
list_user = 0;
|
||||
}
|
||||
}
|
||||
|
||||
VERBOSE BIO_printf(bio_err,"User procession done.\n");
|
||||
|
||||
|
||||
if (doupdatedb)
|
||||
{
|
||||
/* Lets check some fields */
|
||||
for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++)
|
||||
{
|
||||
pp = sk_OPENSSL_PSTRING_value(db->db->data,i);
|
||||
|
||||
if (pp[DB_srptype][0] == 'v')
|
||||
{
|
||||
pp[DB_srptype][0] = 'V';
|
||||
print_user(db, bio_err, i, verbose);
|
||||
}
|
||||
}
|
||||
|
||||
VERBOSE BIO_printf(bio_err, "Trying to update srpvfile.\n");
|
||||
if (!save_index(dbfile, "new", db)) goto err;
|
||||
|
||||
VERBOSE BIO_printf(bio_err, "Temporary srpvfile created.\n");
|
||||
if (!rotate_index(dbfile, "new", "old")) goto err;
|
||||
|
||||
VERBOSE BIO_printf(bio_err, "srpvfile updated.\n");
|
||||
}
|
||||
|
||||
ret = (errors != 0);
|
||||
err:
|
||||
if (errors != 0)
|
||||
VERBOSE BIO_printf(bio_err,"User errors %d.\n",errors);
|
||||
|
||||
VERBOSE BIO_printf(bio_err,"SRP terminating with code %d.\n",ret);
|
||||
if(tofree)
|
||||
OPENSSL_free(tofree);
|
||||
if (ret) ERR_print_errors(bio_err);
|
||||
if (randfile) app_RAND_write_file(randfile, bio_err);
|
||||
if (conf) NCONF_free(conf);
|
||||
if (db) free_index(db);
|
||||
|
||||
OBJ_cleanup();
|
||||
apps_shutdown();
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -222,25 +222,37 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (argc < 1) check(cert_ctx, NULL, untrusted, trusted, crls, e);
|
||||
ret = 0;
|
||||
if (argc < 1)
|
||||
{
|
||||
if (1 != check(cert_ctx, NULL, untrusted, trusted, crls, e))
|
||||
ret = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i=0; i<argc; i++)
|
||||
check(cert_ctx,argv[i], untrusted, trusted, crls, e);
|
||||
ret=0;
|
||||
if (1 != check(cert_ctx,argv[i], untrusted, trusted, crls, e))
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
end:
|
||||
if (ret == 1) {
|
||||
BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-crl_check]");
|
||||
BIO_printf(bio_err," [-attime timestamp]");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," [-engine e]");
|
||||
#endif
|
||||
BIO_printf(bio_err," cert1 cert2 ...\n");
|
||||
|
||||
BIO_printf(bio_err,"recognized usages:\n");
|
||||
for(i = 0; i < X509_PURPOSE_get_count(); i++) {
|
||||
for(i = 0; i < X509_PURPOSE_get_count(); i++)
|
||||
{
|
||||
X509_PURPOSE *ptmp;
|
||||
ptmp = X509_PURPOSE_get0(i);
|
||||
BIO_printf(bio_err, "\t%-10s\t%s\n", X509_PURPOSE_get0_sname(ptmp),
|
||||
X509_PURPOSE_get0_name(ptmp));
|
||||
}
|
||||
BIO_printf(bio_err, "\t%-10s\t%s\n",
|
||||
X509_PURPOSE_get0_sname(ptmp),
|
||||
X509_PURPOSE_get0_name(ptmp));
|
||||
}
|
||||
}
|
||||
if (vpm) X509_VERIFY_PARAM_free(vpm);
|
||||
if (cert_ctx != NULL) X509_STORE_free(cert_ctx);
|
||||
@@ -248,7 +260,7 @@ end:
|
||||
sk_X509_pop_free(trusted, X509_free);
|
||||
sk_X509_CRL_pop_free(crls, X509_CRL_free);
|
||||
apps_shutdown();
|
||||
OPENSSL_EXIT(ret);
|
||||
OPENSSL_EXIT(ret < 0 ? 2 : ret);
|
||||
}
|
||||
|
||||
static int check(X509_STORE *ctx, char *file,
|
||||
|
||||
36
apps/x509.c
36
apps/x509.c
@@ -157,9 +157,10 @@ static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx);
|
||||
static int sign (X509 *x, EVP_PKEY *pkey,int days,int clrext, const EVP_MD *digest,
|
||||
CONF *conf, char *section);
|
||||
static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest,
|
||||
X509 *x,X509 *xca,EVP_PKEY *pkey,char *serial,
|
||||
int create,int days, int clrext, CONF *conf, char *section,
|
||||
ASN1_INTEGER *sno);
|
||||
X509 *x,X509 *xca,EVP_PKEY *pkey,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts,
|
||||
char *serial, int create ,int days, int clrext,
|
||||
CONF *conf, char *section, ASN1_INTEGER *sno);
|
||||
static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt);
|
||||
static int reqfile=0;
|
||||
|
||||
@@ -172,6 +173,7 @@ int MAIN(int argc, char **argv)
|
||||
X509_REQ *req=NULL;
|
||||
X509 *x=NULL,*xca=NULL;
|
||||
ASN1_OBJECT *objtmp;
|
||||
STACK_OF(OPENSSL_STRING) *sigopts = NULL;
|
||||
EVP_PKEY *Upkey=NULL,*CApkey=NULL;
|
||||
ASN1_INTEGER *sno = NULL;
|
||||
int i,num,badops=0;
|
||||
@@ -271,13 +273,22 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
CAkeyformat=str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-sigopt") == 0)
|
||||
{
|
||||
if (--argc < 1)
|
||||
goto bad;
|
||||
if (!sigopts)
|
||||
sigopts = sk_OPENSSL_STRING_new_null();
|
||||
if (!sigopts || !sk_OPENSSL_STRING_push(sigopts, *(++argv)))
|
||||
goto bad;
|
||||
}
|
||||
else if (strcmp(*argv,"-days") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
days=atoi(*(++argv));
|
||||
if (days == 0)
|
||||
{
|
||||
BIO_printf(STDout,"bad number of days\n");
|
||||
BIO_printf(bio_err,"bad number of days\n");
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
@@ -901,7 +912,7 @@ bad:
|
||||
}
|
||||
else if (text == i)
|
||||
{
|
||||
X509_print_ex(out,x,nmflag, certflag);
|
||||
X509_print_ex(STDout,x,nmflag, certflag);
|
||||
}
|
||||
else if (startdate == i)
|
||||
{
|
||||
@@ -970,7 +981,8 @@ bad:
|
||||
|
||||
assert(need_rand);
|
||||
if (!x509_certify(ctx,CAfile,digest,x,xca,
|
||||
CApkey, CAserial,CA_createserial,days, clrext,
|
||||
CApkey, sigopts,
|
||||
CAserial,CA_createserial,days, clrext,
|
||||
extconf, extsect, sno))
|
||||
goto end;
|
||||
}
|
||||
@@ -1081,6 +1093,8 @@ end:
|
||||
X509_free(xca);
|
||||
EVP_PKEY_free(Upkey);
|
||||
EVP_PKEY_free(CApkey);
|
||||
if (sigopts)
|
||||
sk_OPENSSL_STRING_free(sigopts);
|
||||
X509_REQ_free(rq);
|
||||
ASN1_INTEGER_free(sno);
|
||||
sk_ASN1_OBJECT_pop_free(trust, ASN1_OBJECT_free);
|
||||
@@ -1131,8 +1145,11 @@ static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create
|
||||
}
|
||||
|
||||
static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
|
||||
X509 *x, X509 *xca, EVP_PKEY *pkey, char *serialfile, int create,
|
||||
int days, int clrext, CONF *conf, char *section, ASN1_INTEGER *sno)
|
||||
X509 *x, X509 *xca, EVP_PKEY *pkey,
|
||||
STACK_OF(OPENSSL_STRING) *sigopts,
|
||||
char *serialfile, int create,
|
||||
int days, int clrext, CONF *conf, char *section,
|
||||
ASN1_INTEGER *sno)
|
||||
{
|
||||
int ret=0;
|
||||
ASN1_INTEGER *bs=NULL;
|
||||
@@ -1191,7 +1208,8 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
|
||||
if (!X509V3_EXT_add_nconf(conf, &ctx2, section, x)) goto end;
|
||||
}
|
||||
|
||||
if (!X509_sign(x,pkey,digest)) goto end;
|
||||
if (!do_X509_sign(bio_err, x, pkey, digest, sigopts))
|
||||
goto end;
|
||||
ret=1;
|
||||
end:
|
||||
X509_STORE_CTX_cleanup(&xsc);
|
||||
|
||||
96
config
96
config
@@ -370,6 +370,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
NONSTOP_KERNEL*)
|
||||
echo "nsr-tandem-nsk"; exit 0;
|
||||
;;
|
||||
|
||||
vxworks*)
|
||||
echo "${MACHINE}-whatever-vxworks"; exit 0;
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
@@ -407,23 +411,18 @@ exit 0
|
||||
# this is where the translation occurs into SSLeay terms
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
GCCVER=`(gcc -dumpversion) 2>/dev/null`
|
||||
if [ "$GCCVER" != "" ]; then
|
||||
# then strip off whatever prefix egcs prepends the number with...
|
||||
# Hopefully, this will work for any future prefixes as well.
|
||||
GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'`
|
||||
# Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion
|
||||
# does give us what we want though, so we use that. We just just the
|
||||
# major and minor version numbers.
|
||||
# peak single digit before and after first dot, e.g. 2.95.1 gives 29
|
||||
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
|
||||
fi
|
||||
|
||||
# Only set CC if not supplied already
|
||||
if [ -z "$CC" ]; then
|
||||
# figure out if gcc is available and if so we use it otherwise
|
||||
# we fallback to whatever cc does on the system
|
||||
if [ -z "$CROSS_COMPILE$CC" ]; then
|
||||
GCCVER=`sh -c "gcc -dumpversion" 2>/dev/null`
|
||||
if [ "$GCCVER" != "" ]; then
|
||||
# then strip off whatever prefix egcs prepends the number with...
|
||||
# Hopefully, this will work for any future prefixes as well.
|
||||
GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'`
|
||||
# Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion
|
||||
# does give us what we want though, so we use that. We just just the
|
||||
# major and minor version numbers.
|
||||
# peak single digit before and after first dot, e.g. 2.95.1 gives 29
|
||||
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
|
||||
CC=gcc
|
||||
else
|
||||
CC=cc
|
||||
@@ -539,7 +538,7 @@ case "$GUESSOS" in
|
||||
ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
|
||||
ppc-apple-darwin*)
|
||||
ISA64=`(sysctl -n hw.optional.64bitops) 2>/dev/null`
|
||||
if [ "$ISA64" = "1" ]; then
|
||||
if [ "$ISA64" = "1" -a -z "$KERNEL_BITS" ]; then
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure darwin64-ppc-cc' *manually*."
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
@@ -547,10 +546,14 @@ case "$GUESSOS" in
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
fi
|
||||
OUT="darwin-ppc-cc" ;;
|
||||
if [ "$ISA64" = "1" -a "$KERNEL_BITS" = "64" ]; then
|
||||
OUT="darwin64-ppc-cc"
|
||||
else
|
||||
OUT="darwin-ppc-cc"
|
||||
fi ;;
|
||||
i?86-apple-darwin*)
|
||||
ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null`
|
||||
if [ "$ISA64" = "1" ]; then
|
||||
if [ "$ISA64" = "1" -a -z "$KERNEL_BITS" ]; then
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure darwin64-x86_64-cc' *manually*."
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
@@ -558,7 +561,17 @@ case "$GUESSOS" in
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
fi
|
||||
OUT="darwin-i386-cc" ;;
|
||||
if [ "$ISA64" = "1" -a "$KERNEL_BITS" = "64" ]; then
|
||||
OUT="darwin64-x86_64-cc"
|
||||
else
|
||||
OUT="darwin-i386-cc"
|
||||
fi ;;
|
||||
armv6+7-*-iphoneos)
|
||||
options="$options -arch%20armv6 -arch%20armv7"
|
||||
OUT="iphoneos-cross" ;;
|
||||
*-*-iphoneos)
|
||||
options="$options -arch%20${MACHINE}"
|
||||
OUT="iphoneos-cross" ;;
|
||||
alpha-*-linux2)
|
||||
ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo`
|
||||
case ${ISA:-generic} in
|
||||
@@ -583,6 +596,11 @@ case "$GUESSOS" in
|
||||
OUT="linux-ppc"
|
||||
;;
|
||||
ppc-*-linux2) OUT="linux-ppc" ;;
|
||||
ppc60x-*-vxworks*) OUT="vxworks-ppc60x" ;;
|
||||
ppcgen-*-vxworks*) OUT="vxworks-ppcgen" ;;
|
||||
pentium-*-vxworks*) OUT="vxworks-pentium" ;;
|
||||
simlinux-*-vxworks*) OUT="vxworks-simlinux" ;;
|
||||
mips-*-vxworks*) OUT="vxworks-mips";;
|
||||
ia64-*-linux?) OUT="linux-ia64" ;;
|
||||
sparc64-*-linux2)
|
||||
echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI"
|
||||
@@ -624,12 +642,24 @@ case "$GUESSOS" in
|
||||
options="$options -DB_ENDIAN -mschedule=$CPUSCHEDULE -march=$CPUARCH"
|
||||
OUT="linux-generic32" ;;
|
||||
armv[1-3]*-*-linux2) OUT="linux-generic32" ;;
|
||||
armv[7-9]*-*-linux2) OUT="linux-armv4"; options="$options -march=armv7-a" ;;
|
||||
arm*-*-linux2) OUT="linux-armv4" ;;
|
||||
sh*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
|
||||
sh*-*-linux2) OUT="linux-generic32"; options="$options -DL_ENDIAN" ;;
|
||||
m68k*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
|
||||
s390-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
|
||||
s390x-*-linux2) OUT="linux-s390x" ;;
|
||||
s390x-*-linux2)
|
||||
# To be uncommented when glibc bug is fixed, see Configure...
|
||||
#if egrep -e '^features.* highgprs' /proc/cpuinfo >/dev/null ; then
|
||||
# echo "WARNING! If you wish to build \"highgprs\" 32-bit library, then you"
|
||||
# echo " have to invoke './Configure linux32-s390x' *manually*."
|
||||
# if [ "$TEST" = "false" -a -t -1 ]; then
|
||||
# echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
# (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
# fi
|
||||
#fi
|
||||
OUT="linux64-s390x"
|
||||
;;
|
||||
x86_64-*-linux?) OUT="linux-x86_64" ;;
|
||||
*86-*-linux2) OUT="linux-elf"
|
||||
if [ "$GCCVER" -gt 28 ]; then
|
||||
@@ -648,7 +678,7 @@ case "$GUESSOS" in
|
||||
sun4[uv]*-*-solaris2)
|
||||
OUT="solaris-sparcv9-$CC"
|
||||
ISA64=`(isalist) 2>/dev/null | grep sparcv9`
|
||||
if [ "$ISA64" != "" ]; then
|
||||
if [ "$ISA64" != "" -a "$KERNEL_BITS" = "" ]; then
|
||||
if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure solaris64-sparcv9-cc' *manually*."
|
||||
@@ -678,13 +708,16 @@ case "$GUESSOS" in
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$ISA64" != "" -a "$KERNEL_BITS" = "64" ]; then
|
||||
OUT="solaris64-sparcv9-$CC"
|
||||
fi
|
||||
;;
|
||||
sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
|
||||
sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
|
||||
sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;;
|
||||
*86*-*-solaris2)
|
||||
ISA64=`(isalist) 2>/dev/null | grep amd64`
|
||||
if [ "$ISA64" != "" ]; then
|
||||
if [ "$ISA64" != "" -a ${KERNEL_BITS:-64} -eq 64 ]; then
|
||||
OUT="solaris64-x86_64-$CC"
|
||||
else
|
||||
OUT="solaris-x86-$CC"
|
||||
@@ -736,20 +769,17 @@ case "$GUESSOS" in
|
||||
if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then
|
||||
OUT="hpux64-parisc2-gcc"
|
||||
fi
|
||||
KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
|
||||
[ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
|
||||
KERNEL_BITS=${KERNEL_BITS:-32}
|
||||
CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null`
|
||||
CPU_VERSION=${CPU_VERSION:-0}
|
||||
# See <sys/unistd.h> for further info on CPU_VERSION.
|
||||
if [ $CPU_VERSION -ge 768 ]; then # IA-64 CPU
|
||||
echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi."
|
||||
echo " If you wish to build 32-bit library, the you have to"
|
||||
echo " invoke './Configure hpux-ia64-cc' *manually*."
|
||||
if [ "$TEST" = "false" -a -t 1 ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
|
||||
fi
|
||||
OUT="hpux64-ia64-cc"
|
||||
if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
|
||||
OUT="hpux64-ia64-cc"
|
||||
else
|
||||
OUT="hpux-ia64-cc"
|
||||
fi
|
||||
elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU
|
||||
OUT=${OUT:-"hpux-parisc2-${CC}"}
|
||||
if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
|
||||
@@ -770,7 +800,7 @@ case "$GUESSOS" in
|
||||
options="$options -D_REENTRANT" ;;
|
||||
*-hpux) OUT="hpux-parisc-$CC" ;;
|
||||
*-aix)
|
||||
KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null`
|
||||
[ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null`
|
||||
KERNEL_BITS=${KERNEL_BITS:-32}
|
||||
OBJECT_MODE=${OBJECT_MODE:-32}
|
||||
if [ "$CC" = "gcc" ]; then
|
||||
@@ -810,6 +840,8 @@ case "$GUESSOS" in
|
||||
beos-*) OUT="$GUESSOS" ;;
|
||||
x86pc-*-qnx6) OUT="QNX6-i386" ;;
|
||||
*-*-qnx6) OUT="QNX6" ;;
|
||||
x86-*-android|i?86-*-android) OUT="android-x86" ;;
|
||||
armv[7-9]*-*-android) OUT="android-armv7" ;;
|
||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -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>
|
||||
* All rights reserved.
|
||||
@@ -88,6 +87,12 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
||||
size_t filespeclen = strlen(directory);
|
||||
char *filespec = NULL;
|
||||
|
||||
if (filespeclen == 0)
|
||||
{
|
||||
errno = ENOENT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* MUST be a VMS directory specification! Let's estimate if it is. */
|
||||
if (directory[filespeclen-1] != ']'
|
||||
&& directory[filespeclen-1] != '>'
|
||||
|
||||
@@ -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>
|
||||
* All rights reserved.
|
||||
@@ -37,7 +36,7 @@
|
||||
#if defined(LP_SYS_WINCE) && !defined(FindFirstFile)
|
||||
# define FindFirstFile FindFirstFileW
|
||||
#endif
|
||||
#if defined(LP_SYS_WINCE) && !defined(FindFirstFile)
|
||||
#if defined(LP_SYS_WINCE) && !defined(FindNextFile)
|
||||
# define FindNextFile FindNextFileW
|
||||
#endif
|
||||
|
||||
@@ -63,6 +62,16 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
||||
errno = 0;
|
||||
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));
|
||||
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));
|
||||
|
||||
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))
|
||||
{
|
||||
TCHAR *wdir = NULL;
|
||||
/* 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 (extdirbuf != NULL)
|
||||
{
|
||||
free (extdirbuf);
|
||||
}
|
||||
free(*ctx);
|
||||
*ctx = NULL;
|
||||
errno = ENOMEM;
|
||||
@@ -87,17 +116,23 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
||||
}
|
||||
|
||||
#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
|
||||
for (index = 0; index < len_0; index++)
|
||||
wdir[index] = (TCHAR)directory[index];
|
||||
wdir[index] = (TCHAR)extdir[index];
|
||||
|
||||
(*ctx)->handle = FindFirstFile(wdir, &(*ctx)->ctx);
|
||||
|
||||
free(wdir);
|
||||
}
|
||||
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)
|
||||
{
|
||||
@@ -114,7 +149,6 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof(TCHAR) != sizeof(char))
|
||||
{
|
||||
TCHAR *wdir = (*ctx)->ctx.cFileName;
|
||||
|
||||
@@ -7,7 +7,7 @@ TOP= ..
|
||||
CC= cc
|
||||
INCLUDE= -I. -I$(TOP) -I../include $(ZLIB_INCLUDE)
|
||||
# INCLUDES targets sudbirs!
|
||||
INCLUDES= -I.. -I../.. -I../asn1 -I../evp -I../../include $(ZLIB_INCLUDE)
|
||||
INCLUDES= -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include $(ZLIB_INCLUDE)
|
||||
CFLAG= -g
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
@@ -31,17 +31,21 @@ CPUID_OBJ=mem_clr.o
|
||||
LIBS=
|
||||
|
||||
GENERAL=Makefile README crypto-lib.com install.com
|
||||
TEST=constant_time_test.c
|
||||
|
||||
LIB= $(TOP)/libcrypto.a
|
||||
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
||||
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c o_dir.c
|
||||
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o o_dir.o $(CPUID_OBJ)
|
||||
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
|
||||
ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c
|
||||
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o ebcdic.o \
|
||||
uid.o o_time.o o_str.o o_dir.o o_fips.o o_init.o fips_ers.o $(CPUID_OBJ)
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= crypto.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
|
||||
ossl_typ.h
|
||||
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h $(EXHEADER)
|
||||
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h \
|
||||
constant_time_locl.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
@@ -51,12 +55,7 @@ top:
|
||||
all: shared
|
||||
|
||||
buildinf.h: ../Makefile
|
||||
( echo "#ifndef MK1MF_BUILD"; \
|
||||
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
|
||||
$(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h
|
||||
|
||||
x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
|
||||
$(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
||||
@@ -67,16 +66,17 @@ applink.o: $(TOP)/ms/applink.c
|
||||
uplink.o: $(TOP)/ms/uplink.c applink.o
|
||||
$(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c
|
||||
|
||||
uplink-cof.s: $(TOP)/ms/uplink.pl
|
||||
$(PERL) $(TOP)/ms/uplink.pl coff > $@
|
||||
uplink-x86.s: $(TOP)/ms/uplink-x86.pl
|
||||
$(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) > $@
|
||||
|
||||
x86_64cpuid.s: x86_64cpuid.pl
|
||||
$(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
|
||||
ia64cpuid.s: ia64cpuid.S
|
||||
$(CC) $(CFLAGS) -E ia64cpuid.S > $@
|
||||
x86_64cpuid.s: x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
|
||||
ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS) -E ia64cpuid.S > $@
|
||||
ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
|
||||
pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@
|
||||
alphacpuid.s: alphacpuid.pl
|
||||
$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
|
||||
(preproc=/tmp/$$$$.$@; trap "rm $$preproc" INT; \
|
||||
$(PERL) alphacpuid.pl > $$preproc && \
|
||||
$(CC) -E $$preproc > $@ && rm $$preproc)
|
||||
|
||||
testapps:
|
||||
[ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \
|
||||
@@ -102,6 +102,7 @@ lib: $(LIB)
|
||||
@touch lib
|
||||
$(LIB): $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
[ -z "$(FIPSLIBDIR)" ] || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
|
||||
shared: buildinf.h lib subdirs
|
||||
@@ -171,6 +172,7 @@ ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
|
||||
ex_data.o: ex_data.c
|
||||
fips_ers.o: ../include/openssl/opensslconf.h fips_ers.c
|
||||
mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
@@ -191,6 +193,19 @@ mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
|
||||
mem_dbg.o: mem_dbg.c
|
||||
o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
|
||||
o_dir.o: LPdir_unix.c o_dir.c o_dir.h
|
||||
o_fips.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
o_fips.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
o_fips.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
o_fips.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
o_fips.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
o_fips.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
|
||||
o_fips.o: o_fips.c
|
||||
o_init.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h
|
||||
o_init.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
o_init.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
|
||||
o_init.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
o_init.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
o_init.o: ../include/openssl/symhacks.h o_init.c
|
||||
o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
|
||||
o_str.o: o_str.c o_str.h
|
||||
o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
|
||||
|
||||
@@ -50,9 +50,21 @@ aes-ia64.s: asm/aes-ia64.S
|
||||
|
||||
aes-586.s: asm/aes-586.pl ../perlasm/x86asm.pl
|
||||
$(PERL) asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
||||
vpaes-x86.s: asm/vpaes-x86.pl ../perlasm/x86asm.pl
|
||||
$(PERL) asm/vpaes-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
||||
aesni-x86.s: asm/aesni-x86.pl ../perlasm/x86asm.pl
|
||||
$(PERL) asm/aesni-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
||||
|
||||
aes-x86_64.s: asm/aes-x86_64.pl
|
||||
$(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@
|
||||
vpaes-x86_64.s: asm/vpaes-x86_64.pl
|
||||
$(PERL) asm/vpaes-x86_64.pl $(PERLASM_SCHEME) > $@
|
||||
bsaes-x86_64.s: asm/bsaes-x86_64.pl
|
||||
$(PERL) asm/bsaes-x86_64.pl $(PERLASM_SCHEME) > $@
|
||||
aesni-x86_64.s: asm/aesni-x86_64.pl
|
||||
$(PERL) asm/aesni-x86_64.pl $(PERLASM_SCHEME) > $@
|
||||
aesni-sha1-x86_64.s: asm/aesni-sha1-x86_64.pl
|
||||
$(PERL) asm/aesni-sha1-x86_64.pl $(PERLASM_SCHEME) > $@
|
||||
|
||||
aes-sparcv9.s: asm/aes-sparcv9.pl
|
||||
$(PERL) asm/aes-sparcv9.pl $(CFLAGS) > $@
|
||||
@@ -60,8 +72,15 @@ aes-sparcv9.s: asm/aes-sparcv9.pl
|
||||
aes-ppc.s: asm/aes-ppc.pl
|
||||
$(PERL) asm/aes-ppc.pl $(PERLASM_SCHEME) $@
|
||||
|
||||
aes-parisc.s: asm/aes-parisc.pl
|
||||
$(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@
|
||||
|
||||
aes-mips.S: asm/aes-mips.pl
|
||||
$(PERL) asm/aes-mips.pl $(PERLASM_SCHEME) $@
|
||||
|
||||
# GNU make "catch all"
|
||||
aes-%.s: asm/aes-%.pl; $(PERL) $< $(CFLAGS) > $@
|
||||
aes-%.S: asm/aes-%.pl; $(PERL) $< $(PERLASM_SCHEME) > $@
|
||||
aes-armv4.o: aes-armv4.S
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
@@ -117,9 +136,11 @@ aes_ige.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
aes_ige.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
aes_ige.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
aes_ige.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_ige.c aes_locl.h
|
||||
aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_misc.o: ../../include/openssl/opensslconf.h
|
||||
aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c
|
||||
aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
|
||||
aes_misc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
aes_misc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
aes_misc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
aes_misc.o: ../../include/openssl/symhacks.h aes_locl.h aes_misc.c
|
||||
aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
|
||||
aes_ofb.o: ../../include/openssl/opensslconf.h aes_ofb.c
|
||||
aes_wrap.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
|
||||
@@ -90,6 +90,11 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key);
|
||||
|
||||
int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key);
|
||||
int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key);
|
||||
|
||||
void AES_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key);
|
||||
void AES_decrypt(const unsigned char *in, unsigned char *out,
|
||||
|
||||
@@ -625,7 +625,7 @@ static const u32 rcon[] = {
|
||||
/**
|
||||
* Expand the cipher key into the encryption key schedule.
|
||||
*/
|
||||
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key) {
|
||||
|
||||
u32 *rk;
|
||||
@@ -726,7 +726,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
/**
|
||||
* Expand the cipher key into the decryption key schedule.
|
||||
*/
|
||||
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key) {
|
||||
|
||||
u32 *rk;
|
||||
@@ -734,7 +734,7 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
u32 temp;
|
||||
|
||||
/* first, start with an encryption schedule */
|
||||
status = AES_set_encrypt_key(userKey, bits, key);
|
||||
status = private_AES_set_encrypt_key(userKey, bits, key);
|
||||
if (status < 0)
|
||||
return status;
|
||||
|
||||
@@ -1201,7 +1201,7 @@ static const u32 rcon[] = {
|
||||
/**
|
||||
* Expand the cipher key into the encryption key schedule.
|
||||
*/
|
||||
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key) {
|
||||
u32 *rk;
|
||||
int i = 0;
|
||||
@@ -1301,7 +1301,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
/**
|
||||
* Expand the cipher key into the decryption key schedule.
|
||||
*/
|
||||
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key) {
|
||||
|
||||
u32 *rk;
|
||||
@@ -1309,7 +1309,7 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
u32 temp;
|
||||
|
||||
/* first, start with an encryption schedule */
|
||||
status = AES_set_encrypt_key(userKey, bits, key);
|
||||
status = private_AES_set_encrypt_key(userKey, bits, key);
|
||||
if (status < 0)
|
||||
return status;
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
*/
|
||||
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/aes.h>
|
||||
#include "aes_locl.h"
|
||||
|
||||
@@ -62,3 +63,23 @@ const char *AES_options(void) {
|
||||
return "aes(partial)";
|
||||
#endif
|
||||
}
|
||||
|
||||
/* FIPS wrapper functions to block low level AES calls in FIPS mode */
|
||||
|
||||
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key)
|
||||
{
|
||||
#ifdef OPENSSL_FIPS
|
||||
fips_cipher_abort(AES);
|
||||
#endif
|
||||
return private_AES_set_encrypt_key(userKey, bits, key);
|
||||
}
|
||||
|
||||
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key)
|
||||
{
|
||||
#ifdef OPENSSL_FIPS
|
||||
fips_cipher_abort(AES);
|
||||
#endif
|
||||
return private_AES_set_decrypt_key(userKey, bits, key);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
# but exhibits up to 10% improvement on other cores.
|
||||
#
|
||||
# Second version is "monolithic" replacement for aes_core.c, which in
|
||||
# addition to AES_[de|en]crypt implements AES_set_[de|en]cryption_key.
|
||||
# addition to AES_[de|en]crypt implements private_AES_set_[de|en]cryption_key.
|
||||
# This made it possible to implement little-endian variant of the
|
||||
# algorithm without modifying the base C code. Motivating factor for
|
||||
# the undertaken effort was that it appeared that in tight IA-32
|
||||
@@ -2854,12 +2854,12 @@ sub enckey()
|
||||
&set_label("exit");
|
||||
&function_end("_x86_AES_set_encrypt_key");
|
||||
|
||||
# int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
# int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
# AES_KEY *key)
|
||||
&function_begin_B("AES_set_encrypt_key");
|
||||
&function_begin_B("private_AES_set_encrypt_key");
|
||||
&call ("_x86_AES_set_encrypt_key");
|
||||
&ret ();
|
||||
&function_end_B("AES_set_encrypt_key");
|
||||
&function_end_B("private_AES_set_encrypt_key");
|
||||
|
||||
sub deckey()
|
||||
{ my ($i,$key,$tp1,$tp2,$tp4,$tp8) = @_;
|
||||
@@ -2916,9 +2916,9 @@ sub deckey()
|
||||
&mov (&DWP(4*$i,$key),$tp1);
|
||||
}
|
||||
|
||||
# int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
# int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
# AES_KEY *key)
|
||||
&function_begin_B("AES_set_decrypt_key");
|
||||
&function_begin_B("private_AES_set_decrypt_key");
|
||||
&call ("_x86_AES_set_encrypt_key");
|
||||
&cmp ("eax",0);
|
||||
&je (&label("proceed"));
|
||||
@@ -2974,7 +2974,7 @@ sub deckey()
|
||||
&jb (&label("permute"));
|
||||
|
||||
&xor ("eax","eax"); # return success
|
||||
&function_end("AES_set_decrypt_key");
|
||||
&function_end("private_AES_set_decrypt_key");
|
||||
&asciz("AES for x86, CRYPTOGAMS by <appro\@openssl.org>");
|
||||
|
||||
&asm_finish();
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
# Rescheduling for dual-issue pipeline resulted in 12% improvement on
|
||||
# Cortex A8 core and ~25 cycles per byte processed with 128-bit key.
|
||||
|
||||
# February 2011.
|
||||
#
|
||||
# Profiler-assisted and platform-specific optimization resulted in 16%
|
||||
# improvement on Cortex A8 core and ~21.5 cycles per byte.
|
||||
|
||||
while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
|
||||
open STDOUT,">$output";
|
||||
|
||||
@@ -46,6 +51,7 @@ $key="r11";
|
||||
$rounds="r12";
|
||||
|
||||
$code=<<___;
|
||||
#include "arm_arch.h"
|
||||
.text
|
||||
.code 32
|
||||
|
||||
@@ -166,7 +172,7 @@ AES_encrypt:
|
||||
mov $rounds,r0 @ inp
|
||||
mov $key,r2
|
||||
sub $tbl,r3,#AES_encrypt-AES_Te @ Te
|
||||
|
||||
#if __ARM_ARCH__<7
|
||||
ldrb $s0,[$rounds,#3] @ load input data in endian-neutral
|
||||
ldrb $t1,[$rounds,#2] @ manner...
|
||||
ldrb $t2,[$rounds,#1]
|
||||
@@ -195,10 +201,33 @@ AES_encrypt:
|
||||
orr $s3,$s3,$t1,lsl#8
|
||||
orr $s3,$s3,$t2,lsl#16
|
||||
orr $s3,$s3,$t3,lsl#24
|
||||
|
||||
#else
|
||||
ldr $s0,[$rounds,#0]
|
||||
ldr $s1,[$rounds,#4]
|
||||
ldr $s2,[$rounds,#8]
|
||||
ldr $s3,[$rounds,#12]
|
||||
#ifdef __ARMEL__
|
||||
rev $s0,$s0
|
||||
rev $s1,$s1
|
||||
rev $s2,$s2
|
||||
rev $s3,$s3
|
||||
#endif
|
||||
#endif
|
||||
bl _armv4_AES_encrypt
|
||||
|
||||
ldr $rounds,[sp],#4 @ pop out
|
||||
#if __ARM_ARCH__>=7
|
||||
#ifdef __ARMEL__
|
||||
rev $s0,$s0
|
||||
rev $s1,$s1
|
||||
rev $s2,$s2
|
||||
rev $s3,$s3
|
||||
#endif
|
||||
str $s0,[$rounds,#0]
|
||||
str $s1,[$rounds,#4]
|
||||
str $s2,[$rounds,#8]
|
||||
str $s3,[$rounds,#12]
|
||||
#else
|
||||
mov $t1,$s0,lsr#24 @ write output in endian-neutral
|
||||
mov $t2,$s0,lsr#16 @ manner...
|
||||
mov $t3,$s0,lsr#8
|
||||
@@ -227,11 +256,15 @@ AES_encrypt:
|
||||
strb $t2,[$rounds,#13]
|
||||
strb $t3,[$rounds,#14]
|
||||
strb $s3,[$rounds,#15]
|
||||
|
||||
#endif
|
||||
#if __ARM_ARCH__>=5
|
||||
ldmia sp!,{r4-r12,pc}
|
||||
#else
|
||||
ldmia sp!,{r4-r12,lr}
|
||||
tst lr,#1
|
||||
moveq pc,lr @ be binary compatible with V4, yet
|
||||
bx lr @ interoperable with Thumb ISA:-)
|
||||
#endif
|
||||
.size AES_encrypt,.-AES_encrypt
|
||||
|
||||
.type _armv4_AES_encrypt,%function
|
||||
@@ -271,11 +304,11 @@ _armv4_AES_encrypt:
|
||||
and $i2,lr,$s2,lsr#16 @ i1
|
||||
eor $t3,$t3,$i3,ror#8
|
||||
and $i3,lr,$s2
|
||||
eor $s1,$s1,$t1,ror#24
|
||||
ldr $i1,[$tbl,$i1,lsl#2] @ Te2[s2>>8]
|
||||
eor $s1,$s1,$t1,ror#24
|
||||
ldr $i2,[$tbl,$i2,lsl#2] @ Te1[s2>>16]
|
||||
mov $s2,$s2,lsr#24
|
||||
|
||||
ldr $i2,[$tbl,$i2,lsl#2] @ Te1[s2>>16]
|
||||
ldr $i3,[$tbl,$i3,lsl#2] @ Te3[s2>>0]
|
||||
eor $s0,$s0,$i1,ror#16
|
||||
ldr $s2,[$tbl,$s2,lsl#2] @ Te0[s2>>24]
|
||||
@@ -284,16 +317,16 @@ _armv4_AES_encrypt:
|
||||
and $i2,lr,$s3,lsr#8 @ i1
|
||||
eor $t3,$t3,$i3,ror#16
|
||||
and $i3,lr,$s3,lsr#16 @ i2
|
||||
eor $s2,$s2,$t2,ror#16
|
||||
ldr $i1,[$tbl,$i1,lsl#2] @ Te3[s3>>0]
|
||||
eor $s2,$s2,$t2,ror#16
|
||||
ldr $i2,[$tbl,$i2,lsl#2] @ Te2[s3>>8]
|
||||
mov $s3,$s3,lsr#24
|
||||
|
||||
ldr $i2,[$tbl,$i2,lsl#2] @ Te2[s3>>8]
|
||||
ldr $i3,[$tbl,$i3,lsl#2] @ Te1[s3>>16]
|
||||
eor $s0,$s0,$i1,ror#24
|
||||
ldr $s3,[$tbl,$s3,lsl#2] @ Te0[s3>>24]
|
||||
eor $s1,$s1,$i2,ror#16
|
||||
ldr $i1,[$key],#16
|
||||
eor $s1,$s1,$i2,ror#16
|
||||
ldr $s3,[$tbl,$s3,lsl#2] @ Te0[s3>>24]
|
||||
eor $s2,$s2,$i3,ror#8
|
||||
ldr $t1,[$key,#-12]
|
||||
eor $s3,$s3,$t3,ror#8
|
||||
@@ -333,11 +366,11 @@ _armv4_AES_encrypt:
|
||||
and $i2,lr,$s2,lsr#16 @ i1
|
||||
eor $t3,$i3,$t3,lsl#8
|
||||
and $i3,lr,$s2
|
||||
eor $s1,$t1,$s1,lsl#24
|
||||
ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s2>>8]
|
||||
eor $s1,$t1,$s1,lsl#24
|
||||
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s2>>16]
|
||||
mov $s2,$s2,lsr#24
|
||||
|
||||
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s2>>16]
|
||||
ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s2>>0]
|
||||
eor $s0,$i1,$s0,lsl#8
|
||||
ldrb $s2,[$tbl,$s2,lsl#2] @ Te4[s2>>24]
|
||||
@@ -346,15 +379,15 @@ _armv4_AES_encrypt:
|
||||
and $i2,lr,$s3,lsr#8 @ i1
|
||||
eor $t3,$i3,$t3,lsl#8
|
||||
and $i3,lr,$s3,lsr#16 @ i2
|
||||
eor $s2,$t2,$s2,lsl#24
|
||||
ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s3>>0]
|
||||
eor $s2,$t2,$s2,lsl#24
|
||||
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s3>>8]
|
||||
mov $s3,$s3,lsr#24
|
||||
|
||||
ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s3>>8]
|
||||
ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s3>>16]
|
||||
eor $s0,$i1,$s0,lsl#8
|
||||
ldrb $s3,[$tbl,$s3,lsl#2] @ Te4[s3>>24]
|
||||
ldr $i1,[$key,#0]
|
||||
ldrb $s3,[$tbl,$s3,lsl#2] @ Te4[s3>>24]
|
||||
eor $s1,$s1,$i2,lsl#8
|
||||
ldr $t1,[$key,#4]
|
||||
eor $s2,$s2,$i3,lsl#16
|
||||
@@ -371,10 +404,11 @@ _armv4_AES_encrypt:
|
||||
ldr pc,[sp],#4 @ pop and return
|
||||
.size _armv4_AES_encrypt,.-_armv4_AES_encrypt
|
||||
|
||||
.global AES_set_encrypt_key
|
||||
.type AES_set_encrypt_key,%function
|
||||
.global private_AES_set_encrypt_key
|
||||
.type private_AES_set_encrypt_key,%function
|
||||
.align 5
|
||||
AES_set_encrypt_key:
|
||||
private_AES_set_encrypt_key:
|
||||
_armv4_AES_set_encrypt_key:
|
||||
sub r3,pc,#8 @ AES_set_encrypt_key
|
||||
teq r0,#0
|
||||
moveq r0,#-1
|
||||
@@ -392,12 +426,13 @@ AES_set_encrypt_key:
|
||||
bne .Labrt
|
||||
|
||||
.Lok: stmdb sp!,{r4-r12,lr}
|
||||
sub $tbl,r3,#AES_set_encrypt_key-AES_Te-1024 @ Te4
|
||||
sub $tbl,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024 @ Te4
|
||||
|
||||
mov $rounds,r0 @ inp
|
||||
mov lr,r1 @ bits
|
||||
mov $key,r2 @ key
|
||||
|
||||
#if __ARM_ARCH__<7
|
||||
ldrb $s0,[$rounds,#3] @ load input data in endian-neutral
|
||||
ldrb $t1,[$rounds,#2] @ manner...
|
||||
ldrb $t2,[$rounds,#1]
|
||||
@@ -430,6 +465,22 @@ AES_set_encrypt_key:
|
||||
orr $s3,$s3,$t3,lsl#24
|
||||
str $s2,[$key,#-8]
|
||||
str $s3,[$key,#-4]
|
||||
#else
|
||||
ldr $s0,[$rounds,#0]
|
||||
ldr $s1,[$rounds,#4]
|
||||
ldr $s2,[$rounds,#8]
|
||||
ldr $s3,[$rounds,#12]
|
||||
#ifdef __ARMEL__
|
||||
rev $s0,$s0
|
||||
rev $s1,$s1
|
||||
rev $s2,$s2
|
||||
rev $s3,$s3
|
||||
#endif
|
||||
str $s0,[$key],#16
|
||||
str $s1,[$key,#-12]
|
||||
str $s2,[$key,#-8]
|
||||
str $s3,[$key,#-4]
|
||||
#endif
|
||||
|
||||
teq lr,#128
|
||||
bne .Lnot128
|
||||
@@ -466,6 +517,7 @@ AES_set_encrypt_key:
|
||||
b .Ldone
|
||||
|
||||
.Lnot128:
|
||||
#if __ARM_ARCH__<7
|
||||
ldrb $i2,[$rounds,#19]
|
||||
ldrb $t1,[$rounds,#18]
|
||||
ldrb $t2,[$rounds,#17]
|
||||
@@ -482,6 +534,16 @@ AES_set_encrypt_key:
|
||||
str $i2,[$key],#8
|
||||
orr $i3,$i3,$t3,lsl#24
|
||||
str $i3,[$key,#-4]
|
||||
#else
|
||||
ldr $i2,[$rounds,#16]
|
||||
ldr $i3,[$rounds,#20]
|
||||
#ifdef __ARMEL__
|
||||
rev $i2,$i2
|
||||
rev $i3,$i3
|
||||
#endif
|
||||
str $i2,[$key],#8
|
||||
str $i3,[$key,#-4]
|
||||
#endif
|
||||
|
||||
teq lr,#192
|
||||
bne .Lnot192
|
||||
@@ -526,6 +588,7 @@ AES_set_encrypt_key:
|
||||
b .L192_loop
|
||||
|
||||
.Lnot192:
|
||||
#if __ARM_ARCH__<7
|
||||
ldrb $i2,[$rounds,#27]
|
||||
ldrb $t1,[$rounds,#26]
|
||||
ldrb $t2,[$rounds,#25]
|
||||
@@ -542,6 +605,16 @@ AES_set_encrypt_key:
|
||||
str $i2,[$key],#8
|
||||
orr $i3,$i3,$t3,lsl#24
|
||||
str $i3,[$key,#-4]
|
||||
#else
|
||||
ldr $i2,[$rounds,#24]
|
||||
ldr $i3,[$rounds,#28]
|
||||
#ifdef __ARMEL__
|
||||
rev $i2,$i2
|
||||
rev $i3,$i3
|
||||
#endif
|
||||
str $i2,[$key],#8
|
||||
str $i3,[$key,#-4]
|
||||
#endif
|
||||
|
||||
mov $rounds,#14
|
||||
str $rounds,[$key,#240-32]
|
||||
@@ -606,14 +679,14 @@ AES_set_encrypt_key:
|
||||
.Labrt: tst lr,#1
|
||||
moveq pc,lr @ be binary compatible with V4, yet
|
||||
bx lr @ interoperable with Thumb ISA:-)
|
||||
.size AES_set_encrypt_key,.-AES_set_encrypt_key
|
||||
.size private_AES_set_encrypt_key,.-private_AES_set_encrypt_key
|
||||
|
||||
.global AES_set_decrypt_key
|
||||
.type AES_set_decrypt_key,%function
|
||||
.global private_AES_set_decrypt_key
|
||||
.type private_AES_set_decrypt_key,%function
|
||||
.align 5
|
||||
AES_set_decrypt_key:
|
||||
private_AES_set_decrypt_key:
|
||||
str lr,[sp,#-4]! @ push lr
|
||||
bl AES_set_encrypt_key
|
||||
bl _armv4_AES_set_encrypt_key
|
||||
teq r0,#0
|
||||
ldrne lr,[sp],#4 @ pop lr
|
||||
bne .Labrt
|
||||
@@ -692,11 +765,15 @@ $code.=<<___;
|
||||
bne .Lmix
|
||||
|
||||
mov r0,#0
|
||||
#if __ARM_ARCH__>=5
|
||||
ldmia sp!,{r4-r12,pc}
|
||||
#else
|
||||
ldmia sp!,{r4-r12,lr}
|
||||
tst lr,#1
|
||||
moveq pc,lr @ be binary compatible with V4, yet
|
||||
bx lr @ interoperable with Thumb ISA:-)
|
||||
.size AES_set_decrypt_key,.-AES_set_decrypt_key
|
||||
#endif
|
||||
.size private_AES_set_decrypt_key,.-private_AES_set_decrypt_key
|
||||
|
||||
.type AES_Td,%object
|
||||
.align 5
|
||||
@@ -811,7 +888,7 @@ AES_decrypt:
|
||||
mov $rounds,r0 @ inp
|
||||
mov $key,r2
|
||||
sub $tbl,r3,#AES_decrypt-AES_Td @ Td
|
||||
|
||||
#if __ARM_ARCH__<7
|
||||
ldrb $s0,[$rounds,#3] @ load input data in endian-neutral
|
||||
ldrb $t1,[$rounds,#2] @ manner...
|
||||
ldrb $t2,[$rounds,#1]
|
||||
@@ -840,10 +917,33 @@ AES_decrypt:
|
||||
orr $s3,$s3,$t1,lsl#8
|
||||
orr $s3,$s3,$t2,lsl#16
|
||||
orr $s3,$s3,$t3,lsl#24
|
||||
|
||||
#else
|
||||
ldr $s0,[$rounds,#0]
|
||||
ldr $s1,[$rounds,#4]
|
||||
ldr $s2,[$rounds,#8]
|
||||
ldr $s3,[$rounds,#12]
|
||||
#ifdef __ARMEL__
|
||||
rev $s0,$s0
|
||||
rev $s1,$s1
|
||||
rev $s2,$s2
|
||||
rev $s3,$s3
|
||||
#endif
|
||||
#endif
|
||||
bl _armv4_AES_decrypt
|
||||
|
||||
ldr $rounds,[sp],#4 @ pop out
|
||||
#if __ARM_ARCH__>=7
|
||||
#ifdef __ARMEL__
|
||||
rev $s0,$s0
|
||||
rev $s1,$s1
|
||||
rev $s2,$s2
|
||||
rev $s3,$s3
|
||||
#endif
|
||||
str $s0,[$rounds,#0]
|
||||
str $s1,[$rounds,#4]
|
||||
str $s2,[$rounds,#8]
|
||||
str $s3,[$rounds,#12]
|
||||
#else
|
||||
mov $t1,$s0,lsr#24 @ write output in endian-neutral
|
||||
mov $t2,$s0,lsr#16 @ manner...
|
||||
mov $t3,$s0,lsr#8
|
||||
@@ -872,11 +972,15 @@ AES_decrypt:
|
||||
strb $t2,[$rounds,#13]
|
||||
strb $t3,[$rounds,#14]
|
||||
strb $s3,[$rounds,#15]
|
||||
|
||||
#endif
|
||||
#if __ARM_ARCH__>=5
|
||||
ldmia sp!,{r4-r12,pc}
|
||||
#else
|
||||
ldmia sp!,{r4-r12,lr}
|
||||
tst lr,#1
|
||||
moveq pc,lr @ be binary compatible with V4, yet
|
||||
bx lr @ interoperable with Thumb ISA:-)
|
||||
#endif
|
||||
.size AES_decrypt,.-AES_decrypt
|
||||
|
||||
.type _armv4_AES_decrypt,%function
|
||||
@@ -916,11 +1020,11 @@ _armv4_AES_decrypt:
|
||||
and $i2,lr,$s2 @ i1
|
||||
eor $t3,$i3,$t3,ror#8
|
||||
and $i3,lr,$s2,lsr#16
|
||||
eor $s1,$s1,$t1,ror#8
|
||||
ldr $i1,[$tbl,$i1,lsl#2] @ Td2[s2>>8]
|
||||
eor $s1,$s1,$t1,ror#8
|
||||
ldr $i2,[$tbl,$i2,lsl#2] @ Td3[s2>>0]
|
||||
mov $s2,$s2,lsr#24
|
||||
|
||||
ldr $i2,[$tbl,$i2,lsl#2] @ Td3[s2>>0]
|
||||
ldr $i3,[$tbl,$i3,lsl#2] @ Td1[s2>>16]
|
||||
eor $s0,$s0,$i1,ror#16
|
||||
ldr $s2,[$tbl,$s2,lsl#2] @ Td0[s2>>24]
|
||||
@@ -929,22 +1033,22 @@ _armv4_AES_decrypt:
|
||||
and $i2,lr,$s3,lsr#8 @ i1
|
||||
eor $t3,$i3,$t3,ror#8
|
||||
and $i3,lr,$s3 @ i2
|
||||
eor $s2,$s2,$t2,ror#8
|
||||
ldr $i1,[$tbl,$i1,lsl#2] @ Td1[s3>>16]
|
||||
eor $s2,$s2,$t2,ror#8
|
||||
ldr $i2,[$tbl,$i2,lsl#2] @ Td2[s3>>8]
|
||||
mov $s3,$s3,lsr#24
|
||||
|
||||
ldr $i2,[$tbl,$i2,lsl#2] @ Td2[s3>>8]
|
||||
ldr $i3,[$tbl,$i3,lsl#2] @ Td3[s3>>0]
|
||||
eor $s0,$s0,$i1,ror#8
|
||||
ldr $s3,[$tbl,$s3,lsl#2] @ Td0[s3>>24]
|
||||
eor $s1,$s1,$i2,ror#16
|
||||
eor $s2,$s2,$i3,ror#24
|
||||
ldr $i1,[$key],#16
|
||||
eor $s3,$s3,$t3,ror#8
|
||||
eor $s1,$s1,$i2,ror#16
|
||||
ldr $s3,[$tbl,$s3,lsl#2] @ Td0[s3>>24]
|
||||
eor $s2,$s2,$i3,ror#24
|
||||
|
||||
ldr $t1,[$key,#-12]
|
||||
ldr $t2,[$key,#-8]
|
||||
eor $s0,$s0,$i1
|
||||
ldr $t2,[$key,#-8]
|
||||
eor $s3,$s3,$t3,ror#8
|
||||
ldr $t3,[$key,#-4]
|
||||
and $i1,lr,$s0,lsr#16
|
||||
eor $s1,$s1,$t1
|
||||
@@ -985,11 +1089,11 @@ _armv4_AES_decrypt:
|
||||
and $i1,lr,$s2,lsr#8 @ i0
|
||||
eor $t2,$t2,$i2,lsl#8
|
||||
and $i2,lr,$s2 @ i1
|
||||
eor $t3,$t3,$i3,lsl#8
|
||||
ldrb $i1,[$tbl,$i1] @ Td4[s2>>8]
|
||||
eor $t3,$t3,$i3,lsl#8
|
||||
ldrb $i2,[$tbl,$i2] @ Td4[s2>>0]
|
||||
and $i3,lr,$s2,lsr#16
|
||||
|
||||
ldrb $i2,[$tbl,$i2] @ Td4[s2>>0]
|
||||
ldrb $s2,[$tbl,$s2,lsr#24] @ Td4[s2>>24]
|
||||
eor $s0,$s0,$i1,lsl#8
|
||||
ldrb $i3,[$tbl,$i3] @ Td4[s2>>16]
|
||||
@@ -997,11 +1101,11 @@ _armv4_AES_decrypt:
|
||||
and $i1,lr,$s3,lsr#16 @ i0
|
||||
eor $s2,$t2,$s2,lsl#16
|
||||
and $i2,lr,$s3,lsr#8 @ i1
|
||||
eor $t3,$t3,$i3,lsl#16
|
||||
ldrb $i1,[$tbl,$i1] @ Td4[s3>>16]
|
||||
eor $t3,$t3,$i3,lsl#16
|
||||
ldrb $i2,[$tbl,$i2] @ Td4[s3>>8]
|
||||
and $i3,lr,$s3 @ i2
|
||||
|
||||
ldrb $i2,[$tbl,$i2] @ Td4[s3>>8]
|
||||
ldrb $i3,[$tbl,$i3] @ Td4[s3>>0]
|
||||
ldrb $s3,[$tbl,$s3,lsr#24] @ Td4[s3>>24]
|
||||
eor $s0,$s0,$i1,lsl#16
|
||||
|
||||
1611
crypto/aes/asm/aes-mips.pl
Normal file
1611
crypto/aes/asm/aes-mips.pl
Normal file
File diff suppressed because it is too large
Load Diff
1022
crypto/aes/asm/aes-parisc.pl
Normal file
1022
crypto/aes/asm/aes-parisc.pl
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
# details see http://www.openssl.org/~appro/cryptogams/.
|
||||
# ====================================================================
|
||||
|
||||
# Needs more work: key setup, page boundaries, CBC routine...
|
||||
# Needs more work: key setup, CBC routine...
|
||||
#
|
||||
# ppc_AES_[en|de]crypt perform at 18 cycles per byte processed with
|
||||
# 128-bit key, which is ~40% better than 64-bit code generated by gcc
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
# February 2010
|
||||
#
|
||||
# Rescheduling instructions to favour Power6 pipeline gives 10%
|
||||
# Rescheduling instructions to favour Power6 pipeline gave 10%
|
||||
# performance improvement on the platfrom in question (and marginal
|
||||
# improvement even on others). It should be noted that Power6 fails
|
||||
# to process byte in 18 cycles, only in 23, because it fails to issue
|
||||
@@ -33,11 +33,13 @@ $flavour = shift;
|
||||
|
||||
if ($flavour =~ /64/) {
|
||||
$SIZE_T =8;
|
||||
$LRSAVE =2*$SIZE_T;
|
||||
$STU ="stdu";
|
||||
$POP ="ld";
|
||||
$PUSH ="std";
|
||||
} elsif ($flavour =~ /32/) {
|
||||
$SIZE_T =4;
|
||||
$LRSAVE =$SIZE_T;
|
||||
$STU ="stwu";
|
||||
$POP ="lwz";
|
||||
$PUSH ="stw";
|
||||
@@ -116,15 +118,19 @@ LAES_Te:
|
||||
addi $Tbl0,$Tbl0,`128-8`
|
||||
mtlr r0
|
||||
blr
|
||||
.space `32-24`
|
||||
.long 0
|
||||
.byte 0,12,0x14,0,0,0,0,0
|
||||
.space `64-9*4`
|
||||
LAES_Td:
|
||||
mflr r0
|
||||
bcl 20,31,\$+4
|
||||
mflr $Tbl0 ; vvvvvvvv "distance" between . and 1st data entry
|
||||
addi $Tbl0,$Tbl0,`128-8-32+2048+256`
|
||||
addi $Tbl0,$Tbl0,`128-64-8+2048+256`
|
||||
mtlr r0
|
||||
blr
|
||||
.space `128-32-24`
|
||||
.long 0
|
||||
.byte 0,12,0x14,0,0,0,0,0
|
||||
.space `128-64-9*4`
|
||||
___
|
||||
&_data_word(
|
||||
0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d,
|
||||
@@ -328,10 +334,9 @@ $code.=<<___;
|
||||
.globl .AES_encrypt
|
||||
.align 7
|
||||
.AES_encrypt:
|
||||
mflr r0
|
||||
$STU $sp,-$FRAME($sp)
|
||||
mflr r0
|
||||
|
||||
$PUSH r0,`$FRAME-$SIZE_T*21`($sp)
|
||||
$PUSH $toc,`$FRAME-$SIZE_T*20`($sp)
|
||||
$PUSH r13,`$FRAME-$SIZE_T*19`($sp)
|
||||
$PUSH r14,`$FRAME-$SIZE_T*18`($sp)
|
||||
@@ -352,7 +357,14 @@ $code.=<<___;
|
||||
$PUSH r29,`$FRAME-$SIZE_T*3`($sp)
|
||||
$PUSH r30,`$FRAME-$SIZE_T*2`($sp)
|
||||
$PUSH r31,`$FRAME-$SIZE_T*1`($sp)
|
||||
$PUSH r0,`$FRAME+$LRSAVE`($sp)
|
||||
|
||||
andi. $t0,$inp,3
|
||||
andi. $t1,$out,3
|
||||
or. $t0,$t0,$t1
|
||||
bne Lenc_unaligned
|
||||
|
||||
Lenc_unaligned_ok:
|
||||
lwz $s0,0($inp)
|
||||
lwz $s1,4($inp)
|
||||
lwz $s2,8($inp)
|
||||
@@ -363,8 +375,80 @@ $code.=<<___;
|
||||
stw $s1,4($out)
|
||||
stw $s2,8($out)
|
||||
stw $s3,12($out)
|
||||
b Lenc_done
|
||||
|
||||
$POP r0,`$FRAME-$SIZE_T*21`($sp)
|
||||
Lenc_unaligned:
|
||||
subfic $t0,$inp,4096
|
||||
subfic $t1,$out,4096
|
||||
andi. $t0,$t0,4096-16
|
||||
beq Lenc_xpage
|
||||
andi. $t1,$t1,4096-16
|
||||
bne Lenc_unaligned_ok
|
||||
|
||||
Lenc_xpage:
|
||||
lbz $acc00,0($inp)
|
||||
lbz $acc01,1($inp)
|
||||
lbz $acc02,2($inp)
|
||||
lbz $s0,3($inp)
|
||||
lbz $acc04,4($inp)
|
||||
lbz $acc05,5($inp)
|
||||
lbz $acc06,6($inp)
|
||||
lbz $s1,7($inp)
|
||||
lbz $acc08,8($inp)
|
||||
lbz $acc09,9($inp)
|
||||
lbz $acc10,10($inp)
|
||||
insrwi $s0,$acc00,8,0
|
||||
lbz $s2,11($inp)
|
||||
insrwi $s1,$acc04,8,0
|
||||
lbz $acc12,12($inp)
|
||||
insrwi $s0,$acc01,8,8
|
||||
lbz $acc13,13($inp)
|
||||
insrwi $s1,$acc05,8,8
|
||||
lbz $acc14,14($inp)
|
||||
insrwi $s0,$acc02,8,16
|
||||
lbz $s3,15($inp)
|
||||
insrwi $s1,$acc06,8,16
|
||||
insrwi $s2,$acc08,8,0
|
||||
insrwi $s3,$acc12,8,0
|
||||
insrwi $s2,$acc09,8,8
|
||||
insrwi $s3,$acc13,8,8
|
||||
insrwi $s2,$acc10,8,16
|
||||
insrwi $s3,$acc14,8,16
|
||||
|
||||
bl LAES_Te
|
||||
bl Lppc_AES_encrypt_compact
|
||||
|
||||
extrwi $acc00,$s0,8,0
|
||||
extrwi $acc01,$s0,8,8
|
||||
stb $acc00,0($out)
|
||||
extrwi $acc02,$s0,8,16
|
||||
stb $acc01,1($out)
|
||||
stb $acc02,2($out)
|
||||
extrwi $acc04,$s1,8,0
|
||||
stb $s0,3($out)
|
||||
extrwi $acc05,$s1,8,8
|
||||
stb $acc04,4($out)
|
||||
extrwi $acc06,$s1,8,16
|
||||
stb $acc05,5($out)
|
||||
stb $acc06,6($out)
|
||||
extrwi $acc08,$s2,8,0
|
||||
stb $s1,7($out)
|
||||
extrwi $acc09,$s2,8,8
|
||||
stb $acc08,8($out)
|
||||
extrwi $acc10,$s2,8,16
|
||||
stb $acc09,9($out)
|
||||
stb $acc10,10($out)
|
||||
extrwi $acc12,$s3,8,0
|
||||
stb $s2,11($out)
|
||||
extrwi $acc13,$s3,8,8
|
||||
stb $acc12,12($out)
|
||||
extrwi $acc14,$s3,8,16
|
||||
stb $acc13,13($out)
|
||||
stb $acc14,14($out)
|
||||
stb $s3,15($out)
|
||||
|
||||
Lenc_done:
|
||||
$POP r0,`$FRAME+$LRSAVE`($sp)
|
||||
$POP $toc,`$FRAME-$SIZE_T*20`($sp)
|
||||
$POP r13,`$FRAME-$SIZE_T*19`($sp)
|
||||
$POP r14,`$FRAME-$SIZE_T*18`($sp)
|
||||
@@ -388,18 +472,21 @@ $code.=<<___;
|
||||
mtlr r0
|
||||
addi $sp,$sp,$FRAME
|
||||
blr
|
||||
.long 0
|
||||
.byte 0,12,4,1,0x80,18,3,0
|
||||
.long 0
|
||||
|
||||
.align 5
|
||||
Lppc_AES_encrypt:
|
||||
lwz $acc00,240($key)
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
addi $Tbl1,$Tbl0,3
|
||||
lwz $t0,0($key)
|
||||
addi $Tbl2,$Tbl0,2
|
||||
lwz $t1,4($key)
|
||||
addi $Tbl3,$Tbl0,1
|
||||
lwz $t2,8($key)
|
||||
addi $acc00,$acc00,-1
|
||||
lwz $t3,12($key)
|
||||
addi $key,$key,16
|
||||
xor $s0,$s0,$t0
|
||||
xor $s1,$s1,$t1
|
||||
@@ -413,44 +500,44 @@ Lenc_loop:
|
||||
rlwinm $acc02,$s2,`32-24+3`,21,28
|
||||
rlwinm $acc03,$s3,`32-24+3`,21,28
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
rlwinm $acc04,$s1,`32-16+3`,21,28
|
||||
lwz $t1,4($key)
|
||||
rlwinm $acc05,$s2,`32-16+3`,21,28
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
rlwinm $acc06,$s3,`32-16+3`,21,28
|
||||
lwz $t3,12($key)
|
||||
rlwinm $acc07,$s0,`32-16+3`,21,28
|
||||
lwzx $acc00,$Tbl0,$acc00
|
||||
lwzx $acc01,$Tbl0,$acc01
|
||||
rlwinm $acc08,$s2,`32-8+3`,21,28
|
||||
lwzx $acc01,$Tbl0,$acc01
|
||||
rlwinm $acc09,$s3,`32-8+3`,21,28
|
||||
lwzx $acc02,$Tbl0,$acc02
|
||||
lwzx $acc03,$Tbl0,$acc03
|
||||
rlwinm $acc10,$s0,`32-8+3`,21,28
|
||||
lwzx $acc03,$Tbl0,$acc03
|
||||
rlwinm $acc11,$s1,`32-8+3`,21,28
|
||||
lwzx $acc04,$Tbl1,$acc04
|
||||
lwzx $acc05,$Tbl1,$acc05
|
||||
rlwinm $acc12,$s3,`0+3`,21,28
|
||||
lwzx $acc05,$Tbl1,$acc05
|
||||
rlwinm $acc13,$s0,`0+3`,21,28
|
||||
lwzx $acc06,$Tbl1,$acc06
|
||||
lwzx $acc07,$Tbl1,$acc07
|
||||
rlwinm $acc14,$s1,`0+3`,21,28
|
||||
lwzx $acc07,$Tbl1,$acc07
|
||||
rlwinm $acc15,$s2,`0+3`,21,28
|
||||
lwzx $acc08,$Tbl2,$acc08
|
||||
lwzx $acc09,$Tbl2,$acc09
|
||||
xor $t0,$t0,$acc00
|
||||
lwzx $acc09,$Tbl2,$acc09
|
||||
xor $t1,$t1,$acc01
|
||||
lwzx $acc10,$Tbl2,$acc10
|
||||
lwzx $acc11,$Tbl2,$acc11
|
||||
xor $t2,$t2,$acc02
|
||||
lwzx $acc11,$Tbl2,$acc11
|
||||
xor $t3,$t3,$acc03
|
||||
lwzx $acc12,$Tbl3,$acc12
|
||||
lwzx $acc13,$Tbl3,$acc13
|
||||
xor $t0,$t0,$acc04
|
||||
lwzx $acc13,$Tbl3,$acc13
|
||||
xor $t1,$t1,$acc05
|
||||
lwzx $acc14,$Tbl3,$acc14
|
||||
lwzx $acc15,$Tbl3,$acc15
|
||||
xor $t2,$t2,$acc06
|
||||
lwzx $acc15,$Tbl3,$acc15
|
||||
xor $t3,$t3,$acc07
|
||||
xor $t0,$t0,$acc08
|
||||
xor $t1,$t1,$acc09
|
||||
@@ -466,60 +553,60 @@ Lenc_loop:
|
||||
addi $Tbl2,$Tbl0,2048
|
||||
nop
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
rlwinm $acc00,$s0,`32-24`,24,31
|
||||
lwz $t1,4($key)
|
||||
rlwinm $acc01,$s1,`32-24`,24,31
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
rlwinm $acc02,$s2,`32-24`,24,31
|
||||
lwz $t3,12($key)
|
||||
rlwinm $acc03,$s3,`32-24`,24,31
|
||||
lwz $acc08,`2048+0`($Tbl0) ! prefetch Te4
|
||||
lwz $acc09,`2048+32`($Tbl0)
|
||||
rlwinm $acc04,$s1,`32-16`,24,31
|
||||
lwz $acc09,`2048+32`($Tbl0)
|
||||
rlwinm $acc05,$s2,`32-16`,24,31
|
||||
lwz $acc10,`2048+64`($Tbl0)
|
||||
lwz $acc11,`2048+96`($Tbl0)
|
||||
rlwinm $acc06,$s3,`32-16`,24,31
|
||||
lwz $acc11,`2048+96`($Tbl0)
|
||||
rlwinm $acc07,$s0,`32-16`,24,31
|
||||
lwz $acc12,`2048+128`($Tbl0)
|
||||
lwz $acc13,`2048+160`($Tbl0)
|
||||
rlwinm $acc08,$s2,`32-8`,24,31
|
||||
lwz $acc13,`2048+160`($Tbl0)
|
||||
rlwinm $acc09,$s3,`32-8`,24,31
|
||||
lwz $acc14,`2048+192`($Tbl0)
|
||||
lwz $acc15,`2048+224`($Tbl0)
|
||||
rlwinm $acc10,$s0,`32-8`,24,31
|
||||
lwz $acc15,`2048+224`($Tbl0)
|
||||
rlwinm $acc11,$s1,`32-8`,24,31
|
||||
lbzx $acc00,$Tbl2,$acc00
|
||||
lbzx $acc01,$Tbl2,$acc01
|
||||
rlwinm $acc12,$s3,`0`,24,31
|
||||
lbzx $acc01,$Tbl2,$acc01
|
||||
rlwinm $acc13,$s0,`0`,24,31
|
||||
lbzx $acc02,$Tbl2,$acc02
|
||||
lbzx $acc03,$Tbl2,$acc03
|
||||
rlwinm $acc14,$s1,`0`,24,31
|
||||
lbzx $acc03,$Tbl2,$acc03
|
||||
rlwinm $acc15,$s2,`0`,24,31
|
||||
lbzx $acc04,$Tbl2,$acc04
|
||||
lbzx $acc05,$Tbl2,$acc05
|
||||
rlwinm $s0,$acc00,24,0,7
|
||||
lbzx $acc05,$Tbl2,$acc05
|
||||
rlwinm $s1,$acc01,24,0,7
|
||||
lbzx $acc06,$Tbl2,$acc06
|
||||
lbzx $acc07,$Tbl2,$acc07
|
||||
rlwinm $s2,$acc02,24,0,7
|
||||
lbzx $acc07,$Tbl2,$acc07
|
||||
rlwinm $s3,$acc03,24,0,7
|
||||
lbzx $acc08,$Tbl2,$acc08
|
||||
lbzx $acc09,$Tbl2,$acc09
|
||||
rlwimi $s0,$acc04,16,8,15
|
||||
lbzx $acc09,$Tbl2,$acc09
|
||||
rlwimi $s1,$acc05,16,8,15
|
||||
lbzx $acc10,$Tbl2,$acc10
|
||||
lbzx $acc11,$Tbl2,$acc11
|
||||
rlwimi $s2,$acc06,16,8,15
|
||||
lbzx $acc11,$Tbl2,$acc11
|
||||
rlwimi $s3,$acc07,16,8,15
|
||||
lbzx $acc12,$Tbl2,$acc12
|
||||
lbzx $acc13,$Tbl2,$acc13
|
||||
rlwimi $s0,$acc08,8,16,23
|
||||
lbzx $acc13,$Tbl2,$acc13
|
||||
rlwimi $s1,$acc09,8,16,23
|
||||
lbzx $acc14,$Tbl2,$acc14
|
||||
lbzx $acc15,$Tbl2,$acc15
|
||||
rlwimi $s2,$acc10,8,16,23
|
||||
lbzx $acc15,$Tbl2,$acc15
|
||||
rlwimi $s3,$acc11,8,16,23
|
||||
or $s0,$s0,$acc12
|
||||
or $s1,$s1,$acc13
|
||||
@@ -530,29 +617,31 @@ Lenc_loop:
|
||||
xor $s2,$s2,$t2
|
||||
xor $s3,$s3,$t3
|
||||
blr
|
||||
.long 0
|
||||
.byte 0,12,0x14,0,0,0,0,0
|
||||
|
||||
.align 4
|
||||
Lppc_AES_encrypt_compact:
|
||||
lwz $acc00,240($key)
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
addi $Tbl1,$Tbl0,2048
|
||||
lwz $t0,0($key)
|
||||
lis $mask80,0x8080
|
||||
lwz $t1,4($key)
|
||||
lis $mask1b,0x1b1b
|
||||
addi $key,$key,16
|
||||
lwz $t2,8($key)
|
||||
ori $mask80,$mask80,0x8080
|
||||
lwz $t3,12($key)
|
||||
ori $mask1b,$mask1b,0x1b1b
|
||||
addi $key,$key,16
|
||||
mtctr $acc00
|
||||
.align 4
|
||||
Lenc_compact_loop:
|
||||
xor $s0,$s0,$t0
|
||||
xor $s1,$s1,$t1
|
||||
xor $s2,$s2,$t2
|
||||
xor $s3,$s3,$t3
|
||||
rlwinm $acc00,$s0,`32-24`,24,31
|
||||
xor $s2,$s2,$t2
|
||||
rlwinm $acc01,$s1,`32-24`,24,31
|
||||
xor $s3,$s3,$t3
|
||||
rlwinm $acc02,$s2,`32-24`,24,31
|
||||
rlwinm $acc03,$s3,`32-24`,24,31
|
||||
rlwinm $acc04,$s1,`32-16`,24,31
|
||||
@@ -560,48 +649,48 @@ Lenc_compact_loop:
|
||||
rlwinm $acc06,$s3,`32-16`,24,31
|
||||
rlwinm $acc07,$s0,`32-16`,24,31
|
||||
lbzx $acc00,$Tbl1,$acc00
|
||||
lbzx $acc01,$Tbl1,$acc01
|
||||
rlwinm $acc08,$s2,`32-8`,24,31
|
||||
lbzx $acc01,$Tbl1,$acc01
|
||||
rlwinm $acc09,$s3,`32-8`,24,31
|
||||
lbzx $acc02,$Tbl1,$acc02
|
||||
lbzx $acc03,$Tbl1,$acc03
|
||||
rlwinm $acc10,$s0,`32-8`,24,31
|
||||
lbzx $acc03,$Tbl1,$acc03
|
||||
rlwinm $acc11,$s1,`32-8`,24,31
|
||||
lbzx $acc04,$Tbl1,$acc04
|
||||
lbzx $acc05,$Tbl1,$acc05
|
||||
rlwinm $acc12,$s3,`0`,24,31
|
||||
lbzx $acc05,$Tbl1,$acc05
|
||||
rlwinm $acc13,$s0,`0`,24,31
|
||||
lbzx $acc06,$Tbl1,$acc06
|
||||
lbzx $acc07,$Tbl1,$acc07
|
||||
rlwinm $acc14,$s1,`0`,24,31
|
||||
lbzx $acc07,$Tbl1,$acc07
|
||||
rlwinm $acc15,$s2,`0`,24,31
|
||||
lbzx $acc08,$Tbl1,$acc08
|
||||
lbzx $acc09,$Tbl1,$acc09
|
||||
rlwinm $s0,$acc00,24,0,7
|
||||
lbzx $acc09,$Tbl1,$acc09
|
||||
rlwinm $s1,$acc01,24,0,7
|
||||
lbzx $acc10,$Tbl1,$acc10
|
||||
lbzx $acc11,$Tbl1,$acc11
|
||||
rlwinm $s2,$acc02,24,0,7
|
||||
lbzx $acc11,$Tbl1,$acc11
|
||||
rlwinm $s3,$acc03,24,0,7
|
||||
lbzx $acc12,$Tbl1,$acc12
|
||||
lbzx $acc13,$Tbl1,$acc13
|
||||
rlwimi $s0,$acc04,16,8,15
|
||||
lbzx $acc13,$Tbl1,$acc13
|
||||
rlwimi $s1,$acc05,16,8,15
|
||||
lbzx $acc14,$Tbl1,$acc14
|
||||
lbzx $acc15,$Tbl1,$acc15
|
||||
rlwimi $s2,$acc06,16,8,15
|
||||
lbzx $acc15,$Tbl1,$acc15
|
||||
rlwimi $s3,$acc07,16,8,15
|
||||
rlwimi $s0,$acc08,8,16,23
|
||||
rlwimi $s1,$acc09,8,16,23
|
||||
rlwimi $s2,$acc10,8,16,23
|
||||
rlwimi $s3,$acc11,8,16,23
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
or $s0,$s0,$acc12
|
||||
lwz $t1,4($key)
|
||||
or $s1,$s1,$acc13
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
or $s2,$s2,$acc14
|
||||
lwz $t3,12($key)
|
||||
or $s3,$s3,$acc15
|
||||
|
||||
addi $key,$key,16
|
||||
@@ -612,12 +701,12 @@ Lenc_compact_loop:
|
||||
and $acc02,$s2,$mask80
|
||||
and $acc03,$s3,$mask80
|
||||
srwi $acc04,$acc00,7 # r1>>7
|
||||
srwi $acc05,$acc01,7
|
||||
srwi $acc06,$acc02,7
|
||||
srwi $acc07,$acc03,7
|
||||
andc $acc08,$s0,$mask80 # r0&0x7f7f7f7f
|
||||
srwi $acc05,$acc01,7
|
||||
andc $acc09,$s1,$mask80
|
||||
srwi $acc06,$acc02,7
|
||||
andc $acc10,$s2,$mask80
|
||||
srwi $acc07,$acc03,7
|
||||
andc $acc11,$s3,$mask80
|
||||
sub $acc00,$acc00,$acc04 # r1-(r1>>7)
|
||||
sub $acc01,$acc01,$acc05
|
||||
@@ -633,32 +722,32 @@ Lenc_compact_loop:
|
||||
and $acc03,$acc03,$mask1b
|
||||
xor $acc00,$acc00,$acc08 # r2
|
||||
xor $acc01,$acc01,$acc09
|
||||
rotlwi $acc12,$s0,16 # ROTATE(r0,16)
|
||||
xor $acc02,$acc02,$acc10
|
||||
rotlwi $acc13,$s1,16
|
||||
xor $acc03,$acc03,$acc11
|
||||
rotlwi $acc14,$s2,16
|
||||
|
||||
rotlwi $acc12,$s0,16 # ROTATE(r0,16)
|
||||
rotlwi $acc13,$s1,16
|
||||
rotlwi $acc14,$s2,16
|
||||
rotlwi $acc15,$s3,16
|
||||
xor $s0,$s0,$acc00 # r0^r2
|
||||
rotlwi $acc15,$s3,16
|
||||
xor $s1,$s1,$acc01
|
||||
xor $s2,$s2,$acc02
|
||||
xor $s3,$s3,$acc03
|
||||
rotrwi $s0,$s0,24 # ROTATE(r2^r0,24)
|
||||
xor $s2,$s2,$acc02
|
||||
rotrwi $s1,$s1,24
|
||||
xor $s3,$s3,$acc03
|
||||
rotrwi $s2,$s2,24
|
||||
rotrwi $s3,$s3,24
|
||||
xor $s0,$s0,$acc00 # ROTATE(r2^r0,24)^r2
|
||||
rotrwi $s3,$s3,24
|
||||
xor $s1,$s1,$acc01
|
||||
xor $s2,$s2,$acc02
|
||||
xor $s3,$s3,$acc03
|
||||
rotlwi $acc08,$acc12,8 # ROTATE(r0,24)
|
||||
rotlwi $acc09,$acc13,8
|
||||
rotlwi $acc10,$acc14,8
|
||||
rotlwi $acc11,$acc15,8
|
||||
xor $s0,$s0,$acc12 #
|
||||
rotlwi $acc09,$acc13,8
|
||||
xor $s1,$s1,$acc13
|
||||
rotlwi $acc10,$acc14,8
|
||||
xor $s2,$s2,$acc14
|
||||
rotlwi $acc11,$acc15,8
|
||||
xor $s3,$s3,$acc15
|
||||
xor $s0,$s0,$acc08 #
|
||||
xor $s1,$s1,$acc09
|
||||
@@ -673,14 +762,15 @@ Lenc_compact_done:
|
||||
xor $s2,$s2,$t2
|
||||
xor $s3,$s3,$t3
|
||||
blr
|
||||
.long 0
|
||||
.byte 0,12,0x14,0,0,0,0,0
|
||||
|
||||
.globl .AES_decrypt
|
||||
.align 7
|
||||
.AES_decrypt:
|
||||
mflr r0
|
||||
$STU $sp,-$FRAME($sp)
|
||||
mflr r0
|
||||
|
||||
$PUSH r0,`$FRAME-$SIZE_T*21`($sp)
|
||||
$PUSH $toc,`$FRAME-$SIZE_T*20`($sp)
|
||||
$PUSH r13,`$FRAME-$SIZE_T*19`($sp)
|
||||
$PUSH r14,`$FRAME-$SIZE_T*18`($sp)
|
||||
@@ -701,7 +791,14 @@ Lenc_compact_done:
|
||||
$PUSH r29,`$FRAME-$SIZE_T*3`($sp)
|
||||
$PUSH r30,`$FRAME-$SIZE_T*2`($sp)
|
||||
$PUSH r31,`$FRAME-$SIZE_T*1`($sp)
|
||||
$PUSH r0,`$FRAME+$LRSAVE`($sp)
|
||||
|
||||
andi. $t0,$inp,3
|
||||
andi. $t1,$out,3
|
||||
or. $t0,$t0,$t1
|
||||
bne Ldec_unaligned
|
||||
|
||||
Ldec_unaligned_ok:
|
||||
lwz $s0,0($inp)
|
||||
lwz $s1,4($inp)
|
||||
lwz $s2,8($inp)
|
||||
@@ -712,8 +809,80 @@ Lenc_compact_done:
|
||||
stw $s1,4($out)
|
||||
stw $s2,8($out)
|
||||
stw $s3,12($out)
|
||||
b Ldec_done
|
||||
|
||||
$POP r0,`$FRAME-$SIZE_T*21`($sp)
|
||||
Ldec_unaligned:
|
||||
subfic $t0,$inp,4096
|
||||
subfic $t1,$out,4096
|
||||
andi. $t0,$t0,4096-16
|
||||
beq Ldec_xpage
|
||||
andi. $t1,$t1,4096-16
|
||||
bne Ldec_unaligned_ok
|
||||
|
||||
Ldec_xpage:
|
||||
lbz $acc00,0($inp)
|
||||
lbz $acc01,1($inp)
|
||||
lbz $acc02,2($inp)
|
||||
lbz $s0,3($inp)
|
||||
lbz $acc04,4($inp)
|
||||
lbz $acc05,5($inp)
|
||||
lbz $acc06,6($inp)
|
||||
lbz $s1,7($inp)
|
||||
lbz $acc08,8($inp)
|
||||
lbz $acc09,9($inp)
|
||||
lbz $acc10,10($inp)
|
||||
insrwi $s0,$acc00,8,0
|
||||
lbz $s2,11($inp)
|
||||
insrwi $s1,$acc04,8,0
|
||||
lbz $acc12,12($inp)
|
||||
insrwi $s0,$acc01,8,8
|
||||
lbz $acc13,13($inp)
|
||||
insrwi $s1,$acc05,8,8
|
||||
lbz $acc14,14($inp)
|
||||
insrwi $s0,$acc02,8,16
|
||||
lbz $s3,15($inp)
|
||||
insrwi $s1,$acc06,8,16
|
||||
insrwi $s2,$acc08,8,0
|
||||
insrwi $s3,$acc12,8,0
|
||||
insrwi $s2,$acc09,8,8
|
||||
insrwi $s3,$acc13,8,8
|
||||
insrwi $s2,$acc10,8,16
|
||||
insrwi $s3,$acc14,8,16
|
||||
|
||||
bl LAES_Td
|
||||
bl Lppc_AES_decrypt_compact
|
||||
|
||||
extrwi $acc00,$s0,8,0
|
||||
extrwi $acc01,$s0,8,8
|
||||
stb $acc00,0($out)
|
||||
extrwi $acc02,$s0,8,16
|
||||
stb $acc01,1($out)
|
||||
stb $acc02,2($out)
|
||||
extrwi $acc04,$s1,8,0
|
||||
stb $s0,3($out)
|
||||
extrwi $acc05,$s1,8,8
|
||||
stb $acc04,4($out)
|
||||
extrwi $acc06,$s1,8,16
|
||||
stb $acc05,5($out)
|
||||
stb $acc06,6($out)
|
||||
extrwi $acc08,$s2,8,0
|
||||
stb $s1,7($out)
|
||||
extrwi $acc09,$s2,8,8
|
||||
stb $acc08,8($out)
|
||||
extrwi $acc10,$s2,8,16
|
||||
stb $acc09,9($out)
|
||||
stb $acc10,10($out)
|
||||
extrwi $acc12,$s3,8,0
|
||||
stb $s2,11($out)
|
||||
extrwi $acc13,$s3,8,8
|
||||
stb $acc12,12($out)
|
||||
extrwi $acc14,$s3,8,16
|
||||
stb $acc13,13($out)
|
||||
stb $acc14,14($out)
|
||||
stb $s3,15($out)
|
||||
|
||||
Ldec_done:
|
||||
$POP r0,`$FRAME+$LRSAVE`($sp)
|
||||
$POP $toc,`$FRAME-$SIZE_T*20`($sp)
|
||||
$POP r13,`$FRAME-$SIZE_T*19`($sp)
|
||||
$POP r14,`$FRAME-$SIZE_T*18`($sp)
|
||||
@@ -737,18 +906,21 @@ Lenc_compact_done:
|
||||
mtlr r0
|
||||
addi $sp,$sp,$FRAME
|
||||
blr
|
||||
.long 0
|
||||
.byte 0,12,4,1,0x80,18,3,0
|
||||
.long 0
|
||||
|
||||
.align 5
|
||||
Lppc_AES_decrypt:
|
||||
lwz $acc00,240($key)
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
addi $Tbl1,$Tbl0,3
|
||||
lwz $t0,0($key)
|
||||
addi $Tbl2,$Tbl0,2
|
||||
lwz $t1,4($key)
|
||||
addi $Tbl3,$Tbl0,1
|
||||
lwz $t2,8($key)
|
||||
addi $acc00,$acc00,-1
|
||||
lwz $t3,12($key)
|
||||
addi $key,$key,16
|
||||
xor $s0,$s0,$t0
|
||||
xor $s1,$s1,$t1
|
||||
@@ -762,44 +934,44 @@ Ldec_loop:
|
||||
rlwinm $acc02,$s2,`32-24+3`,21,28
|
||||
rlwinm $acc03,$s3,`32-24+3`,21,28
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
rlwinm $acc04,$s3,`32-16+3`,21,28
|
||||
lwz $t1,4($key)
|
||||
rlwinm $acc05,$s0,`32-16+3`,21,28
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
rlwinm $acc06,$s1,`32-16+3`,21,28
|
||||
lwz $t3,12($key)
|
||||
rlwinm $acc07,$s2,`32-16+3`,21,28
|
||||
lwzx $acc00,$Tbl0,$acc00
|
||||
lwzx $acc01,$Tbl0,$acc01
|
||||
rlwinm $acc08,$s2,`32-8+3`,21,28
|
||||
lwzx $acc01,$Tbl0,$acc01
|
||||
rlwinm $acc09,$s3,`32-8+3`,21,28
|
||||
lwzx $acc02,$Tbl0,$acc02
|
||||
lwzx $acc03,$Tbl0,$acc03
|
||||
rlwinm $acc10,$s0,`32-8+3`,21,28
|
||||
lwzx $acc03,$Tbl0,$acc03
|
||||
rlwinm $acc11,$s1,`32-8+3`,21,28
|
||||
lwzx $acc04,$Tbl1,$acc04
|
||||
lwzx $acc05,$Tbl1,$acc05
|
||||
rlwinm $acc12,$s1,`0+3`,21,28
|
||||
lwzx $acc05,$Tbl1,$acc05
|
||||
rlwinm $acc13,$s2,`0+3`,21,28
|
||||
lwzx $acc06,$Tbl1,$acc06
|
||||
lwzx $acc07,$Tbl1,$acc07
|
||||
rlwinm $acc14,$s3,`0+3`,21,28
|
||||
lwzx $acc07,$Tbl1,$acc07
|
||||
rlwinm $acc15,$s0,`0+3`,21,28
|
||||
lwzx $acc08,$Tbl2,$acc08
|
||||
lwzx $acc09,$Tbl2,$acc09
|
||||
xor $t0,$t0,$acc00
|
||||
lwzx $acc09,$Tbl2,$acc09
|
||||
xor $t1,$t1,$acc01
|
||||
lwzx $acc10,$Tbl2,$acc10
|
||||
lwzx $acc11,$Tbl2,$acc11
|
||||
xor $t2,$t2,$acc02
|
||||
lwzx $acc11,$Tbl2,$acc11
|
||||
xor $t3,$t3,$acc03
|
||||
lwzx $acc12,$Tbl3,$acc12
|
||||
lwzx $acc13,$Tbl3,$acc13
|
||||
xor $t0,$t0,$acc04
|
||||
lwzx $acc13,$Tbl3,$acc13
|
||||
xor $t1,$t1,$acc05
|
||||
lwzx $acc14,$Tbl3,$acc14
|
||||
lwzx $acc15,$Tbl3,$acc15
|
||||
xor $t2,$t2,$acc06
|
||||
lwzx $acc15,$Tbl3,$acc15
|
||||
xor $t3,$t3,$acc07
|
||||
xor $t0,$t0,$acc08
|
||||
xor $t1,$t1,$acc09
|
||||
@@ -815,56 +987,56 @@ Ldec_loop:
|
||||
addi $Tbl2,$Tbl0,2048
|
||||
nop
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
rlwinm $acc00,$s0,`32-24`,24,31
|
||||
lwz $t1,4($key)
|
||||
rlwinm $acc01,$s1,`32-24`,24,31
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
rlwinm $acc02,$s2,`32-24`,24,31
|
||||
lwz $t3,12($key)
|
||||
rlwinm $acc03,$s3,`32-24`,24,31
|
||||
lwz $acc08,`2048+0`($Tbl0) ! prefetch Td4
|
||||
lwz $acc09,`2048+32`($Tbl0)
|
||||
rlwinm $acc04,$s3,`32-16`,24,31
|
||||
lwz $acc09,`2048+32`($Tbl0)
|
||||
rlwinm $acc05,$s0,`32-16`,24,31
|
||||
lwz $acc10,`2048+64`($Tbl0)
|
||||
lwz $acc11,`2048+96`($Tbl0)
|
||||
lbzx $acc00,$Tbl2,$acc00
|
||||
lwz $acc11,`2048+96`($Tbl0)
|
||||
lbzx $acc01,$Tbl2,$acc01
|
||||
lwz $acc12,`2048+128`($Tbl0)
|
||||
lwz $acc13,`2048+160`($Tbl0)
|
||||
rlwinm $acc06,$s1,`32-16`,24,31
|
||||
lwz $acc13,`2048+160`($Tbl0)
|
||||
rlwinm $acc07,$s2,`32-16`,24,31
|
||||
lwz $acc14,`2048+192`($Tbl0)
|
||||
lwz $acc15,`2048+224`($Tbl0)
|
||||
rlwinm $acc08,$s2,`32-8`,24,31
|
||||
lwz $acc15,`2048+224`($Tbl0)
|
||||
rlwinm $acc09,$s3,`32-8`,24,31
|
||||
lbzx $acc02,$Tbl2,$acc02
|
||||
lbzx $acc03,$Tbl2,$acc03
|
||||
rlwinm $acc10,$s0,`32-8`,24,31
|
||||
lbzx $acc03,$Tbl2,$acc03
|
||||
rlwinm $acc11,$s1,`32-8`,24,31
|
||||
lbzx $acc04,$Tbl2,$acc04
|
||||
lbzx $acc05,$Tbl2,$acc05
|
||||
rlwinm $acc12,$s1,`0`,24,31
|
||||
lbzx $acc05,$Tbl2,$acc05
|
||||
rlwinm $acc13,$s2,`0`,24,31
|
||||
lbzx $acc06,$Tbl2,$acc06
|
||||
lbzx $acc07,$Tbl2,$acc07
|
||||
rlwinm $acc14,$s3,`0`,24,31
|
||||
lbzx $acc07,$Tbl2,$acc07
|
||||
rlwinm $acc15,$s0,`0`,24,31
|
||||
lbzx $acc08,$Tbl2,$acc08
|
||||
lbzx $acc09,$Tbl2,$acc09
|
||||
rlwinm $s0,$acc00,24,0,7
|
||||
lbzx $acc09,$Tbl2,$acc09
|
||||
rlwinm $s1,$acc01,24,0,7
|
||||
lbzx $acc10,$Tbl2,$acc10
|
||||
lbzx $acc11,$Tbl2,$acc11
|
||||
rlwinm $s2,$acc02,24,0,7
|
||||
lbzx $acc11,$Tbl2,$acc11
|
||||
rlwinm $s3,$acc03,24,0,7
|
||||
lbzx $acc12,$Tbl2,$acc12
|
||||
lbzx $acc13,$Tbl2,$acc13
|
||||
rlwimi $s0,$acc04,16,8,15
|
||||
lbzx $acc13,$Tbl2,$acc13
|
||||
rlwimi $s1,$acc05,16,8,15
|
||||
lbzx $acc14,$Tbl2,$acc14
|
||||
lbzx $acc15,$Tbl2,$acc15
|
||||
rlwimi $s2,$acc06,16,8,15
|
||||
lbzx $acc15,$Tbl2,$acc15
|
||||
rlwimi $s3,$acc07,16,8,15
|
||||
rlwimi $s0,$acc08,8,16,23
|
||||
rlwimi $s1,$acc09,8,16,23
|
||||
@@ -879,20 +1051,22 @@ Ldec_loop:
|
||||
xor $s2,$s2,$t2
|
||||
xor $s3,$s3,$t3
|
||||
blr
|
||||
.long 0
|
||||
.byte 0,12,0x14,0,0,0,0,0
|
||||
|
||||
.align 4
|
||||
Lppc_AES_decrypt_compact:
|
||||
lwz $acc00,240($key)
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
addi $Tbl1,$Tbl0,2048
|
||||
lwz $t0,0($key)
|
||||
lis $mask80,0x8080
|
||||
lwz $t1,4($key)
|
||||
lis $mask1b,0x1b1b
|
||||
addi $key,$key,16
|
||||
lwz $t2,8($key)
|
||||
ori $mask80,$mask80,0x8080
|
||||
lwz $t3,12($key)
|
||||
ori $mask1b,$mask1b,0x1b1b
|
||||
addi $key,$key,16
|
||||
___
|
||||
$code.=<<___ if ($SIZE_T==8);
|
||||
insrdi $mask80,$mask80,32,0
|
||||
@@ -904,10 +1078,10 @@ $code.=<<___;
|
||||
Ldec_compact_loop:
|
||||
xor $s0,$s0,$t0
|
||||
xor $s1,$s1,$t1
|
||||
xor $s2,$s2,$t2
|
||||
xor $s3,$s3,$t3
|
||||
rlwinm $acc00,$s0,`32-24`,24,31
|
||||
xor $s2,$s2,$t2
|
||||
rlwinm $acc01,$s1,`32-24`,24,31
|
||||
xor $s3,$s3,$t3
|
||||
rlwinm $acc02,$s2,`32-24`,24,31
|
||||
rlwinm $acc03,$s3,`32-24`,24,31
|
||||
rlwinm $acc04,$s3,`32-16`,24,31
|
||||
@@ -915,48 +1089,48 @@ Ldec_compact_loop:
|
||||
rlwinm $acc06,$s1,`32-16`,24,31
|
||||
rlwinm $acc07,$s2,`32-16`,24,31
|
||||
lbzx $acc00,$Tbl1,$acc00
|
||||
lbzx $acc01,$Tbl1,$acc01
|
||||
rlwinm $acc08,$s2,`32-8`,24,31
|
||||
lbzx $acc01,$Tbl1,$acc01
|
||||
rlwinm $acc09,$s3,`32-8`,24,31
|
||||
lbzx $acc02,$Tbl1,$acc02
|
||||
lbzx $acc03,$Tbl1,$acc03
|
||||
rlwinm $acc10,$s0,`32-8`,24,31
|
||||
lbzx $acc03,$Tbl1,$acc03
|
||||
rlwinm $acc11,$s1,`32-8`,24,31
|
||||
lbzx $acc04,$Tbl1,$acc04
|
||||
lbzx $acc05,$Tbl1,$acc05
|
||||
rlwinm $acc12,$s1,`0`,24,31
|
||||
lbzx $acc05,$Tbl1,$acc05
|
||||
rlwinm $acc13,$s2,`0`,24,31
|
||||
lbzx $acc06,$Tbl1,$acc06
|
||||
lbzx $acc07,$Tbl1,$acc07
|
||||
rlwinm $acc14,$s3,`0`,24,31
|
||||
lbzx $acc07,$Tbl1,$acc07
|
||||
rlwinm $acc15,$s0,`0`,24,31
|
||||
lbzx $acc08,$Tbl1,$acc08
|
||||
lbzx $acc09,$Tbl1,$acc09
|
||||
rlwinm $s0,$acc00,24,0,7
|
||||
lbzx $acc09,$Tbl1,$acc09
|
||||
rlwinm $s1,$acc01,24,0,7
|
||||
lbzx $acc10,$Tbl1,$acc10
|
||||
lbzx $acc11,$Tbl1,$acc11
|
||||
rlwinm $s2,$acc02,24,0,7
|
||||
lbzx $acc11,$Tbl1,$acc11
|
||||
rlwinm $s3,$acc03,24,0,7
|
||||
lbzx $acc12,$Tbl1,$acc12
|
||||
lbzx $acc13,$Tbl1,$acc13
|
||||
rlwimi $s0,$acc04,16,8,15
|
||||
lbzx $acc13,$Tbl1,$acc13
|
||||
rlwimi $s1,$acc05,16,8,15
|
||||
lbzx $acc14,$Tbl1,$acc14
|
||||
lbzx $acc15,$Tbl1,$acc15
|
||||
rlwimi $s2,$acc06,16,8,15
|
||||
lbzx $acc15,$Tbl1,$acc15
|
||||
rlwimi $s3,$acc07,16,8,15
|
||||
rlwimi $s0,$acc08,8,16,23
|
||||
rlwimi $s1,$acc09,8,16,23
|
||||
rlwimi $s2,$acc10,8,16,23
|
||||
rlwimi $s3,$acc11,8,16,23
|
||||
lwz $t0,0($key)
|
||||
lwz $t1,4($key)
|
||||
or $s0,$s0,$acc12
|
||||
lwz $t1,4($key)
|
||||
or $s1,$s1,$acc13
|
||||
lwz $t2,8($key)
|
||||
lwz $t3,12($key)
|
||||
or $s2,$s2,$acc14
|
||||
lwz $t3,12($key)
|
||||
or $s3,$s3,$acc15
|
||||
|
||||
addi $key,$key,16
|
||||
@@ -1030,12 +1204,12 @@ $code.=<<___ if ($SIZE_T==4);
|
||||
and $acc02,$s2,$mask80
|
||||
and $acc03,$s3,$mask80
|
||||
srwi $acc04,$acc00,7 # r1>>7
|
||||
srwi $acc05,$acc01,7
|
||||
srwi $acc06,$acc02,7
|
||||
srwi $acc07,$acc03,7
|
||||
andc $acc08,$s0,$mask80 # r0&0x7f7f7f7f
|
||||
srwi $acc05,$acc01,7
|
||||
andc $acc09,$s1,$mask80
|
||||
srwi $acc06,$acc02,7
|
||||
andc $acc10,$s2,$mask80
|
||||
srwi $acc07,$acc03,7
|
||||
andc $acc11,$s3,$mask80
|
||||
sub $acc00,$acc00,$acc04 # r1-(r1>>7)
|
||||
sub $acc01,$acc01,$acc05
|
||||
@@ -1059,12 +1233,12 @@ $code.=<<___ if ($SIZE_T==4);
|
||||
and $acc06,$acc02,$mask80
|
||||
and $acc07,$acc03,$mask80
|
||||
srwi $acc08,$acc04,7 # r1>>7
|
||||
srwi $acc09,$acc05,7
|
||||
srwi $acc10,$acc06,7
|
||||
srwi $acc11,$acc07,7
|
||||
andc $acc12,$acc00,$mask80 # r2&0x7f7f7f7f
|
||||
srwi $acc09,$acc05,7
|
||||
andc $acc13,$acc01,$mask80
|
||||
srwi $acc10,$acc06,7
|
||||
andc $acc14,$acc02,$mask80
|
||||
srwi $acc11,$acc07,7
|
||||
andc $acc15,$acc03,$mask80
|
||||
sub $acc04,$acc04,$acc08 # r1-(r1>>7)
|
||||
sub $acc05,$acc05,$acc09
|
||||
@@ -1085,13 +1259,13 @@ $code.=<<___ if ($SIZE_T==4);
|
||||
|
||||
and $acc08,$acc04,$mask80 # r1=r4&0x80808080
|
||||
and $acc09,$acc05,$mask80
|
||||
and $acc10,$acc06,$mask80
|
||||
and $acc11,$acc07,$mask80
|
||||
srwi $acc12,$acc08,7 # r1>>7
|
||||
and $acc10,$acc06,$mask80
|
||||
srwi $acc13,$acc09,7
|
||||
and $acc11,$acc07,$mask80
|
||||
srwi $acc14,$acc10,7
|
||||
srwi $acc15,$acc11,7
|
||||
sub $acc08,$acc08,$acc12 # r1-(r1>>7)
|
||||
srwi $acc15,$acc11,7
|
||||
sub $acc09,$acc09,$acc13
|
||||
sub $acc10,$acc10,$acc14
|
||||
sub $acc11,$acc11,$acc15
|
||||
@@ -1124,10 +1298,10 @@ ___
|
||||
$code.=<<___;
|
||||
rotrwi $s0,$s0,8 # = ROTATE(r0,8)
|
||||
rotrwi $s1,$s1,8
|
||||
rotrwi $s2,$s2,8
|
||||
rotrwi $s3,$s3,8
|
||||
xor $s0,$s0,$acc00 # ^= r2^r0
|
||||
rotrwi $s2,$s2,8
|
||||
xor $s1,$s1,$acc01
|
||||
rotrwi $s3,$s3,8
|
||||
xor $s2,$s2,$acc02
|
||||
xor $s3,$s3,$acc03
|
||||
xor $acc00,$acc00,$acc08
|
||||
@@ -1135,32 +1309,32 @@ $code.=<<___;
|
||||
xor $acc02,$acc02,$acc10
|
||||
xor $acc03,$acc03,$acc11
|
||||
xor $s0,$s0,$acc04 # ^= r4^r0
|
||||
xor $s1,$s1,$acc05
|
||||
xor $s2,$s2,$acc06
|
||||
xor $s3,$s3,$acc07
|
||||
rotrwi $acc00,$acc00,24
|
||||
xor $s1,$s1,$acc05
|
||||
rotrwi $acc01,$acc01,24
|
||||
xor $s2,$s2,$acc06
|
||||
rotrwi $acc02,$acc02,24
|
||||
xor $s3,$s3,$acc07
|
||||
rotrwi $acc03,$acc03,24
|
||||
xor $acc04,$acc04,$acc08
|
||||
xor $acc05,$acc05,$acc09
|
||||
xor $acc06,$acc06,$acc10
|
||||
xor $acc07,$acc07,$acc11
|
||||
xor $s0,$s0,$acc08 # ^= r8 [^((r4^r0)^(r2^r0)=r4^r2)]
|
||||
xor $s1,$s1,$acc09
|
||||
xor $s2,$s2,$acc10
|
||||
xor $s3,$s3,$acc11
|
||||
rotrwi $acc04,$acc04,16
|
||||
xor $s1,$s1,$acc09
|
||||
rotrwi $acc05,$acc05,16
|
||||
xor $s2,$s2,$acc10
|
||||
rotrwi $acc06,$acc06,16
|
||||
xor $s3,$s3,$acc11
|
||||
rotrwi $acc07,$acc07,16
|
||||
xor $s0,$s0,$acc00 # ^= ROTATE(r8^r2^r0,24)
|
||||
xor $s1,$s1,$acc01
|
||||
xor $s2,$s2,$acc02
|
||||
xor $s3,$s3,$acc03
|
||||
rotrwi $acc08,$acc08,8
|
||||
xor $s1,$s1,$acc01
|
||||
rotrwi $acc09,$acc09,8
|
||||
xor $s2,$s2,$acc02
|
||||
rotrwi $acc10,$acc10,8
|
||||
xor $s3,$s3,$acc03
|
||||
rotrwi $acc11,$acc11,8
|
||||
xor $s0,$s0,$acc04 # ^= ROTATE(r8^r4^r0,16)
|
||||
xor $s1,$s1,$acc05
|
||||
@@ -1179,7 +1353,9 @@ Ldec_compact_done:
|
||||
xor $s2,$s2,$t2
|
||||
xor $s3,$s3,$t3
|
||||
blr
|
||||
.long 0
|
||||
.long 0
|
||||
.byte 0,12,0x14,0,0,0,0,0
|
||||
|
||||
.asciz "AES for PPC, CRYPTOGAMS by <appro\@openssl.org>"
|
||||
.align 7
|
||||
___
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -589,6 +589,9 @@ $code.=<<___;
|
||||
.globl AES_encrypt
|
||||
.type AES_encrypt,\@function,3
|
||||
.align 16
|
||||
.globl asm_AES_encrypt
|
||||
.hidden asm_AES_encrypt
|
||||
asm_AES_encrypt:
|
||||
AES_encrypt:
|
||||
push %rbx
|
||||
push %rbp
|
||||
@@ -1185,6 +1188,9 @@ $code.=<<___;
|
||||
.globl AES_decrypt
|
||||
.type AES_decrypt,\@function,3
|
||||
.align 16
|
||||
.globl asm_AES_decrypt
|
||||
.hidden asm_AES_decrypt
|
||||
asm_AES_decrypt:
|
||||
AES_decrypt:
|
||||
push %rbx
|
||||
push %rbp
|
||||
@@ -1278,13 +1284,13 @@ $code.=<<___;
|
||||
___
|
||||
}
|
||||
|
||||
# int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
# int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
# AES_KEY *key)
|
||||
$code.=<<___;
|
||||
.globl AES_set_encrypt_key
|
||||
.type AES_set_encrypt_key,\@function,3
|
||||
.globl private_AES_set_encrypt_key
|
||||
.type private_AES_set_encrypt_key,\@function,3
|
||||
.align 16
|
||||
AES_set_encrypt_key:
|
||||
private_AES_set_encrypt_key:
|
||||
push %rbx
|
||||
push %rbp
|
||||
push %r12 # redundant, but allows to share
|
||||
@@ -1305,7 +1311,7 @@ AES_set_encrypt_key:
|
||||
add \$56,%rsp
|
||||
.Lenc_key_epilogue:
|
||||
ret
|
||||
.size AES_set_encrypt_key,.-AES_set_encrypt_key
|
||||
.size private_AES_set_encrypt_key,.-private_AES_set_encrypt_key
|
||||
|
||||
.type _x86_64_AES_set_encrypt_key,\@abi-omnipotent
|
||||
.align 16
|
||||
@@ -1548,13 +1554,13 @@ $code.=<<___;
|
||||
___
|
||||
}
|
||||
|
||||
# int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
# int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
# AES_KEY *key)
|
||||
$code.=<<___;
|
||||
.globl AES_set_decrypt_key
|
||||
.type AES_set_decrypt_key,\@function,3
|
||||
.globl private_AES_set_decrypt_key
|
||||
.type private_AES_set_decrypt_key,\@function,3
|
||||
.align 16
|
||||
AES_set_decrypt_key:
|
||||
private_AES_set_decrypt_key:
|
||||
push %rbx
|
||||
push %rbp
|
||||
push %r12
|
||||
@@ -1623,7 +1629,7 @@ $code.=<<___;
|
||||
add \$56,%rsp
|
||||
.Ldec_key_epilogue:
|
||||
ret
|
||||
.size AES_set_decrypt_key,.-AES_set_decrypt_key
|
||||
.size private_AES_set_decrypt_key,.-private_AES_set_decrypt_key
|
||||
___
|
||||
|
||||
# void AES_cbc_encrypt (const void char *inp, unsigned char *out,
|
||||
@@ -1649,6 +1655,9 @@ $code.=<<___;
|
||||
.type AES_cbc_encrypt,\@function,6
|
||||
.align 16
|
||||
.extern OPENSSL_ia32cap_P
|
||||
.globl asm_AES_cbc_encrypt
|
||||
.hidden asm_AES_cbc_encrypt
|
||||
asm_AES_cbc_encrypt:
|
||||
AES_cbc_encrypt:
|
||||
cmp \$0,%rdx # check length
|
||||
je .Lcbc_epilogue
|
||||
@@ -2767,13 +2776,13 @@ cbc_se_handler:
|
||||
.rva .LSEH_end_AES_decrypt
|
||||
.rva .LSEH_info_AES_decrypt
|
||||
|
||||
.rva .LSEH_begin_AES_set_encrypt_key
|
||||
.rva .LSEH_end_AES_set_encrypt_key
|
||||
.rva .LSEH_info_AES_set_encrypt_key
|
||||
.rva .LSEH_begin_private_AES_set_encrypt_key
|
||||
.rva .LSEH_end_private_AES_set_encrypt_key
|
||||
.rva .LSEH_info_private_AES_set_encrypt_key
|
||||
|
||||
.rva .LSEH_begin_AES_set_decrypt_key
|
||||
.rva .LSEH_end_AES_set_decrypt_key
|
||||
.rva .LSEH_info_AES_set_decrypt_key
|
||||
.rva .LSEH_begin_private_AES_set_decrypt_key
|
||||
.rva .LSEH_end_private_AES_set_decrypt_key
|
||||
.rva .LSEH_info_private_AES_set_decrypt_key
|
||||
|
||||
.rva .LSEH_begin_AES_cbc_encrypt
|
||||
.rva .LSEH_end_AES_cbc_encrypt
|
||||
@@ -2789,11 +2798,11 @@ cbc_se_handler:
|
||||
.byte 9,0,0,0
|
||||
.rva block_se_handler
|
||||
.rva .Ldec_prologue,.Ldec_epilogue # HandlerData[]
|
||||
.LSEH_info_AES_set_encrypt_key:
|
||||
.LSEH_info_private_AES_set_encrypt_key:
|
||||
.byte 9,0,0,0
|
||||
.rva key_se_handler
|
||||
.rva .Lenc_key_prologue,.Lenc_key_epilogue # HandlerData[]
|
||||
.LSEH_info_AES_set_decrypt_key:
|
||||
.LSEH_info_private_AES_set_decrypt_key:
|
||||
.byte 9,0,0,0
|
||||
.rva key_se_handler
|
||||
.rva .Ldec_key_prologue,.Ldec_key_epilogue # HandlerData[]
|
||||
|
||||
1250
crypto/aes/asm/aesni-sha1-x86_64.pl
Normal file
1250
crypto/aes/asm/aesni-sha1-x86_64.pl
Normal file
File diff suppressed because it is too large
Load Diff
2189
crypto/aes/asm/aesni-x86.pl
Normal file
2189
crypto/aes/asm/aesni-x86.pl
Normal file
File diff suppressed because it is too large
Load Diff
3071
crypto/aes/asm/aesni-x86_64.pl
Normal file
3071
crypto/aes/asm/aesni-x86_64.pl
Normal file
File diff suppressed because it is too large
Load Diff
3108
crypto/aes/asm/bsaes-x86_64.pl
Normal file
3108
crypto/aes/asm/bsaes-x86_64.pl
Normal file
File diff suppressed because it is too large
Load Diff
903
crypto/aes/asm/vpaes-x86.pl
Normal file
903
crypto/aes/asm/vpaes-x86.pl
Normal file
@@ -0,0 +1,903 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
######################################################################
|
||||
## Constant-time SSSE3 AES core implementation.
|
||||
## version 0.1
|
||||
##
|
||||
## By Mike Hamburg (Stanford University), 2009
|
||||
## Public domain.
|
||||
##
|
||||
## For details see http://shiftleft.org/papers/vector_aes/ and
|
||||
## http://crypto.stanford.edu/vpaes/.
|
||||
|
||||
######################################################################
|
||||
# September 2011.
|
||||
#
|
||||
# Port vpaes-x86_64.pl as 32-bit "almost" drop-in replacement for
|
||||
# aes-586.pl. "Almost" refers to the fact that AES_cbc_encrypt
|
||||
# doesn't handle partial vectors (doesn't have to if called from
|
||||
# EVP only). "Drop-in" implies that this module doesn't share key
|
||||
# schedule structure with the original nor does it make assumption
|
||||
# about its alignment...
|
||||
#
|
||||
# Performance summary. aes-586.pl column lists large-block CBC
|
||||
# encrypt/decrypt/with-hyper-threading-off(*) results in cycles per
|
||||
# byte processed with 128-bit key, and vpaes-x86.pl column - [also
|
||||
# large-block CBC] encrypt/decrypt.
|
||||
#
|
||||
# aes-586.pl vpaes-x86.pl
|
||||
#
|
||||
# Core 2(**) 29.1/42.3/18.3 22.0/25.6(***)
|
||||
# Nehalem 27.9/40.4/18.1 10.3/12.0
|
||||
# Atom 102./119./60.1 64.5/85.3(***)
|
||||
#
|
||||
# (*) "Hyper-threading" in the context refers rather to cache shared
|
||||
# among multiple cores, than to specifically Intel HTT. As vast
|
||||
# majority of contemporary cores share cache, slower code path
|
||||
# is common place. In other words "with-hyper-threading-off"
|
||||
# results are presented mostly for reference purposes.
|
||||
#
|
||||
# (**) "Core 2" refers to initial 65nm design, a.k.a. Conroe.
|
||||
#
|
||||
# (***) Less impressive improvement on Core 2 and Atom is due to slow
|
||||
# pshufb, yet it's respectable +32%/65% improvement on Core 2
|
||||
# and +58%/40% on Atom (as implied, over "hyper-threading-safe"
|
||||
# code path).
|
||||
#
|
||||
# <appro@openssl.org>
|
||||
|
||||
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
push(@INC,"${dir}","${dir}../../perlasm");
|
||||
require "x86asm.pl";
|
||||
|
||||
&asm_init($ARGV[0],"vpaes-x86.pl",$x86only = $ARGV[$#ARGV] eq "386");
|
||||
|
||||
$PREFIX="vpaes";
|
||||
|
||||
my ($round, $base, $magic, $key, $const, $inp, $out)=
|
||||
("eax", "ebx", "ecx", "edx","ebp", "esi","edi");
|
||||
|
||||
&static_label("_vpaes_consts");
|
||||
&static_label("_vpaes_schedule_low_round");
|
||||
|
||||
&set_label("_vpaes_consts",64);
|
||||
$k_inv=-0x30; # inv, inva
|
||||
&data_word(0x0D080180,0x0E05060F,0x0A0B0C02,0x04070309);
|
||||
&data_word(0x0F0B0780,0x01040A06,0x02050809,0x030D0E0C);
|
||||
|
||||
$k_s0F=-0x10; # s0F
|
||||
&data_word(0x0F0F0F0F,0x0F0F0F0F,0x0F0F0F0F,0x0F0F0F0F);
|
||||
|
||||
$k_ipt=0x00; # input transform (lo, hi)
|
||||
&data_word(0x5A2A7000,0xC2B2E898,0x52227808,0xCABAE090);
|
||||
&data_word(0x317C4D00,0x4C01307D,0xB0FDCC81,0xCD80B1FC);
|
||||
|
||||
$k_sb1=0x20; # sb1u, sb1t
|
||||
&data_word(0xCB503E00,0xB19BE18F,0x142AF544,0xA5DF7A6E);
|
||||
&data_word(0xFAE22300,0x3618D415,0x0D2ED9EF,0x3BF7CCC1);
|
||||
$k_sb2=0x40; # sb2u, sb2t
|
||||
&data_word(0x0B712400,0xE27A93C6,0xBC982FCD,0x5EB7E955);
|
||||
&data_word(0x0AE12900,0x69EB8840,0xAB82234A,0xC2A163C8);
|
||||
$k_sbo=0x60; # sbou, sbot
|
||||
&data_word(0x6FBDC700,0xD0D26D17,0xC502A878,0x15AABF7A);
|
||||
&data_word(0x5FBB6A00,0xCFE474A5,0x412B35FA,0x8E1E90D1);
|
||||
|
||||
$k_mc_forward=0x80; # mc_forward
|
||||
&data_word(0x00030201,0x04070605,0x080B0A09,0x0C0F0E0D);
|
||||
&data_word(0x04070605,0x080B0A09,0x0C0F0E0D,0x00030201);
|
||||
&data_word(0x080B0A09,0x0C0F0E0D,0x00030201,0x04070605);
|
||||
&data_word(0x0C0F0E0D,0x00030201,0x04070605,0x080B0A09);
|
||||
|
||||
$k_mc_backward=0xc0; # mc_backward
|
||||
&data_word(0x02010003,0x06050407,0x0A09080B,0x0E0D0C0F);
|
||||
&data_word(0x0E0D0C0F,0x02010003,0x06050407,0x0A09080B);
|
||||
&data_word(0x0A09080B,0x0E0D0C0F,0x02010003,0x06050407);
|
||||
&data_word(0x06050407,0x0A09080B,0x0E0D0C0F,0x02010003);
|
||||
|
||||
$k_sr=0x100; # sr
|
||||
&data_word(0x03020100,0x07060504,0x0B0A0908,0x0F0E0D0C);
|
||||
&data_word(0x0F0A0500,0x030E0904,0x07020D08,0x0B06010C);
|
||||
&data_word(0x0B020900,0x0F060D04,0x030A0108,0x070E050C);
|
||||
&data_word(0x070A0D00,0x0B0E0104,0x0F020508,0x0306090C);
|
||||
|
||||
$k_rcon=0x140; # rcon
|
||||
&data_word(0xAF9DEEB6,0x1F8391B9,0x4D7C7D81,0x702A9808);
|
||||
|
||||
$k_s63=0x150; # s63: all equal to 0x63 transformed
|
||||
&data_word(0x5B5B5B5B,0x5B5B5B5B,0x5B5B5B5B,0x5B5B5B5B);
|
||||
|
||||
$k_opt=0x160; # output transform
|
||||
&data_word(0xD6B66000,0xFF9F4929,0xDEBE6808,0xF7974121);
|
||||
&data_word(0x50BCEC00,0x01EDBD51,0xB05C0CE0,0xE10D5DB1);
|
||||
|
||||
$k_deskew=0x180; # deskew tables: inverts the sbox's "skew"
|
||||
&data_word(0x47A4E300,0x07E4A340,0x5DBEF91A,0x1DFEB95A);
|
||||
&data_word(0x83EA6900,0x5F36B5DC,0xF49D1E77,0x2841C2AB);
|
||||
##
|
||||
## Decryption stuff
|
||||
## Key schedule constants
|
||||
##
|
||||
$k_dksd=0x1a0; # decryption key schedule: invskew x*D
|
||||
&data_word(0xA3E44700,0xFEB91A5D,0x5A1DBEF9,0x0740E3A4);
|
||||
&data_word(0xB5368300,0x41C277F4,0xAB289D1E,0x5FDC69EA);
|
||||
$k_dksb=0x1c0; # decryption key schedule: invskew x*B
|
||||
&data_word(0x8550D500,0x9A4FCA1F,0x1CC94C99,0x03D65386);
|
||||
&data_word(0xB6FC4A00,0x115BEDA7,0x7E3482C8,0xD993256F);
|
||||
$k_dkse=0x1e0; # decryption key schedule: invskew x*E + 0x63
|
||||
&data_word(0x1FC9D600,0xD5031CCA,0x994F5086,0x53859A4C);
|
||||
&data_word(0x4FDC7BE8,0xA2319605,0x20B31487,0xCD5EF96A);
|
||||
$k_dks9=0x200; # decryption key schedule: invskew x*9
|
||||
&data_word(0x7ED9A700,0xB6116FC8,0x82255BFC,0x4AED9334);
|
||||
&data_word(0x27143300,0x45765162,0xE9DAFDCE,0x8BB89FAC);
|
||||
|
||||
##
|
||||
## Decryption stuff
|
||||
## Round function constants
|
||||
##
|
||||
$k_dipt=0x220; # decryption input transform
|
||||
&data_word(0x0B545F00,0x0F505B04,0x114E451A,0x154A411E);
|
||||
&data_word(0x60056500,0x86E383E6,0xF491F194,0x12771772);
|
||||
|
||||
$k_dsb9=0x240; # decryption sbox output *9*u, *9*t
|
||||
&data_word(0x9A86D600,0x851C0353,0x4F994CC9,0xCAD51F50);
|
||||
&data_word(0xECD74900,0xC03B1789,0xB2FBA565,0x725E2C9E);
|
||||
$k_dsbd=0x260; # decryption sbox output *D*u, *D*t
|
||||
&data_word(0xE6B1A200,0x7D57CCDF,0x882A4439,0xF56E9B13);
|
||||
&data_word(0x24C6CB00,0x3CE2FAF7,0x15DEEFD3,0x2931180D);
|
||||
$k_dsbb=0x280; # decryption sbox output *B*u, *B*t
|
||||
&data_word(0x96B44200,0xD0226492,0xB0F2D404,0x602646F6);
|
||||
&data_word(0xCD596700,0xC19498A6,0x3255AA6B,0xF3FF0C3E);
|
||||
$k_dsbe=0x2a0; # decryption sbox output *E*u, *E*t
|
||||
&data_word(0x26D4D000,0x46F29296,0x64B4F6B0,0x22426004);
|
||||
&data_word(0xFFAAC100,0x0C55A6CD,0x98593E32,0x9467F36B);
|
||||
$k_dsbo=0x2c0; # decryption sbox final output
|
||||
&data_word(0x7EF94000,0x1387EA53,0xD4943E2D,0xC7AA6DB9);
|
||||
&data_word(0x93441D00,0x12D7560F,0xD8C58E9C,0xCA4B8159);
|
||||
&asciz ("Vector Permutation AES for x86/SSSE3, Mike Hamburg (Stanford University)");
|
||||
&align (64);
|
||||
|
||||
&function_begin_B("_vpaes_preheat");
|
||||
&add ($const,&DWP(0,"esp"));
|
||||
&movdqa ("xmm7",&QWP($k_inv,$const));
|
||||
&movdqa ("xmm6",&QWP($k_s0F,$const));
|
||||
&ret ();
|
||||
&function_end_B("_vpaes_preheat");
|
||||
|
||||
##
|
||||
## _aes_encrypt_core
|
||||
##
|
||||
## AES-encrypt %xmm0.
|
||||
##
|
||||
## Inputs:
|
||||
## %xmm0 = input
|
||||
## %xmm6-%xmm7 as in _vpaes_preheat
|
||||
## (%edx) = scheduled keys
|
||||
##
|
||||
## Output in %xmm0
|
||||
## Clobbers %xmm1-%xmm5, %eax, %ebx, %ecx, %edx
|
||||
##
|
||||
##
|
||||
&function_begin_B("_vpaes_encrypt_core");
|
||||
&mov ($magic,16);
|
||||
&mov ($round,&DWP(240,$key));
|
||||
&movdqa ("xmm1","xmm6")
|
||||
&movdqa ("xmm2",&QWP($k_ipt,$const));
|
||||
&pandn ("xmm1","xmm0");
|
||||
&movdqu ("xmm5",&QWP(0,$key));
|
||||
&psrld ("xmm1",4);
|
||||
&pand ("xmm0","xmm6");
|
||||
&pshufb ("xmm2","xmm0");
|
||||
&movdqa ("xmm0",&QWP($k_ipt+16,$const));
|
||||
&pshufb ("xmm0","xmm1");
|
||||
&pxor ("xmm2","xmm5");
|
||||
&pxor ("xmm0","xmm2");
|
||||
&add ($key,16);
|
||||
&lea ($base,&DWP($k_mc_backward,$const));
|
||||
&jmp (&label("enc_entry"));
|
||||
|
||||
|
||||
&set_label("enc_loop",16);
|
||||
# middle of middle round
|
||||
&movdqa ("xmm4",&QWP($k_sb1,$const)); # 4 : sb1u
|
||||
&pshufb ("xmm4","xmm2"); # 4 = sb1u
|
||||
&pxor ("xmm4","xmm5"); # 4 = sb1u + k
|
||||
&movdqa ("xmm0",&QWP($k_sb1+16,$const));# 0 : sb1t
|
||||
&pshufb ("xmm0","xmm3"); # 0 = sb1t
|
||||
&pxor ("xmm0","xmm4"); # 0 = A
|
||||
&movdqa ("xmm5",&QWP($k_sb2,$const)); # 4 : sb2u
|
||||
&pshufb ("xmm5","xmm2"); # 4 = sb2u
|
||||
&movdqa ("xmm1",&QWP(-0x40,$base,$magic));# .Lk_mc_forward[]
|
||||
&movdqa ("xmm2",&QWP($k_sb2+16,$const));# 2 : sb2t
|
||||
&pshufb ("xmm2","xmm3"); # 2 = sb2t
|
||||
&pxor ("xmm2","xmm5"); # 2 = 2A
|
||||
&movdqa ("xmm4",&QWP(0,$base,$magic)); # .Lk_mc_backward[]
|
||||
&movdqa ("xmm3","xmm0"); # 3 = A
|
||||
&pshufb ("xmm0","xmm1"); # 0 = B
|
||||
&add ($key,16); # next key
|
||||
&pxor ("xmm0","xmm2"); # 0 = 2A+B
|
||||
&pshufb ("xmm3","xmm4"); # 3 = D
|
||||
&add ($magic,16); # next mc
|
||||
&pxor ("xmm3","xmm0"); # 3 = 2A+B+D
|
||||
&pshufb ("xmm0","xmm1"); # 0 = 2B+C
|
||||
&and ($magic,0x30); # ... mod 4
|
||||
&pxor ("xmm0","xmm3"); # 0 = 2A+3B+C+D
|
||||
&sub ($round,1); # nr--
|
||||
|
||||
&set_label("enc_entry");
|
||||
# top of round
|
||||
&movdqa ("xmm1","xmm6"); # 1 : i
|
||||
&pandn ("xmm1","xmm0"); # 1 = i<<4
|
||||
&psrld ("xmm1",4); # 1 = i
|
||||
&pand ("xmm0","xmm6"); # 0 = k
|
||||
&movdqa ("xmm5",&QWP($k_inv+16,$const));# 2 : a/k
|
||||
&pshufb ("xmm5","xmm0"); # 2 = a/k
|
||||
&pxor ("xmm0","xmm1"); # 0 = j
|
||||
&movdqa ("xmm3","xmm7"); # 3 : 1/i
|
||||
&pshufb ("xmm3","xmm1"); # 3 = 1/i
|
||||
&pxor ("xmm3","xmm5"); # 3 = iak = 1/i + a/k
|
||||
&movdqa ("xmm4","xmm7"); # 4 : 1/j
|
||||
&pshufb ("xmm4","xmm0"); # 4 = 1/j
|
||||
&pxor ("xmm4","xmm5"); # 4 = jak = 1/j + a/k
|
||||
&movdqa ("xmm2","xmm7"); # 2 : 1/iak
|
||||
&pshufb ("xmm2","xmm3"); # 2 = 1/iak
|
||||
&pxor ("xmm2","xmm0"); # 2 = io
|
||||
&movdqa ("xmm3","xmm7"); # 3 : 1/jak
|
||||
&movdqu ("xmm5",&QWP(0,$key));
|
||||
&pshufb ("xmm3","xmm4"); # 3 = 1/jak
|
||||
&pxor ("xmm3","xmm1"); # 3 = jo
|
||||
&jnz (&label("enc_loop"));
|
||||
|
||||
# middle of last round
|
||||
&movdqa ("xmm4",&QWP($k_sbo,$const)); # 3 : sbou .Lk_sbo
|
||||
&movdqa ("xmm0",&QWP($k_sbo+16,$const));# 3 : sbot .Lk_sbo+16
|
||||
&pshufb ("xmm4","xmm2"); # 4 = sbou
|
||||
&pxor ("xmm4","xmm5"); # 4 = sb1u + k
|
||||
&pshufb ("xmm0","xmm3"); # 0 = sb1t
|
||||
&movdqa ("xmm1",&QWP(0x40,$base,$magic));# .Lk_sr[]
|
||||
&pxor ("xmm0","xmm4"); # 0 = A
|
||||
&pshufb ("xmm0","xmm1");
|
||||
&ret ();
|
||||
&function_end_B("_vpaes_encrypt_core");
|
||||
|
||||
##
|
||||
## Decryption core
|
||||
##
|
||||
## Same API as encryption core.
|
||||
##
|
||||
&function_begin_B("_vpaes_decrypt_core");
|
||||
&mov ($round,&DWP(240,$key));
|
||||
&lea ($base,&DWP($k_dsbd,$const));
|
||||
&movdqa ("xmm1","xmm6");
|
||||
&movdqa ("xmm2",&QWP($k_dipt-$k_dsbd,$base));
|
||||
&pandn ("xmm1","xmm0");
|
||||
&mov ($magic,$round);
|
||||
&psrld ("xmm1",4)
|
||||
&movdqu ("xmm5",&QWP(0,$key));
|
||||
&shl ($magic,4);
|
||||
&pand ("xmm0","xmm6");
|
||||
&pshufb ("xmm2","xmm0");
|
||||
&movdqa ("xmm0",&QWP($k_dipt-$k_dsbd+16,$base));
|
||||
&xor ($magic,0x30);
|
||||
&pshufb ("xmm0","xmm1");
|
||||
&and ($magic,0x30);
|
||||
&pxor ("xmm2","xmm5");
|
||||
&movdqa ("xmm5",&QWP($k_mc_forward+48,$const));
|
||||
&pxor ("xmm0","xmm2");
|
||||
&add ($key,16);
|
||||
&lea ($magic,&DWP($k_sr-$k_dsbd,$base,$magic));
|
||||
&jmp (&label("dec_entry"));
|
||||
|
||||
&set_label("dec_loop",16);
|
||||
##
|
||||
## Inverse mix columns
|
||||
##
|
||||
&movdqa ("xmm4",&QWP(-0x20,$base)); # 4 : sb9u
|
||||
&pshufb ("xmm4","xmm2"); # 4 = sb9u
|
||||
&pxor ("xmm4","xmm0");
|
||||
&movdqa ("xmm0",&QWP(-0x10,$base)); # 0 : sb9t
|
||||
&pshufb ("xmm0","xmm3"); # 0 = sb9t
|
||||
&pxor ("xmm0","xmm4"); # 0 = ch
|
||||
&add ($key,16); # next round key
|
||||
|
||||
&pshufb ("xmm0","xmm5"); # MC ch
|
||||
&movdqa ("xmm4",&QWP(0,$base)); # 4 : sbdu
|
||||
&pshufb ("xmm4","xmm2"); # 4 = sbdu
|
||||
&pxor ("xmm4","xmm0"); # 4 = ch
|
||||
&movdqa ("xmm0",&QWP(0x10,$base)); # 0 : sbdt
|
||||
&pshufb ("xmm0","xmm3"); # 0 = sbdt
|
||||
&pxor ("xmm0","xmm4"); # 0 = ch
|
||||
&sub ($round,1); # nr--
|
||||
|
||||
&pshufb ("xmm0","xmm5"); # MC ch
|
||||
&movdqa ("xmm4",&QWP(0x20,$base)); # 4 : sbbu
|
||||
&pshufb ("xmm4","xmm2"); # 4 = sbbu
|
||||
&pxor ("xmm4","xmm0"); # 4 = ch
|
||||
&movdqa ("xmm0",&QWP(0x30,$base)); # 0 : sbbt
|
||||
&pshufb ("xmm0","xmm3"); # 0 = sbbt
|
||||
&pxor ("xmm0","xmm4"); # 0 = ch
|
||||
|
||||
&pshufb ("xmm0","xmm5"); # MC ch
|
||||
&movdqa ("xmm4",&QWP(0x40,$base)); # 4 : sbeu
|
||||
&pshufb ("xmm4","xmm2"); # 4 = sbeu
|
||||
&pxor ("xmm4","xmm0"); # 4 = ch
|
||||
&movdqa ("xmm0",&QWP(0x50,$base)); # 0 : sbet
|
||||
&pshufb ("xmm0","xmm3"); # 0 = sbet
|
||||
&pxor ("xmm0","xmm4"); # 0 = ch
|
||||
|
||||
&palignr("xmm5","xmm5",12);
|
||||
|
||||
&set_label("dec_entry");
|
||||
# top of round
|
||||
&movdqa ("xmm1","xmm6"); # 1 : i
|
||||
&pandn ("xmm1","xmm0"); # 1 = i<<4
|
||||
&psrld ("xmm1",4); # 1 = i
|
||||
&pand ("xmm0","xmm6"); # 0 = k
|
||||
&movdqa ("xmm2",&QWP($k_inv+16,$const));# 2 : a/k
|
||||
&pshufb ("xmm2","xmm0"); # 2 = a/k
|
||||
&pxor ("xmm0","xmm1"); # 0 = j
|
||||
&movdqa ("xmm3","xmm7"); # 3 : 1/i
|
||||
&pshufb ("xmm3","xmm1"); # 3 = 1/i
|
||||
&pxor ("xmm3","xmm2"); # 3 = iak = 1/i + a/k
|
||||
&movdqa ("xmm4","xmm7"); # 4 : 1/j
|
||||
&pshufb ("xmm4","xmm0"); # 4 = 1/j
|
||||
&pxor ("xmm4","xmm2"); # 4 = jak = 1/j + a/k
|
||||
&movdqa ("xmm2","xmm7"); # 2 : 1/iak
|
||||
&pshufb ("xmm2","xmm3"); # 2 = 1/iak
|
||||
&pxor ("xmm2","xmm0"); # 2 = io
|
||||
&movdqa ("xmm3","xmm7"); # 3 : 1/jak
|
||||
&pshufb ("xmm3","xmm4"); # 3 = 1/jak
|
||||
&pxor ("xmm3","xmm1"); # 3 = jo
|
||||
&movdqu ("xmm0",&QWP(0,$key));
|
||||
&jnz (&label("dec_loop"));
|
||||
|
||||
# middle of last round
|
||||
&movdqa ("xmm4",&QWP(0x60,$base)); # 3 : sbou
|
||||
&pshufb ("xmm4","xmm2"); # 4 = sbou
|
||||
&pxor ("xmm4","xmm0"); # 4 = sb1u + k
|
||||
&movdqa ("xmm0",&QWP(0x70,$base)); # 0 : sbot
|
||||
&movdqa ("xmm2",&QWP(0,$magic));
|
||||
&pshufb ("xmm0","xmm3"); # 0 = sb1t
|
||||
&pxor ("xmm0","xmm4"); # 0 = A
|
||||
&pshufb ("xmm0","xmm2");
|
||||
&ret ();
|
||||
&function_end_B("_vpaes_decrypt_core");
|
||||
|
||||
########################################################
|
||||
## ##
|
||||
## AES key schedule ##
|
||||
## ##
|
||||
########################################################
|
||||
&function_begin_B("_vpaes_schedule_core");
|
||||
&add ($const,&DWP(0,"esp"));
|
||||
&movdqu ("xmm0",&QWP(0,$inp)); # load key (unaligned)
|
||||
&movdqa ("xmm2",&QWP($k_rcon,$const)); # load rcon
|
||||
|
||||
# input transform
|
||||
&movdqa ("xmm3","xmm0");
|
||||
&lea ($base,&DWP($k_ipt,$const));
|
||||
&movdqa (&QWP(4,"esp"),"xmm2"); # xmm8
|
||||
&call ("_vpaes_schedule_transform");
|
||||
&movdqa ("xmm7","xmm0");
|
||||
|
||||
&test ($out,$out);
|
||||
&jnz (&label("schedule_am_decrypting"));
|
||||
|
||||
# encrypting, output zeroth round key after transform
|
||||
&movdqu (&QWP(0,$key),"xmm0");
|
||||
&jmp (&label("schedule_go"));
|
||||
|
||||
&set_label("schedule_am_decrypting");
|
||||
# decrypting, output zeroth round key after shiftrows
|
||||
&movdqa ("xmm1",&QWP($k_sr,$const,$magic));
|
||||
&pshufb ("xmm3","xmm1");
|
||||
&movdqu (&QWP(0,$key),"xmm3");
|
||||
&xor ($magic,0x30);
|
||||
|
||||
&set_label("schedule_go");
|
||||
&cmp ($round,192);
|
||||
&ja (&label("schedule_256"));
|
||||
&je (&label("schedule_192"));
|
||||
# 128: fall though
|
||||
|
||||
##
|
||||
## .schedule_128
|
||||
##
|
||||
## 128-bit specific part of key schedule.
|
||||
##
|
||||
## This schedule is really simple, because all its parts
|
||||
## are accomplished by the subroutines.
|
||||
##
|
||||
&set_label("schedule_128");
|
||||
&mov ($round,10);
|
||||
|
||||
&set_label("loop_schedule_128");
|
||||
&call ("_vpaes_schedule_round");
|
||||
&dec ($round);
|
||||
&jz (&label("schedule_mangle_last"));
|
||||
&call ("_vpaes_schedule_mangle"); # write output
|
||||
&jmp (&label("loop_schedule_128"));
|
||||
|
||||
##
|
||||
## .aes_schedule_192
|
||||
##
|
||||
## 192-bit specific part of key schedule.
|
||||
##
|
||||
## The main body of this schedule is the same as the 128-bit
|
||||
## schedule, but with more smearing. The long, high side is
|
||||
## stored in %xmm7 as before, and the short, low side is in
|
||||
## the high bits of %xmm6.
|
||||
##
|
||||
## This schedule is somewhat nastier, however, because each
|
||||
## round produces 192 bits of key material, or 1.5 round keys.
|
||||
## Therefore, on each cycle we do 2 rounds and produce 3 round
|
||||
## keys.
|
||||
##
|
||||
&set_label("schedule_192",16);
|
||||
&movdqu ("xmm0",&QWP(8,$inp)); # load key part 2 (very unaligned)
|
||||
&call ("_vpaes_schedule_transform"); # input transform
|
||||
&movdqa ("xmm6","xmm0"); # save short part
|
||||
&pxor ("xmm4","xmm4"); # clear 4
|
||||
&movhlps("xmm6","xmm4"); # clobber low side with zeros
|
||||
&mov ($round,4);
|
||||
|
||||
&set_label("loop_schedule_192");
|
||||
&call ("_vpaes_schedule_round");
|
||||
&palignr("xmm0","xmm6",8);
|
||||
&call ("_vpaes_schedule_mangle"); # save key n
|
||||
&call ("_vpaes_schedule_192_smear");
|
||||
&call ("_vpaes_schedule_mangle"); # save key n+1
|
||||
&call ("_vpaes_schedule_round");
|
||||
&dec ($round);
|
||||
&jz (&label("schedule_mangle_last"));
|
||||
&call ("_vpaes_schedule_mangle"); # save key n+2
|
||||
&call ("_vpaes_schedule_192_smear");
|
||||
&jmp (&label("loop_schedule_192"));
|
||||
|
||||
##
|
||||
## .aes_schedule_256
|
||||
##
|
||||
## 256-bit specific part of key schedule.
|
||||
##
|
||||
## The structure here is very similar to the 128-bit
|
||||
## schedule, but with an additional "low side" in
|
||||
## %xmm6. The low side's rounds are the same as the
|
||||
## high side's, except no rcon and no rotation.
|
||||
##
|
||||
&set_label("schedule_256",16);
|
||||
&movdqu ("xmm0",&QWP(16,$inp)); # load key part 2 (unaligned)
|
||||
&call ("_vpaes_schedule_transform"); # input transform
|
||||
&mov ($round,7);
|
||||
|
||||
&set_label("loop_schedule_256");
|
||||
&call ("_vpaes_schedule_mangle"); # output low result
|
||||
&movdqa ("xmm6","xmm0"); # save cur_lo in xmm6
|
||||
|
||||
# high round
|
||||
&call ("_vpaes_schedule_round");
|
||||
&dec ($round);
|
||||
&jz (&label("schedule_mangle_last"));
|
||||
&call ("_vpaes_schedule_mangle");
|
||||
|
||||
# low round. swap xmm7 and xmm6
|
||||
&pshufd ("xmm0","xmm0",0xFF);
|
||||
&movdqa (&QWP(20,"esp"),"xmm7");
|
||||
&movdqa ("xmm7","xmm6");
|
||||
&call ("_vpaes_schedule_low_round");
|
||||
&movdqa ("xmm7",&QWP(20,"esp"));
|
||||
|
||||
&jmp (&label("loop_schedule_256"));
|
||||
|
||||
##
|
||||
## .aes_schedule_mangle_last
|
||||
##
|
||||
## Mangler for last round of key schedule
|
||||
## Mangles %xmm0
|
||||
## when encrypting, outputs out(%xmm0) ^ 63
|
||||
## when decrypting, outputs unskew(%xmm0)
|
||||
##
|
||||
## Always called right before return... jumps to cleanup and exits
|
||||
##
|
||||
&set_label("schedule_mangle_last",16);
|
||||
# schedule last round key from xmm0
|
||||
&lea ($base,&DWP($k_deskew,$const));
|
||||
&test ($out,$out);
|
||||
&jnz (&label("schedule_mangle_last_dec"));
|
||||
|
||||
# encrypting
|
||||
&movdqa ("xmm1",&QWP($k_sr,$const,$magic));
|
||||
&pshufb ("xmm0","xmm1"); # output permute
|
||||
&lea ($base,&DWP($k_opt,$const)); # prepare to output transform
|
||||
&add ($key,32);
|
||||
|
||||
&set_label("schedule_mangle_last_dec");
|
||||
&add ($key,-16);
|
||||
&pxor ("xmm0",&QWP($k_s63,$const));
|
||||
&call ("_vpaes_schedule_transform"); # output transform
|
||||
&movdqu (&QWP(0,$key),"xmm0"); # save last key
|
||||
|
||||
# cleanup
|
||||
&pxor ("xmm0","xmm0");
|
||||
&pxor ("xmm1","xmm1");
|
||||
&pxor ("xmm2","xmm2");
|
||||
&pxor ("xmm3","xmm3");
|
||||
&pxor ("xmm4","xmm4");
|
||||
&pxor ("xmm5","xmm5");
|
||||
&pxor ("xmm6","xmm6");
|
||||
&pxor ("xmm7","xmm7");
|
||||
&ret ();
|
||||
&function_end_B("_vpaes_schedule_core");
|
||||
|
||||
##
|
||||
## .aes_schedule_192_smear
|
||||
##
|
||||
## Smear the short, low side in the 192-bit key schedule.
|
||||
##
|
||||
## Inputs:
|
||||
## %xmm7: high side, b a x y
|
||||
## %xmm6: low side, d c 0 0
|
||||
## %xmm13: 0
|
||||
##
|
||||
## Outputs:
|
||||
## %xmm6: b+c+d b+c 0 0
|
||||
## %xmm0: b+c+d b+c b a
|
||||
##
|
||||
&function_begin_B("_vpaes_schedule_192_smear");
|
||||
&pshufd ("xmm0","xmm6",0x80); # d c 0 0 -> c 0 0 0
|
||||
&pxor ("xmm6","xmm0"); # -> c+d c 0 0
|
||||
&pshufd ("xmm0","xmm7",0xFE); # b a _ _ -> b b b a
|
||||
&pxor ("xmm6","xmm0"); # -> b+c+d b+c b a
|
||||
&movdqa ("xmm0","xmm6");
|
||||
&pxor ("xmm1","xmm1");
|
||||
&movhlps("xmm6","xmm1"); # clobber low side with zeros
|
||||
&ret ();
|
||||
&function_end_B("_vpaes_schedule_192_smear");
|
||||
|
||||
##
|
||||
## .aes_schedule_round
|
||||
##
|
||||
## Runs one main round of the key schedule on %xmm0, %xmm7
|
||||
##
|
||||
## Specifically, runs subbytes on the high dword of %xmm0
|
||||
## then rotates it by one byte and xors into the low dword of
|
||||
## %xmm7.
|
||||
##
|
||||
## Adds rcon from low byte of %xmm8, then rotates %xmm8 for
|
||||
## next rcon.
|
||||
##
|
||||
## Smears the dwords of %xmm7 by xoring the low into the
|
||||
## second low, result into third, result into highest.
|
||||
##
|
||||
## Returns results in %xmm7 = %xmm0.
|
||||
## Clobbers %xmm1-%xmm5.
|
||||
##
|
||||
&function_begin_B("_vpaes_schedule_round");
|
||||
# extract rcon from xmm8
|
||||
&movdqa ("xmm2",&QWP(8,"esp")); # xmm8
|
||||
&pxor ("xmm1","xmm1");
|
||||
&palignr("xmm1","xmm2",15);
|
||||
&palignr("xmm2","xmm2",15);
|
||||
&pxor ("xmm7","xmm1");
|
||||
|
||||
# rotate
|
||||
&pshufd ("xmm0","xmm0",0xFF);
|
||||
&palignr("xmm0","xmm0",1);
|
||||
|
||||
# fall through...
|
||||
&movdqa (&QWP(8,"esp"),"xmm2"); # xmm8
|
||||
|
||||
# low round: same as high round, but no rotation and no rcon.
|
||||
&set_label("_vpaes_schedule_low_round");
|
||||
# smear xmm7
|
||||
&movdqa ("xmm1","xmm7");
|
||||
&pslldq ("xmm7",4);
|
||||
&pxor ("xmm7","xmm1");
|
||||
&movdqa ("xmm1","xmm7");
|
||||
&pslldq ("xmm7",8);
|
||||
&pxor ("xmm7","xmm1");
|
||||
&pxor ("xmm7",&QWP($k_s63,$const));
|
||||
|
||||
# subbyte
|
||||
&movdqa ("xmm4",&QWP($k_s0F,$const));
|
||||
&movdqa ("xmm5",&QWP($k_inv,$const)); # 4 : 1/j
|
||||
&movdqa ("xmm1","xmm4");
|
||||
&pandn ("xmm1","xmm0");
|
||||
&psrld ("xmm1",4); # 1 = i
|
||||
&pand ("xmm0","xmm4"); # 0 = k
|
||||
&movdqa ("xmm2",&QWP($k_inv+16,$const));# 2 : a/k
|
||||
&pshufb ("xmm2","xmm0"); # 2 = a/k
|
||||
&pxor ("xmm0","xmm1"); # 0 = j
|
||||
&movdqa ("xmm3","xmm5"); # 3 : 1/i
|
||||
&pshufb ("xmm3","xmm1"); # 3 = 1/i
|
||||
&pxor ("xmm3","xmm2"); # 3 = iak = 1/i + a/k
|
||||
&movdqa ("xmm4","xmm5"); # 4 : 1/j
|
||||
&pshufb ("xmm4","xmm0"); # 4 = 1/j
|
||||
&pxor ("xmm4","xmm2"); # 4 = jak = 1/j + a/k
|
||||
&movdqa ("xmm2","xmm5"); # 2 : 1/iak
|
||||
&pshufb ("xmm2","xmm3"); # 2 = 1/iak
|
||||
&pxor ("xmm2","xmm0"); # 2 = io
|
||||
&movdqa ("xmm3","xmm5"); # 3 : 1/jak
|
||||
&pshufb ("xmm3","xmm4"); # 3 = 1/jak
|
||||
&pxor ("xmm3","xmm1"); # 3 = jo
|
||||
&movdqa ("xmm4",&QWP($k_sb1,$const)); # 4 : sbou
|
||||
&pshufb ("xmm4","xmm2"); # 4 = sbou
|
||||
&movdqa ("xmm0",&QWP($k_sb1+16,$const));# 0 : sbot
|
||||
&pshufb ("xmm0","xmm3"); # 0 = sb1t
|
||||
&pxor ("xmm0","xmm4"); # 0 = sbox output
|
||||
|
||||
# add in smeared stuff
|
||||
&pxor ("xmm0","xmm7");
|
||||
&movdqa ("xmm7","xmm0");
|
||||
&ret ();
|
||||
&function_end_B("_vpaes_schedule_round");
|
||||
|
||||
##
|
||||
## .aes_schedule_transform
|
||||
##
|
||||
## Linear-transform %xmm0 according to tables at (%ebx)
|
||||
##
|
||||
## Output in %xmm0
|
||||
## Clobbers %xmm1, %xmm2
|
||||
##
|
||||
&function_begin_B("_vpaes_schedule_transform");
|
||||
&movdqa ("xmm2",&QWP($k_s0F,$const));
|
||||
&movdqa ("xmm1","xmm2");
|
||||
&pandn ("xmm1","xmm0");
|
||||
&psrld ("xmm1",4);
|
||||
&pand ("xmm0","xmm2");
|
||||
&movdqa ("xmm2",&QWP(0,$base));
|
||||
&pshufb ("xmm2","xmm0");
|
||||
&movdqa ("xmm0",&QWP(16,$base));
|
||||
&pshufb ("xmm0","xmm1");
|
||||
&pxor ("xmm0","xmm2");
|
||||
&ret ();
|
||||
&function_end_B("_vpaes_schedule_transform");
|
||||
|
||||
##
|
||||
## .aes_schedule_mangle
|
||||
##
|
||||
## Mangle xmm0 from (basis-transformed) standard version
|
||||
## to our version.
|
||||
##
|
||||
## On encrypt,
|
||||
## xor with 0x63
|
||||
## multiply by circulant 0,1,1,1
|
||||
## apply shiftrows transform
|
||||
##
|
||||
## On decrypt,
|
||||
## xor with 0x63
|
||||
## multiply by "inverse mixcolumns" circulant E,B,D,9
|
||||
## deskew
|
||||
## apply shiftrows transform
|
||||
##
|
||||
##
|
||||
## Writes out to (%edx), and increments or decrements it
|
||||
## Keeps track of round number mod 4 in %ecx
|
||||
## Preserves xmm0
|
||||
## Clobbers xmm1-xmm5
|
||||
##
|
||||
&function_begin_B("_vpaes_schedule_mangle");
|
||||
&movdqa ("xmm4","xmm0"); # save xmm0 for later
|
||||
&movdqa ("xmm5",&QWP($k_mc_forward,$const));
|
||||
&test ($out,$out);
|
||||
&jnz (&label("schedule_mangle_dec"));
|
||||
|
||||
# encrypting
|
||||
&add ($key,16);
|
||||
&pxor ("xmm4",&QWP($k_s63,$const));
|
||||
&pshufb ("xmm4","xmm5");
|
||||
&movdqa ("xmm3","xmm4");
|
||||
&pshufb ("xmm4","xmm5");
|
||||
&pxor ("xmm3","xmm4");
|
||||
&pshufb ("xmm4","xmm5");
|
||||
&pxor ("xmm3","xmm4");
|
||||
|
||||
&jmp (&label("schedule_mangle_both"));
|
||||
|
||||
&set_label("schedule_mangle_dec",16);
|
||||
# inverse mix columns
|
||||
&movdqa ("xmm2",&QWP($k_s0F,$const));
|
||||
&lea ($inp,&DWP($k_dksd,$const));
|
||||
&movdqa ("xmm1","xmm2");
|
||||
&pandn ("xmm1","xmm4");
|
||||
&psrld ("xmm1",4); # 1 = hi
|
||||
&pand ("xmm4","xmm2"); # 4 = lo
|
||||
|
||||
&movdqa ("xmm2",&QWP(0,$inp));
|
||||
&pshufb ("xmm2","xmm4");
|
||||
&movdqa ("xmm3",&QWP(0x10,$inp));
|
||||
&pshufb ("xmm3","xmm1");
|
||||
&pxor ("xmm3","xmm2");
|
||||
&pshufb ("xmm3","xmm5");
|
||||
|
||||
&movdqa ("xmm2",&QWP(0x20,$inp));
|
||||
&pshufb ("xmm2","xmm4");
|
||||
&pxor ("xmm2","xmm3");
|
||||
&movdqa ("xmm3",&QWP(0x30,$inp));
|
||||
&pshufb ("xmm3","xmm1");
|
||||
&pxor ("xmm3","xmm2");
|
||||
&pshufb ("xmm3","xmm5");
|
||||
|
||||
&movdqa ("xmm2",&QWP(0x40,$inp));
|
||||
&pshufb ("xmm2","xmm4");
|
||||
&pxor ("xmm2","xmm3");
|
||||
&movdqa ("xmm3",&QWP(0x50,$inp));
|
||||
&pshufb ("xmm3","xmm1");
|
||||
&pxor ("xmm3","xmm2");
|
||||
&pshufb ("xmm3","xmm5");
|
||||
|
||||
&movdqa ("xmm2",&QWP(0x60,$inp));
|
||||
&pshufb ("xmm2","xmm4");
|
||||
&pxor ("xmm2","xmm3");
|
||||
&movdqa ("xmm3",&QWP(0x70,$inp));
|
||||
&pshufb ("xmm3","xmm1");
|
||||
&pxor ("xmm3","xmm2");
|
||||
|
||||
&add ($key,-16);
|
||||
|
||||
&set_label("schedule_mangle_both");
|
||||
&movdqa ("xmm1",&QWP($k_sr,$const,$magic));
|
||||
&pshufb ("xmm3","xmm1");
|
||||
&add ($magic,-16);
|
||||
&and ($magic,0x30);
|
||||
&movdqu (&QWP(0,$key),"xmm3");
|
||||
&ret ();
|
||||
&function_end_B("_vpaes_schedule_mangle");
|
||||
|
||||
#
|
||||
# Interface to OpenSSL
|
||||
#
|
||||
&function_begin("${PREFIX}_set_encrypt_key");
|
||||
&mov ($inp,&wparam(0)); # inp
|
||||
&lea ($base,&DWP(-56,"esp"));
|
||||
&mov ($round,&wparam(1)); # bits
|
||||
&and ($base,-16);
|
||||
&mov ($key,&wparam(2)); # key
|
||||
&xchg ($base,"esp"); # alloca
|
||||
&mov (&DWP(48,"esp"),$base);
|
||||
|
||||
&mov ($base,$round);
|
||||
&shr ($base,5);
|
||||
&add ($base,5);
|
||||
&mov (&DWP(240,$key),$base); # AES_KEY->rounds = nbits/32+5;
|
||||
&mov ($magic,0x30);
|
||||
&mov ($out,0);
|
||||
|
||||
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
|
||||
&call ("_vpaes_schedule_core");
|
||||
&set_label("pic_point");
|
||||
|
||||
&mov ("esp",&DWP(48,"esp"));
|
||||
&xor ("eax","eax");
|
||||
&function_end("${PREFIX}_set_encrypt_key");
|
||||
|
||||
&function_begin("${PREFIX}_set_decrypt_key");
|
||||
&mov ($inp,&wparam(0)); # inp
|
||||
&lea ($base,&DWP(-56,"esp"));
|
||||
&mov ($round,&wparam(1)); # bits
|
||||
&and ($base,-16);
|
||||
&mov ($key,&wparam(2)); # key
|
||||
&xchg ($base,"esp"); # alloca
|
||||
&mov (&DWP(48,"esp"),$base);
|
||||
|
||||
&mov ($base,$round);
|
||||
&shr ($base,5);
|
||||
&add ($base,5);
|
||||
&mov (&DWP(240,$key),$base); # AES_KEY->rounds = nbits/32+5;
|
||||
&shl ($base,4);
|
||||
&lea ($key,&DWP(16,$key,$base));
|
||||
|
||||
&mov ($out,1);
|
||||
&mov ($magic,$round);
|
||||
&shr ($magic,1);
|
||||
&and ($magic,32);
|
||||
&xor ($magic,32); # nbist==192?0:32;
|
||||
|
||||
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
|
||||
&call ("_vpaes_schedule_core");
|
||||
&set_label("pic_point");
|
||||
|
||||
&mov ("esp",&DWP(48,"esp"));
|
||||
&xor ("eax","eax");
|
||||
&function_end("${PREFIX}_set_decrypt_key");
|
||||
|
||||
&function_begin("${PREFIX}_encrypt");
|
||||
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
|
||||
&call ("_vpaes_preheat");
|
||||
&set_label("pic_point");
|
||||
&mov ($inp,&wparam(0)); # inp
|
||||
&lea ($base,&DWP(-56,"esp"));
|
||||
&mov ($out,&wparam(1)); # out
|
||||
&and ($base,-16);
|
||||
&mov ($key,&wparam(2)); # key
|
||||
&xchg ($base,"esp"); # alloca
|
||||
&mov (&DWP(48,"esp"),$base);
|
||||
|
||||
&movdqu ("xmm0",&QWP(0,$inp));
|
||||
&call ("_vpaes_encrypt_core");
|
||||
&movdqu (&QWP(0,$out),"xmm0");
|
||||
|
||||
&mov ("esp",&DWP(48,"esp"));
|
||||
&function_end("${PREFIX}_encrypt");
|
||||
|
||||
&function_begin("${PREFIX}_decrypt");
|
||||
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
|
||||
&call ("_vpaes_preheat");
|
||||
&set_label("pic_point");
|
||||
&mov ($inp,&wparam(0)); # inp
|
||||
&lea ($base,&DWP(-56,"esp"));
|
||||
&mov ($out,&wparam(1)); # out
|
||||
&and ($base,-16);
|
||||
&mov ($key,&wparam(2)); # key
|
||||
&xchg ($base,"esp"); # alloca
|
||||
&mov (&DWP(48,"esp"),$base);
|
||||
|
||||
&movdqu ("xmm0",&QWP(0,$inp));
|
||||
&call ("_vpaes_decrypt_core");
|
||||
&movdqu (&QWP(0,$out),"xmm0");
|
||||
|
||||
&mov ("esp",&DWP(48,"esp"));
|
||||
&function_end("${PREFIX}_decrypt");
|
||||
|
||||
&function_begin("${PREFIX}_cbc_encrypt");
|
||||
&mov ($inp,&wparam(0)); # inp
|
||||
&mov ($out,&wparam(1)); # out
|
||||
&mov ($round,&wparam(2)); # len
|
||||
&mov ($key,&wparam(3)); # key
|
||||
&sub ($round,16);
|
||||
&jc (&label("cbc_abort"));
|
||||
&lea ($base,&DWP(-56,"esp"));
|
||||
&mov ($const,&wparam(4)); # ivp
|
||||
&and ($base,-16);
|
||||
&mov ($magic,&wparam(5)); # enc
|
||||
&xchg ($base,"esp"); # alloca
|
||||
&movdqu ("xmm1",&QWP(0,$const)); # load IV
|
||||
&sub ($out,$inp);
|
||||
&mov (&DWP(48,"esp"),$base);
|
||||
|
||||
&mov (&DWP(0,"esp"),$out); # save out
|
||||
&mov (&DWP(4,"esp"),$key) # save key
|
||||
&mov (&DWP(8,"esp"),$const); # save ivp
|
||||
&mov ($out,$round); # $out works as $len
|
||||
|
||||
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
|
||||
&call ("_vpaes_preheat");
|
||||
&set_label("pic_point");
|
||||
&cmp ($magic,0);
|
||||
&je (&label("cbc_dec_loop"));
|
||||
&jmp (&label("cbc_enc_loop"));
|
||||
|
||||
&set_label("cbc_enc_loop",16);
|
||||
&movdqu ("xmm0",&QWP(0,$inp)); # load input
|
||||
&pxor ("xmm0","xmm1"); # inp^=iv
|
||||
&call ("_vpaes_encrypt_core");
|
||||
&mov ($base,&DWP(0,"esp")); # restore out
|
||||
&mov ($key,&DWP(4,"esp")); # restore key
|
||||
&movdqa ("xmm1","xmm0");
|
||||
&movdqu (&QWP(0,$base,$inp),"xmm0"); # write output
|
||||
&lea ($inp,&DWP(16,$inp));
|
||||
&sub ($out,16);
|
||||
&jnc (&label("cbc_enc_loop"));
|
||||
&jmp (&label("cbc_done"));
|
||||
|
||||
&set_label("cbc_dec_loop",16);
|
||||
&movdqu ("xmm0",&QWP(0,$inp)); # load input
|
||||
&movdqa (&QWP(16,"esp"),"xmm1"); # save IV
|
||||
&movdqa (&QWP(32,"esp"),"xmm0"); # save future IV
|
||||
&call ("_vpaes_decrypt_core");
|
||||
&mov ($base,&DWP(0,"esp")); # restore out
|
||||
&mov ($key,&DWP(4,"esp")); # restore key
|
||||
&pxor ("xmm0",&QWP(16,"esp")); # out^=iv
|
||||
&movdqa ("xmm1",&QWP(32,"esp")); # load next IV
|
||||
&movdqu (&QWP(0,$base,$inp),"xmm0"); # write output
|
||||
&lea ($inp,&DWP(16,$inp));
|
||||
&sub ($out,16);
|
||||
&jnc (&label("cbc_dec_loop"));
|
||||
|
||||
&set_label("cbc_done");
|
||||
&mov ($base,&DWP(8,"esp")); # restore ivp
|
||||
&mov ("esp",&DWP(48,"esp"));
|
||||
&movdqu (&QWP(0,$base),"xmm1"); # write IV
|
||||
&set_label("cbc_abort");
|
||||
&function_end("${PREFIX}_cbc_encrypt");
|
||||
|
||||
&asm_finish();
|
||||
1207
crypto/aes/asm/vpaes-x86_64.pl
Normal file
1207
crypto/aes/asm/vpaes-x86_64.pl
Normal file
File diff suppressed because it is too large
Load Diff
51
crypto/arm_arch.h
Normal file
51
crypto/arm_arch.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef __ARM_ARCH_H__
|
||||
#define __ARM_ARCH_H__
|
||||
|
||||
#if !defined(__ARM_ARCH__)
|
||||
# if defined(__CC_ARM)
|
||||
# define __ARM_ARCH__ __TARGET_ARCH_ARM
|
||||
# if defined(__BIG_ENDIAN)
|
||||
# define __ARMEB__
|
||||
# else
|
||||
# define __ARMEL__
|
||||
# endif
|
||||
# elif defined(__GNUC__)
|
||||
/*
|
||||
* Why doesn't gcc define __ARM_ARCH__? Instead it defines
|
||||
* bunch of below macros. See all_architectires[] table in
|
||||
* gcc/config/arm/arm.c. On a side note it defines
|
||||
* __ARMEL__/__ARMEB__ for little-/big-endian.
|
||||
*/
|
||||
# if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
|
||||
defined(__ARM_ARCH_7R__)|| defined(__ARM_ARCH_7M__) || \
|
||||
defined(__ARM_ARCH_7EM__)
|
||||
# define __ARM_ARCH__ 7
|
||||
# elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
|
||||
defined(__ARM_ARCH_6K__)|| defined(__ARM_ARCH_6M__) || \
|
||||
defined(__ARM_ARCH_6Z__)|| defined(__ARM_ARCH_6ZK__) || \
|
||||
defined(__ARM_ARCH_6T2__)
|
||||
# define __ARM_ARCH__ 6
|
||||
# elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \
|
||||
defined(__ARM_ARCH_5E__)|| defined(__ARM_ARCH_5TE__) || \
|
||||
defined(__ARM_ARCH_5TEJ__)
|
||||
# define __ARM_ARCH__ 5
|
||||
# elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
|
||||
# define __ARM_ARCH__ 4
|
||||
# else
|
||||
# error "unsupported ARM architecture"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_FIPSCANISTER
|
||||
#include <openssl/fipssyms.h>
|
||||
#endif
|
||||
|
||||
#if !__ASSEMBLER__
|
||||
extern unsigned int OPENSSL_armcap_P;
|
||||
|
||||
#define ARMV7_NEON (1<<0)
|
||||
#define ARMV7_TICK (1<<1)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
80
crypto/armcap.c
Normal file
80
crypto/armcap.c
Normal file
@@ -0,0 +1,80 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include <crypto.h>
|
||||
|
||||
#include "arm_arch.h"
|
||||
|
||||
unsigned int OPENSSL_armcap_P;
|
||||
|
||||
static sigset_t all_masked;
|
||||
|
||||
static sigjmp_buf ill_jmp;
|
||||
static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); }
|
||||
|
||||
/*
|
||||
* Following subroutines could have been inlined, but it's not all
|
||||
* ARM compilers support inline assembler...
|
||||
*/
|
||||
void _armv7_neon_probe(void);
|
||||
unsigned int _armv7_tick(void);
|
||||
|
||||
unsigned int OPENSSL_rdtsc(void)
|
||||
{
|
||||
if (OPENSSL_armcap_P & ARMV7_TICK)
|
||||
return _armv7_tick();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__>=2
|
||||
void OPENSSL_cpuid_setup(void) __attribute__((constructor));
|
||||
#endif
|
||||
void OPENSSL_cpuid_setup(void)
|
||||
{
|
||||
char *e;
|
||||
struct sigaction ill_oact,ill_act;
|
||||
sigset_t oset;
|
||||
static int trigger=0;
|
||||
|
||||
if (trigger) return;
|
||||
trigger=1;
|
||||
|
||||
if ((e=getenv("OPENSSL_armcap")))
|
||||
{
|
||||
OPENSSL_armcap_P=strtoul(e,NULL,0);
|
||||
return;
|
||||
}
|
||||
|
||||
sigfillset(&all_masked);
|
||||
sigdelset(&all_masked,SIGILL);
|
||||
sigdelset(&all_masked,SIGTRAP);
|
||||
sigdelset(&all_masked,SIGFPE);
|
||||
sigdelset(&all_masked,SIGBUS);
|
||||
sigdelset(&all_masked,SIGSEGV);
|
||||
|
||||
OPENSSL_armcap_P = 0;
|
||||
|
||||
memset(&ill_act,0,sizeof(ill_act));
|
||||
ill_act.sa_handler = ill_handler;
|
||||
ill_act.sa_mask = all_masked;
|
||||
|
||||
sigprocmask(SIG_SETMASK,&ill_act.sa_mask,&oset);
|
||||
sigaction(SIGILL,&ill_act,&ill_oact);
|
||||
|
||||
if (sigsetjmp(ill_jmp,1) == 0)
|
||||
{
|
||||
_armv7_neon_probe();
|
||||
OPENSSL_armcap_P |= ARMV7_NEON;
|
||||
}
|
||||
if (sigsetjmp(ill_jmp,1) == 0)
|
||||
{
|
||||
_armv7_tick();
|
||||
OPENSSL_armcap_P |= ARMV7_TICK;
|
||||
}
|
||||
|
||||
sigaction (SIGILL,&ill_oact,NULL);
|
||||
sigprocmask(SIG_SETMASK,&oset,NULL);
|
||||
}
|
||||
154
crypto/armv4cpuid.S
Normal file
154
crypto/armv4cpuid.S
Normal file
@@ -0,0 +1,154 @@
|
||||
#include "arm_arch.h"
|
||||
|
||||
.text
|
||||
.code 32
|
||||
|
||||
.align 5
|
||||
.global _armv7_neon_probe
|
||||
.type _armv7_neon_probe,%function
|
||||
_armv7_neon_probe:
|
||||
.word 0xf26ee1fe @ vorr q15,q15,q15
|
||||
.word 0xe12fff1e @ bx lr
|
||||
.size _armv7_neon_probe,.-_armv7_neon_probe
|
||||
|
||||
.global _armv7_tick
|
||||
.type _armv7_tick,%function
|
||||
_armv7_tick:
|
||||
mrc p15,0,r0,c9,c13,0
|
||||
.word 0xe12fff1e @ bx lr
|
||||
.size _armv7_tick,.-_armv7_tick
|
||||
|
||||
.global OPENSSL_atomic_add
|
||||
.type OPENSSL_atomic_add,%function
|
||||
OPENSSL_atomic_add:
|
||||
#if __ARM_ARCH__>=6
|
||||
.Ladd: ldrex r2,[r0]
|
||||
add r3,r2,r1
|
||||
strex r2,r3,[r0]
|
||||
cmp r2,#0
|
||||
bne .Ladd
|
||||
mov r0,r3
|
||||
.word 0xe12fff1e @ bx lr
|
||||
#else
|
||||
stmdb sp!,{r4-r6,lr}
|
||||
ldr r2,.Lspinlock
|
||||
adr r3,.Lspinlock
|
||||
mov r4,r0
|
||||
mov r5,r1
|
||||
add r6,r3,r2 @ &spinlock
|
||||
b .+8
|
||||
.Lspin: bl sched_yield
|
||||
mov r0,#-1
|
||||
swp r0,r0,[r6]
|
||||
cmp r0,#0
|
||||
bne .Lspin
|
||||
|
||||
ldr r2,[r4]
|
||||
add r2,r2,r5
|
||||
str r2,[r4]
|
||||
str r0,[r6] @ release spinlock
|
||||
ldmia sp!,{r4-r6,lr}
|
||||
tst lr,#1
|
||||
moveq pc,lr
|
||||
.word 0xe12fff1e @ bx lr
|
||||
#endif
|
||||
.size OPENSSL_atomic_add,.-OPENSSL_atomic_add
|
||||
|
||||
.global OPENSSL_cleanse
|
||||
.type OPENSSL_cleanse,%function
|
||||
OPENSSL_cleanse:
|
||||
eor ip,ip,ip
|
||||
cmp r1,#7
|
||||
subhs r1,r1,#4
|
||||
bhs .Lot
|
||||
cmp r1,#0
|
||||
beq .Lcleanse_done
|
||||
.Little:
|
||||
strb ip,[r0],#1
|
||||
subs r1,r1,#1
|
||||
bhi .Little
|
||||
b .Lcleanse_done
|
||||
|
||||
.Lot: tst r0,#3
|
||||
beq .Laligned
|
||||
strb ip,[r0],#1
|
||||
sub r1,r1,#1
|
||||
b .Lot
|
||||
.Laligned:
|
||||
str ip,[r0],#4
|
||||
subs r1,r1,#4
|
||||
bhs .Laligned
|
||||
adds r1,r1,#4
|
||||
bne .Little
|
||||
.Lcleanse_done:
|
||||
tst lr,#1
|
||||
moveq pc,lr
|
||||
.word 0xe12fff1e @ bx lr
|
||||
.size OPENSSL_cleanse,.-OPENSSL_cleanse
|
||||
|
||||
.global OPENSSL_wipe_cpu
|
||||
.type OPENSSL_wipe_cpu,%function
|
||||
OPENSSL_wipe_cpu:
|
||||
ldr r0,.LOPENSSL_armcap
|
||||
adr r1,.LOPENSSL_armcap
|
||||
ldr r0,[r1,r0]
|
||||
eor r2,r2,r2
|
||||
eor r3,r3,r3
|
||||
eor ip,ip,ip
|
||||
tst r0,#1
|
||||
beq .Lwipe_done
|
||||
.word 0xf3000150 @ veor q0, q0, q0
|
||||
.word 0xf3022152 @ veor q1, q1, q1
|
||||
.word 0xf3044154 @ veor q2, q2, q2
|
||||
.word 0xf3066156 @ veor q3, q3, q3
|
||||
.word 0xf34001f0 @ veor q8, q8, q8
|
||||
.word 0xf34221f2 @ veor q9, q9, q9
|
||||
.word 0xf34441f4 @ veor q10, q10, q10
|
||||
.word 0xf34661f6 @ veor q11, q11, q11
|
||||
.word 0xf34881f8 @ veor q12, q12, q12
|
||||
.word 0xf34aa1fa @ veor q13, q13, q13
|
||||
.word 0xf34cc1fc @ veor q14, q14, q14
|
||||
.word 0xf34ee1fe @ veor q15, q15, q15
|
||||
.Lwipe_done:
|
||||
mov r0,sp
|
||||
tst lr,#1
|
||||
moveq pc,lr
|
||||
.word 0xe12fff1e @ bx lr
|
||||
.size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
|
||||
|
||||
.global OPENSSL_instrument_bus
|
||||
.type OPENSSL_instrument_bus,%function
|
||||
OPENSSL_instrument_bus:
|
||||
eor r0,r0,r0
|
||||
tst lr,#1
|
||||
moveq pc,lr
|
||||
.word 0xe12fff1e @ bx lr
|
||||
.size OPENSSL_instrument_bus,.-OPENSSL_instrument_bus
|
||||
|
||||
.global OPENSSL_instrument_bus2
|
||||
.type OPENSSL_instrument_bus2,%function
|
||||
OPENSSL_instrument_bus2:
|
||||
eor r0,r0,r0
|
||||
tst lr,#1
|
||||
moveq pc,lr
|
||||
.word 0xe12fff1e @ bx lr
|
||||
.size OPENSSL_instrument_bus2,.-OPENSSL_instrument_bus2
|
||||
|
||||
.align 5
|
||||
.LOPENSSL_armcap:
|
||||
.word OPENSSL_armcap_P-.LOPENSSL_armcap
|
||||
#if __ARM_ARCH__>=6
|
||||
.align 5
|
||||
#else
|
||||
.Lspinlock:
|
||||
.word atomic_add_spinlock-.Lspinlock
|
||||
.align 5
|
||||
|
||||
.data
|
||||
.align 2
|
||||
atomic_add_spinlock:
|
||||
.word 0
|
||||
#endif
|
||||
|
||||
.comm OPENSSL_armcap_P,4,4
|
||||
.hidden OPENSSL_armcap_P
|
||||
@@ -639,7 +639,7 @@ t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
t_x509.o: ../cryptlib.h t_x509.c
|
||||
t_x509.o: ../cryptlib.h asn1_locl.h t_x509.c
|
||||
t_x509a.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
|
||||
@@ -136,11 +136,16 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
|
||||
|
||||
p= *pp;
|
||||
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
|
||||
* the settings, via the _set_bit function, we will recalculate
|
||||
* on output */
|
||||
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 */
|
||||
{
|
||||
|
||||
@@ -87,7 +87,8 @@ int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
|
||||
p=str;
|
||||
i2d(data,&p);
|
||||
|
||||
EVP_Digest(str, i, md, len, type, NULL);
|
||||
if (!EVP_Digest(str, i, md, len, type, NULL))
|
||||
return 0;
|
||||
OPENSSL_free(str);
|
||||
return(1);
|
||||
}
|
||||
@@ -104,7 +105,8 @@ int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn,
|
||||
i=ASN1_item_i2d(asn,&str, it);
|
||||
if (!str) return(0);
|
||||
|
||||
EVP_Digest(str, i, md, len, type, NULL);
|
||||
if (!EVP_Digest(str, i, md, len, type, NULL))
|
||||
return 0;
|
||||
OPENSSL_free(str);
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -184,9 +184,9 @@ int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
||||
p=buf_in;
|
||||
|
||||
i2d(data,&p);
|
||||
EVP_SignInit_ex(&ctx,type, NULL);
|
||||
EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl);
|
||||
if (!EVP_SignFinal(&ctx,(unsigned char *)buf_out,
|
||||
if (!EVP_SignInit_ex(&ctx,type, NULL)
|
||||
|| !EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl)
|
||||
|| !EVP_SignFinal(&ctx,(unsigned char *)buf_out,
|
||||
(unsigned int *)&outl,pkey))
|
||||
{
|
||||
outl=0;
|
||||
@@ -218,65 +218,100 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
||||
const EVP_MD *type)
|
||||
{
|
||||
EVP_MD_CTX ctx;
|
||||
unsigned char *buf_in=NULL,*buf_out=NULL;
|
||||
int inl=0,outl=0,outll=0;
|
||||
int signid, paramtype;
|
||||
|
||||
if (type == NULL)
|
||||
EVP_MD_CTX_init(&ctx);
|
||||
if (!EVP_DigestSignInit(&ctx, NULL, type, NULL, pkey))
|
||||
{
|
||||
int def_nid;
|
||||
if (EVP_PKEY_get_default_digest_nid(pkey, &def_nid) > 0)
|
||||
type = EVP_get_digestbynid(def_nid);
|
||||
EVP_MD_CTX_cleanup(&ctx);
|
||||
return 0;
|
||||
}
|
||||
return ASN1_item_sign_ctx(it, algor1, algor2, signature, asn, &ctx);
|
||||
}
|
||||
|
||||
|
||||
if (type == NULL)
|
||||
int ASN1_item_sign_ctx(const ASN1_ITEM *it,
|
||||
X509_ALGOR *algor1, X509_ALGOR *algor2,
|
||||
ASN1_BIT_STRING *signature, void *asn, EVP_MD_CTX *ctx)
|
||||
{
|
||||
const EVP_MD *type;
|
||||
EVP_PKEY *pkey;
|
||||
unsigned char *buf_in=NULL,*buf_out=NULL;
|
||||
size_t inl=0,outl=0,outll=0;
|
||||
int signid, paramtype;
|
||||
int rv;
|
||||
|
||||
type = EVP_MD_CTX_md(ctx);
|
||||
pkey = EVP_PKEY_CTX_get0_pkey(ctx->pctx);
|
||||
|
||||
if (!type || !pkey)
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_SIGN, ASN1_R_NO_DEFAULT_DIGEST);
|
||||
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_CONTEXT_NOT_INITIALISED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (type->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE)
|
||||
if (pkey->ameth->item_sign)
|
||||
{
|
||||
if (!pkey->ameth ||
|
||||
!OBJ_find_sigid_by_algs(&signid, EVP_MD_nid(type),
|
||||
pkey->ameth->pkey_id))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_SIGN,
|
||||
ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED);
|
||||
return 0;
|
||||
}
|
||||
rv = pkey->ameth->item_sign(ctx, it, asn, algor1, algor2,
|
||||
signature);
|
||||
if (rv == 1)
|
||||
outl = signature->length;
|
||||
/* Return value meanings:
|
||||
* <=0: error.
|
||||
* 1: method does everything.
|
||||
* 2: carry on as normal.
|
||||
* 3: ASN1 method sets algorithm identifiers: just sign.
|
||||
*/
|
||||
if (rv <= 0)
|
||||
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ERR_R_EVP_LIB);
|
||||
if (rv <= 1)
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
signid = type->pkey_type;
|
||||
rv = 2;
|
||||
|
||||
if (pkey->ameth->pkey_flags & ASN1_PKEY_SIGPARAM_NULL)
|
||||
paramtype = V_ASN1_NULL;
|
||||
else
|
||||
paramtype = V_ASN1_UNDEF;
|
||||
if (rv == 2)
|
||||
{
|
||||
if (type->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE)
|
||||
{
|
||||
if (!pkey->ameth ||
|
||||
!OBJ_find_sigid_by_algs(&signid,
|
||||
EVP_MD_nid(type),
|
||||
pkey->ameth->pkey_id))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,
|
||||
ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
signid = type->pkey_type;
|
||||
|
||||
if (algor1)
|
||||
X509_ALGOR_set0(algor1, OBJ_nid2obj(signid), paramtype, NULL);
|
||||
if (algor2)
|
||||
X509_ALGOR_set0(algor2, OBJ_nid2obj(signid), paramtype, NULL);
|
||||
if (pkey->ameth->pkey_flags & ASN1_PKEY_SIGPARAM_NULL)
|
||||
paramtype = V_ASN1_NULL;
|
||||
else
|
||||
paramtype = V_ASN1_UNDEF;
|
||||
|
||||
if (algor1)
|
||||
X509_ALGOR_set0(algor1, OBJ_nid2obj(signid), paramtype, NULL);
|
||||
if (algor2)
|
||||
X509_ALGOR_set0(algor2, OBJ_nid2obj(signid), paramtype, NULL);
|
||||
|
||||
}
|
||||
|
||||
EVP_MD_CTX_init(&ctx);
|
||||
inl=ASN1_item_i2d(asn,&buf_in, it);
|
||||
outll=outl=EVP_PKEY_size(pkey);
|
||||
buf_out=(unsigned char *)OPENSSL_malloc((unsigned int)outl);
|
||||
buf_out=OPENSSL_malloc((unsigned int)outl);
|
||||
if ((buf_in == NULL) || (buf_out == NULL))
|
||||
{
|
||||
outl=0;
|
||||
ASN1err(ASN1_F_ASN1_ITEM_SIGN,ERR_R_MALLOC_FAILURE);
|
||||
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
|
||||
EVP_SignInit_ex(&ctx,type, NULL);
|
||||
EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl);
|
||||
if (!EVP_SignFinal(&ctx,(unsigned char *)buf_out,
|
||||
(unsigned int *)&outl,pkey))
|
||||
if (!EVP_DigestSignUpdate(ctx, buf_in, inl)
|
||||
|| !EVP_DigestSignFinal(ctx, buf_out, &outl))
|
||||
{
|
||||
outl=0;
|
||||
ASN1err(ASN1_F_ASN1_ITEM_SIGN,ERR_R_EVP_LIB);
|
||||
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,ERR_R_EVP_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (signature->data != NULL) OPENSSL_free(signature->data);
|
||||
@@ -289,7 +324,7 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
|
||||
signature->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07);
|
||||
signature->flags|=ASN1_STRING_FLAG_BITS_LEFT;
|
||||
err:
|
||||
EVP_MD_CTX_cleanup(&ctx);
|
||||
EVP_MD_CTX_cleanup(ctx);
|
||||
if (buf_in != NULL)
|
||||
{ OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
|
||||
if (buf_out != NULL)
|
||||
|
||||
@@ -568,6 +568,7 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
||||
mbflag |= MBSTRING_FLAG;
|
||||
stmp.data = NULL;
|
||||
stmp.length = 0;
|
||||
stmp.flags = 0;
|
||||
ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
|
||||
if(ret < 0) return ret;
|
||||
*out = stmp.data;
|
||||
|
||||
@@ -113,7 +113,7 @@ IMPLEMENT_STACK_OF(ASN1_TYPE)
|
||||
IMPLEMENT_ASN1_SET_OF(ASN1_TYPE)
|
||||
|
||||
/* 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;
|
||||
|
||||
|
||||
@@ -270,6 +270,11 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
||||
t -= offset*60; /* FIXME: may overflow in extreme cases */
|
||||
|
||||
tm = OPENSSL_gmtime(&t, &data);
|
||||
/* NB: -1, 0, 1 already valid return values so use -2 to
|
||||
* indicate error.
|
||||
*/
|
||||
if (tm == NULL)
|
||||
return -2;
|
||||
|
||||
#define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
|
||||
year = g2(s->data);
|
||||
|
||||
@@ -90,6 +90,12 @@ int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature,
|
||||
ASN1err(ASN1_F_ASN1_VERIFY,ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM);
|
||||
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);
|
||||
buf_in=OPENSSL_malloc((unsigned int)inl);
|
||||
@@ -101,8 +107,13 @@ int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature,
|
||||
p=buf_in;
|
||||
|
||||
i2d(data,&p);
|
||||
EVP_VerifyInit_ex(&ctx,type, NULL);
|
||||
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
|
||||
if (!EVP_VerifyInit_ex(&ctx,type, NULL)
|
||||
|| !EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
|
||||
ret=0;
|
||||
goto err;
|
||||
}
|
||||
|
||||
OPENSSL_cleanse(buf_in,(unsigned int)inl);
|
||||
OPENSSL_free(buf_in);
|
||||
@@ -126,11 +137,10 @@ err:
|
||||
#endif
|
||||
|
||||
|
||||
int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signature,
|
||||
void *asn, EVP_PKEY *pkey)
|
||||
int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a,
|
||||
ASN1_BIT_STRING *signature, void *asn, EVP_PKEY *pkey)
|
||||
{
|
||||
EVP_MD_CTX ctx;
|
||||
const EVP_MD *type = NULL;
|
||||
unsigned char *buf_in=NULL;
|
||||
int ret= -1,inl;
|
||||
|
||||
@@ -142,6 +152,12 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
||||
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);
|
||||
|
||||
/* Convert signature OID into digest and public key OIDs */
|
||||
@@ -150,25 +166,47 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM);
|
||||
goto err;
|
||||
}
|
||||
type=EVP_get_digestbynid(mdnid);
|
||||
if (type == NULL)
|
||||
if (mdnid == NID_undef)
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM);
|
||||
goto err;
|
||||
if (!pkey->ameth || !pkey->ameth->item_verify)
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM);
|
||||
goto err;
|
||||
}
|
||||
ret = pkey->ameth->item_verify(&ctx, it, asn, a,
|
||||
signature, pkey);
|
||||
/* Return value of 2 means carry on, anything else means we
|
||||
* exit straight away: either a fatal error of the underlying
|
||||
* verification routine handles all verification.
|
||||
*/
|
||||
if (ret != 2)
|
||||
goto err;
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
/* Check public key OID matches public key type */
|
||||
if (EVP_PKEY_type(pknid) != pkey->ameth->pkey_id)
|
||||
else
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_WRONG_PUBLIC_KEY_TYPE);
|
||||
goto err;
|
||||
}
|
||||
const EVP_MD *type;
|
||||
type=EVP_get_digestbynid(mdnid);
|
||||
if (type == NULL)
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Check public key OID matches public key type */
|
||||
if (EVP_PKEY_type(pknid) != pkey->ameth->pkey_id)
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_WRONG_PUBLIC_KEY_TYPE);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!EVP_DigestVerifyInit(&ctx, NULL, type, NULL, pkey))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
|
||||
ret=0;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!EVP_VerifyInit_ex(&ctx,type, NULL))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
|
||||
ret=0;
|
||||
goto err;
|
||||
}
|
||||
|
||||
inl = ASN1_item_i2d(asn, &buf_in, it);
|
||||
@@ -179,13 +217,18 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
||||
goto err;
|
||||
}
|
||||
|
||||
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
|
||||
if (!EVP_DigestVerifyUpdate(&ctx,buf_in,inl))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
|
||||
ret=0;
|
||||
goto err;
|
||||
}
|
||||
|
||||
OPENSSL_cleanse(buf_in,(unsigned int)inl);
|
||||
OPENSSL_free(buf_in);
|
||||
|
||||
if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
|
||||
(unsigned int)signature->length,pkey) <= 0)
|
||||
if (EVP_DigestVerifyFinal(&ctx,signature->data,
|
||||
(size_t)signature->length) <= 0)
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
|
||||
ret=0;
|
||||
|
||||
@@ -69,6 +69,7 @@ extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[];
|
||||
extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth;
|
||||
extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth;
|
||||
extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth;
|
||||
extern const EVP_PKEY_ASN1_METHOD cmac_asn1_meth;
|
||||
|
||||
/* Keep this sorted in type order !! */
|
||||
static const EVP_PKEY_ASN1_METHOD *standard_methods[] =
|
||||
@@ -90,7 +91,8 @@ static const EVP_PKEY_ASN1_METHOD *standard_methods[] =
|
||||
#ifndef OPENSSL_NO_EC
|
||||
&eckey_asn1_meth,
|
||||
#endif
|
||||
&hmac_asn1_meth
|
||||
&hmac_asn1_meth,
|
||||
&cmac_asn1_meth
|
||||
};
|
||||
|
||||
typedef int sk_cmp_fn_type(const char * const *a, const char * const *b);
|
||||
@@ -296,6 +298,8 @@ EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags,
|
||||
if (!ameth)
|
||||
return NULL;
|
||||
|
||||
memset(ameth, 0, sizeof(EVP_PKEY_ASN1_METHOD));
|
||||
|
||||
ameth->pkey_id = id;
|
||||
ameth->pkey_base_id = id;
|
||||
ameth->pkey_flags = flags | ASN1_PKEY_DYNAMIC;
|
||||
@@ -330,6 +334,9 @@ EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags,
|
||||
ameth->old_priv_encode = 0;
|
||||
ameth->old_priv_decode = 0;
|
||||
|
||||
ameth->item_verify = 0;
|
||||
ameth->item_sign = 0;
|
||||
|
||||
ameth->pkey_size = 0;
|
||||
ameth->pkey_bits = 0;
|
||||
|
||||
@@ -381,6 +388,9 @@ void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
|
||||
dst->pkey_free = src->pkey_free;
|
||||
dst->pkey_ctrl = src->pkey_ctrl;
|
||||
|
||||
dst->item_sign = src->item_sign;
|
||||
dst->item_verify = src->item_verify;
|
||||
|
||||
}
|
||||
|
||||
void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth)
|
||||
|
||||
@@ -235,7 +235,7 @@ typedef struct asn1_object_st
|
||||
*/
|
||||
#define ASN1_STRING_FLAG_MSTRING 0x040
|
||||
/* This is the base type that holds just about everything :-) */
|
||||
typedef struct asn1_string_st
|
||||
struct asn1_string_st
|
||||
{
|
||||
int length;
|
||||
int type;
|
||||
@@ -245,7 +245,7 @@ typedef struct asn1_string_st
|
||||
* input data has a non-zero 'unused bits' value, it will be
|
||||
* handled correctly */
|
||||
long flags;
|
||||
} ASN1_STRING;
|
||||
};
|
||||
|
||||
/* ASN1_ENCODING structure: this is used to save the received
|
||||
* encoding of an ASN1 type. This is useful to get round
|
||||
@@ -293,7 +293,6 @@ DECLARE_STACK_OF(ASN1_STRING_TABLE)
|
||||
* see asn1t.h
|
||||
*/
|
||||
typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
|
||||
typedef struct ASN1_ITEM_st ASN1_ITEM;
|
||||
typedef struct ASN1_TLC_st ASN1_TLC;
|
||||
/* This is just an opaque pointer */
|
||||
typedef struct ASN1_VALUE_st ASN1_VALUE;
|
||||
@@ -777,7 +776,7 @@ DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
|
||||
int ASN1_TYPE_get(ASN1_TYPE *a);
|
||||
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_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 );
|
||||
void ASN1_OBJECT_free(ASN1_OBJECT *a);
|
||||
@@ -1194,6 +1193,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_F_ASN1_ITEM_I2D_FP 193
|
||||
#define ASN1_F_ASN1_ITEM_PACK 198
|
||||
#define ASN1_F_ASN1_ITEM_SIGN 195
|
||||
#define ASN1_F_ASN1_ITEM_SIGN_CTX 220
|
||||
#define ASN1_F_ASN1_ITEM_UNPACK 199
|
||||
#define ASN1_F_ASN1_ITEM_VERIFY 197
|
||||
#define ASN1_F_ASN1_MBSTRING_NCOPY 122
|
||||
@@ -1266,6 +1266,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_F_PKCS5_PBE2_SET_IV 167
|
||||
#define ASN1_F_PKCS5_PBE_SET 202
|
||||
#define ASN1_F_PKCS5_PBE_SET0_ALGOR 215
|
||||
#define ASN1_F_PKCS5_PBKDF2_SET 219
|
||||
#define ASN1_F_SMIME_READ_ASN1 212
|
||||
#define ASN1_F_SMIME_TEXT 213
|
||||
#define ASN1_F_X509_CINF_NEW 168
|
||||
@@ -1291,6 +1292,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106
|
||||
#define ASN1_R_BUFFER_TOO_SMALL 107
|
||||
#define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108
|
||||
#define ASN1_R_CONTEXT_NOT_INITIALISED 217
|
||||
#define ASN1_R_DATA_IS_WRONG 109
|
||||
#define ASN1_R_DECODE_ERROR 110
|
||||
#define ASN1_R_DECODING_ERROR 111
|
||||
@@ -1327,6 +1329,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_R_ILLEGAL_TIME_VALUE 184
|
||||
#define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185
|
||||
#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_DIGIT 130
|
||||
#define ASN1_R_INVALID_MIME_TYPE 205
|
||||
@@ -1376,6 +1379,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_R_TIME_NOT_ASCII_FORMAT 193
|
||||
#define ASN1_R_TOO_LONG 155
|
||||
#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_PRIVATE_KEY 158
|
||||
#define ASN1_R_UNEXPECTED_EOC 159
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -107,6 +107,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
|
||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_FP), "ASN1_item_i2d_fp"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_PACK), "ASN1_item_pack"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_SIGN), "ASN1_item_sign"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_SIGN_CTX), "ASN1_item_sign_ctx"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_UNPACK), "ASN1_item_unpack"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_ITEM_VERIFY), "ASN1_item_verify"},
|
||||
{ERR_FUNC(ASN1_F_ASN1_MBSTRING_NCOPY), "ASN1_mbstring_ncopy"},
|
||||
@@ -179,6 +180,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
|
||||
{ERR_FUNC(ASN1_F_PKCS5_PBE2_SET_IV), "PKCS5_pbe2_set_iv"},
|
||||
{ERR_FUNC(ASN1_F_PKCS5_PBE_SET), "PKCS5_pbe_set"},
|
||||
{ERR_FUNC(ASN1_F_PKCS5_PBE_SET0_ALGOR), "PKCS5_pbe_set0_algor"},
|
||||
{ERR_FUNC(ASN1_F_PKCS5_PBKDF2_SET), "PKCS5_pbkdf2_set"},
|
||||
{ERR_FUNC(ASN1_F_SMIME_READ_ASN1), "SMIME_read_ASN1"},
|
||||
{ERR_FUNC(ASN1_F_SMIME_TEXT), "SMIME_text"},
|
||||
{ERR_FUNC(ASN1_F_X509_CINF_NEW), "X509_CINF_NEW"},
|
||||
@@ -207,6 +209,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
|
||||
{ERR_REASON(ASN1_R_BOOLEAN_IS_WRONG_LENGTH),"boolean is wrong length"},
|
||||
{ERR_REASON(ASN1_R_BUFFER_TOO_SMALL) ,"buffer too small"},
|
||||
{ERR_REASON(ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER),"cipher has no object identifier"},
|
||||
{ERR_REASON(ASN1_R_CONTEXT_NOT_INITIALISED),"context not initialised"},
|
||||
{ERR_REASON(ASN1_R_DATA_IS_WRONG) ,"data is wrong"},
|
||||
{ERR_REASON(ASN1_R_DECODE_ERROR) ,"decode error"},
|
||||
{ERR_REASON(ASN1_R_DECODING_ERROR) ,"decoding error"},
|
||||
@@ -243,6 +246,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
|
||||
{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_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_DIGIT) ,"invalid digit"},
|
||||
{ERR_REASON(ASN1_R_INVALID_MIME_TYPE) ,"invalid mime type"},
|
||||
@@ -292,6 +296,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
|
||||
{ERR_REASON(ASN1_R_TIME_NOT_ASCII_FORMAT),"time not ascii format"},
|
||||
{ERR_REASON(ASN1_R_TOO_LONG) ,"too long"},
|
||||
{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_PRIVATE_KEY),"unable to decode rsa private key"},
|
||||
{ERR_REASON(ASN1_R_UNEXPECTED_EOC) ,"unexpected eoc"},
|
||||
|
||||
@@ -102,6 +102,10 @@ struct evp_pkey_asn1_method_st
|
||||
int (*param_cmp)(const EVP_PKEY *a, const EVP_PKEY *b);
|
||||
int (*param_print)(BIO *out, const EVP_PKEY *pkey, int indent,
|
||||
ASN1_PCTX *pctx);
|
||||
int (*sig_print)(BIO *out,
|
||||
const X509_ALGOR *sigalg, const ASN1_STRING *sig,
|
||||
int indent, ASN1_PCTX *pctx);
|
||||
|
||||
|
||||
void (*pkey_free)(EVP_PKEY *pkey);
|
||||
int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2);
|
||||
@@ -111,6 +115,13 @@ struct evp_pkey_asn1_method_st
|
||||
int (*old_priv_decode)(EVP_PKEY *pkey,
|
||||
const unsigned char **pder, int derlen);
|
||||
int (*old_priv_encode)(const EVP_PKEY *pkey, unsigned char **pder);
|
||||
/* Custom ASN1 signature verification */
|
||||
int (*item_verify)(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
|
||||
X509_ALGOR *a, ASN1_BIT_STRING *sig,
|
||||
EVP_PKEY *pkey);
|
||||
int (*item_sign)(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
|
||||
X509_ALGOR *alg1, X509_ALGOR *alg2,
|
||||
ASN1_BIT_STRING *sig);
|
||||
|
||||
} /* EVP_PKEY_ASN1_METHOD */;
|
||||
|
||||
|
||||
@@ -129,6 +129,7 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp,
|
||||
unsigned char buf[256],*zz;
|
||||
unsigned char key[EVP_MAX_KEY_LENGTH];
|
||||
EVP_CIPHER_CTX ctx;
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
|
||||
if (a == NULL) return(0);
|
||||
|
||||
@@ -206,24 +207,28 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp,
|
||||
i = strlen((char *)buf);
|
||||
/* If the key is used for SGC the algorithm is modified a little. */
|
||||
if(sgckey) {
|
||||
EVP_Digest(buf, i, buf, NULL, EVP_md5(), NULL);
|
||||
if (!EVP_Digest(buf, i, buf, NULL, EVP_md5(), NULL))
|
||||
goto err;
|
||||
memcpy(buf + 16, "SGCKEYSALT", 10);
|
||||
i = 26;
|
||||
}
|
||||
|
||||
EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
|
||||
if (!EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL))
|
||||
goto err;
|
||||
OPENSSL_cleanse(buf,256);
|
||||
|
||||
/* Encrypt private key in place */
|
||||
zz = enckey->enckey->digest->data;
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
EVP_EncryptInit_ex(&ctx,EVP_rc4(),NULL,key,NULL);
|
||||
EVP_EncryptUpdate(&ctx,zz,&i,zz,pkeylen);
|
||||
EVP_EncryptFinal_ex(&ctx,zz + i,&j);
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
if (!EVP_EncryptInit_ex(&ctx,EVP_rc4(),NULL,key,NULL))
|
||||
goto err;
|
||||
if (!EVP_EncryptUpdate(&ctx,zz,&i,zz,pkeylen))
|
||||
goto err;
|
||||
if (!EVP_EncryptFinal_ex(&ctx,zz + i,&j))
|
||||
goto err;
|
||||
|
||||
ret = i2d_NETSCAPE_ENCRYPTED_PKEY(enckey, pp);
|
||||
err:
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
NETSCAPE_ENCRYPTED_PKEY_free(enckey);
|
||||
NETSCAPE_PKEY_free(pkey);
|
||||
return(ret);
|
||||
@@ -288,6 +293,7 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
|
||||
const unsigned char *zz;
|
||||
unsigned char key[EVP_MAX_KEY_LENGTH];
|
||||
EVP_CIPHER_CTX ctx;
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
|
||||
i=cb((char *)buf,256,"Enter Private Key password:",0);
|
||||
if (i != 0)
|
||||
@@ -298,19 +304,22 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
|
||||
|
||||
i = strlen((char *)buf);
|
||||
if(sgckey){
|
||||
EVP_Digest(buf, i, buf, NULL, EVP_md5(), NULL);
|
||||
if (!EVP_Digest(buf, i, buf, NULL, EVP_md5(), NULL))
|
||||
goto err;
|
||||
memcpy(buf + 16, "SGCKEYSALT", 10);
|
||||
i = 26;
|
||||
}
|
||||
|
||||
EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
|
||||
if (!EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL))
|
||||
goto err;
|
||||
OPENSSL_cleanse(buf,256);
|
||||
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL);
|
||||
EVP_DecryptUpdate(&ctx,os->data,&i,os->data,os->length);
|
||||
EVP_DecryptFinal_ex(&ctx,&(os->data[i]),&j);
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
if (!EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL))
|
||||
goto err;
|
||||
if (!EVP_DecryptUpdate(&ctx,os->data,&i,os->data,os->length))
|
||||
goto err;
|
||||
if (!EVP_DecryptFinal_ex(&ctx,&(os->data[i]),&j))
|
||||
goto err;
|
||||
os->length=i+j;
|
||||
|
||||
zz=os->data;
|
||||
@@ -328,6 +337,7 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
|
||||
goto err;
|
||||
}
|
||||
err:
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
NETSCAPE_PKEY_free(pkey);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@@ -91,12 +91,10 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
|
||||
unsigned char *aiv, int prf_nid)
|
||||
{
|
||||
X509_ALGOR *scheme = NULL, *kalg = NULL, *ret = NULL;
|
||||
int alg_nid;
|
||||
int alg_nid, keylen;
|
||||
EVP_CIPHER_CTX ctx;
|
||||
unsigned char iv[EVP_MAX_IV_LENGTH];
|
||||
PBKDF2PARAM *kdf = NULL;
|
||||
PBE2PARAM *pbe2 = NULL;
|
||||
ASN1_OCTET_STRING *osalt = NULL;
|
||||
ASN1_OBJECT *obj;
|
||||
|
||||
alg_nid = EVP_CIPHER_type(cipher);
|
||||
@@ -127,7 +125,8 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
|
||||
/* Dummy cipherinit to just setup the IV, and PRF */
|
||||
EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0);
|
||||
if (!EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0))
|
||||
goto err;
|
||||
if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) {
|
||||
ASN1err(ASN1_F_PKCS5_PBE2_SET_IV,
|
||||
ASN1_R_ERROR_SETTING_CIPHER_PARAMS);
|
||||
@@ -145,55 +144,21 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
|
||||
}
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
|
||||
if(!(kdf = PBKDF2PARAM_new())) goto merr;
|
||||
if(!(osalt = M_ASN1_OCTET_STRING_new())) goto merr;
|
||||
|
||||
if (!saltlen) saltlen = PKCS5_SALT_LEN;
|
||||
if (!(osalt->data = OPENSSL_malloc (saltlen))) goto merr;
|
||||
osalt->length = saltlen;
|
||||
if (salt) memcpy (osalt->data, salt, saltlen);
|
||||
else if (RAND_pseudo_bytes (osalt->data, saltlen) < 0) goto merr;
|
||||
|
||||
if(iter <= 0) iter = PKCS5_DEFAULT_ITER;
|
||||
if(!ASN1_INTEGER_set(kdf->iter, iter)) goto merr;
|
||||
|
||||
/* Now include salt in kdf structure */
|
||||
kdf->salt->value.octet_string = osalt;
|
||||
kdf->salt->type = V_ASN1_OCTET_STRING;
|
||||
osalt = NULL;
|
||||
|
||||
/* If its RC2 then we'd better setup the key length */
|
||||
|
||||
if(alg_nid == NID_rc2_cbc) {
|
||||
if(!(kdf->keylength = M_ASN1_INTEGER_new())) goto merr;
|
||||
if(!ASN1_INTEGER_set (kdf->keylength,
|
||||
EVP_CIPHER_key_length(cipher))) goto merr;
|
||||
}
|
||||
if(alg_nid == NID_rc2_cbc)
|
||||
keylen = EVP_CIPHER_key_length(cipher);
|
||||
else
|
||||
keylen = -1;
|
||||
|
||||
/* prf can stay NULL if we are using hmacWithSHA1 */
|
||||
if (prf_nid != NID_hmacWithSHA1)
|
||||
{
|
||||
kdf->prf = X509_ALGOR_new();
|
||||
if (!kdf->prf)
|
||||
goto merr;
|
||||
X509_ALGOR_set0(kdf->prf, OBJ_nid2obj(prf_nid),
|
||||
V_ASN1_NULL, NULL);
|
||||
}
|
||||
/* Setup keyfunc */
|
||||
|
||||
/* Now setup the PBE2PARAM keyfunc structure */
|
||||
X509_ALGOR_free(pbe2->keyfunc);
|
||||
|
||||
pbe2->keyfunc->algorithm = OBJ_nid2obj(NID_id_pbkdf2);
|
||||
pbe2->keyfunc = PKCS5_pbkdf2_set(iter, salt, saltlen, prf_nid, keylen);
|
||||
|
||||
/* Encode PBKDF2PARAM into parameter of pbe2 */
|
||||
|
||||
if(!(pbe2->keyfunc->parameter = ASN1_TYPE_new())) goto merr;
|
||||
|
||||
if(!ASN1_item_pack(kdf, ASN1_ITEM_rptr(PBKDF2PARAM),
|
||||
&pbe2->keyfunc->parameter->value.sequence)) goto merr;
|
||||
pbe2->keyfunc->parameter->type = V_ASN1_SEQUENCE;
|
||||
|
||||
PBKDF2PARAM_free(kdf);
|
||||
kdf = NULL;
|
||||
if (!pbe2->keyfunc)
|
||||
goto merr;
|
||||
|
||||
/* Now set up top level AlgorithmIdentifier */
|
||||
|
||||
@@ -219,8 +184,6 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
|
||||
err:
|
||||
PBE2PARAM_free(pbe2);
|
||||
/* Note 'scheme' is freed as part of pbe2 */
|
||||
M_ASN1_OCTET_STRING_free(osalt);
|
||||
PBKDF2PARAM_free(kdf);
|
||||
X509_ALGOR_free(kalg);
|
||||
X509_ALGOR_free(ret);
|
||||
|
||||
@@ -233,3 +196,85 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
|
||||
{
|
||||
return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1);
|
||||
}
|
||||
|
||||
X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
|
||||
int prf_nid, int keylen)
|
||||
{
|
||||
X509_ALGOR *keyfunc = NULL;
|
||||
PBKDF2PARAM *kdf = NULL;
|
||||
ASN1_OCTET_STRING *osalt = NULL;
|
||||
|
||||
if(!(kdf = PBKDF2PARAM_new()))
|
||||
goto merr;
|
||||
if(!(osalt = M_ASN1_OCTET_STRING_new()))
|
||||
goto merr;
|
||||
|
||||
kdf->salt->value.octet_string = osalt;
|
||||
kdf->salt->type = V_ASN1_OCTET_STRING;
|
||||
|
||||
if (!saltlen)
|
||||
saltlen = PKCS5_SALT_LEN;
|
||||
if (!(osalt->data = OPENSSL_malloc (saltlen)))
|
||||
goto merr;
|
||||
|
||||
osalt->length = saltlen;
|
||||
|
||||
if (salt)
|
||||
memcpy (osalt->data, salt, saltlen);
|
||||
else if (RAND_pseudo_bytes (osalt->data, saltlen) < 0)
|
||||
goto merr;
|
||||
|
||||
if(iter <= 0)
|
||||
iter = PKCS5_DEFAULT_ITER;
|
||||
|
||||
if(!ASN1_INTEGER_set(kdf->iter, iter))
|
||||
goto merr;
|
||||
|
||||
/* If have a key len set it up */
|
||||
|
||||
if(keylen > 0)
|
||||
{
|
||||
if(!(kdf->keylength = M_ASN1_INTEGER_new()))
|
||||
goto merr;
|
||||
if(!ASN1_INTEGER_set (kdf->keylength, keylen))
|
||||
goto merr;
|
||||
}
|
||||
|
||||
/* prf can stay NULL if we are using hmacWithSHA1 */
|
||||
if (prf_nid > 0 && prf_nid != NID_hmacWithSHA1)
|
||||
{
|
||||
kdf->prf = X509_ALGOR_new();
|
||||
if (!kdf->prf)
|
||||
goto merr;
|
||||
X509_ALGOR_set0(kdf->prf, OBJ_nid2obj(prf_nid),
|
||||
V_ASN1_NULL, NULL);
|
||||
}
|
||||
|
||||
/* Finally setup the keyfunc structure */
|
||||
|
||||
keyfunc = X509_ALGOR_new();
|
||||
if (!keyfunc)
|
||||
goto merr;
|
||||
|
||||
keyfunc->algorithm = OBJ_nid2obj(NID_id_pbkdf2);
|
||||
|
||||
/* Encode PBKDF2PARAM into parameter of pbe2 */
|
||||
|
||||
if(!(keyfunc->parameter = ASN1_TYPE_new()))
|
||||
goto merr;
|
||||
|
||||
if(!ASN1_item_pack(kdf, ASN1_ITEM_rptr(PBKDF2PARAM),
|
||||
&keyfunc->parameter->value.sequence))
|
||||
goto merr;
|
||||
keyfunc->parameter->type = V_ASN1_SEQUENCE;
|
||||
|
||||
PBKDF2PARAM_free(kdf);
|
||||
return keyfunc;
|
||||
|
||||
merr:
|
||||
ASN1err(ASN1_F_PKCS5_PBKDF2_SET,ERR_R_MALLOC_FAILURE);
|
||||
PBKDF2PARAM_free(kdf);
|
||||
X509_ALGOR_free(keyfunc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,8 +94,7 @@ int X509_CRL_print(BIO *out, X509_CRL *x)
|
||||
l = X509_CRL_get_version(x);
|
||||
BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l+1, l);
|
||||
i = OBJ_obj2nid(x->sig_alg->algorithm);
|
||||
BIO_printf(out, "%8sSignature Algorithm: %s\n", "",
|
||||
(i == NID_undef) ? "NONE" : OBJ_nid2ln(i));
|
||||
X509_signature_print(out, x->sig_alg, NULL);
|
||||
p=X509_NAME_oneline(X509_CRL_get_issuer(x),NULL,0);
|
||||
BIO_printf(out,"%8sIssuer: %s\n","",p);
|
||||
OPENSSL_free(p);
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include "asn1_locl.h"
|
||||
|
||||
#ifndef OPENSSL_NO_FP_API
|
||||
int X509_print_fp(FILE *fp, X509 *x)
|
||||
@@ -137,7 +138,7 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
|
||||
if (BIO_write(bp," Serial Number:",22) <= 0) goto err;
|
||||
|
||||
bs=X509_get_serialNumber(x);
|
||||
if (bs->length <= 4)
|
||||
if (bs->length <= (int)sizeof(long))
|
||||
{
|
||||
l=ASN1_INTEGER_get(bs);
|
||||
if (bs->type == V_ASN1_NEG_INTEGER)
|
||||
@@ -167,12 +168,16 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
|
||||
|
||||
if(!(cflag & X509_FLAG_NO_SIGNAME))
|
||||
{
|
||||
if(X509_signature_print(bp, x->sig_alg, NULL) <= 0)
|
||||
goto err;
|
||||
#if 0
|
||||
if (BIO_printf(bp,"%8sSignature Algorithm: ","") <= 0)
|
||||
goto err;
|
||||
if (i2a_ASN1_OBJECT(bp, ci->signature->algorithm) <= 0)
|
||||
goto err;
|
||||
if (BIO_puts(bp, "\n") <= 0)
|
||||
goto err;
|
||||
#endif
|
||||
}
|
||||
|
||||
if(!(cflag & X509_FLAG_NO_ISSUER))
|
||||
@@ -255,7 +260,8 @@ int X509_ocspid_print (BIO *bp, X509 *x)
|
||||
goto err;
|
||||
i2d_X509_NAME(x->cert_info->subject, &dertmp);
|
||||
|
||||
EVP_Digest(der, derlen, SHA1md, NULL, EVP_sha1(), NULL);
|
||||
if (!EVP_Digest(der, derlen, SHA1md, NULL, EVP_sha1(), NULL))
|
||||
goto err;
|
||||
for (i=0; i < SHA_DIGEST_LENGTH; i++)
|
||||
{
|
||||
if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0) goto err;
|
||||
@@ -268,8 +274,10 @@ int X509_ocspid_print (BIO *bp, X509 *x)
|
||||
if (BIO_printf(bp,"\n Public key OCSP hash: ") <= 0)
|
||||
goto err;
|
||||
|
||||
EVP_Digest(x->cert_info->key->public_key->data,
|
||||
x->cert_info->key->public_key->length, SHA1md, NULL, EVP_sha1(), NULL);
|
||||
if (!EVP_Digest(x->cert_info->key->public_key->data,
|
||||
x->cert_info->key->public_key->length,
|
||||
SHA1md, NULL, EVP_sha1(), NULL))
|
||||
goto err;
|
||||
for (i=0; i < SHA_DIGEST_LENGTH; i++)
|
||||
{
|
||||
if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0)
|
||||
@@ -283,23 +291,50 @@ err:
|
||||
return(0);
|
||||
}
|
||||
|
||||
int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig)
|
||||
int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent)
|
||||
{
|
||||
unsigned char *s;
|
||||
const unsigned char *s;
|
||||
int i, n;
|
||||
if (BIO_puts(bp," Signature Algorithm: ") <= 0) return 0;
|
||||
if (i2a_ASN1_OBJECT(bp, sigalg->algorithm) <= 0) return 0;
|
||||
|
||||
n=sig->length;
|
||||
s=sig->data;
|
||||
for (i=0; i<n; i++)
|
||||
{
|
||||
if ((i%18) == 0)
|
||||
if (BIO_write(bp,"\n ",9) <= 0) return 0;
|
||||
{
|
||||
if (BIO_write(bp,"\n",1) <= 0) return 0;
|
||||
if (BIO_indent(bp, indent, indent) <= 0) return 0;
|
||||
}
|
||||
if (BIO_printf(bp,"%02x%s",s[i],
|
||||
((i+1) == n)?"":":") <= 0) return 0;
|
||||
}
|
||||
if (BIO_write(bp,"\n",1) != 1) return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig)
|
||||
{
|
||||
int sig_nid;
|
||||
if (BIO_puts(bp," Signature Algorithm: ") <= 0) return 0;
|
||||
if (i2a_ASN1_OBJECT(bp, sigalg->algorithm) <= 0) return 0;
|
||||
|
||||
sig_nid = OBJ_obj2nid(sigalg->algorithm);
|
||||
if (sig_nid != NID_undef)
|
||||
{
|
||||
int pkey_nid, dig_nid;
|
||||
const EVP_PKEY_ASN1_METHOD *ameth;
|
||||
if (OBJ_find_sigid_algs(sig_nid, &dig_nid, &pkey_nid))
|
||||
{
|
||||
ameth = EVP_PKEY_asn1_find(NULL, pkey_nid);
|
||||
if (ameth && ameth->sig_print)
|
||||
return ameth->sig_print(bp, sigalg, sig, 9, 0);
|
||||
}
|
||||
}
|
||||
if (sig)
|
||||
return X509_signature_dump(bp, sig, 9);
|
||||
else if (BIO_puts(bp, "\n") <= 0)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -870,6 +870,14 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval,
|
||||
}
|
||||
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.max = 0;
|
||||
buf.data = NULL;
|
||||
|
||||
@@ -128,3 +128,28 @@ void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up an X509_ALGOR DigestAlgorithmIdentifier from an EVP_MD */
|
||||
|
||||
void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md)
|
||||
{
|
||||
int param_type;
|
||||
|
||||
if (md->flags & EVP_MD_FLAG_DIGALGID_ABSENT)
|
||||
param_type = V_ASN1_UNDEF;
|
||||
else
|
||||
param_type = V_ASN1_NULL;
|
||||
|
||||
X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL);
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -350,6 +350,8 @@ static int x509_name_canon(X509_NAME *a)
|
||||
set = entry->set;
|
||||
}
|
||||
tmpentry = X509_NAME_ENTRY_new();
|
||||
if (!tmpentry)
|
||||
goto err;
|
||||
tmpentry->object = OBJ_dup(entry->object);
|
||||
if (!asn1_string_canon(tmpentry->value, entry->value))
|
||||
goto err;
|
||||
|
||||
@@ -94,5 +94,8 @@ bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h
|
||||
bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c
|
||||
bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_skey.o: ../../include/openssl/opensslconf.h bf_locl.h bf_pi.h bf_skey.c
|
||||
bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/crypto.h
|
||||
bf_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
bf_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
bf_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
bf_skey.o: ../../include/openssl/symhacks.h bf_locl.h bf_pi.h bf_skey.c
|
||||
|
||||
@@ -58,11 +58,19 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/blowfish.h>
|
||||
#include "bf_locl.h"
|
||||
#include "bf_pi.h"
|
||||
|
||||
void BF_set_key(BF_KEY *key, int len, const unsigned char *data)
|
||||
#ifdef OPENSSL_FIPS
|
||||
{
|
||||
fips_cipher_abort(BLOWFISH);
|
||||
private_BF_set_key(key, len, data);
|
||||
}
|
||||
void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data)
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
BF_LONG *p,ri,in[2];
|
||||
|
||||
@@ -104,7 +104,9 @@ typedef struct bf_key_st
|
||||
BF_LONG S[4*256];
|
||||
} BF_KEY;
|
||||
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data);
|
||||
#endif
|
||||
void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
|
||||
|
||||
void BF_encrypt(BF_LONG *data,const BF_KEY *key);
|
||||
|
||||
@@ -68,6 +68,14 @@
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#ifndef OPENSSL_NO_SCTP
|
||||
# ifndef OPENSSL_SYS_VMS
|
||||
# include <stdint.h>
|
||||
# else
|
||||
# include <inttypes.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -95,6 +103,9 @@ extern "C" {
|
||||
#define BIO_TYPE_BIO (19|0x0400) /* (half a) BIO pair */
|
||||
#define BIO_TYPE_LINEBUFFER (20|0x0200) /* filter */
|
||||
#define BIO_TYPE_DGRAM (21|0x0400|0x0100)
|
||||
#ifndef OPENSSL_NO_SCTP
|
||||
#define BIO_TYPE_DGRAM_SCTP (24|0x0400|0x0100)
|
||||
#endif
|
||||
#define BIO_TYPE_ASN1 (22|0x0200) /* filter */
|
||||
#define BIO_TYPE_COMP (23|0x0200) /* filter */
|
||||
|
||||
@@ -162,7 +173,24 @@ extern "C" {
|
||||
#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */
|
||||
|
||||
#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
|
||||
|
||||
#ifndef OPENSSL_NO_SCTP
|
||||
/* SCTP stuff */
|
||||
#define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50
|
||||
#define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51
|
||||
#define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52
|
||||
#define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53
|
||||
#define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60
|
||||
#define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61
|
||||
#define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62
|
||||
#define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63
|
||||
#define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64
|
||||
#define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65
|
||||
#define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70
|
||||
#endif
|
||||
|
||||
/* modifiers */
|
||||
#define BIO_FP_READ 0x02
|
||||
@@ -332,6 +360,34 @@ typedef struct bio_f_buffer_ctx_struct
|
||||
/* Prefix and suffix callback in ASN1 BIO */
|
||||
typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen, void *parg);
|
||||
|
||||
#ifndef OPENSSL_NO_SCTP
|
||||
/* SCTP parameter structs */
|
||||
struct bio_dgram_sctp_sndinfo
|
||||
{
|
||||
uint16_t snd_sid;
|
||||
uint16_t snd_flags;
|
||||
uint32_t snd_ppid;
|
||||
uint32_t snd_context;
|
||||
};
|
||||
|
||||
struct bio_dgram_sctp_rcvinfo
|
||||
{
|
||||
uint16_t rcv_sid;
|
||||
uint16_t rcv_ssn;
|
||||
uint16_t rcv_flags;
|
||||
uint32_t rcv_ppid;
|
||||
uint32_t rcv_tsn;
|
||||
uint32_t rcv_cumtsn;
|
||||
uint32_t rcv_context;
|
||||
};
|
||||
|
||||
struct bio_dgram_sctp_prinfo
|
||||
{
|
||||
uint16_t pr_policy;
|
||||
uint32_t pr_value;
|
||||
};
|
||||
#endif
|
||||
|
||||
/* connect BIO stuff */
|
||||
#define BIO_CONN_S_BEFORE 1
|
||||
#define BIO_CONN_S_GET_IP 2
|
||||
@@ -553,6 +609,8 @@ int BIO_ctrl_reset_read_request(BIO *b);
|
||||
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer)
|
||||
#define BIO_dgram_set_peer(b,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 */
|
||||
/* int BIO_get_ex_num(BIO *bio); */
|
||||
@@ -629,6 +687,9 @@ BIO_METHOD *BIO_f_linebuffer(void);
|
||||
BIO_METHOD *BIO_f_nbio_test(void);
|
||||
#ifndef OPENSSL_NO_DGRAM
|
||||
BIO_METHOD *BIO_s_datagram(void);
|
||||
#ifndef OPENSSL_NO_SCTP
|
||||
BIO_METHOD *BIO_s_datagram_sctp(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* BIO_METHOD *BIO_f_ber(void); */
|
||||
@@ -671,6 +732,15 @@ int BIO_set_tcp_ndelay(int sock,int turn_on);
|
||||
|
||||
BIO *BIO_new_socket(int sock, int close_flag);
|
||||
BIO *BIO_new_dgram(int fd, int close_flag);
|
||||
#ifndef OPENSSL_NO_SCTP
|
||||
BIO *BIO_new_dgram_sctp(int fd, int close_flag);
|
||||
int BIO_dgram_is_sctp(BIO *bio);
|
||||
int BIO_dgram_sctp_notification_cb(BIO *b,
|
||||
void (*handle_notifications)(BIO *bio, void *context, void *buf),
|
||||
void *context);
|
||||
int BIO_dgram_sctp_wait_for_dry(BIO *b);
|
||||
int BIO_dgram_sctp_msg_waiting(BIO *b);
|
||||
#endif
|
||||
BIO *BIO_new_fd(int fd, int close_flag);
|
||||
BIO *BIO_new_connect(char *host_port);
|
||||
BIO *BIO_new_accept(char *host_port);
|
||||
@@ -735,6 +805,7 @@ void ERR_load_BIO_strings(void);
|
||||
#define BIO_F_BUFFER_CTRL 114
|
||||
#define BIO_F_CONN_CTRL 127
|
||||
#define BIO_F_CONN_STATE 115
|
||||
#define BIO_F_DGRAM_SCTP_READ 132
|
||||
#define BIO_F_FILE_CTRL 116
|
||||
#define BIO_F_FILE_READ 130
|
||||
#define BIO_F_LINEBUFFER_CTRL 129
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/bio/bio_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -95,6 +95,7 @@ static ERR_STRING_DATA BIO_str_functs[]=
|
||||
{ERR_FUNC(BIO_F_BUFFER_CTRL), "BUFFER_CTRL"},
|
||||
{ERR_FUNC(BIO_F_CONN_CTRL), "CONN_CTRL"},
|
||||
{ERR_FUNC(BIO_F_CONN_STATE), "CONN_STATE"},
|
||||
{ERR_FUNC(BIO_F_DGRAM_SCTP_READ), "DGRAM_SCTP_READ"},
|
||||
{ERR_FUNC(BIO_F_FILE_CTRL), "FILE_CTRL"},
|
||||
{ERR_FUNC(BIO_F_FILE_READ), "FILE_READ"},
|
||||
{ERR_FUNC(BIO_F_LINEBUFFER_CTRL), "LINEBUFFER_CTRL"},
|
||||
|
||||
@@ -277,10 +277,10 @@ static int bio_read(BIO *bio, char *buf, int size_)
|
||||
*/
|
||||
/* WARNING: The non-copying interface is largely untested as of yet
|
||||
* and may contain bugs. */
|
||||
static ssize_t bio_nread0(BIO *bio, char **buf)
|
||||
static ossl_ssize_t bio_nread0(BIO *bio, char **buf)
|
||||
{
|
||||
struct bio_bio_st *b, *peer_b;
|
||||
ssize_t num;
|
||||
ossl_ssize_t num;
|
||||
|
||||
BIO_clear_retry_flags(bio);
|
||||
|
||||
@@ -315,15 +315,15 @@ static ssize_t bio_nread0(BIO *bio, char **buf)
|
||||
return num;
|
||||
}
|
||||
|
||||
static ssize_t bio_nread(BIO *bio, char **buf, size_t num_)
|
||||
static ossl_ssize_t bio_nread(BIO *bio, char **buf, size_t num_)
|
||||
{
|
||||
struct bio_bio_st *b, *peer_b;
|
||||
ssize_t num, available;
|
||||
ossl_ssize_t num, available;
|
||||
|
||||
if (num_ > SSIZE_MAX)
|
||||
num = SSIZE_MAX;
|
||||
else
|
||||
num = (ssize_t)num_;
|
||||
num = (ossl_ssize_t)num_;
|
||||
|
||||
available = bio_nread0(bio, buf);
|
||||
if (num > available)
|
||||
@@ -428,7 +428,7 @@ static int bio_write(BIO *bio, const char *buf, int num_)
|
||||
* (example usage: bio_nwrite0(), write to buffer, bio_nwrite()
|
||||
* or just bio_nwrite(), write to buffer)
|
||||
*/
|
||||
static ssize_t bio_nwrite0(BIO *bio, char **buf)
|
||||
static ossl_ssize_t bio_nwrite0(BIO *bio, char **buf)
|
||||
{
|
||||
struct bio_bio_st *b;
|
||||
size_t num;
|
||||
@@ -476,15 +476,15 @@ static ssize_t bio_nwrite0(BIO *bio, char **buf)
|
||||
return num;
|
||||
}
|
||||
|
||||
static ssize_t bio_nwrite(BIO *bio, char **buf, size_t num_)
|
||||
static ossl_ssize_t bio_nwrite(BIO *bio, char **buf, size_t num_)
|
||||
{
|
||||
struct bio_bio_st *b;
|
||||
ssize_t num, space;
|
||||
ossl_ssize_t num, space;
|
||||
|
||||
if (num_ > SSIZE_MAX)
|
||||
num = SSIZE_MAX;
|
||||
else
|
||||
num = (ssize_t)num_;
|
||||
num = (ossl_ssize_t)num_;
|
||||
|
||||
space = bio_nwrite0(bio, buf);
|
||||
if (num > space)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,13 +26,13 @@ LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
|
||||
bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
|
||||
bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
|
||||
bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
|
||||
bn_depr.c bn_const.c
|
||||
bn_depr.c bn_const.c bn_x931p.c
|
||||
|
||||
LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
|
||||
bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
|
||||
bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
|
||||
bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o \
|
||||
bn_depr.o bn_const.o
|
||||
bn_depr.o bn_const.o bn_x931p.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
@@ -66,6 +66,8 @@ co-586.s: asm/co-586.pl ../perlasm/x86asm.pl
|
||||
$(PERL) asm/co-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
||||
x86-mont.s: asm/x86-mont.pl ../perlasm/x86asm.pl
|
||||
$(PERL) asm/x86-mont.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
||||
x86-gf2m.s: asm/x86-gf2m.pl ../perlasm/x86asm.pl
|
||||
$(PERL) asm/x86-gf2m.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
||||
|
||||
sparcv8.o: asm/sparcv8.S
|
||||
$(CC) $(CFLAGS) -c asm/sparcv8.S
|
||||
@@ -82,16 +84,31 @@ bn-mips3.o: asm/mips3.s
|
||||
as -$$ABI -O -o $@ asm/mips3.s; \
|
||||
else $(CC) -c $(CFLAGS) -o $@ asm/mips3.s; fi
|
||||
|
||||
bn-mips.s: asm/mips.pl
|
||||
$(PERL) asm/mips.pl $(PERLASM_SCHEME) $@
|
||||
mips-mont.s: asm/mips-mont.pl
|
||||
$(PERL) asm/mips-mont.pl $(PERLASM_SCHEME) $@
|
||||
|
||||
bn-s390x.o: asm/s390x.S
|
||||
$(CC) $(CFLAGS) -c -o $@ asm/s390x.S
|
||||
s390x-gf2m.s: asm/s390x-gf2m.pl
|
||||
$(PERL) asm/s390x-gf2m.pl $(PERLASM_SCHEME) $@
|
||||
|
||||
x86_64-gcc.o: asm/x86_64-gcc.c
|
||||
$(CC) $(CFLAGS) -c -o $@ asm/x86_64-gcc.c
|
||||
x86_64-mont.s: asm/x86_64-mont.pl
|
||||
$(PERL) asm/x86_64-mont.pl $(PERLASM_SCHEME) > $@
|
||||
x86_64-mont5.s: asm/x86_64-mont5.pl
|
||||
$(PERL) asm/x86_64-mont5.pl $(PERLASM_SCHEME) > $@
|
||||
x86_64-gf2m.s: asm/x86_64-gf2m.pl
|
||||
$(PERL) asm/x86_64-gf2m.pl $(PERLASM_SCHEME) > $@
|
||||
modexp512-x86_64.s: asm/modexp512-x86_64.pl
|
||||
$(PERL) asm/modexp512-x86_64.pl $(PERLASM_SCHEME) > $@
|
||||
|
||||
bn-ia64.s: asm/ia64.S
|
||||
$(CC) $(CFLAGS) -E asm/ia64.S > $@
|
||||
ia64-mont.s: asm/ia64-mont.pl
|
||||
$(PERL) asm/ia64-mont.pl $@ $(CFLAGS)
|
||||
|
||||
# GNU assembler fails to compile PA-RISC2 modules, insist on calling
|
||||
# vendor assembler...
|
||||
@@ -99,16 +116,24 @@ pa-risc2W.o: asm/pa-risc2W.s
|
||||
/usr/ccs/bin/as -o pa-risc2W.o asm/pa-risc2W.s
|
||||
pa-risc2.o: asm/pa-risc2.s
|
||||
/usr/ccs/bin/as -o pa-risc2.o asm/pa-risc2.s
|
||||
parisc-mont.s: asm/parisc-mont.pl
|
||||
$(PERL) asm/parisc-mont.pl $(PERLASM_SCHEME) $@
|
||||
|
||||
# ppc - AIX, Linux, MacOS X...
|
||||
bn-ppc.s: asm/ppc.pl; $(PERL) asm/ppc.pl $(PERLASM_SCHEME) $@
|
||||
ppc-mont.s: asm/ppc-mont.pl;$(PERL) asm/ppc-mont.pl $(PERLASM_SCHEME) $@
|
||||
ppc64-mont.s: asm/ppc64-mont.pl;$(PERL) asm/ppc64-mont.pl $(PERLASM_SCHEME) $@
|
||||
|
||||
alpha-mont.s: asm/alpha-mont.pl
|
||||
$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
|
||||
(preproc=/tmp/$$$$.$@; trap "rm $$preproc" INT; \
|
||||
$(PERL) asm/alpha-mont.pl > $$preproc && \
|
||||
$(CC) -E $$preproc > $@ && rm $$preproc)
|
||||
|
||||
# GNU make "catch all"
|
||||
%-mont.s: asm/%-mont.pl; $(PERL) $< $(CFLAGS) > $@
|
||||
%-mont.s: asm/%-mont.pl; $(PERL) $< $(PERLASM_SCHEME) $@
|
||||
%-gf2m.S: asm/%-gf2m.pl; $(PERL) $< $(PERLASM_SCHEME) $@
|
||||
|
||||
armv4-gf2m.o: armv4-gf2m.S
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
@@ -345,3 +370,8 @@ bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
bn_word.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
bn_word.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_word.c
|
||||
bn_x931p.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
|
||||
bn_x931p.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
bn_x931p.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
bn_x931p.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
bn_x931p.o: ../../include/openssl/symhacks.h bn_x931p.c
|
||||
|
||||
278
crypto/bn/asm/armv4-gf2m.pl
Normal file
278
crypto/bn/asm/armv4-gf2m.pl
Normal file
@@ -0,0 +1,278 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# ====================================================================
|
||||
# Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
|
||||
# project. The module is, however, dual licensed under OpenSSL and
|
||||
# CRYPTOGAMS licenses depending on where you obtain it. For further
|
||||
# details see http://www.openssl.org/~appro/cryptogams/.
|
||||
# ====================================================================
|
||||
#
|
||||
# May 2011
|
||||
#
|
||||
# The module implements bn_GF2m_mul_2x2 polynomial multiplication
|
||||
# used in bn_gf2m.c. It's kind of low-hanging mechanical port from
|
||||
# C for the time being... Except that it has two code paths: pure
|
||||
# integer code suitable for any ARMv4 and later CPU and NEON code
|
||||
# suitable for ARMv7. Pure integer 1x1 multiplication subroutine runs
|
||||
# in ~45 cycles on dual-issue core such as Cortex A8, which is ~50%
|
||||
# faster than compiler-generated code. For ECDH and ECDSA verify (but
|
||||
# not for ECDSA sign) it means 25%-45% improvement depending on key
|
||||
# length, more for longer keys. Even though NEON 1x1 multiplication
|
||||
# runs in even less cycles, ~30, improvement is measurable only on
|
||||
# longer keys. One has to optimize code elsewhere to get NEON glow...
|
||||
|
||||
while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
|
||||
open STDOUT,">$output";
|
||||
|
||||
sub Dlo() { shift=~m|q([1]?[0-9])|?"d".($1*2):""; }
|
||||
sub Dhi() { shift=~m|q([1]?[0-9])|?"d".($1*2+1):""; }
|
||||
sub Q() { shift=~m|d([1-3]?[02468])|?"q".($1/2):""; }
|
||||
|
||||
$code=<<___;
|
||||
#include "arm_arch.h"
|
||||
|
||||
.text
|
||||
.code 32
|
||||
|
||||
#if __ARM_ARCH__>=7
|
||||
.fpu neon
|
||||
|
||||
.type mul_1x1_neon,%function
|
||||
.align 5
|
||||
mul_1x1_neon:
|
||||
vshl.u64 `&Dlo("q1")`,d16,#8 @ q1-q3 are slided $a
|
||||
vmull.p8 `&Q("d0")`,d16,d17 @ a<>bb
|
||||
vshl.u64 `&Dlo("q2")`,d16,#16
|
||||
vmull.p8 q1,`&Dlo("q1")`,d17 @ a<<8<>bb
|
||||
vshl.u64 `&Dlo("q3")`,d16,#24
|
||||
vmull.p8 q2,`&Dlo("q2")`,d17 @ a<<16<31>bb
|
||||
vshr.u64 `&Dlo("q1")`,#8
|
||||
vmull.p8 q3,`&Dlo("q3")`,d17 @ a<<24<32>bb
|
||||
vshl.u64 `&Dhi("q1")`,#24
|
||||
veor d0,`&Dlo("q1")`
|
||||
vshr.u64 `&Dlo("q2")`,#16
|
||||
veor d0,`&Dhi("q1")`
|
||||
vshl.u64 `&Dhi("q2")`,#16
|
||||
veor d0,`&Dlo("q2")`
|
||||
vshr.u64 `&Dlo("q3")`,#24
|
||||
veor d0,`&Dhi("q2")`
|
||||
vshl.u64 `&Dhi("q3")`,#8
|
||||
veor d0,`&Dlo("q3")`
|
||||
veor d0,`&Dhi("q3")`
|
||||
bx lr
|
||||
.size mul_1x1_neon,.-mul_1x1_neon
|
||||
#endif
|
||||
___
|
||||
################
|
||||
# private interface to mul_1x1_ialu
|
||||
#
|
||||
$a="r1";
|
||||
$b="r0";
|
||||
|
||||
($a0,$a1,$a2,$a12,$a4,$a14)=
|
||||
($hi,$lo,$t0,$t1, $i0,$i1 )=map("r$_",(4..9),12);
|
||||
|
||||
$mask="r12";
|
||||
|
||||
$code.=<<___;
|
||||
.type mul_1x1_ialu,%function
|
||||
.align 5
|
||||
mul_1x1_ialu:
|
||||
mov $a0,#0
|
||||
bic $a1,$a,#3<<30 @ a1=a&0x3fffffff
|
||||
str $a0,[sp,#0] @ tab[0]=0
|
||||
add $a2,$a1,$a1 @ a2=a1<<1
|
||||
str $a1,[sp,#4] @ tab[1]=a1
|
||||
eor $a12,$a1,$a2 @ a1^a2
|
||||
str $a2,[sp,#8] @ tab[2]=a2
|
||||
mov $a4,$a1,lsl#2 @ a4=a1<<2
|
||||
str $a12,[sp,#12] @ tab[3]=a1^a2
|
||||
eor $a14,$a1,$a4 @ a1^a4
|
||||
str $a4,[sp,#16] @ tab[4]=a4
|
||||
eor $a0,$a2,$a4 @ a2^a4
|
||||
str $a14,[sp,#20] @ tab[5]=a1^a4
|
||||
eor $a12,$a12,$a4 @ a1^a2^a4
|
||||
str $a0,[sp,#24] @ tab[6]=a2^a4
|
||||
and $i0,$mask,$b,lsl#2
|
||||
str $a12,[sp,#28] @ tab[7]=a1^a2^a4
|
||||
|
||||
and $i1,$mask,$b,lsr#1
|
||||
ldr $lo,[sp,$i0] @ tab[b & 0x7]
|
||||
and $i0,$mask,$b,lsr#4
|
||||
ldr $t1,[sp,$i1] @ tab[b >> 3 & 0x7]
|
||||
and $i1,$mask,$b,lsr#7
|
||||
ldr $t0,[sp,$i0] @ tab[b >> 6 & 0x7]
|
||||
eor $lo,$lo,$t1,lsl#3 @ stall
|
||||
mov $hi,$t1,lsr#29
|
||||
ldr $t1,[sp,$i1] @ tab[b >> 9 & 0x7]
|
||||
|
||||
and $i0,$mask,$b,lsr#10
|
||||
eor $lo,$lo,$t0,lsl#6
|
||||
eor $hi,$hi,$t0,lsr#26
|
||||
ldr $t0,[sp,$i0] @ tab[b >> 12 & 0x7]
|
||||
|
||||
and $i1,$mask,$b,lsr#13
|
||||
eor $lo,$lo,$t1,lsl#9
|
||||
eor $hi,$hi,$t1,lsr#23
|
||||
ldr $t1,[sp,$i1] @ tab[b >> 15 & 0x7]
|
||||
|
||||
and $i0,$mask,$b,lsr#16
|
||||
eor $lo,$lo,$t0,lsl#12
|
||||
eor $hi,$hi,$t0,lsr#20
|
||||
ldr $t0,[sp,$i0] @ tab[b >> 18 & 0x7]
|
||||
|
||||
and $i1,$mask,$b,lsr#19
|
||||
eor $lo,$lo,$t1,lsl#15
|
||||
eor $hi,$hi,$t1,lsr#17
|
||||
ldr $t1,[sp,$i1] @ tab[b >> 21 & 0x7]
|
||||
|
||||
and $i0,$mask,$b,lsr#22
|
||||
eor $lo,$lo,$t0,lsl#18
|
||||
eor $hi,$hi,$t0,lsr#14
|
||||
ldr $t0,[sp,$i0] @ tab[b >> 24 & 0x7]
|
||||
|
||||
and $i1,$mask,$b,lsr#25
|
||||
eor $lo,$lo,$t1,lsl#21
|
||||
eor $hi,$hi,$t1,lsr#11
|
||||
ldr $t1,[sp,$i1] @ tab[b >> 27 & 0x7]
|
||||
|
||||
tst $a,#1<<30
|
||||
and $i0,$mask,$b,lsr#28
|
||||
eor $lo,$lo,$t0,lsl#24
|
||||
eor $hi,$hi,$t0,lsr#8
|
||||
ldr $t0,[sp,$i0] @ tab[b >> 30 ]
|
||||
|
||||
eorne $lo,$lo,$b,lsl#30
|
||||
eorne $hi,$hi,$b,lsr#2
|
||||
tst $a,#1<<31
|
||||
eor $lo,$lo,$t1,lsl#27
|
||||
eor $hi,$hi,$t1,lsr#5
|
||||
eorne $lo,$lo,$b,lsl#31
|
||||
eorne $hi,$hi,$b,lsr#1
|
||||
eor $lo,$lo,$t0,lsl#30
|
||||
eor $hi,$hi,$t0,lsr#2
|
||||
|
||||
mov pc,lr
|
||||
.size mul_1x1_ialu,.-mul_1x1_ialu
|
||||
___
|
||||
################
|
||||
# void bn_GF2m_mul_2x2(BN_ULONG *r,
|
||||
# BN_ULONG a1,BN_ULONG a0,
|
||||
# BN_ULONG b1,BN_ULONG b0); # r[3..0]=a1a0<61>b1b0
|
||||
|
||||
($A1,$B1,$A0,$B0,$A1B1,$A0B0)=map("d$_",(18..23));
|
||||
|
||||
$code.=<<___;
|
||||
.global bn_GF2m_mul_2x2
|
||||
.type bn_GF2m_mul_2x2,%function
|
||||
.align 5
|
||||
bn_GF2m_mul_2x2:
|
||||
#if __ARM_ARCH__>=7
|
||||
ldr r12,.LOPENSSL_armcap
|
||||
.Lpic: ldr r12,[pc,r12]
|
||||
tst r12,#1
|
||||
beq .Lialu
|
||||
|
||||
veor $A1,$A1
|
||||
vmov.32 $B1,r3,r3 @ two copies of b1
|
||||
vmov.32 ${A1}[0],r1 @ a1
|
||||
|
||||
veor $A0,$A0
|
||||
vld1.32 ${B0}[],[sp,:32] @ two copies of b0
|
||||
vmov.32 ${A0}[0],r2 @ a0
|
||||
mov r12,lr
|
||||
|
||||
vmov d16,$A1
|
||||
vmov d17,$B1
|
||||
bl mul_1x1_neon @ a1<61>b1
|
||||
vmov $A1B1,d0
|
||||
|
||||
vmov d16,$A0
|
||||
vmov d17,$B0
|
||||
bl mul_1x1_neon @ a0<61>b0
|
||||
vmov $A0B0,d0
|
||||
|
||||
veor d16,$A0,$A1
|
||||
veor d17,$B0,$B1
|
||||
veor $A0,$A0B0,$A1B1
|
||||
bl mul_1x1_neon @ (a0+a1)<29>(b0+b1)
|
||||
|
||||
veor d0,$A0 @ (a0+a1)<29>(b0+b1)-a0<61>b0-a1<61>b1
|
||||
vshl.u64 d1,d0,#32
|
||||
vshr.u64 d0,d0,#32
|
||||
veor $A0B0,d1
|
||||
veor $A1B1,d0
|
||||
vst1.32 {${A0B0}[0]},[r0,:32]!
|
||||
vst1.32 {${A0B0}[1]},[r0,:32]!
|
||||
vst1.32 {${A1B1}[0]},[r0,:32]!
|
||||
vst1.32 {${A1B1}[1]},[r0,:32]
|
||||
bx r12
|
||||
.align 4
|
||||
.Lialu:
|
||||
#endif
|
||||
___
|
||||
$ret="r10"; # reassigned 1st argument
|
||||
$code.=<<___;
|
||||
stmdb sp!,{r4-r10,lr}
|
||||
mov $ret,r0 @ reassign 1st argument
|
||||
mov $b,r3 @ $b=b1
|
||||
ldr r3,[sp,#32] @ load b0
|
||||
mov $mask,#7<<2
|
||||
sub sp,sp,#32 @ allocate tab[8]
|
||||
|
||||
bl mul_1x1_ialu @ a1<61>b1
|
||||
str $lo,[$ret,#8]
|
||||
str $hi,[$ret,#12]
|
||||
|
||||
eor $b,$b,r3 @ flip b0 and b1
|
||||
eor $a,$a,r2 @ flip a0 and a1
|
||||
eor r3,r3,$b
|
||||
eor r2,r2,$a
|
||||
eor $b,$b,r3
|
||||
eor $a,$a,r2
|
||||
bl mul_1x1_ialu @ a0<61>b0
|
||||
str $lo,[$ret]
|
||||
str $hi,[$ret,#4]
|
||||
|
||||
eor $a,$a,r2
|
||||
eor $b,$b,r3
|
||||
bl mul_1x1_ialu @ (a1+a0)<29>(b1+b0)
|
||||
___
|
||||
@r=map("r$_",(6..9));
|
||||
$code.=<<___;
|
||||
ldmia $ret,{@r[0]-@r[3]}
|
||||
eor $lo,$lo,$hi
|
||||
eor $hi,$hi,@r[1]
|
||||
eor $lo,$lo,@r[0]
|
||||
eor $hi,$hi,@r[2]
|
||||
eor $lo,$lo,@r[3]
|
||||
eor $hi,$hi,@r[3]
|
||||
str $hi,[$ret,#8]
|
||||
eor $lo,$lo,$hi
|
||||
add sp,sp,#32 @ destroy tab[8]
|
||||
str $lo,[$ret,#4]
|
||||
|
||||
#if __ARM_ARCH__>=5
|
||||
ldmia sp!,{r4-r10,pc}
|
||||
#else
|
||||
ldmia sp!,{r4-r10,lr}
|
||||
tst lr,#1
|
||||
moveq pc,lr @ be binary compatible with V4, yet
|
||||
bx lr @ interoperable with Thumb ISA:-)
|
||||
#endif
|
||||
.size bn_GF2m_mul_2x2,.-bn_GF2m_mul_2x2
|
||||
#if __ARM_ARCH__>=7
|
||||
.align 5
|
||||
.LOPENSSL_armcap:
|
||||
.word OPENSSL_armcap_P-(.Lpic+8)
|
||||
#endif
|
||||
.asciz "GF(2^m) Multiplication for ARMv4/NEON, CRYPTOGAMS by <appro\@openssl.org>"
|
||||
.align 5
|
||||
|
||||
.comm OPENSSL_armcap_P,4,4
|
||||
___
|
||||
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm; # make it possible to compile with -march=armv4
|
||||
print $code;
|
||||
close STDOUT; # enforce flush
|
||||
@@ -23,6 +23,9 @@
|
||||
# than 1/2KB. Windows CE port would be trivial, as it's exclusively
|
||||
# about decorations, ABI and instruction syntax are identical.
|
||||
|
||||
while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
|
||||
open STDOUT,">$output";
|
||||
|
||||
$num="r0"; # starts as num argument, but holds &tp[num-1]
|
||||
$ap="r1";
|
||||
$bp="r2"; $bi="r2"; $rp="r2";
|
||||
@@ -89,9 +92,9 @@ bn_mul_mont:
|
||||
.L1st:
|
||||
ldr $aj,[$ap],#4 @ ap[j],ap++
|
||||
mov $alo,$ahi
|
||||
ldr $nj,[$np],#4 @ np[j],np++
|
||||
mov $ahi,#0
|
||||
umlal $alo,$ahi,$aj,$bi @ ap[j]*bp[0]
|
||||
ldr $nj,[$np],#4 @ np[j],np++
|
||||
mov $nhi,#0
|
||||
umlal $nlo,$nhi,$nj,$n0 @ np[j]*n0
|
||||
adds $nlo,$nlo,$alo
|
||||
@@ -101,21 +104,21 @@ bn_mul_mont:
|
||||
bne .L1st
|
||||
|
||||
adds $nlo,$nlo,$ahi
|
||||
mov $nhi,#0
|
||||
adc $nhi,$nhi,#0
|
||||
ldr $tp,[$_bp] @ restore bp
|
||||
str $nlo,[$num] @ tp[num-1]=
|
||||
mov $nhi,#0
|
||||
ldr $n0,[$_n0] @ restore n0
|
||||
adc $nhi,$nhi,#0
|
||||
str $nlo,[$num] @ tp[num-1]=
|
||||
str $nhi,[$num,#4] @ tp[num]=
|
||||
|
||||
.Louter:
|
||||
sub $tj,$num,sp @ "original" $num-1 value
|
||||
sub $ap,$ap,$tj @ "rewind" ap to &ap[1]
|
||||
sub $np,$np,$tj @ "rewind" np to &np[1]
|
||||
ldr $bi,[$tp,#4]! @ *(++bp)
|
||||
sub $np,$np,$tj @ "rewind" np to &np[1]
|
||||
ldr $aj,[$ap,#-4] @ ap[0]
|
||||
ldr $nj,[$np,#-4] @ np[0]
|
||||
ldr $alo,[sp] @ tp[0]
|
||||
ldr $nj,[$np,#-4] @ np[0]
|
||||
ldr $tj,[sp,#4] @ tp[1]
|
||||
|
||||
mov $ahi,#0
|
||||
@@ -129,13 +132,13 @@ bn_mul_mont:
|
||||
.Linner:
|
||||
ldr $aj,[$ap],#4 @ ap[j],ap++
|
||||
adds $alo,$ahi,$tj @ +=tp[j]
|
||||
ldr $nj,[$np],#4 @ np[j],np++
|
||||
mov $ahi,#0
|
||||
umlal $alo,$ahi,$aj,$bi @ ap[j]*bp[i]
|
||||
ldr $nj,[$np],#4 @ np[j],np++
|
||||
mov $nhi,#0
|
||||
umlal $nlo,$nhi,$nj,$n0 @ np[j]*n0
|
||||
ldr $tj,[$tp,#8] @ tp[j+1]
|
||||
adc $ahi,$ahi,#0
|
||||
ldr $tj,[$tp,#8] @ tp[j+1]
|
||||
adds $nlo,$nlo,$alo
|
||||
str $nlo,[$tp],#4 @ tp[j-1]=,tp++
|
||||
adc $nlo,$nhi,#0
|
||||
@@ -144,13 +147,13 @@ bn_mul_mont:
|
||||
|
||||
adds $nlo,$nlo,$ahi
|
||||
mov $nhi,#0
|
||||
adc $nhi,$nhi,#0
|
||||
adds $nlo,$nlo,$tj
|
||||
adc $nhi,$nhi,#0
|
||||
ldr $tp,[$_bp] @ restore bp
|
||||
ldr $tj,[$_bpend] @ restore &bp[num]
|
||||
str $nlo,[$num] @ tp[num-1]=
|
||||
adc $nhi,$nhi,#0
|
||||
ldr $n0,[$_n0] @ restore n0
|
||||
adds $nlo,$nlo,$tj
|
||||
ldr $tj,[$_bpend] @ restore &bp[num]
|
||||
adc $nhi,$nhi,#0
|
||||
str $nlo,[$num] @ tp[num-1]=
|
||||
str $nhi,[$num,#4] @ tp[num]=
|
||||
|
||||
cmp $tp,$tj
|
||||
|
||||
851
crypto/bn/asm/ia64-mont.pl
Normal file
851
crypto/bn/asm/ia64-mont.pl
Normal file
@@ -0,0 +1,851 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# ====================================================================
|
||||
# Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
|
||||
# project. The module is, however, dual licensed under OpenSSL and
|
||||
# CRYPTOGAMS licenses depending on where you obtain it. For further
|
||||
# details see http://www.openssl.org/~appro/cryptogams/.
|
||||
# ====================================================================
|
||||
|
||||
# January 2010
|
||||
#
|
||||
# "Teaser" Montgomery multiplication module for IA-64. There are
|
||||
# several possibilities for improvement:
|
||||
#
|
||||
# - modulo-scheduling outer loop would eliminate quite a number of
|
||||
# stalls after ldf8, xma and getf.sig outside inner loop and
|
||||
# improve shorter key performance;
|
||||
# - shorter vector support [with input vectors being fetched only
|
||||
# once] should be added;
|
||||
# - 2x unroll with help of n0[1] would make the code scalable on
|
||||
# "wider" IA-64, "wider" than Itanium 2 that is, which is not of
|
||||
# acute interest, because upcoming Tukwila's individual cores are
|
||||
# reportedly based on Itanium 2 design;
|
||||
# - dedicated squaring procedure(?);
|
||||
#
|
||||
# January 2010
|
||||
#
|
||||
# Shorter vector support is implemented by zero-padding ap and np
|
||||
# vectors up to 8 elements, or 512 bits. This means that 256-bit
|
||||
# inputs will be processed only 2 times faster than 512-bit inputs,
|
||||
# not 4 [as one would expect, because algorithm complexity is n^2].
|
||||
# The reason for padding is that inputs shorter than 512 bits won't
|
||||
# be processed faster anyway, because minimal critical path of the
|
||||
# core loop happens to match 512-bit timing. Either way, it resulted
|
||||
# in >100% improvement of 512-bit RSA sign benchmark and 50% - of
|
||||
# 1024-bit one [in comparison to original version of *this* module].
|
||||
#
|
||||
# So far 'openssl speed rsa dsa' output on 900MHz Itanium 2 *with*
|
||||
# this module is:
|
||||
# sign verify sign/s verify/s
|
||||
# rsa 512 bits 0.000290s 0.000024s 3452.8 42031.4
|
||||
# rsa 1024 bits 0.000793s 0.000058s 1261.7 17172.0
|
||||
# rsa 2048 bits 0.005908s 0.000148s 169.3 6754.0
|
||||
# rsa 4096 bits 0.033456s 0.000469s 29.9 2133.6
|
||||
# dsa 512 bits 0.000253s 0.000198s 3949.9 5057.0
|
||||
# dsa 1024 bits 0.000585s 0.000607s 1708.4 1647.4
|
||||
# dsa 2048 bits 0.001453s 0.001703s 688.1 587.4
|
||||
#
|
||||
# ... and *without* (but still with ia64.S):
|
||||
#
|
||||
# rsa 512 bits 0.000670s 0.000041s 1491.8 24145.5
|
||||
# rsa 1024 bits 0.001988s 0.000080s 502.9 12499.3
|
||||
# rsa 2048 bits 0.008702s 0.000189s 114.9 5293.9
|
||||
# rsa 4096 bits 0.043860s 0.000533s 22.8 1875.9
|
||||
# dsa 512 bits 0.000441s 0.000427s 2265.3 2340.6
|
||||
# dsa 1024 bits 0.000823s 0.000867s 1215.6 1153.2
|
||||
# dsa 2048 bits 0.001894s 0.002179s 528.1 458.9
|
||||
#
|
||||
# As it can be seen, RSA sign performance improves by 130-30%,
|
||||
# hereafter less for longer keys, while verify - by 74-13%.
|
||||
# DSA performance improves by 115-30%.
|
||||
|
||||
if ($^O eq "hpux") {
|
||||
$ADDP="addp4";
|
||||
for (@ARGV) { $ADDP="add" if (/[\+DD|\-mlp]64/); }
|
||||
} else { $ADDP="add"; }
|
||||
|
||||
$code=<<___;
|
||||
.explicit
|
||||
.text
|
||||
|
||||
// int bn_mul_mont (BN_ULONG *rp,const BN_ULONG *ap,
|
||||
// const BN_ULONG *bp,const BN_ULONG *np,
|
||||
// const BN_ULONG *n0p,int num);
|
||||
.align 64
|
||||
.global bn_mul_mont#
|
||||
.proc bn_mul_mont#
|
||||
bn_mul_mont:
|
||||
.prologue
|
||||
.body
|
||||
{ .mmi; cmp4.le p6,p7=2,r37;;
|
||||
(p6) cmp4.lt.unc p8,p9=8,r37
|
||||
mov ret0=r0 };;
|
||||
{ .bbb;
|
||||
(p9) br.cond.dptk.many bn_mul_mont_8
|
||||
(p8) br.cond.dpnt.many bn_mul_mont_general
|
||||
(p7) br.ret.spnt.many b0 };;
|
||||
.endp bn_mul_mont#
|
||||
|
||||
prevfs=r2; prevpr=r3; prevlc=r10; prevsp=r11;
|
||||
|
||||
rptr=r8; aptr=r9; bptr=r14; nptr=r15;
|
||||
tptr=r16; // &tp[0]
|
||||
tp_1=r17; // &tp[-1]
|
||||
num=r18; len=r19; lc=r20;
|
||||
topbit=r21; // carry bit from tmp[num]
|
||||
|
||||
n0=f6;
|
||||
m0=f7;
|
||||
bi=f8;
|
||||
|
||||
.align 64
|
||||
.local bn_mul_mont_general#
|
||||
.proc bn_mul_mont_general#
|
||||
bn_mul_mont_general:
|
||||
.prologue
|
||||
{ .mmi; .save ar.pfs,prevfs
|
||||
alloc prevfs=ar.pfs,6,2,0,8
|
||||
$ADDP aptr=0,in1
|
||||
.save ar.lc,prevlc
|
||||
mov prevlc=ar.lc }
|
||||
{ .mmi; .vframe prevsp
|
||||
mov prevsp=sp
|
||||
$ADDP bptr=0,in2
|
||||
.save pr,prevpr
|
||||
mov prevpr=pr };;
|
||||
|
||||
.body
|
||||
.rotf alo[6],nlo[4],ahi[8],nhi[6]
|
||||
.rotr a[3],n[3],t[2]
|
||||
|
||||
{ .mmi; ldf8 bi=[bptr],8 // (*bp++)
|
||||
ldf8 alo[4]=[aptr],16 // ap[0]
|
||||
$ADDP r30=8,in1 };;
|
||||
{ .mmi; ldf8 alo[3]=[r30],16 // ap[1]
|
||||
ldf8 alo[2]=[aptr],16 // ap[2]
|
||||
$ADDP in4=0,in4 };;
|
||||
{ .mmi; ldf8 alo[1]=[r30] // ap[3]
|
||||
ldf8 n0=[in4] // n0
|
||||
$ADDP rptr=0,in0 }
|
||||
{ .mmi; $ADDP nptr=0,in3
|
||||
mov r31=16
|
||||
zxt4 num=in5 };;
|
||||
{ .mmi; ldf8 nlo[2]=[nptr],8 // np[0]
|
||||
shladd len=num,3,r0
|
||||
shladd r31=num,3,r31 };;
|
||||
{ .mmi; ldf8 nlo[1]=[nptr],8 // np[1]
|
||||
add lc=-5,num
|
||||
sub r31=sp,r31 };;
|
||||
{ .mfb; and sp=-16,r31 // alloca
|
||||
xmpy.hu ahi[2]=alo[4],bi // ap[0]*bp[0]
|
||||
nop.b 0 }
|
||||
{ .mfb; nop.m 0
|
||||
xmpy.lu alo[4]=alo[4],bi
|
||||
brp.loop.imp .L1st_ctop,.L1st_cend-16
|
||||
};;
|
||||
{ .mfi; nop.m 0
|
||||
xma.hu ahi[1]=alo[3],bi,ahi[2] // ap[1]*bp[0]
|
||||
add tp_1=8,sp }
|
||||
{ .mfi; nop.m 0
|
||||
xma.lu alo[3]=alo[3],bi,ahi[2]
|
||||
mov pr.rot=0x20001f<<16
|
||||
// ------^----- (p40) at first (p23)
|
||||
// ----------^^ p[16:20]=1
|
||||
};;
|
||||
{ .mfi; nop.m 0
|
||||
xmpy.lu m0=alo[4],n0 // (ap[0]*bp[0])*n0
|
||||
mov ar.lc=lc }
|
||||
{ .mfi; nop.m 0
|
||||
fcvt.fxu.s1 nhi[1]=f0
|
||||
mov ar.ec=8 };;
|
||||
|
||||
.align 32
|
||||
.L1st_ctop:
|
||||
.pred.rel "mutex",p40,p42
|
||||
{ .mfi; (p16) ldf8 alo[0]=[aptr],8 // *(aptr++)
|
||||
(p18) xma.hu ahi[0]=alo[2],bi,ahi[1]
|
||||
(p40) add n[2]=n[2],a[2] } // (p23) }
|
||||
{ .mfi; (p18) ldf8 nlo[0]=[nptr],8 // *(nptr++)(p16)
|
||||
(p18) xma.lu alo[2]=alo[2],bi,ahi[1]
|
||||
(p42) add n[2]=n[2],a[2],1 };; // (p23)
|
||||
{ .mfi; (p21) getf.sig a[0]=alo[5]
|
||||
(p20) xma.hu nhi[0]=nlo[2],m0,nhi[1]
|
||||
(p42) cmp.leu p41,p39=n[2],a[2] } // (p23)
|
||||
{ .mfi; (p23) st8 [tp_1]=n[2],8
|
||||
(p20) xma.lu nlo[2]=nlo[2],m0,nhi[1]
|
||||
(p40) cmp.ltu p41,p39=n[2],a[2] } // (p23)
|
||||
{ .mmb; (p21) getf.sig n[0]=nlo[3]
|
||||
(p16) nop.m 0
|
||||
br.ctop.sptk .L1st_ctop };;
|
||||
.L1st_cend:
|
||||
|
||||
{ .mmi; getf.sig a[0]=ahi[6] // (p24)
|
||||
getf.sig n[0]=nhi[4]
|
||||
add num=-1,num };; // num--
|
||||
{ .mmi; .pred.rel "mutex",p40,p42
|
||||
(p40) add n[0]=n[0],a[0]
|
||||
(p42) add n[0]=n[0],a[0],1
|
||||
sub aptr=aptr,len };; // rewind
|
||||
{ .mmi; .pred.rel "mutex",p40,p42
|
||||
(p40) cmp.ltu p41,p39=n[0],a[0]
|
||||
(p42) cmp.leu p41,p39=n[0],a[0]
|
||||
sub nptr=nptr,len };;
|
||||
{ .mmi; .pred.rel "mutex",p39,p41
|
||||
(p39) add topbit=r0,r0
|
||||
(p41) add topbit=r0,r0,1
|
||||
nop.i 0 }
|
||||
{ .mmi; st8 [tp_1]=n[0]
|
||||
add tptr=16,sp
|
||||
add tp_1=8,sp };;
|
||||
|
||||
.Louter:
|
||||
{ .mmi; ldf8 bi=[bptr],8 // (*bp++)
|
||||
ldf8 ahi[3]=[tptr] // tp[0]
|
||||
add r30=8,aptr };;
|
||||
{ .mmi; ldf8 alo[4]=[aptr],16 // ap[0]
|
||||
ldf8 alo[3]=[r30],16 // ap[1]
|
||||
add r31=8,nptr };;
|
||||
{ .mfb; ldf8 alo[2]=[aptr],16 // ap[2]
|
||||
xma.hu ahi[2]=alo[4],bi,ahi[3] // ap[0]*bp[i]+tp[0]
|
||||
brp.loop.imp .Linner_ctop,.Linner_cend-16
|
||||
}
|
||||
{ .mfb; ldf8 alo[1]=[r30] // ap[3]
|
||||
xma.lu alo[4]=alo[4],bi,ahi[3]
|
||||
clrrrb.pr };;
|
||||
{ .mfi; ldf8 nlo[2]=[nptr],16 // np[0]
|
||||
xma.hu ahi[1]=alo[3],bi,ahi[2] // ap[1]*bp[i]
|
||||
nop.i 0 }
|
||||
{ .mfi; ldf8 nlo[1]=[r31] // np[1]
|
||||
xma.lu alo[3]=alo[3],bi,ahi[2]
|
||||
mov pr.rot=0x20101f<<16
|
||||
// ------^----- (p40) at first (p23)
|
||||
// --------^--- (p30) at first (p22)
|
||||
// ----------^^ p[16:20]=1
|
||||
};;
|
||||
{ .mfi; st8 [tptr]=r0 // tp[0] is already accounted
|
||||
xmpy.lu m0=alo[4],n0 // (ap[0]*bp[i]+tp[0])*n0
|
||||
mov ar.lc=lc }
|
||||
{ .mfi;
|
||||
fcvt.fxu.s1 nhi[1]=f0
|
||||
mov ar.ec=8 };;
|
||||
|
||||
// This loop spins in 4*(n+7) ticks on Itanium 2 and should spin in
|
||||
// 7*(n+7) ticks on Itanium (the one codenamed Merced). Factor of 7
|
||||
// in latter case accounts for two-tick pipeline stall, which means
|
||||
// that its performance would be ~20% lower than optimal one. No
|
||||
// attempt was made to address this, because original Itanium is
|
||||
// hardly represented out in the wild...
|
||||
.align 32
|
||||
.Linner_ctop:
|
||||
.pred.rel "mutex",p40,p42
|
||||
.pred.rel "mutex",p30,p32
|
||||
{ .mfi; (p16) ldf8 alo[0]=[aptr],8 // *(aptr++)
|
||||
(p18) xma.hu ahi[0]=alo[2],bi,ahi[1]
|
||||
(p40) add n[2]=n[2],a[2] } // (p23)
|
||||
{ .mfi; (p16) nop.m 0
|
||||
(p18) xma.lu alo[2]=alo[2],bi,ahi[1]
|
||||
(p42) add n[2]=n[2],a[2],1 };; // (p23)
|
||||
{ .mfi; (p21) getf.sig a[0]=alo[5]
|
||||
(p16) nop.f 0
|
||||
(p40) cmp.ltu p41,p39=n[2],a[2] } // (p23)
|
||||
{ .mfi; (p21) ld8 t[0]=[tptr],8
|
||||
(p16) nop.f 0
|
||||
(p42) cmp.leu p41,p39=n[2],a[2] };; // (p23)
|
||||
{ .mfi; (p18) ldf8 nlo[0]=[nptr],8 // *(nptr++)
|
||||
(p20) xma.hu nhi[0]=nlo[2],m0,nhi[1]
|
||||
(p30) add a[1]=a[1],t[1] } // (p22)
|
||||
{ .mfi; (p16) nop.m 0
|
||||
(p20) xma.lu nlo[2]=nlo[2],m0,nhi[1]
|
||||
(p32) add a[1]=a[1],t[1],1 };; // (p22)
|
||||
{ .mmi; (p21) getf.sig n[0]=nlo[3]
|
||||
(p16) nop.m 0
|
||||
(p30) cmp.ltu p31,p29=a[1],t[1] } // (p22)
|
||||
{ .mmb; (p23) st8 [tp_1]=n[2],8
|
||||
(p32) cmp.leu p31,p29=a[1],t[1] // (p22)
|
||||
br.ctop.sptk .Linner_ctop };;
|
||||
.Linner_cend:
|
||||
|
||||
{ .mmi; getf.sig a[0]=ahi[6] // (p24)
|
||||
getf.sig n[0]=nhi[4]
|
||||
nop.i 0 };;
|
||||
|
||||
{ .mmi; .pred.rel "mutex",p31,p33
|
||||
(p31) add a[0]=a[0],topbit
|
||||
(p33) add a[0]=a[0],topbit,1
|
||||
mov topbit=r0 };;
|
||||
{ .mfi; .pred.rel "mutex",p31,p33
|
||||
(p31) cmp.ltu p32,p30=a[0],topbit
|
||||
(p33) cmp.leu p32,p30=a[0],topbit
|
||||
}
|
||||
{ .mfi; .pred.rel "mutex",p40,p42
|
||||
(p40) add n[0]=n[0],a[0]
|
||||
(p42) add n[0]=n[0],a[0],1
|
||||
};;
|
||||
{ .mmi; .pred.rel "mutex",p44,p46
|
||||
(p40) cmp.ltu p41,p39=n[0],a[0]
|
||||
(p42) cmp.leu p41,p39=n[0],a[0]
|
||||
(p32) add topbit=r0,r0,1 }
|
||||
|
||||
{ .mmi; st8 [tp_1]=n[0],8
|
||||
cmp4.ne p6,p0=1,num
|
||||
sub aptr=aptr,len };; // rewind
|
||||
{ .mmi; sub nptr=nptr,len
|
||||
(p41) add topbit=r0,r0,1
|
||||
add tptr=16,sp }
|
||||
{ .mmb; add tp_1=8,sp
|
||||
add num=-1,num // num--
|
||||
(p6) br.cond.sptk.many .Louter };;
|
||||
|
||||
{ .mbb; add lc=4,lc
|
||||
brp.loop.imp .Lsub_ctop,.Lsub_cend-16
|
||||
clrrrb.pr };;
|
||||
{ .mii; nop.m 0
|
||||
mov pr.rot=0x10001<<16
|
||||
// ------^---- (p33) at first (p17)
|
||||
mov ar.lc=lc }
|
||||
{ .mii; nop.m 0
|
||||
mov ar.ec=3
|
||||
nop.i 0 };;
|
||||
|
||||
.Lsub_ctop:
|
||||
.pred.rel "mutex",p33,p35
|
||||
{ .mfi; (p16) ld8 t[0]=[tptr],8 // t=*(tp++)
|
||||
(p16) nop.f 0
|
||||
(p33) sub n[1]=t[1],n[1] } // (p17)
|
||||
{ .mfi; (p16) ld8 n[0]=[nptr],8 // n=*(np++)
|
||||
(p16) nop.f 0
|
||||
(p35) sub n[1]=t[1],n[1],1 };; // (p17)
|
||||
{ .mib; (p18) st8 [rptr]=n[2],8 // *(rp++)=r
|
||||
(p33) cmp.gtu p34,p32=n[1],t[1] // (p17)
|
||||
(p18) nop.b 0 }
|
||||
{ .mib; (p18) nop.m 0
|
||||
(p35) cmp.geu p34,p32=n[1],t[1] // (p17)
|
||||
br.ctop.sptk .Lsub_ctop };;
|
||||
.Lsub_cend:
|
||||
|
||||
{ .mmb; .pred.rel "mutex",p34,p36
|
||||
(p34) sub topbit=topbit,r0 // (p19)
|
||||
(p36) sub topbit=topbit,r0,1
|
||||
brp.loop.imp .Lcopy_ctop,.Lcopy_cend-16
|
||||
}
|
||||
{ .mmb; sub rptr=rptr,len // rewind
|
||||
sub tptr=tptr,len
|
||||
clrrrb.pr };;
|
||||
{ .mmi; and aptr=tptr,topbit
|
||||
andcm bptr=rptr,topbit
|
||||
mov pr.rot=1<<16 };;
|
||||
{ .mii; or nptr=aptr,bptr
|
||||
mov ar.lc=lc
|
||||
mov ar.ec=3 };;
|
||||
|
||||
.Lcopy_ctop:
|
||||
{ .mmb; (p16) ld8 n[0]=[nptr],8
|
||||
(p18) st8 [tptr]=r0,8
|
||||
(p16) nop.b 0 }
|
||||
{ .mmb; (p16) nop.m 0
|
||||
(p18) st8 [rptr]=n[2],8
|
||||
br.ctop.sptk .Lcopy_ctop };;
|
||||
.Lcopy_cend:
|
||||
|
||||
{ .mmi; mov ret0=1 // signal "handled"
|
||||
rum 1<<5 // clear um.mfh
|
||||
mov ar.lc=prevlc }
|
||||
{ .mib; .restore sp
|
||||
mov sp=prevsp
|
||||
mov pr=prevpr,0x1ffff
|
||||
br.ret.sptk.many b0 };;
|
||||
.endp bn_mul_mont_general#
|
||||
|
||||
a1=r16; a2=r17; a3=r18; a4=r19; a5=r20; a6=r21; a7=r22; a8=r23;
|
||||
n1=r24; n2=r25; n3=r26; n4=r27; n5=r28; n6=r29; n7=r30; n8=r31;
|
||||
t0=r15;
|
||||
|
||||
ai0=f8; ai1=f9; ai2=f10; ai3=f11; ai4=f12; ai5=f13; ai6=f14; ai7=f15;
|
||||
ni0=f16; ni1=f17; ni2=f18; ni3=f19; ni4=f20; ni5=f21; ni6=f22; ni7=f23;
|
||||
|
||||
.align 64
|
||||
.skip 48 // aligns loop body
|
||||
.local bn_mul_mont_8#
|
||||
.proc bn_mul_mont_8#
|
||||
bn_mul_mont_8:
|
||||
.prologue
|
||||
{ .mmi; .save ar.pfs,prevfs
|
||||
alloc prevfs=ar.pfs,6,2,0,8
|
||||
.vframe prevsp
|
||||
mov prevsp=sp
|
||||
.save ar.lc,prevlc
|
||||
mov prevlc=ar.lc }
|
||||
{ .mmi; add r17=-6*16,sp
|
||||
add sp=-7*16,sp
|
||||
.save pr,prevpr
|
||||
mov prevpr=pr };;
|
||||
|
||||
{ .mmi; .save.gf 0,0x10
|
||||
stf.spill [sp]=f16,-16
|
||||
.save.gf 0,0x20
|
||||
stf.spill [r17]=f17,32
|
||||
add r16=-5*16,prevsp};;
|
||||
{ .mmi; .save.gf 0,0x40
|
||||
stf.spill [r16]=f18,32
|
||||
.save.gf 0,0x80
|
||||
stf.spill [r17]=f19,32
|
||||
$ADDP aptr=0,in1 };;
|
||||
{ .mmi; .save.gf 0,0x100
|
||||
stf.spill [r16]=f20,32
|
||||
.save.gf 0,0x200
|
||||
stf.spill [r17]=f21,32
|
||||
$ADDP r29=8,in1 };;
|
||||
{ .mmi; .save.gf 0,0x400
|
||||
stf.spill [r16]=f22
|
||||
.save.gf 0,0x800
|
||||
stf.spill [r17]=f23
|
||||
$ADDP rptr=0,in0 };;
|
||||
|
||||
.body
|
||||
.rotf bj[8],mj[2],tf[2],alo[10],ahi[10],nlo[10],nhi[10]
|
||||
.rotr t[8]
|
||||
|
||||
// load input vectors padding them to 8 elements
|
||||
{ .mmi; ldf8 ai0=[aptr],16 // ap[0]
|
||||
ldf8 ai1=[r29],16 // ap[1]
|
||||
$ADDP bptr=0,in2 }
|
||||
{ .mmi; $ADDP r30=8,in2
|
||||
$ADDP nptr=0,in3
|
||||
$ADDP r31=8,in3 };;
|
||||
{ .mmi; ldf8 bj[7]=[bptr],16 // bp[0]
|
||||
ldf8 bj[6]=[r30],16 // bp[1]
|
||||
cmp4.le p4,p5=3,in5 }
|
||||
{ .mmi; ldf8 ni0=[nptr],16 // np[0]
|
||||
ldf8 ni1=[r31],16 // np[1]
|
||||
cmp4.le p6,p7=4,in5 };;
|
||||
|
||||
{ .mfi; (p4)ldf8 ai2=[aptr],16 // ap[2]
|
||||
(p5)fcvt.fxu ai2=f0
|
||||
cmp4.le p8,p9=5,in5 }
|
||||
{ .mfi; (p6)ldf8 ai3=[r29],16 // ap[3]
|
||||
(p7)fcvt.fxu ai3=f0
|
||||
cmp4.le p10,p11=6,in5 }
|
||||
{ .mfi; (p4)ldf8 bj[5]=[bptr],16 // bp[2]
|
||||
(p5)fcvt.fxu bj[5]=f0
|
||||
cmp4.le p12,p13=7,in5 }
|
||||
{ .mfi; (p6)ldf8 bj[4]=[r30],16 // bp[3]
|
||||
(p7)fcvt.fxu bj[4]=f0
|
||||
cmp4.le p14,p15=8,in5 }
|
||||
{ .mfi; (p4)ldf8 ni2=[nptr],16 // np[2]
|
||||
(p5)fcvt.fxu ni2=f0
|
||||
addp4 r28=-1,in5 }
|
||||
{ .mfi; (p6)ldf8 ni3=[r31],16 // np[3]
|
||||
(p7)fcvt.fxu ni3=f0
|
||||
$ADDP in4=0,in4 };;
|
||||
|
||||
{ .mfi; ldf8 n0=[in4]
|
||||
fcvt.fxu tf[1]=f0
|
||||
nop.i 0 }
|
||||
|
||||
{ .mfi; (p8)ldf8 ai4=[aptr],16 // ap[4]
|
||||
(p9)fcvt.fxu ai4=f0
|
||||
mov t[0]=r0 }
|
||||
{ .mfi; (p10)ldf8 ai5=[r29],16 // ap[5]
|
||||
(p11)fcvt.fxu ai5=f0
|
||||
mov t[1]=r0 }
|
||||
{ .mfi; (p8)ldf8 bj[3]=[bptr],16 // bp[4]
|
||||
(p9)fcvt.fxu bj[3]=f0
|
||||
mov t[2]=r0 }
|
||||
{ .mfi; (p10)ldf8 bj[2]=[r30],16 // bp[5]
|
||||
(p11)fcvt.fxu bj[2]=f0
|
||||
mov t[3]=r0 }
|
||||
{ .mfi; (p8)ldf8 ni4=[nptr],16 // np[4]
|
||||
(p9)fcvt.fxu ni4=f0
|
||||
mov t[4]=r0 }
|
||||
{ .mfi; (p10)ldf8 ni5=[r31],16 // np[5]
|
||||
(p11)fcvt.fxu ni5=f0
|
||||
mov t[5]=r0 };;
|
||||
|
||||
{ .mfi; (p12)ldf8 ai6=[aptr],16 // ap[6]
|
||||
(p13)fcvt.fxu ai6=f0
|
||||
mov t[6]=r0 }
|
||||
{ .mfi; (p14)ldf8 ai7=[r29],16 // ap[7]
|
||||
(p15)fcvt.fxu ai7=f0
|
||||
mov t[7]=r0 }
|
||||
{ .mfi; (p12)ldf8 bj[1]=[bptr],16 // bp[6]
|
||||
(p13)fcvt.fxu bj[1]=f0
|
||||
mov ar.lc=r28 }
|
||||
{ .mfi; (p14)ldf8 bj[0]=[r30],16 // bp[7]
|
||||
(p15)fcvt.fxu bj[0]=f0
|
||||
mov ar.ec=1 }
|
||||
{ .mfi; (p12)ldf8 ni6=[nptr],16 // np[6]
|
||||
(p13)fcvt.fxu ni6=f0
|
||||
mov pr.rot=1<<16 }
|
||||
{ .mfb; (p14)ldf8 ni7=[r31],16 // np[7]
|
||||
(p15)fcvt.fxu ni7=f0
|
||||
brp.loop.imp .Louter_8_ctop,.Louter_8_cend-16
|
||||
};;
|
||||
|
||||
// The loop is scheduled for 32*n ticks on Itanium 2. Actual attempt
|
||||
// to measure with help of Interval Time Counter indicated that the
|
||||
// factor is a tad higher: 33 or 34, if not 35. Exact measurement and
|
||||
// addressing the issue is problematic, because I don't have access
|
||||
// to platform-specific instruction-level profiler. On Itanium it
|
||||
// should run in 56*n ticks, because of higher xma latency...
|
||||
.Louter_8_ctop:
|
||||
.pred.rel "mutex",p40,p42
|
||||
.pred.rel "mutex",p48,p50
|
||||
{ .mfi; (p16) nop.m 0 // 0:
|
||||
(p16) xma.hu ahi[0]=ai0,bj[7],tf[1] // ap[0]*b[i]+t[0]
|
||||
(p40) add a3=a3,n3 } // (p17) a3+=n3
|
||||
{ .mfi; (p42) add a3=a3,n3,1
|
||||
(p16) xma.lu alo[0]=ai0,bj[7],tf[1]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p17) getf.sig a7=alo[8] // 1:
|
||||
(p48) add t[6]=t[6],a3 // (p17) t[6]+=a3
|
||||
(p50) add t[6]=t[6],a3,1 };;
|
||||
{ .mfi; (p17) getf.sig a8=ahi[8] // 2:
|
||||
(p17) xma.hu nhi[7]=ni6,mj[1],nhi[6] // np[6]*m0
|
||||
(p40) cmp.ltu p43,p41=a3,n3 }
|
||||
{ .mfi; (p42) cmp.leu p43,p41=a3,n3
|
||||
(p17) xma.lu nlo[7]=ni6,mj[1],nhi[6]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p17) getf.sig n5=nlo[6] // 3:
|
||||
(p48) cmp.ltu p51,p49=t[6],a3
|
||||
(p50) cmp.leu p51,p49=t[6],a3 };;
|
||||
.pred.rel "mutex",p41,p43
|
||||
.pred.rel "mutex",p49,p51
|
||||
{ .mfi; (p16) nop.m 0 // 4:
|
||||
(p16) xma.hu ahi[1]=ai1,bj[7],ahi[0] // ap[1]*b[i]
|
||||
(p41) add a4=a4,n4 } // (p17) a4+=n4
|
||||
{ .mfi; (p43) add a4=a4,n4,1
|
||||
(p16) xma.lu alo[1]=ai1,bj[7],ahi[0]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mfi; (p49) add t[5]=t[5],a4 // 5: (p17) t[5]+=a4
|
||||
(p16) xmpy.lu mj[0]=alo[0],n0 // (ap[0]*b[i]+t[0])*n0
|
||||
(p51) add t[5]=t[5],a4,1 };;
|
||||
{ .mfi; (p16) nop.m 0 // 6:
|
||||
(p17) xma.hu nhi[8]=ni7,mj[1],nhi[7] // np[7]*m0
|
||||
(p41) cmp.ltu p42,p40=a4,n4 }
|
||||
{ .mfi; (p43) cmp.leu p42,p40=a4,n4
|
||||
(p17) xma.lu nlo[8]=ni7,mj[1],nhi[7]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p17) getf.sig n6=nlo[7] // 7:
|
||||
(p49) cmp.ltu p50,p48=t[5],a4
|
||||
(p51) cmp.leu p50,p48=t[5],a4 };;
|
||||
.pred.rel "mutex",p40,p42
|
||||
.pred.rel "mutex",p48,p50
|
||||
{ .mfi; (p16) nop.m 0 // 8:
|
||||
(p16) xma.hu ahi[2]=ai2,bj[7],ahi[1] // ap[2]*b[i]
|
||||
(p40) add a5=a5,n5 } // (p17) a5+=n5
|
||||
{ .mfi; (p42) add a5=a5,n5,1
|
||||
(p16) xma.lu alo[2]=ai2,bj[7],ahi[1]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p16) getf.sig a1=alo[1] // 9:
|
||||
(p48) add t[4]=t[4],a5 // p(17) t[4]+=a5
|
||||
(p50) add t[4]=t[4],a5,1 };;
|
||||
{ .mfi; (p16) nop.m 0 // 10:
|
||||
(p16) xma.hu nhi[0]=ni0,mj[0],alo[0] // np[0]*m0
|
||||
(p40) cmp.ltu p43,p41=a5,n5 }
|
||||
{ .mfi; (p42) cmp.leu p43,p41=a5,n5
|
||||
(p16) xma.lu nlo[0]=ni0,mj[0],alo[0]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p17) getf.sig n7=nlo[8] // 11:
|
||||
(p48) cmp.ltu p51,p49=t[4],a5
|
||||
(p50) cmp.leu p51,p49=t[4],a5 };;
|
||||
.pred.rel "mutex",p41,p43
|
||||
.pred.rel "mutex",p49,p51
|
||||
{ .mfi; (p17) getf.sig n8=nhi[8] // 12:
|
||||
(p16) xma.hu ahi[3]=ai3,bj[7],ahi[2] // ap[3]*b[i]
|
||||
(p41) add a6=a6,n6 } // (p17) a6+=n6
|
||||
{ .mfi; (p43) add a6=a6,n6,1
|
||||
(p16) xma.lu alo[3]=ai3,bj[7],ahi[2]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p16) getf.sig a2=alo[2] // 13:
|
||||
(p49) add t[3]=t[3],a6 // (p17) t[3]+=a6
|
||||
(p51) add t[3]=t[3],a6,1 };;
|
||||
{ .mfi; (p16) nop.m 0 // 14:
|
||||
(p16) xma.hu nhi[1]=ni1,mj[0],nhi[0] // np[1]*m0
|
||||
(p41) cmp.ltu p42,p40=a6,n6 }
|
||||
{ .mfi; (p43) cmp.leu p42,p40=a6,n6
|
||||
(p16) xma.lu nlo[1]=ni1,mj[0],nhi[0]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p16) nop.m 0 // 15:
|
||||
(p49) cmp.ltu p50,p48=t[3],a6
|
||||
(p51) cmp.leu p50,p48=t[3],a6 };;
|
||||
.pred.rel "mutex",p40,p42
|
||||
.pred.rel "mutex",p48,p50
|
||||
{ .mfi; (p16) nop.m 0 // 16:
|
||||
(p16) xma.hu ahi[4]=ai4,bj[7],ahi[3] // ap[4]*b[i]
|
||||
(p40) add a7=a7,n7 } // (p17) a7+=n7
|
||||
{ .mfi; (p42) add a7=a7,n7,1
|
||||
(p16) xma.lu alo[4]=ai4,bj[7],ahi[3]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p16) getf.sig a3=alo[3] // 17:
|
||||
(p48) add t[2]=t[2],a7 // (p17) t[2]+=a7
|
||||
(p50) add t[2]=t[2],a7,1 };;
|
||||
{ .mfi; (p16) nop.m 0 // 18:
|
||||
(p16) xma.hu nhi[2]=ni2,mj[0],nhi[1] // np[2]*m0
|
||||
(p40) cmp.ltu p43,p41=a7,n7 }
|
||||
{ .mfi; (p42) cmp.leu p43,p41=a7,n7
|
||||
(p16) xma.lu nlo[2]=ni2,mj[0],nhi[1]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p16) getf.sig n1=nlo[1] // 19:
|
||||
(p48) cmp.ltu p51,p49=t[2],a7
|
||||
(p50) cmp.leu p51,p49=t[2],a7 };;
|
||||
.pred.rel "mutex",p41,p43
|
||||
.pred.rel "mutex",p49,p51
|
||||
{ .mfi; (p16) nop.m 0 // 20:
|
||||
(p16) xma.hu ahi[5]=ai5,bj[7],ahi[4] // ap[5]*b[i]
|
||||
(p41) add a8=a8,n8 } // (p17) a8+=n8
|
||||
{ .mfi; (p43) add a8=a8,n8,1
|
||||
(p16) xma.lu alo[5]=ai5,bj[7],ahi[4]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p16) getf.sig a4=alo[4] // 21:
|
||||
(p49) add t[1]=t[1],a8 // (p17) t[1]+=a8
|
||||
(p51) add t[1]=t[1],a8,1 };;
|
||||
{ .mfi; (p16) nop.m 0 // 22:
|
||||
(p16) xma.hu nhi[3]=ni3,mj[0],nhi[2] // np[3]*m0
|
||||
(p41) cmp.ltu p42,p40=a8,n8 }
|
||||
{ .mfi; (p43) cmp.leu p42,p40=a8,n8
|
||||
(p16) xma.lu nlo[3]=ni3,mj[0],nhi[2]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p16) getf.sig n2=nlo[2] // 23:
|
||||
(p49) cmp.ltu p50,p48=t[1],a8
|
||||
(p51) cmp.leu p50,p48=t[1],a8 };;
|
||||
{ .mfi; (p16) nop.m 0 // 24:
|
||||
(p16) xma.hu ahi[6]=ai6,bj[7],ahi[5] // ap[6]*b[i]
|
||||
(p16) add a1=a1,n1 } // (p16) a1+=n1
|
||||
{ .mfi; (p16) nop.m 0
|
||||
(p16) xma.lu alo[6]=ai6,bj[7],ahi[5]
|
||||
(p17) mov t[0]=r0 };;
|
||||
{ .mii; (p16) getf.sig a5=alo[5] // 25:
|
||||
(p16) add t0=t[7],a1 // (p16) t[7]+=a1
|
||||
(p42) add t[0]=t[0],r0,1 };;
|
||||
{ .mfi; (p16) setf.sig tf[0]=t0 // 26:
|
||||
(p16) xma.hu nhi[4]=ni4,mj[0],nhi[3] // np[4]*m0
|
||||
(p50) add t[0]=t[0],r0,1 }
|
||||
{ .mfi; (p16) cmp.ltu.unc p42,p40=a1,n1
|
||||
(p16) xma.lu nlo[4]=ni4,mj[0],nhi[3]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p16) getf.sig n3=nlo[3] // 27:
|
||||
(p16) cmp.ltu.unc p50,p48=t0,a1
|
||||
(p16) nop.i 0 };;
|
||||
.pred.rel "mutex",p40,p42
|
||||
.pred.rel "mutex",p48,p50
|
||||
{ .mfi; (p16) nop.m 0 // 28:
|
||||
(p16) xma.hu ahi[7]=ai7,bj[7],ahi[6] // ap[7]*b[i]
|
||||
(p40) add a2=a2,n2 } // (p16) a2+=n2
|
||||
{ .mfi; (p42) add a2=a2,n2,1
|
||||
(p16) xma.lu alo[7]=ai7,bj[7],ahi[6]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mii; (p16) getf.sig a6=alo[6] // 29:
|
||||
(p48) add t[6]=t[6],a2 // (p16) t[6]+=a2
|
||||
(p50) add t[6]=t[6],a2,1 };;
|
||||
{ .mfi; (p16) nop.m 0 // 30:
|
||||
(p16) xma.hu nhi[5]=ni5,mj[0],nhi[4] // np[5]*m0
|
||||
(p40) cmp.ltu p41,p39=a2,n2 }
|
||||
{ .mfi; (p42) cmp.leu p41,p39=a2,n2
|
||||
(p16) xma.lu nlo[5]=ni5,mj[0],nhi[4]
|
||||
(p16) nop.i 0 };;
|
||||
{ .mfi; (p16) getf.sig n4=nlo[4] // 31:
|
||||
(p16) nop.f 0
|
||||
(p48) cmp.ltu p49,p47=t[6],a2 }
|
||||
{ .mfb; (p50) cmp.leu p49,p47=t[6],a2
|
||||
(p16) nop.f 0
|
||||
br.ctop.sptk.many .Louter_8_ctop };;
|
||||
.Louter_8_cend:
|
||||
|
||||
// above loop has to execute one more time, without (p16), which is
|
||||
// replaced with merged move of np[8] to GPR bank
|
||||
.pred.rel "mutex",p40,p42
|
||||
.pred.rel "mutex",p48,p50
|
||||
{ .mmi; (p0) getf.sig n1=ni0 // 0:
|
||||
(p40) add a3=a3,n3 // (p17) a3+=n3
|
||||
(p42) add a3=a3,n3,1 };;
|
||||
{ .mii; (p17) getf.sig a7=alo[8] // 1:
|
||||
(p48) add t[6]=t[6],a3 // (p17) t[6]+=a3
|
||||
(p50) add t[6]=t[6],a3,1 };;
|
||||
{ .mfi; (p17) getf.sig a8=ahi[8] // 2:
|
||||
(p17) xma.hu nhi[7]=ni6,mj[1],nhi[6] // np[6]*m0
|
||||
(p40) cmp.ltu p43,p41=a3,n3 }
|
||||
{ .mfi; (p42) cmp.leu p43,p41=a3,n3
|
||||
(p17) xma.lu nlo[7]=ni6,mj[1],nhi[6]
|
||||
(p0) nop.i 0 };;
|
||||
{ .mii; (p17) getf.sig n5=nlo[6] // 3:
|
||||
(p48) cmp.ltu p51,p49=t[6],a3
|
||||
(p50) cmp.leu p51,p49=t[6],a3 };;
|
||||
.pred.rel "mutex",p41,p43
|
||||
.pred.rel "mutex",p49,p51
|
||||
{ .mmi; (p0) getf.sig n2=ni1 // 4:
|
||||
(p41) add a4=a4,n4 // (p17) a4+=n4
|
||||
(p43) add a4=a4,n4,1 };;
|
||||
{ .mfi; (p49) add t[5]=t[5],a4 // 5: (p17) t[5]+=a4
|
||||
(p0) nop.f 0
|
||||
(p51) add t[5]=t[5],a4,1 };;
|
||||
{ .mfi; (p0) getf.sig n3=ni2 // 6:
|
||||
(p17) xma.hu nhi[8]=ni7,mj[1],nhi[7] // np[7]*m0
|
||||
(p41) cmp.ltu p42,p40=a4,n4 }
|
||||
{ .mfi; (p43) cmp.leu p42,p40=a4,n4
|
||||
(p17) xma.lu nlo[8]=ni7,mj[1],nhi[7]
|
||||
(p0) nop.i 0 };;
|
||||
{ .mii; (p17) getf.sig n6=nlo[7] // 7:
|
||||
(p49) cmp.ltu p50,p48=t[5],a4
|
||||
(p51) cmp.leu p50,p48=t[5],a4 };;
|
||||
.pred.rel "mutex",p40,p42
|
||||
.pred.rel "mutex",p48,p50
|
||||
{ .mii; (p0) getf.sig n4=ni3 // 8:
|
||||
(p40) add a5=a5,n5 // (p17) a5+=n5
|
||||
(p42) add a5=a5,n5,1 };;
|
||||
{ .mii; (p0) nop.m 0 // 9:
|
||||
(p48) add t[4]=t[4],a5 // p(17) t[4]+=a5
|
||||
(p50) add t[4]=t[4],a5,1 };;
|
||||
{ .mii; (p0) nop.m 0 // 10:
|
||||
(p40) cmp.ltu p43,p41=a5,n5
|
||||
(p42) cmp.leu p43,p41=a5,n5 };;
|
||||
{ .mii; (p17) getf.sig n7=nlo[8] // 11:
|
||||
(p48) cmp.ltu p51,p49=t[4],a5
|
||||
(p50) cmp.leu p51,p49=t[4],a5 };;
|
||||
.pred.rel "mutex",p41,p43
|
||||
.pred.rel "mutex",p49,p51
|
||||
{ .mii; (p17) getf.sig n8=nhi[8] // 12:
|
||||
(p41) add a6=a6,n6 // (p17) a6+=n6
|
||||
(p43) add a6=a6,n6,1 };;
|
||||
{ .mii; (p0) getf.sig n5=ni4 // 13:
|
||||
(p49) add t[3]=t[3],a6 // (p17) t[3]+=a6
|
||||
(p51) add t[3]=t[3],a6,1 };;
|
||||
{ .mii; (p0) nop.m 0 // 14:
|
||||
(p41) cmp.ltu p42,p40=a6,n6
|
||||
(p43) cmp.leu p42,p40=a6,n6 };;
|
||||
{ .mii; (p0) getf.sig n6=ni5 // 15:
|
||||
(p49) cmp.ltu p50,p48=t[3],a6
|
||||
(p51) cmp.leu p50,p48=t[3],a6 };;
|
||||
.pred.rel "mutex",p40,p42
|
||||
.pred.rel "mutex",p48,p50
|
||||
{ .mii; (p0) nop.m 0 // 16:
|
||||
(p40) add a7=a7,n7 // (p17) a7+=n7
|
||||
(p42) add a7=a7,n7,1 };;
|
||||
{ .mii; (p0) nop.m 0 // 17:
|
||||
(p48) add t[2]=t[2],a7 // (p17) t[2]+=a7
|
||||
(p50) add t[2]=t[2],a7,1 };;
|
||||
{ .mii; (p0) nop.m 0 // 18:
|
||||
(p40) cmp.ltu p43,p41=a7,n7
|
||||
(p42) cmp.leu p43,p41=a7,n7 };;
|
||||
{ .mii; (p0) getf.sig n7=ni6 // 19:
|
||||
(p48) cmp.ltu p51,p49=t[2],a7
|
||||
(p50) cmp.leu p51,p49=t[2],a7 };;
|
||||
.pred.rel "mutex",p41,p43
|
||||
.pred.rel "mutex",p49,p51
|
||||
{ .mii; (p0) nop.m 0 // 20:
|
||||
(p41) add a8=a8,n8 // (p17) a8+=n8
|
||||
(p43) add a8=a8,n8,1 };;
|
||||
{ .mmi; (p0) nop.m 0 // 21:
|
||||
(p49) add t[1]=t[1],a8 // (p17) t[1]+=a8
|
||||
(p51) add t[1]=t[1],a8,1 }
|
||||
{ .mmi; (p17) mov t[0]=r0
|
||||
(p41) cmp.ltu p42,p40=a8,n8
|
||||
(p43) cmp.leu p42,p40=a8,n8 };;
|
||||
{ .mmi; (p0) getf.sig n8=ni7 // 22:
|
||||
(p49) cmp.ltu p50,p48=t[1],a8
|
||||
(p51) cmp.leu p50,p48=t[1],a8 }
|
||||
{ .mmi; (p42) add t[0]=t[0],r0,1
|
||||
(p0) add r16=-7*16,prevsp
|
||||
(p0) add r17=-6*16,prevsp };;
|
||||
|
||||
// subtract np[8] from carrybit|tmp[8]
|
||||
// carrybit|tmp[8] layout upon exit from above loop is:
|
||||
// t[0]|t[1]|t[2]|t[3]|t[4]|t[5]|t[6]|t[7]|t0 (least significant)
|
||||
{ .mmi; (p50)add t[0]=t[0],r0,1
|
||||
add r18=-5*16,prevsp
|
||||
sub n1=t0,n1 };;
|
||||
{ .mmi; cmp.gtu p34,p32=n1,t0;;
|
||||
.pred.rel "mutex",p32,p34
|
||||
(p32)sub n2=t[7],n2
|
||||
(p34)sub n2=t[7],n2,1 };;
|
||||
{ .mii; (p32)cmp.gtu p35,p33=n2,t[7]
|
||||
(p34)cmp.geu p35,p33=n2,t[7];;
|
||||
.pred.rel "mutex",p33,p35
|
||||
(p33)sub n3=t[6],n3 }
|
||||
{ .mmi; (p35)sub n3=t[6],n3,1;;
|
||||
(p33)cmp.gtu p34,p32=n3,t[6]
|
||||
(p35)cmp.geu p34,p32=n3,t[6] };;
|
||||
.pred.rel "mutex",p32,p34
|
||||
{ .mii; (p32)sub n4=t[5],n4
|
||||
(p34)sub n4=t[5],n4,1;;
|
||||
(p32)cmp.gtu p35,p33=n4,t[5] }
|
||||
{ .mmi; (p34)cmp.geu p35,p33=n4,t[5];;
|
||||
.pred.rel "mutex",p33,p35
|
||||
(p33)sub n5=t[4],n5
|
||||
(p35)sub n5=t[4],n5,1 };;
|
||||
{ .mii; (p33)cmp.gtu p34,p32=n5,t[4]
|
||||
(p35)cmp.geu p34,p32=n5,t[4];;
|
||||
.pred.rel "mutex",p32,p34
|
||||
(p32)sub n6=t[3],n6 }
|
||||
{ .mmi; (p34)sub n6=t[3],n6,1;;
|
||||
(p32)cmp.gtu p35,p33=n6,t[3]
|
||||
(p34)cmp.geu p35,p33=n6,t[3] };;
|
||||
.pred.rel "mutex",p33,p35
|
||||
{ .mii; (p33)sub n7=t[2],n7
|
||||
(p35)sub n7=t[2],n7,1;;
|
||||
(p33)cmp.gtu p34,p32=n7,t[2] }
|
||||
{ .mmi; (p35)cmp.geu p34,p32=n7,t[2];;
|
||||
.pred.rel "mutex",p32,p34
|
||||
(p32)sub n8=t[1],n8
|
||||
(p34)sub n8=t[1],n8,1 };;
|
||||
{ .mii; (p32)cmp.gtu p35,p33=n8,t[1]
|
||||
(p34)cmp.geu p35,p33=n8,t[1];;
|
||||
.pred.rel "mutex",p33,p35
|
||||
(p33)sub a8=t[0],r0 }
|
||||
{ .mmi; (p35)sub a8=t[0],r0,1;;
|
||||
(p33)cmp.gtu p34,p32=a8,t[0]
|
||||
(p35)cmp.geu p34,p32=a8,t[0] };;
|
||||
|
||||
// save the result, either tmp[num] or tmp[num]-np[num]
|
||||
.pred.rel "mutex",p32,p34
|
||||
{ .mmi; (p32)st8 [rptr]=n1,8
|
||||
(p34)st8 [rptr]=t0,8
|
||||
add r19=-4*16,prevsp};;
|
||||
{ .mmb; (p32)st8 [rptr]=n2,8
|
||||
(p34)st8 [rptr]=t[7],8
|
||||
(p5)br.cond.dpnt.few .Ldone };;
|
||||
{ .mmb; (p32)st8 [rptr]=n3,8
|
||||
(p34)st8 [rptr]=t[6],8
|
||||
(p7)br.cond.dpnt.few .Ldone };;
|
||||
{ .mmb; (p32)st8 [rptr]=n4,8
|
||||
(p34)st8 [rptr]=t[5],8
|
||||
(p9)br.cond.dpnt.few .Ldone };;
|
||||
{ .mmb; (p32)st8 [rptr]=n5,8
|
||||
(p34)st8 [rptr]=t[4],8
|
||||
(p11)br.cond.dpnt.few .Ldone };;
|
||||
{ .mmb; (p32)st8 [rptr]=n6,8
|
||||
(p34)st8 [rptr]=t[3],8
|
||||
(p13)br.cond.dpnt.few .Ldone };;
|
||||
{ .mmb; (p32)st8 [rptr]=n7,8
|
||||
(p34)st8 [rptr]=t[2],8
|
||||
(p15)br.cond.dpnt.few .Ldone };;
|
||||
{ .mmb; (p32)st8 [rptr]=n8,8
|
||||
(p34)st8 [rptr]=t[1],8
|
||||
nop.b 0 };;
|
||||
.Ldone: // epilogue
|
||||
{ .mmi; ldf.fill f16=[r16],64
|
||||
ldf.fill f17=[r17],64
|
||||
nop.i 0 }
|
||||
{ .mmi; ldf.fill f18=[r18],64
|
||||
ldf.fill f19=[r19],64
|
||||
mov pr=prevpr,0x1ffff };;
|
||||
{ .mmi; ldf.fill f20=[r16]
|
||||
ldf.fill f21=[r17]
|
||||
mov ar.lc=prevlc }
|
||||
{ .mmi; ldf.fill f22=[r18]
|
||||
ldf.fill f23=[r19]
|
||||
mov ret0=1 } // signal "handled"
|
||||
{ .mib; rum 1<<5
|
||||
.restore sp
|
||||
mov sp=prevsp
|
||||
br.ret.sptk.many b0 };;
|
||||
.endp bn_mul_mont_8#
|
||||
|
||||
.type copyright#,\@object
|
||||
copyright:
|
||||
stringz "Montgomery multiplication for IA-64, CRYPTOGAMS by <appro\@openssl.org>"
|
||||
___
|
||||
|
||||
$output=shift and open STDOUT,">$output";
|
||||
print $code;
|
||||
close STDOUT;
|
||||
426
crypto/bn/asm/mips-mont.pl
Normal file
426
crypto/bn/asm/mips-mont.pl
Normal file
@@ -0,0 +1,426 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# ====================================================================
|
||||
# Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
|
||||
# project. The module is, however, dual licensed under OpenSSL and
|
||||
# CRYPTOGAMS licenses depending on where you obtain it. For further
|
||||
# details see http://www.openssl.org/~appro/cryptogams/.
|
||||
# ====================================================================
|
||||
|
||||
# This module doesn't present direct interest for OpenSSL, because it
|
||||
# doesn't provide better performance for longer keys, at least not on
|
||||
# in-order-execution cores. While 512-bit RSA sign operations can be
|
||||
# 65% faster in 64-bit mode, 1024-bit ones are only 15% faster, and
|
||||
# 4096-bit ones are up to 15% slower. In 32-bit mode it varies from
|
||||
# 16% improvement for 512-bit RSA sign to -33% for 4096-bit RSA
|
||||
# verify:-( All comparisons are against bn_mul_mont-free assembler.
|
||||
# The module might be of interest to embedded system developers, as
|
||||
# the code is smaller than 1KB, yet offers >3x improvement on MIPS64
|
||||
# and 75-30% [less for longer keys] on MIPS32 over compiler-generated
|
||||
# code.
|
||||
|
||||
######################################################################
|
||||
# There is a number of MIPS ABI in use, O32 and N32/64 are most
|
||||
# widely used. Then there is a new contender: NUBI. It appears that if
|
||||
# one picks the latter, it's possible to arrange code in ABI neutral
|
||||
# manner. Therefore let's stick to NUBI register layout:
|
||||
#
|
||||
($zero,$at,$t0,$t1,$t2)=map("\$$_",(0..2,24,25));
|
||||
($a0,$a1,$a2,$a3,$a4,$a5,$a6,$a7)=map("\$$_",(4..11));
|
||||
($s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$s11)=map("\$$_",(12..23));
|
||||
($gp,$tp,$sp,$fp,$ra)=map("\$$_",(3,28..31));
|
||||
#
|
||||
# The return value is placed in $a0. Following coding rules facilitate
|
||||
# interoperability:
|
||||
#
|
||||
# - never ever touch $tp, "thread pointer", former $gp;
|
||||
# - copy return value to $t0, former $v0 [or to $a0 if you're adapting
|
||||
# old code];
|
||||
# - on O32 populate $a4-$a7 with 'lw $aN,4*N($sp)' if necessary;
|
||||
#
|
||||
# For reference here is register layout for N32/64 MIPS ABIs:
|
||||
#
|
||||
# ($zero,$at,$v0,$v1)=map("\$$_",(0..3));
|
||||
# ($a0,$a1,$a2,$a3,$a4,$a5,$a6,$a7)=map("\$$_",(4..11));
|
||||
# ($t0,$t1,$t2,$t3,$t8,$t9)=map("\$$_",(12..15,24,25));
|
||||
# ($s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7)=map("\$$_",(16..23));
|
||||
# ($gp,$sp,$fp,$ra)=map("\$$_",(28..31));
|
||||
#
|
||||
$flavour = shift; # supported flavours are o32,n32,64,nubi32,nubi64
|
||||
|
||||
if ($flavour =~ /64|n32/i) {
|
||||
$PTR_ADD="dadd"; # incidentally works even on n32
|
||||
$PTR_SUB="dsub"; # incidentally works even on n32
|
||||
$REG_S="sd";
|
||||
$REG_L="ld";
|
||||
$SZREG=8;
|
||||
} else {
|
||||
$PTR_ADD="add";
|
||||
$PTR_SUB="sub";
|
||||
$REG_S="sw";
|
||||
$REG_L="lw";
|
||||
$SZREG=4;
|
||||
}
|
||||
$SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? 0x00fff000 : 0x00ff0000;
|
||||
#
|
||||
# <appro@openssl.org>
|
||||
#
|
||||
######################################################################
|
||||
|
||||
while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
|
||||
open STDOUT,">$output";
|
||||
|
||||
if ($flavour =~ /64|n32/i) {
|
||||
$LD="ld";
|
||||
$ST="sd";
|
||||
$MULTU="dmultu";
|
||||
$ADDU="daddu";
|
||||
$SUBU="dsubu";
|
||||
$BNSZ=8;
|
||||
} else {
|
||||
$LD="lw";
|
||||
$ST="sw";
|
||||
$MULTU="multu";
|
||||
$ADDU="addu";
|
||||
$SUBU="subu";
|
||||
$BNSZ=4;
|
||||
}
|
||||
|
||||
# int bn_mul_mont(
|
||||
$rp=$a0; # BN_ULONG *rp,
|
||||
$ap=$a1; # const BN_ULONG *ap,
|
||||
$bp=$a2; # const BN_ULONG *bp,
|
||||
$np=$a3; # const BN_ULONG *np,
|
||||
$n0=$a4; # const BN_ULONG *n0,
|
||||
$num=$a5; # int num);
|
||||
|
||||
$lo0=$a6;
|
||||
$hi0=$a7;
|
||||
$lo1=$t1;
|
||||
$hi1=$t2;
|
||||
$aj=$s0;
|
||||
$bi=$s1;
|
||||
$nj=$s2;
|
||||
$tp=$s3;
|
||||
$alo=$s4;
|
||||
$ahi=$s5;
|
||||
$nlo=$s6;
|
||||
$nhi=$s7;
|
||||
$tj=$s8;
|
||||
$i=$s9;
|
||||
$j=$s10;
|
||||
$m1=$s11;
|
||||
|
||||
$FRAMESIZE=14;
|
||||
|
||||
$code=<<___;
|
||||
.text
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.align 5
|
||||
.globl bn_mul_mont
|
||||
.ent bn_mul_mont
|
||||
bn_mul_mont:
|
||||
___
|
||||
$code.=<<___ if ($flavour =~ /o32/i);
|
||||
lw $n0,16($sp)
|
||||
lw $num,20($sp)
|
||||
___
|
||||
$code.=<<___;
|
||||
slt $at,$num,4
|
||||
bnez $at,1f
|
||||
li $t0,0
|
||||
slt $at,$num,17 # on in-order CPU
|
||||
bnez $at,bn_mul_mont_internal
|
||||
nop
|
||||
1: jr $ra
|
||||
li $a0,0
|
||||
.end bn_mul_mont
|
||||
|
||||
.align 5
|
||||
.ent bn_mul_mont_internal
|
||||
bn_mul_mont_internal:
|
||||
.frame $fp,$FRAMESIZE*$SZREG,$ra
|
||||
.mask 0x40000000|$SAVED_REGS_MASK,-$SZREG
|
||||
$PTR_SUB $sp,$FRAMESIZE*$SZREG
|
||||
$REG_S $fp,($FRAMESIZE-1)*$SZREG($sp)
|
||||
$REG_S $s11,($FRAMESIZE-2)*$SZREG($sp)
|
||||
$REG_S $s10,($FRAMESIZE-3)*$SZREG($sp)
|
||||
$REG_S $s9,($FRAMESIZE-4)*$SZREG($sp)
|
||||
$REG_S $s8,($FRAMESIZE-5)*$SZREG($sp)
|
||||
$REG_S $s7,($FRAMESIZE-6)*$SZREG($sp)
|
||||
$REG_S $s6,($FRAMESIZE-7)*$SZREG($sp)
|
||||
$REG_S $s5,($FRAMESIZE-8)*$SZREG($sp)
|
||||
$REG_S $s4,($FRAMESIZE-9)*$SZREG($sp)
|
||||
___
|
||||
$code.=<<___ if ($flavour =~ /nubi/i);
|
||||
$REG_S $s3,($FRAMESIZE-10)*$SZREG($sp)
|
||||
$REG_S $s2,($FRAMESIZE-11)*$SZREG($sp)
|
||||
$REG_S $s1,($FRAMESIZE-12)*$SZREG($sp)
|
||||
$REG_S $s0,($FRAMESIZE-13)*$SZREG($sp)
|
||||
___
|
||||
$code.=<<___;
|
||||
move $fp,$sp
|
||||
|
||||
.set reorder
|
||||
$LD $n0,0($n0)
|
||||
$LD $bi,0($bp) # bp[0]
|
||||
$LD $aj,0($ap) # ap[0]
|
||||
$LD $nj,0($np) # np[0]
|
||||
|
||||
$PTR_SUB $sp,2*$BNSZ # place for two extra words
|
||||
sll $num,`log($BNSZ)/log(2)`
|
||||
li $at,-4096
|
||||
$PTR_SUB $sp,$num
|
||||
and $sp,$at
|
||||
|
||||
$MULTU $aj,$bi
|
||||
$LD $alo,$BNSZ($ap)
|
||||
$LD $nlo,$BNSZ($np)
|
||||
mflo $lo0
|
||||
mfhi $hi0
|
||||
$MULTU $lo0,$n0
|
||||
mflo $m1
|
||||
|
||||
$MULTU $alo,$bi
|
||||
mflo $alo
|
||||
mfhi $ahi
|
||||
|
||||
$MULTU $nj,$m1
|
||||
mflo $lo1
|
||||
mfhi $hi1
|
||||
$MULTU $nlo,$m1
|
||||
$ADDU $lo1,$lo0
|
||||
sltu $at,$lo1,$lo0
|
||||
$ADDU $hi1,$at
|
||||
mflo $nlo
|
||||
mfhi $nhi
|
||||
|
||||
move $tp,$sp
|
||||
li $j,2*$BNSZ
|
||||
.align 4
|
||||
.L1st:
|
||||
.set noreorder
|
||||
$PTR_ADD $aj,$ap,$j
|
||||
$PTR_ADD $nj,$np,$j
|
||||
$LD $aj,($aj)
|
||||
$LD $nj,($nj)
|
||||
|
||||
$MULTU $aj,$bi
|
||||
$ADDU $lo0,$alo,$hi0
|
||||
$ADDU $lo1,$nlo,$hi1
|
||||
sltu $at,$lo0,$hi0
|
||||
sltu $t0,$lo1,$hi1
|
||||
$ADDU $hi0,$ahi,$at
|
||||
$ADDU $hi1,$nhi,$t0
|
||||
mflo $alo
|
||||
mfhi $ahi
|
||||
|
||||
$ADDU $lo1,$lo0
|
||||
sltu $at,$lo1,$lo0
|
||||
$MULTU $nj,$m1
|
||||
$ADDU $hi1,$at
|
||||
addu $j,$BNSZ
|
||||
$ST $lo1,($tp)
|
||||
sltu $t0,$j,$num
|
||||
mflo $nlo
|
||||
mfhi $nhi
|
||||
|
||||
bnez $t0,.L1st
|
||||
$PTR_ADD $tp,$BNSZ
|
||||
.set reorder
|
||||
|
||||
$ADDU $lo0,$alo,$hi0
|
||||
sltu $at,$lo0,$hi0
|
||||
$ADDU $hi0,$ahi,$at
|
||||
|
||||
$ADDU $lo1,$nlo,$hi1
|
||||
sltu $t0,$lo1,$hi1
|
||||
$ADDU $hi1,$nhi,$t0
|
||||
$ADDU $lo1,$lo0
|
||||
sltu $at,$lo1,$lo0
|
||||
$ADDU $hi1,$at
|
||||
|
||||
$ST $lo1,($tp)
|
||||
|
||||
$ADDU $hi1,$hi0
|
||||
sltu $at,$hi1,$hi0
|
||||
$ST $hi1,$BNSZ($tp)
|
||||
$ST $at,2*$BNSZ($tp)
|
||||
|
||||
li $i,$BNSZ
|
||||
.align 4
|
||||
.Louter:
|
||||
$PTR_ADD $bi,$bp,$i
|
||||
$LD $bi,($bi)
|
||||
$LD $aj,($ap)
|
||||
$LD $alo,$BNSZ($ap)
|
||||
$LD $tj,($sp)
|
||||
|
||||
$MULTU $aj,$bi
|
||||
$LD $nj,($np)
|
||||
$LD $nlo,$BNSZ($np)
|
||||
mflo $lo0
|
||||
mfhi $hi0
|
||||
$ADDU $lo0,$tj
|
||||
$MULTU $lo0,$n0
|
||||
sltu $at,$lo0,$tj
|
||||
$ADDU $hi0,$at
|
||||
mflo $m1
|
||||
|
||||
$MULTU $alo,$bi
|
||||
mflo $alo
|
||||
mfhi $ahi
|
||||
|
||||
$MULTU $nj,$m1
|
||||
mflo $lo1
|
||||
mfhi $hi1
|
||||
|
||||
$MULTU $nlo,$m1
|
||||
$ADDU $lo1,$lo0
|
||||
sltu $at,$lo1,$lo0
|
||||
$ADDU $hi1,$at
|
||||
mflo $nlo
|
||||
mfhi $nhi
|
||||
|
||||
move $tp,$sp
|
||||
li $j,2*$BNSZ
|
||||
$LD $tj,$BNSZ($tp)
|
||||
.align 4
|
||||
.Linner:
|
||||
.set noreorder
|
||||
$PTR_ADD $aj,$ap,$j
|
||||
$PTR_ADD $nj,$np,$j
|
||||
$LD $aj,($aj)
|
||||
$LD $nj,($nj)
|
||||
|
||||
$MULTU $aj,$bi
|
||||
$ADDU $lo0,$alo,$hi0
|
||||
$ADDU $lo1,$nlo,$hi1
|
||||
sltu $at,$lo0,$hi0
|
||||
sltu $t0,$lo1,$hi1
|
||||
$ADDU $hi0,$ahi,$at
|
||||
$ADDU $hi1,$nhi,$t0
|
||||
mflo $alo
|
||||
mfhi $ahi
|
||||
|
||||
$ADDU $lo0,$tj
|
||||
addu $j,$BNSZ
|
||||
$MULTU $nj,$m1
|
||||
sltu $at,$lo0,$tj
|
||||
$ADDU $lo1,$lo0
|
||||
$ADDU $hi0,$at
|
||||
sltu $t0,$lo1,$lo0
|
||||
$LD $tj,2*$BNSZ($tp)
|
||||
$ADDU $hi1,$t0
|
||||
sltu $at,$j,$num
|
||||
mflo $nlo
|
||||
mfhi $nhi
|
||||
$ST $lo1,($tp)
|
||||
bnez $at,.Linner
|
||||
$PTR_ADD $tp,$BNSZ
|
||||
.set reorder
|
||||
|
||||
$ADDU $lo0,$alo,$hi0
|
||||
sltu $at,$lo0,$hi0
|
||||
$ADDU $hi0,$ahi,$at
|
||||
$ADDU $lo0,$tj
|
||||
sltu $t0,$lo0,$tj
|
||||
$ADDU $hi0,$t0
|
||||
|
||||
$LD $tj,2*$BNSZ($tp)
|
||||
$ADDU $lo1,$nlo,$hi1
|
||||
sltu $at,$lo1,$hi1
|
||||
$ADDU $hi1,$nhi,$at
|
||||
$ADDU $lo1,$lo0
|
||||
sltu $t0,$lo1,$lo0
|
||||
$ADDU $hi1,$t0
|
||||
$ST $lo1,($tp)
|
||||
|
||||
$ADDU $lo1,$hi1,$hi0
|
||||
sltu $hi1,$lo1,$hi0
|
||||
$ADDU $lo1,$tj
|
||||
sltu $at,$lo1,$tj
|
||||
$ADDU $hi1,$at
|
||||
$ST $lo1,$BNSZ($tp)
|
||||
$ST $hi1,2*$BNSZ($tp)
|
||||
|
||||
addu $i,$BNSZ
|
||||
sltu $t0,$i,$num
|
||||
bnez $t0,.Louter
|
||||
|
||||
.set noreorder
|
||||
$PTR_ADD $tj,$sp,$num # &tp[num]
|
||||
move $tp,$sp
|
||||
move $ap,$sp
|
||||
li $hi0,0 # clear borrow bit
|
||||
|
||||
.align 4
|
||||
.Lsub: $LD $lo0,($tp)
|
||||
$LD $lo1,($np)
|
||||
$PTR_ADD $tp,$BNSZ
|
||||
$PTR_ADD $np,$BNSZ
|
||||
$SUBU $lo1,$lo0,$lo1 # tp[i]-np[i]
|
||||
sgtu $at,$lo1,$lo0
|
||||
$SUBU $lo0,$lo1,$hi0
|
||||
sgtu $hi0,$lo0,$lo1
|
||||
$ST $lo0,($rp)
|
||||
or $hi0,$at
|
||||
sltu $at,$tp,$tj
|
||||
bnez $at,.Lsub
|
||||
$PTR_ADD $rp,$BNSZ
|
||||
|
||||
$SUBU $hi0,$hi1,$hi0 # handle upmost overflow bit
|
||||
move $tp,$sp
|
||||
$PTR_SUB $rp,$num # restore rp
|
||||
not $hi1,$hi0
|
||||
|
||||
and $ap,$hi0,$sp
|
||||
and $bp,$hi1,$rp
|
||||
or $ap,$ap,$bp # ap=borrow?tp:rp
|
||||
|
||||
.align 4
|
||||
.Lcopy: $LD $aj,($ap)
|
||||
$PTR_ADD $ap,$BNSZ
|
||||
$ST $zero,($tp)
|
||||
$PTR_ADD $tp,$BNSZ
|
||||
sltu $at,$tp,$tj
|
||||
$ST $aj,($rp)
|
||||
bnez $at,.Lcopy
|
||||
$PTR_ADD $rp,$BNSZ
|
||||
|
||||
li $a0,1
|
||||
li $t0,1
|
||||
|
||||
.set noreorder
|
||||
move $sp,$fp
|
||||
$REG_L $fp,($FRAMESIZE-1)*$SZREG($sp)
|
||||
$REG_L $s11,($FRAMESIZE-2)*$SZREG($sp)
|
||||
$REG_L $s10,($FRAMESIZE-3)*$SZREG($sp)
|
||||
$REG_L $s9,($FRAMESIZE-4)*$SZREG($sp)
|
||||
$REG_L $s8,($FRAMESIZE-5)*$SZREG($sp)
|
||||
$REG_L $s7,($FRAMESIZE-6)*$SZREG($sp)
|
||||
$REG_L $s6,($FRAMESIZE-7)*$SZREG($sp)
|
||||
$REG_L $s5,($FRAMESIZE-8)*$SZREG($sp)
|
||||
$REG_L $s4,($FRAMESIZE-9)*$SZREG($sp)
|
||||
___
|
||||
$code.=<<___ if ($flavour =~ /nubi/i);
|
||||
$REG_L $s3,($FRAMESIZE-10)*$SZREG($sp)
|
||||
$REG_L $s2,($FRAMESIZE-11)*$SZREG($sp)
|
||||
$REG_L $s1,($FRAMESIZE-12)*$SZREG($sp)
|
||||
$REG_L $s0,($FRAMESIZE-13)*$SZREG($sp)
|
||||
___
|
||||
$code.=<<___;
|
||||
jr $ra
|
||||
$PTR_ADD $sp,$FRAMESIZE*$SZREG
|
||||
.end bn_mul_mont_internal
|
||||
.rdata
|
||||
.asciiz "Montgomery Multiplication for MIPS, CRYPTOGAMS by <appro\@openssl.org>"
|
||||
___
|
||||
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
|
||||
print $code;
|
||||
close STDOUT;
|
||||
2234
crypto/bn/asm/mips.pl
Normal file
2234
crypto/bn/asm/mips.pl
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1497
crypto/bn/asm/modexp512-x86_64.pl
Normal file
1497
crypto/bn/asm/modexp512-x86_64.pl
Normal file
File diff suppressed because it is too large
Load Diff
995
crypto/bn/asm/parisc-mont.pl
Normal file
995
crypto/bn/asm/parisc-mont.pl
Normal file
@@ -0,0 +1,995 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# ====================================================================
|
||||
# Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
|
||||
# project. The module is, however, dual licensed under OpenSSL and
|
||||
# CRYPTOGAMS licenses depending on where you obtain it. For further
|
||||
# details see http://www.openssl.org/~appro/cryptogams/.
|
||||
# ====================================================================
|
||||
|
||||
# On PA-7100LC this module performs ~90-50% better, less for longer
|
||||
# keys, than code generated by gcc 3.2 for PA-RISC 1.1. Latter means
|
||||
# that compiler utilized xmpyu instruction to perform 32x32=64-bit
|
||||
# multiplication, which in turn means that "baseline" performance was
|
||||
# optimal in respect to instruction set capabilities. Fair comparison
|
||||
# with vendor compiler is problematic, because OpenSSL doesn't define
|
||||
# BN_LLONG [presumably] for historical reasons, which drives compiler
|
||||
# toward 4 times 16x16=32-bit multiplicatons [plus complementary
|
||||
# shifts and additions] instead. This means that you should observe
|
||||
# several times improvement over code generated by vendor compiler
|
||||
# for PA-RISC 1.1, but the "baseline" is far from optimal. The actual
|
||||
# improvement coefficient was never collected on PA-7100LC, or any
|
||||
# other 1.1 CPU, because I don't have access to such machine with
|
||||
# vendor compiler. But to give you a taste, PA-RISC 1.1 code path
|
||||
# reportedly outperformed code generated by cc +DA1.1 +O3 by factor
|
||||
# of ~5x on PA-8600.
|
||||
#
|
||||
# On PA-RISC 2.0 it has to compete with pa-risc2[W].s, which is
|
||||
# reportedly ~2x faster than vendor compiler generated code [according
|
||||
# to comment in pa-risc2[W].s]. Here comes a catch. Execution core of
|
||||
# this implementation is actually 32-bit one, in the sense that it
|
||||
# operates on 32-bit values. But pa-risc2[W].s operates on arrays of
|
||||
# 64-bit BN_LONGs... How do they interoperate then? No problem. This
|
||||
# module picks halves of 64-bit values in reverse order and pretends
|
||||
# they were 32-bit BN_LONGs. But can 32-bit core compete with "pure"
|
||||
# 64-bit code such as pa-risc2[W].s then? Well, the thing is that
|
||||
# 32x32=64-bit multiplication is the best even PA-RISC 2.0 can do,
|
||||
# i.e. there is no "wider" multiplication like on most other 64-bit
|
||||
# platforms. This means that even being effectively 32-bit, this
|
||||
# implementation performs "64-bit" computational task in same amount
|
||||
# of arithmetic operations, most notably multiplications. It requires
|
||||
# more memory references, most notably to tp[num], but this doesn't
|
||||
# seem to exhaust memory port capacity. And indeed, dedicated PA-RISC
|
||||
# 2.0 code path provides virtually same performance as pa-risc2[W].s:
|
||||
# it's ~10% better for shortest key length and ~10% worse for longest
|
||||
# one.
|
||||
#
|
||||
# In case it wasn't clear. The module has two distinct code paths:
|
||||
# PA-RISC 1.1 and PA-RISC 2.0 ones. Latter features carry-free 64-bit
|
||||
# additions and 64-bit integer loads, not to mention specific
|
||||
# instruction scheduling. In 64-bit build naturally only 2.0 code path
|
||||
# is assembled. In 32-bit application context both code paths are
|
||||
# assembled, PA-RISC 2.0 CPU is detected at run-time and proper path
|
||||
# is taken automatically. Also, in 32-bit build the module imposes
|
||||
# couple of limitations: vector lengths has to be even and vector
|
||||
# addresses has to be 64-bit aligned. Normally neither is a problem:
|
||||
# most common key lengths are even and vectors are commonly malloc-ed,
|
||||
# which ensures alignment.
|
||||
#
|
||||
# Special thanks to polarhome.com for providing HP-UX account on
|
||||
# PA-RISC 1.1 machine, and to correspondent who chose to remain
|
||||
# anonymous for testing the code on PA-RISC 2.0 machine.
|
||||
|
||||
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
|
||||
$flavour = shift;
|
||||
$output = shift;
|
||||
|
||||
open STDOUT,">$output";
|
||||
|
||||
if ($flavour =~ /64/) {
|
||||
$LEVEL ="2.0W";
|
||||
$SIZE_T =8;
|
||||
$FRAME_MARKER =80;
|
||||
$SAVED_RP =16;
|
||||
$PUSH ="std";
|
||||
$PUSHMA ="std,ma";
|
||||
$POP ="ldd";
|
||||
$POPMB ="ldd,mb";
|
||||
$BN_SZ =$SIZE_T;
|
||||
} else {
|
||||
$LEVEL ="1.1"; #$LEVEL.="\n\t.ALLOW\t2.0";
|
||||
$SIZE_T =4;
|
||||
$FRAME_MARKER =48;
|
||||
$SAVED_RP =20;
|
||||
$PUSH ="stw";
|
||||
$PUSHMA ="stwm";
|
||||
$POP ="ldw";
|
||||
$POPMB ="ldwm";
|
||||
$BN_SZ =$SIZE_T;
|
||||
if (open CONF,"<${dir}../../opensslconf.h") {
|
||||
while(<CONF>) {
|
||||
if (m/#\s*define\s+SIXTY_FOUR_BIT/) {
|
||||
$BN_SZ=8;
|
||||
$LEVEL="2.0";
|
||||
last;
|
||||
}
|
||||
}
|
||||
close CONF;
|
||||
}
|
||||
}
|
||||
|
||||
$FRAME=8*$SIZE_T+$FRAME_MARKER; # 8 saved regs + frame marker
|
||||
# [+ argument transfer]
|
||||
$LOCALS=$FRAME-$FRAME_MARKER;
|
||||
$FRAME+=32; # local variables
|
||||
|
||||
$tp="%r31";
|
||||
$ti1="%r29";
|
||||
$ti0="%r28";
|
||||
|
||||
$rp="%r26";
|
||||
$ap="%r25";
|
||||
$bp="%r24";
|
||||
$np="%r23";
|
||||
$n0="%r22"; # passed through stack in 32-bit
|
||||
$num="%r21"; # passed through stack in 32-bit
|
||||
$idx="%r20";
|
||||
$arrsz="%r19";
|
||||
|
||||
$nm1="%r7";
|
||||
$nm0="%r6";
|
||||
$ab1="%r5";
|
||||
$ab0="%r4";
|
||||
|
||||
$fp="%r3";
|
||||
$hi1="%r2";
|
||||
$hi0="%r1";
|
||||
|
||||
$xfer=$n0; # accomodates [-16..15] offset in fld[dw]s
|
||||
|
||||
$fm0="%fr4"; $fti=$fm0;
|
||||
$fbi="%fr5L";
|
||||
$fn0="%fr5R";
|
||||
$fai="%fr6"; $fab0="%fr7"; $fab1="%fr8";
|
||||
$fni="%fr9"; $fnm0="%fr10"; $fnm1="%fr11";
|
||||
|
||||
$code=<<___;
|
||||
.LEVEL $LEVEL
|
||||
.SPACE \$TEXT\$
|
||||
.SUBSPA \$CODE\$,QUAD=0,ALIGN=8,ACCESS=0x2C,CODE_ONLY
|
||||
|
||||
.EXPORT bn_mul_mont,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR
|
||||
.ALIGN 64
|
||||
bn_mul_mont
|
||||
.PROC
|
||||
.CALLINFO FRAME=`$FRAME-8*$SIZE_T`,NO_CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=6
|
||||
.ENTRY
|
||||
$PUSH %r2,-$SAVED_RP(%sp) ; standard prologue
|
||||
$PUSHMA %r3,$FRAME(%sp)
|
||||
$PUSH %r4,`-$FRAME+1*$SIZE_T`(%sp)
|
||||
$PUSH %r5,`-$FRAME+2*$SIZE_T`(%sp)
|
||||
$PUSH %r6,`-$FRAME+3*$SIZE_T`(%sp)
|
||||
$PUSH %r7,`-$FRAME+4*$SIZE_T`(%sp)
|
||||
$PUSH %r8,`-$FRAME+5*$SIZE_T`(%sp)
|
||||
$PUSH %r9,`-$FRAME+6*$SIZE_T`(%sp)
|
||||
$PUSH %r10,`-$FRAME+7*$SIZE_T`(%sp)
|
||||
ldo -$FRAME(%sp),$fp
|
||||
___
|
||||
$code.=<<___ if ($SIZE_T==4);
|
||||
ldw `-$FRAME_MARKER-4`($fp),$n0
|
||||
ldw `-$FRAME_MARKER-8`($fp),$num
|
||||
nop
|
||||
nop ; alignment
|
||||
___
|
||||
$code.=<<___ if ($BN_SZ==4);
|
||||
comiclr,<= 6,$num,%r0 ; are vectors long enough?
|
||||
b L\$abort
|
||||
ldi 0,%r28 ; signal "unhandled"
|
||||
add,ev %r0,$num,$num ; is $num even?
|
||||
b L\$abort
|
||||
nop
|
||||
or $ap,$np,$ti1
|
||||
extru,= $ti1,31,3,%r0 ; are ap and np 64-bit aligned?
|
||||
b L\$abort
|
||||
nop
|
||||
nop ; alignment
|
||||
nop
|
||||
|
||||
fldws 0($n0),${fn0}
|
||||
fldws,ma 4($bp),${fbi} ; bp[0]
|
||||
___
|
||||
$code.=<<___ if ($BN_SZ==8);
|
||||
comib,> 3,$num,L\$abort ; are vectors long enough?
|
||||
ldi 0,%r28 ; signal "unhandled"
|
||||
addl $num,$num,$num ; I operate on 32-bit values
|
||||
|
||||
fldws 4($n0),${fn0} ; only low part of n0
|
||||
fldws 4($bp),${fbi} ; bp[0] in flipped word order
|
||||
___
|
||||
$code.=<<___;
|
||||
fldds 0($ap),${fai} ; ap[0,1]
|
||||
fldds 0($np),${fni} ; np[0,1]
|
||||
|
||||
sh2addl $num,%r0,$arrsz
|
||||
ldi 31,$hi0
|
||||
ldo 36($arrsz),$hi1 ; space for tp[num+1]
|
||||
andcm $hi1,$hi0,$hi1 ; align
|
||||
addl $hi1,%sp,%sp
|
||||
$PUSH $fp,-$SIZE_T(%sp)
|
||||
|
||||
ldo `$LOCALS+16`($fp),$xfer
|
||||
ldo `$LOCALS+32+4`($fp),$tp
|
||||
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[0]*bp[0]
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[1]*bp[0]
|
||||
xmpyu ${fn0},${fab0}R,${fm0}
|
||||
|
||||
addl $arrsz,$ap,$ap ; point at the end
|
||||
addl $arrsz,$np,$np
|
||||
subi 0,$arrsz,$idx ; j=0
|
||||
ldo 8($idx),$idx ; j++++
|
||||
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[0]*m
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[1]*m
|
||||
fstds ${fab0},-16($xfer)
|
||||
fstds ${fnm0},-8($xfer)
|
||||
fstds ${fab1},0($xfer)
|
||||
fstds ${fnm1},8($xfer)
|
||||
flddx $idx($ap),${fai} ; ap[2,3]
|
||||
flddx $idx($np),${fni} ; np[2,3]
|
||||
___
|
||||
$code.=<<___ if ($BN_SZ==4);
|
||||
mtctl $hi0,%cr11 ; $hi0 still holds 31
|
||||
extrd,u,*= $hi0,%sar,1,$hi0 ; executes on PA-RISC 1.0
|
||||
b L\$parisc11
|
||||
nop
|
||||
___
|
||||
$code.=<<___; # PA-RISC 2.0 code-path
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[j]*bp[0]
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[j]*m
|
||||
ldd -16($xfer),$ab0
|
||||
fstds ${fab0},-16($xfer)
|
||||
|
||||
extrd,u $ab0,31,32,$hi0
|
||||
extrd,u $ab0,63,32,$ab0
|
||||
ldd -8($xfer),$nm0
|
||||
fstds ${fnm0},-8($xfer)
|
||||
ldo 8($idx),$idx ; j++++
|
||||
addl $ab0,$nm0,$nm0 ; low part is discarded
|
||||
extrd,u $nm0,31,32,$hi1
|
||||
|
||||
L\$1st
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[j+1]*bp[0]
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[j+1]*m
|
||||
ldd 0($xfer),$ab1
|
||||
fstds ${fab1},0($xfer)
|
||||
addl $hi0,$ab1,$ab1
|
||||
extrd,u $ab1,31,32,$hi0
|
||||
ldd 8($xfer),$nm1
|
||||
fstds ${fnm1},8($xfer)
|
||||
extrd,u $ab1,63,32,$ab1
|
||||
addl $hi1,$nm1,$nm1
|
||||
flddx $idx($ap),${fai} ; ap[j,j+1]
|
||||
flddx $idx($np),${fni} ; np[j,j+1]
|
||||
addl $ab1,$nm1,$nm1
|
||||
extrd,u $nm1,31,32,$hi1
|
||||
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[j]*bp[0]
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[j]*m
|
||||
ldd -16($xfer),$ab0
|
||||
fstds ${fab0},-16($xfer)
|
||||
addl $hi0,$ab0,$ab0
|
||||
extrd,u $ab0,31,32,$hi0
|
||||
ldd -8($xfer),$nm0
|
||||
fstds ${fnm0},-8($xfer)
|
||||
extrd,u $ab0,63,32,$ab0
|
||||
addl $hi1,$nm0,$nm0
|
||||
stw $nm1,-4($tp) ; tp[j-1]
|
||||
addl $ab0,$nm0,$nm0
|
||||
stw,ma $nm0,8($tp) ; tp[j-1]
|
||||
addib,<> 8,$idx,L\$1st ; j++++
|
||||
extrd,u $nm0,31,32,$hi1
|
||||
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[j]*bp[0]
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[j]*m
|
||||
ldd 0($xfer),$ab1
|
||||
fstds ${fab1},0($xfer)
|
||||
addl $hi0,$ab1,$ab1
|
||||
extrd,u $ab1,31,32,$hi0
|
||||
ldd 8($xfer),$nm1
|
||||
fstds ${fnm1},8($xfer)
|
||||
extrd,u $ab1,63,32,$ab1
|
||||
addl $hi1,$nm1,$nm1
|
||||
ldd -16($xfer),$ab0
|
||||
addl $ab1,$nm1,$nm1
|
||||
ldd -8($xfer),$nm0
|
||||
extrd,u $nm1,31,32,$hi1
|
||||
|
||||
addl $hi0,$ab0,$ab0
|
||||
extrd,u $ab0,31,32,$hi0
|
||||
stw $nm1,-4($tp) ; tp[j-1]
|
||||
extrd,u $ab0,63,32,$ab0
|
||||
addl $hi1,$nm0,$nm0
|
||||
ldd 0($xfer),$ab1
|
||||
addl $ab0,$nm0,$nm0
|
||||
ldd,mb 8($xfer),$nm1
|
||||
extrd,u $nm0,31,32,$hi1
|
||||
stw,ma $nm0,8($tp) ; tp[j-1]
|
||||
|
||||
ldo -1($num),$num ; i--
|
||||
subi 0,$arrsz,$idx ; j=0
|
||||
___
|
||||
$code.=<<___ if ($BN_SZ==4);
|
||||
fldws,ma 4($bp),${fbi} ; bp[1]
|
||||
___
|
||||
$code.=<<___ if ($BN_SZ==8);
|
||||
fldws 0($bp),${fbi} ; bp[1] in flipped word order
|
||||
___
|
||||
$code.=<<___;
|
||||
flddx $idx($ap),${fai} ; ap[0,1]
|
||||
flddx $idx($np),${fni} ; np[0,1]
|
||||
fldws 8($xfer),${fti}R ; tp[0]
|
||||
addl $hi0,$ab1,$ab1
|
||||
extrd,u $ab1,31,32,$hi0
|
||||
extrd,u $ab1,63,32,$ab1
|
||||
ldo 8($idx),$idx ; j++++
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[0]*bp[1]
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[1]*bp[1]
|
||||
addl $hi1,$nm1,$nm1
|
||||
addl $ab1,$nm1,$nm1
|
||||
extrd,u $nm1,31,32,$hi1
|
||||
fstws,mb ${fab0}L,-8($xfer) ; save high part
|
||||
stw $nm1,-4($tp) ; tp[j-1]
|
||||
|
||||
fcpy,sgl %fr0,${fti}L ; zero high part
|
||||
fcpy,sgl %fr0,${fab0}L
|
||||
addl $hi1,$hi0,$hi0
|
||||
extrd,u $hi0,31,32,$hi1
|
||||
fcnvxf,dbl,dbl ${fti},${fti} ; 32-bit unsigned int -> double
|
||||
fcnvxf,dbl,dbl ${fab0},${fab0}
|
||||
stw $hi0,0($tp)
|
||||
stw $hi1,4($tp)
|
||||
|
||||
fadd,dbl ${fti},${fab0},${fab0} ; add tp[0]
|
||||
fcnvfx,dbl,dbl ${fab0},${fab0} ; double -> 33-bit unsigned int
|
||||
xmpyu ${fn0},${fab0}R,${fm0}
|
||||
ldo `$LOCALS+32+4`($fp),$tp
|
||||
L\$outer
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[0]*m
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[1]*m
|
||||
fstds ${fab0},-16($xfer) ; 33-bit value
|
||||
fstds ${fnm0},-8($xfer)
|
||||
flddx $idx($ap),${fai} ; ap[2]
|
||||
flddx $idx($np),${fni} ; np[2]
|
||||
ldo 8($idx),$idx ; j++++
|
||||
ldd -16($xfer),$ab0 ; 33-bit value
|
||||
ldd -8($xfer),$nm0
|
||||
ldw 0($xfer),$hi0 ; high part
|
||||
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[j]*bp[i]
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[j]*m
|
||||
extrd,u $ab0,31,32,$ti0 ; carry bit
|
||||
extrd,u $ab0,63,32,$ab0
|
||||
fstds ${fab1},0($xfer)
|
||||
addl $ti0,$hi0,$hi0 ; account carry bit
|
||||
fstds ${fnm1},8($xfer)
|
||||
addl $ab0,$nm0,$nm0 ; low part is discarded
|
||||
ldw 0($tp),$ti1 ; tp[1]
|
||||
extrd,u $nm0,31,32,$hi1
|
||||
fstds ${fab0},-16($xfer)
|
||||
fstds ${fnm0},-8($xfer)
|
||||
|
||||
L\$inner
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[j+1]*bp[i]
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[j+1]*m
|
||||
ldd 0($xfer),$ab1
|
||||
fstds ${fab1},0($xfer)
|
||||
addl $hi0,$ti1,$ti1
|
||||
addl $ti1,$ab1,$ab1
|
||||
ldd 8($xfer),$nm1
|
||||
fstds ${fnm1},8($xfer)
|
||||
extrd,u $ab1,31,32,$hi0
|
||||
extrd,u $ab1,63,32,$ab1
|
||||
flddx $idx($ap),${fai} ; ap[j,j+1]
|
||||
flddx $idx($np),${fni} ; np[j,j+1]
|
||||
addl $hi1,$nm1,$nm1
|
||||
addl $ab1,$nm1,$nm1
|
||||
ldw 4($tp),$ti0 ; tp[j]
|
||||
stw $nm1,-4($tp) ; tp[j-1]
|
||||
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[j]*bp[i]
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[j]*m
|
||||
ldd -16($xfer),$ab0
|
||||
fstds ${fab0},-16($xfer)
|
||||
addl $hi0,$ti0,$ti0
|
||||
addl $ti0,$ab0,$ab0
|
||||
ldd -8($xfer),$nm0
|
||||
fstds ${fnm0},-8($xfer)
|
||||
extrd,u $ab0,31,32,$hi0
|
||||
extrd,u $nm1,31,32,$hi1
|
||||
ldw 8($tp),$ti1 ; tp[j]
|
||||
extrd,u $ab0,63,32,$ab0
|
||||
addl $hi1,$nm0,$nm0
|
||||
addl $ab0,$nm0,$nm0
|
||||
stw,ma $nm0,8($tp) ; tp[j-1]
|
||||
addib,<> 8,$idx,L\$inner ; j++++
|
||||
extrd,u $nm0,31,32,$hi1
|
||||
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[j]*bp[i]
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[j]*m
|
||||
ldd 0($xfer),$ab1
|
||||
fstds ${fab1},0($xfer)
|
||||
addl $hi0,$ti1,$ti1
|
||||
addl $ti1,$ab1,$ab1
|
||||
ldd 8($xfer),$nm1
|
||||
fstds ${fnm1},8($xfer)
|
||||
extrd,u $ab1,31,32,$hi0
|
||||
extrd,u $ab1,63,32,$ab1
|
||||
ldw 4($tp),$ti0 ; tp[j]
|
||||
addl $hi1,$nm1,$nm1
|
||||
addl $ab1,$nm1,$nm1
|
||||
ldd -16($xfer),$ab0
|
||||
ldd -8($xfer),$nm0
|
||||
extrd,u $nm1,31,32,$hi1
|
||||
|
||||
addl $hi0,$ab0,$ab0
|
||||
addl $ti0,$ab0,$ab0
|
||||
stw $nm1,-4($tp) ; tp[j-1]
|
||||
extrd,u $ab0,31,32,$hi0
|
||||
ldw 8($tp),$ti1 ; tp[j]
|
||||
extrd,u $ab0,63,32,$ab0
|
||||
addl $hi1,$nm0,$nm0
|
||||
ldd 0($xfer),$ab1
|
||||
addl $ab0,$nm0,$nm0
|
||||
ldd,mb 8($xfer),$nm1
|
||||
extrd,u $nm0,31,32,$hi1
|
||||
stw,ma $nm0,8($tp) ; tp[j-1]
|
||||
|
||||
addib,= -1,$num,L\$outerdone ; i--
|
||||
subi 0,$arrsz,$idx ; j=0
|
||||
___
|
||||
$code.=<<___ if ($BN_SZ==4);
|
||||
fldws,ma 4($bp),${fbi} ; bp[i]
|
||||
___
|
||||
$code.=<<___ if ($BN_SZ==8);
|
||||
ldi 12,$ti0 ; bp[i] in flipped word order
|
||||
addl,ev %r0,$num,$num
|
||||
ldi -4,$ti0
|
||||
addl $ti0,$bp,$bp
|
||||
fldws 0($bp),${fbi}
|
||||
___
|
||||
$code.=<<___;
|
||||
flddx $idx($ap),${fai} ; ap[0]
|
||||
addl $hi0,$ab1,$ab1
|
||||
flddx $idx($np),${fni} ; np[0]
|
||||
fldws 8($xfer),${fti}R ; tp[0]
|
||||
addl $ti1,$ab1,$ab1
|
||||
extrd,u $ab1,31,32,$hi0
|
||||
extrd,u $ab1,63,32,$ab1
|
||||
|
||||
ldo 8($idx),$idx ; j++++
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[0]*bp[i]
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[1]*bp[i]
|
||||
ldw 4($tp),$ti0 ; tp[j]
|
||||
|
||||
addl $hi1,$nm1,$nm1
|
||||
fstws,mb ${fab0}L,-8($xfer) ; save high part
|
||||
addl $ab1,$nm1,$nm1
|
||||
extrd,u $nm1,31,32,$hi1
|
||||
fcpy,sgl %fr0,${fti}L ; zero high part
|
||||
fcpy,sgl %fr0,${fab0}L
|
||||
stw $nm1,-4($tp) ; tp[j-1]
|
||||
|
||||
fcnvxf,dbl,dbl ${fti},${fti} ; 32-bit unsigned int -> double
|
||||
fcnvxf,dbl,dbl ${fab0},${fab0}
|
||||
addl $hi1,$hi0,$hi0
|
||||
fadd,dbl ${fti},${fab0},${fab0} ; add tp[0]
|
||||
addl $ti0,$hi0,$hi0
|
||||
extrd,u $hi0,31,32,$hi1
|
||||
fcnvfx,dbl,dbl ${fab0},${fab0} ; double -> 33-bit unsigned int
|
||||
stw $hi0,0($tp)
|
||||
stw $hi1,4($tp)
|
||||
xmpyu ${fn0},${fab0}R,${fm0}
|
||||
|
||||
b L\$outer
|
||||
ldo `$LOCALS+32+4`($fp),$tp
|
||||
|
||||
L\$outerdone
|
||||
addl $hi0,$ab1,$ab1
|
||||
addl $ti1,$ab1,$ab1
|
||||
extrd,u $ab1,31,32,$hi0
|
||||
extrd,u $ab1,63,32,$ab1
|
||||
|
||||
ldw 4($tp),$ti0 ; tp[j]
|
||||
|
||||
addl $hi1,$nm1,$nm1
|
||||
addl $ab1,$nm1,$nm1
|
||||
extrd,u $nm1,31,32,$hi1
|
||||
stw $nm1,-4($tp) ; tp[j-1]
|
||||
|
||||
addl $hi1,$hi0,$hi0
|
||||
addl $ti0,$hi0,$hi0
|
||||
extrd,u $hi0,31,32,$hi1
|
||||
stw $hi0,0($tp)
|
||||
stw $hi1,4($tp)
|
||||
|
||||
ldo `$LOCALS+32`($fp),$tp
|
||||
sub %r0,%r0,%r0 ; clear borrow
|
||||
___
|
||||
$code.=<<___ if ($BN_SZ==4);
|
||||
ldws,ma 4($tp),$ti0
|
||||
extru,= $rp,31,3,%r0 ; is rp 64-bit aligned?
|
||||
b L\$sub_pa11
|
||||
addl $tp,$arrsz,$tp
|
||||
L\$sub
|
||||
ldwx $idx($np),$hi0
|
||||
subb $ti0,$hi0,$hi1
|
||||
ldwx $idx($tp),$ti0
|
||||
addib,<> 4,$idx,L\$sub
|
||||
stws,ma $hi1,4($rp)
|
||||
|
||||
subb $ti0,%r0,$hi1
|
||||
ldo -4($tp),$tp
|
||||
___
|
||||
$code.=<<___ if ($BN_SZ==8);
|
||||
ldd,ma 8($tp),$ti0
|
||||
L\$sub
|
||||
ldd $idx($np),$hi0
|
||||
shrpd $ti0,$ti0,32,$ti0 ; flip word order
|
||||
std $ti0,-8($tp) ; save flipped value
|
||||
sub,db $ti0,$hi0,$hi1
|
||||
ldd,ma 8($tp),$ti0
|
||||
addib,<> 8,$idx,L\$sub
|
||||
std,ma $hi1,8($rp)
|
||||
|
||||
extrd,u $ti0,31,32,$ti0 ; carry in flipped word order
|
||||
sub,db $ti0,%r0,$hi1
|
||||
ldo -8($tp),$tp
|
||||
___
|
||||
$code.=<<___;
|
||||
and $tp,$hi1,$ap
|
||||
andcm $rp,$hi1,$bp
|
||||
or $ap,$bp,$np
|
||||
|
||||
sub $rp,$arrsz,$rp ; rewind rp
|
||||
subi 0,$arrsz,$idx
|
||||
ldo `$LOCALS+32`($fp),$tp
|
||||
L\$copy
|
||||
ldd $idx($np),$hi0
|
||||
std,ma %r0,8($tp)
|
||||
addib,<> 8,$idx,.-8 ; L\$copy
|
||||
std,ma $hi0,8($rp)
|
||||
___
|
||||
|
||||
if ($BN_SZ==4) { # PA-RISC 1.1 code-path
|
||||
$ablo=$ab0;
|
||||
$abhi=$ab1;
|
||||
$nmlo0=$nm0;
|
||||
$nmhi0=$nm1;
|
||||
$nmlo1="%r9";
|
||||
$nmhi1="%r8";
|
||||
|
||||
$code.=<<___;
|
||||
b L\$done
|
||||
nop
|
||||
|
||||
.ALIGN 8
|
||||
L\$parisc11
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[j]*bp[0]
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[j]*m
|
||||
ldw -12($xfer),$ablo
|
||||
ldw -16($xfer),$hi0
|
||||
ldw -4($xfer),$nmlo0
|
||||
ldw -8($xfer),$nmhi0
|
||||
fstds ${fab0},-16($xfer)
|
||||
fstds ${fnm0},-8($xfer)
|
||||
|
||||
ldo 8($idx),$idx ; j++++
|
||||
add $ablo,$nmlo0,$nmlo0 ; discarded
|
||||
addc %r0,$nmhi0,$hi1
|
||||
ldw 4($xfer),$ablo
|
||||
ldw 0($xfer),$abhi
|
||||
nop
|
||||
|
||||
L\$1st_pa11
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[j+1]*bp[0]
|
||||
flddx $idx($ap),${fai} ; ap[j,j+1]
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[j+1]*m
|
||||
flddx $idx($np),${fni} ; np[j,j+1]
|
||||
add $hi0,$ablo,$ablo
|
||||
ldw 12($xfer),$nmlo1
|
||||
addc %r0,$abhi,$hi0
|
||||
ldw 8($xfer),$nmhi1
|
||||
add $ablo,$nmlo1,$nmlo1
|
||||
fstds ${fab1},0($xfer)
|
||||
addc %r0,$nmhi1,$nmhi1
|
||||
fstds ${fnm1},8($xfer)
|
||||
add $hi1,$nmlo1,$nmlo1
|
||||
ldw -12($xfer),$ablo
|
||||
addc %r0,$nmhi1,$hi1
|
||||
ldw -16($xfer),$abhi
|
||||
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[j]*bp[0]
|
||||
ldw -4($xfer),$nmlo0
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[j]*m
|
||||
ldw -8($xfer),$nmhi0
|
||||
add $hi0,$ablo,$ablo
|
||||
stw $nmlo1,-4($tp) ; tp[j-1]
|
||||
addc %r0,$abhi,$hi0
|
||||
fstds ${fab0},-16($xfer)
|
||||
add $ablo,$nmlo0,$nmlo0
|
||||
fstds ${fnm0},-8($xfer)
|
||||
addc %r0,$nmhi0,$nmhi0
|
||||
ldw 0($xfer),$abhi
|
||||
add $hi1,$nmlo0,$nmlo0
|
||||
ldw 4($xfer),$ablo
|
||||
stws,ma $nmlo0,8($tp) ; tp[j-1]
|
||||
addib,<> 8,$idx,L\$1st_pa11 ; j++++
|
||||
addc %r0,$nmhi0,$hi1
|
||||
|
||||
ldw 8($xfer),$nmhi1
|
||||
ldw 12($xfer),$nmlo1
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[j]*bp[0]
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[j]*m
|
||||
add $hi0,$ablo,$ablo
|
||||
fstds ${fab1},0($xfer)
|
||||
addc %r0,$abhi,$hi0
|
||||
fstds ${fnm1},8($xfer)
|
||||
add $ablo,$nmlo1,$nmlo1
|
||||
ldw -16($xfer),$abhi
|
||||
addc %r0,$nmhi1,$nmhi1
|
||||
ldw -12($xfer),$ablo
|
||||
add $hi1,$nmlo1,$nmlo1
|
||||
ldw -8($xfer),$nmhi0
|
||||
addc %r0,$nmhi1,$hi1
|
||||
ldw -4($xfer),$nmlo0
|
||||
|
||||
add $hi0,$ablo,$ablo
|
||||
stw $nmlo1,-4($tp) ; tp[j-1]
|
||||
addc %r0,$abhi,$hi0
|
||||
ldw 0($xfer),$abhi
|
||||
add $ablo,$nmlo0,$nmlo0
|
||||
ldw 4($xfer),$ablo
|
||||
addc %r0,$nmhi0,$nmhi0
|
||||
ldws,mb 8($xfer),$nmhi1
|
||||
add $hi1,$nmlo0,$nmlo0
|
||||
ldw 4($xfer),$nmlo1
|
||||
addc %r0,$nmhi0,$hi1
|
||||
stws,ma $nmlo0,8($tp) ; tp[j-1]
|
||||
|
||||
ldo -1($num),$num ; i--
|
||||
subi 0,$arrsz,$idx ; j=0
|
||||
|
||||
fldws,ma 4($bp),${fbi} ; bp[1]
|
||||
flddx $idx($ap),${fai} ; ap[0,1]
|
||||
flddx $idx($np),${fni} ; np[0,1]
|
||||
fldws 8($xfer),${fti}R ; tp[0]
|
||||
add $hi0,$ablo,$ablo
|
||||
addc %r0,$abhi,$hi0
|
||||
ldo 8($idx),$idx ; j++++
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[0]*bp[1]
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[1]*bp[1]
|
||||
add $hi1,$nmlo1,$nmlo1
|
||||
addc %r0,$nmhi1,$nmhi1
|
||||
add $ablo,$nmlo1,$nmlo1
|
||||
addc %r0,$nmhi1,$hi1
|
||||
fstws,mb ${fab0}L,-8($xfer) ; save high part
|
||||
stw $nmlo1,-4($tp) ; tp[j-1]
|
||||
|
||||
fcpy,sgl %fr0,${fti}L ; zero high part
|
||||
fcpy,sgl %fr0,${fab0}L
|
||||
add $hi1,$hi0,$hi0
|
||||
addc %r0,%r0,$hi1
|
||||
fcnvxf,dbl,dbl ${fti},${fti} ; 32-bit unsigned int -> double
|
||||
fcnvxf,dbl,dbl ${fab0},${fab0}
|
||||
stw $hi0,0($tp)
|
||||
stw $hi1,4($tp)
|
||||
|
||||
fadd,dbl ${fti},${fab0},${fab0} ; add tp[0]
|
||||
fcnvfx,dbl,dbl ${fab0},${fab0} ; double -> 33-bit unsigned int
|
||||
xmpyu ${fn0},${fab0}R,${fm0}
|
||||
ldo `$LOCALS+32+4`($fp),$tp
|
||||
L\$outer_pa11
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[0]*m
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[1]*m
|
||||
fstds ${fab0},-16($xfer) ; 33-bit value
|
||||
fstds ${fnm0},-8($xfer)
|
||||
flddx $idx($ap),${fai} ; ap[2,3]
|
||||
flddx $idx($np),${fni} ; np[2,3]
|
||||
ldw -16($xfer),$abhi ; carry bit actually
|
||||
ldo 8($idx),$idx ; j++++
|
||||
ldw -12($xfer),$ablo
|
||||
ldw -8($xfer),$nmhi0
|
||||
ldw -4($xfer),$nmlo0
|
||||
ldw 0($xfer),$hi0 ; high part
|
||||
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[j]*bp[i]
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[j]*m
|
||||
fstds ${fab1},0($xfer)
|
||||
addl $abhi,$hi0,$hi0 ; account carry bit
|
||||
fstds ${fnm1},8($xfer)
|
||||
add $ablo,$nmlo0,$nmlo0 ; discarded
|
||||
ldw 0($tp),$ti1 ; tp[1]
|
||||
addc %r0,$nmhi0,$hi1
|
||||
fstds ${fab0},-16($xfer)
|
||||
fstds ${fnm0},-8($xfer)
|
||||
ldw 4($xfer),$ablo
|
||||
ldw 0($xfer),$abhi
|
||||
|
||||
L\$inner_pa11
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[j+1]*bp[i]
|
||||
flddx $idx($ap),${fai} ; ap[j,j+1]
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[j+1]*m
|
||||
flddx $idx($np),${fni} ; np[j,j+1]
|
||||
add $hi0,$ablo,$ablo
|
||||
ldw 4($tp),$ti0 ; tp[j]
|
||||
addc %r0,$abhi,$abhi
|
||||
ldw 12($xfer),$nmlo1
|
||||
add $ti1,$ablo,$ablo
|
||||
ldw 8($xfer),$nmhi1
|
||||
addc %r0,$abhi,$hi0
|
||||
fstds ${fab1},0($xfer)
|
||||
add $ablo,$nmlo1,$nmlo1
|
||||
fstds ${fnm1},8($xfer)
|
||||
addc %r0,$nmhi1,$nmhi1
|
||||
ldw -12($xfer),$ablo
|
||||
add $hi1,$nmlo1,$nmlo1
|
||||
ldw -16($xfer),$abhi
|
||||
addc %r0,$nmhi1,$hi1
|
||||
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[j]*bp[i]
|
||||
ldw 8($tp),$ti1 ; tp[j]
|
||||
xmpyu ${fni}L,${fm0}R,${fnm0} ; np[j]*m
|
||||
ldw -4($xfer),$nmlo0
|
||||
add $hi0,$ablo,$ablo
|
||||
ldw -8($xfer),$nmhi0
|
||||
addc %r0,$abhi,$abhi
|
||||
stw $nmlo1,-4($tp) ; tp[j-1]
|
||||
add $ti0,$ablo,$ablo
|
||||
fstds ${fab0},-16($xfer)
|
||||
addc %r0,$abhi,$hi0
|
||||
fstds ${fnm0},-8($xfer)
|
||||
add $ablo,$nmlo0,$nmlo0
|
||||
ldw 4($xfer),$ablo
|
||||
addc %r0,$nmhi0,$nmhi0
|
||||
ldw 0($xfer),$abhi
|
||||
add $hi1,$nmlo0,$nmlo0
|
||||
stws,ma $nmlo0,8($tp) ; tp[j-1]
|
||||
addib,<> 8,$idx,L\$inner_pa11 ; j++++
|
||||
addc %r0,$nmhi0,$hi1
|
||||
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[j]*bp[i]
|
||||
ldw 12($xfer),$nmlo1
|
||||
xmpyu ${fni}R,${fm0}R,${fnm1} ; np[j]*m
|
||||
ldw 8($xfer),$nmhi1
|
||||
add $hi0,$ablo,$ablo
|
||||
ldw 4($tp),$ti0 ; tp[j]
|
||||
addc %r0,$abhi,$abhi
|
||||
fstds ${fab1},0($xfer)
|
||||
add $ti1,$ablo,$ablo
|
||||
fstds ${fnm1},8($xfer)
|
||||
addc %r0,$abhi,$hi0
|
||||
ldw -16($xfer),$abhi
|
||||
add $ablo,$nmlo1,$nmlo1
|
||||
ldw -12($xfer),$ablo
|
||||
addc %r0,$nmhi1,$nmhi1
|
||||
ldw -8($xfer),$nmhi0
|
||||
add $hi1,$nmlo1,$nmlo1
|
||||
ldw -4($xfer),$nmlo0
|
||||
addc %r0,$nmhi1,$hi1
|
||||
|
||||
add $hi0,$ablo,$ablo
|
||||
stw $nmlo1,-4($tp) ; tp[j-1]
|
||||
addc %r0,$abhi,$abhi
|
||||
add $ti0,$ablo,$ablo
|
||||
ldw 8($tp),$ti1 ; tp[j]
|
||||
addc %r0,$abhi,$hi0
|
||||
ldw 0($xfer),$abhi
|
||||
add $ablo,$nmlo0,$nmlo0
|
||||
ldw 4($xfer),$ablo
|
||||
addc %r0,$nmhi0,$nmhi0
|
||||
ldws,mb 8($xfer),$nmhi1
|
||||
add $hi1,$nmlo0,$nmlo0
|
||||
ldw 4($xfer),$nmlo1
|
||||
addc %r0,$nmhi0,$hi1
|
||||
stws,ma $nmlo0,8($tp) ; tp[j-1]
|
||||
|
||||
addib,= -1,$num,L\$outerdone_pa11; i--
|
||||
subi 0,$arrsz,$idx ; j=0
|
||||
|
||||
fldws,ma 4($bp),${fbi} ; bp[i]
|
||||
flddx $idx($ap),${fai} ; ap[0]
|
||||
add $hi0,$ablo,$ablo
|
||||
addc %r0,$abhi,$abhi
|
||||
flddx $idx($np),${fni} ; np[0]
|
||||
fldws 8($xfer),${fti}R ; tp[0]
|
||||
add $ti1,$ablo,$ablo
|
||||
addc %r0,$abhi,$hi0
|
||||
|
||||
ldo 8($idx),$idx ; j++++
|
||||
xmpyu ${fai}L,${fbi},${fab0} ; ap[0]*bp[i]
|
||||
xmpyu ${fai}R,${fbi},${fab1} ; ap[1]*bp[i]
|
||||
ldw 4($tp),$ti0 ; tp[j]
|
||||
|
||||
add $hi1,$nmlo1,$nmlo1
|
||||
addc %r0,$nmhi1,$nmhi1
|
||||
fstws,mb ${fab0}L,-8($xfer) ; save high part
|
||||
add $ablo,$nmlo1,$nmlo1
|
||||
addc %r0,$nmhi1,$hi1
|
||||
fcpy,sgl %fr0,${fti}L ; zero high part
|
||||
fcpy,sgl %fr0,${fab0}L
|
||||
stw $nmlo1,-4($tp) ; tp[j-1]
|
||||
|
||||
fcnvxf,dbl,dbl ${fti},${fti} ; 32-bit unsigned int -> double
|
||||
fcnvxf,dbl,dbl ${fab0},${fab0}
|
||||
add $hi1,$hi0,$hi0
|
||||
addc %r0,%r0,$hi1
|
||||
fadd,dbl ${fti},${fab0},${fab0} ; add tp[0]
|
||||
add $ti0,$hi0,$hi0
|
||||
addc %r0,$hi1,$hi1
|
||||
fcnvfx,dbl,dbl ${fab0},${fab0} ; double -> 33-bit unsigned int
|
||||
stw $hi0,0($tp)
|
||||
stw $hi1,4($tp)
|
||||
xmpyu ${fn0},${fab0}R,${fm0}
|
||||
|
||||
b L\$outer_pa11
|
||||
ldo `$LOCALS+32+4`($fp),$tp
|
||||
|
||||
L\$outerdone_pa11
|
||||
add $hi0,$ablo,$ablo
|
||||
addc %r0,$abhi,$abhi
|
||||
add $ti1,$ablo,$ablo
|
||||
addc %r0,$abhi,$hi0
|
||||
|
||||
ldw 4($tp),$ti0 ; tp[j]
|
||||
|
||||
add $hi1,$nmlo1,$nmlo1
|
||||
addc %r0,$nmhi1,$nmhi1
|
||||
add $ablo,$nmlo1,$nmlo1
|
||||
addc %r0,$nmhi1,$hi1
|
||||
stw $nmlo1,-4($tp) ; tp[j-1]
|
||||
|
||||
add $hi1,$hi0,$hi0
|
||||
addc %r0,%r0,$hi1
|
||||
add $ti0,$hi0,$hi0
|
||||
addc %r0,$hi1,$hi1
|
||||
stw $hi0,0($tp)
|
||||
stw $hi1,4($tp)
|
||||
|
||||
ldo `$LOCALS+32+4`($fp),$tp
|
||||
sub %r0,%r0,%r0 ; clear borrow
|
||||
ldw -4($tp),$ti0
|
||||
addl $tp,$arrsz,$tp
|
||||
L\$sub_pa11
|
||||
ldwx $idx($np),$hi0
|
||||
subb $ti0,$hi0,$hi1
|
||||
ldwx $idx($tp),$ti0
|
||||
addib,<> 4,$idx,L\$sub_pa11
|
||||
stws,ma $hi1,4($rp)
|
||||
|
||||
subb $ti0,%r0,$hi1
|
||||
ldo -4($tp),$tp
|
||||
and $tp,$hi1,$ap
|
||||
andcm $rp,$hi1,$bp
|
||||
or $ap,$bp,$np
|
||||
|
||||
sub $rp,$arrsz,$rp ; rewind rp
|
||||
subi 0,$arrsz,$idx
|
||||
ldo `$LOCALS+32`($fp),$tp
|
||||
L\$copy_pa11
|
||||
ldwx $idx($np),$hi0
|
||||
stws,ma %r0,4($tp)
|
||||
addib,<> 4,$idx,L\$copy_pa11
|
||||
stws,ma $hi0,4($rp)
|
||||
|
||||
nop ; alignment
|
||||
L\$done
|
||||
___
|
||||
}
|
||||
|
||||
$code.=<<___;
|
||||
ldi 1,%r28 ; signal "handled"
|
||||
ldo $FRAME($fp),%sp ; destroy tp[num+1]
|
||||
|
||||
$POP `-$FRAME-$SAVED_RP`(%sp),%r2 ; standard epilogue
|
||||
$POP `-$FRAME+1*$SIZE_T`(%sp),%r4
|
||||
$POP `-$FRAME+2*$SIZE_T`(%sp),%r5
|
||||
$POP `-$FRAME+3*$SIZE_T`(%sp),%r6
|
||||
$POP `-$FRAME+4*$SIZE_T`(%sp),%r7
|
||||
$POP `-$FRAME+5*$SIZE_T`(%sp),%r8
|
||||
$POP `-$FRAME+6*$SIZE_T`(%sp),%r9
|
||||
$POP `-$FRAME+7*$SIZE_T`(%sp),%r10
|
||||
L\$abort
|
||||
bv (%r2)
|
||||
.EXIT
|
||||
$POPMB -$FRAME(%sp),%r3
|
||||
.PROCEND
|
||||
.STRINGZ "Montgomery Multiplication for PA-RISC, CRYPTOGAMS by <appro\@openssl.org>"
|
||||
___
|
||||
|
||||
# Explicitly encode PA-RISC 2.0 instructions used in this module, so
|
||||
# that it can be compiled with .LEVEL 1.0. It should be noted that I
|
||||
# wouldn't have to do this, if GNU assembler understood .ALLOW 2.0
|
||||
# directive...
|
||||
|
||||
my $ldd = sub {
|
||||
my ($mod,$args) = @_;
|
||||
my $orig = "ldd$mod\t$args";
|
||||
|
||||
if ($args =~ /%r([0-9]+)\(%r([0-9]+)\),%r([0-9]+)/) # format 4
|
||||
{ my $opcode=(0x03<<26)|($2<<21)|($1<<16)|(3<<6)|$3;
|
||||
sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig;
|
||||
}
|
||||
elsif ($args =~ /(\-?[0-9]+)\(%r([0-9]+)\),%r([0-9]+)/) # format 5
|
||||
{ my $opcode=(0x03<<26)|($2<<21)|(1<<12)|(3<<6)|$3;
|
||||
$opcode|=(($1&0xF)<<17)|(($1&0x10)<<12); # encode offset
|
||||
$opcode|=(1<<5) if ($mod =~ /^,m/);
|
||||
$opcode|=(1<<13) if ($mod =~ /^,mb/);
|
||||
sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig;
|
||||
}
|
||||
else { "\t".$orig; }
|
||||
};
|
||||
|
||||
my $std = sub {
|
||||
my ($mod,$args) = @_;
|
||||
my $orig = "std$mod\t$args";
|
||||
|
||||
if ($args =~ /%r([0-9]+),(\-?[0-9]+)\(%r([0-9]+)\)/) # format 6
|
||||
{ my $opcode=(0x03<<26)|($3<<21)|($1<<16)|(1<<12)|(0xB<<6);
|
||||
$opcode|=(($2&0xF)<<1)|(($2&0x10)>>4); # encode offset
|
||||
$opcode|=(1<<5) if ($mod =~ /^,m/);
|
||||
$opcode|=(1<<13) if ($mod =~ /^,mb/);
|
||||
sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig;
|
||||
}
|
||||
else { "\t".$orig; }
|
||||
};
|
||||
|
||||
my $extrd = sub {
|
||||
my ($mod,$args) = @_;
|
||||
my $orig = "extrd$mod\t$args";
|
||||
|
||||
# I only have ",u" completer, it's implicitly encoded...
|
||||
if ($args =~ /%r([0-9]+),([0-9]+),([0-9]+),%r([0-9]+)/) # format 15
|
||||
{ my $opcode=(0x36<<26)|($1<<21)|($4<<16);
|
||||
my $len=32-$3;
|
||||
$opcode |= (($2&0x20)<<6)|(($2&0x1f)<<5); # encode pos
|
||||
$opcode |= (($len&0x20)<<7)|($len&0x1f); # encode len
|
||||
sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig;
|
||||
}
|
||||
elsif ($args =~ /%r([0-9]+),%sar,([0-9]+),%r([0-9]+)/) # format 12
|
||||
{ my $opcode=(0x34<<26)|($1<<21)|($3<<16)|(2<<11)|(1<<9);
|
||||
my $len=32-$2;
|
||||
$opcode |= (($len&0x20)<<3)|($len&0x1f); # encode len
|
||||
$opcode |= (1<<13) if ($mod =~ /,\**=/);
|
||||
sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig;
|
||||
}
|
||||
else { "\t".$orig; }
|
||||
};
|
||||
|
||||
my $shrpd = sub {
|
||||
my ($mod,$args) = @_;
|
||||
my $orig = "shrpd$mod\t$args";
|
||||
|
||||
if ($args =~ /%r([0-9]+),%r([0-9]+),([0-9]+),%r([0-9]+)/) # format 14
|
||||
{ my $opcode=(0x34<<26)|($2<<21)|($1<<16)|(1<<10)|$4;
|
||||
my $cpos=63-$3;
|
||||
$opcode |= (($cpos&0x20)<<6)|(($cpos&0x1f)<<5); # encode sa
|
||||
sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig;
|
||||
}
|
||||
else { "\t".$orig; }
|
||||
};
|
||||
|
||||
my $sub = sub {
|
||||
my ($mod,$args) = @_;
|
||||
my $orig = "sub$mod\t$args";
|
||||
|
||||
if ($mod eq ",db" && $args =~ /%r([0-9]+),%r([0-9]+),%r([0-9]+)/) {
|
||||
my $opcode=(0x02<<26)|($2<<21)|($1<<16)|$3;
|
||||
$opcode|=(1<<10); # e1
|
||||
$opcode|=(1<<8); # e2
|
||||
$opcode|=(1<<5); # d
|
||||
sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig
|
||||
}
|
||||
else { "\t".$orig; }
|
||||
};
|
||||
|
||||
sub assemble {
|
||||
my ($mnemonic,$mod,$args)=@_;
|
||||
my $opcode = eval("\$$mnemonic");
|
||||
|
||||
ref($opcode) eq 'CODE' ? &$opcode($mod,$args) : "\t$mnemonic$mod\t$args";
|
||||
}
|
||||
|
||||
foreach (split("\n",$code)) {
|
||||
s/\`([^\`]*)\`/eval $1/ge;
|
||||
# flip word order in 64-bit mode...
|
||||
s/(xmpyu\s+)($fai|$fni)([LR])/$1.$2.($3 eq "L"?"R":"L")/e if ($BN_SZ==8);
|
||||
# assemble 2.0 instructions in 32-bit mode...
|
||||
s/^\s+([a-z]+)([\S]*)\s+([\S]*)/&assemble($1,$2,$3)/e if ($BN_SZ==4);
|
||||
|
||||
s/\bbv\b/bve/gm if ($SIZE_T==8);
|
||||
|
||||
print $_,"\n";
|
||||
}
|
||||
close STDOUT;
|
||||
@@ -31,7 +31,6 @@ if ($flavour =~ /32/) {
|
||||
$BNSZ= $BITS/8;
|
||||
$SIZE_T=4;
|
||||
$RZONE= 224;
|
||||
$FRAME= $SIZE_T*16;
|
||||
|
||||
$LD= "lwz"; # load
|
||||
$LDU= "lwzu"; # load and update
|
||||
@@ -51,7 +50,6 @@ if ($flavour =~ /32/) {
|
||||
$BNSZ= $BITS/8;
|
||||
$SIZE_T=8;
|
||||
$RZONE= 288;
|
||||
$FRAME= $SIZE_T*16;
|
||||
|
||||
# same as above, but 64-bit mnemonics...
|
||||
$LD= "ld"; # load
|
||||
@@ -69,6 +67,9 @@ if ($flavour =~ /32/) {
|
||||
$POP= $LD;
|
||||
} else { die "nonsense $flavour"; }
|
||||
|
||||
$FRAME=8*$SIZE_T+$RZONE;
|
||||
$LOCALS=8*$SIZE_T;
|
||||
|
||||
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
|
||||
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
|
||||
@@ -89,18 +90,18 @@ $aj="r10";
|
||||
$nj="r11";
|
||||
$tj="r12";
|
||||
# non-volatile registers
|
||||
$i="r14";
|
||||
$j="r15";
|
||||
$tp="r16";
|
||||
$m0="r17";
|
||||
$m1="r18";
|
||||
$lo0="r19";
|
||||
$hi0="r20";
|
||||
$lo1="r21";
|
||||
$hi1="r22";
|
||||
$alo="r23";
|
||||
$ahi="r24";
|
||||
$nlo="r25";
|
||||
$i="r20";
|
||||
$j="r21";
|
||||
$tp="r22";
|
||||
$m0="r23";
|
||||
$m1="r24";
|
||||
$lo0="r25";
|
||||
$hi0="r26";
|
||||
$lo1="r27";
|
||||
$hi1="r28";
|
||||
$alo="r29";
|
||||
$ahi="r30";
|
||||
$nlo="r31";
|
||||
#
|
||||
$nhi="r0";
|
||||
|
||||
@@ -108,42 +109,48 @@ $code=<<___;
|
||||
.machine "any"
|
||||
.text
|
||||
|
||||
.globl .bn_mul_mont
|
||||
.globl .bn_mul_mont_int
|
||||
.align 4
|
||||
.bn_mul_mont:
|
||||
.bn_mul_mont_int:
|
||||
cmpwi $num,4
|
||||
mr $rp,r3 ; $rp is reassigned
|
||||
li r3,0
|
||||
bltlr
|
||||
|
||||
___
|
||||
$code.=<<___ if ($BNSZ==4);
|
||||
cmpwi $num,32 ; longer key performance is not better
|
||||
bgelr
|
||||
___
|
||||
$code.=<<___;
|
||||
slwi $num,$num,`log($BNSZ)/log(2)`
|
||||
li $tj,-4096
|
||||
addi $ovf,$num,`$FRAME+$RZONE`
|
||||
addi $ovf,$num,$FRAME
|
||||
subf $ovf,$ovf,$sp ; $sp-$ovf
|
||||
and $ovf,$ovf,$tj ; minimize TLB usage
|
||||
subf $ovf,$sp,$ovf ; $ovf-$sp
|
||||
mr $tj,$sp
|
||||
srwi $num,$num,`log($BNSZ)/log(2)`
|
||||
$STUX $sp,$sp,$ovf
|
||||
|
||||
$PUSH r14,`4*$SIZE_T`($sp)
|
||||
$PUSH r15,`5*$SIZE_T`($sp)
|
||||
$PUSH r16,`6*$SIZE_T`($sp)
|
||||
$PUSH r17,`7*$SIZE_T`($sp)
|
||||
$PUSH r18,`8*$SIZE_T`($sp)
|
||||
$PUSH r19,`9*$SIZE_T`($sp)
|
||||
$PUSH r20,`10*$SIZE_T`($sp)
|
||||
$PUSH r21,`11*$SIZE_T`($sp)
|
||||
$PUSH r22,`12*$SIZE_T`($sp)
|
||||
$PUSH r23,`13*$SIZE_T`($sp)
|
||||
$PUSH r24,`14*$SIZE_T`($sp)
|
||||
$PUSH r25,`15*$SIZE_T`($sp)
|
||||
$PUSH r20,`-12*$SIZE_T`($tj)
|
||||
$PUSH r21,`-11*$SIZE_T`($tj)
|
||||
$PUSH r22,`-10*$SIZE_T`($tj)
|
||||
$PUSH r23,`-9*$SIZE_T`($tj)
|
||||
$PUSH r24,`-8*$SIZE_T`($tj)
|
||||
$PUSH r25,`-7*$SIZE_T`($tj)
|
||||
$PUSH r26,`-6*$SIZE_T`($tj)
|
||||
$PUSH r27,`-5*$SIZE_T`($tj)
|
||||
$PUSH r28,`-4*$SIZE_T`($tj)
|
||||
$PUSH r29,`-3*$SIZE_T`($tj)
|
||||
$PUSH r30,`-2*$SIZE_T`($tj)
|
||||
$PUSH r31,`-1*$SIZE_T`($tj)
|
||||
|
||||
$LD $n0,0($n0) ; pull n0[0] value
|
||||
addi $num,$num,-2 ; adjust $num for counter register
|
||||
|
||||
$LD $m0,0($bp) ; m0=bp[0]
|
||||
$LD $aj,0($ap) ; ap[0]
|
||||
addi $tp,$sp,$FRAME
|
||||
addi $tp,$sp,$LOCALS
|
||||
$UMULL $lo0,$aj,$m0 ; ap[0]*bp[0]
|
||||
$UMULH $hi0,$aj,$m0
|
||||
|
||||
@@ -205,8 +212,8 @@ L1st:
|
||||
Louter:
|
||||
$LDX $m0,$bp,$i ; m0=bp[i]
|
||||
$LD $aj,0($ap) ; ap[0]
|
||||
addi $tp,$sp,$FRAME
|
||||
$LD $tj,$FRAME($sp) ; tp[0]
|
||||
addi $tp,$sp,$LOCALS
|
||||
$LD $tj,$LOCALS($sp); tp[0]
|
||||
$UMULL $lo0,$aj,$m0 ; ap[0]*bp[i]
|
||||
$UMULH $hi0,$aj,$m0
|
||||
$LD $aj,$BNSZ($ap) ; ap[1]
|
||||
@@ -273,7 +280,7 @@ Linner:
|
||||
|
||||
addi $num,$num,2 ; restore $num
|
||||
subfc $j,$j,$j ; j=0 and "clear" XER[CA]
|
||||
addi $tp,$sp,$FRAME
|
||||
addi $tp,$sp,$LOCALS
|
||||
mtctr $num
|
||||
|
||||
.align 4
|
||||
@@ -299,23 +306,27 @@ Lcopy: ; copy or in-place refresh
|
||||
addi $j,$j,$BNSZ
|
||||
bdnz- Lcopy
|
||||
|
||||
$POP r14,`4*$SIZE_T`($sp)
|
||||
$POP r15,`5*$SIZE_T`($sp)
|
||||
$POP r16,`6*$SIZE_T`($sp)
|
||||
$POP r17,`7*$SIZE_T`($sp)
|
||||
$POP r18,`8*$SIZE_T`($sp)
|
||||
$POP r19,`9*$SIZE_T`($sp)
|
||||
$POP r20,`10*$SIZE_T`($sp)
|
||||
$POP r21,`11*$SIZE_T`($sp)
|
||||
$POP r22,`12*$SIZE_T`($sp)
|
||||
$POP r23,`13*$SIZE_T`($sp)
|
||||
$POP r24,`14*$SIZE_T`($sp)
|
||||
$POP r25,`15*$SIZE_T`($sp)
|
||||
$POP $sp,0($sp)
|
||||
$POP $tj,0($sp)
|
||||
li r3,1
|
||||
$POP r20,`-12*$SIZE_T`($tj)
|
||||
$POP r21,`-11*$SIZE_T`($tj)
|
||||
$POP r22,`-10*$SIZE_T`($tj)
|
||||
$POP r23,`-9*$SIZE_T`($tj)
|
||||
$POP r24,`-8*$SIZE_T`($tj)
|
||||
$POP r25,`-7*$SIZE_T`($tj)
|
||||
$POP r26,`-6*$SIZE_T`($tj)
|
||||
$POP r27,`-5*$SIZE_T`($tj)
|
||||
$POP r28,`-4*$SIZE_T`($tj)
|
||||
$POP r29,`-3*$SIZE_T`($tj)
|
||||
$POP r30,`-2*$SIZE_T`($tj)
|
||||
$POP r31,`-1*$SIZE_T`($tj)
|
||||
mr $sp,$tj
|
||||
blr
|
||||
.long 0
|
||||
.asciz "Montgomery Multiplication for PPC, CRYPTOGAMS by <appro\@fy.chalmers.se>"
|
||||
.byte 0,12,4,0,0x80,12,6,0
|
||||
.long 0
|
||||
|
||||
.asciz "Montgomery Multiplication for PPC, CRYPTOGAMS by <appro\@openssl.org>"
|
||||
___
|
||||
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user