Compare commits
1384 Commits
v3.15.3-st
...
v3.15.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e87433e2b6 | ||
|
|
809c30a5b9 | ||
|
|
c45dade903 | ||
|
|
dc144df32a | ||
|
|
e78125e8d6 | ||
|
|
b528997d30 | ||
|
|
edf6318985 | ||
|
|
a382a979cc | ||
|
|
e2e3b835d6 | ||
|
|
8f3f27065c | ||
|
|
469898aeeb | ||
|
|
b830447690 | ||
|
|
4226fb66f9 | ||
|
|
b189fc0ef8 | ||
|
|
5c6876e05e | ||
|
|
95b08553a1 | ||
|
|
9b500c6d56 | ||
|
|
6ce28d74ff | ||
|
|
77ffeccb0b | ||
|
|
b33023df2f | ||
|
|
1512f4da90 | ||
|
|
326ee8c318 | ||
|
|
a3af2fc960 | ||
|
|
38303cf27b | ||
|
|
eecc823208 | ||
|
|
9a129e89c1 | ||
|
|
fe620b5250 | ||
|
|
a2f8747652 | ||
|
|
cb830a088f | ||
|
|
700e9896d4 | ||
|
|
2bb5dd710c | ||
|
|
b45241f6f8 | ||
|
|
a44751cd39 | ||
|
|
efc1ab8c42 | ||
|
|
0360b38de4 | ||
|
|
3785bafdf4 | ||
|
|
603a9b2e59 | ||
|
|
72a50b8d46 | ||
|
|
0e914d81dc | ||
|
|
feea036ec9 | ||
|
|
712ecabf36 | ||
|
|
9ff976a6e1 | ||
|
|
b037334732 | ||
|
|
04e3c4414d | ||
|
|
9b125c5797 | ||
|
|
8b0bcdaf29 | ||
|
|
8bb4e23f8d | ||
|
|
ee3eb8fb4c | ||
|
|
289f51a77d | ||
|
|
5932cdab15 | ||
|
|
55ca2c2da7 | ||
|
|
5801e7773b | ||
|
|
ee4e27afe2 | ||
|
|
b68eab6450 | ||
|
|
18d3e04dbf | ||
|
|
b0957c68fb | ||
|
|
b4996e35fa | ||
|
|
9c9221432f | ||
|
|
b8dc772ef8 | ||
|
|
3013cdd925 | ||
|
|
025fba8ec6 | ||
|
|
5d667ed1b8 | ||
|
|
d81fb727a3 | ||
|
|
ba14564c49 | ||
|
|
c2fbef2f7f | ||
|
|
dc1f0d7822 | ||
|
|
520ae52ece | ||
|
|
e3997558a9 | ||
|
|
5e1eee091a | ||
|
|
4302c02e67 | ||
|
|
2c447b24cd | ||
|
|
3366acc9ce | ||
|
|
7aa5cd6f10 | ||
|
|
c0d1241786 | ||
|
|
d806134cbf | ||
|
|
25dd5882f8 | ||
|
|
7275ee5f19 | ||
|
|
d9a5898e91 | ||
|
|
c04cade97c | ||
|
|
16f31cf8c6 | ||
|
|
e47797f700 | ||
|
|
a9f29dbb61 | ||
|
|
e2d7b402e7 | ||
|
|
3223920fd9 | ||
|
|
cd7f8cc653 | ||
|
|
67e70d6cb6 | ||
|
|
64cb07557d | ||
|
|
5856d6b3dc | ||
|
|
275667f0e9 | ||
|
|
46bb2591c8 | ||
|
|
d98ebc4da2 | ||
|
|
272181bc2e | ||
|
|
817b82e453 | ||
|
|
1fab970316 | ||
|
|
95db819d45 | ||
|
|
e0b46734d6 | ||
|
|
1a8388641d | ||
|
|
c9521b56f2 | ||
|
|
eb8a2f3a03 | ||
|
|
454687f429 | ||
|
|
dcdb1d7094 | ||
|
|
e7b23646a5 | ||
|
|
838652c03b | ||
|
|
40a7bcfc20 | ||
|
|
88d3abb1e6 | ||
|
|
18d5b3393c | ||
|
|
891abe130a | ||
|
|
9fc0610720 | ||
|
|
7e3082906e | ||
|
|
dad88b4c81 | ||
|
|
08bcef7c0c | ||
|
|
f824c8c769 | ||
|
|
acb983a154 | ||
|
|
feae776ee3 | ||
|
|
e5f94e5884 | ||
|
|
66ab6d8c22 | ||
|
|
acc0121e0f | ||
|
|
fb6aaf2ae2 | ||
|
|
56736a3563 | ||
|
|
4e5ea71118 | ||
|
|
e86aae00ed | ||
|
|
47922a4d87 | ||
|
|
88050de1ff | ||
|
|
dd32df5df1 | ||
|
|
aa21a0e6df | ||
|
|
b6d322cd14 | ||
|
|
6298074f93 | ||
|
|
e52f4494f0 | ||
|
|
4f4d16d9e5 | ||
|
|
8666b7de9a | ||
|
|
ec28376e7f | ||
|
|
f61d99526b | ||
|
|
53bf510740 | ||
|
|
be4d6bc204 | ||
|
|
390f3f5fca | ||
|
|
b7179c2a54 | ||
|
|
73fbf845f2 | ||
|
|
8fc1780688 | ||
|
|
14a2343118 | ||
|
|
4a5652f318 | ||
|
|
1258467b0a | ||
|
|
4a177a8a30 | ||
|
|
c080050c80 | ||
|
|
c82d11f47d | ||
|
|
3a0afc3506 | ||
|
|
7822cef1ac | ||
|
|
e8b46caf75 | ||
|
|
574238dea0 | ||
|
|
0b2bbc33bd | ||
|
|
1288036dbe | ||
|
|
5c6b42e60d | ||
|
|
66987b4f2a | ||
|
|
67f615f42f | ||
|
|
0d8ca06928 | ||
|
|
61e8d1ab92 | ||
|
|
e4abcc0a15 | ||
|
|
53adb93ae4 | ||
|
|
743f8b576f | ||
|
|
0fe7591b0f | ||
|
|
4ef6841465 | ||
|
|
2fa8e8bb94 | ||
|
|
d16c2ca7c6 | ||
|
|
7c4fa33937 | ||
|
|
fd429bb656 | ||
|
|
c48786c649 | ||
|
|
7ce255aa4d | ||
|
|
eaf5c3042d | ||
|
|
952d0b3b6b | ||
|
|
52e8e77390 | ||
|
|
d00dd9d7c9 | ||
|
|
e87dac66ac | ||
|
|
f7c0a77c9c | ||
|
|
5ce6a9009e | ||
|
|
501a3a287b | ||
|
|
5539b0eb38 | ||
|
|
db5c63bb25 | ||
|
|
8ecee6a7e9 | ||
|
|
253915866d | ||
|
|
4fb6e65857 | ||
|
|
b8ebd41fbc | ||
|
|
f0a3045d62 | ||
|
|
5dbd074f33 | ||
|
|
1f26282bf2 | ||
|
|
58da860cd6 | ||
|
|
e51cc4e99d | ||
|
|
534fe6ab39 | ||
|
|
739b57c753 | ||
|
|
f2732a4ecd | ||
|
|
c282f5b726 | ||
|
|
cc3c2ef683 | ||
|
|
aa4de6e170 | ||
|
|
8356c3d7e2 | ||
|
|
63f6c1d280 | ||
|
|
91d81ea691 | ||
|
|
d3e2488552 | ||
|
|
d07cf53bb1 | ||
|
|
02ef2ede12 | ||
|
|
b632c8dcc1 | ||
|
|
33f876bb20 | ||
|
|
fe97264ff9 | ||
|
|
d02f7a75b9 | ||
|
|
aba726fcd3 | ||
|
|
c6a0d32979 | ||
|
|
2bcde06f90 | ||
|
|
357e0c9d15 | ||
|
|
e18891aed8 | ||
|
|
9879425c5f | ||
|
|
4a5c380f32 | ||
|
|
2753d2d548 | ||
|
|
e519e1eb2a | ||
|
|
8fb7892013 | ||
|
|
0459e9842e | ||
|
|
ee45cfdbcb | ||
|
|
8edd7d0b17 | ||
|
|
f6240e5558 | ||
|
|
91573735b1 | ||
|
|
5e03ac13f6 | ||
|
|
02ff19a6c4 | ||
|
|
bcc2458be6 | ||
|
|
d5b06f93fd | ||
|
|
c26cb53c05 | ||
|
|
32ed53a991 | ||
|
|
5d262e9123 | ||
|
|
d7ecdf110e | ||
|
|
b683a5a6bb | ||
|
|
bb74dca6e7 | ||
|
|
b37c94a15c | ||
|
|
1226bc3379 | ||
|
|
b2e4c86028 | ||
|
|
53ad7728bf | ||
|
|
8352365160 | ||
|
|
e4132d32a4 | ||
|
|
6ac384793f | ||
|
|
809fed8f05 | ||
|
|
864df5f9de | ||
|
|
cfc66dab47 | ||
|
|
3c2aa60862 | ||
|
|
45cd80b4b7 | ||
|
|
bcc177b23d | ||
|
|
406d2ceb6b | ||
|
|
56415928ff | ||
|
|
ebd68e6afd | ||
|
|
0ef4856039 | ||
|
|
141b263546 | ||
|
|
f67b8fa6a3 | ||
|
|
a4a6895900 | ||
|
|
6eea924a5c | ||
|
|
3f46250994 | ||
|
|
ebc9533bc7 | ||
|
|
ba0d488807 | ||
|
|
e1fd7b86f7 | ||
|
|
bdc5dd41d1 | ||
|
|
003360237f | ||
|
|
26ae39a217 | ||
|
|
a00eaeb877 | ||
|
|
df2a0f9a4f | ||
|
|
f3c08ae8b9 | ||
|
|
ff0a4eb69a | ||
|
|
a7251e4158 | ||
|
|
ef916f2c55 | ||
|
|
1201ffb13f | ||
|
|
656c7951cd | ||
|
|
ed80cf4f4d | ||
|
|
2121607705 | ||
|
|
71bc571a8a | ||
|
|
5677e71cba | ||
|
|
9c75753bd2 | ||
|
|
d5509a4f37 | ||
|
|
332dd75e5f | ||
|
|
47f5282416 | ||
|
|
a1459f6fec | ||
|
|
fb0eb55f28 | ||
|
|
b5ff99a017 | ||
|
|
9df0fc9509 | ||
|
|
30612ad3ed | ||
|
|
965c68abdf | ||
|
|
913fe6ea2b | ||
|
|
e8bf2bbb02 | ||
|
|
9d2294b967 | ||
|
|
c54e8e31bd | ||
|
|
cc8c6078b6 | ||
|
|
2351047409 | ||
|
|
1eccaae25f | ||
|
|
5cb5b510ab | ||
|
|
66442c4bd5 | ||
|
|
697c99a9ec | ||
|
|
9c88218b62 | ||
|
|
a7350b7d2e | ||
|
|
f97696a546 | ||
|
|
6ff8febf0f | ||
|
|
1d5c50cc63 | ||
|
|
0c828d14a0 | ||
|
|
a73bca090b | ||
|
|
b6d61f2987 | ||
|
|
ae09fbe8a2 | ||
|
|
86177d1830 | ||
|
|
3eff20904a | ||
|
|
75321d72f6 | ||
|
|
61757c83eb | ||
|
|
a358174b4b | ||
|
|
6191cb1927 | ||
|
|
59a3b4a110 | ||
|
|
00dd222aa5 | ||
|
|
9733076fe0 | ||
|
|
3e31115654 | ||
|
|
d3274e28e8 | ||
|
|
7d11c3f67c | ||
|
|
a4a4cd6a3c | ||
|
|
5d2d370bd5 | ||
|
|
164a762088 | ||
|
|
eba11e097a | ||
|
|
48c267dda8 | ||
|
|
165a80d02d | ||
|
|
92d59c7df4 | ||
|
|
413506f2b5 | ||
|
|
fc926d3c61 | ||
|
|
986b5d3951 | ||
|
|
4068975190 | ||
|
|
58a2f518e8 | ||
|
|
0a6732ee67 | ||
|
|
4a170c0399 | ||
|
|
f1c62f191d | ||
|
|
c41d02e72f | ||
|
|
412966ed80 | ||
|
|
443dbf251b | ||
|
|
c478a2791a | ||
|
|
cbbe63ec62 | ||
|
|
c23489e6ed | ||
|
|
b60918b8cd | ||
|
|
15b6c39929 | ||
|
|
502e3c2b6d | ||
|
|
249306f08c | ||
|
|
c628562ee7 | ||
|
|
f90e5601ad | ||
|
|
3e326aba15 | ||
|
|
70cb4dcdb1 | ||
|
|
fb68b3a450 | ||
|
|
122114b840 | ||
|
|
2ef8be2718 | ||
|
|
bdf447cec9 | ||
|
|
3f7ced3ed5 | ||
|
|
f715d9179c | ||
|
|
8772b5dc51 | ||
|
|
eef48cd8a2 | ||
|
|
cbc8f4ce38 | ||
|
|
d8adca91b3 | ||
|
|
c7b0aac47a | ||
|
|
195b995bc4 | ||
|
|
dc104985c3 | ||
|
|
59bfead3c8 | ||
|
|
1c0fa6fb58 | ||
|
|
c844b1c253 | ||
|
|
a484749f4c | ||
|
|
06d6b06928 | ||
|
|
a936c609f3 | ||
|
|
7e0e512a5c | ||
|
|
6552455968 | ||
|
|
c7ffdc8b0b | ||
|
|
dc82beea4e | ||
|
|
bc4150af2c | ||
|
|
70d345eda0 | ||
|
|
2208514c98 | ||
|
|
fb41510f12 | ||
|
|
c122f6082f | ||
|
|
e4f60dc894 | ||
|
|
0a725f4d56 | ||
|
|
8f3b05dd33 | ||
|
|
43bc0233cb | ||
|
|
d662291b3d | ||
|
|
fe8080ce4a | ||
|
|
0259178033 | ||
|
|
14c43959f0 | ||
|
|
7048efb5fa | ||
|
|
6dfc723961 | ||
|
|
d6ebd2d832 | ||
|
|
f468e7f0b6 | ||
|
|
1d5b99eecc | ||
|
|
8aa54e5453 | ||
|
|
ab03f9291b | ||
|
|
b145aab6b2 | ||
|
|
ec76ab7e42 | ||
|
|
69436b6d41 | ||
|
|
0abf7c4997 | ||
|
|
175c91ab4e | ||
|
|
d168d60ade | ||
|
|
8355dd29cb | ||
|
|
74eadf556e | ||
|
|
dfcfbc885d | ||
|
|
ac0f71f4c4 | ||
|
|
cc93c43a52 | ||
|
|
68e1091627 | ||
|
|
ecdb27289c | ||
|
|
f4831b9fbb | ||
|
|
188a15428d | ||
|
|
d90e66da80 | ||
|
|
60a424d4e9 | ||
|
|
ec1bd3951e | ||
|
|
a47e08c49e | ||
|
|
6254062438 | ||
|
|
fa0b4cd2d5 | ||
|
|
a55f11cdd8 | ||
|
|
4995051081 | ||
|
|
9bda19fd25 | ||
|
|
28dc1cbb67 | ||
|
|
f74fb84337 | ||
|
|
ea769bcf38 | ||
|
|
bdfa0e1745 | ||
|
|
564a1ee499 | ||
|
|
34d8437a2e | ||
|
|
ff1a1dc5d5 | ||
|
|
a8e21d1c09 | ||
|
|
938e9ad7be | ||
|
|
2c48553a29 | ||
|
|
bea93e9159 | ||
|
|
af0bb278a1 | ||
|
|
48252524dc | ||
|
|
1b5ac2ea8d | ||
|
|
bbea4aba59 | ||
|
|
a203cd4901 | ||
|
|
95c6c0df28 | ||
|
|
0e94ae529c | ||
|
|
a3d1ea20ff | ||
|
|
8c0a55d43b | ||
|
|
424196cb03 | ||
|
|
c4919d191b | ||
|
|
74b8c2795b | ||
|
|
70305758d4 | ||
|
|
33db5babc9 | ||
|
|
2827ef6a57 | ||
|
|
814e45a12b | ||
|
|
310ffd0045 | ||
|
|
918c769284 | ||
|
|
1a518c6c46 | ||
|
|
6ed462f564 | ||
|
|
11810160b4 | ||
|
|
a5e3b18252 | ||
|
|
216b2bf3fe | ||
|
|
3cee583f8d | ||
|
|
55bbffe3c6 | ||
|
|
3afa9a3886 | ||
|
|
4afa0f72fe | ||
|
|
c529e011a7 | ||
|
|
d51d8d86b5 | ||
|
|
96b4ddad82 | ||
|
|
7a24d4e46f | ||
|
|
4bf61a81e4 | ||
|
|
f87c327fae | ||
|
|
f11809aa62 | ||
|
|
73dbd15b2b | ||
|
|
09141d479e | ||
|
|
1244212d41 | ||
|
|
101966329e | ||
|
|
da71d7243e | ||
|
|
5156641f2b | ||
|
|
95bd340de5 | ||
|
|
e81436ffe9 | ||
|
|
b05782a5c9 | ||
|
|
3a033cae8c | ||
|
|
7ac8acff09 | ||
|
|
2ad6ce351b | ||
|
|
061757c909 | ||
|
|
11ccce809d | ||
|
|
ac8c4adc06 | ||
|
|
bc09f4bd30 | ||
|
|
3599798aac | ||
|
|
6ee60bbb49 | ||
|
|
d2989d9f43 | ||
|
|
e756c5ffc9 | ||
|
|
4295db218a | ||
|
|
7f76af0b36 | ||
|
|
ee30b2b476 | ||
|
|
ae1b1d777a | ||
|
|
c307fd7af4 | ||
|
|
8399a7a517 | ||
|
|
c592a1d6cb | ||
|
|
ed79aa1dc5 | ||
|
|
0f4a06594e | ||
|
|
8689cc6a04 | ||
|
|
2503a4c0de | ||
|
|
0452594cf7 | ||
|
|
254b0f665b | ||
|
|
61c7be669b | ||
|
|
533f4a5c77 | ||
|
|
ba8d1962c7 | ||
|
|
9f6167872f | ||
|
|
b3d5999be9 | ||
|
|
d5dddd2b29 | ||
|
|
e9a10e3614 | ||
|
|
fcb40570e2 | ||
|
|
da76fb6861 | ||
|
|
39506e61d1 | ||
|
|
4a88626500 | ||
|
|
078db9e445 | ||
|
|
cd37e3967c | ||
|
|
94c75aa3ed | ||
|
|
2468a19c82 | ||
|
|
6e4ab91ccf | ||
|
|
196791390b | ||
|
|
5a53048e8f | ||
|
|
f7f6506a54 | ||
|
|
24e2a2b228 | ||
|
|
100bf76748 | ||
|
|
27db083733 | ||
|
|
820ee0439a | ||
|
|
9fa4f754ab | ||
|
|
a2b2ce124e | ||
|
|
afbf09b970 | ||
|
|
773a81ef6a | ||
|
|
448f91b56d | ||
|
|
cc32466603 | ||
|
|
9bef9bad8e | ||
|
|
4d9375b862 | ||
|
|
004b0d3793 | ||
|
|
867bcb4545 | ||
|
|
77a1dafed0 | ||
|
|
62a2847d75 | ||
|
|
048a7f4c57 | ||
|
|
5a59fdd6fd | ||
|
|
b3506c836c | ||
|
|
98efc1e9de | ||
|
|
752259e343 | ||
|
|
5525f59852 | ||
|
|
47303ed445 | ||
|
|
b4d02d6d99 | ||
|
|
b0e4cb3572 | ||
|
|
5d8f59d83b | ||
|
|
d69a3c1092 | ||
|
|
c9f75fe7b4 | ||
|
|
175e32b468 | ||
|
|
ed7cd54a91 | ||
|
|
cc05c46318 | ||
|
|
2cc89936e3 | ||
|
|
02df920269 | ||
|
|
83a150c4df | ||
|
|
40ef246b1f | ||
|
|
4315384051 | ||
|
|
06a6f8400b | ||
|
|
bc94cdc11b | ||
|
|
a4da14f4b0 | ||
|
|
75349bbba5 | ||
|
|
794137c20c | ||
|
|
85e0c203ea | ||
|
|
0b3930e24f | ||
|
|
13b30a6a21 | ||
|
|
dbb5bb7570 | ||
|
|
ec07fe492e | ||
|
|
1f8c4c2613 | ||
|
|
7841434744 | ||
|
|
897c6b455f | ||
|
|
a25a637270 | ||
|
|
56f1b68442 | ||
|
|
ce1381dc9a | ||
|
|
6a06a3b63b | ||
|
|
c51cf4472e | ||
|
|
32b70dd56c | ||
|
|
2a60fbd766 | ||
|
|
70ca95b357 | ||
|
|
bdf07e64cf | ||
|
|
5d8f4351ff | ||
|
|
7a2a66743b | ||
|
|
bc2bb78010 | ||
|
|
144ff68cfb | ||
|
|
2c7ff56a3e | ||
|
|
95092696bf | ||
|
|
efb1efcc0d | ||
|
|
1a4533f166 | ||
|
|
ee00852509 | ||
|
|
d61ae3a02a | ||
|
|
92d6dc36af | ||
|
|
c1ca1f1b78 | ||
|
|
6372c3d6e1 | ||
|
|
98291f8465 | ||
|
|
1261247e2a | ||
|
|
cfafbd9659 | ||
|
|
1ffc1108a6 | ||
|
|
a953a3141e | ||
|
|
81650d6cef | ||
|
|
2b3b19d1c8 | ||
|
|
6dd4fba888 | ||
|
|
cc3ccbaf0c | ||
|
|
f6093e1e0d | ||
|
|
def7a91e70 | ||
|
|
f4b0261ca7 | ||
|
|
2c0edae96f | ||
|
|
ab458db504 | ||
|
|
b64c527138 | ||
|
|
ba90674357 | ||
|
|
ae07ba93ad | ||
|
|
d18c9cad61 | ||
|
|
a6adfd434d | ||
|
|
a47eeec145 | ||
|
|
153c7cc684 | ||
|
|
3be7eacea9 | ||
|
|
d21603334b | ||
|
|
81651c351b | ||
|
|
86758f9640 | ||
|
|
23445546c5 | ||
|
|
c4d6f886b7 | ||
|
|
0eb115e7a1 | ||
|
|
7586e1df42 | ||
|
|
c173d72423 | ||
|
|
ef8b564d2e | ||
|
|
22aa01a547 | ||
|
|
878b5925fc | ||
|
|
42fecee77b | ||
|
|
353f9018f5 | ||
|
|
0b720c4412 | ||
|
|
96abf43238 | ||
|
|
6953677a8f | ||
|
|
a27b4c2efb | ||
|
|
7ce236f3af | ||
|
|
dabeccca27 | ||
|
|
f2ef67446d | ||
|
|
c268829b68 | ||
|
|
fac6ce794d | ||
|
|
355184bc9b | ||
|
|
4a4ae446aa | ||
|
|
84fb23cfab | ||
|
|
7551e49fed | ||
|
|
67bb558025 | ||
|
|
8a872891c5 | ||
|
|
cdd8f6b950 | ||
|
|
dc519e6a45 | ||
|
|
095337b1cf | ||
|
|
dcb105deff | ||
|
|
8b529d3d57 | ||
|
|
5ca822b1e9 | ||
|
|
7391f4db90 | ||
|
|
969098518f | ||
|
|
2aa6f91144 | ||
|
|
0d7d8f54e0 | ||
|
|
d7d102d90a | ||
|
|
ab61cefa58 | ||
|
|
4adaeb8585 | ||
|
|
e53694b351 | ||
|
|
bd57f5b385 | ||
|
|
177bf49fa6 | ||
|
|
bb737ec99d | ||
|
|
d67cb9e875 | ||
|
|
ba9f21bad6 | ||
|
|
c51c607e96 | ||
|
|
53c2264327 | ||
|
|
7074625048 | ||
|
|
e78ddfce75 | ||
|
|
be318abbc2 | ||
|
|
7c3313481a | ||
|
|
f7eb8bf080 | ||
|
|
23ef832dd3 | ||
|
|
a0608151cf | ||
|
|
5904a97378 | ||
|
|
23a0f3cfa1 | ||
|
|
52210c9d16 | ||
|
|
fc77ed068c | ||
|
|
6fbeae8f11 | ||
|
|
fec726f10a | ||
|
|
45eb3ae72d | ||
|
|
0b78b75530 | ||
|
|
1a34b9da03 | ||
|
|
19905b7798 | ||
|
|
1fd791da21 | ||
|
|
b404d4805f | ||
|
|
63878f32ab | ||
|
|
b736012214 | ||
|
|
e774bfcf60 | ||
|
|
b4b180c1b9 | ||
|
|
9a0ecd4eb6 | ||
|
|
f9ff151ee7 | ||
|
|
23797ab4cb | ||
|
|
5d047cc4d9 | ||
|
|
8f1ad656c2 | ||
|
|
0293686990 | ||
|
|
7a3a314ece | ||
|
|
355048230f | ||
|
|
7a02832547 | ||
|
|
c6e3e34ff7 | ||
|
|
1ed50a40e7 | ||
|
|
66420db07c | ||
|
|
93c85caec4 | ||
|
|
67cab29d81 | ||
|
|
cec61ac3c9 | ||
|
|
1d7c4f96fa | ||
|
|
319096e7e7 | ||
|
|
bbdb17975c | ||
|
|
846ae06ae9 | ||
|
|
0ec9b28402 | ||
|
|
08654ce71d | ||
|
|
f83ea9a9d5 | ||
|
|
d473fd38ab | ||
|
|
c619bfebda | ||
|
|
f0350c1efb | ||
|
|
0c72dee315 | ||
|
|
680a863054 | ||
|
|
0829af7a05 | ||
|
|
cfba86d3ab | ||
|
|
be2f68d183 | ||
|
|
4ca7460735 | ||
|
|
142111da3b | ||
|
|
8f36a78a71 | ||
|
|
1f643800a6 | ||
|
|
05ca60a266 | ||
|
|
13bf2fc342 | ||
|
|
f19f803098 | ||
|
|
6d18f58f81 | ||
|
|
d30c45a79c | ||
|
|
5cd428eaa8 | ||
|
|
fc81467715 | ||
|
|
d0abc10fe9 | ||
|
|
8ccd715f31 | ||
|
|
441c0492f6 | ||
|
|
6e629a51f8 | ||
|
|
3c828c0547 | ||
|
|
1bf7cad633 | ||
|
|
d7249068db | ||
|
|
18a27cfe75 | ||
|
|
52b5fe569b | ||
|
|
ff5506faf2 | ||
|
|
71863c462e | ||
|
|
dc06bb075d | ||
|
|
01654dac1a | ||
|
|
cfa99c567b | ||
|
|
ca9f62713d | ||
|
|
cf5377ec5b | ||
|
|
921992e689 | ||
|
|
d9c0e1ddde | ||
|
|
c28e981b9b | ||
|
|
c7cfa74577 | ||
|
|
a189d00fc9 | ||
|
|
3c93d4e638 | ||
|
|
226bc54b57 | ||
|
|
8a046b0bac | ||
|
|
59beba6338 | ||
|
|
c3abb6c0cd | ||
|
|
93e1221894 | ||
|
|
9ea88b5181 | ||
|
|
89dcbd6693 | ||
|
|
511b59cf73 | ||
|
|
9ae3ccb3ba | ||
|
|
094141b4ea | ||
|
|
7d2a03f8c9 | ||
|
|
2669b80943 | ||
|
|
5de7a34fd4 | ||
|
|
1c627430c7 | ||
|
|
1d1f4df8cb | ||
|
|
7af43b6cf0 | ||
|
|
7767d802b7 | ||
|
|
c673884cbb | ||
|
|
4d03b55fef | ||
|
|
fd634141bd | ||
|
|
fd01659baa | ||
|
|
19c1a3a3f9 | ||
|
|
3f993c280c | ||
|
|
3f82fb62a0 | ||
|
|
259d3b5720 | ||
|
|
1e87eae3b7 | ||
|
|
52cee17668 | ||
|
|
e6612b34f7 | ||
|
|
787fa5d49a | ||
|
|
3bf776baf4 | ||
|
|
29d3303995 | ||
|
|
b588e6ab29 | ||
|
|
e79cdefcde | ||
|
|
2922a93bf7 | ||
|
|
050fa2f8f8 | ||
|
|
aaa26f3f41 | ||
|
|
a002a6715f | ||
|
|
98ae3bb7fd | ||
|
|
741301bb2c | ||
|
|
c4e1cdf335 | ||
|
|
27aaedf37c | ||
|
|
4855246fc6 | ||
|
|
3be25441fa | ||
|
|
0efc637d2d | ||
|
|
038b5e8a66 | ||
|
|
d273d1dc81 | ||
|
|
3a72cf7996 | ||
|
|
f7f158cbd9 | ||
|
|
77a81057be | ||
|
|
5744e4227d | ||
|
|
8a5a03ea35 | ||
|
|
dfec7f2263 | ||
|
|
29d60ec7e9 | ||
|
|
fc77590c4e | ||
|
|
b2575b0b60 | ||
|
|
e07e8a6a6e | ||
|
|
0591b18339 | ||
|
|
a643aeac41 | ||
|
|
24f9f12844 | ||
|
|
39019c2418 | ||
|
|
a5fffdbbb7 | ||
|
|
dfb9db2b8d | ||
|
|
dc942bf9cb | ||
|
|
ea06a3e8cb | ||
|
|
fe2f9d4aa4 | ||
|
|
427c62e04a | ||
|
|
54e04dd312 | ||
|
|
4177c2f316 | ||
|
|
c225b45364 | ||
|
|
17ebb0ea49 | ||
|
|
afcdfd70fe | ||
|
|
f3fd67c54b | ||
|
|
4f6ee556dc | ||
|
|
96a7e366bc | ||
|
|
2e88151cfd | ||
|
|
951bd5a01a | ||
|
|
b1b7093a1d | ||
|
|
8972867ada | ||
|
|
582cf3182e | ||
|
|
4aa85f956f | ||
|
|
b9a850575f | ||
|
|
085daa78cd | ||
|
|
4981480215 | ||
|
|
9e305a01b4 | ||
|
|
d05423af7e | ||
|
|
b832b7bad3 | ||
|
|
14815431e7 | ||
|
|
2e4c07ed93 | ||
|
|
301e91e4d3 | ||
|
|
04c444af35 | ||
|
|
32d3cb6cfb | ||
|
|
a7ab98be69 | ||
|
|
fb699acec4 | ||
|
|
a4d502e22a | ||
|
|
77cd361bca | ||
|
|
e071f1ca7e | ||
|
|
8a6a9e7620 | ||
|
|
d4d6346ee5 | ||
|
|
7457ab3e14 | ||
|
|
037151eae0 | ||
|
|
1c25fc801e | ||
|
|
4f95ba0f69 | ||
|
|
0275366fb6 | ||
|
|
e809fc2d5d | ||
|
|
324235f698 | ||
|
|
581f72adf8 | ||
|
|
5b985c7dbd | ||
|
|
b330c6e035 | ||
|
|
bd1d36f0aa | ||
|
|
8aae8ceb2a | ||
|
|
df20daa1ae | ||
|
|
7ddc756d15 | ||
|
|
66dc735454 | ||
|
|
4bbbb82a01 | ||
|
|
d280359548 | ||
|
|
6876b7d98e | ||
|
|
93e3db3ae2 | ||
|
|
0ad77628f1 | ||
|
|
ca83f97508 | ||
|
|
a63da76e07 | ||
|
|
d658701350 | ||
|
|
01dc018cda | ||
|
|
8060deb40a | ||
|
|
330a7048c7 | ||
|
|
f90b7d6c37 | ||
|
|
238f45d89d | ||
|
|
f48e2067ae | ||
|
|
2c5b0d82da | ||
|
|
a2be7590d1 | ||
|
|
8fdb6b79d0 | ||
|
|
f8ac5b5f71 | ||
|
|
2d413c5bb8 | ||
|
|
0d44252608 | ||
|
|
902008f5ea | ||
|
|
412eecd51a | ||
|
|
7d1ab5e9d2 | ||
|
|
575382e5a9 | ||
|
|
e677c32714 | ||
|
|
294a22e938 | ||
|
|
c98f8842a3 | ||
|
|
27555d6eb7 | ||
|
|
a7fb48e157 | ||
|
|
15be0aceed | ||
|
|
ed14b68c38 | ||
|
|
0a7b06857d | ||
|
|
6981d48a4d | ||
|
|
5360faac9d | ||
|
|
d9a6484b75 | ||
|
|
ae3d8d3779 | ||
|
|
8719b888eb | ||
|
|
d998d10f02 | ||
|
|
a7821e0d6d | ||
|
|
30d968d6b0 | ||
|
|
a3cc2119d7 | ||
|
|
b8605fa544 | ||
|
|
0626338be2 | ||
|
|
5ee09f77a1 | ||
|
|
d432d346aa | ||
|
|
28ad8e591d | ||
|
|
bac8b78a8c | ||
|
|
d149795648 | ||
|
|
8e67ef33b2 | ||
|
|
8584da60a8 | ||
|
|
e1c4d3f5e6 | ||
|
|
d3ea903c55 | ||
|
|
e730cda550 | ||
|
|
17a70aee1b | ||
|
|
4b208f4fe5 | ||
|
|
4d0478a287 | ||
|
|
d2b9b230a0 | ||
|
|
6171e29fe8 | ||
|
|
41ab3d91fd | ||
|
|
697c61af35 | ||
|
|
00ff519b23 | ||
|
|
d089a4651a | ||
|
|
d86fc2dbbe | ||
|
|
ffc0f0fb26 | ||
|
|
3729b12fae | ||
|
|
b369e524d4 | ||
|
|
3d0d10345a | ||
|
|
944342b386 | ||
|
|
53c0003cad | ||
|
|
2551512718 | ||
|
|
31e37ea5df | ||
|
|
fc64788092 | ||
|
|
d084a4bcb8 | ||
|
|
03fbad22a6 | ||
|
|
818b0a3c9c | ||
|
|
ab487e25a0 | ||
|
|
4fd805ff1e | ||
|
|
e4ccb2fe83 | ||
|
|
4d79eb121e | ||
|
|
4dbe86f1fd | ||
|
|
4d6f43277e | ||
|
|
487c60df78 | ||
|
|
57620caac8 | ||
|
|
551201c00c | ||
|
|
24694ef7b0 | ||
|
|
46c04cafd3 | ||
|
|
d122b9f8b5 | ||
|
|
205088d1bc | ||
|
|
459455328f | ||
|
|
1d9b482711 | ||
|
|
86ce22c32e | ||
|
|
1005ca0703 | ||
|
|
bd5e507617 | ||
|
|
4eb0d32fa8 | ||
|
|
347fdccf1c | ||
|
|
c96aeb4550 | ||
|
|
7f324d2c3b | ||
|
|
b7b99a2e92 | ||
|
|
274b41dea5 | ||
|
|
498d8e6c15 | ||
|
|
88e6bd2915 | ||
|
|
40551720ab | ||
|
|
689da22799 | ||
|
|
c7dde6c682 | ||
|
|
cc39f3211a | ||
|
|
5d8a2a7702 | ||
|
|
554d40a62e | ||
|
|
0d171e591b | ||
|
|
54a379d8e0 | ||
|
|
8477d5ba1b | ||
|
|
5ce1757e05 | ||
|
|
f23eb37ade | ||
|
|
57d72028f6 | ||
|
|
d0d28c82cd | ||
|
|
53af520911 | ||
|
|
d7d2fb34af | ||
|
|
bdb5d3c191 | ||
|
|
7bd16a2582 | ||
|
|
b74869a61a | ||
|
|
b7385476f0 | ||
|
|
79a7518fdd | ||
|
|
3d27a8dc53 | ||
|
|
783c4a0c5e | ||
|
|
9ae4ef2d5c | ||
|
|
08c2d94011 | ||
|
|
31bd844d6f | ||
|
|
fff5cff273 | ||
|
|
776fd51720 | ||
|
|
e635e49635 | ||
|
|
a505f2b063 | ||
|
|
a0f1c9dbe4 | ||
|
|
1ab17ac827 | ||
|
|
d29118ba58 | ||
|
|
103a0d351b | ||
|
|
389f56b5c7 | ||
|
|
506c858ed6 | ||
|
|
b12386fbb1 | ||
|
|
20950ffde8 | ||
|
|
3d16ed9c02 | ||
|
|
e4757f1283 | ||
|
|
f3c4d5442e | ||
|
|
0e1b8b7bd8 | ||
|
|
0f539616be | ||
|
|
683182f494 | ||
|
|
555714afa3 | ||
|
|
c8814a7ee1 | ||
|
|
3e08c27512 | ||
|
|
d104ae39e3 | ||
|
|
3cdeccc36e | ||
|
|
a7b5ed1c27 | ||
|
|
79590f3310 | ||
|
|
ed9aaa93f4 | ||
|
|
cc10c971cd | ||
|
|
ff635d5b2b | ||
|
|
f1222c3f9f | ||
|
|
2ac2c24f22 | ||
|
|
93546694ca | ||
|
|
aeb9ab8aea | ||
|
|
eb08c6f6fc | ||
|
|
f487b0d96a | ||
|
|
9db7ba2f0d | ||
|
|
c6e075f077 | ||
|
|
739bbd1355 | ||
|
|
baab6755b2 | ||
|
|
be0523b7cd | ||
|
|
373258a0c2 | ||
|
|
c3ab52ed44 | ||
|
|
f74406d2c9 | ||
|
|
3d16f891d4 | ||
|
|
cdff2869c2 | ||
|
|
2420af3cf2 | ||
|
|
9ad059542a | ||
|
|
e2de988f98 | ||
|
|
d1e13a973c | ||
|
|
1c297b3ac4 | ||
|
|
f23915baa1 | ||
|
|
6ca56ee98c | ||
|
|
ff7d2fefdc | ||
|
|
7b83db0f65 | ||
|
|
eca64717be | ||
|
|
17e102d914 | ||
|
|
be33e69b22 | ||
|
|
368227be2c | ||
|
|
c073aee87c | ||
|
|
04c2b51b4d | ||
|
|
278fd9c054 | ||
|
|
d823d6f7b6 | ||
|
|
64f553d944 | ||
|
|
aee4aea64d | ||
|
|
d4f908c372 | ||
|
|
a3627106ea | ||
|
|
91d2b17139 | ||
|
|
f44d42b1c8 | ||
|
|
5caaa94868 | ||
|
|
b71c2ddf38 | ||
|
|
93a7b76da5 | ||
|
|
80e46253d9 | ||
|
|
bb574d28b2 | ||
|
|
6d10efe79c | ||
|
|
280de47d06 | ||
|
|
c288a214b1 | ||
|
|
ba3bc59771 | ||
|
|
735e4a0986 | ||
|
|
6113f68c21 | ||
|
|
35dbf9a6fe | ||
|
|
a9a9dd257e | ||
|
|
c7f1d810c3 | ||
|
|
cc1680dc98 | ||
|
|
56974c099e | ||
|
|
c4ea50b956 | ||
|
|
7d39a897dc | ||
|
|
30d6c0c1fc | ||
|
|
30e787b10c | ||
|
|
7726786998 | ||
|
|
738a121d61 | ||
|
|
b88d60ecbb | ||
|
|
f6a8a2f5bd | ||
|
|
368b5b1072 | ||
|
|
f45dbed8f9 | ||
|
|
a43d4d16ba | ||
|
|
a915c3a381 | ||
|
|
660c3300e1 | ||
|
|
5ae45436f4 | ||
|
|
782ea74fbf | ||
|
|
99b556c07d | ||
|
|
c71f730d67 | ||
|
|
ddec878152 | ||
|
|
b248af6f84 | ||
|
|
a178764a8b | ||
|
|
93c2f3b170 | ||
|
|
fd75f35801 | ||
|
|
6527c2a724 | ||
|
|
c87d6b27e2 | ||
|
|
0ccdefb8d0 | ||
|
|
7647d52d77 | ||
|
|
244d931e75 | ||
|
|
ba2f0fd8fc | ||
|
|
5ca2ff187b | ||
|
|
98f6ae16ca | ||
|
|
8bc5bc227d | ||
|
|
da096497e0 | ||
|
|
ce5e787afc | ||
|
|
dba8131b19 | ||
|
|
a72cbcf8eb | ||
|
|
cb756397b3 | ||
|
|
96c1a567f0 | ||
|
|
61ac7315e2 | ||
|
|
72aef0ab11 | ||
|
|
f5b3de6b54 | ||
|
|
7053830628 | ||
|
|
af89458af0 | ||
|
|
ed208efc4d | ||
|
|
2e1a1681ec | ||
|
|
50372b7033 | ||
|
|
0e1588f4ad | ||
|
|
fe08b98117 | ||
|
|
2b3f94944d | ||
|
|
f18351fef5 | ||
|
|
f5bd376450 | ||
|
|
0f86494161 | ||
|
|
656c0453a2 | ||
|
|
6a91fbcfdd | ||
|
|
4eff7b641b | ||
|
|
6ed6876b1f | ||
|
|
2c3475c1d6 | ||
|
|
62cb69ded6 | ||
|
|
335f467b8c | ||
|
|
50115e55b3 | ||
|
|
ec238c0553 | ||
|
|
c71d8eb6ba | ||
|
|
1079b0e3b3 | ||
|
|
0ef63048a0 | ||
|
|
309d7a9d0d | ||
|
|
d19b78d81a | ||
|
|
166330030c | ||
|
|
861fec1dc6 | ||
|
|
0ee4b88e74 | ||
|
|
4b8507813e | ||
|
|
afb2180e80 | ||
|
|
04e16b8df8 | ||
|
|
543cac65d8 | ||
|
|
74c4d31c07 | ||
|
|
31f1692cbf | ||
|
|
4b2a591a93 | ||
|
|
efbabbfb29 | ||
|
|
a1f69f0d64 | ||
|
|
90367df13c | ||
|
|
84c1b633fb | ||
|
|
92cb8f06ea | ||
|
|
beceab2734 | ||
|
|
74fbd06817 | ||
|
|
003b7b28f4 | ||
|
|
fe2aee11d8 | ||
|
|
17c7ecb2bc | ||
|
|
169cca355f | ||
|
|
018573bcf3 | ||
|
|
0175447eb3 | ||
|
|
f69c6e382c | ||
|
|
92bc891713 | ||
|
|
e618f34c2f | ||
|
|
ef076a68d3 | ||
|
|
ab3ffaa26a | ||
|
|
69aa74d220 | ||
|
|
6d3e145571 | ||
|
|
06b888a997 | ||
|
|
3957bb4ebe | ||
|
|
c432bb5e82 | ||
|
|
887e3deee8 | ||
|
|
027f18919a | ||
|
|
7f19f914c0 | ||
|
|
d54c7a7df8 | ||
|
|
9433fcb820 | ||
|
|
c5a44c083a | ||
|
|
b6ac3379f0 | ||
|
|
6d0c49a425 | ||
|
|
59f241e510 | ||
|
|
a58d1cf030 | ||
|
|
19dd08e191 | ||
|
|
c9434c5ad8 | ||
|
|
213f79f06f | ||
|
|
42985d8250 | ||
|
|
5c940351b7 | ||
|
|
5b9fbb5d42 | ||
|
|
27b7791f5e | ||
|
|
da1ac3643f | ||
|
|
70dfb9af72 | ||
|
|
0dbd35ae01 | ||
|
|
db8939c578 | ||
|
|
227e7cc8c7 | ||
|
|
aa2d6f8060 | ||
|
|
436e774729 | ||
|
|
52aac6e641 | ||
|
|
0c59aa8e31 | ||
|
|
17d5b6a42b | ||
|
|
ebdfe9715e | ||
|
|
74c391d138 | ||
|
|
0236a293e4 | ||
|
|
ce092a96a2 | ||
|
|
a862ef860b | ||
|
|
1840ae7013 | ||
|
|
6a6f5d01b4 | ||
|
|
f693c9cc8b | ||
|
|
96567112cd | ||
|
|
8fed6dfb27 | ||
|
|
1766b69de2 | ||
|
|
d6c9d30aee | ||
|
|
eebbe0239a | ||
|
|
7e5bf9b8a9 | ||
|
|
e6c22fbd85 | ||
|
|
c01c79349e | ||
|
|
befe15ddb9 | ||
|
|
6ef800e5f7 | ||
|
|
88a2531652 | ||
|
|
514a949557 | ||
|
|
87f378efb5 | ||
|
|
49fefe176e | ||
|
|
ea769b831c | ||
|
|
dbe0ac6fec | ||
|
|
00fd7ff8de | ||
|
|
f0422bec41 | ||
|
|
f59fb0df8e | ||
|
|
eeb50099d9 | ||
|
|
1337f7ddec | ||
|
|
ddd6563442 | ||
|
|
6c1778d373 | ||
|
|
223c71b96c | ||
|
|
0a19dc0940 | ||
|
|
2f00c0b465 | ||
|
|
71d8946ee6 | ||
|
|
9bc0e0c4fc | ||
|
|
f22f33606a | ||
|
|
ffc6cf4eb8 | ||
|
|
771e349925 | ||
|
|
0240cc7795 | ||
|
|
997a377310 | ||
|
|
7d5da4d122 | ||
|
|
0ce6cbd4c4 | ||
|
|
1b965491d9 | ||
|
|
f7c5b27bfc | ||
|
|
cadd556b3a | ||
|
|
eeece1df1e | ||
|
|
81d13e15d5 | ||
|
|
d486df50aa | ||
|
|
93d7891701 | ||
|
|
d8dff3e4de | ||
|
|
40d0e7f711 | ||
|
|
c1af8d2190 | ||
|
|
5908230d20 | ||
|
|
2f638a0ae1 | ||
|
|
23687f44bc | ||
|
|
d639939a07 | ||
|
|
05cfeae3ce | ||
|
|
eb32935081 | ||
|
|
0f2b5ca181 | ||
|
|
df6c496c4e | ||
|
|
c1a9945656 | ||
|
|
9281f30deb | ||
|
|
239880a9de | ||
|
|
e2dec618d8 | ||
|
|
0e06f6413d | ||
|
|
9ca5c65f33 | ||
|
|
58478c50af | ||
|
|
4cbae0bca3 | ||
|
|
3fc7424e03 | ||
|
|
d361a1aebd | ||
|
|
f1c3098bdc | ||
|
|
87499aa7bd | ||
|
|
376a4d3ca8 | ||
|
|
90cf4ad7ad | ||
|
|
9c2a5d2906 | ||
|
|
ed17963f21 | ||
|
|
2e2a502683 | ||
|
|
85d58cbf8c | ||
|
|
5cc8771b43 | ||
|
|
595beb3fec | ||
|
|
32f1b0a9c2 | ||
|
|
9bf8122af7 | ||
|
|
8ba4dda8a8 | ||
|
|
80f98f7ab7 | ||
|
|
3cbcc872c1 | ||
|
|
e44cb91a3b | ||
|
|
0e8e3b7441 | ||
|
|
c8e118cd12 | ||
|
|
af65a9520a | ||
|
|
ae54bae2fa | ||
|
|
ad0f775911 | ||
|
|
ac0b31dee8 | ||
|
|
f809a6a17b | ||
|
|
fbd5a4f67f | ||
|
|
77f11a6be9 | ||
|
|
9f35d211e0 | ||
|
|
e17a16a45a | ||
|
|
df9ed87c5f | ||
|
|
52d9803d72 | ||
|
|
adb3cc5a5a | ||
|
|
cf191a4d96 | ||
|
|
201217bd97 | ||
|
|
2bd4fb110c | ||
|
|
e319987579 | ||
|
|
fb3d3dce0e | ||
|
|
a9ff79e321 | ||
|
|
0bf3a89992 | ||
|
|
3adbb07abe | ||
|
|
733cb74ea8 | ||
|
|
07401d909c | ||
|
|
33b72a3dfe | ||
|
|
44c4e33290 | ||
|
|
ebb3eb87d1 | ||
|
|
42ece70ff2 | ||
|
|
c6890d518e | ||
|
|
54f2c3fe18 | ||
|
|
b4da4340a1 | ||
|
|
ea32f2dbef | ||
|
|
e204b19923 | ||
|
|
6fa92fdd71 | ||
|
|
cd2971fb93 | ||
|
|
6dbca2b718 | ||
|
|
66c2c65444 | ||
|
|
7ae9e4359d | ||
|
|
abaa5daf43 | ||
|
|
7fbe1d3049 | ||
|
|
f32bd77a1d | ||
|
|
765d97ae01 | ||
|
|
af75145602 | ||
|
|
ac3eb470f9 | ||
|
|
c2c209fb89 | ||
|
|
47497f5aaa | ||
|
|
554275ba71 | ||
|
|
13b7dad0fa | ||
|
|
5d767aa004 | ||
|
|
0c74e778dc | ||
|
|
3572b26bd9 | ||
|
|
1b2876679b | ||
|
|
f031a6fc67 | ||
|
|
586874b997 | ||
|
|
d8086ded6a | ||
|
|
d9b5948947 | ||
|
|
4151af4b4a | ||
|
|
a7d761c336 | ||
|
|
8c9e0cd427 | ||
|
|
d13dfa309e | ||
|
|
9d7bcf8ec7 | ||
|
|
e6c7952f50 | ||
|
|
ed1c56a4fc | ||
|
|
522f365279 | ||
|
|
1cb5bbf8ea | ||
|
|
71606dde45 | ||
|
|
ec132cd3f4 | ||
|
|
623f1b58ac | ||
|
|
64ba151c35 | ||
|
|
534114d979 | ||
|
|
5e516cc2e0 | ||
|
|
7827712fcc | ||
|
|
7e5c41ca35 | ||
|
|
10070bb5fd | ||
|
|
df6fe0b07c | ||
|
|
391d1953fa | ||
|
|
234228e5af | ||
|
|
a6dd93aa2e | ||
|
|
7e9a32fffd | ||
|
|
6e697c21d9 | ||
|
|
dd0489db8c | ||
|
|
4dacd31ea4 | ||
|
|
6a31f103aa | ||
|
|
12edf80e2b | ||
|
|
ceed6e08fd | ||
|
|
20d8a4a376 | ||
|
|
1ff4ea1ec9 | ||
|
|
6b6ed2c42f | ||
|
|
a8dbdd6c28 | ||
|
|
4d0a061acb | ||
|
|
3be824ad68 | ||
|
|
f7fa648f77 | ||
|
|
1538ceef47 | ||
|
|
dde1f87de9 | ||
|
|
6d4777f3ca | ||
|
|
418cca5efd | ||
|
|
b120a27c3e | ||
|
|
4f1dd3b9a7 | ||
|
|
eea4d6da50 | ||
|
|
dc31dbaeaf | ||
|
|
27470aa704 | ||
|
|
8fb3a0c078 | ||
|
|
6796ab5f8c | ||
|
|
c2f964039e | ||
|
|
6d7599cf47 | ||
|
|
4ba026c0bf | ||
|
|
19da916102 | ||
|
|
3685b7b176 | ||
|
|
13ff245166 | ||
|
|
90a5bde0f2 | ||
|
|
4b3933aa1b | ||
|
|
33040a25d8 | ||
|
|
d0d2527950 | ||
|
|
4bcd7b7986 | ||
|
|
eb1a76bf2a | ||
|
|
aa968eac98 | ||
|
|
fe8d46da95 | ||
|
|
be61204fd7 | ||
|
|
f6fe3744a7 | ||
|
|
df4d748f59 | ||
|
|
6352208e04 | ||
|
|
0c5d704c7f |
106
.gitignore
vendored
106
.gitignore
vendored
@@ -40,10 +40,12 @@ wolfssl-config
|
||||
cyassl.sublime*
|
||||
fips.h
|
||||
fips.c
|
||||
fipsv2.c
|
||||
fips_test.c
|
||||
fips
|
||||
wolfcrypt_first.c
|
||||
wolfcrypt_last.c
|
||||
selftest.c
|
||||
fipsv2.c
|
||||
src/async.c
|
||||
wolfssl/async.h
|
||||
wolfcrypt/src/async.c
|
||||
@@ -99,22 +101,85 @@ ecc-key.pem
|
||||
certreq.der
|
||||
certreq.pem
|
||||
pkcs7cert.der
|
||||
pkcs7signedData_RSA_SHA.der
|
||||
pkcs7signedData_RSA_SHA_noattr.der
|
||||
pkcs7signedData_RSA_SHA224.der
|
||||
pkcs7signedData_RSA_SHA256.der
|
||||
pkcs7signedData_RSA_SHA384.der
|
||||
pkcs7signedData_RSA_SHA512.der
|
||||
pkcs7signedData_ECDSA_SHA.der
|
||||
pkcs7signedData_ECDSA_SHA_noattr.der
|
||||
pkcs7signedData_ECDSA_SHA224.der
|
||||
pkcs7signedData_ECDSA_SHA256.der
|
||||
pkcs7signedData_ECDSA_SHA384.der
|
||||
pkcs7signedData_ECDSA_SHA512.der
|
||||
pkcs7envelopedDataDES3.der
|
||||
pkcs7authEnvelopedDataAES128GCM.der
|
||||
pkcs7authEnvelopedDataAES128GCM_ECDH_SHA1KDF.der
|
||||
pkcs7authEnvelopedDataAES128GCM_KEKRI.der
|
||||
pkcs7authEnvelopedDataAES128GCM_ORI.der
|
||||
pkcs7authEnvelopedDataAES128GCM_PWRI.der
|
||||
pkcs7authEnvelopedDataAES192GCM.der
|
||||
pkcs7authEnvelopedDataAES256GCM.der
|
||||
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF.der
|
||||
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_authAttribs.der
|
||||
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_bothAttribs.der
|
||||
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_fw_bothAttribs.der
|
||||
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_unauthAttribs.der
|
||||
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF.der
|
||||
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF_ukm.der
|
||||
pkcs7authEnvelopedDataAES256GCM_firmwarePkgData.der
|
||||
pkcs7authEnvelopedDataAES256GCM_IANDS.der
|
||||
pkcs7authEnvelopedDataAES256GCM_SKID.der
|
||||
pkcs7compressedData_data_zlib.der
|
||||
pkcs7compressedData_firmwarePkgData_zlib.der
|
||||
pkcs7encryptedDataAES128CBC.der
|
||||
pkcs7encryptedDataAES192CBC.der
|
||||
pkcs7encryptedDataAES256CBC.der
|
||||
pkcs7encryptedDataAES256CBC_attribs.der
|
||||
pkcs7encryptedDataAES256CBC_firmwarePkgData.der
|
||||
pkcs7encryptedDataAES256CBC_multi_attribs.der
|
||||
pkcs7encryptedDataDES.der
|
||||
pkcs7encryptedDataDES3.der
|
||||
pkcs7envelopedDataAES128CBC.der
|
||||
pkcs7envelopedDataAES128CBC_ECDH_SHA1KDF.der
|
||||
pkcs7envelopedDataAES128CBC_KEKRI.der
|
||||
pkcs7envelopedDataAES128CBC_PWRI.der
|
||||
pkcs7envelopedDataAES128CBC_ORI.der
|
||||
pkcs7envelopedDataAES192CBC.der
|
||||
pkcs7envelopedDataAES256CBC.der
|
||||
pkcs7envelopedDataAES256CBC_IANDS.der
|
||||
pkcs7envelopedDataAES256CBC_SKID.der
|
||||
pkcs7envelopedDataAES256CBC_ECDH_SHA256KDF.der
|
||||
pkcs7envelopedDataAES256CBC_ECDH_SHA512KDF.der
|
||||
pkcs7envelopedDataAES256CBC_ECDH_SHA512KDF_ukm.der
|
||||
pkcs7envelopedDataDES3.der
|
||||
pkcs7signedData_ECDSA_SHA224.der
|
||||
pkcs7signedData_ECDSA_SHA256_custom_contentType.der
|
||||
pkcs7signedData_ECDSA_SHA256.der
|
||||
pkcs7signedData_ECDSA_SHA256_firmwarePkgData.der
|
||||
pkcs7signedData_ECDSA_SHA256_SKID.der
|
||||
pkcs7signedData_ECDSA_SHA384.der
|
||||
pkcs7signedData_ECDSA_SHA512.der
|
||||
pkcs7signedData_ECDSA_SHA.der
|
||||
pkcs7signedData_ECDSA_SHA_noattr.der
|
||||
pkcs7signedData_RSA_SHA224.der
|
||||
pkcs7signedData_RSA_SHA256_custom_contentType.der
|
||||
pkcs7signedData_RSA_SHA256.der
|
||||
pkcs7signedData_RSA_SHA256_firmwarePkgData.der
|
||||
pkcs7signedData_RSA_SHA256_SKID.der
|
||||
pkcs7signedData_RSA_SHA256_with_ca_cert.der
|
||||
pkcs7signedData_RSA_SHA256_detachedSig.der
|
||||
pkcs7signedData_RSA_SHA384.der
|
||||
pkcs7signedData_RSA_SHA512.der
|
||||
pkcs7signedData_RSA_SHA.der
|
||||
pkcs7signedData_RSA_SHA_noattr.der
|
||||
pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256.der
|
||||
pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der
|
||||
pkcs7signedCompressedFirmwarePkgData_RSA_SHA256.der
|
||||
pkcs7signedCompressedFirmwarePkgData_RSA_SHA256_noattr.der
|
||||
pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256.der
|
||||
pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256_noattr.der
|
||||
pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256.der
|
||||
pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256_noattr.der
|
||||
pkcs7signedFirmwarePkgData_ECDSA_SHA256.der
|
||||
pkcs7signedFirmwarePkgData_ECDSA_SHA256_SKID.der
|
||||
pkcs7signedFirmwarePkgData_ECDSA_SHA256_noattr.der
|
||||
pkcs7signedFirmwarePkgData_RSA_SHA256.der
|
||||
pkcs7signedFirmwarePkgData_RSA_SHA256_SKID.der
|
||||
pkcs7signedFirmwarePkgData_RSA_SHA256_noattr.der
|
||||
pkcs7signedFirmwarePkgData_RSA_SHA256_with_ca_cert.der
|
||||
pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256.der
|
||||
pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der
|
||||
pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256.der
|
||||
pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256_noattr.der
|
||||
diff
|
||||
sslSniffer/sslSnifferTest/tracefile.txt
|
||||
tracefile.txt
|
||||
@@ -223,6 +288,13 @@ wrapper/CSharp/x64/
|
||||
# Visual Studio Code Workspace Files
|
||||
*.vscode
|
||||
*.userprefs
|
||||
*.exe
|
||||
*.dll
|
||||
.vs
|
||||
Backup
|
||||
UpgradeLog.htm
|
||||
*.aps
|
||||
*.VC.db
|
||||
|
||||
IDE/INTIME-RTOS/Debug_*
|
||||
IDE/VS-ARM/.vs
|
||||
@@ -240,3 +312,9 @@ wolfcrypt/src/port/intel/qat_test
|
||||
|
||||
# Arduino Generated Files
|
||||
/IDE/ARDUINO/wolfSSL
|
||||
scripts/memtest.txt
|
||||
|
||||
# Doxygen generated files
|
||||
doc/doxygen_warnings
|
||||
doc/html
|
||||
doc/pdf
|
||||
|
||||
113
ChangeLog.md
113
ChangeLog.md
@@ -1,3 +1,116 @@
|
||||
# wolfSSL Release 3.15.7 (12/26/2018)
|
||||
|
||||
Release 3.15.7 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
|
||||
* Support for Espressif ESP-IDF development framework
|
||||
* Fix for XCode build with iPhone simulator on i386
|
||||
* PKCS7 support for generating and verify bundles using a detached signature
|
||||
* Fix for build disabling AES-CBC and enabling opensslextra compatibility layer
|
||||
* Updates to sniffer for showing session information and handling split messages across records
|
||||
* Port update for Micrium uC/OS-III
|
||||
* Feature to adjust max fragment size post handshake when compiled with the macro WOLFSSL_ALLOW_MAX_FRAGMENT_ADJUST
|
||||
* Adding the macro NO_MULTIBYTE_PRINT for compiling out special characters that embedded devices may have problems with
|
||||
* Updates for Doxygen documentation, including PKCS #11 API and more
|
||||
* Adding Intel QuickAssist v1.7 driver support for asynchronous crypto
|
||||
* Adding Intel QuickAssist RSA key generation and SHA-3 support
|
||||
* RSA verify only (--enable-rsavfy) and RSA public only (--enable-rsapub) builds added
|
||||
* Enhancements to test cases for increased code coverage
|
||||
* Updates to VxWorks port for use with Mongoose, including updates to the OpenSSL compatibility layer
|
||||
* Yocto Project ease of use improvements along with many updates and build instructions added to the INSTALL file
|
||||
* Maximum ticket nonce size was increased to 8
|
||||
* Updating --enable-armasm build for ease of use with autotools
|
||||
* Updates to internal code checking TLS 1.3 version with a connection
|
||||
* Removing unnecessary extended master secret from ServerHello if using TLS 1.3
|
||||
* Fix for TLS v1.3 HelloRetryRequest to be sent immediately and not grouped
|
||||
|
||||
|
||||
|
||||
This release of wolfSSL includes a fix for 1 security vulnerability.
|
||||
|
||||
Medium level fix for potential cache attack with a variant of Bleichenbacher’s attack. Earlier versions of wolfSSL leaked PKCS #1 v1.5 padding information during private key decryption that could lead to a potential padding oracle attack. It is recommended that users update to the latest version of wolfSSL if they have RSA cipher suites enabled and have the potential for malicious software to be ran on the same system that is performing RSA operations. Users that have only ECC cipher suites enabled and are not performing RSA PKCS #1 v1.5 Decryption operations are not vulnerable. Also users with TLS 1.3 only connections are not vulnerable to this attack. Thanks to Eyal Ronen (Weizmann Institute), Robert Gillham (University of Adelaide), Daniel Genkin (University of Michigan), Adi Shamir (Weizmann Institute), David Wong (NCC Group), and Yuval Yarom (University of Adelaide and Data61) for the report.
|
||||
|
||||
The paper for further reading on the attack details can be found at http://cat.eyalro.net/cat.pdf.
|
||||
|
||||
|
||||
See INSTALL file for build instructions.
|
||||
More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
|
||||
|
||||
|
||||
# wolfSSL Release 3.15.5 (11/07/2018)
|
||||
|
||||
Release 3.15.5 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
|
||||
* Fixes for GCC-8 warnings with strings
|
||||
* Additional compatibility API’s added, including functions like wolfSSL_X509_CA_num and wolfSSL_PEM_read_X509_CRL
|
||||
* Fixes for OCSP use with NGINX port
|
||||
* Renamed the macro INLINE to WC_INLINE for inline functions
|
||||
* Doxygen updates and formatting for documentation generation
|
||||
* Added support for the STM32L4 with AES/SHA hardware acceleration
|
||||
* Adds checking for critical extension with certificate Auth ID and the macro WOLFSSL_ALLOW_CRIT_SKID to override the check
|
||||
* Added public key callbacks to ConfirmSignature function to expand public key callback support
|
||||
* Added ECC and Curve25519 key generation callback support
|
||||
* Fix for memory management with wolfSSL_BN_hex2bn function
|
||||
* Added support for dynamic allocation of PKCS7 structure using wc_PKCS7_New and wc_PKCS7_Free
|
||||
* Port to apache mynewt added in the directory wolfssl-3.15.5/IDE/mynewt/*
|
||||
* OCSP stapling in TLS 1.3 additions
|
||||
* Port for ASIO added with --enable-asio configure flag
|
||||
* Contiki port added with macro WOLFSSL_CONTIKI
|
||||
* Memory free optimizations with adding in earlier free’s where possible
|
||||
* Made modifications to the primality testing so that the Miller-Rabin tests check against up to 40 random numbers rather than a fixed list of small primes
|
||||
* Certificate validation time generation updated
|
||||
* Fixes for MQX classic 4.0 with IAR-EWARM
|
||||
* Fix for assembly optimized version of Curve25519
|
||||
* Make SOCKET_PEER_CLOSED_E consistent between read and write cases
|
||||
* Relocate compatibility layer functions for OpenSSH port update
|
||||
* Update to Intel® SGX port, files included by Windows version and macros defined when using WOLFSSL_SGX
|
||||
* Updates to Nucleus version supported
|
||||
* Stack size reduction with smallstack build
|
||||
* Updates to Rowley-Crossworks settings for CMSIS 4
|
||||
* Added reference STSAFE-A100 public key callbacks for TLS support
|
||||
* Added reference ATECC508A/ATECC608A public key callbacks for TLS support
|
||||
* Updated support for latest CryptoAuthLib (10/25/2018)
|
||||
* Added a wolfSSL static library project for Atollic TrueSTUDIO
|
||||
* Flag to disable AES-CBC and have only AEAD cipher suites with TLS
|
||||
* AF_ALG and cryptodev-linux crypto support added
|
||||
* Update to IO callbacks with use of WOLFSSL_BIO
|
||||
* Additional support for parsing certificate subject OIDs (businessCategory, jurisdiction of incorporation country, and jurisdiction of incorporation state)
|
||||
* Added wc_ecc_ecport_ex and wc_export_inti API's for ECC hex string exporting
|
||||
* Updates to XCODE build with wolfSSL
|
||||
* Fix for guard on when to include sys/time.h header
|
||||
* Updates and enhancements to the GCC-ARM example
|
||||
* Fix for PKCS8 padding with encryption
|
||||
* Updates for wolfcrypt JNI wrapper
|
||||
* ALT_ECC_SIZE use with SP math
|
||||
* PIC32MZ hardware acceleration buffer alignment fixes
|
||||
* Renesas e2studio project files added
|
||||
* Renesas RX example project added
|
||||
* Fix for DH algorithm when using SP math with ARM assembly
|
||||
* Fixes and enhancements for NXP K82 support
|
||||
* Benchmark enhancements to print in CSV format and in Japanese
|
||||
* Support for PKCS#11 added with --enable-pkcs11
|
||||
* Fixes for asynchronous crypto use with TLS 1.3
|
||||
* TLS 1.3 only build, allows for disabling TLS 1.2 and earlier protocols
|
||||
* Fix for GCC warnings in function wolfSSL_ASN1_TIME_adj
|
||||
* Added --enable-asn=nocrypt for certificate only parsing support
|
||||
* Added support for parsing PIV format certificates with the function wc_ParseCertPIV and macro WOLFSSL_CERT_PIV
|
||||
* Added APIs to support GZIP
|
||||
* Updates to support Lighttpd
|
||||
* Version resource added for Windows DLL builds
|
||||
* Increased code coverage with additional testing
|
||||
* Added support for constructed OCTET_STRING with PKCS#7 signed data
|
||||
* Added DTLS either (server/client) side initialization setting
|
||||
* Minor fixes for building with MINGW32 compiler
|
||||
* Added support for generic ECC PEM header/footer with PKCS8 parsing
|
||||
* Added Japanese output to example server and client with “-1 1” flag
|
||||
* Added USE_ECDSA_KEYSZ_HASH_ALGO macro for building to use digest sizes that match ephemeral key size
|
||||
* Expand PKCS#7 CMS support with KEKRI, PWRI and ORI
|
||||
* Streaming capability for PKCS#7 decoding and sign verify added
|
||||
|
||||
|
||||
See INSTALL file for build instructions.
|
||||
More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
|
||||
|
||||
|
||||
# wolfSSL Release 3.15.3 (6/20/2018)
|
||||
|
||||
Release 3.15.3 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
|
||||
@@ -16,11 +16,13 @@ wolfssl/IDE/ARDUINO directory:
|
||||
Step 2: Edit `<wolfssl-root>/IDE/ARDUINO/wolfSSL/wolfssl/wolfcrypt/settings.h` uncomment the define for `WOLFSSL_ARDUINO`
|
||||
If building for Intel Galileo platform also uncomment the define for `INTEL_GALILEO`.
|
||||
|
||||
#####Including wolfSSL in Arduino Libraries (for Arduino version 1.6.6)
|
||||
##### Including wolfSSL in Arduino Libraries (for Arduino version 1.6.6)
|
||||
|
||||
1. In the Arduino IDE:
|
||||
- In `Sketch -> Include Library -> Add .ZIP Library...` and choose the
|
||||
`IDE/ARDUNIO/wolfSSL` folder.
|
||||
- In `Sketch -> Include Library` choose wolfSSL.
|
||||
|
||||
An example wolfSSL client INO sketch exists here: `sketches/wolfssl_client/wolfssl_client.ino`
|
||||
2. Open an example Arduino sketch for wolfSSL:
|
||||
- wolfSSL Client INO sketch: `sketches/wolfssl_client/wolfssl_client.ino`
|
||||
- wolfSSL Server INO sketch: `sketches/wolfssl_server/wolfssl_server.ino`
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
|
||||
EXTRA_DIST+= IDE/ARDUINO/README.md
|
||||
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino
|
||||
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino
|
||||
EXTRA_DIST+= IDE/ARDUINO/wolfssl-arduino.sh
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <Ethernet.h>
|
||||
|
||||
const char host[] = "192.168.1.148"; // server to connect to
|
||||
int port = 11111; // port on server to connect to
|
||||
const int port = 11111; // port on server to connect to
|
||||
|
||||
int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
|
||||
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
|
||||
@@ -33,11 +33,12 @@ int reconnect = 10;
|
||||
|
||||
EthernetClient client;
|
||||
|
||||
WOLFSSL_CTX* ctx = 0;
|
||||
WOLFSSL* ssl = 0;
|
||||
WOLFSSL_METHOD* method = 0;
|
||||
WOLFSSL_CTX* ctx = NULL;
|
||||
WOLFSSL* ssl = NULL;
|
||||
|
||||
void setup() {
|
||||
WOLFSSL_METHOD* method;
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
method = wolfTLSv1_2_client_method();
|
||||
@@ -79,65 +80,76 @@ int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx) {
|
||||
void loop() {
|
||||
int err = 0;
|
||||
int input = 0;
|
||||
int sent = 0;
|
||||
int total_input = 0;
|
||||
char msg[32] = "hello wolfssl!";
|
||||
int msgSz = (int)strlen(msg);
|
||||
char errBuf[80];
|
||||
char reply[80];
|
||||
WOLFSSL_CIPHER* cipher;
|
||||
const char* cipherName;
|
||||
|
||||
if (reconnect) {
|
||||
reconnect--;
|
||||
|
||||
if (client.connect(host, port)) {
|
||||
|
||||
Serial.print("Connected to ");
|
||||
Serial.println(host);
|
||||
|
||||
ssl = wolfSSL_new(ctx);
|
||||
if (ssl == NULL) {
|
||||
Serial.println("Unable to allocate SSL object");
|
||||
return;
|
||||
}
|
||||
|
||||
err = wolfSSL_connect(ssl);
|
||||
if (err != WOLFSSL_SUCCESS) {
|
||||
err = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(err, errBuf);
|
||||
Serial.print("Unable to get SSL object. Error = ");
|
||||
Serial.print("TLS Connect Error: ");
|
||||
Serial.println(errBuf);
|
||||
}
|
||||
|
||||
|
||||
Serial.print("SSL version is ");
|
||||
Serial.println(wolfSSL_get_version(ssl));
|
||||
|
||||
|
||||
|
||||
if ((wolfSSL_write(ssl, msg, strlen(msg))) == msgSz) {
|
||||
cipher = wolfSSL_get_current_cipher(ssl);
|
||||
cipherName = wolfSSL_get_cipher(ssl);
|
||||
Serial.print("SSL cipher suite is ");
|
||||
Serial.println(wolfSSL_CIPHER_get_name(cipher));
|
||||
Serial.println(cipherName);
|
||||
|
||||
if ((wolfSSL_write(ssl, msg, msgSz)) == msgSz) {
|
||||
|
||||
Serial.print("Server response: ");
|
||||
while (client.available() || wolfSSL_pending(ssl)) {
|
||||
input = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
|
||||
total_input += input;
|
||||
if ( input > 0 ) {
|
||||
reply[input] = '\0';
|
||||
Serial.print(reply);
|
||||
} else if (input < 0) {
|
||||
if (input < 0) {
|
||||
err = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(err, errBuf);
|
||||
Serial.print("wolfSSL_read failed. Error: ");
|
||||
Serial.print("TLS Read Error: ");
|
||||
Serial.println(errBuf);
|
||||
break;
|
||||
} else if (input > 0) {
|
||||
reply[input] = '\0';
|
||||
Serial.print(reply);
|
||||
} else {
|
||||
Serial.println();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Serial.println("SSL_write failed");
|
||||
err = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(err, errBuf);
|
||||
Serial.print("TLS Write Error: ");
|
||||
Serial.println(errBuf);
|
||||
}
|
||||
|
||||
if (ssl != NULL)
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
|
||||
client.stop();
|
||||
Serial.println("Connection complete.");
|
||||
reconnect = 0;
|
||||
} else {
|
||||
Serial.println("Trying to reconnect...");
|
||||
Serial.println("Trying to reconnect...");
|
||||
}
|
||||
}
|
||||
delay(1000);
|
||||
|
||||
176
IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino
Normal file
176
IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino
Normal file
@@ -0,0 +1,176 @@
|
||||
/* wolfssl_server.ino
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#include <wolfssl.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <Ethernet.h>
|
||||
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#ifdef NO_WOLFSSL_SERVER
|
||||
#error Please undefine NO_WOLFSSL_SERVER for this example
|
||||
#endif
|
||||
|
||||
const int port = 11111; // port to listen on
|
||||
|
||||
int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
|
||||
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
|
||||
|
||||
EthernetServer server(port);
|
||||
EthernetClient client;
|
||||
|
||||
WOLFSSL_CTX* ctx = NULL;
|
||||
WOLFSSL* ssl = NULL;
|
||||
|
||||
void setup() {
|
||||
int err;
|
||||
WOLFSSL_METHOD* method;
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
method = wolfTLSv1_2_server_method();
|
||||
if (method == NULL) {
|
||||
Serial.println("unable to get method");
|
||||
return;
|
||||
}
|
||||
ctx = wolfSSL_CTX_new(method);
|
||||
if (ctx == NULL) {
|
||||
Serial.println("unable to get ctx");
|
||||
return;
|
||||
}
|
||||
|
||||
// initialize wolfSSL using callback functions
|
||||
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
|
||||
wolfSSL_SetIOSend(ctx, EthernetSend);
|
||||
wolfSSL_SetIORecv(ctx, EthernetReceive);
|
||||
|
||||
// setup the private key and certificate
|
||||
err = wolfSSL_CTX_use_PrivateKey_buffer(ctx, ecc_key_der_256,
|
||||
sizeof_ecc_key_der_256, WOLFSSL_FILETYPE_ASN1);
|
||||
if (err != WOLFSSL_SUCCESS) {
|
||||
Serial.println("error setting key");
|
||||
return;
|
||||
}
|
||||
err = wolfSSL_CTX_use_certificate_buffer(ctx, serv_ecc_der_256,
|
||||
sizeof_serv_ecc_der_256, WOLFSSL_FILETYPE_ASN1);
|
||||
if (err != WOLFSSL_SUCCESS) {
|
||||
Serial.println("error setting certificate");
|
||||
return;
|
||||
}
|
||||
|
||||
// Start the server
|
||||
server.begin();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx) {
|
||||
int sent = 0;
|
||||
|
||||
sent = client.write((byte*)msg, sz);
|
||||
|
||||
return sent;
|
||||
}
|
||||
|
||||
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx) {
|
||||
int ret = 0;
|
||||
|
||||
while (client.available() > 0 && ret < sz) {
|
||||
reply[ret++] = client.read();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void loop() {
|
||||
int err = 0;
|
||||
int input = 0;
|
||||
char errBuf[80];
|
||||
char reply[80];
|
||||
int replySz = 0;
|
||||
const char* cipherName;
|
||||
|
||||
// Listen for incoming client requests.
|
||||
client = server.available();
|
||||
if (!client) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (client.connected()) {
|
||||
|
||||
Serial.println("Client connected");
|
||||
|
||||
ssl = wolfSSL_new(ctx);
|
||||
if (ssl == NULL) {
|
||||
Serial.println("Unable to allocate SSL object");
|
||||
return;
|
||||
}
|
||||
|
||||
err = wolfSSL_accept(ssl);
|
||||
if (err != WOLFSSL_SUCCESS) {
|
||||
err = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(err, errBuf);
|
||||
Serial.print("TLS Accept Error: ");
|
||||
Serial.println(errBuf);
|
||||
}
|
||||
|
||||
Serial.print("SSL version is ");
|
||||
Serial.println(wolfSSL_get_version(ssl));
|
||||
|
||||
cipherName = wolfSSL_get_cipher(ssl);
|
||||
Serial.print("SSL cipher suite is ");
|
||||
Serial.println(cipherName);
|
||||
|
||||
Serial.print("Server Read: ");
|
||||
while (client.available() || wolfSSL_pending(ssl)) {
|
||||
input = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
|
||||
if (input < 0) {
|
||||
err = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(err, errBuf);
|
||||
Serial.print("TLS Read Error: ");
|
||||
Serial.println(errBuf);
|
||||
break;
|
||||
} else if (input > 0) {
|
||||
replySz = input;
|
||||
reply[input] = '\0';
|
||||
Serial.print(reply);
|
||||
} else {
|
||||
Serial.println();
|
||||
}
|
||||
}
|
||||
|
||||
// echo data
|
||||
if ((wolfSSL_write(ssl, reply, replySz)) != replySz) {
|
||||
err = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(err, errBuf);
|
||||
Serial.print("TLS Write Error: ");
|
||||
Serial.println(errBuf);
|
||||
}
|
||||
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
}
|
||||
|
||||
client.stop();
|
||||
Serial.println("Connection complete");
|
||||
}
|
||||
225
IDE/ECLIPSE/DEOS/README.md
Normal file
225
IDE/ECLIPSE/DEOS/README.md
Normal file
@@ -0,0 +1,225 @@
|
||||
|
||||
|
||||
# Deos Port
|
||||
## Overview
|
||||
You can enable the wolfSSL support for Deos RTOS available [here](https://www.ddci.com/products_deos_do_178c_arinc_653/) using the `#define WOLFSSL_DEOS`.
|
||||
Deos is a time & space partitioned, multi-core enabled, DO-178C DAL A certifiable RTOS.
|
||||
## Usage
|
||||
|
||||
You can start with your OpenArbor IDE-based example project for Deos with the network stack (lwip) to integrate wolfSSL source code.
|
||||
|
||||
wolfSSL supports a compile-time user configurable options in the `IDE/ECLIPSE/DEOS/user_settings.h` file.
|
||||
|
||||
The `tls_wolfssl.c` example application provides a simple function to run the selected examples at compile time through the following four #defines in user_settings.h. You can undefine any of these macro options to run a test.
|
||||
```
|
||||
1. #undef NO_CRYPT_TEST
|
||||
2. #undef NO_CRYPT_BENCHMARK
|
||||
3. #undef NO_WOLFSSL_CLIENT
|
||||
4. #undef NO_WOLFSSL_SERVER
|
||||
```
|
||||
Do one of the following steps for building and running wolfSSL with the Deos kernel examples, which are included in the DDS release:
|
||||
If you want to create a project from scratch, skip the Importing the project section and follow the steps in the other sections.
|
||||
|
||||
If you want to use an pre-configured example project, go to the Importing the project section, skip the other sections and follow the Building and Running section.
|
||||
|
||||
#### Importing the project
|
||||
In this section you will import a pre-configured example project.
|
||||
1. Launch the OpenArbor IDE as an administrator
|
||||
2. In the Workspace Launcher dialog, in the Workspace field, enter your
|
||||
workspace
|
||||
3. Right-click in the Project Explorer view and select Import
|
||||
4. In the Import dialog, select General > Existing Projects into Workspace, then click Next.
|
||||
5. In the Import Projects dialog, select Select archive file, then browse to `IDE/ECLIPSE/DEOS/` and double-click `deosWolfssl.zip` file
|
||||
6. In the Import Projects dialog, click Finish
|
||||
|
||||
|
||||
#### Setting up a Deos project with wolfSSL
|
||||
1. Download the wolfSSL source code or a zip file from GitHub. You can remove all of the files except for these folders and its contents. The top folder for this example is wolfsslPort.
|
||||
```
|
||||
wolfsslPort
|
||||
|-- IDE
|
||||
| -- ECLIPSE
|
||||
| -- DEOS
|
||||
|-- src
|
||||
|-- wolfcrypt
|
||||
| -- benchmark
|
||||
| -- src
|
||||
| -- test
|
||||
|-- wolfssl
|
||||
|-- openssl
|
||||
|-- wolfcrypt
|
||||
|-- port
|
||||
```
|
||||
2. Remove these two platform specific assembly source files:
|
||||
- wolfsslPort/wolfcrypt/src/aes_asm.asm
|
||||
- wolfsslPort/wolfcrypt/src/aes_asm.S
|
||||
|
||||
3. Launch the OpenArbor IDE as an administrator
|
||||
4. Create a DDC-I Deos example project. In the main menu, go to File >DDC-I Deos example project > socket > udp-vs-tcp
|
||||
5. Import the `wolfSSLPort` source code into your project.
|
||||
- Right-click the ` udp-vs-tcp` project and choose File -> Import.
|
||||
- Expand the General folder and select File System, then click Next. You should now see the Import File system dialog.
|
||||
- Browse to the location containing the wolfSSL code and choose OK. Select the `wolfsslPort` folder and check the `Create top-level folder` button, then select Finish. You should see the folder hierarchy the same as wolfSSL folder structures.
|
||||
6. Review the configuration in $(PROJECT_DIR)/wolfsslPort/IDE/ECLIPSE/DEOS/user_setting.h
|
||||
|
||||
7. Review the custom malloc/realloc/free configuration $(PROJECT_DIR)/wolfsslPort/IDE/ECLIPSE/DEOS/deos_malloc.c . Memory allocated with malloc() is never freed.
|
||||
|
||||
#### Configuring the Deos Project
|
||||
1. Customize your config/udp-vs-tcp.pd.xml with the following changes:
|
||||
```
|
||||
<processTemplate
|
||||
mutexQuota = "5"
|
||||
>
|
||||
|
||||
<logicalMemoryPools>
|
||||
pagesNeeded = "500"
|
||||
></pool>
|
||||
</logicalMemoryPools>
|
||||
|
||||
<threadTemplate
|
||||
stackSizeInPages = "20"
|
||||
></threadTemplate>
|
||||
|
||||
<mutexTemplates>
|
||||
<mutexTemplate
|
||||
name = "protectWolfSSLTemp"
|
||||
lockTimeInUsec = "40"
|
||||
priority = "fastest"
|
||||
></mutexTemplate>
|
||||
</mutexTemplates>
|
||||
|
||||
</processTemplate>
|
||||
```
|
||||
Depending on your configuration, wolfSSL uses upto four mutexes. You also need to configure enough memory for the stack of each threads and the process logical memory pool.
|
||||
|
||||
|
||||
2. Right click on the `udp-vs-tcp` project, select properties and add the following macros in the DDC-I Options > C Compile > Preprocessor
|
||||
- DEOS_ALLOW_OBSOLETE_DEFINITIONS
|
||||
- WOLFSSL_USER_SETTINGS
|
||||
3. Add the following directory paths in the DDC-I Options > C Compile > Directories and in the DDC-I Options > C++ Compile > Directories
|
||||
- $(PROJECT_DIR)/wolfsslPort
|
||||
- $(PROJECT_DIR)/wolfsslPort/wolfssl
|
||||
- $(PROJECT_DIR)/wolfsslPort/IDE/ECLIPSE/DEOS
|
||||
- $(PROJECT_DIR.printx)/code
|
||||
4. Change the optimization level in the DDC-I Options > C Compile > Code Generation > Optimization level:g
|
||||
- g
|
||||
5. Add the following library dependencies in the DDC-I Options > Deos > Dependencies
|
||||
- math
|
||||
- dart
|
||||
- ansi
|
||||
- printx
|
||||
- You must add printx into your workspace, File >DDC-I Deos example project > training > printx
|
||||
6. Edit $(PROJECT_DIR)/wolfsslPort/IDE/ECLIPSE/DEOS/user_setting.h to customize your configuration. For example, you can undef or define these tests.
|
||||
- #undef NO_CRYPT_TEST
|
||||
- #undef NO_CRYPT_BENCHMARK
|
||||
- #undef NO_WOLFSSL_CLIENT
|
||||
- #undef NO_WOLFSSL_SERVER
|
||||
7. Edit your application source file where main() thread is defined and add the following:
|
||||
- #include "printx.h"
|
||||
- #include "tls_wolfssl.h"
|
||||
- and a call to `wolfsslRunTests()`
|
||||
Here's an example:
|
||||
```
|
||||
#include <deos.h>
|
||||
#include <printx.h>
|
||||
#include <tls_wolfssl.h>
|
||||
#include <user_settings.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
initPrintx("");
|
||||
printf("TLS wolfssl example!\n");
|
||||
|
||||
(void) waitUntilNextPeriod();
|
||||
wolfsslRunTests();
|
||||
|
||||
deleteThread(currentThreadHandle());
|
||||
}
|
||||
|
||||
```
|
||||
8. Review $(PROJECT_DIR)/udp-vs-tcp/mailbox-transport.config configuration.
|
||||
```
|
||||
transportConfigurationId
|
||||
2 # Client thread quota - for client and server TCP
|
||||
2 # Client connection quota - one for client and one for server
|
||||
0 # Server startup quota
|
||||
0 # Server connection quota
|
||||
transportMemoryObject # Name of memory object used for managing connections
|
||||
/
|
||||
|
||||
connectionId1 # TCP client connection
|
||||
Network # Server process name
|
||||
defaultMailbox # Server connection request mailbox name
|
||||
0 # Server connection mailbox queue size (unused by Network process)
|
||||
userServiceThread # Server thread template name
|
||||
* # Error timeout
|
||||
1 # Client connection mailbox queue size
|
||||
/
|
||||
|
||||
connectionId2 # TCP connection
|
||||
Network # Server process name
|
||||
defaultMailbox # Server connection request mailbox name
|
||||
0 # Server connection mailbox queue size (unused by Network process)
|
||||
userServiceThread # Server thread template name
|
||||
* # Error timeout
|
||||
1 # Client connection mailbox queue size
|
||||
/
|
||||
```
|
||||
|
||||
#### Building and Running
|
||||
1. Build your project, then load and run your image on a target platform. Review the test results on the console output.
|
||||
|
||||
|
||||
### `wolfcrypt_test()`
|
||||
wolfcrypt_test() prints a message on the target console similar to the following output:
|
||||
```
|
||||
error test passed!
|
||||
base64 test passed!
|
||||
asn test passed!
|
||||
...
|
||||
```
|
||||
This example doesn't show the whole output.
|
||||
|
||||
### `benchmark_test()`
|
||||
benchmark_test() prints a message on the target console similar to the following output.
|
||||
|
||||
```
|
||||
------------------------------------------------------------------------------
|
||||
wolfSSL version 3.15.5
|
||||
------------------------------------------------------------------------------
|
||||
wolfCrypt Benchmark (block bytes 1024, min 1.0 sec each)
|
||||
RNG 225 KB tooks 1.026 seconds, 219.313 KB/s
|
||||
AES-128-CBC-enc 250 KB toks 1.105 seconds 226.210 KB/s
|
||||
AES-128-CBC-dec 225 KB tooks 1.005 seconds, 223.922 KB/s
|
||||
...
|
||||
```
|
||||
This example doesn't show the whole output.
|
||||
|
||||
### `wolfssl_client_test()`
|
||||
|
||||
You can modify the `TCP_SERVER_IP_ADDR` and `TCP_SERVER_PORT` macros in the `tls_wolfssl.c` file to configure the host address and port. You will also need to define the server certificate. The example client uses the GET request to get a web resource from the server at https://google.com.
|
||||
|
||||
### `wolfssl_server_test()`
|
||||
|
||||
You can modify the `TLS_SERVER_PORT` in the `tls_wolfssl.c` file to configure the port number to listen on a local-host.
|
||||
Once you start the TLS server and `Listening for client connection` displays on the serial console, the server is ready to accept client connections.
|
||||
|
||||
You can connect to the server using the wolfssl TLS client example from your Linux or Windows host as follows:
|
||||
```
|
||||
$ ./examples/client/client.exe -h TLS_SERVER_IP_ADDRESS
|
||||
|
||||
The client outputs messages similar to the following:
|
||||
|
||||
SSL version is TLSv1.2
|
||||
SSL cipher suite is TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
|
||||
SSL curve name is SECP256R1
|
||||
I hear ya fa shizzle!
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
The test results were collected from the qemu-x86 reference platform target with the following software and tool chains:
|
||||
- OpenArbor, eclipse based IDE, toolVersion = "3.31.0"
|
||||
- wolfssl [latest version](https://github.com/wolfSSL/wolfssl)
|
||||
|
||||
For more information or questions, please email [support@wolfssl.com](mailto:support@wolfssl.com)
|
||||
108
IDE/ECLIPSE/DEOS/deos_malloc.c
Normal file
108
IDE/ECLIPSE/DEOS/deos_malloc.c
Normal file
@@ -0,0 +1,108 @@
|
||||
/* deos_malloc.c
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
#define ROUND_UP(x, align) (((int) (x) + (align - 1)) & ~(align - 1))
|
||||
#define SIZEOF_HEADER sizeof(size_t) /* tracks size of allocated block */
|
||||
|
||||
#define HEAP_SIZE_MAX (1*1024*1024)
|
||||
|
||||
static size_t allocatedMemory = 0;
|
||||
|
||||
size_t getMemAllocatedSize_deos(size_t* size){
|
||||
|
||||
if (size)
|
||||
*size = allocatedMemory;
|
||||
|
||||
return allocatedMemory;
|
||||
}
|
||||
|
||||
/* Simply returns without freeing any memory. */
|
||||
|
||||
void free_deos(void *ptr) {
|
||||
//printf("fake free_deos()\n");
|
||||
return;
|
||||
}
|
||||
|
||||
void *realloc_deos(void *ptr, size_t size) {
|
||||
void *newptr;
|
||||
|
||||
if (size == 0)
|
||||
return ptr;
|
||||
newptr = malloc_deos(size);
|
||||
|
||||
if (ptr != NULL && newptr != NULL) {
|
||||
|
||||
if ( *((char *)ptr - SIZEOF_HEADER) < *((char *)newptr - SIZEOF_HEADER))
|
||||
size = *((char *)ptr - SIZEOF_HEADER);
|
||||
|
||||
XMEMCPY((char *) newptr, (const char *) ptr, size);
|
||||
free_deos(ptr);
|
||||
}
|
||||
|
||||
return newptr;
|
||||
}
|
||||
|
||||
void *malloc_deos(size_t size) {
|
||||
PDEOS_SYSTEM_INFO systemInfoPtr;
|
||||
static VirtualAddressTYP heapAddr = NULL;
|
||||
static VirtualAddressTYP freeAddr = NULL;
|
||||
VirtualAddressTYP retAddr = NULL;
|
||||
DWORD allocationSize = 0;
|
||||
static int initialized = 0;
|
||||
|
||||
if (size <= 0)
|
||||
return NULL;
|
||||
|
||||
if (!initialized) {
|
||||
systemInfoPtr = (PDEOS_SYSTEM_INFO)getSystemInfoDEOS();
|
||||
freeAddr = (VirtualAddressTYP)getNextLibraryStartAddress();
|
||||
allocationSize = (((HEAP_SIZE_MAX - 1) / systemInfoPtr->dwPageSize) + 1) *
|
||||
systemInfoPtr->dwPageSize;
|
||||
|
||||
if (virtualAllocDEOS(freeAddr, allocationSize) != allocSuccess){
|
||||
printf("ERROR: virtualAllocDEOS failed\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
setNextLibraryStartAddress(freeAddr + allocationSize);
|
||||
heapAddr = freeAddr;
|
||||
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
size = ROUND_UP(size, sizeof(size_t));
|
||||
|
||||
if ((size + SIZEOF_HEADER) > (HEAP_SIZE_MAX - (freeAddr - heapAddr))){
|
||||
printf("ERROR: malloc_deos cannot allocate from heap memory anymore\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*freeAddr = size;
|
||||
freeAddr += SIZEOF_HEADER;
|
||||
retAddr = freeAddr;
|
||||
XMEMSET(retAddr, 0, size);
|
||||
freeAddr += size;
|
||||
allocatedMemory += size;
|
||||
|
||||
return retAddr;
|
||||
}
|
||||
10
IDE/ECLIPSE/DEOS/include.am
Normal file
10
IDE/ECLIPSE/DEOS/include.am
Normal file
@@ -0,0 +1,10 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST += \
|
||||
IDE/ECLIPSE/DEOS/README.md \
|
||||
IDE/ECLIPSE/DEOS/user_settings.h \
|
||||
IDE/ECLIPSE/DEOS/tls_wolfssl.h \
|
||||
IDE/ECLIPSE/DEOS/tls_wolfssl.c \
|
||||
IDE/ECLIPSE/DEOS/deos_malloc.c
|
||||
599
IDE/ECLIPSE/DEOS/tls_wolfssl.c
Normal file
599
IDE/ECLIPSE/DEOS/tls_wolfssl.c
Normal file
@@ -0,0 +1,599 @@
|
||||
/* tls_wolfssl.c
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfcrypt/test/test.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h> /* to use WOLFSSL_MSG */
|
||||
#include <tls_wolfssl.h>
|
||||
|
||||
|
||||
int setupTransport(clientConnectionHandleType* connectionHandle,
|
||||
char* connectionId) {
|
||||
int ret, error;
|
||||
void * sendBuffer;
|
||||
DWORD bufferSizeInBytes;
|
||||
|
||||
if ((ret = socketTransportInitialize("mailbox-transport.config",
|
||||
"transportConfigurationId",
|
||||
(DWORD)waitIndefinitely,&error)) != transportSuccess)
|
||||
printf("Initialize 0x%x, error=%d\n", ret, error);
|
||||
|
||||
else if ((ret = socketTransportClientInitialize((DWORD)waitIndefinitely,
|
||||
&error)) != transportSuccess)
|
||||
printf("ClientInitialize 0x%x, error=%d\n", ret, error);
|
||||
|
||||
else if ((ret = socketTransportCreateConnection(connectionId,
|
||||
(DWORD)waitIndefinitely,
|
||||
COMPATIBILITY_ID_2,
|
||||
connectionHandle,
|
||||
&sendBuffer,
|
||||
&bufferSizeInBytes,
|
||||
&error)) != transportSuccess)
|
||||
printf("CreateConnection 0x%x, error=%d\n", ret, error);
|
||||
|
||||
else if ((ret = socketTransportSetConnectionForThread(currentThreadHandle(),
|
||||
*connectionHandle,
|
||||
(DWORD)waitIndefinitely,
|
||||
&error)) != transportSuccess)
|
||||
printf("SetConnectionForThread 0x%x, error=%d\n", ret, error);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if !defined(NO_WOLFSSL_CLIENT )
|
||||
|
||||
/* 172.217.3.174 is the IP address of https://www.google.com */
|
||||
#define TCP_SERVER_IP_ADDR "172.217.3.174"
|
||||
#define TCP_SERVER_DOMAIN_NAME "www.google.com"
|
||||
#define TCP_SERVER_PORT 443
|
||||
|
||||
#define TX_BUF_SIZE 64
|
||||
#define RX_BUF_SIZE 1024
|
||||
|
||||
#define TX_MSG "GET /index.html HTTP/1.0\n\n"
|
||||
#define TX_MSG_SIZE sizeof(TX_MSG)
|
||||
|
||||
static const unsigned char google_certs_ca[]="\n\
|
||||
## Google Internet Authority G3 \n\
|
||||
-----BEGIN CERTIFICATE-----\n\
|
||||
MIIEXDCCA0SgAwIBAgINAeOpMBz8cgY4P5pTHTANBgkqhkiG9w0BAQsFADBMMSAw\n\
|
||||
HgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFs\n\
|
||||
U2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0xNzA2MTUwMDAwNDJaFw0yMTEy\n\
|
||||
MTUwMDAwNDJaMFQxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVHb29nbGUgVHJ1c3Qg\n\
|
||||
U2VydmljZXMxJTAjBgNVBAMTHEdvb2dsZSBJbnRlcm5ldCBBdXRob3JpdHkgRzMw\n\
|
||||
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDKUkvqHv/OJGuo2nIYaNVW\n\
|
||||
XQ5IWi01CXZaz6TIHLGp/lOJ+600/4hbn7vn6AAB3DVzdQOts7G5pH0rJnnOFUAK\n\
|
||||
71G4nzKMfHCGUksW/mona+Y2emJQ2N+aicwJKetPKRSIgAuPOB6Aahh8Hb2XO3h9\n\
|
||||
RUk2T0HNouB2VzxoMXlkyW7XUR5mw6JkLHnA52XDVoRTWkNty5oCINLvGmnRsJ1z\n\
|
||||
ouAqYGVQMc/7sy+/EYhALrVJEA8KbtyX+r8snwU5C1hUrwaW6MWOARa8qBpNQcWT\n\
|
||||
kaIeoYvy/sGIJEmjR0vFEwHdp1cSaWIr6/4g72n7OqXwfinu7ZYW97EfoOSQJeAz\n\
|
||||
AgMBAAGjggEzMIIBLzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUH\n\
|
||||
AwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFHfCuFCa\n\
|
||||
Z3Z2sS3ChtCDoH6mfrpLMB8GA1UdIwQYMBaAFJviB1dnHB7AagbeWbSaLd/cGYYu\n\
|
||||
MDUGCCsGAQUFBwEBBCkwJzAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AucGtpLmdv\n\
|
||||
b2cvZ3NyMjAyBgNVHR8EKzApMCegJaAjhiFodHRwOi8vY3JsLnBraS5nb29nL2dz\n\
|
||||
cjIvZ3NyMi5jcmwwPwYDVR0gBDgwNjA0BgZngQwBAgIwKjAoBggrBgEFBQcCARYc\n\
|
||||
aHR0cHM6Ly9wa2kuZ29vZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEA\n\
|
||||
HLeJluRT7bvs26gyAZ8so81trUISd7O45skDUmAge1cnxhG1P2cNmSxbWsoiCt2e\n\
|
||||
ux9LSD+PAj2LIYRFHW31/6xoic1k4tbWXkDCjir37xTTNqRAMPUyFRWSdvt+nlPq\n\
|
||||
wnb8Oa2I/maSJukcxDjNSfpDh/Bd1lZNgdd/8cLdsE3+wypufJ9uXO1iQpnh9zbu\n\
|
||||
FIwsIONGl1p3A8CgxkqI/UAih3JaGOqcpcdaCIzkBaR9uYQ1X4k2Vg5APRLouzVy\n\
|
||||
7a8IVk6wuy6pm+T7HT4LY8ibS5FEZlfAFLSW8NwsVz9SBK2Vqn1N0PIMn5xA6NZV\n\
|
||||
c7o835DLAFshEWfC7TIe3g==\n\
|
||||
-----END CERTIFICATE-----\n\
|
||||
## Google Trust Services- GlobalSign Root CA-R2\n\
|
||||
-----BEGIN CERTIFICATE-----\n\
|
||||
MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G\n\
|
||||
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp\n\
|
||||
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1\n\
|
||||
MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG\n\
|
||||
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI\n\
|
||||
hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL\n\
|
||||
v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8\n\
|
||||
eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq\n\
|
||||
tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd\n\
|
||||
C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa\n\
|
||||
zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB\n\
|
||||
mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH\n\
|
||||
V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n\n\
|
||||
bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG\n\
|
||||
3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs\n\
|
||||
J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO\n\
|
||||
291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS\n\
|
||||
ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd\n\
|
||||
AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7\n\
|
||||
TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==\n\
|
||||
-----END CERTIFICATE-----\n\
|
||||
";
|
||||
|
||||
void wolfssl_client_test(uintData_t statusPtr) {
|
||||
int sock;
|
||||
char rx_buf[RX_BUF_SIZE];
|
||||
char tx_buf[TX_BUF_SIZE];
|
||||
int ret = 0, error = 0;
|
||||
|
||||
sockaddr_in server_addr;
|
||||
clientConnectionHandleType TCPclientHandle;
|
||||
|
||||
WOLFSSL* ssl;
|
||||
WOLFSSL_CTX* ctx;
|
||||
|
||||
/* set up the mailbox transport */
|
||||
|
||||
if (setupTransport(&TCPclientHandle, (char*)"connectionId1") != transportSuccess){
|
||||
printf("TCP transport set up failed \n");
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Creating a network socket...\n");
|
||||
|
||||
sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
if (sock == SOCKET_ERROR) {
|
||||
printf("ERROR: Failed to create socket, err = %d\n", errno);
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Clearing memory for server_addr struct\n");
|
||||
|
||||
XMEMSET((char *) &server_addr, 0u, sizeof(server_addr));
|
||||
|
||||
printf("Connecting to server IP address: %s, port: %d\n",
|
||||
TCP_SERVER_IP_ADDR, TCP_SERVER_PORT);
|
||||
|
||||
server_addr.sin_family = AF_INET;
|
||||
server_addr.sin_addr = inet_addr(TCP_SERVER_IP_ADDR);
|
||||
server_addr.sin_port = htons(TCP_SERVER_PORT);
|
||||
|
||||
printf("Calling connect on socket\n");
|
||||
if (connect(sock, (sockaddr *) &server_addr, sizeof(server_addr)) < 0 ) {
|
||||
printf("ERROR: connect, err = %d\n", errno);
|
||||
closesocket(sock);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* wolfSSL INIT and CTX SETUP */
|
||||
|
||||
wolfSSL_Init();
|
||||
|
||||
/* chooses the highest possible TLS version */
|
||||
|
||||
ctx = wolfSSL_CTX_new(wolfSSLv23_client_method());
|
||||
|
||||
/* SET UP NETWORK SOCKET */
|
||||
if (ctx == 0) {
|
||||
printf("ERROR: wolfSSL_CTX_new failed\n");
|
||||
closesocket(sock);
|
||||
return;
|
||||
}
|
||||
|
||||
WOLFSSL_MSG("wolfSSL_CTX_new done");
|
||||
|
||||
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
|
||||
|
||||
ret = wolfSSL_CTX_load_verify_buffer(ctx,
|
||||
google_certs_ca,
|
||||
sizeof(google_certs_ca),
|
||||
SSL_FILETYPE_PEM);
|
||||
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("ERROR: wolfSSL_CTX_load_verify_buffer() failed\n");
|
||||
closesocket(sock);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
ssl = wolfSSL_new(ctx);
|
||||
if (ssl == NULL) {
|
||||
printf("ERROR: wolfSSL_new() failed\n");
|
||||
closesocket(sock);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
WOLFSSL_MSG("wolfSSL_new done");
|
||||
ret = wolfSSL_set_fd(ssl, sock);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("ERROR: wolfSSL_set_fd() failed\n");
|
||||
closesocket(sock);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
WOLFSSL_MSG("wolfSSL_set_fd done");
|
||||
do {
|
||||
error = 0; /* reset error */
|
||||
ret = wolfSSL_connect(ssl);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
printf("ERROR: wolfSSL_connect() failed, err = %d\n", error);
|
||||
if (error != SSL_ERROR_WANT_READ) {
|
||||
closesocket(sock);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
/* goToSleep() for 1 sec*/
|
||||
}
|
||||
} while ((ret != SSL_SUCCESS) && (error == SSL_ERROR_WANT_READ));
|
||||
|
||||
printf("wolfSSL_connect() ok... sending GET\n");
|
||||
XSTRNCPY(tx_buf, TX_MSG, TX_MSG_SIZE);
|
||||
if (wolfSSL_write(ssl, tx_buf, TX_MSG_SIZE) != TX_MSG_SIZE) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
printf("ERROR: wolfSSL_write() failed, err = %d\n", error);
|
||||
closesocket(sock);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
do {
|
||||
error = 0; /* reset error */
|
||||
ret = wolfSSL_read(ssl, rx_buf, RX_BUF_SIZE - 1);
|
||||
if (ret < 0) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (error != SSL_ERROR_WANT_READ) {
|
||||
printf("wolfSSL_read failed, error = %d\n", error);
|
||||
closesocket(sock);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
/* goToSleep() for 1 second*/
|
||||
} else if (ret > 0) {
|
||||
rx_buf[ret] = 0;
|
||||
printf("%s\n", rx_buf);
|
||||
}
|
||||
} while (error == SSL_ERROR_WANT_READ);
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
closesocket(sock);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* NO_WOLFSSL_CLIENT */
|
||||
|
||||
#if !defined(NO_WOLFSSL_SERVER)
|
||||
|
||||
#define TLS_SERVER_PORT 11111
|
||||
#define TX_BUF_SIZE 64
|
||||
#define RX_BUF_SIZE 1024
|
||||
#define TCP_SERVER_CONN_Q_SIZE 1
|
||||
|
||||
/* derived from wolfSSL/certs/server-ecc.der */
|
||||
|
||||
static const unsigned char server_ecc_der_256[] = { 0x30, 0x82, 0x03, 0x10,
|
||||
0x30, 0x82, 0x02, 0xB5, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00,
|
||||
0xEF, 0x46, 0xC7, 0xA4, 0x9B, 0xBB, 0x60, 0xD3, 0x30, 0x0A, 0x06, 0x08,
|
||||
0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, 0x30, 0x81, 0x8F, 0x31,
|
||||
0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53,
|
||||
0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x0A, 0x57,
|
||||
0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30,
|
||||
0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x53, 0x65, 0x61, 0x74,
|
||||
0x74, 0x6C, 0x65, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x0A,
|
||||
0x0C, 0x07, 0x45, 0x6C, 0x69, 0x70, 0x74, 0x69, 0x63, 0x31, 0x0C, 0x30,
|
||||
0x0A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x03, 0x45, 0x43, 0x43, 0x31,
|
||||
0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77,
|
||||
0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F,
|
||||
0x6D, 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7,
|
||||
0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77,
|
||||
0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x1E,
|
||||
0x17, 0x0D, 0x31, 0x36, 0x30, 0x38, 0x31, 0x31, 0x32, 0x30, 0x30, 0x37,
|
||||
0x33, 0x38, 0x5A, 0x17, 0x0D, 0x31, 0x39, 0x30, 0x35, 0x30, 0x38, 0x32,
|
||||
0x30, 0x30, 0x37, 0x33, 0x38, 0x5A, 0x30, 0x81, 0x8F, 0x31, 0x0B, 0x30,
|
||||
0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13,
|
||||
0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x0A, 0x57, 0x61, 0x73,
|
||||
0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30, 0x0E, 0x06,
|
||||
0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x53, 0x65, 0x61, 0x74, 0x74, 0x6C,
|
||||
0x65, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x07,
|
||||
0x45, 0x6C, 0x69, 0x70, 0x74, 0x69, 0x63, 0x31, 0x0C, 0x30, 0x0A, 0x06,
|
||||
0x03, 0x55, 0x04, 0x0B, 0x0C, 0x03, 0x45, 0x43, 0x43, 0x31, 0x18, 0x30,
|
||||
0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77, 0x77, 0x2E,
|
||||
0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31,
|
||||
0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01,
|
||||
0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C,
|
||||
0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x59, 0x30, 0x13,
|
||||
0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, 0x2A,
|
||||
0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xBB,
|
||||
0x33, 0xAC, 0x4C, 0x27, 0x50, 0x4A, 0xC6, 0x4A, 0xA5, 0x04, 0xC3, 0x3C,
|
||||
0xDE, 0x9F, 0x36, 0xDB, 0x72, 0x2D, 0xCE, 0x94, 0xEA, 0x2B, 0xFA, 0xCB,
|
||||
0x20, 0x09, 0x39, 0x2C, 0x16, 0xE8, 0x61, 0x02, 0xE9, 0xAF, 0x4D, 0xD3,
|
||||
0x02, 0x93, 0x9A, 0x31, 0x5B, 0x97, 0x92, 0x21, 0x7F, 0xF0, 0xCF, 0x18,
|
||||
0xDA, 0x91, 0x11, 0x02, 0x34, 0x86, 0xE8, 0x20, 0x58, 0x33, 0x0B, 0x80,
|
||||
0x34, 0x89, 0xD8, 0xA3, 0x81, 0xF7, 0x30, 0x81, 0xF4, 0x30, 0x1D, 0x06,
|
||||
0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0x5D, 0x5D, 0x26, 0xEF,
|
||||
0xAC, 0x7E, 0x36, 0xF9, 0x9B, 0x76, 0x15, 0x2B, 0x4A, 0x25, 0x02, 0x23,
|
||||
0xEF, 0xB2, 0x89, 0x30, 0x30, 0x81, 0xC4, 0x06, 0x03, 0x55, 0x1D, 0x23,
|
||||
0x04, 0x81, 0xBC, 0x30, 0x81, 0xB9, 0x80, 0x14, 0x5D, 0x5D, 0x26, 0xEF,
|
||||
0xAC, 0x7E, 0x36, 0xF9, 0x9B, 0x76, 0x15, 0x2B, 0x4A, 0x25, 0x02, 0x23,
|
||||
0xEF, 0xB2, 0x89, 0x30, 0xA1, 0x81, 0x95, 0xA4, 0x81, 0x92, 0x30, 0x81,
|
||||
0x8F, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
|
||||
0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C,
|
||||
0x0A, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31,
|
||||
0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x53, 0x65,
|
||||
0x61, 0x74, 0x74, 0x6C, 0x65, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55,
|
||||
0x04, 0x0A, 0x0C, 0x07, 0x45, 0x6C, 0x69, 0x70, 0x74, 0x69, 0x63, 0x31,
|
||||
0x0C, 0x30, 0x0A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x03, 0x45, 0x43,
|
||||
0x43, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F,
|
||||
0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E,
|
||||
0x63, 0x6F, 0x6D, 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48,
|
||||
0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F,
|
||||
0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D,
|
||||
0x82, 0x09, 0x00, 0xEF, 0x46, 0xC7, 0xA4, 0x9B, 0xBB, 0x60, 0xD3, 0x30,
|
||||
0x0C, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01,
|
||||
0xFF, 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03,
|
||||
0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0xF1, 0xD0, 0xA6,
|
||||
0x3E, 0x83, 0x33, 0x24, 0xD1, 0x7A, 0x05, 0x5F, 0x1E, 0x0E, 0xBD, 0x7D,
|
||||
0x6B, 0x33, 0xE9, 0xF2, 0x86, 0xF3, 0xF3, 0x3D, 0xA9, 0xEF, 0x6A, 0x87,
|
||||
0x31, 0xB3, 0xB7, 0x7E, 0x50, 0x02, 0x21, 0x00, 0xF0, 0x60, 0xDD, 0xCE,
|
||||
0xA2, 0xDB, 0x56, 0xEC, 0xD9, 0xF4, 0xE4, 0xE3, 0x25, 0xD4, 0xB0, 0xC9,
|
||||
0x25, 0x7D, 0xCA, 0x7A, 0x5D, 0xBA, 0xC4, 0xB2, 0xF6, 0x7D, 0x04, 0xC7,
|
||||
0xBD, 0x62, 0xC9, 0x20 };
|
||||
|
||||
/* derived from wolfSSL/certs/ecc-key.der */
|
||||
|
||||
static const unsigned char ecc_key_der_256[] = { 0x30, 0x77, 0x02, 0x01, 0x01,
|
||||
0x04, 0x20, 0x45, 0xB6, 0x69, 0x02, 0x73, 0x9C, 0x6C, 0x85, 0xA1, 0x38,
|
||||
0x5B, 0x72, 0xE8, 0xE8, 0xC7, 0xAC, 0xC4, 0x03, 0x8D, 0x53, 0x35, 0x04,
|
||||
0xFA, 0x6C, 0x28, 0xDC, 0x34, 0x8D, 0xE1, 0xA8, 0x09, 0x8C, 0xA0, 0x0A,
|
||||
0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0xA1, 0x44,
|
||||
0x03, 0x42, 0x00, 0x04, 0xBB, 0x33, 0xAC, 0x4C, 0x27, 0x50, 0x4A, 0xC6,
|
||||
0x4A, 0xA5, 0x04, 0xC3, 0x3C, 0xDE, 0x9F, 0x36, 0xDB, 0x72, 0x2D, 0xCE,
|
||||
0x94, 0xEA, 0x2B, 0xFA, 0xCB, 0x20, 0x09, 0x39, 0x2C, 0x16, 0xE8, 0x61,
|
||||
0x02, 0xE9, 0xAF, 0x4D, 0xD3, 0x02, 0x93, 0x9A, 0x31, 0x5B, 0x97, 0x92,
|
||||
0x21, 0x7F, 0xF0, 0xCF, 0x18, 0xDA, 0x91, 0x11, 0x02, 0x34, 0x86, 0xE8,
|
||||
0x20, 0x58, 0x33, 0x0B, 0x80, 0x34, 0x89, 0xD8 };
|
||||
|
||||
|
||||
void wolfssl_server_test(uintData_t statusPtr)
|
||||
{
|
||||
int sock_listen;
|
||||
int bindStatus;
|
||||
int sock_req;
|
||||
sockaddr_in socketAddr;
|
||||
sockaddr_in server_addr;
|
||||
int socketAddrLen=sizeof(sockaddr);
|
||||
char rx_buf[RX_BUF_SIZE];
|
||||
char tx_buf[TX_BUF_SIZE];
|
||||
unsigned char attempt_conn;
|
||||
clientConnectionHandleType TCPserverHandle;
|
||||
void * sendBuffer;
|
||||
DWORD bufferSizeInBytes;
|
||||
|
||||
WOLFSSL * ssl;
|
||||
WOLFSSL_CTX * ctx;
|
||||
int tx_buf_sz = 0, ret = 0, error = 0;
|
||||
|
||||
/* set up the mailbox transport */
|
||||
/* connectionId2 is defined in the mailbox-transport.config*/
|
||||
if (setupTransport(&TCPserverHandle, (char*)"connectionId2") != transportSuccess){
|
||||
printf("TCP transport set up failed \n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* SET UP NETWORK SOCKET */
|
||||
|
||||
printf("Opening network socket...\n");
|
||||
sock_listen = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (sock_listen == SOCKET_ERROR) {
|
||||
printf("ERROR: socket, err = %d\n", errno);
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Clearing memory for server_addr struct\n");
|
||||
XMEMSET((char *) &server_addr, 0u, sizeof(server_addr));
|
||||
|
||||
printf("Setting up server_addr struct\n");
|
||||
server_addr.sin_family = AF_INET;
|
||||
server_addr.sin_addr = INADDR_ANY;
|
||||
server_addr.sin_port = htons(TLS_SERVER_PORT);
|
||||
|
||||
bindStatus = bind(sock_listen, (sockaddr *) &server_addr, sizeof(server_addr));
|
||||
if (bindStatus == SOCKET_ERROR) {
|
||||
printf("ERROR: bind, err = %d\n", errno);
|
||||
closesocket(sock_listen);
|
||||
return;
|
||||
}
|
||||
|
||||
/* wolfSSL INIT and CTX SETUP */
|
||||
|
||||
wolfSSL_Init();
|
||||
|
||||
/* chooses the highest possible TLS version */
|
||||
|
||||
ctx = wolfSSL_CTX_new(wolfSSLv23_server_method());
|
||||
|
||||
if (ctx == 0) {
|
||||
printf("ERROR: wolfSSL_CTX_new failed\n");
|
||||
closesocket(sock_listen);
|
||||
return;
|
||||
}
|
||||
WOLFSSL_MSG("wolfSSL_CTX_new done");
|
||||
|
||||
ret = wolfSSL_CTX_use_certificate_buffer(ctx,
|
||||
server_ecc_der_256,
|
||||
sizeof(server_ecc_der_256),
|
||||
SSL_FILETYPE_ASN1);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("ERROR: wolfSSL_CTX_use_certificate_buffer() failed, \
|
||||
err = %d\n", ret);
|
||||
closesocket(sock_listen);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx,
|
||||
ecc_key_der_256,
|
||||
sizeof(ecc_key_der_256),
|
||||
SSL_FILETYPE_ASN1);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("ERROR: wolfSSL_CTX_use_PrivateKey_buffer() failed\n");
|
||||
closesocket(sock_listen);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
/* accept client socket connections */
|
||||
printf("Listening for client connection\n");
|
||||
printf("E.g, you can use ./examples/client/client.exe -h 192.168.219.100\n");
|
||||
printf(" \n");
|
||||
|
||||
listen(sock_listen, TCP_SERVER_CONN_Q_SIZE);
|
||||
|
||||
sock_req = accept(sock_listen,
|
||||
(sockaddr *) &socketAddr,
|
||||
&socketAddrLen);
|
||||
|
||||
if (sock_req == -1) {
|
||||
printf("ERROR: accept, err = %d\n", errno);
|
||||
closesocket(sock_listen);
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Got client connection! Starting TLS negotiation\n");
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* set up wolfSSL session */
|
||||
ssl = wolfSSL_new(ctx);
|
||||
if (ssl == NULL) {
|
||||
printf("ERROR: wolfSSL_new() failed\n");
|
||||
closesocket(sock_req);
|
||||
closesocket(sock_listen);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
WOLFSSL_MSG("wolfSSL_new done");
|
||||
ret = wolfSSL_set_fd(ssl, sock_req);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("ERROR: wolfSSL_set_fd() failed\n");
|
||||
closesocket(sock_req);
|
||||
closesocket(sock_listen);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
WOLFSSL_MSG("wolfSSL_set_fd done");
|
||||
do {
|
||||
error = 0; /* reset error */
|
||||
if (ret != SSL_SUCCESS) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
printf("ERROR: wolfSSL_accept() failed, err = %d\n", error);
|
||||
if (error != SSL_ERROR_WANT_READ) {
|
||||
closesocket(sock_req);
|
||||
closesocket(sock_listen);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
/* goToSleep() for 500 milli sec*/
|
||||
}
|
||||
} while ((ret != SSL_SUCCESS) && (error == SSL_ERROR_WANT_READ));
|
||||
|
||||
printf("wolfSSL_accept() ok...\n");
|
||||
|
||||
/* read client data */
|
||||
|
||||
error = 0;
|
||||
XMEMSET(rx_buf, 0u, RX_BUF_SIZE);
|
||||
ret = wolfSSL_read(ssl, rx_buf, RX_BUF_SIZE - 1);
|
||||
if (ret < 0) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (error != SSL_ERROR_WANT_READ) {
|
||||
printf("wolfSSL_read failed, error = %d\n", error);
|
||||
closesocket(sock_req);
|
||||
closesocket(sock_listen);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
printf("AFTER wolfSSL_read() call, ret = %d\n", ret);
|
||||
if (ret > 0) {
|
||||
rx_buf[ret] = 0;
|
||||
printf("Client sent: %s\n", rx_buf);
|
||||
}
|
||||
/* write response to client */
|
||||
XMEMSET(tx_buf, 0u, TX_BUF_SIZE);
|
||||
tx_buf_sz = 22;
|
||||
XSTRNCPY(tx_buf, "I hear ya fa shizzle!\n", tx_buf_sz);
|
||||
if (wolfSSL_write(ssl, tx_buf, tx_buf_sz) != tx_buf_sz) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
printf("ERROR: wolfSSL_write() failed, err = %d\n", error);
|
||||
closesocket(sock_req);
|
||||
closesocket(sock_listen);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
ret = wolfSSL_shutdown(ssl);
|
||||
if (ret == SSL_SHUTDOWN_NOT_DONE)
|
||||
wolfSSL_shutdown(ssl);
|
||||
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
closesocket(sock_req);
|
||||
closesocket(sock_listen);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* NO_WOLFSSL_SERVER */
|
||||
|
||||
int wolfsslRunTests (void)
|
||||
{
|
||||
thread_handle_t TCPhandle;
|
||||
threadStatus ts;
|
||||
int ret;
|
||||
|
||||
#if !defined(NO_CRYPT_TEST)
|
||||
wolfcrypt_test(NULL);
|
||||
#endif
|
||||
#if !defined(NO_CRYPT_BENCHMARK)
|
||||
benchmark_test(NULL);
|
||||
#endif
|
||||
#if !defined(NO_WOLFSSL_CLIENT)
|
||||
ts = createThread("TCPclient", "TCPThreadTemplate", wolfssl_client_test,
|
||||
0, &TCPhandle );
|
||||
if (ts != threadSuccess) {
|
||||
printf("Unable to create TCP client thread, %i ", (DWORD)ts);
|
||||
}
|
||||
#endif
|
||||
#if !defined(NO_WOLFSSL_SERVER)
|
||||
ts = createThread("TCPserver", "TCPThreadTemplate", wolfssl_server_test,
|
||||
0, &TCPhandle );
|
||||
if (ts != threadSuccess) {
|
||||
printf("Unable to create TCP server thread, %i ", (DWORD)ts);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
37
IDE/ECLIPSE/DEOS/tls_wolfssl.h
Normal file
37
IDE/ECLIPSE/DEOS/tls_wolfssl.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/* tls_wolfssl.h
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef __TLS_WOLFSSL_H__
|
||||
#define __TLS_WOLFSSL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int wolfsslRunTests(void);
|
||||
void wolfssl_client_test(uintData_t);
|
||||
void wolfssl_server_test(uintData_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* TLS_WOLFSSL_H */
|
||||
112
IDE/ECLIPSE/DEOS/user_settings.h
Normal file
112
IDE/ECLIPSE/DEOS/user_settings.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/* user_setting.h
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef DEOS_USER_SETTINGS_H_
|
||||
#define DEOS_USER_SETTINGS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_DEOS
|
||||
|
||||
/* You can select none or all of the following tests
|
||||
using #define instead of #undef.
|
||||
By default, all four tests run*/
|
||||
|
||||
#undef NO_CRYPT_TEST
|
||||
#undef NO_CRYPT_BENCHMARK
|
||||
#undef NO_WOLFSSL_CLIENT
|
||||
#undef NO_WOLFSSL_SERVER
|
||||
|
||||
/* adjust CURRENT_UNIX_TIMESTAMP to seconds since Jan 01 1970. (UTC)
|
||||
You can get the current time from https://www.unixtimestamp.com/
|
||||
*/
|
||||
#define CURRENT_UNIX_TIMESTAMP 1545864916
|
||||
|
||||
#define NO_FILESYSTEM
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* prevents from including multiple definition of main() */
|
||||
#define NO_MAIN_DRIVER
|
||||
#define NO_TESTSUITE_MAIN_DRIVER
|
||||
|
||||
/* includes certificate test buffers via header files */
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
/*use kB instead of mB for embedded benchmarking*/
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITE_TEMP_FILES
|
||||
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_SHA512
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
#define ED25519_SMALL
|
||||
|
||||
/* TLS 1.3 */
|
||||
#if 0
|
||||
#define WOLFSSL_TLS13
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_HKDF
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_AEAD
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
/* You can use your own custom random generator function with
|
||||
no input parameters and a `CUSTOM_RAND_TYPE` return type*/
|
||||
|
||||
#ifndef CUSTOM_RAND_GENERATE
|
||||
#define CUSTOM_RAND_TYPE int
|
||||
#define CUSTOM_RAND_GENERATE yourRandGenFunc
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
#undef XMALLOC_OVERRIDE
|
||||
#define XMALLOC_OVERRIDE
|
||||
/* prototypes for user heap override functions */
|
||||
|
||||
#include <stddef.h> /* for size_t */
|
||||
|
||||
extern void *malloc_deos(size_t size);
|
||||
extern void free_deos(void *ptr);
|
||||
extern void *realloc_deos(void *ptr, size_t size);
|
||||
|
||||
#define XMALLOC(n, h, t) malloc_deos(n)
|
||||
#define XFREE(p, h, t) free_deos(p)
|
||||
#define XREALLOC(p, n, h, t) realloc_deos(p, n)
|
||||
|
||||
#endif
|
||||
|
||||
#define printf printx
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
180
IDE/ECLIPSE/MICRIUM/README.md
Normal file
180
IDE/ECLIPSE/MICRIUM/README.md
Normal file
@@ -0,0 +1,180 @@
|
||||
|
||||
# Micrium μC/OS-III Port
|
||||
## Overview
|
||||
You can enable the wolfSSL support for Micrium μC/OS-III RTOS available [here](http://www.micriums.com/) using the define `MICRIUM`.
|
||||
|
||||
## Usage
|
||||
|
||||
You can start with your IDE-based example project for Micrium uC/OS-III and uC/TCPIP stack. You must include the uC-Clk module into your project because wolfSSL uses Micrium’s Clk_GetTS_Unix () function from <clk.h> in order to authenticate the start and end dates of certificates.
|
||||
|
||||
wolfSSL supports a compile-time user configurable options in the `IDE/ECLIPSE/MICRIUM/user_settings.h` file.
|
||||
|
||||
The `wolfsslRunTests.c` example application provides a simple function to run the selected examples at compile time through the following four #defines in user_settings.h.
|
||||
|
||||
```
|
||||
1. #define WOLFSSL_WOLFCRYPT_TEST
|
||||
2. #define WOLFSSL_BENCHMARK_TEST
|
||||
3. #define WOLFSSL_CLIENT_TEST
|
||||
4. #define WOLFSSL_SERVER_TEST
|
||||
|
||||
You can define one or all of the above options.
|
||||
```
|
||||
1. Open your IDE-based example project for Micrium uC/OS-III (with the uC-Clk module) and uC/TCPIP stack.
|
||||
|
||||
2. Create the following folder and sub-folders structures in your project.
|
||||
```
|
||||
wolfssl
|
||||
|src
|
||||
|wolfcrypt
|
||||
|benchmark
|
||||
|src
|
||||
|test
|
||||
|wolfssl
|
||||
|openssl
|
||||
|wolfcrypt
|
||||
|exampleTLS
|
||||
```
|
||||
The folder hierarchy is the same as the wolfSSL folders with an exception of the exampleTLS folder.
|
||||
|
||||
3. Right click on the exampleTLS folder, add or link all of the header and source files in `IDE/ECLIPSE/MICRIUM/` folder into the exampleTLS folder.
|
||||
|
||||
4. Right click on each folders, add or link all the source code in the corresponding folder in wolfSSL.
|
||||
|
||||
5. Remove non-C platform dependent files from your build. At the moment, only aes_asm.asm and aes_asm.s must be removed from your wolfssl/wolfcrypt/src folder.
|
||||
|
||||
6. In your C/C++ compiler preprocessor settings, add the wolfSSL directories to your include paths.
|
||||
Here's an example of the paths that must be added.
|
||||
```
|
||||
$PROJ_DIR$\...
|
||||
$PROJ_DIR$\...\wolfcrypt
|
||||
$PROJ_DIR$\...\wolfssl
|
||||
$PROJ_DIR$\...\IDE\ECLIPSE\MICRIUM
|
||||
```
|
||||
7. In your C/C++ compiler preprocessor settings, define the WOLFSSL_USER_SETTINGS symbol to add user_settings.h file in your project.
|
||||
|
||||
8. Add a call to `wolfsslRunTests()` from your startup task. Here's an example:
|
||||
```
|
||||
static void App_TaskStart (void *p_arg)
|
||||
{
|
||||
OS_ERR os_err;
|
||||
...
|
||||
while (DEF_TRUE) {
|
||||
wolfsslRunTests();
|
||||
OSTimeDlyHMSM(0u, 5u, 0u, 0u,OS_OPT_TIME_HMSM_STRICT, &os_err);
|
||||
}
|
||||
}
|
||||
```
|
||||
9. Rebuild all your project.
|
||||
|
||||
10. Now you are ready to download and debug your image on the board.
|
||||
|
||||
The test results below were collected from the NXP Kinetis K70 (Freescale TWR-K70F120M MCU) tower system board with the following software and tool chains:
|
||||
|
||||
- IAR Embedded Workbench IDE - ARM 8.32.1 (IAR ELF Linker V8.32.1.169/W32 for ARM)
|
||||
|
||||
- The starting project is based on an IAR EWARM project from Micrium download center at [micrium_twr-k70f120m-os3/](https://www.micrium.com/download/micrium_twr-k70f120m-os3/) but the K70X_FLASH.icf linker script file was slightly modified to configure the stack and heap sizes to 16KB and 20KB. The test was run on a 1 MBytes of program flash and 128 KBytes of static RAM.
|
||||
|
||||
- wolfssl [latest version](https://github.com/wolfSSL/wolfssl)
|
||||
|
||||
|
||||
### `WOLFSSL_WOLFCRYPT_TEST` output of wolfcrypt_test()
|
||||
```
|
||||
error test passed!
|
||||
base64 test passed!
|
||||
asn test passed!
|
||||
MD5 test passed!
|
||||
MD4 test passed!
|
||||
SHA test passed!
|
||||
SHA-256 test passed!
|
||||
SHA-512 test passed!
|
||||
Hash test passed!
|
||||
HMAC-MD5 test passed!
|
||||
HMAC-SHA test passed!
|
||||
HAC-SHA256 test passed!
|
||||
HMAC-SHA512 test passed!
|
||||
GMC test passed!
|
||||
HC-128 test passed!
|
||||
Rabbit test passed!
|
||||
DS test passed!
|
||||
DS3 test passed!
|
||||
AES test passed!
|
||||
AES192 test passed!
|
||||
AES256 test passed!
|
||||
AES-GM test passed!
|
||||
RANDOM test passed!
|
||||
RSA test passed!
|
||||
DH test passed!
|
||||
DSA test passed!
|
||||
PWDBASED test passed!
|
||||
ECC test passed!
|
||||
ECC buffer test passed!
|
||||
CURVE25519 test passed!
|
||||
ED25519 test passed!
|
||||
logging test passed!
|
||||
mutex test passed!
|
||||
memcb test passed!
|
||||
```
|
||||
### `WOLFSSL_BENCHMARK_TEST` output of benchmark_test()
|
||||
```
|
||||
------------------------------------------------------------------------------
|
||||
wolfSSL version 3.15.5
|
||||
------------------------------------------------------------------------------
|
||||
wolfCrypt Benchmark (block bytes 1024, min 1.0 sec each)
|
||||
RNG 225 KB tooks 1.026 seconds, 219.313 KB/s
|
||||
AES-128-CBC-enc 250 KB toks 1.105 seconds 226.210 KB/s
|
||||
AES-128-CBC-dec 225 KB tooks 1.005 seconds, 223.922 KB/s
|
||||
AES-192-CBC-enc 225 KB tooks 1.076 seconds, 209.104 KB/s
|
||||
AES-192-CBC-dec 225 KB tooks 1.077 seconds, 208.981 K/s
|
||||
AES-56-CBC-enc 200 KB tooks 1.029 seconds, 19.396 KB/s
|
||||
AES-256-CBC-dec 200 KB toks 1.022 seconds, 195.785 KB/s
|
||||
AES-128-GCM-enc 125 KB tooks 1.28 secnds, 101.70 KB/s
|
||||
AES-128-GC-dec 125 KB tooks 1.228 seconds 101.756 KB/s
|
||||
AES-192-GCM-enc 100 KB tooks 1.026 seconds, 97.493 KB/s
|
||||
AES-192-GCM-dec 100 KB tooks 1.026 seconds, 97.480 KB/s
|
||||
AES-256-GCM-enc 100 KB tooks 1.065 seconds, 93.909 KB/s
|
||||
AES-256-GC-dec 100 KB tooks 1.065 seconds, 93.897 KB/s
|
||||
RABBIT 2 MB tooks 1.011 seconds, 2.19 MB/s
|
||||
3DES 100 KB tooks 1.007 sconds, 99.312 KB/s
|
||||
MD5 3MB tooks 1.008 seonds, 2.907 MBs
|
||||
SHA 1 MB tooks 1.09 secnds, 1.283 MB/s
|
||||
SHA-256 575 KB tooks 1.037 seconds, 554.501 KB/s
|
||||
SHA-512 200 KB tooks 1.003 seconds, 199.444 KB/s
|
||||
HMAC-MD5 3 B tooks 1.002 seconds, 2.876 MB/s
|
||||
HMAC-SHA26 550 KB tooks 1.000 seconds, 549.95 KB//s
|
||||
HMAC-SHA512 200 KB toks 1.018 seconds, 196.452 KB/s
|
||||
RSA 2048 public 8 ops took 1.025 sec, avg 128.135 ms, 7.804 op/sec
|
||||
RSA 2048 private 2 ops took 4.972 ec, avg 2485.951 s, 0.402 ops/sec
|
||||
DH 2048 key en 2 ops took 1.927 sec, avg 96.303 ms, 1.038 op/sec
|
||||
DH 2048 agree 2ops took 1.937 sc, avg 968.578 ms, 1.032 ops/sec
|
||||
ECC 256 key gen 3 ops took 1.185 sec, avg 394.944 ms, 2.53 ops/sec
|
||||
ECDHE 256 agree 4 ops took 1.585 sec, avg 396.168 ms, 2.524 ops/sec
|
||||
ECSA 256 sign 4 ops took 1.611 sec, avg 402.865 ms, 2.482 ops/sec
|
||||
ECDSA 256verif 2 ops tok 1.586 sec, avg 793.153 ms, 1.261 opssec
|
||||
CURVE 25519 key gen 2 ops took 1.262 sec, avg 630.907 ms, 1.585 ops/sec
|
||||
CURE 25519 agree 2 ops took 1.261 sec, avg630.469 ms, 1.586 ops/sec
|
||||
ED 2519 key gen 2 ops took 1.27 sec, avg 66.099ms, 1.572 ops/sec
|
||||
ED 25519 sign 2 ops took 1.303 sec, ag 65.633 ms, 1.35 op/sec
|
||||
ED 25519 verify 2 ops took 2.674 sec, avg1337.68 ms 0.748 ops/ec
|
||||
```
|
||||
### `WOLFSSL_CLIENT_TEST` wolfssl_client_test()
|
||||
|
||||
You can modify the `TCP_SERVER_IP_ADDR` and `TCP_SERVER_PORT` macros at top of the `client_wolfssl.c` file to configure the host address and port. You will also need the server certificate. This example uses TLS 1.2 to connect to a remote host.
|
||||
|
||||
### `WOLFSSL_SERVER_TEST` wolfssl_server_test()
|
||||
|
||||
You can modify the `TLS_SERVER_PORT` at top of `server_wolfssl.c` to configure the port number to listen on local-host.
|
||||
|
||||
Once you start the TLS server and `Listening for client connection` displays on the serial console, the server is ready to accept client connections.
|
||||
|
||||
You can connect to the server using the wolfssl TLS client example from your Linux or Windows host as follows:
|
||||
|
||||
$ ./examples/client/client.exe -h TLS_SERVER_IP_ADDRES
|
||||
SSL version is TLSv1.2
|
||||
SSL cipher suite is TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
|
||||
SSL curve name is SECP256R1
|
||||
I hear ya fa shizzle!
|
||||
|
||||
|
||||
## References
|
||||
|
||||
For more information please contact info@wolfssl.com.
|
||||
277
IDE/ECLIPSE/MICRIUM/client_wolfssl.c
Normal file
277
IDE/ECLIPSE/MICRIUM/client_wolfssl.c
Normal file
@@ -0,0 +1,277 @@
|
||||
/* client_wolfssl.c
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <Source/net_sock.h>
|
||||
#include <Source/net_app.h>
|
||||
#include <Source/net_ascii.h>
|
||||
#include <Source/net_util.h>
|
||||
#include <lib_str.h>
|
||||
#include <app_cfg.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#include "client_wolfssl.h"
|
||||
|
||||
/* 172.217.3.174 is the IP address of https://www.google.com */
|
||||
#define TCP_SERVER_IP_ADDR "172.217.3.174"
|
||||
#define TCP_SERVER_DOMAIN_NAME "www.google.com"
|
||||
#define TCP_SERVER_PORT 443
|
||||
|
||||
#define TX_BUF_SIZE 64
|
||||
#define RX_BUF_SIZE 1024
|
||||
|
||||
#define TX_MSG "GET /index.html HTTP/1.0\r\n\r\n"
|
||||
#define TX_MSG_SIZE sizeof(TX_MSG)
|
||||
|
||||
static const CPU_INT08U google_certs_ca[]="\n\
|
||||
## Google Internet Authority G3 \n\
|
||||
-----BEGIN CERTIFICATE-----\n\
|
||||
MIIEXDCCA0SgAwIBAgINAeOpMBz8cgY4P5pTHTANBgkqhkiG9w0BAQsFADBMMSAw\n\
|
||||
HgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFs\n\
|
||||
U2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0xNzA2MTUwMDAwNDJaFw0yMTEy\n\
|
||||
MTUwMDAwNDJaMFQxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVHb29nbGUgVHJ1c3Qg\n\
|
||||
U2VydmljZXMxJTAjBgNVBAMTHEdvb2dsZSBJbnRlcm5ldCBBdXRob3JpdHkgRzMw\n\
|
||||
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDKUkvqHv/OJGuo2nIYaNVW\n\
|
||||
XQ5IWi01CXZaz6TIHLGp/lOJ+600/4hbn7vn6AAB3DVzdQOts7G5pH0rJnnOFUAK\n\
|
||||
71G4nzKMfHCGUksW/mona+Y2emJQ2N+aicwJKetPKRSIgAuPOB6Aahh8Hb2XO3h9\n\
|
||||
RUk2T0HNouB2VzxoMXlkyW7XUR5mw6JkLHnA52XDVoRTWkNty5oCINLvGmnRsJ1z\n\
|
||||
ouAqYGVQMc/7sy+/EYhALrVJEA8KbtyX+r8snwU5C1hUrwaW6MWOARa8qBpNQcWT\n\
|
||||
kaIeoYvy/sGIJEmjR0vFEwHdp1cSaWIr6/4g72n7OqXwfinu7ZYW97EfoOSQJeAz\n\
|
||||
AgMBAAGjggEzMIIBLzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUH\n\
|
||||
AwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFHfCuFCa\n\
|
||||
Z3Z2sS3ChtCDoH6mfrpLMB8GA1UdIwQYMBaAFJviB1dnHB7AagbeWbSaLd/cGYYu\n\
|
||||
MDUGCCsGAQUFBwEBBCkwJzAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AucGtpLmdv\n\
|
||||
b2cvZ3NyMjAyBgNVHR8EKzApMCegJaAjhiFodHRwOi8vY3JsLnBraS5nb29nL2dz\n\
|
||||
cjIvZ3NyMi5jcmwwPwYDVR0gBDgwNjA0BgZngQwBAgIwKjAoBggrBgEFBQcCARYc\n\
|
||||
aHR0cHM6Ly9wa2kuZ29vZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEA\n\
|
||||
HLeJluRT7bvs26gyAZ8so81trUISd7O45skDUmAge1cnxhG1P2cNmSxbWsoiCt2e\n\
|
||||
ux9LSD+PAj2LIYRFHW31/6xoic1k4tbWXkDCjir37xTTNqRAMPUyFRWSdvt+nlPq\n\
|
||||
wnb8Oa2I/maSJukcxDjNSfpDh/Bd1lZNgdd/8cLdsE3+wypufJ9uXO1iQpnh9zbu\n\
|
||||
FIwsIONGl1p3A8CgxkqI/UAih3JaGOqcpcdaCIzkBaR9uYQ1X4k2Vg5APRLouzVy\n\
|
||||
7a8IVk6wuy6pm+T7HT4LY8ibS5FEZlfAFLSW8NwsVz9SBK2Vqn1N0PIMn5xA6NZV\n\
|
||||
c7o835DLAFshEWfC7TIe3g==\n\
|
||||
-----END CERTIFICATE-----\n\
|
||||
## Google Trust Services- GlobalSign Root CA-R2\n\
|
||||
-----BEGIN CERTIFICATE-----\n\
|
||||
MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G\n\
|
||||
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp\n\
|
||||
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1\n\
|
||||
MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG\n\
|
||||
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI\n\
|
||||
hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL\n\
|
||||
v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8\n\
|
||||
eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq\n\
|
||||
tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd\n\
|
||||
C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa\n\
|
||||
zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB\n\
|
||||
mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH\n\
|
||||
V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n\n\
|
||||
bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG\n\
|
||||
3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs\n\
|
||||
J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO\n\
|
||||
291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS\n\
|
||||
ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd\n\
|
||||
AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7\n\
|
||||
TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==\n\
|
||||
-----END CERTIFICATE-----\n\
|
||||
";
|
||||
|
||||
int wolfssl_client_test(void) {
|
||||
NET_ERR err;
|
||||
NET_SOCK_ID sock;
|
||||
NET_IPv4_ADDR server_ip_addr;
|
||||
NET_SOCK_ADDR_IPv4 server_addr;
|
||||
CPU_CHAR rx_buf[RX_BUF_SIZE];
|
||||
CPU_CHAR tx_buf[TX_BUF_SIZE];
|
||||
OS_ERR os_err;
|
||||
int ret = 0, error = 0;
|
||||
|
||||
WOLFSSL* ssl;
|
||||
WOLFSSL_CTX* ctx;
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* wolfSSL INIT and CTX SETUP */
|
||||
|
||||
wolfSSL_Init();
|
||||
|
||||
/* SET UP NETWORK SOCKET */
|
||||
|
||||
APP_TRACE_INFO(("Opening a network socket...\r\n"));
|
||||
|
||||
sock = NetSock_Open(NET_SOCK_ADDR_FAMILY_IP_V4,
|
||||
NET_SOCK_TYPE_STREAM,
|
||||
NET_SOCK_PROTOCOL_TCP,
|
||||
&err);
|
||||
if (err != NET_SOCK_ERR_NONE) {
|
||||
APP_TRACE_INFO(("ERROR: NetSock_Open, err = %d\r\n", (int) err));
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef NET_SECURE_MODULE_EN
|
||||
APP_TRACE_INFO(("Setting the socket as secure...\r\n"));
|
||||
|
||||
(void)NetSock_CfgSecure(sock,
|
||||
DEF_YES,
|
||||
&err);
|
||||
if (err != NET_SOCK_ERR_NONE) {
|
||||
APP_TRACE_INFO(("ERROR: NetSock_CfgSecure, err = %d\r\n", (int) err));
|
||||
NetSock_Close(sock, &err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
APP_TRACE_INFO(("Configure the common name of the server...\r\n"));
|
||||
(void)NetSock_CfgSecureClientCommonName(sock,
|
||||
TCP_SERVER_DOMAIN_NAME,
|
||||
&err);
|
||||
if (err != NET_SOCK_ERR_NONE) {
|
||||
APP_TRACE_INFO(("ERROR: NetSock_CfgSecureClientCommonName, \
|
||||
err = %d\r\n", (int) err));
|
||||
NetSock_Close(sock, &err);
|
||||
return -1;
|
||||
}
|
||||
#endif /* NET_SECURE_MODULE_EN */
|
||||
|
||||
APP_TRACE_INFO(("Calling NetASCII_Str_to_IPv4...\r\n"));
|
||||
server_ip_addr = NetASCII_Str_to_IPv4(TCP_SERVER_IP_ADDR, &err);
|
||||
if (err != NET_ASCII_ERR_NONE) {
|
||||
APP_TRACE_INFO(("ERROR: NetASCII_Str_to_IPv4, err = %d\r\n", (int) err));
|
||||
NetSock_Close(sock, &err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
APP_TRACE_INFO(("Clearing memory for server_addr struct\r\n"));
|
||||
|
||||
Mem_Clr((void *) &server_addr, (CPU_SIZE_T) sizeof(server_addr));
|
||||
|
||||
APP_TRACE_INFO(("Setting server IP address: %s, port: %d\r\n",
|
||||
TCP_SERVER_IP_ADDR, TCP_SERVER_PORT));
|
||||
|
||||
server_addr.AddrFamily = NET_SOCK_ADDR_FAMILY_IP_V4;
|
||||
server_addr.Addr = NET_UTIL_HOST_TO_NET_32(server_ip_addr);
|
||||
server_addr.Port = NET_UTIL_HOST_TO_NET_16(TCP_SERVER_PORT);
|
||||
|
||||
/* CONNECT SOCKET */
|
||||
|
||||
APP_TRACE_INFO(("Calling NetSock_Conn on socket\r\n"));
|
||||
NetSock_Conn((NET_SOCK_ID) sock,
|
||||
(NET_SOCK_ADDR *) &server_addr,
|
||||
(NET_SOCK_ADDR_LEN) sizeof(server_addr),
|
||||
(NET_ERR*) &err);
|
||||
if (err != NET_SOCK_ERR_NONE) {
|
||||
APP_TRACE_INFO(("ERROR: NetSock_Conn, err = %d\r\n", (int) err));
|
||||
NetSock_Close(sock, &err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
|
||||
if (ctx == 0) {
|
||||
APP_TRACE_INFO(("ERROR: wolfSSL_CTX_new failed\r\n"));
|
||||
NetSock_Close(sock, &err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
APP_TRACE_INFO(("wolfSSL_CTX_new done\r\n"));
|
||||
|
||||
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
|
||||
|
||||
ret = wolfSSL_CTX_load_verify_buffer(ctx,
|
||||
google_certs_ca,
|
||||
sizeof(google_certs_ca),
|
||||
SSL_FILETYPE_PEM);
|
||||
|
||||
if (ret != SSL_SUCCESS) {
|
||||
APP_TRACE_INFO(("ERROR: wolfSSL_CTX_load_verify_buffer() failed\r\n"));
|
||||
NetSock_Close(sock, &err);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
APP_TRACE_INFO(("ERROR: wolfSSL_new() failed\r\n"));
|
||||
NetSock_Close(sock, &err);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
APP_TRACE_INFO(("wolfSSL_new done\r\n"));
|
||||
ret = wolfSSL_set_fd(ssl, sock);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
APP_TRACE_INFO(("ERROR: wolfSSL_set_fd() failed\r\n"));
|
||||
NetSock_Close(sock, &err);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
APP_TRACE_INFO(("wolfSSL_set_fd done\r\n"));
|
||||
do {
|
||||
error = 0; /* reset error */
|
||||
ret = wolfSSL_connect(ssl);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
APP_TRACE_INFO(
|
||||
("ERROR: wolfSSL_connect() failed, err = %d\r\n", error));
|
||||
if (error != SSL_ERROR_WANT_READ) {
|
||||
NetSock_Close(sock, &err);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
OSTimeDlyHMSM(0u, 0u, 1u, 0u, OS_OPT_TIME_HMSM_STRICT, &os_err);
|
||||
}
|
||||
} while ((ret != SSL_SUCCESS) && (error == SSL_ERROR_WANT_READ));
|
||||
|
||||
APP_TRACE_INFO(("wolfSSL_connect() ok... sending GET\r\n"));
|
||||
Str_Copy_N(tx_buf, TX_MSG, TX_MSG_SIZE);
|
||||
if (wolfSSL_write(ssl, tx_buf, TX_MSG_SIZE) != TX_MSG_SIZE) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
APP_TRACE_INFO(("ERROR: wolfSSL_write() failed, err = %d\r\n", error));
|
||||
NetSock_Close(sock, &err);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
do {
|
||||
error = 0; /* reset error */
|
||||
ret = wolfSSL_read(ssl, rx_buf, RX_BUF_SIZE - 1);
|
||||
if (ret < 0) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (error != SSL_ERROR_WANT_READ) {
|
||||
APP_TRACE_INFO(("wolfSSL_read failed, error = %d\r\n", error));
|
||||
NetSock_Close(sock, &err);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
OSTimeDlyHMSM(0u, 0u, 1u, 0u, OS_OPT_TIME_HMSM_STRICT, &os_err);
|
||||
} else if (ret > 0) {
|
||||
rx_buf[ret] = 0;
|
||||
APP_TRACE_INFO(("%s\r\n", rx_buf));
|
||||
}
|
||||
} while (error == SSL_ERROR_WANT_READ);
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
NetSock_Close(sock, &err);
|
||||
return 0;
|
||||
}
|
||||
35
IDE/ECLIPSE/MICRIUM/client_wolfssl.h
Normal file
35
IDE/ECLIPSE/MICRIUM/client_wolfssl.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/* client_wolfssl.h
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef __CLIENT_WOLFSSL_H__
|
||||
#define __CLIENT_WOLFSSL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int wolfssl_client_test(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* CLIENT_WOLFSSL_H */
|
||||
12
IDE/ECLIPSE/MICRIUM/include.am
Normal file
12
IDE/ECLIPSE/MICRIUM/include.am
Normal file
@@ -0,0 +1,12 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST += \
|
||||
IDE/ECLIPSE/MICRIUM/README.md \
|
||||
IDE/ECLIPSE/MICRIUM/user_settings.h \
|
||||
IDE/ECLIPSE/MICRIUM/client_wolfssl.h \
|
||||
IDE/ECLIPSE/MICRIUM/server_wolfssl.h \
|
||||
IDE/ECLIPSE/MICRIUM/client_wolfssl.c \
|
||||
IDE/ECLIPSE/MICRIUM/server_wolfssl.c \
|
||||
IDE/ECLIPSE/MICRIUM/wolfsslRunTests.c
|
||||
335
IDE/ECLIPSE/MICRIUM/server_wolfssl.c
Normal file
335
IDE/ECLIPSE/MICRIUM/server_wolfssl.c
Normal file
@@ -0,0 +1,335 @@
|
||||
/* server_wolfssl.c
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <Source/net_sock.h>
|
||||
#include <Source/net_app.h>
|
||||
#include <Source/net_util.h>
|
||||
#include <Source/net_ascii.h>
|
||||
#include <app_cfg.h>
|
||||
|
||||
#include "wolfssl/ssl.h"
|
||||
#include "server_wolfssl.h"
|
||||
|
||||
#define TLS_SERVER_PORT 11111
|
||||
#define TX_BUF_SIZE 64
|
||||
#define RX_BUF_SIZE 1024
|
||||
#define TCP_SERVER_CONN_Q_SIZE 1
|
||||
|
||||
/* derived from wolfSSL/certs/server-ecc.der */
|
||||
|
||||
static const CPU_INT08U server_ecc_der_256[] = { 0x30, 0x82, 0x03, 0x10,
|
||||
0x30, 0x82, 0x02, 0xB5, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00,
|
||||
0xEF, 0x46, 0xC7, 0xA4, 0x9B, 0xBB, 0x60, 0xD3, 0x30, 0x0A, 0x06, 0x08,
|
||||
0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, 0x30, 0x81, 0x8F, 0x31,
|
||||
0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53,
|
||||
0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x0A, 0x57,
|
||||
0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30,
|
||||
0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x53, 0x65, 0x61, 0x74,
|
||||
0x74, 0x6C, 0x65, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x0A,
|
||||
0x0C, 0x07, 0x45, 0x6C, 0x69, 0x70, 0x74, 0x69, 0x63, 0x31, 0x0C, 0x30,
|
||||
0x0A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x03, 0x45, 0x43, 0x43, 0x31,
|
||||
0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77,
|
||||
0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F,
|
||||
0x6D, 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7,
|
||||
0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77,
|
||||
0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x1E,
|
||||
0x17, 0x0D, 0x31, 0x36, 0x30, 0x38, 0x31, 0x31, 0x32, 0x30, 0x30, 0x37,
|
||||
0x33, 0x38, 0x5A, 0x17, 0x0D, 0x31, 0x39, 0x30, 0x35, 0x30, 0x38, 0x32,
|
||||
0x30, 0x30, 0x37, 0x33, 0x38, 0x5A, 0x30, 0x81, 0x8F, 0x31, 0x0B, 0x30,
|
||||
0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13,
|
||||
0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x0A, 0x57, 0x61, 0x73,
|
||||
0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30, 0x0E, 0x06,
|
||||
0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x53, 0x65, 0x61, 0x74, 0x74, 0x6C,
|
||||
0x65, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x07,
|
||||
0x45, 0x6C, 0x69, 0x70, 0x74, 0x69, 0x63, 0x31, 0x0C, 0x30, 0x0A, 0x06,
|
||||
0x03, 0x55, 0x04, 0x0B, 0x0C, 0x03, 0x45, 0x43, 0x43, 0x31, 0x18, 0x30,
|
||||
0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77, 0x77, 0x2E,
|
||||
0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31,
|
||||
0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01,
|
||||
0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C,
|
||||
0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x59, 0x30, 0x13,
|
||||
0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, 0x2A,
|
||||
0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xBB,
|
||||
0x33, 0xAC, 0x4C, 0x27, 0x50, 0x4A, 0xC6, 0x4A, 0xA5, 0x04, 0xC3, 0x3C,
|
||||
0xDE, 0x9F, 0x36, 0xDB, 0x72, 0x2D, 0xCE, 0x94, 0xEA, 0x2B, 0xFA, 0xCB,
|
||||
0x20, 0x09, 0x39, 0x2C, 0x16, 0xE8, 0x61, 0x02, 0xE9, 0xAF, 0x4D, 0xD3,
|
||||
0x02, 0x93, 0x9A, 0x31, 0x5B, 0x97, 0x92, 0x21, 0x7F, 0xF0, 0xCF, 0x18,
|
||||
0xDA, 0x91, 0x11, 0x02, 0x34, 0x86, 0xE8, 0x20, 0x58, 0x33, 0x0B, 0x80,
|
||||
0x34, 0x89, 0xD8, 0xA3, 0x81, 0xF7, 0x30, 0x81, 0xF4, 0x30, 0x1D, 0x06,
|
||||
0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0x5D, 0x5D, 0x26, 0xEF,
|
||||
0xAC, 0x7E, 0x36, 0xF9, 0x9B, 0x76, 0x15, 0x2B, 0x4A, 0x25, 0x02, 0x23,
|
||||
0xEF, 0xB2, 0x89, 0x30, 0x30, 0x81, 0xC4, 0x06, 0x03, 0x55, 0x1D, 0x23,
|
||||
0x04, 0x81, 0xBC, 0x30, 0x81, 0xB9, 0x80, 0x14, 0x5D, 0x5D, 0x26, 0xEF,
|
||||
0xAC, 0x7E, 0x36, 0xF9, 0x9B, 0x76, 0x15, 0x2B, 0x4A, 0x25, 0x02, 0x23,
|
||||
0xEF, 0xB2, 0x89, 0x30, 0xA1, 0x81, 0x95, 0xA4, 0x81, 0x92, 0x30, 0x81,
|
||||
0x8F, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
|
||||
0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C,
|
||||
0x0A, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31,
|
||||
0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x53, 0x65,
|
||||
0x61, 0x74, 0x74, 0x6C, 0x65, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55,
|
||||
0x04, 0x0A, 0x0C, 0x07, 0x45, 0x6C, 0x69, 0x70, 0x74, 0x69, 0x63, 0x31,
|
||||
0x0C, 0x30, 0x0A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x03, 0x45, 0x43,
|
||||
0x43, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F,
|
||||
0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E,
|
||||
0x63, 0x6F, 0x6D, 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48,
|
||||
0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F,
|
||||
0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D,
|
||||
0x82, 0x09, 0x00, 0xEF, 0x46, 0xC7, 0xA4, 0x9B, 0xBB, 0x60, 0xD3, 0x30,
|
||||
0x0C, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01,
|
||||
0xFF, 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03,
|
||||
0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0xF1, 0xD0, 0xA6,
|
||||
0x3E, 0x83, 0x33, 0x24, 0xD1, 0x7A, 0x05, 0x5F, 0x1E, 0x0E, 0xBD, 0x7D,
|
||||
0x6B, 0x33, 0xE9, 0xF2, 0x86, 0xF3, 0xF3, 0x3D, 0xA9, 0xEF, 0x6A, 0x87,
|
||||
0x31, 0xB3, 0xB7, 0x7E, 0x50, 0x02, 0x21, 0x00, 0xF0, 0x60, 0xDD, 0xCE,
|
||||
0xA2, 0xDB, 0x56, 0xEC, 0xD9, 0xF4, 0xE4, 0xE3, 0x25, 0xD4, 0xB0, 0xC9,
|
||||
0x25, 0x7D, 0xCA, 0x7A, 0x5D, 0xBA, 0xC4, 0xB2, 0xF6, 0x7D, 0x04, 0xC7,
|
||||
0xBD, 0x62, 0xC9, 0x20 };
|
||||
|
||||
/* derived from wolfSSL/certs/ecc-key.der */
|
||||
|
||||
static const CPU_INT08U ecc_key_der_256[] = { 0x30, 0x77, 0x02, 0x01, 0x01,
|
||||
0x04, 0x20, 0x45, 0xB6, 0x69, 0x02, 0x73, 0x9C, 0x6C, 0x85, 0xA1, 0x38,
|
||||
0x5B, 0x72, 0xE8, 0xE8, 0xC7, 0xAC, 0xC4, 0x03, 0x8D, 0x53, 0x35, 0x04,
|
||||
0xFA, 0x6C, 0x28, 0xDC, 0x34, 0x8D, 0xE1, 0xA8, 0x09, 0x8C, 0xA0, 0x0A,
|
||||
0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0xA1, 0x44,
|
||||
0x03, 0x42, 0x00, 0x04, 0xBB, 0x33, 0xAC, 0x4C, 0x27, 0x50, 0x4A, 0xC6,
|
||||
0x4A, 0xA5, 0x04, 0xC3, 0x3C, 0xDE, 0x9F, 0x36, 0xDB, 0x72, 0x2D, 0xCE,
|
||||
0x94, 0xEA, 0x2B, 0xFA, 0xCB, 0x20, 0x09, 0x39, 0x2C, 0x16, 0xE8, 0x61,
|
||||
0x02, 0xE9, 0xAF, 0x4D, 0xD3, 0x02, 0x93, 0x9A, 0x31, 0x5B, 0x97, 0x92,
|
||||
0x21, 0x7F, 0xF0, 0xCF, 0x18, 0xDA, 0x91, 0x11, 0x02, 0x34, 0x86, 0xE8,
|
||||
0x20, 0x58, 0x33, 0x0B, 0x80, 0x34, 0x89, 0xD8 };
|
||||
|
||||
|
||||
int wolfssl_server_test(void)
|
||||
{
|
||||
NET_ERR err;
|
||||
NET_SOCK_ID sock_listen;
|
||||
NET_SOCK_ID sock_req;
|
||||
NET_SOCK_ADDR_IPv4 server_addr;
|
||||
NET_SOCK_ADDR_LEN server_addr_len;
|
||||
NET_SOCK_ADDR_IPv4 client_sock_addr_ip;
|
||||
NET_SOCK_ADDR_LEN client_sock_addr_ip_size;
|
||||
CPU_CHAR rx_buf[RX_BUF_SIZE];
|
||||
CPU_CHAR tx_buf[TX_BUF_SIZE];
|
||||
CPU_BOOLEAN attempt_conn;
|
||||
OS_ERR os_err;
|
||||
WOLFSSL * ssl;
|
||||
WOLFSSL_CTX * ctx;
|
||||
int tx_buf_sz = 0, ret = 0, error = 0;
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* wolfSSL INIT and CTX SETUP */
|
||||
|
||||
wolfSSL_Init();
|
||||
|
||||
/* SET UP NETWORK SOCKET */
|
||||
|
||||
APP_TRACE_INFO(("Opening network socket...\r\n"));
|
||||
sock_listen = NetSock_Open(NET_SOCK_ADDR_FAMILY_IP_V4,
|
||||
NET_SOCK_TYPE_STREAM,
|
||||
NET_SOCK_PROTOCOL_TCP,
|
||||
&err);
|
||||
if (err != NET_SOCK_ERR_NONE) {
|
||||
APP_TRACE_INFO(("ERROR: NetSock_Open, err = %d\r\n", (int) err));
|
||||
return -1;
|
||||
}
|
||||
|
||||
APP_TRACE_INFO(("Clearing memory for server_addr struct\r\n"));
|
||||
server_addr_len = sizeof(server_addr);
|
||||
Mem_Clr((void *) &server_addr, (CPU_SIZE_T) server_addr_len);
|
||||
|
||||
APP_TRACE_INFO(("Setting up server_addr struct\r\n"));
|
||||
server_addr.AddrFamily = NET_SOCK_ADDR_FAMILY_IP_V4;
|
||||
server_addr.Addr = NET_UTIL_HOST_TO_NET_32(NET_SOCK_ADDR_IP_V4_WILDCARD);
|
||||
server_addr.Port = NET_UTIL_HOST_TO_NET_16(TLS_SERVER_PORT);
|
||||
|
||||
NetSock_Bind((NET_SOCK_ID) sock_listen,
|
||||
(NET_SOCK_ADDR*) &server_addr,
|
||||
(NET_SOCK_ADDR_LEN) NET_SOCK_ADDR_SIZE,
|
||||
(NET_ERR*) &err);
|
||||
if (err != NET_SOCK_ERR_NONE) {
|
||||
APP_TRACE_INFO(("ERROR: NetSock_Bind, err = %d\r\n", (int) err));
|
||||
NetSock_Close(sock_listen, &err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method());
|
||||
if (ctx == 0) {
|
||||
APP_TRACE_INFO(("ERROR: wolfSSL_CTX_new failed\r\n"));
|
||||
NetSock_Close(sock_listen, &err);
|
||||
return -1;
|
||||
}
|
||||
APP_TRACE_INFO(("wolfSSL_CTX_new done\r\n"));
|
||||
|
||||
ret = wolfSSL_CTX_use_certificate_buffer(ctx,
|
||||
server_ecc_der_256,
|
||||
sizeof(server_ecc_der_256),
|
||||
SSL_FILETYPE_ASN1);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
APP_TRACE_INFO(
|
||||
("ERROR: wolfSSL_CTX_use_certificate_buffer() failed\r\n"));
|
||||
NetSock_Close(sock_listen, &err);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx,
|
||||
ecc_key_der_256,
|
||||
sizeof(ecc_key_der_256),
|
||||
SSL_FILETYPE_ASN1);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
APP_TRACE_INFO(
|
||||
("ERROR: wolfSSL_CTX_use_PrivateKey_buffer() failed\r\n"));
|
||||
NetSock_Close(sock_listen, &err);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
/* accept client socket connections */
|
||||
|
||||
APP_TRACE_INFO(("Listening for client connection\r\n"));
|
||||
|
||||
NetSock_Listen(sock_listen, TCP_SERVER_CONN_Q_SIZE, &err);
|
||||
if (err != NET_SOCK_ERR_NONE) {
|
||||
APP_TRACE_INFO(("ERROR: NetSock_Listen, err = %d\r\n", (int) err));
|
||||
NetSock_Close(sock_listen, &err);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
do {
|
||||
client_sock_addr_ip_size = sizeof(client_sock_addr_ip);
|
||||
sock_req = NetSock_Accept((NET_SOCK_ID) sock_listen,
|
||||
(NET_SOCK_ADDR*) &client_sock_addr_ip,
|
||||
(NET_SOCK_ADDR_LEN*) &client_sock_addr_ip_size,
|
||||
(NET_ERR*) &err);
|
||||
switch (err) {
|
||||
case NET_SOCK_ERR_NONE:
|
||||
attempt_conn = DEF_NO;
|
||||
break;
|
||||
case NET_ERR_INIT_INCOMPLETE:
|
||||
case NET_SOCK_ERR_NULL_PTR:
|
||||
case NET_SOCK_ERR_NONE_AVAIL:
|
||||
case NET_SOCK_ERR_CONN_ACCEPT_Q_NONE_AVAIL:
|
||||
attempt_conn = DEF_YES;
|
||||
break;
|
||||
case NET_SOCK_ERR_CONN_SIGNAL_TIMEOUT:
|
||||
APP_TRACE_INFO(
|
||||
("NetSockAccept err = NET_SOCK_ERR_CONN_SIGNAL_TIMEOUT\r\n"));
|
||||
attempt_conn = DEF_YES;
|
||||
break;
|
||||
default:
|
||||
attempt_conn = DEF_NO;
|
||||
break;
|
||||
}
|
||||
} while (attempt_conn == DEF_YES);
|
||||
if (err != NET_SOCK_ERR_NONE) {
|
||||
APP_TRACE_INFO(("ERROR: NetSock_Accept, err = %d\r\n", (int) err));
|
||||
NetSock_Close(sock_listen, &err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
APP_TRACE_INFO(("Got client connection! Starting TLS negotiation\r\n"));
|
||||
/* set up wolfSSL session */
|
||||
if ((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
APP_TRACE_INFO(("ERROR: wolfSSL_new() failed\r\n"));
|
||||
NetSock_Close(sock_req, &err);
|
||||
NetSock_Close(sock_listen, &err);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
APP_TRACE_INFO(("wolfSSL_new done\r\n"));
|
||||
ret = wolfSSL_set_fd(ssl, sock_req);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
APP_TRACE_INFO(("ERROR: wolfSSL_set_fd() failed\r\n"));
|
||||
NetSock_Close(sock_req, &err);
|
||||
NetSock_Close(sock_listen, &err);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
APP_TRACE_INFO(("wolfSSL_set_fd done\r\n"));
|
||||
do {
|
||||
error = 0; /* reset error */
|
||||
if (ret != SSL_SUCCESS) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
APP_TRACE_INFO(
|
||||
("ERROR: wolfSSL_accept() failed, err = %d\r\n", error));
|
||||
if (error != SSL_ERROR_WANT_READ) {
|
||||
NetSock_Close(sock_req, &err);
|
||||
NetSock_Close(sock_listen, &err);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
OSTimeDlyHMSM(0u, 0u, 0u, 500u, OS_OPT_TIME_HMSM_STRICT, &os_err);
|
||||
}
|
||||
} while ((ret != SSL_SUCCESS) && (error == SSL_ERROR_WANT_READ));
|
||||
|
||||
APP_TRACE_INFO(("wolfSSL_accept() ok...\r\n"));
|
||||
|
||||
/* read client data */
|
||||
|
||||
error = 0;
|
||||
Mem_Set(rx_buf, 0, RX_BUF_SIZE);
|
||||
ret = wolfSSL_read(ssl, rx_buf, RX_BUF_SIZE - 1);
|
||||
if (ret < 0) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (error != SSL_ERROR_WANT_READ) {
|
||||
APP_TRACE_INFO(("wolfSSL_read failed, error = %d\r\n", error));
|
||||
NetSock_Close(sock_req, &err);
|
||||
NetSock_Close(sock_listen, &err);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
APP_TRACE_INFO(("AFTER wolfSSL_read() call, ret = %d\r\n", ret));
|
||||
if (ret > 0) {
|
||||
rx_buf[ret] = 0;
|
||||
APP_TRACE_INFO(("Client sent: %s\r\n", rx_buf));
|
||||
}
|
||||
/* write response to client */
|
||||
Mem_Set(tx_buf, 0, TX_BUF_SIZE);
|
||||
tx_buf_sz = 22;
|
||||
Str_Copy_N(tx_buf, "I hear ya fa shizzle!\n", tx_buf_sz);
|
||||
if (wolfSSL_write(ssl, tx_buf, tx_buf_sz) != tx_buf_sz) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
APP_TRACE_INFO(("ERROR: wolfSSL_write() failed, err = %d\r\n", error));
|
||||
NetSock_Close(sock_req, &err);
|
||||
NetSock_Close(sock_listen, &err);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
ret = wolfSSL_shutdown(ssl);
|
||||
if (ret == SSL_SHUTDOWN_NOT_DONE)
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
NetSock_Close(sock_req, &err);
|
||||
NetSock_Close(sock_listen, &err);
|
||||
return 0;
|
||||
}
|
||||
35
IDE/ECLIPSE/MICRIUM/server_wolfssl.h
Normal file
35
IDE/ECLIPSE/MICRIUM/server_wolfssl.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/* server_wolfssl.h
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef __SERVER_WOLFSSL_H__
|
||||
#define __SERVER_WOLFSSL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int wolfssl_server_test(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* SERVER_WOLFSSL_H */
|
||||
75
IDE/ECLIPSE/MICRIUM/user_settings.h
Normal file
75
IDE/ECLIPSE/MICRIUM/user_settings.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/* user_setting.h
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef MICRIUM_USER_SETTINGS_H_
|
||||
#define MICRIUM_USER_SETTINGS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MICRIUM
|
||||
|
||||
/* You can select one or all of the following tests */
|
||||
#define WOLFSSL_WOLFCRYPT_TEST
|
||||
#define WOLFSSL_BENCHMARK_TEST
|
||||
#define WOLFSSL_CLIENT_TEST
|
||||
#define WOLFSSL_SERVER_TEST
|
||||
|
||||
/* adjust CURRENT_UNIX_TS to seconds since Jan 01 1970. (UTC)
|
||||
You can get the current time from https://www.unixtimestamp.com/
|
||||
*/
|
||||
#define CURRENT_UNIX_TS 1542605837
|
||||
|
||||
/* When using Windows simulator, you must define USE_WINDOWS_API for test.h to build */
|
||||
#ifdef _WIN32
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
#define NO_FILESYSTEM
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* prevents from including multiple definition of main() */
|
||||
#define NO_MAIN_DRIVER
|
||||
#define NO_TESTSUITE_MAIN_DRIVER
|
||||
|
||||
/* includes certificate test buffers via header files */
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
/*use kB instead of mB for embedded benchmarking*/
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITE_TEMP_FILES
|
||||
|
||||
#define XSNPRINTF snprintf
|
||||
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_SHA512
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
#define ED25519_SMALL
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
80
IDE/ECLIPSE/MICRIUM/wolfsslRunTests.c
Normal file
80
IDE/ECLIPSE/MICRIUM/wolfsslRunTests.c
Normal file
@@ -0,0 +1,80 @@
|
||||
/* wolfsslRunTests.c
|
||||
*
|
||||
* Copyright (C) 2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <includes.h> /* master includes from Micrium Freescale Kinetis K70*/
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
/*
|
||||
* Description : This function runs wolfssl tests.
|
||||
* Caller(s) : main() in app.c
|
||||
* Note(s) : none.
|
||||
*/
|
||||
|
||||
int wolfsslRunTests (void)
|
||||
{
|
||||
CLK_ERR err;
|
||||
CLK_TS_SEC ts_unix_sec;
|
||||
CPU_BOOLEAN valid;
|
||||
static int initialized = 0;
|
||||
|
||||
if(!initialized) {
|
||||
Clk_Init(&err);
|
||||
|
||||
if (err == CLK_ERR_NONE) {
|
||||
APP_TRACE_INFO(("Clock module successfully initialized\n"));
|
||||
} else {
|
||||
APP_TRACE_INFO(("Clock module initialization failed\n"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
valid = Clk_GetTS_Unix(&ts_unix_sec);
|
||||
|
||||
if (valid == DEF_OK) {
|
||||
APP_TRACE_INFO(("Timestamp Unix = %u\n", ts_unix_sec));
|
||||
} else {
|
||||
APP_TRACE_INFO(("Get TS Unix error\n"));
|
||||
}
|
||||
#if defined(CURRENT_UNIX_TS)
|
||||
valid = Clk_SetTS_Unix(CURRENT_UNIX_TS);
|
||||
if (valid != DEF_OK) {
|
||||
APP_TRACE_INFO(("Clk_SetTS_Unix error\n"));
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_WOLFCRYPT_TEST)
|
||||
wolfcrypt_test(NULL);
|
||||
#endif
|
||||
#if defined(WOLFSSL_BENCHMARK_TEST)
|
||||
benchmark_test(NULL);
|
||||
#endif
|
||||
#if defined(WOLFSSL_CLIENT_TEST)
|
||||
wolfssl_client_test();
|
||||
#endif
|
||||
#if defined(WOLFSSL_SERVER_TEST)
|
||||
wolfssl_server_test();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
35
IDE/Espressif/ESP-IDF/README.md
Normal file
35
IDE/Espressif/ESP-IDF/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# ESP-IDF port
|
||||
## Overview
|
||||
ESP-IDF development framework with wolfSSL by setting *WOLFSSL_ESPIDF* definition
|
||||
|
||||
Including the following examples:
|
||||
|
||||
* simple tls_client/server
|
||||
* crypt test
|
||||
* crypt benchmark
|
||||
|
||||
The *user_settings.h* file enables some of the hardened settings.
|
||||
|
||||
## Requirements
|
||||
1. ESP-IDF development framework
|
||||
[https://docs.espressif.com/projects/esp-idf/en/latest/get-started/]
|
||||
|
||||
Note: This expects to use Linux version.
|
||||
|
||||
## Setup
|
||||
1. Run *setup.sh* to deploy files into ESP-IDF tree
|
||||
2. Find Wolfssl files at /path/to/esp-idf/components/wolfssl/
|
||||
3. Find Example programs under /path/to/esp-idf/examples/protocols/wolfssl_xxx
|
||||
4. Uncomment out #define WOLFSSL_ESPIDF in /path/to/wolfssl/wolfssl/wolfcrypt/settings.h
|
||||
Uncomment out #define WOLFSSL_ESPWROOM32 in /path/to/wolfssl/wolfssl/wolfcrypt/settings.h
|
||||
|
||||
## Configuration
|
||||
1. The *user_settings.h* can be found in /path/to/esp-idf/components/wolfssl/include/user_settings.h
|
||||
|
||||
## Build examples
|
||||
1. See README in each example folder
|
||||
|
||||
## Support
|
||||
For question please email [support@wolfssl.com]
|
||||
|
||||
Note: This is tested with "Ubuntu 18.04.1 LTS" and ESP32-WROOM-32.
|
||||
42
IDE/Espressif/ESP-IDF/README_esp32.md
Normal file
42
IDE/Espressif/ESP-IDF/README_esp32.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# DEMO program with ATECC608A on ESP-WROOM-32SE
|
||||
## Overview
|
||||
Running demo programs with ATECC608A on 32SE by setting *WOLFSSL_ESPWROOM32SE* definition
|
||||
|
||||
Including the following examples:
|
||||
|
||||
* simple tls_client/tls_server
|
||||
* crypt benchmark
|
||||
|
||||
The *user_settings.h* file enables some of the hardened settings.
|
||||
|
||||
## Requirements
|
||||
1. ESP-IDF development framework
|
||||
[https://docs.espressif.com/projects/esp-idf/en/latest/get-started/]
|
||||
|
||||
2. Microchip CryptoAuthentication Library
|
||||
[https://github.com/MicrochipTech/cryptoauthlib]
|
||||
|
||||
## Setup
|
||||
1. wolfSSL under ESP-IDF. Please see [README.md](https://github.com/wolfSSL/wolfssl/blob/master/IDE/Espressif/ESP-IDF/README.md)
|
||||
2. CryptoAuthentication Library under ESP-IDF. Please see [README.md](https://github.com/miyazakh/cryptoauthlib_esp_idf/blob/master/README.md)
|
||||
|
||||
3. Uncomment out #define WOLFSSL_ESPWROOM32SE in /path/to/wolfssl/wolfssl/wolfcrypt/settings.h
|
||||
|
||||
Note : Need to enable WOLFSSL_ESPIDF
|
||||
Note : crypt test will fail if enabled WOLFSSL_ESPWROOM32SE
|
||||
|
||||
## Configuration
|
||||
1. The *user_settings.h* can be found in /path/to/esp-idf/components/wolfssl/include/user_settings.h
|
||||
|
||||
## Build examples
|
||||
1. See README in each example folder
|
||||
|
||||
## Support
|
||||
For question please email [support@wolfssl.com]
|
||||
|
||||
Note: This is tested with the following condition:
|
||||
|
||||
- Model : ESP32-WROOM-32SE
|
||||
- ESP-IDF : v3.3-beta1-39-g6cb37ecc5(commit hash : 6cb37ecc5)
|
||||
- CryptAuthLib: commit hash : c6b176e
|
||||
- OS : Ubuntu 18.04.1 LTS (Bionic Beaver)
|
||||
@@ -0,0 +1,6 @@
|
||||
# The following lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(wolfssl_benchmark)
|
||||
11
IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/Makefile
Normal file
11
IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
|
||||
# project subdirectory.
|
||||
#
|
||||
|
||||
PROJECT_NAME := wolfssl_benchmark
|
||||
|
||||
CFLAGS += -DWOLFSSL_USER_SETTINGS
|
||||
|
||||
include $(IDF_PATH)/make/project.mk
|
||||
|
||||
16
IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/README.md
Normal file
16
IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
#wolfSSL Example
|
||||
|
||||
The Example contains of wolfSSL benchmark program.
|
||||
|
||||
1. "make menuconfig" to configure the program.
|
||||
1-1. Example Configuration ->
|
||||
|
||||
BENCH_ARG : argument that you want to use. Default is "-lng 0"
|
||||
The list of argument can be find in help.
|
||||
|
||||
When you want to run the benchmark program
|
||||
|
||||
1. "make flash" to compile and load the firmware
|
||||
2. "make monitor" to see the message
|
||||
|
||||
See the README.md file in the upper level 'examples' directory for more information about examples.
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
#
|
||||
# wolfssl benchmark test
|
||||
#
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
|
||||
set(COMPONENT_SRCS "benchmark.c" "helper.c")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
||||
|
||||
register_component()
|
||||
@@ -0,0 +1,29 @@
|
||||
menu "Example Configuration"
|
||||
|
||||
config BENCH_ARGV
|
||||
string "Arguments for benchmark test"
|
||||
default "-lng 0"
|
||||
help
|
||||
-? <num> Help, print this usage
|
||||
0: English, 1: Japanese
|
||||
-csv Print terminal output in csv format
|
||||
-base10 Display bytes as power of 10 (eg 1 kB = 1000 Bytes)
|
||||
-no_aad No additional authentication data passed.
|
||||
-dgst_full Full digest operation performed.
|
||||
-rsa_sign Measure RSA sign/verify instead of encrypt/decrypt.
|
||||
-<alg> Algorithm to benchmark. Available algorithms include:
|
||||
cipher aes-cbc aes-gcm chacha20 chacha20-poly1305
|
||||
digest md5 poly1305 sha sha2 sha224 sha256 sha384 sha512 sha3
|
||||
sha3-224 sha3-256 sha3-384 sha3-512
|
||||
mac hmac hmac-md5 hmac-sha hmac-sha224 hmac-sha256 hmac-sha384
|
||||
hmac-sha512
|
||||
asym rsa rsa-sz dh ecc-kg ecc
|
||||
other rng
|
||||
-lng <num> Display benchmark result by specified language.
|
||||
0: English, 1: Japanese
|
||||
<num> Size of block in bytes
|
||||
|
||||
e.g -lng 1
|
||||
e.g sha
|
||||
|
||||
endmenu
|
||||
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# Main component makefile.
|
||||
#
|
||||
# This Makefile can be left empty. By default, it will take the sources in the
|
||||
# src/ directory, compile them and link them into lib(subdirectory_name).a
|
||||
# in the build directory. This behaviour is entirely configurable,
|
||||
# please read the ESP-IDF documents if you need to do this.
|
||||
#
|
||||
196
IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/helper.c
Normal file
196
IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/helper.c
Normal file
@@ -0,0 +1,196 @@
|
||||
/* helper.c
|
||||
*
|
||||
* Copyright (C) 2006-2019 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "esp_log.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
#define WOLFSSL_BENCH_ARGV CONFIG_BENCH_ARGV
|
||||
#define WOLFSSLBENCHMARK_TASK_NAME "wolfsslbenchmark_name"
|
||||
#define WOLFSSLBENCHMARK_TASK_WORDS 10240
|
||||
#define WOLFSSLBENCHMARK_TASK_PRIORITY 8
|
||||
|
||||
/* proto-type */
|
||||
extern void wolf_benchmark_task();
|
||||
|
||||
static const char* const TAG = "wolfbenchmark";
|
||||
|
||||
char* __argv[22];
|
||||
|
||||
#if defined(WOLFSSL_ESPWROOM32SE) && defined(HAVE_PK_CALLBACKS) \
|
||||
&& defined(WOLFSSL_ATECC508A)
|
||||
|
||||
#include "wolfssl/wolfcrypt/port/atmel/atmel.h"
|
||||
|
||||
/* when you need to use a custom slot allocation, */
|
||||
/* enable the definition CUSTOM_SLOT_ALLOCAION. */
|
||||
#if defined(CUSTOM_SLOT_ALLOCATION)
|
||||
|
||||
static byte mSlotList[ATECC_MAX_SLOT];
|
||||
|
||||
/* initialize slot array */
|
||||
void my_atmel_slotInit()
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i=0;i<ATECC_MAX_SLOT; i++) {
|
||||
mSlotList[i] = ATECC_INVALID_SLOT;
|
||||
}
|
||||
}
|
||||
|
||||
/* allocate slot depending on slotType */
|
||||
int my_atmel_alloc(int slotType)
|
||||
{
|
||||
int i, slot = -1;
|
||||
|
||||
ESP_LOGI(TAG, "Enter my_atmel_alloc");
|
||||
|
||||
switch(slotType){
|
||||
case ATMEL_SLOT_ENCKEY:
|
||||
slot = 4;
|
||||
break;
|
||||
case ATMEL_SLOT_DEVICE:
|
||||
slot = 0;
|
||||
break;
|
||||
case ATMEL_SLOT_ECDHE:
|
||||
slot = 2;
|
||||
break;
|
||||
case ATMEL_SLOT_ECDHE_ENC:
|
||||
slot = 4;
|
||||
break;
|
||||
case ATMEL_SLOT_ANY:
|
||||
for(i=0;i<ATECC_MAX_SLOT;i++){
|
||||
if(mSlotList[i] == ATECC_INVALID_SLOT){
|
||||
slot = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "Leave my_atmel_alloc\n");
|
||||
|
||||
return slot;
|
||||
}
|
||||
|
||||
/* free slot array */
|
||||
void my_atmel_free(int slotId)
|
||||
{
|
||||
ESP_LOGI(TAG, "Enter my_atmel_alloc");
|
||||
|
||||
if(slotId >= 0 && slotId < ATECC_MAX_SLOT){
|
||||
mSlotList[slotId] = ATECC_INVALID_SLOT;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "Leave my_atmel_alloc");
|
||||
|
||||
}
|
||||
|
||||
#endif /* CUSTOM_SLOT_ALLOCATION */
|
||||
#endif /* WOLFSSL_ESPWROOM32SE && HAVE_PK_CALLBACK && WOLFSSL_ATECC508A */
|
||||
|
||||
int construct_argv()
|
||||
{
|
||||
int cnt = 0;
|
||||
int i = 0;
|
||||
int len = 0;
|
||||
char *_argv; /* buffer for copying the string */
|
||||
char *ch; /* char pointer to trace the string */
|
||||
char buff[16] = { 0 }; /* buffer for a argument copy */
|
||||
|
||||
printf("arg:%s\n", CONFIG_BENCH_ARGV);
|
||||
len = strlen(CONFIG_BENCH_ARGV);
|
||||
_argv = (char*)malloc(len + 1);
|
||||
if (!_argv) {
|
||||
return -1;
|
||||
}
|
||||
memset(_argv, 0, len+1);
|
||||
memcpy(_argv, CONFIG_BENCH_ARGV, len);
|
||||
_argv[len] = '\0';
|
||||
ch = _argv;
|
||||
|
||||
__argv[cnt] = malloc(10);
|
||||
sprintf(__argv[cnt], "benchmark");
|
||||
__argv[9] = '\0';
|
||||
cnt = 1;
|
||||
|
||||
while (*ch != '\0')
|
||||
{
|
||||
/* skip white-space */
|
||||
while (*ch == ' ') { ++ch; }
|
||||
|
||||
memset(buff, 0, sizeof(buff));
|
||||
/* copy each args into buffer */
|
||||
i = 0;
|
||||
while ((*ch != ' ') && (*ch != '\0') && (i < 16)) {
|
||||
buff[i] = *ch;
|
||||
++i;
|
||||
++ch;
|
||||
}
|
||||
/* copy the string into argv */
|
||||
__argv[cnt] = (char*)malloc(i + 1);
|
||||
memset(__argv[cnt], 0, i + 1);
|
||||
memcpy(__argv[cnt], buff, i + 1);
|
||||
/* next args */
|
||||
++cnt;
|
||||
}
|
||||
|
||||
free(_argv);
|
||||
|
||||
return (cnt);
|
||||
}
|
||||
|
||||
/* entry point */
|
||||
void app_main(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "Start app_main...");
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
|
||||
#ifndef NO_CRYPT_BENCHMARK
|
||||
|
||||
/* when using atecc608a on esp32-wroom-32se */
|
||||
#if defined(WOLFSSL_ESPWROOM32SE) && defined(HAVE_PK_CALLBACKS) \
|
||||
&& defined(WOLFSSL_ATECC508A)
|
||||
#if defined(CUSTOM_SLOT_ALLOCATION)
|
||||
ESP_LOGI(TAG, "register callback for slot allocation");
|
||||
my_atmel_slotInit();
|
||||
/* to register the callback, it needs to be initialized. */
|
||||
benchmark_init();
|
||||
atmel_set_slot_allocator(my_atmel_alloc, my_atmel_free);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ESP_LOGI(TAG, "Start benchmark..");
|
||||
wolf_benchmark_task();
|
||||
|
||||
#else
|
||||
ESP_LOGI(TAG, "no crypt benchmark");
|
||||
|
||||
#endif /* NO_CRYPT_BENCHMARK */
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
CONFIG_BENCH_ARGV="-lng 0"
|
||||
CONFIG_MAIN_TASK_STACK_SIZE=5000
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
|
||||
170 CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
|
||||
@@ -0,0 +1,6 @@
|
||||
# The following lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(wolfssl_client)
|
||||
11
IDE/Espressif/ESP-IDF/examples/wolfssl_client/Makefile
Normal file
11
IDE/Espressif/ESP-IDF/examples/wolfssl_client/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
|
||||
# project subdirectory.
|
||||
#
|
||||
|
||||
PROJECT_NAME := wolfssl_client
|
||||
|
||||
CFLAGS += -DWOLFSSL_USER_SETTINGS
|
||||
|
||||
include $(IDF_PATH)/make/project.mk
|
||||
|
||||
22
IDE/Espressif/ESP-IDF/examples/wolfssl_client/README.md
Normal file
22
IDE/Espressif/ESP-IDF/examples/wolfssl_client/README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
#wolfSSL Example
|
||||
|
||||
The Example contains of wolfSSL tls client demo.
|
||||
|
||||
1. "make menuconfig" to config the project
|
||||
1-1. Example Configuration ->
|
||||
|
||||
WIFI SSID: your own WIFI, which is connected to the Internet.(default is "myssid")
|
||||
WIFI Password: WIFI password, and default is "mypassword"
|
||||
Target host ip address : the host that you want to connect to.(default is 127.0.0.1)
|
||||
|
||||
Note: the example program uses 11111 port. If you want to use different port
|
||||
, you need to modifiy DEFAULT_PORT definition in the code.
|
||||
|
||||
When you want to test the wolfSSL client
|
||||
|
||||
1. "make falsh monitor" to load the firmware and see the context
|
||||
2. You can use <wolfssl>/examples/server/server program for test.
|
||||
|
||||
e.g. Launch ./examples/server/server -v 4 -b -i
|
||||
|
||||
See the README.md file in the upper level 'examples' directory for more information about examples.
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
#
|
||||
# wolfssl client test
|
||||
#
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
|
||||
set(COMPONENT_SRCS "client-tls.c" "wifi_connect.c")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS "." "./include")
|
||||
|
||||
register_component()
|
||||
@@ -0,0 +1,21 @@
|
||||
menu "Example Configuration"
|
||||
|
||||
config WIFI_SSID
|
||||
string "WiFi SSID"
|
||||
default "myssid"
|
||||
help
|
||||
SSID (network name) for the example to connect to.
|
||||
|
||||
config WIFI_PASSWORD
|
||||
string "WiFi Password"
|
||||
default "mypassword"
|
||||
help
|
||||
WiFi password (WPA or WPA2) for the example to use.
|
||||
|
||||
config TARGET_HOST
|
||||
string "Target host"
|
||||
default "127.0.01.1"
|
||||
help
|
||||
host address for the example to connect
|
||||
|
||||
endmenu
|
||||
290
IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c
Normal file
290
IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c
Normal file
@@ -0,0 +1,290 @@
|
||||
/* client-tls-callback.c
|
||||
*
|
||||
* Copyright (C) 2006-2019 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL. (formerly known as CyaSSL)
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
/* the usual suspects */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* ESP specific */
|
||||
#include "wifi_connect.h"
|
||||
|
||||
/* socket includes */
|
||||
#include "lwip/netdb.h"
|
||||
#include "lwip/sockets.h"
|
||||
|
||||
/* wolfSSL */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#ifdef WOLFSSL_TRACK_MEMORY
|
||||
#include <wolfssl/wolfcrypt/mem_track.h>
|
||||
#endif
|
||||
|
||||
static const char* const TAG = "tls_client";
|
||||
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
|
||||
static void ShowCiphers(void)
|
||||
{
|
||||
char ciphers[4096];
|
||||
|
||||
int ret = wolfSSL_get_ciphers(ciphers, (int)sizeof(ciphers));
|
||||
|
||||
if (ret == WOLFSSL_SUCCESS)
|
||||
printf("%s\n", ciphers);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_ESPWROOM32SE) && defined(HAVE_PK_CALLBACKS) \
|
||||
&& defined(WOLFSSL_ATECC508A)
|
||||
|
||||
#include "wolfssl/wolfcrypt/port/atmel/atmel.h"
|
||||
|
||||
/* when you want to use custome slot allocation */
|
||||
/* enable the definition CUSTOM_SLOT_ALLOCATION.*/
|
||||
|
||||
#if defined(CUSTOM_SLOT_ALLOCATION)
|
||||
|
||||
static byte mSlotList[ATECC_MAX_SLOT];
|
||||
|
||||
int atmel_set_slot_allocator(atmel_slot_alloc_cb alloc,
|
||||
atmel_slot_dealloc_cb dealloc);
|
||||
/* initialize slot array */
|
||||
void my_atmel_slotInit()
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i=0;i<ATECC_MAX_SLOT; i++) {
|
||||
mSlotList[i] = ATECC_INVALID_SLOT;
|
||||
}
|
||||
}
|
||||
/* allocate slot depending on slotType */
|
||||
int my_atmel_alloc(int slotType)
|
||||
{
|
||||
int i, slot = -1;
|
||||
|
||||
switch(slotType){
|
||||
case ATMEL_SLOT_ENCKEY:
|
||||
slot = 2;
|
||||
break;
|
||||
case ATMEL_SLOT_DEVICE:
|
||||
slot = 0;
|
||||
break;
|
||||
case ATMEL_SLOT_ECDHE:
|
||||
slot = 0;
|
||||
break;
|
||||
case ATMEL_SLOT_ECDHE_ENC:
|
||||
slot = 4;
|
||||
break;
|
||||
case ATMEL_SLOT_ANY:
|
||||
for(i=0;i<ATECC_MAX_SLOT;i++){
|
||||
if(mSlotList[i] == ATECC_INVALID_SLOT){
|
||||
slot = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return slot;
|
||||
}
|
||||
/* free slot array */
|
||||
void my_atmel_free(int slotId)
|
||||
{
|
||||
if(slotId >= 0 && slotId < ATECC_MAX_SLOT){
|
||||
mSlotList[slotId] = ATECC_INVALID_SLOT;
|
||||
}
|
||||
}
|
||||
#endif /* CUSTOM_SLOT_ALLOCATION */
|
||||
#endif /* WOLFSSL_ESPWROOM32SE && HAVE_PK_CALLBACK && WOLFSSL_ATECC508A */
|
||||
|
||||
/* client task */
|
||||
void tls_smp_client_task()
|
||||
{
|
||||
int ret;
|
||||
int sockfd;
|
||||
int doPeerCheck;
|
||||
int sendGet;
|
||||
struct sockaddr_in servAddr;
|
||||
char buff[256];
|
||||
const char* ch = TLS_SMP_TARGET_HOST;
|
||||
size_t len;
|
||||
struct hostent *hp;
|
||||
struct ip4_addr *ip4_addr;
|
||||
|
||||
/* declare wolfSSL objects */
|
||||
WOLFSSL_CTX *ctx;
|
||||
WOLFSSL *ssl;
|
||||
|
||||
WOLFSSL_ENTER("tls_smp_client_task");
|
||||
|
||||
doPeerCheck = 0;
|
||||
sendGet = 0;
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
WOLFSSL_MSG("Debug ON");
|
||||
wolfSSL_Debugging_ON();
|
||||
ShowCiphers();
|
||||
#endif
|
||||
/* Initialize wolfSSL */
|
||||
wolfSSL_Init();
|
||||
|
||||
/* Create a socket that uses an internet IPv4 address,
|
||||
* Sets the socket to be stream based (TCP),
|
||||
* 0 means choose the default protocol. */
|
||||
if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
|
||||
ESP_LOGE(TAG,"ERROR: failed to create the socket\n");
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "get target IP address");
|
||||
|
||||
hp = gethostbyname(TLS_SMP_TARGET_HOST);
|
||||
if (!hp) {
|
||||
ESP_LOGE(TAG, "Failed to get host name.");
|
||||
ip4_addr = NULL;
|
||||
} else {
|
||||
|
||||
ip4_addr = (struct ip4_addr *)hp->h_addr;
|
||||
ESP_LOGI(TAG, IPSTR, IP2STR(ip4_addr));
|
||||
}
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((ctx = wolfSSL_CTX_new(wolfSSLv23_client_method())) == NULL) {
|
||||
ESP_LOGE(TAG,"ERROR: failed to create WOLFSSL_CTX\n");
|
||||
}
|
||||
WOLFSSL_MSG("Loading...cert");
|
||||
/* Load client certificates into WOLFSSL_CTX */
|
||||
if ((ret = wolfSSL_CTX_load_verify_buffer(ctx, ca_cert_der_2048,
|
||||
sizeof_ca_cert_der_2048, WOLFSSL_FILETYPE_ASN1)) != SSL_SUCCESS) {
|
||||
ESP_LOGE(TAG,"ERROR: failed to load %d, please check the file.\n",ret);
|
||||
}
|
||||
/* not peer check */
|
||||
if( doPeerCheck == 0 ){
|
||||
wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_NONE, 0);
|
||||
} else {
|
||||
WOLFSSL_MSG("Loading... our cert");
|
||||
/* load our certificate */
|
||||
if ((ret = wolfSSL_CTX_use_certificate_chain_buffer_format(ctx, client_cert_der_2048,
|
||||
sizeof_client_cert_der_2048, WOLFSSL_FILETYPE_ASN1)) != SSL_SUCCESS) {
|
||||
ESP_LOGE(TAG,"ERROR: failed to load chain %d, please check the file.\n",ret);
|
||||
}
|
||||
|
||||
if ((ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx, client_key_der_2048,
|
||||
sizeof_client_key_der_2048, WOLFSSL_FILETYPE_ASN1)) != SSL_SUCCESS) {
|
||||
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||
ESP_LOGE(TAG,"ERROR: failed to load key %d, please check the file.\n", ret);
|
||||
}
|
||||
|
||||
wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_PEER, 0);
|
||||
}
|
||||
|
||||
/* Initialize the server address struct with zeros */
|
||||
memset(&servAddr, 0, sizeof(servAddr));
|
||||
|
||||
/* Fill in the server address */
|
||||
servAddr.sin_family = AF_INET; /* using IPv4 */
|
||||
servAddr.sin_port = htons(DEFAULT_PORT); /* on DEFAULT_PORT */
|
||||
|
||||
if(*ch >= '1' && *ch <= '9') {
|
||||
/* Get the server IPv4 address from the command line call */
|
||||
WOLFSSL_MSG("inet_pton");
|
||||
if ((ret = inet_pton(AF_INET, TLS_SMP_TARGET_HOST,
|
||||
&servAddr.sin_addr)) != 1) {
|
||||
ESP_LOGE(TAG,"ERROR: invalid address ret=%d\n", ret);
|
||||
}
|
||||
} else {
|
||||
servAddr.sin_addr.s_addr = ip4_addr->addr;
|
||||
}
|
||||
|
||||
/* Connect to the server */
|
||||
sprintf(buff, "Connecting to server....%s(port:%d)", TLS_SMP_TARGET_HOST
|
||||
, DEFAULT_PORT);
|
||||
WOLFSSL_MSG(buff);
|
||||
printf("%s\n",buff);
|
||||
if ((ret = connect(sockfd, (struct sockaddr *)&servAddr,
|
||||
sizeof(servAddr))) == -1){
|
||||
ESP_LOGE(TAG,"ERROR: failed to connect ret=%d\n", ret);
|
||||
}
|
||||
|
||||
WOLFSSL_MSG("Create a WOLFSSL object");
|
||||
/* Create a WOLFSSL object */
|
||||
if ((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
ESP_LOGE(TAG,"ERROR: failed to create WOLFSSL object\n");
|
||||
}
|
||||
|
||||
/* when using atecc608a on esp32-wroom-32se */
|
||||
#if defined(WOLFSSL_ESPWROOM32SE) && defined(HAVE_PK_CALLBACKS) \
|
||||
&& defined(WOLFSSL_ATECC508A)
|
||||
atcatls_set_callbacks(ctx);
|
||||
/* when using custome slot-allocation */
|
||||
#if defined(CUSTOM_SLOT_ALLOCATION)
|
||||
my_atmel_slotInit();
|
||||
atmel_set_slot_allocator(my_atmel_alloc, my_atmel_free);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Attach wolfSSL to the socket */
|
||||
wolfSSL_set_fd(ssl, sockfd);
|
||||
|
||||
WOLFSSL_MSG("Connect to wolfSSL on the server side");
|
||||
/* Connect to wolfSSL on the server side */
|
||||
if (wolfSSL_connect(ssl) != SSL_SUCCESS) {
|
||||
ESP_LOGE(TAG,"ERROR: failed to connect to wolfSSL\n");
|
||||
}
|
||||
|
||||
/* Get a message for the server from stdin */
|
||||
WOLFSSL_MSG("Message for server: ");
|
||||
memset(buff, 0, sizeof(buff));
|
||||
|
||||
if(sendGet){
|
||||
printf("SSL connect ok, sending GET...\n");
|
||||
len = 28;
|
||||
strncpy(buff, "GET /index.html HTTP/1.0\r\n\r\n", 28);
|
||||
buff[len] = '\0';
|
||||
} else {
|
||||
sprintf(buff, "message from esp32 tls client\n");
|
||||
len = strnlen(buff, sizeof(buff));
|
||||
}
|
||||
/* Send the message to the server */
|
||||
if (wolfSSL_write(ssl, buff, len) != len) {
|
||||
ESP_LOGE(TAG,"ERROR: failed to write\n");
|
||||
}
|
||||
|
||||
/* Read the server data into our buff array */
|
||||
memset(buff, 0, sizeof(buff));
|
||||
if (wolfSSL_read(ssl, buff, sizeof(buff) - 1) == -1) {
|
||||
ESP_LOGE(TAG,"ERROR: failed to read\n");
|
||||
}
|
||||
|
||||
/* Print to stdout any data the server sends */
|
||||
printf("Server:");
|
||||
printf("%s", buff);
|
||||
/* Cleanup and return */
|
||||
wolfSSL_free(ssl); /* Free the wolfSSL object */
|
||||
wolfSSL_CTX_free(ctx); /* Free the wolfSSL context object */
|
||||
wolfSSL_Cleanup(); /* Cleanup the wolfSSL environment */
|
||||
close(sockfd); /* Close the connection to the server */
|
||||
|
||||
vTaskDelete(NULL);
|
||||
|
||||
return; /* Return reporting a success */
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# Main component makefile.
|
||||
#
|
||||
# This Makefile can be left empty. By default, it will take the sources in the
|
||||
# src/ directory, compile them and link them into lib(subdirectory_name).a
|
||||
# in the build directory. This behaviour is entirely configurable,
|
||||
# please read the ESP-IDF documents if you need to do this.
|
||||
#
|
||||
@@ -0,0 +1,38 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#ifndef _TLS_WIFI_H_
|
||||
#define _TLS_WIFI_H_
|
||||
|
||||
#include "esp_log.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_event_loop.h"
|
||||
|
||||
#define DEFAULT_PORT 11111
|
||||
|
||||
#define TLS_SMP_CLIENT_TASK_NAME "tls_client_example"
|
||||
#define TLS_SMP_CLIENT_TASK_WORDS 10240
|
||||
#define TLS_SMP_CLIENT_TASK_PRIORITY 8
|
||||
|
||||
#define TLS_SMP_WIFI_SSID CONFIG_WIFI_SSID
|
||||
#define TLS_SMP_WIFI_PASS CONFIG_WIFI_PASSWORD
|
||||
#define TLS_SMP_TARGET_HOST CONFIG_TARGET_HOST
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,146 @@
|
||||
/* wifi_connect.c
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
/*ESP specific */
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/event_groups.h"
|
||||
#include "wifi_connect.h"
|
||||
#include "lwip/sockets.h"
|
||||
#include "lwip/netdb.h"
|
||||
#include "lwip/apps/sntp.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
const static int CONNECTED_BIT = BIT0;
|
||||
static EventGroupHandle_t wifi_event_group;
|
||||
/* proto-type */
|
||||
extern void tls_smp_client_task();
|
||||
static void tls_smp_client_init();
|
||||
|
||||
const static char *TAG = "tls_client";
|
||||
|
||||
static EventGroupHandle_t wifi_event_group;
|
||||
extern void tls_smp_client_task();
|
||||
|
||||
static void set_time()
|
||||
{
|
||||
/* set dummy wallclock time. */
|
||||
struct timeval utctime;
|
||||
struct timezone tz;
|
||||
struct strftime_buf;
|
||||
time_t now;
|
||||
struct tm timeinfo;
|
||||
char strftime_buf[64];
|
||||
|
||||
utctime.tv_sec = 1542008020; /* dummy time: Mon Nov 12 07:33:40 2018 */
|
||||
utctime.tv_usec = 0;
|
||||
tz.tz_minuteswest = 0;
|
||||
tz.tz_dsttime = 0;
|
||||
|
||||
settimeofday(&utctime, &tz);
|
||||
|
||||
time(&now);
|
||||
localtime_r(&now, &timeinfo);
|
||||
|
||||
strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);
|
||||
ESP_LOGI(TAG, "The current date/time is: %s", strftime_buf);
|
||||
|
||||
/* wait until wifi connect */
|
||||
xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT,
|
||||
false, true, portMAX_DELAY);
|
||||
/* now we start client tasks. */
|
||||
tls_smp_client_init();
|
||||
}
|
||||
|
||||
/* create task */
|
||||
static void tls_smp_client_init(void)
|
||||
{
|
||||
int ret;
|
||||
xTaskHandle _handle;
|
||||
/* http://esp32.info/docs/esp_idf/html/dd/d3c/group__xTaskCreate.html */
|
||||
ret = xTaskCreate(tls_smp_client_task,
|
||||
TLS_SMP_CLIENT_TASK_NAME,
|
||||
TLS_SMP_CLIENT_TASK_WORDS,
|
||||
NULL,
|
||||
TLS_SMP_CLIENT_TASK_PRIORITY,
|
||||
&_handle);
|
||||
|
||||
if (ret != pdPASS) {
|
||||
ESP_LOGI(TAG, "create thread %s failed", TLS_SMP_CLIENT_TASK_NAME);
|
||||
}
|
||||
}
|
||||
/* event hander for wifi events */
|
||||
static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
|
||||
{
|
||||
switch (event->event_id)
|
||||
{
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "got ip:%s",
|
||||
ip4addr_ntoa(&event->event_info.got_ip.ip_info.ip));
|
||||
/* http://esp32.info/docs/esp_idf/html/dd/d08/group__xEventGroupSetBits.html */
|
||||
xEventGroupSetBits(wifi_event_group, CONNECTED_BIT);
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
esp_wifi_connect();
|
||||
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
/* entry point */
|
||||
void app_main(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "Start app_main...");
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
|
||||
ESP_LOGI(TAG, "Initialize wifi");
|
||||
/* TCP/IP adapter initialization */
|
||||
tcpip_adapter_init();
|
||||
|
||||
/* */
|
||||
wifi_event_group = xEventGroupCreate();
|
||||
ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL));
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
|
||||
|
||||
wifi_config_t wifi_config = {
|
||||
.sta = {
|
||||
.ssid = TLS_SMP_WIFI_SSID,
|
||||
.password = TLS_SMP_WIFI_PASS,
|
||||
},
|
||||
};
|
||||
/* WiFi station mode */
|
||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
|
||||
/* Wifi Set the configuration of the ESP32 STA or AP */
|
||||
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
|
||||
/* Start Wifi */
|
||||
ESP_ERROR_CHECK(esp_wifi_start() );
|
||||
|
||||
ESP_LOGI(TAG, "wifi_init_sta finished.");
|
||||
ESP_LOGI(TAG, "connect to ap SSID:%s password:%s",
|
||||
TLS_SMP_WIFI_SSID, TLS_SMP_WIFI_PASS);
|
||||
ESP_LOGI(TAG, "Set dummy time...");
|
||||
set_time();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# The following lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(wolfssl_server)
|
||||
11
IDE/Espressif/ESP-IDF/examples/wolfssl_server/Makefile
Normal file
11
IDE/Espressif/ESP-IDF/examples/wolfssl_server/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
|
||||
# project subdirectory.
|
||||
#
|
||||
|
||||
PROJECT_NAME := tls_server
|
||||
|
||||
CFLAGS += -DWOLFSSL_USER_SETTINGS
|
||||
|
||||
include $(IDF_PATH)/make/project.mk
|
||||
|
||||
22
IDE/Espressif/ESP-IDF/examples/wolfssl_server/README.md
Normal file
22
IDE/Espressif/ESP-IDF/examples/wolfssl_server/README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
#wolfSSL Example
|
||||
|
||||
The Example contains a wolfSSL simple server.
|
||||
|
||||
1. "make menuconfigure" to configure the project
|
||||
|
||||
1-1. Example Configuration ->
|
||||
WIFI SSID : your own WIFI, which is connected to the Internet.(default is "myssid")
|
||||
WIFI Password : WIFI password, and default is "mypassword"
|
||||
|
||||
When you want to test the wolfSSL simple server demo
|
||||
|
||||
1. "make flash" to compile the code and load the firmware
|
||||
2. "make monitor" to see the context. The assigned IP address can be found in output message.
|
||||
3. Once the server connects to the wifi, it is waiting for client request.
|
||||
("Waiting for a connection..." message will be displayed.)
|
||||
|
||||
4. You can use <wolfssl>/examples/client to test the server
|
||||
e.g ./example/client/client -h xx.xx.xx
|
||||
|
||||
See the README.md file in the upper level 'examples' directory for more information about examples.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
#
|
||||
# wolfssl server test
|
||||
#
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
|
||||
set(COMPONENT_SRCS "server-tls.c" "wifi_connect.c")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS "." "./include")
|
||||
|
||||
register_component()
|
||||
@@ -0,0 +1,15 @@
|
||||
menu "Example Configuration"
|
||||
|
||||
config WIFI_SSID
|
||||
string "WiFi SSID"
|
||||
default "myssid"
|
||||
help
|
||||
SSID (network name) for the example to connect to.
|
||||
|
||||
config WIFI_PASSWORD
|
||||
string "WiFi Password"
|
||||
default "mypassword"
|
||||
help
|
||||
WiFi password (WPA or WPA2) for the example to use.
|
||||
|
||||
endmenu
|
||||
@@ -0,0 +1,3 @@
|
||||
#
|
||||
# Main Makefile. This is basically the same as a component makefile.
|
||||
#
|
||||
@@ -0,0 +1,37 @@
|
||||
/* wifi_connect.h
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#ifndef _TLS_WIFI_H_
|
||||
#define _TLS_WIFI_H_
|
||||
|
||||
#include "esp_log.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_event_loop.h"
|
||||
|
||||
#define DEFAULT_PORT 11111
|
||||
|
||||
#define TLS_SMP_SERVER_TASK_NAME "tls_sever_example"
|
||||
#define TLS_SMP_SERVER_TASK_WORDS 10240
|
||||
#define TLS_SMP_SERVER_TASK_PRIORITY 8
|
||||
|
||||
#define TLS_SMP_WIFI_SSID CONFIG_WIFI_SSID
|
||||
#define TLS_SMP_WIFI_PASS CONFIG_WIFI_PASSWORD
|
||||
|
||||
#endif
|
||||
266
IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/server-tls.c
Normal file
266
IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/server-tls.c
Normal file
@@ -0,0 +1,266 @@
|
||||
/* server-tls-callback.c
|
||||
*
|
||||
* Copyright (C) 2006-2019 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL. (formerly known as CyaSSL)
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
/* the usual suspects */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* socket includes */
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* wolfSSL */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
/* ESP specific */
|
||||
#include "wifi_connect.h"
|
||||
|
||||
#ifdef WOLFSSL_TRACK_MEMORY
|
||||
#include <wolfssl/wolfcrypt/mem_track.h>
|
||||
#endif
|
||||
|
||||
static const char* const TAG = "tls_server";
|
||||
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
|
||||
static void ShowCiphers(void)
|
||||
{
|
||||
char ciphers[4096];
|
||||
|
||||
int ret = wolfSSL_get_ciphers(ciphers, (int)sizeof(ciphers));
|
||||
|
||||
if (ret == WOLFSSL_SUCCESS)
|
||||
printf("%s\n", ciphers);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_ESPWROOM32SE) && defined(HAVE_PK_CALLBACKS) \
|
||||
&& defined(WOLFSSL_ATECC508A)
|
||||
|
||||
#include "wolfssl/wolfcrypt/port/atmel/atmel.h"
|
||||
|
||||
/* when you want to use a custom slot allocation */
|
||||
/* enable the difinition CUSTOM_SLOT_ALLOCATION. */
|
||||
|
||||
#if defined(CUSTOM_SLOT_ALLOCATION)
|
||||
|
||||
static byte mSlotList[ATECC_MAX_SLOT];
|
||||
|
||||
int atmel_set_slot_allocator(atmel_slot_alloc_cb alloc, atmel_slot_dealloc_cb dealloc);
|
||||
|
||||
/* initialize slot array */
|
||||
void my_atmel_slotInit()
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i=0;i<ATECC_MAX_SLOT; i++) {
|
||||
mSlotList[i] = ATECC_INVALID_SLOT;
|
||||
}
|
||||
}
|
||||
|
||||
/* allocate slot depending on slotType */
|
||||
int my_atmel_alloc(int slotType)
|
||||
{
|
||||
int i, slot = -1;
|
||||
|
||||
switch(slotType){
|
||||
case ATMEL_SLOT_ENCKEY:
|
||||
slot = 4;
|
||||
break;
|
||||
case ATMEL_SLOT_DEVICE:
|
||||
slot = 0;
|
||||
break;
|
||||
case ATMEL_SLOT_ECDHE:
|
||||
slot = 0;
|
||||
break;
|
||||
case ATMEL_SLOT_ECDHE_ENC:
|
||||
slot = 4;
|
||||
break;
|
||||
case ATMEL_SLOT_ANY:
|
||||
for(i=0;i<ATECC_MAX_SLOT;i++){
|
||||
if(mSlotList[i] == ATECC_INVALID_SLOT){
|
||||
slot = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return slot;
|
||||
}
|
||||
|
||||
/* free slot array */
|
||||
void my_atmel_free(int slotId)
|
||||
{
|
||||
if(slotId >= 0 && slotId < ATECC_MAX_SLOT){
|
||||
mSlotList[slotId] = ATECC_INVALID_SLOT;
|
||||
}
|
||||
}
|
||||
#endif /* CUSTOM_SLOT_ALLOCATION */
|
||||
#endif /* WOLFSSL_ESPWROOM32SE && HAVE_PK_CALLBACK && WOLFSSL_ATECC508A */
|
||||
|
||||
void tls_smp_server_task()
|
||||
{
|
||||
int sockfd;
|
||||
int connd;
|
||||
struct sockaddr_in servAddr;
|
||||
struct sockaddr_in clientAddr;
|
||||
socklen_t size = sizeof(clientAddr);
|
||||
char buff[256];
|
||||
size_t len;
|
||||
int shutdown = 0;
|
||||
int ret;
|
||||
|
||||
/* declare wolfSSL objects */
|
||||
WOLFSSL_CTX* ctx;
|
||||
WOLFSSL* ssl;
|
||||
|
||||
WOLFSSL_ENTER("tls_smp_server_task");
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
WOLFSSL_MSG("Debug ON");
|
||||
wolfSSL_Debugging_ON();
|
||||
ShowCiphers();
|
||||
#endif
|
||||
|
||||
/* Initialize wolfSSL */
|
||||
WOLFSSL_MSG("Start wolfSSL_Init()");
|
||||
wolfSSL_Init();
|
||||
|
||||
/* Create a socket that uses an internet IPv4 address,
|
||||
* Sets the socket to be stream based (TCP),
|
||||
* 0 means choose the default protocol. */
|
||||
WOLFSSL_MSG( "start socket())");
|
||||
if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to create the socket");
|
||||
}
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
WOLFSSL_MSG("Create and initialize WOLFSSL_CTX");
|
||||
if ((ctx = wolfSSL_CTX_new(wolfSSLv23_server_method())) == NULL) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to create WOLFSSL_CTX");
|
||||
}
|
||||
WOLFSSL_MSG("Loading certificate...");
|
||||
/* Load server certificates into WOLFSSL_CTX */
|
||||
|
||||
if ((ret = wolfSSL_CTX_use_certificate_buffer(ctx, server_cert_der_2048,
|
||||
sizeof_server_cert_der_2048,
|
||||
WOLFSSL_FILETYPE_ASN1)) != SSL_SUCCESS) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to load cert");
|
||||
}
|
||||
WOLFSSL_MSG("Loading key info...");
|
||||
/* Load server key into WOLFSSL_CTX */
|
||||
|
||||
if((ret=wolfSSL_CTX_use_PrivateKey_buffer(ctx,
|
||||
server_key_der_2048, sizeof_server_key_der_2048,
|
||||
WOLFSSL_FILETYPE_ASN1)) != SSL_SUCCESS) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to load privatekey");
|
||||
}
|
||||
|
||||
/* TO DO when using ECDSA, it loads the provisioned certificate and present it.*/
|
||||
/* TO DO when using ECDSA, it uses the generated key instead of loading key */
|
||||
|
||||
/* Initialize the server address struct with zeros */
|
||||
memset(&servAddr, 0, sizeof(servAddr));
|
||||
/* Fill in the server address */
|
||||
servAddr.sin_family = AF_INET; /* using IPv4 */
|
||||
servAddr.sin_port = htons(DEFAULT_PORT); /* on DEFAULT_PORT */
|
||||
servAddr.sin_addr.s_addr = INADDR_ANY; /* from anywhere */
|
||||
|
||||
/* Bind the server socket to our port */
|
||||
if (bind(sockfd, (struct sockaddr*)&servAddr, sizeof(servAddr)) == -1) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to bind");
|
||||
}
|
||||
|
||||
/* Listen for a new connection, allow 5 pending connections */
|
||||
if (listen(sockfd, 5) == -1) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to listen");
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_ESPWROOM32SE) && defined(HAVE_PK_CALLBACKS) \
|
||||
&& defined(WOLFSSL_ATECC508A)
|
||||
atcatls_set_callbacks(ctx);
|
||||
/* when using a custom slot allocation */
|
||||
#if defined(CUSTOM_SLOT_ALLOCATION)
|
||||
my_atmel_slotInit();
|
||||
atmel_set_slot_allocator(my_atmel_alloc, my_atmel_free);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Continue to accept clients until shutdown is issued */
|
||||
while (!shutdown) {
|
||||
WOLFSSL_MSG("Waiting for a connection...");
|
||||
/* Accept client connections */
|
||||
if ((connd = accept(sockfd, (struct sockaddr*)&clientAddr, &size))
|
||||
== -1) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to accept the connection");
|
||||
}
|
||||
/* Create a WOLFSSL object */
|
||||
if ((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to create WOLFSSL object");
|
||||
}
|
||||
/* Attach wolfSSL to the socket */
|
||||
wolfSSL_set_fd(ssl, connd);
|
||||
/* Establish TLS connection */
|
||||
ret = wolfSSL_accept(ssl);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
ESP_LOGE(TAG, "wolfSSL_accept error %d", wolfSSL_get_error(ssl, ret));
|
||||
}
|
||||
WOLFSSL_MSG("Client connected successfully");
|
||||
/* Read the client data into our buff array */
|
||||
memset(buff, 0, sizeof(buff));
|
||||
if (wolfSSL_read(ssl, buff, sizeof(buff)-1) == -1) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to read");
|
||||
}
|
||||
/* Print to stdout any data the client sends */
|
||||
WOLFSSL_MSG("Client sends:");
|
||||
WOLFSSL_MSG(buff);
|
||||
/* Check for server shutdown command */
|
||||
if (strncmp(buff, "shutdown", 8) == 0) {
|
||||
WOLFSSL_MSG("Shutdown command issued!");
|
||||
shutdown = 1;
|
||||
}
|
||||
/* Write our reply into buff */
|
||||
memset(buff, 0, sizeof(buff));
|
||||
memcpy(buff, "I hear ya fa shizzle!", sizeof(buff));
|
||||
len = strnlen(buff, sizeof(buff));
|
||||
/* Reply back to the client */
|
||||
if (wolfSSL_write(ssl, buff, len) != len) {
|
||||
ESP_LOGE(TAG, "ERROR: failed to write");
|
||||
}
|
||||
/* Cleanup after this connection */
|
||||
wolfSSL_free(ssl); /* Free the wolfSSL object */
|
||||
close(connd); /* Close the connection to the client */
|
||||
}
|
||||
/* Cleanup and return */
|
||||
wolfSSL_CTX_free(ctx); /* Free the wolfSSL context object */
|
||||
wolfSSL_Cleanup(); /* Cleanup the wolfSSL environment */
|
||||
close(sockfd); /* Close the socket listening for clients */
|
||||
|
||||
vTaskDelete(NULL);
|
||||
|
||||
return; /* Return reporting a success */
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
/* wifi_connect.c
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
/*ESP specific */
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/event_groups.h"
|
||||
#include "wifi_connect.h"
|
||||
#include "lwip/sockets.h"
|
||||
#include "lwip/netdb.h"
|
||||
#include "lwip/apps/sntp.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
const static int CONNECTED_BIT = BIT0;
|
||||
static EventGroupHandle_t wifi_event_group;
|
||||
/* prefix for logging */
|
||||
const static char *TAG = "tls_server";
|
||||
/* proto-type difinition */
|
||||
extern void tls_smp_server_task();
|
||||
static void tls_smp_server_init();
|
||||
|
||||
static void set_time()
|
||||
{
|
||||
/* set dummy wallclock time. */
|
||||
struct timeval utctime;
|
||||
struct timezone tz;
|
||||
struct strftime_buf;
|
||||
time_t now;
|
||||
struct tm timeinfo;
|
||||
char strftime_buf[64];
|
||||
|
||||
utctime.tv_sec = 1542008020; /* dummy time: Mon Nov 12 07:33:40 2018 */
|
||||
utctime.tv_usec = 0;
|
||||
tz.tz_minuteswest = 0;
|
||||
tz.tz_dsttime = 0;
|
||||
|
||||
settimeofday(&utctime, &tz);
|
||||
|
||||
time(&now);
|
||||
localtime_r(&now, &timeinfo);
|
||||
|
||||
strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);
|
||||
ESP_LOGI(TAG, "The current date/time is: %s", strftime_buf);
|
||||
|
||||
/* wait until wifi connect */
|
||||
xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT,
|
||||
false, true, portMAX_DELAY);
|
||||
/* now we start client tasks. */
|
||||
tls_smp_server_init();
|
||||
}
|
||||
|
||||
/* create task */
|
||||
static void tls_smp_server_init(void)
|
||||
{
|
||||
int ret;
|
||||
xTaskHandle _handle;
|
||||
/* http://esp32.info/docs/esp_idf/html/dd/d3c/group__xTaskCreate.html */
|
||||
ret = xTaskCreate(tls_smp_server_task,
|
||||
TLS_SMP_SERVER_TASK_NAME,
|
||||
TLS_SMP_SERVER_TASK_WORDS,
|
||||
NULL,
|
||||
TLS_SMP_SERVER_TASK_PRIORITY,
|
||||
&_handle);
|
||||
|
||||
if (ret != pdPASS) {
|
||||
ESP_LOGI(TAG, "create thread %s failed", TLS_SMP_SERVER_TASK_NAME);
|
||||
}
|
||||
}
|
||||
/* event hander for wifi events */
|
||||
static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
|
||||
{
|
||||
switch (event->event_id)
|
||||
{
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "got ip:%s",
|
||||
ip4addr_ntoa(&event->event_info.got_ip.ip_info.ip));
|
||||
/* http://esp32.info/docs/esp_idf/html/dd/d08/group__xEventGroupSetBits.html */
|
||||
xEventGroupSetBits(wifi_event_group, CONNECTED_BIT);
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
esp_wifi_connect();
|
||||
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
/* entry point */
|
||||
void app_main(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "Start app_main...");
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
|
||||
ESP_LOGI(TAG, "Initialize wifi");
|
||||
/* TCP/IP adapter initialization */
|
||||
tcpip_adapter_init();
|
||||
|
||||
/* */
|
||||
wifi_event_group = xEventGroupCreate();
|
||||
ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL));
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
|
||||
|
||||
wifi_config_t wifi_config = {
|
||||
.sta = {
|
||||
.ssid = TLS_SMP_WIFI_SSID,
|
||||
.password = TLS_SMP_WIFI_PASS,
|
||||
},
|
||||
};
|
||||
/* WiFi station mode */
|
||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
|
||||
/* Wifi Set the configuration of the ESP32 STA or AP */
|
||||
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
|
||||
/* Start Wifi */
|
||||
ESP_ERROR_CHECK(esp_wifi_start() );
|
||||
|
||||
ESP_LOGI(TAG, "wifi_init_sta finished.");
|
||||
ESP_LOGI(TAG, "connect to ap SSID:%s password:%s",
|
||||
TLS_SMP_WIFI_SSID, TLS_SMP_WIFI_PASS);
|
||||
ESP_LOGI(TAG, "Set Dummy time...");
|
||||
set_time();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
# The following five lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(wolfssl_test)
|
||||
11
IDE/Espressif/ESP-IDF/examples/wolfssl_test/Makefile
Normal file
11
IDE/Espressif/ESP-IDF/examples/wolfssl_test/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
|
||||
# project subdirectory.
|
||||
#
|
||||
|
||||
PROJECT_NAME := wolfssl_test
|
||||
|
||||
CFLAGS += -DWOLFSSL_USER_SETTINGS
|
||||
|
||||
include $(IDF_PATH)/make/project.mk
|
||||
|
||||
10
IDE/Espressif/ESP-IDF/examples/wolfssl_test/README.md
Normal file
10
IDE/Espressif/ESP-IDF/examples/wolfssl_test/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
#wolfSSL Example
|
||||
|
||||
The Example contains of wolfSSL test program.
|
||||
|
||||
When you want to run the benchmark program
|
||||
1. "make menuconfig" to configure the program,first
|
||||
1. "make flash" to compile and load the firemware
|
||||
2. "make monitor" to see the message
|
||||
|
||||
See the README.md file in the upper level 'examples' directory for more information about examples.
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
#
|
||||
# wolfssl crypt test
|
||||
#
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
|
||||
set(COMPONENT_SRCS "test.c")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
||||
|
||||
register_component()
|
||||
@@ -0,0 +1,3 @@
|
||||
#
|
||||
# Main Makefile. This is basically the same as a component makefile.
|
||||
#
|
||||
@@ -0,0 +1,2 @@
|
||||
CONFIG_MAIN_TASK_STACK_SIZE=5000
|
||||
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=
|
||||
37
IDE/Espressif/ESP-IDF/libs/CMakeLists.txt
Normal file
37
IDE/Espressif/ESP-IDF/libs/CMakeLists.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# cmake for wolfssl
|
||||
#
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
|
||||
set(CMAKE_CURRENT_SOURCE_DIR ".")
|
||||
set(WOLFSSL_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(INCLUDE_PATH ${WOLFSSL_ROOT})
|
||||
|
||||
set(COMPONENT_SRCDIRS "./src/"
|
||||
"./wolfcrypt/src/"
|
||||
"./wolfcrypt/src/port/Espressif/"
|
||||
"./wolfcrypt/src/port/atmel/"
|
||||
)
|
||||
|
||||
set(COMPONENT_REQUIRES lwip)
|
||||
|
||||
set(COMPONENT_ADD_INCLUDEDIRS
|
||||
"."
|
||||
"./include"
|
||||
"../freertos/include/freertos"
|
||||
"${WOLFSSL_ROOT}"
|
||||
)
|
||||
|
||||
if(IS_DIRECTORY ${IDF_PATH}/components/cryptoauthlib)
|
||||
list(APPEND COMPONENT_ADD_INCLUDEDIRS "../cryptoauthlib/lib")
|
||||
endif()
|
||||
|
||||
set(COMPONENT_SRCEXCLUDE
|
||||
"wolfcrypt/src/aes_asm.S"
|
||||
"wolfcrypt/src/evp.c"
|
||||
"wolfcrypt/src/misc.c"
|
||||
"src/bio.c"
|
||||
)
|
||||
|
||||
register_component()
|
||||
17
IDE/Espressif/ESP-IDF/libs/component.mk
Normal file
17
IDE/Espressif/ESP-IDF/libs/component.mk
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Component Makefile
|
||||
#
|
||||
|
||||
COMPONENT_ADD_INCLUDEDIRS := . ./include
|
||||
COMPONENT_ADD_INCLUDEDIRS += ../freertos/include/freertos/
|
||||
|
||||
COMPONENT_SRCDIRS := src wolfcrypt/src
|
||||
COMPONENT_SRCDIRS += wolfcrypt/src/port/Espressif
|
||||
COMPONENT_SRCDIRS += wolfcrypt/src/port/atmel
|
||||
|
||||
CFLAGS +=-DWOLFSSL_USER_SETTINGS
|
||||
|
||||
COMPONENT_OBJEXCLUDE := wolfcrypt/src/aes_asm.o
|
||||
COMPONENT_OBJEXCLUDE += wolfcrypt/src/evp.o
|
||||
COMPONENT_OBJEXCLUDE += wolfcrypt/src/misc.o
|
||||
COMPONENT_OBJEXCLUDE += src/bio.o
|
||||
112
IDE/Espressif/ESP-IDF/setup.sh
Executable file
112
IDE/Espressif/ESP-IDF/setup.sh
Executable file
@@ -0,0 +1,112 @@
|
||||
#!/bin/bash
|
||||
|
||||
# check if IDF_PATH is set
|
||||
if [ -z "$IDF_PATH" ]; then
|
||||
echo "Please follows the instruction of ESP-IDF installation and set IDF_PATH."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RMDCMD='/bin/rm -rf'
|
||||
MKDCMD='/bin/mkdir'
|
||||
CPDCMD='/bin/cp'
|
||||
|
||||
SCRIPTDIR=`dirname $0`
|
||||
SCRIPTDIR=`cd $SCRIPTDIR && pwd -P`
|
||||
WOLFSSL_ESPIDFDIR=${SCRIPTDIR}
|
||||
WOLFSSL_ESPIDFDIR=`cd $WOLFSSL_ESPIDFDIR && pwd -P`
|
||||
BASEDIR=${SCRIPTDIR}/../../../
|
||||
BASEDIR=`cd ${BASEDIR} && pwd -P`
|
||||
|
||||
# echo $WOLFSSL_ESPIDFDIR
|
||||
|
||||
WOLFSSLLIB_TRG_DIR=${IDF_PATH}/components/wolfssl
|
||||
WOLFSSLEXP_TRG_DIR=${IDF_PATH}/examples/protocols
|
||||
|
||||
if [ ! -d $IDF_PATH ]; then
|
||||
echo "ESP-IDF Development Framework doesn't exist.: $IDF_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copy files into ESP-IDF development framework
|
||||
pushd $IDF_PATH > /dev/null
|
||||
|
||||
echo "Copy files into $IDF_PATH"
|
||||
# Remove/Create directories
|
||||
${RMDCMD} ${WOLFSSLLIB_TRG_DIR}/
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/
|
||||
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/src
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfcrypt
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/src
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfssl
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/test
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/include
|
||||
|
||||
popd > /dev/null # $WOLFSSL_ESPIDFDIR
|
||||
pushd ${BASEDIR} > /dev/null # WOLFSSL TOP DIR
|
||||
|
||||
# copying ... files in src/ into $WOLFSSLLIB_TRG_DIR/src
|
||||
${CPDCMD} ./src/*.c ${WOLFSSLLIB_TRG_DIR}/src/
|
||||
|
||||
|
||||
${CPDCMD} -r ./wolfcrypt/src/*.{c,i} ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/src/
|
||||
${CPDCMD} -r ./wolfcrypt/src/port ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/src/port/
|
||||
${CPDCMD} -r ./wolfcrypt/test ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/
|
||||
${CPDCMD} -r ./wolfcrypt/benchmark ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/
|
||||
|
||||
${CPDCMD} -r ./wolfssl/*.h ${WOLFSSLLIB_TRG_DIR}/wolfssl/
|
||||
${CPDCMD} -r ./wolfssl/wolfcrypt ${WOLFSSLLIB_TRG_DIR}/wolfssl/
|
||||
# user_settings.h
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/user_settings.h ${WOLFSSLLIB_TRG_DIR}/include/
|
||||
|
||||
# unit test app
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/test/* ${WOLFSSLLIB_TRG_DIR}/test/
|
||||
|
||||
popd > /dev/null #
|
||||
|
||||
${CPDCMD} ./libs/CMakeLists.txt ${WOLFSSLLIB_TRG_DIR}/
|
||||
${CPDCMD} ./libs/component.mk ${WOLFSSLLIB_TRG_DIR}/
|
||||
|
||||
pushd ${BASEDIR} > /dev/null # WOLFSSL TOP DIR
|
||||
|
||||
# Benchmark program
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
|
||||
|
||||
${CPDCMD} -r ./wolfcrypt/benchmark/benchmark.c ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
|
||||
|
||||
# Crypt Test program
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
|
||||
|
||||
${CPDCMD} -r ./wolfcrypt/test/test.c ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
|
||||
|
||||
# TLS Client program
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/include
|
||||
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_client/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_client/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_client/main/include/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/include/
|
||||
|
||||
# TLS Server program
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/main/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/main/include
|
||||
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_server/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_server/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/main/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_server/main/include/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/main/include/
|
||||
|
||||
popd > /dev/null #
|
||||
|
||||
exit 1
|
||||
6
IDE/Espressif/ESP-IDF/test/CMakeLists.txt
Normal file
6
IDE/Espressif/ESP-IDF/test/CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
set(COMPONENT_SRCDIRS ".")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
||||
|
||||
set(COMPONENT_REQUIRES unity test_utils wolfssl)
|
||||
|
||||
register_component()
|
||||
11
IDE/Espressif/ESP-IDF/test/README.md
Normal file
11
IDE/Espressif/ESP-IDF/test/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# wolfSSL unit-test app
|
||||
|
||||
The test contains of wolfSSL unit-test app on Unity.
|
||||
|
||||
When you want to run the app
|
||||
1. Copy *test.c* file at /path/to/esp-idf/components/wolfssl/wolfcrypt/test/ folder to the wolfssl/test folder
|
||||
2. Go to /esp-idf/tools/unit-test-app/ folder
|
||||
3. "make menuconfig" to configure unit test app.
|
||||
4. "make TEST_COMPONENTS=wolfssl" to build wolfssl unit test app.
|
||||
|
||||
See [https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/unit-tests.html] for more information about unit test app.
|
||||
10
IDE/Espressif/ESP-IDF/test/component.mk
Normal file
10
IDE/Espressif/ESP-IDF/test/component.mk
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
#Component Makefile
|
||||
#
|
||||
|
||||
#CFLAGS := -v
|
||||
CFLAGS += -DNO_MAIN_DRIVER
|
||||
CFLAGS += -DWOLFSSL_USER_SETTINGS
|
||||
#CFLAGS += -DWOLFSSL_ESP32WROOM32_CRYPT_DEBUG
|
||||
|
||||
COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive
|
||||
524
IDE/Espressif/ESP-IDF/test/test_wolfssl.c
Normal file
524
IDE/Espressif/ESP-IDF/test/test_wolfssl.c
Normal file
@@ -0,0 +1,524 @@
|
||||
/*
|
||||
* wolfssl sha tests
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <esp_system.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "unity.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/sha.h>
|
||||
#include <wolfssl/wolfcrypt/sha256.h>
|
||||
#include <wolfssl/wolfcrypt/sha512.h>
|
||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
|
||||
static const char* TAG = "wolfssl unit test";
|
||||
static xSemaphoreHandle exit_semaph;
|
||||
static volatile bool exit_loop=false;
|
||||
|
||||
#define SHA_STACK_SIZE (20*1024)
|
||||
#define TIMES_SHA 500
|
||||
#define TIMES_AES 100
|
||||
|
||||
#ifndef NO_SHA
|
||||
int sha_test();
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
int sha256_test();
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
int sha384_test(void);
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
int sha512_test(void);
|
||||
#endif
|
||||
|
||||
#ifndef NO_AES
|
||||
int aes_test(void);
|
||||
static void tskAes_Test(void *pvParam)
|
||||
{
|
||||
ESP_LOGI(TAG, "enter tskAes_Test");
|
||||
int ret = 0;
|
||||
while(exit_loop==false) {
|
||||
ret = aes_test();
|
||||
if(ret != 0) {
|
||||
printf("result was not good(aes_test)(%d)\n",ret);
|
||||
TEST_FAIL_MESSAGE("tskAes_Test\n");
|
||||
}
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "leave tskAes_Test");
|
||||
xSemaphoreGive(exit_semaph);
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
int aesgcm_test(void);
|
||||
|
||||
static void tskAesGcm_Test(void *pvParam)
|
||||
{
|
||||
ESP_LOGI(TAG, "enter tskAesGcm_Test");
|
||||
int ret = 0;
|
||||
while(exit_loop==false) {
|
||||
ret = aesgcm_test();
|
||||
if(ret != 0) {
|
||||
printf(" results was not good(%d). aesGcm_test\n",ret);
|
||||
TEST_FAIL_MESSAGE("aesGcm_test\n");
|
||||
}
|
||||
}
|
||||
ESP_LOGI(TAG, "leave tskAesGcm_Test");
|
||||
xSemaphoreGive(exit_semaph);
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_AES_192
|
||||
int aes192_test(void);
|
||||
static void tskAes192_Test(void *pvParam)
|
||||
{
|
||||
ESP_LOGI(TAG, "enter tskAes192_Test");
|
||||
int ret = 0;
|
||||
while(exit_loop==false) {
|
||||
ret = aes192_test();
|
||||
if(ret != 0) {
|
||||
printf(" results was not good(%d). aes192_test\n",ret);
|
||||
TEST_FAIL_MESSAGE("aes192_test\n");
|
||||
}
|
||||
}
|
||||
ESP_LOGI(TAG, "leave tskAes192_Test");
|
||||
xSemaphoreGive(exit_semaph);
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
int aes256_test(void);
|
||||
static void tskAes256_Test(void *pvParam)
|
||||
{
|
||||
ESP_LOGI(TAG, "enter tskAes256_Test");
|
||||
int ret = 0;
|
||||
while(exit_loop==false) {
|
||||
ret = aes256_test();
|
||||
if(ret != 0) {
|
||||
printf(" results was not good(%d). aes256_test\n", ret);
|
||||
TEST_FAIL_MESSAGE("aes256_test\n");
|
||||
}
|
||||
}
|
||||
ESP_LOGI(TAG, "leave tskAes256_Test");
|
||||
xSemaphoreGive(exit_semaph);
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_CASE("wolfssl aes test" , "[wolfssl]")
|
||||
{
|
||||
ESP_LOGI(TAG, "aes test");
|
||||
TEST_ASSERT_EQUAL(0, aes_test());
|
||||
#ifdef WOLFSSL_AES_192
|
||||
ESP_LOGI(TAG, "aes_192 test");
|
||||
TEST_ASSERT_EQUAL(0, aes192_test());
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
ESP_LOGI(TAG, "aes_256 test");
|
||||
TEST_ASSERT_EQUAL(0, aes256_test());
|
||||
#endif
|
||||
ESP_LOGI(TAG, "aes-gcm test");
|
||||
TEST_ASSERT_EQUAL(0, aesgcm_test());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
TEST_CASE("wolfssl sha crypt-test", "[wolfssl]")
|
||||
{
|
||||
#ifndef NO_SHA
|
||||
ESP_LOGI(TAG, "sha_test()");
|
||||
TEST_ASSERT_EQUAL(0, sha_test());
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
ESP_LOGI(TAG, "sha256_test()");
|
||||
TEST_ASSERT_EQUAL(0, sha256_test());
|
||||
#endif
|
||||
#ifdef WOLSSL_SHA384
|
||||
ESP_LOGI(TAG, "sha384_test()");
|
||||
TEST_ASSERT_EQUAL(0, sha384_test());
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
ESP_LOGI(TAG, "sha512_test()");
|
||||
TEST_ASSERT_EQUAL(0, sha512_test());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_SHA
|
||||
static void tskSha_Test(void *pvParam)
|
||||
{
|
||||
ESP_LOGI(TAG, "enter tskSha_Test");
|
||||
|
||||
int ret = 0;
|
||||
|
||||
while(exit_loop==false) {
|
||||
ret = sha_test();
|
||||
if(ret != 0) {
|
||||
printf(" results was not good(%d). sha_test\n", ret);
|
||||
TEST_FAIL_MESSAGE("tskSha_Test\n");
|
||||
}
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "leave tskSha_Test");
|
||||
xSemaphoreGive(exit_semaph);
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NO_SHA256
|
||||
static void tskSha256_Test(void *pvParam)
|
||||
{
|
||||
ESP_LOGI(TAG, "enter tskSha256_Test");
|
||||
int ret;
|
||||
|
||||
while(exit_loop==false) {
|
||||
ret = sha256_test();
|
||||
if(ret != 0) {
|
||||
printf("results was not good(%d). sha256_test\n", ret);
|
||||
TEST_FAIL_MESSAGE("sha256_test() failed");
|
||||
}
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "leave tskSha256_Test");
|
||||
xSemaphoreGive(exit_semaph);
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_SHA384
|
||||
static void tskSha384_Test(void *pvParam)
|
||||
{
|
||||
ESP_LOGI(TAG, "enter tskSha384_Test");
|
||||
int ret = 0;
|
||||
|
||||
while(exit_loop==false) {
|
||||
ret = sha384_test();
|
||||
if(ret != 0) {
|
||||
printf("results was not good(%d). sha384_test\n", ret);
|
||||
TEST_FAIL_MESSAGE("sha384_test() failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "leave tskSha384_Test");
|
||||
xSemaphoreGive(exit_semaph);
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_SHA512
|
||||
static void tskSha512_Test(void *pvParam)
|
||||
{
|
||||
ESP_LOGI(TAG, "enter tskSha512_Test");
|
||||
|
||||
int ret = 0;
|
||||
|
||||
while(exit_loop==false) {
|
||||
ret = sha512_test();
|
||||
if(ret != 0) {
|
||||
printf(" results was not good(%d). sha512_test\n", ret);
|
||||
TEST_FAIL_MESSAGE("tskSha512_Test() failed\n");
|
||||
}
|
||||
}
|
||||
ESP_LOGI(TAG, "leave tskSha512_test()");
|
||||
xSemaphoreGive(exit_semaph);
|
||||
vTaskDelete(NULL);
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_CASE("wolfssl sha multi-thread test ", "[wolfssl]")
|
||||
{
|
||||
int num = 0;
|
||||
#ifndef NO_SHA
|
||||
num++;
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
num++;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
num++;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
num++;
|
||||
#endif
|
||||
|
||||
exit_loop = false;
|
||||
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
|
||||
#ifndef NO_SHA
|
||||
xTaskCreate(tskSha_Test, "sha_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
xTaskCreate(tskSha256_Test, "sha256_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
xTaskCreate(tskSha384_Test, "sha384_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
xTaskCreate(tskSha512_Test, "sha512_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
|
||||
ESP_LOGI(TAG, "Waiting for 10s ...");
|
||||
vTaskDelay(10000/portTICK_PERIOD_MS);
|
||||
exit_loop = true;
|
||||
|
||||
for(int i=0;i<num;i++){
|
||||
if(!xSemaphoreTake(exit_semaph, 2000/portTICK_PERIOD_MS)) {
|
||||
TEST_FAIL_MESSAGE("exit semaphore not released by test task");
|
||||
}
|
||||
}
|
||||
vSemaphoreDelete(exit_semaph);
|
||||
}
|
||||
|
||||
TEST_CASE("wolfssl aes multi-thread test ", "[wolfssl]")
|
||||
{
|
||||
int num = 0;
|
||||
#ifndef NO_AES
|
||||
num++;
|
||||
num++;
|
||||
#ifdef WOLFSSL_AES_192
|
||||
num++;
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
num++;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
exit_loop = false;
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
|
||||
#ifndef NO_AES
|
||||
xTaskCreate(tskAes_Test, "Aes_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
xTaskCreate(tskAesGcm_Test, "AesGcm_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_192
|
||||
xTaskCreate(tskAes192_Test, "Aes192_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
xTaskCreate(tskAes256_Test, "Aes256_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
|
||||
ESP_LOGI(TAG, "Waiting for 10s ...");
|
||||
vTaskDelay(10000/portTICK_PERIOD_MS);
|
||||
exit_loop = true;
|
||||
|
||||
for(int i=0;i<num;i++){
|
||||
if(!xSemaphoreTake(exit_semaph, 2000/portTICK_PERIOD_MS)) {
|
||||
TEST_FAIL_MESSAGE("exit semaphore not released by test task");
|
||||
}
|
||||
}
|
||||
vSemaphoreDelete(exit_semaph);
|
||||
}
|
||||
|
||||
TEST_CASE("wolfssl aes sha sha256 multi-thread test ", "[wolfssl]")
|
||||
{
|
||||
int num = 0;
|
||||
|
||||
#ifndef NO_AES
|
||||
num++;
|
||||
num++;
|
||||
#ifdef WOLFSSL_AES_192
|
||||
num++;
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
num++;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef NO_SHA
|
||||
num++;
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
num++;
|
||||
#endif
|
||||
|
||||
exit_loop = false;
|
||||
|
||||
#ifndef CONFIG_FREERTOS_UNICORE
|
||||
num *= 2;
|
||||
printf("num=%d\n", num);
|
||||
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
|
||||
#ifndef NO_AES
|
||||
if(xTaskCreatePinnedToCore(tskAes_Test, "Aes_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -1 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAes_Test, "Aes_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -2 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAesGcm_Test, "AesGcm_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -3 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAesGcm_Test, "AesGcm_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -4 \n");
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_192
|
||||
if(xTaskCreatePinnedToCore(tskAes192_Test, "Aes192_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -5 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAes192_Test, "Aes192_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -6 \n");
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
if(xTaskCreatePinnedToCore(tskAes256_Test, "Aes256_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -7 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAes256_Test, "Aes256_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -8 \n");
|
||||
#endif
|
||||
#ifndef NO_SHA
|
||||
if(xTaskCreatePinnedToCore(tskSha_Test, "Sha_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -9 \n");
|
||||
if(xTaskCreatePinnedToCore(tskSha_Test, "Sha_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -10 \n");
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
if(xTaskCreatePinnedToCore(tskSha256_Test, "sha256_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -11 \n");
|
||||
if(xTaskCreatePinnedToCore(tskSha256_Test, "sha256_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -12 \n");
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
|
||||
#ifndef NO_AES
|
||||
xTaskCreate(tskAes_Test, "Aes_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
xTaskCreate(tskAesGcm_Test, "AesGcm_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_192
|
||||
xTaskCreate(tskAes192_Test, "Aes192_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
xTaskCreate(tskAes256_Test, "Aes256_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifndef NO_SHA
|
||||
xTaskCreate(tskSha_Test, "Sha_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
xTaskCreate(tskSha256_Test, "sha256_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_FREERTOS_UNICORE */
|
||||
|
||||
ESP_LOGI(TAG, "Waiting for 15s ...");
|
||||
vTaskDelay(15000/portTICK_PERIOD_MS);
|
||||
exit_loop = true;
|
||||
|
||||
for(int i=0;i<num;i++){
|
||||
if(!xSemaphoreTake(exit_semaph, 2000/portTICK_PERIOD_MS)) {
|
||||
TEST_FAIL_MESSAGE("exit semaphore not released by test task");
|
||||
}
|
||||
}
|
||||
vSemaphoreDelete(exit_semaph);
|
||||
}
|
||||
|
||||
TEST_CASE("wolfssl aes sha384 sha512 multi-thread test ", "[wolfssl]")
|
||||
{
|
||||
int num = 0;
|
||||
|
||||
#ifndef NO_AES
|
||||
num++;
|
||||
num++;
|
||||
#ifdef WOLFSSL_AES_192
|
||||
num++;
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
num++;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
num++;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
num++;
|
||||
#endif
|
||||
|
||||
|
||||
exit_loop = false;
|
||||
|
||||
#ifndef CONFIG_FREERTOS_UNICORE
|
||||
num *= 2;
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
|
||||
#ifndef NO_AES
|
||||
if(xTaskCreatePinnedToCore(tskAes_Test, "Aes_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -1 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAes_Test, "Aes_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -2 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAesGcm_Test, "AesGcm_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -3 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAesGcm_Test, "AesGcm_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -4 \n");
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_192
|
||||
if(xTaskCreatePinnedToCore(tskAes192_Test, "Aes192_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -5 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAes192_Test, "Aes192_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -6 \n");
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
if(xTaskCreatePinnedToCore(tskAes256_Test, "Aes256_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -7 \n");
|
||||
if(xTaskCreatePinnedToCore(tskAes256_Test, "Aes256_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -8 \n");
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
if(xTaskCreatePinnedToCore(tskSha384_Test, "sha384_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -13 \n");
|
||||
if(xTaskCreatePinnedToCore(tskSha384_Test, "sha384_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -14 \n");
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
printf("start sha512\n");
|
||||
if(xTaskCreatePinnedToCore(tskSha512_Test, "Sha512_test", SHA_STACK_SIZE, NULL, 3, NULL, 0)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -15 \n");
|
||||
if(xTaskCreatePinnedToCore(tskSha512_Test, "Sha512_test", SHA_STACK_SIZE, NULL, 3, NULL, 1)!=pdPASS)
|
||||
ESP_LOGE(TAG, "failed to create task -16 \n");
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
|
||||
#ifndef NO_AES
|
||||
xTaskCreate(tskAes_Test, "Aes_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
xTaskCreate(tskAesGcm_Test, "AesGcm_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_192
|
||||
xTaskCreate(tskAes192_Test, "Aes192_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
xTaskCreate(tskAes256_Test, "Aes256_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifndef NO_SHA
|
||||
xTaskCreate(tskSha_Test, "Sha_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
xTaskCreate(tskSha256_Test, "sha256_test", SHA_STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_FREERTOS_UNICORE */
|
||||
|
||||
ESP_LOGI(TAG, "Waiting for 15s ...");
|
||||
vTaskDelay(15000/portTICK_PERIOD_MS);
|
||||
exit_loop = true;
|
||||
|
||||
|
||||
for(int i=0;i<num;i++){
|
||||
if(!xSemaphoreTake(exit_semaph, 2000/portTICK_PERIOD_MS)) {
|
||||
TEST_FAIL_MESSAGE("exit semaphore not released by test task");
|
||||
}
|
||||
}
|
||||
vSemaphoreDelete(exit_semaph);
|
||||
}
|
||||
72
IDE/Espressif/ESP-IDF/user_settings.h
Normal file
72
IDE/Espressif/ESP-IDF/user_settings.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2019 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
/* TLS 1.3 */
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_HKDF
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_AEAD
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
/* when you want to use SINGLE THREAD */
|
||||
/* #define SINGLE_THREADED */
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
#define HAVE_AESGCM
|
||||
/* when you want to use SHA384 */
|
||||
/* #define WOLFSSL_SHA384 */
|
||||
#define WOLFSSL_SHA512
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
|
||||
/* esp32-wroom-32se specific definition */
|
||||
#if defined(WOLFSSL_ESPWROOM32SE)
|
||||
#define WOLFSSL_ATECC508A
|
||||
#define HAVE_PK_CALLBACKS
|
||||
/* when you want to use a custom slot allocation for ATECC608A */
|
||||
/* unless your configuration is unusual, you can use default */
|
||||
/* implementation. */
|
||||
/* #define CUSTOM_SLOT_ALLOCATION */
|
||||
#endif
|
||||
|
||||
|
||||
/* debug options */
|
||||
/* #define DEBUG_WOLFSSL */
|
||||
/* #define WOLFSSL_ESP32WROOM32_CRYPT_DEBUG */
|
||||
/* #define WOLFSSL_ATECC508A_DEBUG */
|
||||
|
||||
/* date/time */
|
||||
/* if it cannot adjust time in the device, */
|
||||
/* enable macro below */
|
||||
/* #define NO_ASN_TIME */
|
||||
/* #define XTIME time */
|
||||
|
||||
/* when you want not to use HW acceleration */
|
||||
/* #define NO_ESP32WROOM32_CRYPT */
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH*/
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_AES */
|
||||
@@ -1,6 +1,6 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -48,20 +48,53 @@ extern "C" {
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Math Configuration */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef USE_FAST_MATH
|
||||
#define USE_FAST_MATH
|
||||
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
#ifdef USE_FAST_MATH
|
||||
#undef USE_FAST_MATH
|
||||
#if 1
|
||||
#define USE_FAST_MATH
|
||||
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
/* Optimizations (on M0 UMULL is not supported, need another assembly solution) */
|
||||
/* Optimizations */
|
||||
//#define TFM_ARM
|
||||
#endif
|
||||
|
||||
/* Wolf Single Precision Math */
|
||||
#undef WOLFSSL_SP
|
||||
#if 0
|
||||
#define WOLFSSL_SP
|
||||
#define WOLFSSL_SP_SMALL /* use smaller version of code */
|
||||
#define WOLFSSL_HAVE_SP_RSA
|
||||
#define WOLFSSL_HAVE_SP_DH
|
||||
#define WOLFSSL_HAVE_SP_ECC
|
||||
#define WOLFSSL_SP_CACHE_RESISTANT
|
||||
//#define WOLFSSL_SP_MATH /* only SP math - eliminates fast math code */
|
||||
|
||||
/* 64 or 32 bit version */
|
||||
//#define WOLFSSL_SP_ASM /* required if using the ASM versions */
|
||||
//#define WOLFSSL_SP_ARM32_ASM
|
||||
//#define WOLFSSL_SP_ARM64_ASM
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* FIPS - Requires eval or license from wolfSSL */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef HAVE_FIPS
|
||||
#if 0
|
||||
#define HAVE_FIPS
|
||||
|
||||
#undef HAVE_FIPS_VERSION
|
||||
#define HAVE_FIPS_VERSION 2
|
||||
|
||||
#ifdef SINGLE_THREADED
|
||||
#undef NO_THREAD_LS
|
||||
#define NO_THREAD_LS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Crypto */
|
||||
@@ -92,24 +125,31 @@ extern "C" {
|
||||
#if 0
|
||||
#define WC_RSA_PSS
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define WC_RSA_NO_PADDING
|
||||
#endif
|
||||
#else
|
||||
#define NO_RSA
|
||||
#endif
|
||||
|
||||
/* ECC */
|
||||
#undef HAVE_ECC
|
||||
#if 1
|
||||
#undef HAVE_ECC
|
||||
#define HAVE_ECC
|
||||
|
||||
/* Manually define enabled curves */
|
||||
#undef ECC_USER_CURVES
|
||||
#define ECC_USER_CURVES
|
||||
|
||||
//#define HAVE_ECC192
|
||||
//#define HAVE_ECC224
|
||||
#undef NO_ECC256
|
||||
//#define HAVE_ECC384
|
||||
//#define HAVE_ECC521
|
||||
#ifdef ECC_USER_CURVES
|
||||
/* Manual Curve Selection */
|
||||
//#define HAVE_ECC192
|
||||
//#define HAVE_ECC224
|
||||
#undef NO_ECC256
|
||||
//#define HAVE_ECC384
|
||||
//#define HAVE_ECC521
|
||||
#endif
|
||||
|
||||
/* Fixed point cache (speeds repeated operations against same private key) */
|
||||
#undef FP_ECC
|
||||
@@ -131,17 +171,35 @@ extern "C" {
|
||||
#undef ECC_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
|
||||
/* Enable cofactor support */
|
||||
#ifdef HAVE_FIPS
|
||||
#undef HAVE_ECC_CDH
|
||||
#define HAVE_ECC_CDH
|
||||
#endif
|
||||
|
||||
/* Validate import */
|
||||
#ifdef HAVE_FIPS
|
||||
#undef WOLFSSL_VALIDATE_ECC_IMPORT
|
||||
#define WOLFSSL_VALIDATE_ECC_IMPORT
|
||||
#endif
|
||||
|
||||
/* Compressed Key Support */
|
||||
#undef HAVE_COMP_KEY
|
||||
//#define HAVE_COMP_KEY
|
||||
|
||||
/* Use alternate ECC size for ECC math */
|
||||
#ifdef USE_FAST_MATH
|
||||
#ifdef NO_RSA
|
||||
/* if not using RSA set FP_MAX_BITS to 256*2 */
|
||||
/* Custom fastmath size if not using RSA */
|
||||
/* MAX = ROUND32(ECC BITS 256) + SIZE_OF_MP_DIGIT(32) */
|
||||
#undef FP_MAX_BITS
|
||||
#define FP_MAX_BITS 512
|
||||
#define FP_MAX_BITS (256 + 32)
|
||||
#else
|
||||
#undef ALT_ECC_SIZE
|
||||
#define ALT_ECC_SIZE
|
||||
#endif
|
||||
|
||||
/* Speedups specific to curve */
|
||||
#ifndef NO_ECC256
|
||||
#undef TFM_ECC256
|
||||
#define TFM_ECC256
|
||||
@@ -149,6 +207,27 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* DH */
|
||||
#undef NO_DH
|
||||
#if 1
|
||||
/* Use table for DH instead of -lm (math) lib dependency */
|
||||
#if 0
|
||||
#define WOLFSSL_DH_CONST
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_FFDHE_4096
|
||||
//#define HAVE_FFDHE_6144
|
||||
//#define HAVE_FFDHE_8192
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FIPS
|
||||
#define WOLFSSL_VALIDATE_FFC_IMPORT
|
||||
#define HAVE_FFDHE_Q
|
||||
#endif
|
||||
#else
|
||||
#define NO_DH
|
||||
#endif
|
||||
|
||||
|
||||
/* AES */
|
||||
#undef NO_AES
|
||||
#if 1
|
||||
@@ -158,16 +237,32 @@ extern "C" {
|
||||
#undef HAVE_AESGCM
|
||||
#define HAVE_AESGCM
|
||||
|
||||
#undef HAVE_AESCCM
|
||||
#define HAVE_AESCCM
|
||||
|
||||
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
|
||||
#undef GCM_SMALL
|
||||
#define GCM_SMALL
|
||||
|
||||
#undef WOLFSSL_AES_DIRECT
|
||||
//#define WOLFSSL_AES_DIRECT
|
||||
|
||||
#undef HAVE_AES_ECB
|
||||
//#define HAVE_AES_ECB
|
||||
|
||||
#undef WOLFSSL_AES_COUNTER
|
||||
//#define WOLFSSL_AES_COUNTER
|
||||
|
||||
#undef HAVE_AESCCM
|
||||
//#define HAVE_AESCCM
|
||||
#else
|
||||
#define NO_AES
|
||||
#endif
|
||||
|
||||
|
||||
/* DES3 */
|
||||
#undef NO_DES3
|
||||
#if 0
|
||||
#else
|
||||
#define NO_DES3
|
||||
#endif
|
||||
|
||||
/* ChaCha20 / Poly1305 */
|
||||
#undef HAVE_CHACHA
|
||||
#undef HAVE_POLY1305
|
||||
@@ -210,7 +305,12 @@ extern "C" {
|
||||
#undef NO_SHA256
|
||||
#if 1
|
||||
/* not unrolled - ~2k smaller and ~25% slower */
|
||||
#define USE_SLOW_SHA256
|
||||
//#define USE_SLOW_SHA256
|
||||
|
||||
/* Sha224 */
|
||||
#if 0
|
||||
#define WOLFSSL_SHA224
|
||||
#endif
|
||||
#else
|
||||
#define NO_SHA256
|
||||
#endif
|
||||
@@ -227,28 +327,33 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* over twice as small, but 50% slower */
|
||||
#define USE_SLOW_SHA512
|
||||
//#define USE_SLOW_SHA512
|
||||
#endif
|
||||
|
||||
/* Sha3 */
|
||||
#undef WOLFSSL_SHA3
|
||||
#if 0
|
||||
#define WOLFSSL_SHA3
|
||||
#endif
|
||||
|
||||
/* MD5 */
|
||||
#undef NO_MD5
|
||||
#if 1
|
||||
|
||||
#else
|
||||
#define NO_MD5
|
||||
#endif
|
||||
|
||||
#undef WOLFSSL_SHA3
|
||||
#if 0
|
||||
#define WOLFSSL_SHA3
|
||||
|
||||
#else
|
||||
#define NO_MD5
|
||||
#endif
|
||||
|
||||
/* HKDF */
|
||||
#undef HAVE_HKDF
|
||||
#if 0
|
||||
#define HAVE_HKDF
|
||||
#else
|
||||
#define HAVE_HKDF
|
||||
#endif
|
||||
|
||||
/* CMAC */
|
||||
#undef WOLFSSL_CMAC
|
||||
#if 0
|
||||
#define WOLFSSL_CMAC
|
||||
#endif
|
||||
|
||||
|
||||
@@ -273,27 +378,67 @@ extern "C" {
|
||||
/* Debugging */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#undef DEBUG_WOLFSSL
|
||||
//#define DEBUG_WOLFSSL
|
||||
|
||||
/* Use this to measure / print heap usage */
|
||||
#undef DEBUG_WOLFSSL
|
||||
#undef NO_ERROR_STRINGS
|
||||
#if 0
|
||||
#undef USE_WOLFSSL_MEMORY
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
|
||||
#undef WOLFSSL_TRACK_MEMORY
|
||||
//#define WOLFSSL_TRACK_MEMORY
|
||||
|
||||
#undef WOLFSSL_DEBUG_MEMORY
|
||||
//#define WOLFSSL_DEBUG_MEMORY
|
||||
#define DEBUG_WOLFSSL
|
||||
#else
|
||||
#undef NO_WOLFSSL_MEMORY
|
||||
#define NO_WOLFSSL_MEMORY
|
||||
#if 0
|
||||
#define NO_ERROR_STRINGS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DEBUG_WOLFSSL
|
||||
#undef NO_ERROR_STRINGS
|
||||
#define NO_ERROR_STRINGS
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Memory */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Override Memory API's */
|
||||
#if 0
|
||||
#undef XMALLOC_OVERRIDE
|
||||
#define XMALLOC_OVERRIDE
|
||||
|
||||
/* prototypes for user heap override functions */
|
||||
/* Note: Realloc only required for normal math */
|
||||
#include <stddef.h> /* for size_t */
|
||||
extern void *myMalloc(size_t n, void* heap, int type);
|
||||
extern void myFree(void *p, void* heap, int type);
|
||||
extern void *myRealloc(void *p, size_t n, void* heap, int type);
|
||||
|
||||
#define XMALLOC(n, h, t) myMalloc(n, h, t)
|
||||
#define XFREE(p, h, t) myFree(p, h, t)
|
||||
#define XREALLOC(p, n, h, t) myRealloc(p, n, h, t)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* Static memory requires fast math */
|
||||
#define WOLFSSL_STATIC_MEMORY
|
||||
|
||||
/* Disable fallback malloc/free */
|
||||
#define WOLFSSL_NO_MALLOC
|
||||
#if 1
|
||||
#define WOLFSSL_MALLOC_CHECK /* trap malloc failure */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Memory callbacks */
|
||||
#if 0
|
||||
#undef USE_WOLFSSL_MEMORY
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
|
||||
/* Use this to measure / print heap usage */
|
||||
#if 1
|
||||
#undef WOLFSSL_TRACK_MEMORY
|
||||
#define WOLFSSL_TRACK_MEMORY
|
||||
|
||||
#undef WOLFSSL_DEBUG_MEMORY
|
||||
#define WOLFSSL_DEBUG_MEMORY
|
||||
#endif
|
||||
#else
|
||||
#ifndef WOLFSSL_STATIC_MEMORY
|
||||
#define NO_WOLFSSL_MEMORY
|
||||
/* Otherwise we will use stdlib malloc, free and realloc */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -304,6 +449,7 @@ extern "C" {
|
||||
/* Override Current Time */
|
||||
/* Allows custom "custom_time()" function to be used for benchmark */
|
||||
#define WOLFSSL_USER_CURRTIME
|
||||
#define WOLFSSL_GMTIME
|
||||
#define USER_TICKS
|
||||
extern unsigned long my_time(unsigned long* timer);
|
||||
#define XTIME my_time
|
||||
@@ -312,16 +458,16 @@ extern unsigned long my_time(unsigned long* timer);
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* RNG */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Seed Source */
|
||||
/* Size of returned HW RNG value */
|
||||
#define CUSTOM_RAND_TYPE unsigned int
|
||||
|
||||
/* Seed source */
|
||||
extern unsigned int custom_rand_generate(void);
|
||||
extern unsigned int my_rng_seed_gen(void);
|
||||
#undef CUSTOM_RAND_GENERATE
|
||||
#define CUSTOM_RAND_GENERATE custom_rand_generate
|
||||
#define CUSTOM_RAND_GENERATE my_rng_seed_gen
|
||||
|
||||
/* Choose RNG method */
|
||||
#if 0
|
||||
#if 1
|
||||
/* Use built-in P-RNG (SHA256 based) with HW RNG */
|
||||
/* P-RNG + HW RNG (P-RNG is ~8K) */
|
||||
#undef HAVE_HASHDRBG
|
||||
@@ -331,20 +477,67 @@ extern unsigned int custom_rand_generate(void);
|
||||
#define WC_NO_HASHDRBG
|
||||
|
||||
/* Bypass P-RNG and use only HW RNG */
|
||||
extern int custom_rand_generate_block(unsigned char* output, unsigned int sz);
|
||||
extern int my_rng_gen_block(unsigned char* output, unsigned int sz);
|
||||
#undef CUSTOM_RAND_GENERATE_BLOCK
|
||||
#define CUSTOM_RAND_GENERATE_BLOCK custom_rand_generate_block
|
||||
#define CUSTOM_RAND_GENERATE_BLOCK my_rng_gen_block
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Custom Standard Lib */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Allows override of all standard library functions */
|
||||
#undef STRING_USER
|
||||
#if 0
|
||||
#define STRING_USER
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#undef USE_WOLF_STRSEP
|
||||
#define USE_WOLF_STRSEP
|
||||
#define XSTRSEP(s1,d) wc_strsep((s1),(d))
|
||||
|
||||
#undef USE_WOLF_STRTOK
|
||||
#define USE_WOLF_STRTOK
|
||||
#define XSTRTOK(s1,d,ptr) wc_strtok((s1),(d),(ptr))
|
||||
|
||||
#define XSTRNSTR(s1,s2,n) mystrnstr((s1),(s2),(n))
|
||||
|
||||
#define XMEMCPY(d,s,l) memcpy((d),(s),(l))
|
||||
#define XMEMSET(b,c,l) memset((b),(c),(l))
|
||||
#define XMEMCMP(s1,s2,n) memcmp((s1),(s2),(n))
|
||||
#define XMEMMOVE(d,s,l) memmove((d),(s),(l))
|
||||
|
||||
#define XSTRLEN(s1) strlen((s1))
|
||||
#define XSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n))
|
||||
#define XSTRSTR(s1,s2) strstr((s1),(s2))
|
||||
|
||||
#define XSTRNCMP(s1,s2,n) strncmp((s1),(s2),(n))
|
||||
#define XSTRNCAT(s1,s2,n) strncat((s1),(s2),(n))
|
||||
#define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n))
|
||||
|
||||
#define XSNPRINTF snprintf
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Enable Features */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef WOLFSSL_TLS13
|
||||
#if 0
|
||||
#undef WOLFSSL_TLS13
|
||||
#define WOLFSSL_TLS13
|
||||
#endif
|
||||
|
||||
#undef WOLFSSL_KEY_GEN
|
||||
#if 0
|
||||
#define WOLFSSL_KEY_GEN
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_FIPS) && !defined(WOLFSSL_KEY_GEN)
|
||||
#define WOLFSSL_OLD_PRIME_CHECK
|
||||
#endif
|
||||
|
||||
#undef KEEP_PEER_CERT
|
||||
//#define KEEP_PEER_CERT
|
||||
|
||||
@@ -407,12 +600,6 @@ extern unsigned int custom_rand_generate(void);
|
||||
#undef NO_DSA
|
||||
#define NO_DSA
|
||||
|
||||
#undef NO_DH
|
||||
#define NO_DH
|
||||
|
||||
#undef NO_DES3
|
||||
#define NO_DES3
|
||||
|
||||
#undef NO_RC4
|
||||
#define NO_RC4
|
||||
|
||||
|
||||
@@ -13,4 +13,4 @@ WolfSSLStaticLib:
|
||||
|
||||
clean:
|
||||
rm -f $(BUILD_DIR)/*.elf $(BUILD_DIR)/*.hex $(BUILD_DIR)/*.map
|
||||
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm
|
||||
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.a $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm
|
||||
|
||||
@@ -5,51 +5,9 @@ CMD_ECHO =
|
||||
BUILD_DIR = ./Build
|
||||
|
||||
# Toolchain location and prefix
|
||||
#TOOLCHAIN =
|
||||
TOOLCHAIN = /opt/gcc-arm-none-eabi/bin/arm-none-eabi-
|
||||
|
||||
INC = -I./Header \
|
||||
-I./Source \
|
||||
-I../..
|
||||
|
||||
# Memory Map
|
||||
SRC_LD = -T./linker.ld
|
||||
|
||||
# Defines
|
||||
DEF = -DWOLFSSL_USER_SETTINGS
|
||||
|
||||
# Compiler and linker flags
|
||||
ARCHFLAGS = -mcpu=cortex-m0 -mthumb -mabi=aapcs
|
||||
DBGFLAGS = -ggdb
|
||||
ASFLAGS = $(ARCHFLAGS)
|
||||
|
||||
# CC: Place functions and data into separate sections to allow dead code removal
|
||||
# by the linker (-f*-sections). Enable link time optimization (-flto)
|
||||
CFLAGS = $(ARCHFLAGS) -std=gnu99 -Wall -Wno-cpp \
|
||||
-ffunction-sections -fdata-sections \
|
||||
-Os -flto $(DBGFLAGS)
|
||||
|
||||
# LD: Remove unused sections
|
||||
LDFLAGS = $(ARCHFLAGS) -Wl,--gc-sections
|
||||
|
||||
# LD: Link with newlib-nano implementation
|
||||
LDFLAGS += --specs=nano.specs --specs=nosys.specs
|
||||
|
||||
# LD: generate map
|
||||
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(BIN).map $(DBGFLAGS)
|
||||
|
||||
# LD: Entry point
|
||||
LDFLAGS += -Wl,-ereset_handler
|
||||
|
||||
# Math lib (for DH)
|
||||
LIBS = -lm
|
||||
|
||||
SRC_C += ./Source/armtarget.c
|
||||
SRC_C += $(wildcard ../../src/*.c ../../wolfcrypt/src/*.c ../../wolfcrypt/benchmark/*.c ../../wolfcrypt/test/*.c)
|
||||
FILENAMES_C = $(notdir $(SRC_C))
|
||||
FILENAMES_C := $(filter-out evp.c, $(FILENAMES_C))
|
||||
OBJS_C = $(addprefix $(BUILD_DIR)/, $(FILENAMES_C:.c=.o))
|
||||
vpath %.c $(dir $(SRC_C))
|
||||
|
||||
# Tools selection
|
||||
CC = $(TOOLCHAIN)gcc
|
||||
AS = $(TOOLCHAIN)gcc
|
||||
@@ -60,6 +18,147 @@ OBJCOPY = $(TOOLCHAIN)objcopy
|
||||
OBJDUMP = $(TOOLCHAIN)objdump
|
||||
SIZE = $(TOOLCHAIN)size
|
||||
|
||||
# Includes
|
||||
INC = -I./Header \
|
||||
-I./Source \
|
||||
-I../..
|
||||
|
||||
# Defines
|
||||
DEF = -DWOLFSSL_USER_SETTINGS
|
||||
|
||||
# Architecture
|
||||
ARCHFLAGS = -mcpu=cortex-m0 -mthumb -mabi=aapcs -DUSE_WOLF_ARM_STARTUP
|
||||
#ARCHFLAGS = -mcpu=cortex-r5 -mthumb -mabi=aapcs
|
||||
#ARCHFLAGS = -mcpu=cortex-a53 -mthumb -mabi=aapcs
|
||||
|
||||
# Compiler and linker flags
|
||||
ASFLAGS = $(ARCHFLAGS)
|
||||
CFLAGS = $(ARCHFLAGS) -std=gnu99 -Wall -Wno-cpp
|
||||
LDFLAGS = $(ARCHFLAGS)
|
||||
|
||||
# LD: Link with nosys
|
||||
LDFLAGS += --specs=nosys.specs
|
||||
|
||||
# LD: Link with nano or rdimon implementation for standard library
|
||||
LDFLAGS += --specs=nano.specs
|
||||
#LDFLAGS += --specs=rdimon.specs
|
||||
|
||||
# LD: generate map
|
||||
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(BIN).map
|
||||
|
||||
# LD: Entry point
|
||||
LDFLAGS += -Wl,-ereset_handler
|
||||
|
||||
# Math lib (for DH)
|
||||
LIBS = -lm
|
||||
|
||||
# Memory Map
|
||||
SRC_LD = -T./linker.ld
|
||||
|
||||
# Optimization level and place functions / data into separate sections to allow dead code removal
|
||||
CFLAGS += -Os -ffunction-sections -fdata-sections -fno-builtin
|
||||
# Remove unused sections and link time optimizations
|
||||
LDFLAGS += -Wl,--gc-sections -flto
|
||||
|
||||
# Debugging
|
||||
#DBGFLAGS = -ggdb -g3
|
||||
CFLAGS += $(DBGFLAGS)
|
||||
LDFLAGS += $(DBGFLAGS)
|
||||
|
||||
|
||||
# FILES
|
||||
|
||||
# Port and Test/Benchmark
|
||||
SRC_C += ./Source/wolf_main.c
|
||||
SRC_C += ./Source/armtarget.c
|
||||
SRC_C += ../../wolfcrypt/test/test.c
|
||||
SRC_C += ../../wolfcrypt/benchmark/benchmark.c
|
||||
|
||||
# WOLFSSL TLS FILES
|
||||
SRC_C += ../../src/crl.c
|
||||
SRC_C += ../../src/internal.c
|
||||
SRC_C += ../../src/keys.c
|
||||
SRC_C += ../../src/ocsp.c
|
||||
SRC_C += ../../src/sniffer.c
|
||||
SRC_C += ../../src/ssl.c
|
||||
SRC_C += ../../src/tls.c
|
||||
SRC_C += ../../src/tls13.c
|
||||
SRC_C += ../../src/wolfio.c
|
||||
|
||||
# wolfCrypt Core (FIPS)
|
||||
SRC_C += ../../wolfcrypt/src/wolfcrypt_first.c
|
||||
SRC_C += ../../wolfcrypt/src/aes.c
|
||||
SRC_C += ../../wolfcrypt/src/cmac.c
|
||||
SRC_C += ../../wolfcrypt/src/des3.c
|
||||
SRC_C += ../../wolfcrypt/src/dh.c
|
||||
SRC_C += ../../wolfcrypt/src/ecc.c
|
||||
SRC_C += ../../wolfcrypt/src/hmac.c
|
||||
SRC_C += ../../wolfcrypt/src/random.c
|
||||
SRC_C += ../../wolfcrypt/src/rsa.c
|
||||
SRC_C += ../../wolfcrypt/src/sha.c
|
||||
SRC_C += ../../wolfcrypt/src/sha256.c
|
||||
SRC_C += ../../wolfcrypt/src/sha512.c
|
||||
SRC_C += ../../wolfcrypt/src/sha3.c
|
||||
SRC_C += ../../wolfcrypt/src/fips.c
|
||||
SRC_C += ../../wolfcrypt/src/fips_test.c
|
||||
SRC_C += ../../wolfcrypt/src/wolfcrypt_last.c
|
||||
|
||||
# wolfCrypt Additional
|
||||
SRC_C += ../../wolfcrypt/src/asn.c
|
||||
SRC_C += ../../wolfcrypt/src/chacha.c
|
||||
SRC_C += ../../wolfcrypt/src/cmac.c
|
||||
SRC_C += ../../wolfcrypt/src/coding.c
|
||||
SRC_C += ../../wolfcrypt/src/compress.c
|
||||
SRC_C += ../../wolfcrypt/src/cpuid.c
|
||||
SRC_C += ../../wolfcrypt/src/cryptocb.c
|
||||
SRC_C += ../../wolfcrypt/src/curve25519.c
|
||||
SRC_C += ../../wolfcrypt/src/ed25519.c
|
||||
SRC_C += ../../wolfcrypt/src/error.c
|
||||
SRC_C += ../../wolfcrypt/src/fe_low_mem.c
|
||||
SRC_C += ../../wolfcrypt/src/fe_operations.c
|
||||
SRC_C += ../../wolfcrypt/src/ge_low_mem.c
|
||||
SRC_C += ../../wolfcrypt/src/ge_operations.c
|
||||
SRC_C += ../../wolfcrypt/src/hash.c
|
||||
SRC_C += ../../wolfcrypt/src/integer.c
|
||||
SRC_C += ../../wolfcrypt/src/logging.c
|
||||
SRC_C += ../../wolfcrypt/src/md5.c
|
||||
SRC_C += ../../wolfcrypt/src/memory.c
|
||||
SRC_C += ../../wolfcrypt/src/misc.c
|
||||
SRC_C += ../../wolfcrypt/src/pkcs12.c
|
||||
SRC_C += ../../wolfcrypt/src/pkcs7.c
|
||||
SRC_C += ../../wolfcrypt/src/poly1305.c
|
||||
SRC_C += ../../wolfcrypt/src/pwdbased.c
|
||||
SRC_C += ../../wolfcrypt/src/signature.c
|
||||
SRC_C += ../../wolfcrypt/src/srp.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_arm32.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_arm64.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_c32.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_int.c
|
||||
SRC_C += ../../wolfcrypt/src/tfm.c
|
||||
SRC_C += ../../wolfcrypt/src/wc_encrypt.c
|
||||
SRC_C += ../../wolfcrypt/src/wc_port.c
|
||||
SRC_C += ../../wolfcrypt/src/wolfevent.c
|
||||
SRC_C += ../../wolfcrypt/src/wolfmath.c
|
||||
|
||||
# wolfCrypt non-standard algorithms (disabled by default)
|
||||
SRC_C += ../../wolfcrypt/src/arc4.c
|
||||
SRC_C += ../../wolfcrypt/src/blake2b.c
|
||||
SRC_C += ../../wolfcrypt/src/camellia.c
|
||||
SRC_C += ../../wolfcrypt/src/dsa.c
|
||||
SRC_C += ../../wolfcrypt/src/hc128.c
|
||||
SRC_C += ../../wolfcrypt/src/idea.c
|
||||
SRC_C += ../../wolfcrypt/src/md2.c
|
||||
SRC_C += ../../wolfcrypt/src/md4.c
|
||||
SRC_C += ../../wolfcrypt/src/rabbit.c
|
||||
SRC_C += ../../wolfcrypt/src/ripemd.c
|
||||
|
||||
|
||||
FILENAMES_C = $(notdir $(SRC_C))
|
||||
FILENAMES_C := $(filter-out evp.c, $(FILENAMES_C))
|
||||
OBJS_C = $(addprefix $(BUILD_DIR)/, $(FILENAMES_C:.c=.o))
|
||||
vpath %.c $(dir $(SRC_C))
|
||||
|
||||
|
||||
build_hex: $(BUILD_DIR) $(BUILD_DIR)/$(BIN).hex
|
||||
@echo ""
|
||||
$(CMD_ECHO) @$(SIZE) $(BUILD_DIR)/$(BIN).elf
|
||||
@@ -90,6 +189,9 @@ $(BUILD_DIR)/$(BIN).elf: $(OBJS_ASM) $(OBJS_C)
|
||||
@echo "Generating name list: $(BIN).sym"
|
||||
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
|
||||
|
||||
@echo "Showing final size:"
|
||||
$(CMD_ECHO) ls -la $@
|
||||
|
||||
@echo "Generating disassembly: $(BIN).disasm"
|
||||
$(CMD_ECHO) $(OBJDUMP) -S $@ > $(BUILD_DIR)/$(BIN).disasm
|
||||
|
||||
@@ -100,6 +202,9 @@ $(BUILD_DIR)/$(BIN).a: $(OBJS_ASM) $(OBJS_C)
|
||||
@echo "Generating name list: $(BIN).sym"
|
||||
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
|
||||
|
||||
@echo "Showing final size:"
|
||||
$(CMD_ECHO) ls -la $@
|
||||
|
||||
@echo "Generating disassembly: $(BIN).disasm"
|
||||
$(CMD_ECHO) $(OBJDUMP) -S $@ > $(BUILD_DIR)/$(BIN).disasm
|
||||
|
||||
|
||||
@@ -14,36 +14,92 @@ This example is for Cortex M series, but can be adopted for other architectures.
|
||||
1. Make sure you have `gcc-arm-none-eabi` installed.
|
||||
2. Modify the `Makefile.common`:
|
||||
* Use correct toolchain path `TOOLCHAIN`.
|
||||
* Use correct architecture 'ARCHFLAGS' (default is cortex-m0 / thumb). See [GCC ARM Options](https://gcc.gnu.org/onlinedocs/gcc-4.7.3/gcc/ARM-Options.html) `-mcpu=name`.
|
||||
3. Use `make` and it will build the static library and wolfCrypt test/benchmark and wolfSSL TLS client targets as `.elf` and `.hex` in `/Build`.
|
||||
* Use correct architecture 'ARCHFLAGS'. See [GCC ARM Options](https://gcc.gnu.org/onlinedocs/gcc-4.7.3/gcc/ARM-Options.html) `-mcpu=name`.
|
||||
* Confirm memory map in linker.ld matches your flash/ram or comment out `SRC_LD = -T./linker.ld` in Makefile.common.
|
||||
3. Use `make` to build the static library (libwolfssl.a), wolfCrypt test/benchmark and wolfSSL TLS client targets as `.elf` and `.hex` in `/Build`.
|
||||
|
||||
### Building for Raspberry Pi
|
||||
|
||||
Example `Makefile.common` changes for Rasperry Pi with Cortex-A53:
|
||||
## Building for Raspberry Pi
|
||||
|
||||
1. Change ARCHFLAGS to `ARCHFLAGS = -mcpu=cortex-a53 -mthumb -mabi=aapcs` to specify Cortex-A53.
|
||||
Example `Makefile.common` changes for Raspberry Pi with Cortex-A53:
|
||||
|
||||
1. In Makefile.common change `ARCHFLAGS` to `-mcpu=cortex-a53 -mthumb`.
|
||||
2. Comment out `SRC_LD`, since custom memory map is not applicable.
|
||||
3. Clear `TOOLCHAIN`, so it will use default `gcc`. Set `TOOLCHAIN = `
|
||||
4. Comment out `LDFLAGS += --specs=nano.specs --specs=nosys.specs` to disable newlib-nano.
|
||||
4. Comment out `LDFLAGS += --specs=nano.specs` and `LDFLAGS += --specs=nosys.specs` to nosys and nano.
|
||||
|
||||
Note: To comment out a line in a Makefile use place `#` in front of line.
|
||||
|
||||
### Example Build
|
||||
## Building for FIPS
|
||||
|
||||
1. Request evaluation from wolfSSL by emailing fips@wolfss.com.
|
||||
2. Modify user_settings.h so section for `HAVE_FIPS` is enabled.
|
||||
3. Use `make`.
|
||||
4. Run the wolfCrypt test `./Build/WolfCryptTest.elf` to generate the FIPS boundary HASH
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
$ Crypt Test
|
||||
error test passed!
|
||||
base64 test passed!
|
||||
base16 test passed!
|
||||
asn test passed!
|
||||
in my Fips callback, ok = 0, err = -203
|
||||
message = In Core Integrity check FIPS error
|
||||
hash = F607C7B983D1D283590448A56381DE460F1E83CB02584F4D77B7F2C583A8F5CD
|
||||
In core integrity hash check failure, copy above hash
|
||||
into verifyCore[] in fips_test.c and rebuild
|
||||
SHA test failed!
|
||||
error = -1802
|
||||
Crypt Test: Return code -1
|
||||
```
|
||||
|
||||
5. Update the `../../wolfcrypt/src/fips_test.c` array `static const char verifyCore[] = {}` with the correct core hash check.
|
||||
6. Build again using `make`.
|
||||
7. Run the wolfCrypt test.
|
||||
|
||||
## Building with configure
|
||||
|
||||
The configure script in the main project directory can perform a cross-compile
|
||||
build with the the gcc-arm-none-eabi tools. Assuming the tools are installed in
|
||||
your executable path:
|
||||
|
||||
```
|
||||
$ ./configure \
|
||||
--host=arm-non-eabi \
|
||||
CC=arm-none-eabi-gcc \
|
||||
AR=arm-none-eabi-ar \
|
||||
STRIP=arm-none-eabi-strip \
|
||||
RANLIB=arm-none-eabi-ranlib \
|
||||
--prefix=/path/to/build/wolfssl-arm \
|
||||
CFLAGS="-march=armv8-a --specs=nosys.specs \
|
||||
-DHAVE_PK_CALLBACKS -DWOLFSSL_USER_IO -DNO_WRITEV" \
|
||||
--disable-filesystem --enable-fastmath \
|
||||
--disable-shared
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
If you are building for a 32-bit architecture, add `-DTIME_T_NOT_64BIT` to the
|
||||
list of CFLAGS.
|
||||
|
||||
## Example Build Output
|
||||
|
||||
```
|
||||
make clean && make
|
||||
|
||||
text data bss dec hex filename
|
||||
50076 2508 44 52628 cd94 ./Build/WolfCryptTest.elf
|
||||
text data bss dec hex filename
|
||||
50076 2508 44 52628 cd94 ./Build/WolfCryptTest.elf
|
||||
|
||||
text data bss dec hex filename
|
||||
39155 2508 60 41723 a2fb ./Build/WolfCryptBench.elf
|
||||
text data bss dec hex filename
|
||||
39155 2508 60 41723 a2fb ./Build/WolfCryptBench.elf
|
||||
|
||||
text data bss dec hex filename
|
||||
70368 464 36 70868 114d4 ./Build/WolfSSLClient.elf
|
||||
text data bss dec hex filename
|
||||
70368 464 36 70868 114d4 ./Build/WolfSSLClient.elf
|
||||
```
|
||||
|
||||
## Performace Tuning Options
|
||||
## Performance Tuning Options
|
||||
|
||||
These settings are located in `Header/user_settings.h`.
|
||||
|
||||
@@ -57,7 +113,7 @@ These settings are located in `Header/user_settings.h`.
|
||||
* `ECC_TIMING_RESISTANT`: Enables timing resistance for ECC and uses slightly less memory.
|
||||
* `ECC_SHAMIR`: Doubles heap usage, but slightly faster
|
||||
* `RSA_LOW_MEM`: Half as much memory but twice as slow. Uses Non-CRT method for private key.
|
||||
AES GCM: `GCM_SMALL`, `GCM_WORD32` or `GCM_TABLE`: Tunes performance and flash/memory usage.
|
||||
* AES GCM: `GCM_SMALL`, `GCM_WORD32` or `GCM_TABLE`: Tunes performance and flash/memory usage.
|
||||
* `CURVED25519_SMALL`: Enables small versions of Ed/Curve (FE/GE math).
|
||||
* `USE_SLOW_SHA`: Enables smaller/slower version of SHA.
|
||||
* `USE_SLOW_SHA256`: About 2k smaller and about 25% slower
|
||||
@@ -65,3 +121,5 @@ AES GCM: `GCM_SMALL`, `GCM_WORD32` or `GCM_TABLE`: Tunes performance and flash/m
|
||||
* `USE_CERT_BUFFERS_1024` or `USE_CERT_BUFFERS_2048`: Size of RSA certs / keys to test with.
|
||||
* `BENCH_EMBEDDED`: Define this if using the wolfCrypt test/benchmark and using a low memory target.
|
||||
* `ECC_USER_CURVES`: Allows user to defines curve sizes to enable. Default is 256-bit on. To enable others use `HAVE_ECC192`, `HAVE_ECC224`, etc....
|
||||
* `TFM_ARM`, `TFM_SSE2`, `TFM_AVR32`, `TFM_PPC32`, `TFM_MIPS`, `TFM_X86` or `TFM_X86_64`: These are assembly optimizations available with USE_FAST_MATH.
|
||||
* Single Precision Math for ARM: See `WOLFSSL_SP`. Optimized math for ARM performance of specific RSA, DH and ECC algorithms.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* armtarget.c
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -29,13 +29,9 @@
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Test to determine if ARM Cortex M */
|
||||
#if defined(__arm__) && defined(__ARM_ARCH) && (__ARM_ARCH == 6 || __ARM_ARCH == 7)
|
||||
#define CORTEX_M_SERIES
|
||||
#endif
|
||||
|
||||
#ifdef USE_WOLF_ARM_STARTUP
|
||||
|
||||
#ifdef CORTEX_M_SERIES
|
||||
/* Memory initialization */
|
||||
extern uint32_t __data_load_start__[];
|
||||
extern uint32_t __data_start__[];
|
||||
@@ -63,12 +59,12 @@ void meminit32(uint32_t* start, uint32_t* end)
|
||||
*start++ = 0;
|
||||
}
|
||||
}
|
||||
#endif /* CORTEX_M_SERIES */
|
||||
#endif /* USE_WOLF_ARM_STARTUP */
|
||||
|
||||
/* Entry Point */
|
||||
void reset_handler(void)
|
||||
{
|
||||
#ifdef CORTEX_M_SERIES
|
||||
#ifdef USE_WOLF_ARM_STARTUP
|
||||
/* Init sections */
|
||||
memcpy32(__data_load_start__, __data_start__, __data_end__);
|
||||
meminit32(__bss_start__, __bss_end__);
|
||||
@@ -76,7 +72,7 @@ void reset_handler(void)
|
||||
/* Init heap */
|
||||
__heap_start__[0] = 0;
|
||||
__heap_start__[1] = ((uint32_t)__heap_end__ - (uint32_t)__heap_start__);
|
||||
#endif /* CORTEX_M_SERIES */
|
||||
#endif /* USE_WOLF_ARM_STARTUP */
|
||||
|
||||
/* Start main */
|
||||
extern int main(void);
|
||||
@@ -86,7 +82,7 @@ void reset_handler(void)
|
||||
while(1);
|
||||
}
|
||||
|
||||
#ifdef CORTEX_M_SERIES
|
||||
#ifdef USE_WOLF_ARM_STARTUP
|
||||
// Vector Exception/Interrupt Handlers
|
||||
static void Default_Handler(void)
|
||||
{
|
||||
@@ -186,7 +182,7 @@ void HardFault_Handler(void)
|
||||
);
|
||||
}
|
||||
|
||||
// Vectors
|
||||
/* Vectors Table */
|
||||
typedef void (*vector_entry)(void);
|
||||
const vector_entry vectors[] __attribute__ ((section(".vectors"),used)) =
|
||||
{
|
||||
@@ -211,71 +207,4 @@ const vector_entry vectors[] __attribute__ ((section(".vectors"),used)) =
|
||||
|
||||
/* remainder go below */
|
||||
};
|
||||
#endif /* CORTEX_M_SERIES */
|
||||
|
||||
|
||||
/* TIME CODE */
|
||||
/* TODO: Implement real RTC */
|
||||
static int gTimeMs;
|
||||
static int hw_get_time_sec(void)
|
||||
{
|
||||
return ++gTimeMs;
|
||||
}
|
||||
|
||||
unsigned long my_time(unsigned long* timer)
|
||||
{
|
||||
(void)timer;
|
||||
return hw_get_time_sec();
|
||||
}
|
||||
|
||||
unsigned int LowResTimer(void)
|
||||
{
|
||||
return hw_get_time_sec();
|
||||
}
|
||||
|
||||
double current_time(int reset)
|
||||
{
|
||||
double time;
|
||||
int timeMs = gTimeMs;
|
||||
(void)reset;
|
||||
time = (timeMs / 1000); // sec
|
||||
time += (double)(timeMs % 1000) / 1000; // ms
|
||||
return time;
|
||||
}
|
||||
|
||||
|
||||
/* RNG CODE */
|
||||
/* TODO: Implement real RNG */
|
||||
static int gCounter;
|
||||
int hw_rand(void)
|
||||
{
|
||||
return ++gCounter;
|
||||
}
|
||||
|
||||
unsigned int custom_rand_generate(void)
|
||||
{
|
||||
return hw_rand();
|
||||
}
|
||||
|
||||
int custom_rand_generate_block(unsigned char* output, unsigned int sz)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
|
||||
while (i < sz)
|
||||
{
|
||||
/* If not aligned or there is odd/remainder */
|
||||
if( (i + sizeof(CUSTOM_RAND_TYPE)) > sz ||
|
||||
((uint32_t)&output[i] % sizeof(CUSTOM_RAND_TYPE)) != 0
|
||||
) {
|
||||
/* Single byte at a time */
|
||||
output[i++] = (unsigned char)custom_rand_generate();
|
||||
}
|
||||
else {
|
||||
/* Use native 8, 16, 32 or 64 copy instruction */
|
||||
*((CUSTOM_RAND_TYPE*)&output[i]) = custom_rand_generate();
|
||||
i += sizeof(CUSTOM_RAND_TYPE);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* USE_WOLF_ARM_STARTUP */
|
||||
|
||||
@@ -20,10 +20,12 @@
|
||||
*/
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef NO_CRYPT_BENCHMARK
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
char** argv;
|
||||
@@ -31,17 +33,22 @@ typedef struct func_args {
|
||||
} func_args;
|
||||
|
||||
static func_args args = { 0 } ;
|
||||
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ret;
|
||||
#ifndef NO_CRYPT_BENCHMARK
|
||||
wolfCrypt_Init();
|
||||
|
||||
printf("\nBenchmark Test\n");
|
||||
benchmark_test(&args);
|
||||
printf("Benchmark Test: Return code %d\n", args.return_code);
|
||||
ret = args.return_code;
|
||||
printf("Benchmark Test: Return code %d\n", ret);
|
||||
|
||||
wolfCrypt_Cleanup();
|
||||
|
||||
return 0;
|
||||
#else
|
||||
ret = NOT_COMPILED_IN;
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,11 @@
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfcrypt/test/test.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef NO_CRYPT_TEST
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
char** argv;
|
||||
@@ -32,16 +34,22 @@ typedef struct func_args {
|
||||
} func_args;
|
||||
|
||||
static func_args args = { 0 } ;
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ret;
|
||||
#ifndef NO_CRYPT_TEST
|
||||
wolfCrypt_Init();
|
||||
|
||||
printf("\nCrypt Test\n");
|
||||
wolfcrypt_test(&args);
|
||||
printf("Crypt Test: Return code %d\n", args.return_code);
|
||||
ret = args.return_code;
|
||||
printf("Crypt Test: Return code %d\n", ret);
|
||||
|
||||
wolfCrypt_Cleanup();
|
||||
|
||||
return 0;
|
||||
#else
|
||||
ret = NOT_COMPILED_IN;
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
|
||||
#ifndef WOLFCRYPT_ONLY
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#include <stdio.h>
|
||||
@@ -182,17 +186,22 @@ fail:
|
||||
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifndef WOLFCRYPT_ONLY
|
||||
wolfSSL_Init();
|
||||
|
||||
ret = tls_client();
|
||||
|
||||
wolfSSL_Cleanup();
|
||||
#else
|
||||
ret = NOT_COMPILED_IN;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
142
IDE/GCC-ARM/Source/wolf_main.c
Normal file
142
IDE/GCC-ARM/Source/wolf_main.c
Normal file
@@ -0,0 +1,142 @@
|
||||
/* wolf_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/random.h> /* for CUSTOM_RAND_TYPE */
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* TIME CODE */
|
||||
/* TODO: Implement real RTC */
|
||||
/* Optionally you can define NO_ASN_TIME to disable all cert time checks */
|
||||
static int gTimeMs;
|
||||
static int hw_get_time_sec(void)
|
||||
{
|
||||
#warning Must implement your own time source if validating certificates
|
||||
|
||||
return ++gTimeMs;
|
||||
}
|
||||
|
||||
/* This is used by wolfCrypt asn.c for cert time checking */
|
||||
unsigned long my_time(unsigned long* timer)
|
||||
{
|
||||
(void)timer;
|
||||
return hw_get_time_sec();
|
||||
}
|
||||
|
||||
#ifndef WOLFCRYPT_ONLY
|
||||
/* This is used by TLS only */
|
||||
unsigned int LowResTimer(void)
|
||||
{
|
||||
return hw_get_time_sec();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NO_CRYPT_BENCHMARK
|
||||
/* This is used by wolfCrypt benchmark tool only */
|
||||
double current_time(int reset)
|
||||
{
|
||||
double time;
|
||||
int timeMs = gTimeMs;
|
||||
(void)reset;
|
||||
time = (timeMs / 1000); // sec
|
||||
time += (double)(timeMs % 1000) / 1000; // ms
|
||||
return time;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* RNG CODE */
|
||||
/* TODO: Implement real RNG */
|
||||
static unsigned int gCounter;
|
||||
unsigned int hw_rand(void)
|
||||
{
|
||||
#warning Must implement your own random source
|
||||
|
||||
return ++gCounter;
|
||||
}
|
||||
|
||||
unsigned int my_rng_seed_gen(void)
|
||||
{
|
||||
return hw_rand();
|
||||
}
|
||||
|
||||
int my_rng_gen_block(unsigned char* output, unsigned int sz)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
|
||||
while (i < sz)
|
||||
{
|
||||
/* If not aligned or there is odd/remainder */
|
||||
if( (i + sizeof(CUSTOM_RAND_TYPE)) > sz ||
|
||||
((uint32_t)&output[i] % sizeof(CUSTOM_RAND_TYPE)) != 0
|
||||
) {
|
||||
/* Single byte at a time */
|
||||
output[i++] = (unsigned char)my_rng_seed_gen();
|
||||
}
|
||||
else {
|
||||
/* Use native 8, 16, 32 or 64 copy instruction */
|
||||
*((CUSTOM_RAND_TYPE*)&output[i]) = my_rng_seed_gen();
|
||||
i += sizeof(CUSTOM_RAND_TYPE);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef XMALLOC_OVERRIDE
|
||||
void *myMalloc(size_t n, void* heap, int type)
|
||||
{
|
||||
(void)n;
|
||||
(void)heap;
|
||||
(void)type;
|
||||
|
||||
#warning Must implement your own malloc
|
||||
|
||||
return NULL;
|
||||
}
|
||||
void myFree(void *p, void* heap, int type)
|
||||
{
|
||||
(void)p;
|
||||
(void)heap;
|
||||
(void)type;
|
||||
|
||||
#warning Must implement your own free
|
||||
}
|
||||
|
||||
/* Required for normal math (!USE_FAST_MATH) */
|
||||
void *myRealloc(void *p, size_t n, void* heap, int type)
|
||||
{
|
||||
(void)p;
|
||||
(void)n;
|
||||
(void)heap;
|
||||
(void)type;
|
||||
|
||||
#warning Must implement your own realloc
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif /* XMALLOC_OVERRIDE */
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Header/user_settings.h
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/armtarget.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/wolf_main.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/benchmark_main.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/test_main.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/tls_client.c
|
||||
|
||||
@@ -937,7 +937,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>IarchiveOutput</name>
|
||||
<state>C:\wolfSSL\Support\EWARM\wolfssl\IDE\IAR-EWARM\Projects\lib\ewarm\Exe\wolfSSL-Lib.a</state>
|
||||
<state>$PROJ_DIR$\..\lib\ewarm\Exe\wolfSSL-Lib.a</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
@@ -1960,9 +1960,6 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\error.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\evp.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\fe_low_mem.c</name>
|
||||
</file>
|
||||
@@ -2045,7 +2042,19 @@
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\signature.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp.c</name>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_arm32.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_arm64.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_c32.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_c64.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_int.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\srp.c</name>
|
||||
@@ -2068,9 +2077,6 @@
|
||||
</group>
|
||||
<group>
|
||||
<name>wolfSSL</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\src\bio.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\src\crl.c</name>
|
||||
</file>
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define NO_WOLF_C99
|
||||
#define NO_MULTIBYTE_PRINT
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define WOLFSSL_GENSEED_FORTEST /* Wardning: define your own seed gen */
|
||||
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
|
||||
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#define WOLFSSL_CURRTIME_OSTICK /* use OS tich for current_time */
|
||||
#define WOLFSSL_GMTIME
|
||||
|
||||
#define NO_MULTIBYTE_PRINT
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
#define WOLFSSL_CURRTIME_OSTICK /* use OS tich for current_time */
|
||||
#define WOLFSSL_GMTIME
|
||||
#define NO_MULTIBYTE_PRINT
|
||||
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
|
||||
|
||||
// <h>Common options
|
||||
// <o> MPU<0=>Undefined<1=>STM32F2xx<2=>STM32F4xx<3=>STM32F7xx
|
||||
#define MDK_CONF_MPU 3
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
#define WOLFSSL_CURRTIME_OSTICK /* use OS tich for current_time */
|
||||
#define WOLFSSL_GMTIME
|
||||
#define NO_MULTIBYTE_PRINT
|
||||
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
|
||||
|
||||
@@ -13,12 +13,11 @@ This is a sample test application. It runs "wolfcrypt_test" suite suite repeated
|
||||
|
||||
# Prerequisits
|
||||
|
||||
You will need to install the "Freescale Kinetis CPU Support Package" in the
|
||||
Rowley Package Manager under Tools -> Pacakge Manager.
|
||||
+You will need to install the "Freescale Kinetis CPU Support Package" and "ARM CPU Support Package" in the Rowley Package Manager under Tools -> Pacakge Manager.
|
||||
|
||||
# Harware Support
|
||||
|
||||
All hardware functions are defined in `kinetis_hw.c` and are currently setup for a Freescale Kinetis K64 Coretx-M4 microcontroller. This file can be customized to work with other Kinetis microcontrollers by editing the top part of the file. Testing for this project was done with the Freescale Kinetis `MK64FN1M0xxx12` using the `TWR-K64F120M`.
|
||||
All hardware functions are defined in `kinetis_hw.c` and are currently setup for a Freescale Kinetis K64 Coretx-M4 microcontroller. This file can be customized to work with other Kinetis microcontrollers by editing the top part of the file. Testing for this project was done with the Freescale Kinetis `MK64FN1M0xxx12` using the `TWR-K64F120M`. To build for the `TWR-K64F120M` or `FRDM-K64F`, define `WOLFSSL_FRDM_K64` in the Preprocessor Definitions section of CrossStudio, or define it in "user_settings.h".
|
||||
|
||||
To create support for a new ARM microcontroller the functions in `hw.h` will need to be implemented.
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ void HardFault_HandlerC( uint32_t *hardfault_args )
|
||||
printf ("BFAR = %x\n", _BFAR);
|
||||
|
||||
// Break into the debugger
|
||||
__asm("BKPT #0\n");
|
||||
__asm("BKPT #0\n");
|
||||
}
|
||||
|
||||
__attribute__( ( naked ) )
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -42,14 +43,35 @@ void main(void)
|
||||
{
|
||||
int test_num = 0;
|
||||
|
||||
wolfCrypt_Init(); /* required for ksdk_port_init */
|
||||
do
|
||||
{
|
||||
/* Used for testing, must have a delay so no data is missed while serial is initializing */
|
||||
#ifdef WOLFSSL_FRDM_K64_JENKINS
|
||||
/* run once */
|
||||
if(test_num == 1){
|
||||
printf("\n&&&&&&&&&&&&& done &&&&&&&&&&&&&&&");
|
||||
delay_us(1000000);
|
||||
break;
|
||||
}
|
||||
delay_us(1000000); /* 1 second */
|
||||
#endif
|
||||
|
||||
|
||||
printf("\nBenchmark Test %d:\n", test_num);
|
||||
benchmark_test(&args);
|
||||
printf("Benchmark Test %d: Return code %d\n", test_num, args.return_code);
|
||||
|
||||
test_num++;
|
||||
} while(args.return_code == 0);
|
||||
|
||||
/*Print this again for redundancy*/
|
||||
#ifdef WOLFSSL_FRDM_K64_JENKINS
|
||||
printf("\n&&&&&&&&&&&&&& done &&&&&&&&&&&&&\n");
|
||||
delay_us(1000000);
|
||||
#endif
|
||||
|
||||
wolfCrypt_Cleanup();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
// $(TargetsDir) location:
|
||||
// On Mac OS/X: Users/USERNAME/Library/Rowley Associates Limited/CrossWorks for ARM/packages/targets/
|
||||
// On Windows: C:/Users/USERNAME/Application Data/Local/Rowley Associates Limited/CrossWorks for ARM/packages/targets/
|
||||
// On Linux: home/USERNAME/.rowley_associates_limited/CrossWorks for ARM/v4/packages/targets/
|
||||
|
||||
// Located in $(TargetsDir)/Kinetis/CMSIS/
|
||||
#ifdef FREESCALE_KSDK_BM
|
||||
@@ -67,17 +68,29 @@
|
||||
#define UART_TX_PORT PORTA /* UART TX Port */
|
||||
#define UART_TX_PIN 2U /* UART TX Pin */
|
||||
#define UART_TX_MUX kPORT_MuxAlt2 /* Kinetis UART pin mux */
|
||||
#elif defined (WOLFSSL_FRDM_K64)
|
||||
#define UART_PORT UART0 /* UART Port */
|
||||
#define UART_TX_PORT PORTB /* UART TX Port */
|
||||
#define UART_TX_PIN 17U /* UART TX Pin */
|
||||
#define UART_TX_MUX 0x3 /* Kinetis UART pin mux */
|
||||
#else
|
||||
#define UART_PORT UART4 /* UART Port */
|
||||
#define UART_TX_PORT PORTE /* UART TX Port */
|
||||
#define UART_TX_PIN 24U /* UART TX Pin */
|
||||
#define UART_TX_MUX 0x3 /* Kinetis UART pin mux */
|
||||
#endif
|
||||
#define UART_BAUD 115200 /* UART Baud Rate */
|
||||
#define UART_BAUD_RATE 115200 /* UART Baud Rate */
|
||||
|
||||
#ifdef WOLFSSL_FRDM_K64
|
||||
#define UART_BAUD UART_BAUD_RATE*8
|
||||
#else
|
||||
#define UART_BAUD UART_BAUD_RATE
|
||||
#endif
|
||||
|
||||
/* Note: You will also need to update the UART clock gate in hw_uart_init (SIM_SCGC1_UART5_MASK) */
|
||||
/* Note: TWR-K60 is UART3, PTC17 */
|
||||
/* Note: FRDM-K64 is UART4, PTE24 */
|
||||
/* Note: FRDM-K64 is UART4, PTE24 or UART0 PTB17 for OpenOCD (SIM_SCGC4_UART0_MASK)*/
|
||||
/* Note: TWR-K64 is UART5, PTE8 */
|
||||
/* Note: FRDM-K82F is LPUART0 A2, LPUART4 PTC15 */
|
||||
|
||||
@@ -130,6 +143,13 @@ static void hw_gpio_init(void)
|
||||
| SIM_SCGC5_PORTE_MASK
|
||||
#endif
|
||||
);
|
||||
|
||||
#if 0 /* Debug clock */
|
||||
/* ClockOut on PTC3 */
|
||||
PORTC->PCR[3] = PORT_PCR_MUX(0x05); /* Alt 5 */
|
||||
SIM_SOPT2 |= SIM_SOPT2_CLKOUTSEL(0); /* FlexBus CLKOUT */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -143,10 +163,14 @@ static void hw_uart_init(void)
|
||||
CLOCK_SetLpuartClock(1); /* MCGPLLCLK */
|
||||
DbgConsole_Init((uint32_t)UART_PORT, UART_BAUD, DEBUG_CONSOLE_DEVICE_TYPE_LPUART, SYS_CLK_HZ);
|
||||
#else
|
||||
/* Enable UART core clock */
|
||||
/* Note: Remember to update me if UART_PORT changes */
|
||||
SIM->SCGC1 |= SIM_SCGC1_UART4_MASK;
|
||||
|
||||
#ifdef WOLFSSL_FRDM_K64
|
||||
/* Enable UART core clock ONLY for FRDM-K64F */
|
||||
SIM->SCGC4 |= SIM_SCGC4_UART0_MASK;
|
||||
#else
|
||||
/* Enable UART core clock */
|
||||
/* Note: Remember to update me if UART_PORT changes */
|
||||
SIM->SCGC1 |= SIM_SCGC1_UART4_MASK;
|
||||
#endif
|
||||
/* Configure UART TX pin */
|
||||
UART_TX_PORT->PCR[UART_TX_PIN] = PORT_PCR_MUX(UART_TX_MUX);
|
||||
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||
#include <wolfcrypt/test/test.h>
|
||||
#include <stdio.h>
|
||||
#include "hw.h"
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
@@ -42,14 +44,34 @@ void main(void)
|
||||
{
|
||||
int test_num = 0;
|
||||
|
||||
wolfCrypt_Init(); /* required for ksdk_port_init */
|
||||
do
|
||||
{
|
||||
/* Used for testing, must have a delay so no data is missed while serial is initializing */
|
||||
#ifdef WOLFSSL_FRDM_K64_JENKINS
|
||||
/* run twice */
|
||||
if(test_num == 2){
|
||||
printf("\n&&&&&&&&&&&&& done &&&&&&&&&&&&&&&");
|
||||
delay_us(1000000);
|
||||
break;
|
||||
}
|
||||
delay_us(1000000); /* 1 second */
|
||||
#endif
|
||||
|
||||
printf("\nCrypt Test %d:\n", test_num);
|
||||
wolfcrypt_test(&args);
|
||||
printf("Crypt Test %d: Return code %d\n", test_num, args.return_code);
|
||||
|
||||
test_num++;
|
||||
} while(args.return_code == 0);
|
||||
|
||||
/*Print this again for redundancy*/
|
||||
#ifdef WOLFSSL_FRDM_K64_JENKINS
|
||||
printf("\n&&&&&&&&&&&&&& done &&&&&&&&&&&&&\n");
|
||||
delay_us(1000000);
|
||||
#endif
|
||||
|
||||
wolfCrypt_Cleanup();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,10 @@ extern "C" {
|
||||
#define SINGLE_THREADED
|
||||
|
||||
#undef WOLFSSL_SMALL_STACK
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
//#define WOLFSSL_SMALL_STACK
|
||||
|
||||
#undef WOLFSSL_SMALL_STACK_CACHE
|
||||
//#define WOLFSSL_SMALL_STACK_CACHE
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@@ -58,7 +61,7 @@ extern "C" {
|
||||
#define HAVE_ECC224
|
||||
#undef NO_ECC256
|
||||
#define HAVE_ECC384
|
||||
#ifndef USE_NXP_LTC /* NXP LTC HW supports up to 512 */
|
||||
#ifndef USE_NXP_LTC /* NXP LTC HW supports up to 384 */
|
||||
#define HAVE_ECC521
|
||||
#endif
|
||||
|
||||
@@ -221,7 +224,7 @@ extern "C" {
|
||||
#endif
|
||||
#ifdef USE_NXP_LTC
|
||||
#define FREESCALE_USE_LTC
|
||||
#define LTC_MAX_ECC_BITS (512)
|
||||
#define LTC_MAX_ECC_BITS (384)
|
||||
#define LTC_MAX_INT_BYTES (256)
|
||||
|
||||
//#define FREESCALE_LTC_TFM_RSA_4096_ENABLE
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
arm_target_loader_applicable_loaders="Flash"
|
||||
arm_target_loader_default_loader="Flash"
|
||||
c_preprocessor_definitions="WOLFSSL_ROWLEY_ARM;WOLFSSL_USER_SETTINGS"
|
||||
c_user_include_directories=".;../;../../;$(TargetsDir);$(TargetsDir)/Kinetis;$(TargetsDir)/Kinetis/CMSIS;$(TargetsDir)/Kinetis/CMSIS/include;$(TargetsDir)/CMSIS_3/CMSIS/include"
|
||||
c_user_include_directories=".;../;../../;$(TargetsDir);$(TargetsDir)/Kinetis;$(TargetsDir)/Kinetis/CMSIS;$(TargetsDir)/Kinetis/CMSIS/include;$(TargetsDir)/CMSIS_4/CMSIS/include;$(TargetsDir)/../CMSIS_4/CMSIS;$(TargetsDir)/../CMSIS_4/CMSIS/Include"
|
||||
debug_register_definition_file="$(TargetsDir)/Kinetis/MK64F12_Peripherals.xml"
|
||||
linker_memory_map_file="$(TargetsDir)/Kinetis/MK64FN1M0xxx12_MemoryMap.xml"
|
||||
linker_memory_map_macros="FLASHSIZE=0x80000;SRAMSIZE=0x20000"
|
||||
@@ -201,7 +201,7 @@
|
||||
arm_target_loader_applicable_loaders="Flash"
|
||||
arm_target_loader_default_loader="Flash"
|
||||
c_preprocessor_definitions="WOLFSSL_ROWLEY_ARM;WOLFSSL_USER_SETTINGS"
|
||||
c_user_include_directories=".;../;../../;$(TargetsDir);$(TargetsDir)/Kinetis;$(TargetsDir)/Kinetis/CMSIS;$(TargetsDir)/Kinetis/CMSIS/include;$(TargetsDir)/CMSIS_3/CMSIS/include"
|
||||
c_user_include_directories=".;../;../../;$(TargetsDir);$(TargetsDir)/Kinetis;$(TargetsDir)/Kinetis/CMSIS;$(TargetsDir)/Kinetis/CMSIS/include;$(TargetsDir)/CMSIS_4/CMSIS/include;$(TargetsDir)/../CMSIS_4/CMSIS;$(TargetsDir)/../CMSIS_4/CMSIS/Include"
|
||||
debug_register_definition_file="$(TargetsDir)/Kinetis/MK64F12_Peripherals.xml"
|
||||
linker_memory_map_file="$(TargetsDir)/Kinetis/MK64FN1M0xxx12_MemoryMap.xml"
|
||||
linker_memory_map_macros="FLASHSIZE=0x80000;SRAMSIZE=0x20000"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<configuration
|
||||
Name="Common"
|
||||
build_output_file_name="$(OutDir)/$(ProjectName)$(LibExt)$(LIB)"
|
||||
c_preprocessor_definitions="WOLFSSL_ROWLEY_ARM;WOLFSSL_USER_SETTINGS"
|
||||
c_preprocessor_definitions="WOLFSSL_ROWLEY_ARM;WOLFSSL_USER_SETTINGS;USE_NXP_MMCAU;USE_NXP_LTC"
|
||||
c_user_include_directories=".;../;../../;./drivers;./mmcau_2.0.0;./CMSIS/Include"
|
||||
project_directory=""
|
||||
project_type="Library" />
|
||||
@@ -338,7 +338,7 @@
|
||||
arm_simulator_memory_simulation_parameter="MK82FN256xxx15;0x40000;0x0;0x0;0x40000;4"
|
||||
arm_target_loader_applicable_loaders="Flash"
|
||||
arm_target_loader_default_loader="Flash"
|
||||
c_preprocessor_definitions="WOLFSSL_ROWLEY_ARM;WOLFSSL_USER_SETTINGS"
|
||||
c_preprocessor_definitions="WOLFSSL_ROWLEY_ARM;WOLFSSL_USER_SETTINGS;USE_NXP_MMCAU;USE_NXP_LTC"
|
||||
c_user_include_directories=".;./drivers;./mmcau_2.0.0;./CMSIS/Include;../;../../;$(TargetsDir);$(TargetsDir)/Kinetis;$(TargetsDir)/Kinetis/CMSIS;$(TargetsDir)/Kinetis/CMSIS/include;$(TargetsDir)/CMSIS_3/CMSIS/include"
|
||||
debug_register_definition_file="$(TargetsDir)/Kinetis/MK82F25615_Peripherals.xml"
|
||||
linker_memory_map_file="$(TargetsDir)/Kinetis/MK82FN256xxx15_MemoryMap.xml"
|
||||
@@ -511,7 +511,7 @@
|
||||
<configuration
|
||||
Name="Kinetis"
|
||||
arm_target_debug_interface_type="ADIv5"
|
||||
c_preprocessor_definitions="FREESCALE;K_SERIES;CPU_MK82FN256VLL15;FREESCALE_KSDK_BM;USE_NXP_LTC;USE_NXP_MMCAU"
|
||||
c_preprocessor_definitions="FREESCALE;K_SERIES;CPU_MK82FN256VLL15;FREESCALE_KSDK_BM;USE_NXP_MMCAU;USE_NXP_LTC"
|
||||
hidden="Yes"
|
||||
linker_section_placement_file="$(ProjectDir)/Kinetis_FlashPlacement.xml" />
|
||||
<configuration
|
||||
|
||||
15
IDE/Renesas/cs+/Projects/README
Normal file
15
IDE/Renesas/cs+/Projects/README
Normal file
@@ -0,0 +1,15 @@
|
||||
This is procedure how to build wolfssl and test project on Renesas cs+.
|
||||
|
||||
wolfssl_lib:
|
||||
Build wolfssl_lib.lib
|
||||
|
||||
test:
|
||||
- For getting BSP files, create "bsp" folder under "Projects".
|
||||
- Create "DUMMY" project under "bsp" with your MPU name property
|
||||
- close "DUMMY" project, and open "test" project
|
||||
- change MPU name property of the project
|
||||
- uncomment "Use SIM I/O" lines in "bsp/resetprg.c"
|
||||
- set heap size in "bsp/sbrk.h"
|
||||
- set stack size in "bsp/stacksct.h"
|
||||
Build "test" wolfCrypt
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
wolfssl_lib:
|
||||
Build wolfssl_lib.lib
|
||||
|
||||
test:
|
||||
Get missing files
|
||||
- create DUMMY project
|
||||
- copy all files under DUMMY project except DUMMY.*
|
||||
- uncomment "Use SIM I/O" lines in resetprg.c
|
||||
- set heap size in sbrk.h
|
||||
- set stack size in stacksct.h
|
||||
Build test wolfCrypt
|
||||
|
||||
@@ -1,2 +1,22 @@
|
||||
/* strings.h
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
int strncasecmp(const char *s1, const char * s2, unsigned int sz);
|
||||
|
||||
@@ -1 +1,22 @@
|
||||
/* DUMMY Header */
|
||||
/* unistd.h
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
/* DUMMY Header */
|
||||
|
||||
@@ -1,28 +1,56 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
#define NO_WRITEV
|
||||
#define WOLFSSL_USER_IO
|
||||
#define NO_DEV_RANDOM
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define WOLFSSL_USER_CURRTIME
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define NO_FILESYSTEM
|
||||
#define WOLFSSL_LOG_PRINTF
|
||||
|
||||
/* #define DEBUG_WOLFSSL */
|
||||
|
||||
#define OPENSSL_EXTRA
|
||||
|
||||
#define NO_WOLFSSL_STUB
|
||||
#define NO_DYNAMIC_ARRAY /* for compilers not allowed dynamic size array */
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
#define WOLFSSL_DH_CONST
|
||||
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
#define WOLFSSL_USER_IO
|
||||
|
||||
//#define WOLFSSL_USER_KEYFILES /* To be defined key and cert files in user_settings.h */
|
||||
//#define WOLFSSL_NO_ABORT /* No abort during the test except exception occured */
|
||||
//#define DEBUG_WOLFSSL
|
||||
|
||||
#define OPENSSL_EXTRA
|
||||
|
||||
#define USER_TIME
|
||||
#define XTIME time
|
||||
#define HAVE_TIME_T_TYPE
|
||||
#define USE_WOLF_SUSECONDS_T
|
||||
#define USE_WOLF_TIMEVAL_T
|
||||
|
||||
@@ -30,19 +58,39 @@
|
||||
|
||||
#define WOLFSSL_GENSEED_FORTEST /* Wardning: define your own seed gen */
|
||||
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
|
||||
#define SINGLE_THREADED /* or define RTOS option */
|
||||
/* #define WOLFSSL_CMSIS_RTOS */
|
||||
/*#define WOLFSSL_CMSIS_RTOS */
|
||||
|
||||
/* #define NO_DH */
|
||||
#define NO_RC4
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA384
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
#define NO_OLD_SHA256_NAMES
|
||||
#define HAVE_CRL
|
||||
#define HAVE_OCSP
|
||||
#define HAVE_CERTIFICATE_STATUS_REQUEST
|
||||
|
||||
//#define WOLFSSL_KEY_GEN
|
||||
#define SHOW_GEN
|
||||
|
||||
#define WOLFSSL_KEEP_STORE_CERTS
|
||||
#define WOLFSSL_CIPHER_INTERNALNAME
|
||||
|
||||
#define WOLFSSL_GETENV_RANDFILE "ABCDEFG"
|
||||
#define WOLFSSL_GETENV_HOME "home"
|
||||
|
||||
#define CloseSocket(s) {}
|
||||
#define StartTCP()
|
||||
|
||||
#define NO_FILESYSTEM
|
||||
#define XFILE FILE*
|
||||
#define XBADFILE NULL
|
||||
//#define WOLFSSL_USER_KEYFILES /* Substitute key and cert files in test.h with user definitions */
|
||||
|
||||
int strncasecmp(const char *s1, const char *s2, unsigned int sz);
|
||||
|
||||
/* #define NO_WOLFSSL_STUB */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* wolfssl_dummy.c
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -18,8 +18,17 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
typedef unsigned long time_t;
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define YEAR 2018
|
||||
#define MON 5
|
||||
@@ -34,8 +43,20 @@ time_t time(time_t *t)
|
||||
#include <ctype.h>
|
||||
int strncasecmp(const char *s1, const char * s2, unsigned int sz)
|
||||
{
|
||||
for( ; sz>0; sz--)
|
||||
if(toupper(s1++) != toupper(s2++))
|
||||
return 1;
|
||||
for( ; sz>0; sz--, s1++, s2++){
|
||||
if(toupper(*s1) < toupper(*s2)){
|
||||
return -1;
|
||||
}
|
||||
if(toupper(*s1) > toupper(*s2)){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void abort(void)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
20
IDE/Renesas/cs+/Projects/include.am
Normal file
20
IDE/Renesas/cs+/Projects/include.am
Normal file
@@ -0,0 +1,20 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/README
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/wolfssl_lib/wolfssl_lib.mtpj
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/test/test.mtpj
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/test/test_main.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/strings.h
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/unistd.h
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/user_settings.h
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/README_en.txt
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_demo.h
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/t4_demo.mtpj
|
||||
|
||||
85
IDE/Renesas/cs+/Projects/t4_demo/README_en.txt
Normal file
85
IDE/Renesas/cs+/Projects/t4_demo/README_en.txt
Normal file
@@ -0,0 +1,85 @@
|
||||
wolfSSL/AlphaProject Boad demo setup Guide
|
||||
|
||||
This demo is tested with Renesas CS+ v6.01<EFBFBD>AAP-RX71M-0A, wolfSSL 3.15.3.
|
||||
|
||||
Setup process:
|
||||
1. Download software
|
||||
- Unzip AlphaProject firmware
|
||||
- Unzip wolfssl under the same directory
|
||||
|
||||
2. Set up wolfSSL
|
||||
- open wolfssl\IDE\Renesas\cs+\Projec/wolfssl\lib.mtpj with CS+ and build
|
||||
- open t4_demo.mtpj and build. This create demo program library.
|
||||
|
||||
3. Set up AlphaProject
|
||||
- The demo uses ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\
|
||||
ap_rx71m_0a_ether_sample_cs.mtpj
|
||||
- Open and edit ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\AP_RX71M_0A.c
|
||||
insert wolfSSL_init() in echo_srv_init().
|
||||
|
||||
===
|
||||
sci_init();
|
||||
can_init();
|
||||
echo_srv_init();
|
||||
wolfSSL_init(); <- insert this line
|
||||
===
|
||||
|
||||
- Modify stack and heap size in ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\r_config
|
||||
Line 120#pragma stacksize su=0x2000
|
||||
Line 139 #define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
|
||||
<EFBFBD>@- Modify IP address ib Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
|
||||
<EFBFBD>@as needed
|
||||
<EFBFBD>@
|
||||
===
|
||||
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
|
||||
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
|
||||
#define SUBNET_MASK0 255,255,255,0
|
||||
===
|
||||
|
||||
- Add project properties of linking library in ap_rx71m_0a_ether_sample_cs.mtpj
|
||||
|
||||
wolfssl\IDE\Renesas\cs+\Projects\wolfssl_lib\DefaultBuild\wolfssl_lib.lib
|
||||
wolfssl\IDE\Renesas\cs+\Projects\t4_demo\DefaultBuild\t4_demo.lib
|
||||
|
||||
- Set CC-RX(Build Tool)->Library Geberation->Library Configuration to"C99" and enable ctype.h.
|
||||
|
||||
- Build the project and start execut. You see message on the console prompting command.
|
||||
|
||||
===
|
||||
wolfSSL Demo
|
||||
t: test, b: benchmark, s: server, or c <IP addr> <Port>: client
|
||||
$
|
||||
===
|
||||
|
||||
Command can be executed only once. You need to reset and restart MPU for following command.
|
||||
|
||||
Command instruction:
|
||||
t: Crypt algorithm test
|
||||
b: benchmark
|
||||
s: simple server acceptint at port 50000
|
||||
c: simple client. Specify IP address and port as following.
|
||||
c <IP Addr> <Port Num>
|
||||
|
||||
|
||||
4. Testing TLS Connection
|
||||
You can use wolfssl/examples/server and client on your PC for TLS peer test.
|
||||
|
||||
|
||||
PC side<64>F
|
||||
$ ./examples/server/server -b -d
|
||||
|
||||
Board side<64>F
|
||||
> c <IP Addr> 11111
|
||||
|
||||
Board side<64>F
|
||||
> s
|
||||
|
||||
PC side<64>F
|
||||
$ ./examples/client/client -h <IP Addr> -p 50000
|
||||
|
||||
---
|
||||
If you have any question, please contact support@wolfssl.com.
|
||||
|
||||
wolfSSL Inc.
|
||||
|
||||
118
IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt
Normal file
118
IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt
Normal file
@@ -0,0 +1,118 @@
|
||||
wolfSSL/AlphaProjectボードデモ セットアップガイド
|
||||
|
||||
このデモはRenesas CS+ v6.01、AP-RX71M-0A, wolfSSL 3.15.3 でテストしています。
|
||||
|
||||
セットアップ手順:
|
||||
|
||||
1.ソフトウェアの入手
|
||||
- APボード付属のソフトウェア一式を適当なフォルダー下に解凍します。
|
||||
- 同じフォルダー下にwolfssl一式を解凍します。
|
||||
|
||||
2.wolfSSLのセットアップ
|
||||
- CS+にてwolfssl\IDE\Renesas\cs+\Project下のwolfssl\lib.mtpjを開き
|
||||
wolfSSLライブラリーのビルドをします。
|
||||
- 同じフォルダの下のt4_demo.mtpjを開き、デモプログラムのビルドをします。
|
||||
このプログラムもライブラリー形式でビルドされます。
|
||||
|
||||
3.AlphaProject側のセットアップ
|
||||
デモはap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_csフォルダ下の
|
||||
ap_rx71m_0a_ether_sample_cs.mtpjプロジェクトを利用します。
|
||||
|
||||
- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\srcフォルダ下の
|
||||
AP_RX71M_0A.cファイルを開き、
|
||||
97行目のecho_srv_init()の下にwolfSSL_init()を挿入します。
|
||||
|
||||
===
|
||||
sci_init();
|
||||
can_init();
|
||||
echo_srv_init();
|
||||
wolfSSL_init(); <- この行を挿入
|
||||
===
|
||||
|
||||
- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\r_configファイル
|
||||
を開き、スタックサイズとヒープサイズを以下のように設定します。
|
||||
|
||||
120行目 #pragma stacksize su=0x2000
|
||||
139行目 #define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
|
||||
- IPアドレスのデフォルト値は以下のようになっています。
|
||||
必要があれば、Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
|
||||
内の139行目からの定義を変更します。
|
||||
|
||||
===
|
||||
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
|
||||
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
|
||||
#define SUBNET_MASK0 255,255,255,0 /* Subnet mask */
|
||||
===
|
||||
|
||||
- CS+でap_rx71m_0a_ether_sample_cs.mtpjプロジェクトを開き、wolfSSLとデモライブラリを
|
||||
登録します。CC-RX(ビルドツール)->リンク・オプションタブ->使用する以下の二つのファイル
|
||||
を登録します。
|
||||
wolfssl\IDE\Renesas\cs+\Projects\wolfssl_lib\DefaultBuild\wolfssl_lib.lib
|
||||
wolfssl\IDE\Renesas\cs+\Projects\t4_demo\DefaultBuild\t4_demo.lib
|
||||
|
||||
- CC-RX(ビルドツール)->ライブラリージェネレーションタブ->ライブラリー構成を「C99」に、
|
||||
ctype.hを有効にするを「はい」に設定します。
|
||||
|
||||
- プロジェクトのビルド、ターゲットへのダウンロードをしたのち、表示->デバッグ・コンソール
|
||||
からコンソールを表示させます。実行を開始するとコンソールに以下の表示が出力されます。
|
||||
|
||||
===
|
||||
wolfSSL Demo
|
||||
t: test, b: benchmark, s: server, or c <IP addr> <Port>: client
|
||||
$
|
||||
===
|
||||
|
||||
tコマンド:各暗号化アルゴリズムの簡単なテストを実行します。所要のアルゴリズムが
|
||||
組み込まれているか確認することができます。組み込むアルゴリズムはビルドオプション
|
||||
で変更することができます。詳しくはユーザマニュアルを参照してください。
|
||||
bコマンド:各暗号アルゴリズムごとの簡単なベンチマークを実行します。
|
||||
sコマンド:簡単なTLSサーバを起動します。起動するとビルド時のIPアドレス、
|
||||
ポート50000にてTLS接続を待ちます。
|
||||
cコマンド:簡単なTLSクライアントを起動します。起動すると第一アーギュメントで指定された
|
||||
IPアドレス、第二アーギュメントで指定されたポートに対してTLS接続します。
|
||||
|
||||
いずれのコマンドも1回のみ実行します。繰り返し実行したい場合は、MPUをリセットして
|
||||
再起動します。
|
||||
|
||||
4.対向テスト
|
||||
デモのs、cコマンドを使って、他の機器と簡単な対向テストをすることができます。
|
||||
UbuntuなどのGCC, make環境、WindowsのVisual Studioなどで
|
||||
対向テスト用のサーバ、クライアントをビルドすることができます。
|
||||
|
||||
GCC,makeコマンド環境では、ダウンロード解凍したwolfsslのディレクトリ下で以下の
|
||||
コマンドを発行すると、ライブラリ、テスト用のクライアント、サーバなど一式がビルド
|
||||
されます。
|
||||
|
||||
$ ./configure
|
||||
$ make check
|
||||
|
||||
その後、以下のような指定でクライアントまたはサーバを起動して、ボード上の
|
||||
デモと対向テストすることができます。
|
||||
|
||||
PC側:
|
||||
$ ./examples/server/server -b -d
|
||||
ボード側:
|
||||
> c <IPアドレス> 11111
|
||||
|
||||
ボード側:
|
||||
> s
|
||||
PC側:
|
||||
$ ./examples/client/client -h <IPアドレス> -p 50000
|
||||
|
||||
|
||||
WindowsのVisual Studioでは、ダウンロード解凍したwolfsslフォルダ下のwolfssl64.sln
|
||||
を開き、ソリューションをビルドします。Debugフォルダ下にビルドされるclient.exeと
|
||||
server.exeを利用します。
|
||||
|
||||
PC側:
|
||||
Debug> .\server -b -d
|
||||
ボード側:
|
||||
> c <IPアドレス> 11111
|
||||
|
||||
ボード側:
|
||||
> s
|
||||
PC側:
|
||||
Debug> .\client -h <IPアドレス> -p 50000
|
||||
|
||||
以上、
|
||||
1240
IDE/Renesas/cs+/Projects/t4_demo/t4_demo.mtpj
Normal file
1240
IDE/Renesas/cs+/Projects/t4_demo/t4_demo.mtpj
Normal file
File diff suppressed because it is too large
Load Diff
192
IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c
Normal file
192
IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c
Normal file
@@ -0,0 +1,192 @@
|
||||
/* wolf_client.c
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "r_t4_itcpip.h"
|
||||
|
||||
#include "wolfssl/wolfcrypt/settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include "wolfssl/certs_test.h"
|
||||
#include "wolf_demo.h"
|
||||
|
||||
ER t4_tcp_callback(ID cepid, FN fncd , VP p_parblk);
|
||||
|
||||
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
ID cepid;
|
||||
|
||||
if(ctx != NULL)cepid = *(ID *)ctx;
|
||||
else return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
|
||||
if(ret > 0)return ret;
|
||||
else return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
}
|
||||
|
||||
static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
ID cepid;
|
||||
|
||||
if(ctx != NULL)cepid = *(ID *)ctx;
|
||||
else return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
|
||||
if(ret == sz)return ret;
|
||||
else return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
}
|
||||
|
||||
static int getIPaddr(char *arg)
|
||||
{
|
||||
int a1, a2, a3, a4;
|
||||
if(sscanf(arg, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) == 4)
|
||||
return (a1 << 24) | (a2 << 16) | (a3 << 8) | a4;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
static int getPort(char *arg)
|
||||
{
|
||||
int port;
|
||||
if(sscanf(arg, "%d", &port) == 1)
|
||||
return port;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
WOLFSSL_CTX *wolfSSL_TLS_client_init()
|
||||
{
|
||||
|
||||
WOLFSSL_CTX* ctx;
|
||||
#ifndef NO_FILESYSTEM
|
||||
#ifdef USE_ECC_CERT
|
||||
char *cert = "./certs/ca-ecc-cert.pem";
|
||||
#else
|
||||
char *cert = "./certs/ca-cert.pem";
|
||||
#endif
|
||||
#else
|
||||
#ifdef USE_ECC_CERT
|
||||
const unsigned char *cert = ca_ecc_der_256;
|
||||
#define SIZEOF_CERT sizeof_ca_ecc_der_256
|
||||
#else
|
||||
const unsigned char *cert = ca_cert_der_2048;
|
||||
#define SIZEOF_CERT sizeof_ca_cert_der_2048
|
||||
#endif
|
||||
#endif
|
||||
|
||||
wolfSSL_Init();
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method_ex((void *)NULL))) == NULL) {
|
||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
if (wolfSSL_CTX_load_verify_locations(ctx, cert, 0) != SSL_SUCCESS) {
|
||||
printf("ERROR: can't load \"%s\"\n", cert);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
if (wolfSSL_CTX_load_verify_buffer(ctx, cert, SIZEOF_CERT, SSL_FILETYPE_ASN1) != SSL_SUCCESS){
|
||||
printf("ERROR: can't load certificate data\n");
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Register callbacks */
|
||||
wolfSSL_SetIORecv(ctx, my_IORecv);
|
||||
wolfSSL_SetIOSend(ctx, my_IOSend);
|
||||
return (void *)ctx;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void wolfSSL_TLS_client(void *v_ctx, func_args *args)
|
||||
{
|
||||
ID cepid = 1;
|
||||
ER ercd;
|
||||
int ret;
|
||||
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)v_ctx;
|
||||
WOLFSSL *ssl;
|
||||
#define BUFF_SIZE 256
|
||||
static const char sendBuff[]= "Hello Server\n" ;
|
||||
char rcvBuff[BUFF_SIZE] = {0};
|
||||
static T_IPV4EP my_addr = { 0, 0 };
|
||||
T_IPV4EP dst_addr;
|
||||
|
||||
if(args->argc >= 2){
|
||||
if((dst_addr.ipaddr = getIPaddr(args->argv[1])) == 0){
|
||||
printf("ERROR: IP address\n");
|
||||
return;
|
||||
}
|
||||
if((dst_addr.portno = getPort(args->argv[2])) == 0){
|
||||
printf("ERROR: IP address\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if((ercd = tcp_con_cep(cepid, &my_addr, &dst_addr, TMO_FEVR)) != E_OK) {
|
||||
printf("ERROR TCP Connect: %d\n", ercd);
|
||||
return;
|
||||
}
|
||||
|
||||
if((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
printf("ERROR wolfSSL_new: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
/* set callback context */
|
||||
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
|
||||
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
|
||||
|
||||
if(wolfSSL_connect(ssl) != SSL_SUCCESS) {
|
||||
printf("ERROR SSL connect: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
|
||||
printf("ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if ((ret=wolfSSL_read(ssl, rcvBuff, BUFF_SIZE)) < 0) {
|
||||
printf("ERROR SSL read: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
rcvBuff[ret] = '\0' ;
|
||||
printf("Received: %s\n", rcvBuff);
|
||||
|
||||
/* frees all data before client termination */
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
|
||||
tcp_sht_cep(cepid);
|
||||
tcp_cls_cep(cepid, TMO_FEVR);
|
||||
|
||||
return;
|
||||
}
|
||||
18
IDE/Renesas/cs+/Projects/t4_demo/wolf_demo.h
Normal file
18
IDE/Renesas/cs+/Projects/t4_demo/wolf_demo.h
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
|
||||
typedef struct func_args
|
||||
{
|
||||
int argc;
|
||||
char **argv;
|
||||
int return_code;
|
||||
} func_args;
|
||||
|
||||
void wolfSSL_init(void) ;
|
||||
void wolfSSL_main(void) ;
|
||||
WOLFSSL_CTX *wolfSSL_TLS_server_init(void);
|
||||
WOLFSSL_CTX *wolfSSL_TLS_client_init(void);
|
||||
|
||||
void benchmark_test(void *args);
|
||||
void wolfcrypt_test(void *args);
|
||||
void wolfSSL_TLS_client(void *ctx, func_args *args);
|
||||
void wolfSSL_TLS_server(void *ctx, func_args *args);
|
||||
125
IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c
Normal file
125
IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c
Normal file
@@ -0,0 +1,125 @@
|
||||
/* wolf_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include "user_settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wolf_demo.h"
|
||||
|
||||
static WOLFSSL_CTX *wolfSSL_sv_ctx;
|
||||
static WOLFSSL_CTX *wolfSSL_cl_ctx;
|
||||
|
||||
static long tick;
|
||||
static void timeTick(void)
|
||||
{
|
||||
tick++;
|
||||
}
|
||||
|
||||
#define FREQ 10000 /* Hz */
|
||||
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) tick = 0 ;
|
||||
return ((double)tick/FREQ) ;
|
||||
}
|
||||
|
||||
#define ARG_SZ 256
|
||||
static char argBuff[ARG_SZ];
|
||||
static int get_arg(func_args *args)
|
||||
{
|
||||
int i;
|
||||
char *arg = argBuff;
|
||||
args->argc = 0;
|
||||
|
||||
for(i=0; i<ARG_SZ; i++) {
|
||||
*arg = getchar();
|
||||
|
||||
switch(*arg){
|
||||
case '\n':
|
||||
*arg = '\0';
|
||||
return args->argc;
|
||||
case ' ':
|
||||
*arg++ = '\0';
|
||||
while(*arg++ == ' '); /* Skip space */
|
||||
args->argv[++args->argc] = arg;
|
||||
break;
|
||||
default:
|
||||
arg++;
|
||||
}
|
||||
}
|
||||
return args->argc ;
|
||||
}
|
||||
|
||||
void wolfSSL_init()
|
||||
{
|
||||
uint32_t channel;
|
||||
R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
|
||||
|
||||
wolfSSL_sv_ctx = wolfSSL_TLS_server_init();
|
||||
wolfSSL_cl_ctx = wolfSSL_TLS_client_init();
|
||||
wolfSSL_main();
|
||||
}
|
||||
|
||||
void wolfSSL_main()
|
||||
{
|
||||
int c;
|
||||
func_args args = {0};
|
||||
|
||||
printf("wolfSSL Demo\nt: test, b: benchmark, s: server, or c <IP addr> <Port>: client\n$ ");
|
||||
c = getchar();
|
||||
|
||||
switch(c) {
|
||||
case 't':
|
||||
get_arg(&args);
|
||||
printf("Start wolfCrypt Test\n");
|
||||
wolfcrypt_test(&args);
|
||||
printf("End wolfCrypt Test\n");
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
get_arg(&args);
|
||||
printf("Start wolfCrypt Benchmark\n");
|
||||
benchmark_test(NULL);
|
||||
printf("End wolfCrypt Benchmark\n");
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
if(get_arg(&args) < 0)
|
||||
break;
|
||||
printf("Start TLS Client(%s, %s)\n", args.argv[1], args.argv[2]);
|
||||
wolfSSL_TLS_client(wolfSSL_cl_ctx, &args);
|
||||
printf("End TLS Client\n");
|
||||
break;
|
||||
|
||||
case 's':
|
||||
if(get_arg(&args) < 0)
|
||||
break;
|
||||
printf("Start TLS Server\n");
|
||||
wolfSSL_TLS_server(wolfSSL_sv_ctx, &args);
|
||||
printf("End TLS Server\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("Command Error\n");
|
||||
}
|
||||
}
|
||||
173
IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c
Normal file
173
IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c
Normal file
@@ -0,0 +1,173 @@
|
||||
/* wolf_server.c
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "r_t4_itcpip.h"
|
||||
|
||||
#include "wolfssl/wolfcrypt/settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include "wolfssl/certs_test.h"
|
||||
#include "wolf_demo.h"
|
||||
|
||||
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
ID cepid;
|
||||
|
||||
if(ctx != NULL)cepid = *(ID *)ctx;
|
||||
else return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
|
||||
if(ret == sz)return ret;
|
||||
else return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
}
|
||||
|
||||
static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
ID cepid;
|
||||
|
||||
if(ctx != NULL)cepid = *(ID *)ctx;
|
||||
else return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
|
||||
if(ret == sz)return ret;
|
||||
else return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
}
|
||||
|
||||
|
||||
WOLFSSL_CTX *wolfSSL_TLS_server_init()
|
||||
{
|
||||
|
||||
int ret;
|
||||
WOLFSSL_CTX* ctx;
|
||||
|
||||
#ifndef NO_FILESYSTEM
|
||||
#ifdef USE_ECC_CERT
|
||||
char *cert = "./certs/server-ecc-cert.pem";
|
||||
char *key = "./certs/server-ecc-key.pem";
|
||||
#else
|
||||
char *cert = "./certs/server-cert.pem";
|
||||
char *key = "./certs/server-key.pem";
|
||||
#endif
|
||||
#else
|
||||
#ifdef USE_ECC_CERT
|
||||
char *cert = serv_ecc_der_256;
|
||||
int sizeof_cert = sizeof_serv_ecc_der_256;
|
||||
char *cert = serv_ecc_key_der_256;
|
||||
int sizeof_key = sizeof_serv_ecc_key_der_256;
|
||||
#else
|
||||
const unsigned char *cert = server_cert_der_2048;
|
||||
#define sizeof_cert sizeof_server_cert_der_2048
|
||||
const unsigned char *key = server_key_der_2048;
|
||||
#define sizeof_key sizeof_server_key_der_2048
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
wolfSSL_Init();
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((ctx = wolfSSL_CTX_new(wolfSSLv23_server_method_ex((void *)NULL))) == NULL) {
|
||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
ret = wolfSSL_CTX_use_certificate_file(ctx, cert, 0);
|
||||
#else
|
||||
ret = wolfSSL_CTX_use_certificate_buffer(ctx, cert, sizeof_cert, SSL_FILETYPE_ASN1);
|
||||
#endif
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("Error %d loading server-cert!\n", ret);
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
/* Load server key into WOLFSSL_CTX */
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
ret = wolfSSL_CTX_use_PrivateKey_file(ctx, key, 0);
|
||||
#else
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx, key, sizeof_key, SSL_FILETYPE_ASN1);
|
||||
#endif
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("Error %d loading server-key!\n", ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Register callbacks */
|
||||
wolfSSL_SetIORecv(ctx, my_IORecv);
|
||||
wolfSSL_SetIOSend(ctx, my_IOSend);
|
||||
return ctx;
|
||||
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_server(void *v_ctx, func_args *args)
|
||||
{
|
||||
ID cepid = 1;
|
||||
ID repid = 1;
|
||||
ER ercd;
|
||||
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)v_ctx;
|
||||
(void) args;
|
||||
|
||||
WOLFSSL *ssl;
|
||||
int len;
|
||||
#define BUFF_SIZE 256
|
||||
char buff[BUFF_SIZE];
|
||||
T_IPV4EP dst_addr = {0, 0};
|
||||
|
||||
if((ercd = tcp_acp_cep(cepid, repid, &dst_addr, TMO_FEVR)) != E_OK) {
|
||||
printf("ERROR TCP Accept: %d\n", ercd);
|
||||
return;
|
||||
}
|
||||
|
||||
if((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
printf("ERROR: failed wolfSSL_new\n");
|
||||
return;
|
||||
}
|
||||
|
||||
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
|
||||
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
|
||||
|
||||
if (wolfSSL_accept(ssl) < 0) {
|
||||
printf("ERROR: SSL Accept(%d)\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if ((len = wolfSSL_read(ssl, buff, sizeof(buff) - 1)) < 0) {
|
||||
printf("ERROR: SSL Read(%d)\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
buff[len] = '\0';
|
||||
printf("Received: %s\n", buff);
|
||||
|
||||
if (wolfSSL_write(ssl, buff, len) != len) {
|
||||
printf("ERROR: SSL Write(%d)\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
wolfSSL_free(ssl);
|
||||
tcp_sht_cep(cepid);
|
||||
}
|
||||
@@ -10,31 +10,16 @@
|
||||
<Property>fb98844b-2c27-4275-9804-f6e63e204da0</Property>
|
||||
<ActiveProjectGuid>22bd583d-ee58-4c8e-8924-5337fd34b2b3</ActiveProjectGuid>
|
||||
</Instance>
|
||||
<Instance Guid="8ba268e2-1638-4188-87fc-9165a8cd11e7">
|
||||
<Name>dbsct.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>dbsct.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<Instance Guid="1e626b57-3633-42b2-ba5f-87f5e41d554a">
|
||||
<Name>bsp</Name>
|
||||
<Type>Category</Type>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
<Property>c1430910-c62b-40a9-8083-907feee08a05</Property>
|
||||
</Instance>
|
||||
<Instance Guid="924462d3-0861-4baf-b323-c25be1e91380">
|
||||
<Name>intprg.c</Name>
|
||||
<Instance Guid="3935a5fa-59a8-40a4-8f21-f56f418ce3a3">
|
||||
<Name>test.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>intprg.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="f665a87e-34c4-40a6-9ce5-f9fffe993cf1">
|
||||
<Name>resetprg.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>resetprg.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="80a4d598-6931-4ad5-bf89-5b184e8bcb07">
|
||||
<Name>sbrk.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>sbrk.c</RelativePath>
|
||||
<RelativePath>..\..\..\..\..\wolfcrypt\test\test.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
@@ -45,55 +30,6 @@
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="e3f84555-8ea7-4c19-9746-f36c31a8d08d">
|
||||
<Name>vecttbl.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>vecttbl.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="2e2adfb7-575c-4f6a-ba85-9bae985801f8">
|
||||
<Name>iodefine.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>iodefine.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="206997d6-3993-4419-b7ea-eb33a744ba9c">
|
||||
<Name>sbrk.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>sbrk.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="03b1981e-eea5-433c-b4d4-0546bc9c8cdd">
|
||||
<Name>stacksct.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>stacksct.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="bacd2a2e-e3f3-45b5-a04b-63f43c58b79d">
|
||||
<Name>typedefine.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>typedefine.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="a5ee4099-25c8-44a7-95d6-2797644437c9">
|
||||
<Name>vect.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>vect.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="3935a5fa-59a8-40a4-8f21-f56f418ce3a3">
|
||||
<Name>test.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\..\..\..\..\wolfcrypt\test\test.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="cc854f0a-653c-4d49-ad45-0df17f62765b">
|
||||
<Name>wolfssl_dummy.c</Name>
|
||||
<Type>File</Type>
|
||||
@@ -101,27 +37,6 @@
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="edf9134c-ea23-4afe-9dfb-ba54df0f2e45">
|
||||
<Name>lowsrc.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>lowsrc.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="4385a751-e97b-46d6-b9ab-ac55b25b17dc">
|
||||
<Name>lowlvl.src</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>lowlvl.src</RelativePath>
|
||||
<TreeImageGuid>f654126d-e7ad-426d-be34-8455271d959b</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="f4e309eb-8626-47bb-9bdc-b2ada574f9da">
|
||||
<Name>unistd.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\common\unistd.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="0a937f6c-b35b-4ff1-b2f4-9abc7258bb42">
|
||||
<Name>user_settings.h</Name>
|
||||
<Type>File</Type>
|
||||
@@ -129,6 +44,104 @@
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="ecdc0105-42e8-490b-a5f4-dbef62521ce3">
|
||||
<Name>dbsct.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\dbsct.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="38d8908f-460f-45be-83f0-771791c86bca">
|
||||
<Name>hwsetup.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\hwsetup.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="ad43352b-89de-44c3-ab21-f8c3a662dee3">
|
||||
<Name>intprg.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\intprg.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="cb2f9b7a-3e74-4d3f-b86a-5b03236b2e6e">
|
||||
<Name>iodefine.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\iodefine.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="2e12fadb-ba8f-4ede-a450-c2c2956cf93a">
|
||||
<Name>lowlvl.src</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\lowlvl.src</RelativePath>
|
||||
<TreeImageGuid>f654126d-e7ad-426d-be34-8455271d959b</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="28ec7225-91c8-4957-b715-ce2fa298b8d3">
|
||||
<Name>lowsrc.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\lowsrc.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="49bd22e0-ff27-4cf2-b12b-7dacd3576b91">
|
||||
<Name>lowsrc.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\lowsrc.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="30ea2319-abc7-43b0-b197-234093a1ef8c">
|
||||
<Name>resetprg.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\resetprg.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="3ce36679-d436-4df9-b7e0-ba69d2319971">
|
||||
<Name>sbrk.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\sbrk.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="4ad9215c-6d52-4f20-969e-ff09f8f3a53a">
|
||||
<Name>sbrk.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\sbrk.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="f8102b49-fd5c-4e89-a864-d3251faed23b">
|
||||
<Name>stacksct.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\stacksct.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="a51ca6fb-bbd1-4294-b661-d9df34cd3e64">
|
||||
<Name>typedefine.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\typedefine.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="ee36a29e-31b3-4306-b2d0-9fec843308fb">
|
||||
<Name>vect.h</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\vect.h</RelativePath>
|
||||
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="49e27495-6de7-42eb-b336-691c7499424b">
|
||||
<Name>vecttbl.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\bsp\vecttbl.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
|
||||
</Instance>
|
||||
</Class>
|
||||
<Class Guid="fb98844b-2c27-4275-9804-f6e63e204da0">
|
||||
<Instance Guid="fb98844b-2c27-4275-9804-f6e63e204da0">
|
||||
@@ -136,6 +149,11 @@
|
||||
<MemoCount>0</MemoCount>
|
||||
</Instance>
|
||||
</Class>
|
||||
<Class Guid="78a5c5cd-76cb-4bcc-a031-3020011fbc9a">
|
||||
<Instance Guid="c1430910-c62b-40a9-8083-907feee08a05">
|
||||
<MemoCount>0</MemoCount>
|
||||
</Instance>
|
||||
</Class>
|
||||
<Class Guid="8fb9c1f6-d351-4d10-8d99-bf5b3015b84c">
|
||||
<Instance Guid="00000000-0000-0000-0000-000000000000">
|
||||
<UsingPlatformGuid>d249e3b7-1c98-499d-ac0e-829eb0dc07f4</UsingPlatformGuid>
|
||||
@@ -152,13 +170,13 @@
|
||||
<DataFormatVersion>1.0</DataFormatVersion>
|
||||
</Instance>
|
||||
<Instance Guid="2a81c37a-5015-44c2-9f40-e58b669eec75">
|
||||
<DeviceName>R5F565N9FxLJ</DeviceName>
|
||||
<DeviceName>R5F571MLDxFC</DeviceName>
|
||||
<MemoCount>0</MemoCount>
|
||||
</Instance>
|
||||
</Class>
|
||||
<Class Guid="873c9a58-9bc5-439a-b476-78629a4553ed">
|
||||
<Instance Guid="873c9a58-9bc5-439a-b476-78629a4553ed">
|
||||
<ProjectDeviceChangedCounter>0</ProjectDeviceChangedCounter>
|
||||
<ProjectDeviceChangedCounter>2</ProjectDeviceChangedCounter>
|
||||
<ProjectInitialDeviceName>R5F565N9FxLJ</ProjectInitialDeviceName>
|
||||
</Instance>
|
||||
</Class>
|
||||
@@ -174,28 +192,30 @@
|
||||
<BuildMode0>RABlAGYAYQB1AGwAdABCAHUAaQBsAGQA</BuildMode0>
|
||||
<BatchBuildFlag0>False</BatchBuildFlag0>
|
||||
<CurrentBuildMode>DefaultBuild</CurrentBuildMode>
|
||||
<SourceItemGuid0>8ba268e2-1638-4188-87fc-9165a8cd11e7</SourceItemGuid0>
|
||||
<SourceItemGuid0>3935a5fa-59a8-40a4-8f21-f56f418ce3a3</SourceItemGuid0>
|
||||
<SourceItemType0>CSource</SourceItemType0>
|
||||
<SourceItemGuid1>924462d3-0861-4baf-b323-c25be1e91380</SourceItemGuid1>
|
||||
<SourceItemGuid1>9ce51d13-dee2-4fe6-b026-5eb59375af30</SourceItemGuid1>
|
||||
<SourceItemType1>CSource</SourceItemType1>
|
||||
<SourceItemGuid2>f665a87e-34c4-40a6-9ce5-f9fffe993cf1</SourceItemGuid2>
|
||||
<SourceItemGuid2>cc854f0a-653c-4d49-ad45-0df17f62765b</SourceItemGuid2>
|
||||
<SourceItemType2>CSource</SourceItemType2>
|
||||
<SourceItemGuid3>80a4d598-6931-4ad5-bf89-5b184e8bcb07</SourceItemGuid3>
|
||||
<SourceItemGuid3>ecdc0105-42e8-490b-a5f4-dbef62521ce3</SourceItemGuid3>
|
||||
<SourceItemType3>CSource</SourceItemType3>
|
||||
<SourceItemGuid4>9ce51d13-dee2-4fe6-b026-5eb59375af30</SourceItemGuid4>
|
||||
<SourceItemGuid4>38d8908f-460f-45be-83f0-771791c86bca</SourceItemGuid4>
|
||||
<SourceItemType4>CSource</SourceItemType4>
|
||||
<SourceItemGuid5>e3f84555-8ea7-4c19-9746-f36c31a8d08d</SourceItemGuid5>
|
||||
<SourceItemGuid5>ad43352b-89de-44c3-ab21-f8c3a662dee3</SourceItemGuid5>
|
||||
<SourceItemType5>CSource</SourceItemType5>
|
||||
<SourceItemGuid6>3935a5fa-59a8-40a4-8f21-f56f418ce3a3</SourceItemGuid6>
|
||||
<SourceItemType6>CSource</SourceItemType6>
|
||||
<SourceItemGuid7>cc854f0a-653c-4d49-ad45-0df17f62765b</SourceItemGuid7>
|
||||
<SourceItemGuid6>2e12fadb-ba8f-4ede-a450-c2c2956cf93a</SourceItemGuid6>
|
||||
<SourceItemType6>AsmSource</SourceItemType6>
|
||||
<SourceItemGuid7>28ec7225-91c8-4957-b715-ce2fa298b8d3</SourceItemGuid7>
|
||||
<SourceItemType7>CSource</SourceItemType7>
|
||||
<SourceItemGuid8>edf9134c-ea23-4afe-9dfb-ba54df0f2e45</SourceItemGuid8>
|
||||
<SourceItemGuid8>30ea2319-abc7-43b0-b197-234093a1ef8c</SourceItemGuid8>
|
||||
<SourceItemType8>CSource</SourceItemType8>
|
||||
<SourceItemGuid9>4385a751-e97b-46d6-b9ab-ac55b25b17dc</SourceItemGuid9>
|
||||
<SourceItemType9>AsmSource</SourceItemType9>
|
||||
<SourceItemCount>10</SourceItemCount>
|
||||
<LastDeviceChangedCounter>0</LastDeviceChangedCounter>
|
||||
<SourceItemGuid9>3ce36679-d436-4df9-b7e0-ba69d2319971</SourceItemGuid9>
|
||||
<SourceItemType9>CSource</SourceItemType9>
|
||||
<SourceItemGuid10>49e27495-6de7-42eb-b336-691c7499424b</SourceItemGuid10>
|
||||
<SourceItemType10>CSource</SourceItemType10>
|
||||
<SourceItemCount>11</SourceItemCount>
|
||||
<LastDeviceChangedCounter>2</LastDeviceChangedCounter>
|
||||
</Instance>
|
||||
<Instance Guid="9e208646-ccba-4100-a676-29b1efe6545f">
|
||||
<AsmOptionInclude-DefaultValue />
|
||||
@@ -278,7 +298,7 @@
|
||||
<GeneralOptionPatch-DefaultValue>None</GeneralOptionPatch-DefaultValue>
|
||||
<GeneralOptionSaveAcc-DefaultValue>False</GeneralOptionSaveAcc-DefaultValue>
|
||||
<IsLockedByUser>False</IsLockedByUser>
|
||||
<TimeTagModified--0>-8586768138329950975</TimeTagModified--0>
|
||||
<TimeTagModified--0>-8586657613297042146</TimeTagModified--0>
|
||||
<BuildMode-0>DefaultBuild</BuildMode-0>
|
||||
<Memo-0 />
|
||||
<OutputMessageFormat-0>%TargetFiles%</OutputMessageFormat-0>
|
||||
@@ -376,6 +396,7 @@
|
||||
<COptionShowExpansions-DefaultValue>False</COptionShowExpansions-DefaultValue>
|
||||
<COptionCommandLine-DefaultValue>-isa=rxv2
|
||||
-fpu
|
||||
-include=..\bsp
|
||||
-include=..\common
|
||||
-include=..\..\..\..\..
|
||||
-include=..\wolfssl_lib
|
||||
@@ -450,7 +471,7 @@
|
||||
<COptionFloatOrder-DefaultValue>False</COptionFloatOrder-DefaultValue>
|
||||
<COptionIncode-DefaultValue>Sjis</COptionIncode-DefaultValue>
|
||||
<IsLockedByUser>False</IsLockedByUser>
|
||||
<TimeTagModified--0>-8586767489570851217</TimeTagModified--0>
|
||||
<TimeTagModified--0>-8586657641844903702</TimeTagModified--0>
|
||||
<COptionLangC-0>C99</COptionLangC-0>
|
||||
<COptionListfile-0>False</COptionListfile-0>
|
||||
<COptionLogo-0>False</COptionLogo-0>
|
||||
@@ -469,7 +490,8 @@
|
||||
<COptionXcref-0>False</COptionXcref-0>
|
||||
<COptionControlFlowIntegrity-0>None</COptionControlFlowIntegrity-0>
|
||||
<COptionDebug-0>True</COptionDebug-0>
|
||||
<COptionInclude-0>..\common
|
||||
<COptionInclude-0>..\bsp
|
||||
..\common
|
||||
..\..\..\..\..
|
||||
..\wolfssl_lib
|
||||
</COptionInclude-0>
|
||||
@@ -491,6 +513,7 @@
|
||||
<COptionShowExpansions-0>False</COptionShowExpansions-0>
|
||||
<COptionCommandLine-0>-isa=rxv2
|
||||
-fpu
|
||||
-include=..\bsp
|
||||
-include=..\common
|
||||
-include=..\..\..\..\..
|
||||
-include=..\wolfssl_lib
|
||||
@@ -703,7 +726,7 @@ D_2=R_2
|
||||
-exit
|
||||
</LinkOptionCommandLine-DefaultValue>
|
||||
<IsLockedByUser>False</IsLockedByUser>
|
||||
<TimeTagModified--0>-8586768128523424353</TimeTagModified--0>
|
||||
<TimeTagModified--0>-8586657622167475000</TimeTagModified--0>
|
||||
<LinkOptionCpu-0>False</LinkOptionCpu-0>
|
||||
<LinkOptionForm-0>Absolute</LinkOptionForm-0>
|
||||
<LinkOptionFormConvert-0>Stype</LinkOptionFormConvert-0>
|
||||
@@ -1085,23 +1108,15 @@ D_2=R_2
|
||||
</Instance>
|
||||
<Instance Guid="8ba268e2-1638-4188-87fc-9165a8cd11e7">
|
||||
<LinkOrder-0>0</LinkOrder-0>
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>0</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="924462d3-0861-4baf-b323-c25be1e91380">
|
||||
<LinkOrder-0>1</LinkOrder-0>
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>1</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="f665a87e-34c4-40a6-9ce5-f9fffe993cf1">
|
||||
<LinkOrder-0>2</LinkOrder-0>
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>2</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="80a4d598-6931-4ad5-bf89-5b184e8bcb07">
|
||||
<LinkOrder-0>3</LinkOrder-0>
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>3</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="9ce51d13-dee2-4fe6-b026-5eb59375af30">
|
||||
<LinkOrder-0>4</LinkOrder-0>
|
||||
@@ -1110,96 +1125,122 @@ D_2=R_2
|
||||
</Instance>
|
||||
<Instance Guid="e3f84555-8ea7-4c19-9746-f36c31a8d08d">
|
||||
<LinkOrder-0>5</LinkOrder-0>
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>5</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="2e2adfb7-575c-4f6a-ba85-9bae985801f8">
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>6</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="206997d6-3993-4419-b7ea-eb33a744ba9c">
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>7</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="03b1981e-eea5-433c-b4d4-0546bc9c8cdd">
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>8</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="bacd2a2e-e3f3-45b5-a04b-63f43c58b79d">
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>9</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="a5ee4099-25c8-44a7-95d6-2797644437c9">
|
||||
<ItemAddTime>636604222525456322</ItemAddTime>
|
||||
<ItemAddTimeCount>10</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="3935a5fa-59a8-40a4-8f21-f56f418ce3a3">
|
||||
<ItemAddTime>636604222907020637</ItemAddTime>
|
||||
<ItemAddTimeCount>0</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="edf9134c-ea23-4afe-9dfb-ba54df0f2e45">
|
||||
<ItemAddTime>636604233142621806</ItemAddTime>
|
||||
<ItemAddTimeCount>0</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="cc854f0a-653c-4d49-ad45-0df17f62765b">
|
||||
<ItemAddTime>636604231267559837</ItemAddTime>
|
||||
<ItemAddTimeCount>1</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="4385a751-e97b-46d6-b9ab-ac55b25b17dc">
|
||||
<ItemAddTime>636604237551510311</ItemAddTime>
|
||||
<ItemAddTimeCount>0</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="0a937f6c-b35b-4ff1-b2f4-9abc7258bb42">
|
||||
<ItemAddTime>636604904407738135</ItemAddTime>
|
||||
<ItemAddTimeCount>0</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="f4e309eb-8626-47bb-9bdc-b2ada574f9da">
|
||||
<ItemAddTime>636604337733963935</ItemAddTime>
|
||||
<Instance Guid="ecdc0105-42e8-490b-a5f4-dbef62521ce3">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>0</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="38d8908f-460f-45be-83f0-771791c86bca">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>1</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="ad43352b-89de-44c3-ab21-f8c3a662dee3">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>2</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="cb2f9b7a-3e74-4d3f-b86a-5b03236b2e6e">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>3</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="2e12fadb-ba8f-4ede-a450-c2c2956cf93a">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>4</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="28ec7225-91c8-4957-b715-ce2fa298b8d3">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>5</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="49bd22e0-ff27-4cf2-b12b-7dacd3576b91">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>6</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="30ea2319-abc7-43b0-b197-234093a1ef8c">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>7</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="3ce36679-d436-4df9-b7e0-ba69d2319971">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>8</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="4ad9215c-6d52-4f20-969e-ff09f8f3a53a">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>9</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="f8102b49-fd5c-4e89-a864-d3251faed23b">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>10</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="a51ca6fb-bbd1-4294-b661-d9df34cd3e64">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>11</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="ee36a29e-31b3-4306-b2d0-9fec843308fb">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>12</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="49e27495-6de7-42eb-b336-691c7499424b">
|
||||
<ItemAddTime>636714747864289133</ItemAddTime>
|
||||
<ItemAddTimeCount>13</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="a7be515f-f007-45ed-9059-4e1500c0f74d">
|
||||
<TimeTagModified-SourceItem0--0>-8586768138329319486</TimeTagModified-SourceItem0--0>
|
||||
<TimeTagModified-SourceItem0--0>-8586768137947755171</TimeTagModified-SourceItem0--0>
|
||||
<SourceItem0-IsLockedByUser>False</SourceItem0-IsLockedByUser>
|
||||
<SourceItem0-BuildingTarget-0>True</SourceItem0-BuildingTarget-0>
|
||||
<SourceItem0-IndividualCompileOption-0>False</SourceItem0-IndividualCompileOption-0>
|
||||
<TimeTagModified-SourceItem1--0>-8586768138329319486</TimeTagModified-SourceItem1--0>
|
||||
<TimeTagModified-SourceItem1--0>-8586768137318965490</TimeTagModified-SourceItem1--0>
|
||||
<SourceItem1-IsLockedByUser>False</SourceItem1-IsLockedByUser>
|
||||
<SourceItem1-BuildingTarget-0>True</SourceItem1-BuildingTarget-0>
|
||||
<SourceItem1-IndividualCompileOption-0>False</SourceItem1-IndividualCompileOption-0>
|
||||
<TimeTagModified-SourceItem2--0>-8586768138329319486</TimeTagModified-SourceItem2--0>
|
||||
<TimeTagModified-SourceItem2--0>-8586768129587215971</TimeTagModified-SourceItem2--0>
|
||||
<SourceItem2-IsLockedByUser>False</SourceItem2-IsLockedByUser>
|
||||
<SourceItem2-BuildingTarget-0>True</SourceItem2-BuildingTarget-0>
|
||||
<SourceItem2-IndividualCompileOption-0>False</SourceItem2-IndividualCompileOption-0>
|
||||
<TimeTagModified-SourceItem3--0>-8586768138329319486</TimeTagModified-SourceItem3--0>
|
||||
<TimeTagModified-SourceItem3--0>-8586657612990486675</TimeTagModified-SourceItem3--0>
|
||||
<SourceItem3-IsLockedByUser>False</SourceItem3-IsLockedByUser>
|
||||
<SourceItem3-BuildingTarget-0>True</SourceItem3-BuildingTarget-0>
|
||||
<SourceItem3-IndividualCompileOption-0>False</SourceItem3-IndividualCompileOption-0>
|
||||
<TimeTagModified-SourceItem4--0>-8586768137318965490</TimeTagModified-SourceItem4--0>
|
||||
<TimeTagModified-SourceItem4--0>-8586657612990486675</TimeTagModified-SourceItem4--0>
|
||||
<SourceItem4-IsLockedByUser>False</SourceItem4-IsLockedByUser>
|
||||
<SourceItem4-BuildingTarget-0>True</SourceItem4-BuildingTarget-0>
|
||||
<SourceItem4-IndividualCompileOption-0>False</SourceItem4-IndividualCompileOption-0>
|
||||
<TimeTagModified-SourceItem5--0>-8586768138329319486</TimeTagModified-SourceItem5--0>
|
||||
<TimeTagModified-SourceItem5--0>-8586657612990486675</TimeTagModified-SourceItem5--0>
|
||||
<SourceItem5-IsLockedByUser>False</SourceItem5-IsLockedByUser>
|
||||
<SourceItem5-BuildingTarget-0>True</SourceItem5-BuildingTarget-0>
|
||||
<SourceItem5-IndividualCompileOption-0>False</SourceItem5-IndividualCompileOption-0>
|
||||
<TimeTagModified-SourceItem6--0>-8586768137947755171</TimeTagModified-SourceItem6--0>
|
||||
<SourceItem6-IsLockedByUser>False</SourceItem6-IsLockedByUser>
|
||||
<SourceItem6-BuildingTarget-0>True</SourceItem6-BuildingTarget-0>
|
||||
<SourceItem6-IndividualCompileOption-0>False</SourceItem6-IndividualCompileOption-0>
|
||||
<TimeTagModified-SourceItem7--0>-8586768129587215971</TimeTagModified-SourceItem7--0>
|
||||
<TimeTagModified-SourceItem7--0>-8586657612990486675</TimeTagModified-SourceItem7--0>
|
||||
<SourceItem7-IsLockedByUser>False</SourceItem7-IsLockedByUser>
|
||||
<SourceItem7-BuildingTarget-0>True</SourceItem7-BuildingTarget-0>
|
||||
<SourceItem7-IndividualCompileOption-0>False</SourceItem7-IndividualCompileOption-0>
|
||||
<TimeTagModified-SourceItem8--0>-8586768127712154002</TimeTagModified-SourceItem8--0>
|
||||
<TimeTagModified-SourceItem8--0>-8586657612990486675</TimeTagModified-SourceItem8--0>
|
||||
<SourceItem8-IsLockedByUser>False</SourceItem8-IsLockedByUser>
|
||||
<SourceItem8-BuildingTarget-0>True</SourceItem8-BuildingTarget-0>
|
||||
<SourceItem8-IndividualCompileOption-0>False</SourceItem8-IndividualCompileOption-0>
|
||||
</Instance>
|
||||
<Instance Guid="c20a78d9-8038-46fe-9b87-bc2fa2aa9bdc">
|
||||
<TimeTagModified-SourceItem9--0>-8586768123303255465</TimeTagModified-SourceItem9--0>
|
||||
<TimeTagModified-SourceItem9--0>-8586657612990486675</TimeTagModified-SourceItem9--0>
|
||||
<SourceItem9-IsLockedByUser>False</SourceItem9-IsLockedByUser>
|
||||
<SourceItem9-BuildingTarget-0>True</SourceItem9-BuildingTarget-0>
|
||||
<SourceItem9-IndividualAssembleOption-0>False</SourceItem9-IndividualAssembleOption-0>
|
||||
<SourceItem9-IndividualCompileOption-0>False</SourceItem9-IndividualCompileOption-0>
|
||||
<TimeTagModified-SourceItem10--0>-8586657612990486675</TimeTagModified-SourceItem10--0>
|
||||
<SourceItem10-IsLockedByUser>False</SourceItem10-IsLockedByUser>
|
||||
<SourceItem10-BuildingTarget-0>True</SourceItem10-BuildingTarget-0>
|
||||
<SourceItem10-IndividualCompileOption-0>False</SourceItem10-IndividualCompileOption-0>
|
||||
</Instance>
|
||||
<Instance Guid="c20a78d9-8038-46fe-9b87-bc2fa2aa9bdc">
|
||||
<TimeTagModified-SourceItem6--0>-8586657612990486675</TimeTagModified-SourceItem6--0>
|
||||
<SourceItem6-IsLockedByUser>False</SourceItem6-IsLockedByUser>
|
||||
<SourceItem6-BuildingTarget-0>True</SourceItem6-BuildingTarget-0>
|
||||
<SourceItem6-IndividualAssembleOption-0>False</SourceItem6-IndividualAssembleOption-0>
|
||||
</Instance>
|
||||
</Class>
|
||||
<Class Guid="44fa27c9-0aa0-4297-bd3b-2c5c5bdb8881">
|
||||
@@ -1245,10 +1286,10 @@ D_2=R_2
|
||||
</Class>
|
||||
<Class Guid="e4df8d71-236e-4af2-aaea-56345a08da25">
|
||||
<Instance Guid="9e76d4e8-0b8f-4e7c-91b7-a4c442bcf2e7">
|
||||
<DeviceChangedCounter>0</DeviceChangedCounter>
|
||||
<DeviceName>R5F565N9FxLJ</DeviceName>
|
||||
<DeviceChangedCounter>2</DeviceChangedCounter>
|
||||
<DeviceName>R5F571MLDxFC</DeviceName>
|
||||
<DebuggerProperty-EssentialProperty-Endian-CpuEndian>Little</DebuggerProperty-EssentialProperty-Endian-CpuEndian>
|
||||
<DebuggerProperty-EssentialProperty-Clock-SystemClockFrequency>120</DebuggerProperty-EssentialProperty-Clock-SystemClockFrequency>
|
||||
<DebuggerProperty-EssentialProperty-Clock-SystemClockFrequency>240</DebuggerProperty-EssentialProperty-Clock-SystemClockFrequency>
|
||||
<DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Length>3</DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Length>
|
||||
<DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Item0-Name>CMT</DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Item0-Name>
|
||||
<DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Item0-IsUse>False</DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Item0-IsUse>
|
||||
@@ -1283,37 +1324,37 @@ D_2=R_2
|
||||
<DebuggerProperty-DownloadProperty-None-DefaultDownloadItemSupported>True</DebuggerProperty-DownloadProperty-None-DefaultDownloadItemSupported>
|
||||
<DebuggerProperty-OptionalProperty-Register-UpdateDisplayInExecutionForPC>No</DebuggerProperty-OptionalProperty-Register-UpdateDisplayInExecutionForPC>
|
||||
<DebuggerProperty-OptionalProperty-Register-UpdateIntervalForPC>500</DebuggerProperty-OptionalProperty-Register-UpdateIntervalForPC>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-Length>19</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-Length>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-Length>17</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-Length>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-StartAddress>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-EndAddress>262143</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-EndAddress>524287</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-StartAddress>262144</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-EndAddress>524287</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-StartAddress>524288</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-EndAddress>540671</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-StartAddress>524288</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-EndAddress>540671</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-StartAddress>540672</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-EndAddress>548863</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-StartAddress>540672</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-EndAddress>548863</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-StartAddress>548864</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-EndAddress>557055</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-IsReadOnly>
|
||||
@@ -1321,35 +1362,35 @@ D_2=R_2
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-StartAddress>548864</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-EndAddress>557055</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-StartAddress>557056</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-EndAddress>655359</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-StartAddress>557056</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-EndAddress>655359</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-StartAddress>655360</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-EndAddress>671743</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-StartAddress>655360</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-EndAddress>671743</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-StartAddress>671744</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-EndAddress>679935</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-StartAddress>671744</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-EndAddress>679935</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-StartAddress>679936</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-EndAddress>786431</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-IsReadOnly>
|
||||
@@ -1357,26 +1398,26 @@ D_2=R_2
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-StartAddress>679936</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-EndAddress>786431</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-StartAddress>786432</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-EndAddress>917503</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-StartAddress>786432</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-EndAddress>917503</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-StartAddress>917504</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-EndAddress>1048575</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-StartAddress>917504</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-EndAddress>1048575</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-MapType>InternalRom</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-StartAddress>1048576</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-EndAddress>1114111</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-IsReadOnly>
|
||||
@@ -1384,77 +1425,59 @@ D_2=R_2
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-StartAddress>1048576</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-EndAddress>8380415</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-StartAddress>1114112</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-EndAddress>1179711</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-StartAddress>8380416</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-EndAddress>8388607</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-StartAddress>1179712</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-EndAddress>1179759</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-StartAddress>8388608</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-EndAddress>4269759743</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-StartAddress>1179760</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-EndAddress>8380415</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-StartAddress>4269759744</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-EndAddress>4269759871</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-StartAddress>8380416</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-EndAddress>8388607</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-StartAddress>4269759872</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-EndAddress>4269768047</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-StartAddress>8388608</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-EndAddress>4290772991</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-StartAddress>4269768048</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-EndAddress>4269768095</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-MapType>InternalRom</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-StartAddress>4290772992</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-EndAddress>4294967295</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-StartAddress>4269768096</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-EndAddress>4293918719</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-Endian>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-MapType>InternalRom</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-MapType>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-StartAddress>4293918720</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-StartAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-EndAddress>4294967295</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-EndAddress>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-ChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-AccessSize>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-IsReadOnly>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-HasChipSelect>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-FieldInformation>
|
||||
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-Endian>
|
||||
<DebuggerProperty-OptionalProperty-AccessMemory-UpdateDisplayInExecution>Yes</DebuggerProperty-OptionalProperty-AccessMemory-UpdateDisplayInExecution>
|
||||
<DebuggerProperty-OptionalProperty-AccessMemory-UpdateInterval>500</DebuggerProperty-OptionalProperty-AccessMemory-UpdateInterval>
|
||||
<DebuggerProperty-OptionalProperty-Trace-UseTrace>No</DebuggerProperty-OptionalProperty-Trace-UseTrace>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user