mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Compare commits
1288 Commits
wolfEntrop
...
v5.7.4-sta
Author | SHA1 | Date | |
---|---|---|---|
bdd62314f0 | |||
dd2b191c36 | |||
8c5e188dd4 | |||
8604024b95 | |||
3f651a8dd0 | |||
52ba700eb3 | |||
077b070132 | |||
9af8716e85 | |||
e7e20532eb | |||
830c5dace6 | |||
25e32c2539 | |||
cab20fbdd2 | |||
6f0bcac737 | |||
ee4e1b6262 | |||
95f8d74202 | |||
96138e70f8 | |||
4c63668295 | |||
3fc3a84a6b | |||
1ddb2ce435 | |||
87ce96527a | |||
1afbf55a80 | |||
6607314dc6 | |||
f0fae6506f | |||
98eb6b398c | |||
f7bfa71d9f | |||
12f4f69fb4 | |||
38c7de1707 | |||
17c9e92b7f | |||
82273094e0 | |||
1d25e0f89b | |||
8fbf6a59bc | |||
d0f5778429 | |||
8986a9dae0 | |||
afa5b0168e | |||
e3c9c07393 | |||
6e14889758 | |||
beeda7bc6f | |||
031656ee7a | |||
ea491b80ef | |||
3bbd00f918 | |||
508555c927 | |||
30181f2ced | |||
bffcfb7efc | |||
6429315216 | |||
43fe46cf24 | |||
5a0bb3a3ed | |||
f21a763ae9 | |||
2847cbfbad | |||
18150a11aa | |||
27267d7d2e | |||
846ef1570d | |||
f8fc31e134 | |||
805eaa90cc | |||
5fd9e99bbd | |||
b535d9f752 | |||
ee24446bee | |||
5690af82dc | |||
35def11781 | |||
104c805b82 | |||
38c337967e | |||
25da3bfe5f | |||
8a71c3b3db | |||
f24b987f59 | |||
187a9b5b4d | |||
bc0a2c43e6 | |||
efff8e096c | |||
901384e704 | |||
8fda4ce147 | |||
ef063aac2f | |||
e1aba52e51 | |||
ea3a79e216 | |||
996986d0c1 | |||
f44d12026a | |||
984d16b727 | |||
61b726fae7 | |||
06de22e72b | |||
fa65da7bb0 | |||
abc6edf4c7 | |||
8803f3dd70 | |||
cc421ddace | |||
0c640eb3c5 | |||
49ad2d5c46 | |||
4ca0176668 | |||
9665434694 | |||
4ed3c00b29 | |||
554ebc2e9e | |||
a833d6e9b2 | |||
115507e0c0 | |||
db6df887a6 | |||
d6fe15af8c | |||
2abbab2fd8 | |||
64a9e6f7c4 | |||
1ce90cc8a5 | |||
b8d3b990ea | |||
a13f48aea0 | |||
db6a2ccdca | |||
fb8d2fc42f | |||
e4a661ff6e | |||
a81aa287a5 | |||
ffc07215a4 | |||
4fd33b6b5d | |||
ae46f52a66 | |||
6cde74436e | |||
cd8d158964 | |||
c7146640f9 | |||
1449f4f4d7 | |||
f5074772da | |||
3e1f365e75 | |||
724fdae7d7 | |||
e3c2c650aa | |||
cc7ccf951a | |||
260a0dee47 | |||
0d5d05d44d | |||
9312f3cb86 | |||
0665ff9de7 | |||
551eb3f44b | |||
dc2a8118de | |||
ee92f38f88 | |||
2ca3e1100e | |||
886ebb6ec0 | |||
0f8b4dbc63 | |||
5d3f7c2528 | |||
743a78dc85 | |||
caf920100c | |||
dfd8ead95e | |||
f8da04d8b0 | |||
65742c4a7a | |||
5f1ddadf71 | |||
9c4960f3fa | |||
daef866313 | |||
c49f571a79 | |||
bcc65a09ca | |||
b5475f3d81 | |||
8b2a26a691 | |||
8d3ed05272 | |||
12ba4355d2 | |||
74d14d9687 | |||
64a359c501 | |||
7b805d7a7d | |||
e81ae7bcb6 | |||
10e449dc00 | |||
c8840a53ad | |||
d3f143aa2a | |||
a3f6babfdc | |||
06195a2e2a | |||
56a96ba609 | |||
43574e2255 | |||
a23d384e06 | |||
244fff844f | |||
bed680a96c | |||
deda512598 | |||
410e2f148c | |||
052cf77233 | |||
ce9d0e236c | |||
e6dac68ce3 | |||
4a37947d8f | |||
e4f4274b4a | |||
4753e1c32e | |||
f878220b81 | |||
b4146bad18 | |||
cd5ddeb1c5 | |||
bf29b68600 | |||
92faa915e4 | |||
59389a0ef5 | |||
b9de3bbf1a | |||
dbd3484fdc | |||
0bb41e1eb4 | |||
7989dd8713 | |||
e10c943bf3 | |||
c230e10f4a | |||
5105082a1f | |||
b84a4e1c8d | |||
7a1d0e0dc8 | |||
16dc67f421 | |||
29e27889ee | |||
dab764a08e | |||
69e390f8b9 | |||
e944967731 | |||
a25c0244a7 | |||
4962180a93 | |||
f4b603fa4e | |||
032ab3b57e | |||
898815f11b | |||
7ff3b9b79d | |||
2e539ef70c | |||
f1e6dd2bac | |||
ea4d6c00f6 | |||
f7afc47d98 | |||
c3410f2cb8 | |||
d0d802a2df | |||
afe5209427 | |||
0668c6ea5d | |||
d2047986d9 | |||
b81cc50a70 | |||
695914ed33 | |||
e814d1baea | |||
24d1b11993 | |||
cd6bea852b | |||
ea852c1c67 | |||
10f0885d88 | |||
50bbdbbe42 | |||
925fbf3bf7 | |||
1690ad7366 | |||
ac788ec40d | |||
b8dff12e06 | |||
a04871f153 | |||
666e658398 | |||
59279515f4 | |||
3193ecb2c3 | |||
f15700f1f6 | |||
75a676bc7e | |||
7e69c2049b | |||
65853a41b9 | |||
984dd9146f | |||
ee7f02bbd6 | |||
113a61c11e | |||
2db2bedd5f | |||
47add7e9e2 | |||
bb67069e4a | |||
e4301bc554 | |||
60c2499602 | |||
b96e73f9ed | |||
3178ce60c6 | |||
794f0d8d19 | |||
dd2186f68a | |||
6414cf61a7 | |||
2285c02f1c | |||
32ebaea158 | |||
a1a3a0b04f | |||
46f6a60c9e | |||
2323a5cf59 | |||
2a354905cb | |||
de657787cf | |||
e26ac5e122 | |||
45b88048c2 | |||
4893017005 | |||
d72c0b372c | |||
bea285c8ef | |||
efd4127b84 | |||
79b5ec86f6 | |||
2328a7e407 | |||
4db1605914 | |||
67b0c4d03f | |||
e5109b3f41 | |||
7592241a46 | |||
393072037a | |||
60dbe38226 | |||
13b26bc46b | |||
60e1c03e46 | |||
267add1fb3 | |||
72711b4e15 | |||
f3e41aaf3a | |||
6b806f8bda | |||
967dc443fa | |||
c6124d573a | |||
8aa63e3aad | |||
5e1db686e1 | |||
76f71a31f1 | |||
35442d27b5 | |||
6c5b174e51 | |||
17261467a6 | |||
0d158fc663 | |||
1896b47399 | |||
9dccd66a3a | |||
62c6a3d892 | |||
34224d84d3 | |||
665fd89c55 | |||
4f856773cf | |||
8bf196f32c | |||
45d51bfe49 | |||
28cebe8c7e | |||
f599a0a7c3 | |||
6735fcf695 | |||
112a4ddbad | |||
0f646b6e4b | |||
09b5362ed8 | |||
c16ebaeb47 | |||
1a4b821c64 | |||
27adc66cca | |||
cad2bbd7a7 | |||
634e547fba | |||
67528f91b3 | |||
bc6881974d | |||
735c0f6b3a | |||
a9cc880f65 | |||
3c67abc664 | |||
554d52b069 | |||
9781c1fea4 | |||
3f0a17b331 | |||
1ffcf4000b | |||
baab3348f4 | |||
55cd8a800f | |||
9881edfabe | |||
1cb324affa | |||
a7ef540344 | |||
8f8b4e6665 | |||
fe7987f241 | |||
d714e55a2b | |||
2e8cf39feb | |||
8017c816bb | |||
5adad7d869 | |||
ca3b1a1412 | |||
7a23cff27f | |||
d796d8c107 | |||
bddb83b62a | |||
005a57f745 | |||
cf96ab22ba | |||
99a99e3d6e | |||
bbbc40dacc | |||
8768c55579 | |||
5be198fa0e | |||
af8feed531 | |||
a31e914b98 | |||
da1b8358dc | |||
212708e3b4 | |||
9d24480379 | |||
510d6a07bf | |||
9815d9bd03 | |||
d7303664b5 | |||
fbbb2b876b | |||
1e0c2604dd | |||
263cb5bf78 | |||
a81efc0f6f | |||
072c5311a5 | |||
337456cc1e | |||
7122001dd6 | |||
b9908409d4 | |||
87dc45b938 | |||
46f2b21abf | |||
ffd0fb23f7 | |||
ec8a1ba956 | |||
fcb8d3ffc5 | |||
fb2144d290 | |||
949565f156 | |||
be88ddda15 | |||
bd77ee4f37 | |||
ae6c872797 | |||
84c80b4c0f | |||
1e75a2367c | |||
74ac2cd07d | |||
29f51b6245 | |||
4a26af0dfa | |||
ee2b77c0bd | |||
6d5fefde4a | |||
8ce6f17144 | |||
c166b9dd77 | |||
c3900470aa | |||
ef6f1562d6 | |||
41b3a729d2 | |||
47e51400bb | |||
aa41e09937 | |||
5ef617a75a | |||
04c781ad9b | |||
9666394b73 | |||
b4a491de12 | |||
92f3a808b0 | |||
e6b466dd71 | |||
52030f182b | |||
990d38a068 | |||
80f3b0d3d8 | |||
4545a9b4a2 | |||
0d5659ff2d | |||
84f0800b96 | |||
91e411b4b9 | |||
8cea8283db | |||
7df446bf4e | |||
7faed6cded | |||
c49f1e22bd | |||
4fa20cb770 | |||
b0ddccc802 | |||
5b337e69d9 | |||
171ab4b13a | |||
f6d40ad229 | |||
95c94f52d9 | |||
e9d820b730 | |||
b736d78950 | |||
de3c45a02c | |||
e3301b06f6 | |||
ad7c25b409 | |||
eb53a95f57 | |||
3fac3b71ca | |||
53c4c0095a | |||
98a51029f8 | |||
8d0047fedf | |||
428e15816f | |||
e227b2ad7d | |||
5b8e9e692f | |||
1b0ef048ba | |||
430d104430 | |||
723d8efd1c | |||
cf8f9a80fc | |||
3cb66ad18a | |||
20e2e33e25 | |||
75c6633039 | |||
c88f1c4d54 | |||
9e2a7b3653 | |||
088dfab22a | |||
4159ba0a95 | |||
974506db28 | |||
27033c225f | |||
d23bfd2eb9 | |||
88d1ed7393 | |||
246228e410 | |||
a75c73cdef | |||
ea57e82395 | |||
1c8f1e6921 | |||
79d3b955ed | |||
213ac1ac0a | |||
10c1fa2088 | |||
500a3b41e4 | |||
e912aff7e5 | |||
49a680540c | |||
232314039d | |||
dbfebeac43 | |||
884b51151b | |||
65db4b15d6 | |||
c81c9be9ce | |||
b57fcd0bd8 | |||
398f8c90e2 | |||
282e559113 | |||
e708ef3b56 | |||
9e204dc023 | |||
4bd39aa52e | |||
87aef05f16 | |||
80a63a3fce | |||
945f97636a | |||
5f40f9a140 | |||
96e2c51f07 | |||
6fc9dcae07 | |||
9ad4e565fe | |||
dcaff9dff4 | |||
887c5abcb1 | |||
9f6a75cdfd | |||
a3fb5029f8 | |||
73786112ec | |||
603c03c0be | |||
6114691fd6 | |||
a3fea482db | |||
f749ca387d | |||
8661cf6fee | |||
9a8573afc9 | |||
8aa5f463b1 | |||
2a1165460e | |||
1c8767b4d3 | |||
a31733db85 | |||
7e16016311 | |||
53aec861a4 | |||
c9ff15da21 | |||
3b5d0aa85a | |||
f9af463db1 | |||
fb86818251 | |||
0580c1a83a | |||
7c7de235d8 | |||
990b4d62ea | |||
88c3e0af22 | |||
2a96981dbe | |||
b26fa6cf59 | |||
121b8c52f8 | |||
ae939e9e6a | |||
806df85477 | |||
ec6c7051a8 | |||
b7a6c6c314 | |||
a80a2cdcff | |||
b237730dad | |||
293719c168 | |||
9254e270be | |||
ed7beb4e0e | |||
2c9a3c5c1c | |||
70caed572a | |||
2ddfe15c4f | |||
94478cb208 | |||
ef2424336c | |||
b6bfae9c24 | |||
765e5d1689 | |||
2fa0da74e4 | |||
4d837e74c4 | |||
2bcfff3497 | |||
72fc08ede8 | |||
126df1d9ee | |||
13ec0f0694 | |||
b67fd6f29c | |||
d475ecc8d3 | |||
0df8a0f88c | |||
2dcd04668b | |||
255465a757 | |||
26756da925 | |||
4b4000bf61 | |||
fab5c9f864 | |||
ef4ea53570 | |||
41449fac48 | |||
5e1bf9d4f2 | |||
f670400183 | |||
17870d4159 | |||
50a3a37ff2 | |||
844d0ec558 | |||
109e4c3dfb | |||
31ec2b0acd | |||
b886ffd04b | |||
7c3d66ecd6 | |||
b178138d83 | |||
d4f6b5b300 | |||
1a3a730eb9 | |||
5e77c06ea2 | |||
6494233774 | |||
b2f59f733a | |||
a3e239c2ad | |||
652158fcac | |||
6174fb3545 | |||
0cfd48f200 | |||
dcea21a9a5 | |||
b7299a23c0 | |||
d0475def5f | |||
349e06ab4a | |||
a57d234f6b | |||
e164bcb24d | |||
90152fedda | |||
2537e08a99 | |||
893a486ae1 | |||
bf074d2bb9 | |||
b17b190695 | |||
25dd8b641e | |||
60f438f0c3 | |||
bcbb5441ec | |||
c454a4217c | |||
3f0ba97d1e | |||
1d34b565fa | |||
4bedef9664 | |||
a39f521f7f | |||
7725e75c42 | |||
6dab58266d | |||
be37587bc3 | |||
8a6d7ff9a5 | |||
f4a27772e0 | |||
88d4f486e2 | |||
166519ae67 | |||
577cce60df | |||
7d2ca8db5f | |||
2356bec909 | |||
db64d36f00 | |||
8baf39310f | |||
56adefcdc5 | |||
08d8a74992 | |||
e99bbf9429 | |||
1a0bf421bd | |||
2505a59dae | |||
2448d482f4 | |||
05c4955316 | |||
0da78a7ee2 | |||
1c68da282c | |||
305a699398 | |||
4f4fb4bd0a | |||
3260a9b680 | |||
c4f978ffc8 | |||
0becc347b1 | |||
294362a0b7 | |||
e417091f61 | |||
a0fc2f0497 | |||
e562a1c4d1 | |||
b412e5f24e | |||
c90aa27e06 | |||
723adaad20 | |||
9a693f5e65 | |||
d5268d8bb5 | |||
a09e3bb3e7 | |||
b693127dcd | |||
a6a40de249 | |||
a9be38eaf0 | |||
1190d1bafe | |||
d056b63742 | |||
bbdf7fc1b0 | |||
ccd8b9aa8d | |||
003ea8bff0 | |||
14254e8a6e | |||
0c24aff183 | |||
39a4780878 | |||
a2acc41b3f | |||
65d7c6a533 | |||
3ade7a875e | |||
dcf3af5382 | |||
7a29b1e4fd | |||
15abea7f20 | |||
337cddfd90 | |||
1fa2d2d625 | |||
21484ec75a | |||
f4decf84da | |||
8b57e3e741 | |||
498dadad97 | |||
055d68db9c | |||
ee966beb77 | |||
01eaa56290 | |||
7dbf2a06dd | |||
ef500c2e62 | |||
ab7bc29006 | |||
f8c968d8d1 | |||
e0e05766ac | |||
5ea22effcc | |||
3875a1855e | |||
7fac450c92 | |||
869431495f | |||
53f5ded48d | |||
10a3634e86 | |||
8df5d61179 | |||
e2d2915fc1 | |||
08622bab39 | |||
537827ebde | |||
3725594020 | |||
9f9e89082f | |||
bec3cd8b6f | |||
ae7e7e716a | |||
f660299de0 | |||
85bab19090 | |||
debbea3843 | |||
0d84597d78 | |||
84b91d0e1e | |||
bba3995434 | |||
d351430222 | |||
0d952c3343 | |||
656ba24de5 | |||
e142b16ae2 | |||
034e13298f | |||
98f8ab085e | |||
edb95ae7ae | |||
0a5ebaf806 | |||
373f5ee9ae | |||
9dddd99b3b | |||
17a09d9853 | |||
2a08d3001c | |||
c25d86c6c7 | |||
085b78994d | |||
63ec8fe83a | |||
e1502e7f5b | |||
a75d520727 | |||
24e34aa41a | |||
f5e775fe95 | |||
763ced668e | |||
5f6067c3e1 | |||
493022b4b4 | |||
180ad206fc | |||
abc910c03c | |||
0ab1f1969d | |||
92952a5538 | |||
38d191c159 | |||
75c3030554 | |||
a31d8c5ce7 | |||
632d9653da | |||
18aa2b8d78 | |||
6116d5edb4 | |||
2cc5ecf117 | |||
b6a9c38950 | |||
91ea7ab206 | |||
a30d9c9818 | |||
29a5cc39f2 | |||
3cf3f297ba | |||
101088c390 | |||
1c2b47d8ad | |||
f1c918c261 | |||
3a83c33499 | |||
6fea4f1266 | |||
bcbd701155 | |||
f1ace62363 | |||
f419e2351b | |||
d350ba6c41 | |||
d6a7187538 | |||
f7fc0695c1 | |||
208f2d6781 | |||
eb0c64d79a | |||
d7a0f49906 | |||
c947fc8fda | |||
4062b94fb3 | |||
ac4f3fb75f | |||
5083489174 | |||
cc2ed4a75b | |||
fc19c36bf8 | |||
a0b2da98e6 | |||
2a2f9d5916 | |||
df0663b70e | |||
ea307c79e5 | |||
039853cbd5 | |||
792f81382c | |||
b26c34c695 | |||
0e0c3634ec | |||
ab2256c088 | |||
332c64a77c | |||
5320b425e7 | |||
573ade3178 | |||
54370cc51e | |||
8368a32e7e | |||
d65be7af21 | |||
9aa0742baa | |||
35b45aa015 | |||
25d14f1937 | |||
19ea0b22d0 | |||
b12a773821 | |||
423c1d3e57 | |||
01afe89fa2 | |||
a18d0161ef | |||
a918c0e080 | |||
bd88078639 | |||
1199d5a5a8 | |||
15e99c8eff | |||
c3adf6635b | |||
9f62ff6e38 | |||
d2373246ad | |||
e1c1b5019e | |||
16d05972ed | |||
65283fb9bb | |||
aee446f3e5 | |||
4c86219afa | |||
edb5d09e6c | |||
90861d9e6d | |||
3943e1324f | |||
ebb49b6e68 | |||
1b8254d668 | |||
1bc085358a | |||
1dd94bb0cb | |||
54997837f4 | |||
1ade735579 | |||
7023d5212c | |||
6017c86e5d | |||
548a2c6d8e | |||
407b78962e | |||
dbf88e4c73 | |||
ad76038b86 | |||
6a1139a6ee | |||
31cb72ed8a | |||
1d9b86e2b0 | |||
877c1d781f | |||
bbbc1e074c | |||
afb6fe6c5f | |||
20f7d6f9f4 | |||
fb3185bb72 | |||
50d60bf0e7 | |||
f4c16d22a1 | |||
36d01cdb9b | |||
f1e01e4636 | |||
7da6149250 | |||
1681cb2d7e | |||
f9dc5e9f4d | |||
6d39a78dba | |||
3fc7be8e3b | |||
2d5462d77d | |||
31380aca13 | |||
034af8d99c | |||
3b74a64029 | |||
b1765ca6b4 | |||
5e58affd5d | |||
f7094ff3c4 | |||
c3b5322f86 | |||
caab2c2dca | |||
92f1c6e339 | |||
56eed9e059 | |||
b40913e80c | |||
73dc9baaf9 | |||
c2e8121462 | |||
42930b28f3 | |||
55540d03e7 | |||
b28e22aef0 | |||
dace3acd4d | |||
181c408d17 | |||
c4f73f5955 | |||
324e714a6a | |||
42403a526e | |||
3a4788b7bb | |||
7f7d94abd5 | |||
97dcf123f0 | |||
4b9d89d387 | |||
3e2123f0b3 | |||
007f9ea39d | |||
a1fbfa94d2 | |||
d2d71c276d | |||
d0782a97ce | |||
e2b642d4ab | |||
f8726148df | |||
3284f53574 | |||
a34ea32f52 | |||
e1995b8313 | |||
140abe6c72 | |||
bb60c58800 | |||
6ee22de999 | |||
8f908e76f9 | |||
7c6eb7c4a1 | |||
367508f498 | |||
a3b6ec4a13 | |||
b1dcdabcd4 | |||
6a26569ddc | |||
a07a658771 | |||
604a1fe2da | |||
bdfe2c3fdf | |||
a9ff7730ce | |||
765231060e | |||
6952d1a5ea | |||
33f71f6f60 | |||
575df43889 | |||
4d8a6b84fb | |||
16a2d2e71d | |||
c3d30e7987 | |||
f5ed2460df | |||
787397b28e | |||
e13a8ddcfb | |||
0aa0f26289 | |||
31a6a2bf59 | |||
8a9c893c6f | |||
0eeae4da8c | |||
bd5586623a | |||
74d4ae0075 | |||
3e02a70c07 | |||
851bb34f3c | |||
08b211c3bb | |||
b5e188830d | |||
8bf2fb0ae0 | |||
b3c812921a | |||
f87849b6f6 | |||
8356b349a5 | |||
e6fcd488a6 | |||
47dcac657c | |||
4eab0f1231 | |||
4bc04673d1 | |||
945a24e5b4 | |||
a82b76978e | |||
7434092a3a | |||
3492caba51 | |||
04ab561a65 | |||
902087df6f | |||
27c3140c2b | |||
c36ab59f24 | |||
6a745518bc | |||
ec9fcf5353 | |||
bbd8fdfc38 | |||
ee7748f2e3 | |||
9023aeef75 | |||
5298039d09 | |||
0c1163f01f | |||
9e99544315 | |||
1159fc333f | |||
51c49b678e | |||
0a928ead3f | |||
61eb6987d0 | |||
62db3533ae | |||
2d370f3e4e | |||
7216a543dd | |||
bd7f7c8bdf | |||
29ec038aa6 | |||
08940866c3 | |||
3f921e0a32 | |||
8468a70b72 | |||
1e7810153f | |||
41efa0492c | |||
198f4030e8 | |||
685bfd1f9d | |||
0f3ebedba0 | |||
0be4041479 | |||
237df2cb11 | |||
500951f059 | |||
96af77d757 | |||
bbd769d43a | |||
1112751654 | |||
4d247a3a88 | |||
7aad09fc87 | |||
e002b6efd3 | |||
f2f3a8273d | |||
137831367d | |||
0d8763be57 | |||
56b8ac4fa1 | |||
2b4acf5027 | |||
475ec7b680 | |||
95f4e0618b | |||
5b1e6db9a5 | |||
93ca213a68 | |||
dc86dad26b | |||
12ba31967c | |||
206d3f47f7 | |||
8c76cab2cb | |||
e7c068b9aa | |||
d21e12851a | |||
8e2775fc89 | |||
d6731f0f84 | |||
f84ea01f72 | |||
1cf96eb72c | |||
baec0ced59 | |||
e0494b5f04 | |||
d6ecaaddbd | |||
978456e39d | |||
7b089f548e | |||
76f669b1cc | |||
a26476b8b2 | |||
3cc7bbea67 | |||
0979fe8fea | |||
41cf8c090b | |||
fe2a826ede | |||
6456281b41 | |||
28db1b19e1 | |||
db4177ae2c | |||
e581930cb7 | |||
d4741de5dc | |||
204668778b | |||
9bd0985c87 | |||
2543674d9f | |||
6703a58c51 | |||
fdd03fa909 | |||
a5c2290e40 | |||
fea7a89b86 | |||
c333fdf545 | |||
4ec07bb5a8 | |||
2d0353bcb1 | |||
90836c782b | |||
00e42151ca | |||
c8aa0fa351 | |||
203f65a636 | |||
6c0aae714f | |||
d1e26b4f5d | |||
595e71d7f4 | |||
e35e713c4a | |||
780fd98f40 | |||
c8a9bdbe15 | |||
88af1a2932 | |||
d8757a51b3 | |||
fee9788bb0 | |||
b948f6797c | |||
de20bb7ba9 | |||
d5016d451f | |||
7ef424b193 | |||
f8eb0c3776 | |||
f42fb587a5 | |||
d4cf93c2cf | |||
c880fcf822 | |||
25d52dde3f | |||
50a7243486 | |||
fbdb064a4b | |||
ac52660d5b | |||
8946e3fb4b | |||
053170613a | |||
5ca9b2f8a4 | |||
4ae277d21e | |||
44a5e1a398 | |||
e6fbe25398 | |||
f91d0a2925 | |||
1fd9f2af91 | |||
387f36657c | |||
3e58cfd864 | |||
fe932b893c | |||
4c13834500 | |||
1c23d2222c | |||
f5e27bfb0c | |||
4335dac794 | |||
4004e6886f | |||
a8780d4a80 | |||
f7f3ba9c76 | |||
d3316b72d3 | |||
955490e90a | |||
7cc42d446e | |||
ba1eedb46b | |||
d7b0aa92cb | |||
6409b68b21 | |||
4ff0af79c7 | |||
a490d4fdf7 | |||
5aca239714 | |||
e340e41db3 | |||
43b62c8ccf | |||
804f25d76b | |||
c065e4a854 | |||
9222cb1304 | |||
b5206e8504 | |||
c82081591a | |||
7814e4c264 | |||
dabfad9f6c | |||
7ad0248558 | |||
32066373c2 | |||
9ec29e9ad9 | |||
ac7f44b0dc | |||
bbf3bb4bf4 | |||
72aa6ad178 | |||
c07e7f1e58 | |||
b5b0e17587 | |||
1e3f623ff3 | |||
45442db047 | |||
7dfef18cf4 | |||
98a5a4c201 | |||
7faf0dccc7 | |||
2fd7a2e4ae | |||
80d4f71eb9 | |||
4913289ce5 | |||
864a9d0598 | |||
2a86ca43f8 | |||
4dc52484f6 | |||
85552d0fc8 | |||
107cc82a06 | |||
c047e55b92 | |||
91cad98d67 | |||
5420c1a081 | |||
7691bb6a2a | |||
97adb4be6e | |||
f66e5a52bd | |||
6dd43caae9 | |||
4d56cc1790 | |||
73a1938e89 | |||
ae0d40b119 | |||
4d43dbf83b | |||
474b8a0673 | |||
3d7583e743 | |||
e81e18859b | |||
72b6074b93 | |||
6d0dc7f2e7 | |||
22abd37408 | |||
38335f4947 | |||
263eb6c60f | |||
f466453d61 | |||
8bba660f9c | |||
aa61f98955 | |||
394948ce94 | |||
7b029d3447 | |||
5793f626ac | |||
b7394274ae | |||
be68ba4850 | |||
773451a5dc | |||
7cd610bc45 | |||
0900e00ee7 | |||
75475ae624 | |||
f1b1483c63 | |||
a094831e1a | |||
2312cb4563 | |||
59c7abf635 | |||
b4e15d028c | |||
0cf5421e5a | |||
7405ea8162 | |||
c9d83babe0 | |||
23f796c0b4 | |||
871dc9c19b | |||
a1645d684a | |||
f00e5247bb | |||
e72db4a306 | |||
aea32e37a9 | |||
25b72497d8 | |||
0303a828ec | |||
3eda3436d1 | |||
610af43d03 | |||
94e031e905 | |||
8734f1251d | |||
ac5b81edd1 | |||
30eb558d58 | |||
e8c3a7dfce | |||
1ef9a8fe7c | |||
8ee01ebaf2 | |||
63f666a599 | |||
d545253df7 | |||
118d2cc8cc | |||
75d06cd6f3 | |||
32ca92bd97 | |||
38c7327660 | |||
3e3a00dafd | |||
24291b4147 | |||
2b0d724a4d | |||
71be6524f7 | |||
6f4aa54f5b | |||
9175355c81 | |||
d4a90e8a71 | |||
5efa82a239 | |||
95cd9c81c8 | |||
f6f83a20ed | |||
684fef2429 | |||
eef20ceb51 | |||
0cd3bd7ad3 | |||
1eea3720e3 | |||
f863513f37 | |||
187dbd9974 | |||
c91d306531 | |||
fbd69f9b48 | |||
2f379ed322 | |||
8d77df15ef | |||
a141041d13 | |||
87114faa94 | |||
f3c93a7b57 | |||
7018f464ee | |||
8aaf5670f4 | |||
2c69e4a56b | |||
5df57207ac | |||
38089f11cd | |||
a4ee5af1ed | |||
a120b83dac | |||
512b468dbb | |||
98d2ca1d42 | |||
3d70fb1d50 | |||
385a097646 | |||
fce14ffddb | |||
88527a3d6e | |||
8ca8827b58 | |||
20911f254b | |||
ae9291f4d3 | |||
897d55f060 | |||
d2f4cc9e28 | |||
b0d0a1afe8 | |||
372f57e528 | |||
211742bfe0 | |||
9f9a82e469 | |||
20e0e12185 | |||
845e2f752c | |||
b7d32d0609 | |||
891b986fd4 | |||
d49308e64a | |||
ac459e3cec | |||
30dbf7c047 | |||
202b0a15b4 | |||
b9e5c0252d | |||
1b907d05ed | |||
b3e8f0ad24 | |||
1753d524d7 | |||
f7bc78cad0 | |||
ebca3376ef | |||
e960a00650 | |||
fda8b4f64f | |||
6a29dfc6fb | |||
8c47e8d6f2 | |||
d7d8d14e95 | |||
1c51465584 | |||
d09f955e6c | |||
c82230324e | |||
3d33c78e9d | |||
467b3cb561 | |||
ac5cabaac9 | |||
5a1ac2742c | |||
71db561c96 | |||
ef925b8b30 | |||
68f52cb49a | |||
3de358ef06 | |||
d80f05bf77 | |||
7cc0ac14c4 | |||
690d8f7f89 | |||
f3061359d8 | |||
60ccaf379d | |||
29df90197e | |||
b69482ffac | |||
7ce9ebde15 | |||
fbb2737c2a | |||
acd604db3d | |||
5132a17fab | |||
b7d0c257e6 | |||
162dffb463 | |||
1f75d0e1d7 | |||
92bbd651b6 | |||
0de974c3a7 | |||
d20ac2ce42 | |||
70d317ec79 | |||
589353f346 | |||
18526152fe | |||
8d63fb5fe5 | |||
592a4522e1 | |||
453e2fadc1 | |||
f3b61487e5 | |||
b3e795c4a5 | |||
72243300bf | |||
ea02fea3ef | |||
2ab709c89a | |||
6cb97a7262 | |||
f231c7be03 | |||
119d2a5da1 | |||
55837fa254 | |||
70fc5c97fb | |||
7adf0fde8c | |||
983610ed68 | |||
5d0b7e0d18 | |||
0397d90713 | |||
ede8cde8a7 | |||
e428c2833b | |||
2c644eb38a | |||
04430f55ca | |||
df44face56 | |||
eb8f26926d | |||
514fdfcd43 | |||
78b056c1b0 | |||
8763b127d9 | |||
b2e7707f18 | |||
c04c7685b1 | |||
305a754de3 | |||
d07d4fb8ac | |||
1f684e62d6 | |||
c325de993d | |||
a2e26fb36e | |||
b4910c4615 | |||
cfbadc8b07 | |||
3d374239a1 | |||
43f4ba91da | |||
0c0069331b | |||
4140a05fe4 | |||
e8e6eaeb4d | |||
b1146becfd | |||
6f567b58bc | |||
15ac366bf9 | |||
3975af88cf | |||
bc2b184c98 | |||
26284e2e5d | |||
533aa48b14 | |||
2445fe844a | |||
4d2ce1131a | |||
2caee1c7c5 | |||
ff7626419e | |||
01a1685159 | |||
5657d88ddb | |||
d3a6b71f5f | |||
40562a0cb3 | |||
0789ecb808 | |||
447f73c25e | |||
4b77d4caa1 | |||
fc8a509b06 | |||
f646cbcecb | |||
7fadd4ed9f | |||
bb57c1de94 | |||
af3828b2b7 | |||
ecef3c214c | |||
ebdc8b9a32 | |||
1310c97a22 | |||
66a5d8cc8a | |||
107c10d795 | |||
61fea768b3 | |||
41cbbfe3ab | |||
34ca03770f | |||
52f1caf699 | |||
095609107d | |||
23bfb01e54 | |||
174456437e | |||
f13a82610c | |||
a17677c946 | |||
473de5796c | |||
284dea43fe | |||
e620b47e1a | |||
a4544ce2eb | |||
af537a6ae3 | |||
3e9f656ac3 | |||
0b7f293691 | |||
cf61df129c | |||
9673b3f218 | |||
b00ae2ac69 | |||
511c403631 | |||
6cca3a0d92 | |||
288fe430f5 | |||
18d80864b9 | |||
8d41e68d1f | |||
5306a85465 | |||
200f309e0e | |||
021b573027 | |||
8de00d7651 | |||
911f21ed36 | |||
a5154b22f1 | |||
063e48014a | |||
9b058ec3a2 | |||
3b5517692e | |||
51f19f42c6 | |||
76e7d8627f | |||
30eb26bd79 | |||
3f96d14b32 | |||
12a5cb45fb | |||
078fb66b29 | |||
b8838dca44 | |||
3670bfb9ae | |||
d28dd602e5 | |||
b98e4e0093 | |||
e05dbd531e | |||
688ae60cd9 | |||
ff6e6848de | |||
40db521f8b | |||
9a58301ab1 | |||
023f604213 | |||
82642c1ee1 | |||
8a7e3ba52e | |||
5c497c62e7 | |||
f2492da6a4 | |||
14068fb7f3 | |||
159981f442 | |||
110f4ec737 | |||
24f581fe13 | |||
fe5cc9589b | |||
1a000ef94c | |||
52b6c361f9 | |||
cb0048dbb1 | |||
425dd1986b | |||
fe9882769e | |||
314afc9e10 | |||
ba5cc9bdaf | |||
8f1029f86d | |||
f744043db1 | |||
5f46809988 | |||
ad25e9b063 | |||
8d49dce2cb | |||
afc1e96899 | |||
77cd3b837b | |||
4a5373f21b | |||
32d0abb407 | |||
79235a4698 | |||
791c9e7aba | |||
b7a28cc704 |
5
.github/workflows/async.yml
vendored
5
.github/workflows/async.yml
vendored
@ -23,7 +23,8 @@ jobs:
|
||||
'--enable-ocsp CFLAGS="-DTEST_NONBLOCK_CERTS"',
|
||||
]
|
||||
name: make check
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 6
|
||||
steps:
|
||||
@ -36,7 +37,7 @@ jobs:
|
||||
./configure ${{ matrix.config }}
|
||||
make check
|
||||
|
||||
- name: Print errors
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
if [ -f test-suite.log ] ; then
|
||||
|
38
.github/workflows/coverity-scan-fixes.yml
vendored
Normal file
38
.github/workflows/coverity-scan-fixes.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Coverity Scan master branch on a daily basis
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
coverity:
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
|
||||
- name: Configure wolfSSL
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure --enable-all
|
||||
|
||||
- name: Check secrets
|
||||
env:
|
||||
token_var: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
email_var: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
||||
run: |
|
||||
token_len=${#token_var}
|
||||
echo "$token_len"
|
||||
email_len=${#email_var}
|
||||
echo "$email_len"
|
||||
|
||||
- uses: vapier/coverity-scan-action@v1
|
||||
with:
|
||||
build_language: 'cxx'
|
||||
project: "wolfSSL/wolfssl"
|
||||
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
||||
command: "make"
|
17
.github/workflows/curl.yml
vendored
17
.github/workflows/curl.yml
vendored
@ -15,7 +15,8 @@ concurrency:
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
@ -26,16 +27,20 @@ jobs:
|
||||
configure: --enable-curl
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-curl
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
test_curl:
|
||||
name: ${{ matrix.curl_ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 15
|
||||
needs: build_wolfssl
|
||||
@ -54,7 +59,9 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-curl
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Build curl
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
@ -67,4 +74,4 @@ jobs:
|
||||
|
||||
- name: Test curl
|
||||
working-directory: curl
|
||||
run: make -j test-ci
|
||||
run: make -j $(nproc) test-ci
|
||||
|
105
.github/workflows/cyrus-sasl.yml
vendored
Normal file
105
.github/workflows/cyrus-sasl.yml
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
name: cyrus-sasl Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-all
|
||||
install: true
|
||||
# Don't run tests as this config is tested in many other places
|
||||
check: false
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-sasl
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
sasl_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of releases to test
|
||||
ref: [ 2.1.28 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# Don't prompt for anything
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install krb5-kdc krb5-otp libkrb5-dev \
|
||||
libsocket-wrapper libnss-wrapper krb5-admin-server libdb5.3-dev
|
||||
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-sasl
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Checkout sasl
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: cyrusimap/cyrus-sasl
|
||||
ref: cyrus-sasl-${{ matrix.ref }}
|
||||
path: sasl
|
||||
|
||||
- name: Build cyrus-sasl
|
||||
working-directory: sasl
|
||||
run: |
|
||||
patch -p1 < $GITHUB_WORKSPACE/osp/cyrus-sasl/${{ matrix.ref }}/${{ matrix.ref }}.patch
|
||||
autoreconf -ivf
|
||||
./configure --with-openssl=no --with-wolfssl=$GITHUB_WORKSPACE/build-dir --with-dblib=berkeley --disable-shared
|
||||
# Need to run 'make' twice with '--disable-shared' for some reason
|
||||
make -j || make -j
|
||||
|
||||
- name: Run testsuite
|
||||
working-directory: sasl
|
||||
run: |
|
||||
make -j -C utils testsuite saslpasswd2
|
||||
# Retry up to five times
|
||||
for i in {1..5}; do
|
||||
TEST_RES=0
|
||||
$GITHUB_WORKSPACE/osp/cyrus-sasl/${{ matrix.ref }}/run-tests.sh || TEST_RES=$?
|
||||
if [ "$TEST_RES" -eq "0" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
4
.github/workflows/disabled/haproxy.yml
vendored
4
.github/workflows/disabled/haproxy.yml
vendored
@ -20,7 +20,8 @@ jobs:
|
||||
# List of refs to test
|
||||
ref: [ master ]
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
@ -57,4 +58,3 @@ jobs:
|
||||
- name: Test HaProxy
|
||||
working-directory: haproxy
|
||||
run: make reg-tests reg-tests/ssl VTEST_PROGRAM=$GITHUB_WORKSPACE/VTest/vtest
|
||||
|
||||
|
8
.github/workflows/disabled/hostap.yml
vendored
8
.github/workflows/disabled/hostap.yml
vendored
@ -22,6 +22,7 @@ jobs:
|
||||
- build_id: hostap-build2
|
||||
wolf_extra_config: --enable-brainpool --enable-wpas-dpp
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-20.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
@ -99,6 +100,7 @@ jobs:
|
||||
build_id: hostap-build2
|
||||
}
|
||||
name: hwsim test
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# For openssl 1.1
|
||||
runs-on: ubuntu-20.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
@ -181,7 +183,7 @@ jobs:
|
||||
- name: Checkout hostap
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: julek-wolfssl/hostap-mirror
|
||||
repository: julek-wolfssl/hostap-mirror
|
||||
path: hostap
|
||||
ref: ${{ matrix.config.hostap_ref }}
|
||||
# necessary for cherry pick step
|
||||
@ -210,7 +212,7 @@ jobs:
|
||||
done
|
||||
|
||||
- if: ${{ matrix.hostapd }}
|
||||
name: Setup hostapd config file
|
||||
name: Setup hostapd config file
|
||||
run: |
|
||||
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/hostapd.config \
|
||||
hostap/hostapd/.config
|
||||
@ -220,7 +222,7 @@ jobs:
|
||||
EOF
|
||||
|
||||
- if: ${{ matrix.wpa_supplicant }}
|
||||
name: Setup wpa_supplicant config file
|
||||
name: Setup wpa_supplicant config file
|
||||
run: |
|
||||
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/wpa_supplicant.config \
|
||||
hostap/wpa_supplicant/.config
|
||||
|
9
.github/workflows/docker-Espressif.yml
vendored
9
.github/workflows/docker-Espressif.yml
vendored
@ -14,7 +14,8 @@ concurrency:
|
||||
jobs:
|
||||
espressif_latest:
|
||||
name: latest Docker container
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 12
|
||||
container:
|
||||
@ -25,7 +26,8 @@ jobs:
|
||||
run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh
|
||||
espressif_v4_4:
|
||||
name: v4.4 Docker container
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: espressif/idf:release-v4.4
|
||||
steps:
|
||||
@ -34,7 +36,8 @@ jobs:
|
||||
run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh
|
||||
espressif_v5_0:
|
||||
name: v5.0 Docker container
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: espressif/idf:release-v5.0
|
||||
steps:
|
||||
|
16
.github/workflows/docker-OpenWrt.yml
vendored
16
.github/workflows/docker-OpenWrt.yml
vendored
@ -17,7 +17,8 @@ concurrency:
|
||||
jobs:
|
||||
build_library:
|
||||
name: Compile libwolfssl.so
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
container:
|
||||
@ -28,15 +29,20 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compile libwolfssl.so
|
||||
run: ./autogen.sh && ./configure --enable-all && make
|
||||
# 2024-08-05 - Something broke in the actions. They are no longer following links.
|
||||
- name: tar libwolfssl.so
|
||||
working-directory: src/.libs
|
||||
run: tar -zcf libwolfssl.tgz libwolfssl.so*
|
||||
- name: Upload libwolfssl.so
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openwrt-libwolfssl.so
|
||||
path: src/.libs/libwolfssl.so
|
||||
path: src/.libs/libwolfssl.tgz
|
||||
retention-days: 5
|
||||
compile_container:
|
||||
name: Compile container
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 2
|
||||
needs: build_library
|
||||
@ -50,7 +56,9 @@ jobs:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openwrt-libwolfssl.so
|
||||
path: Docker/OpenWrt/.
|
||||
path: .
|
||||
- name: untar libwolfssl.so
|
||||
run: tar -xf libwolfssl.tgz -C Docker/OpenWrt
|
||||
- name: Build but dont push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
|
15
.github/workflows/grpc.yml
vendored
15
.github/workflows/grpc.yml
vendored
@ -15,8 +15,9 @@ concurrency:
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
@ -27,11 +28,14 @@ jobs:
|
||||
configure: --enable-all 'CPPFLAGS=-DWOLFSSL_RSA_KEY_CHECK -DHAVE_EX_DATA_CLEANUP_HOOKS'
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-grpc
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
grpc_check:
|
||||
@ -47,7 +51,8 @@ jobs:
|
||||
test_core_security_ssl_credentials_test test_cpp_end2end_ssl_credentials_test
|
||||
h2_ssl_cert_test h2_ssl_session_reuse_test
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 30
|
||||
needs: build_wolfssl
|
||||
@ -65,7 +70,9 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-grpc
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
|
17
.github/workflows/hitch.yml
vendored
17
.github/workflows/hitch.yml
vendored
@ -15,8 +15,9 @@ concurrency:
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
@ -27,11 +28,14 @@ jobs:
|
||||
configure: --enable-hitch
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-hitch
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
hitch_check:
|
||||
@ -44,7 +48,8 @@ jobs:
|
||||
ignore-tests: >-
|
||||
test13-r82.sh test15-proxy-v2-npn.sh test39-client-cert-proxy.sh
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
needs: build_wolfssl
|
||||
@ -53,7 +58,9 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-hitch
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
@ -100,4 +107,4 @@ jobs:
|
||||
working-directory: ./hitch
|
||||
run: |
|
||||
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
|
||||
make check
|
||||
make check
|
||||
|
28
.github/workflows/hostap-vm.yml
vendored
28
.github/workflows/hostap-vm.yml
vendored
@ -24,10 +24,11 @@ jobs:
|
||||
wolf_extra_config: --disable-tls13
|
||||
- build_id: hostap-vm-build2
|
||||
wolf_extra_config: >-
|
||||
--enable-wpas-dpp --enable-brainpool --with-eccminsz=192
|
||||
--enable-wpas-dpp --enable-brainpool --with-eccminsz=192
|
||||
--enable-tlsv10 --enable-oldtls
|
||||
name: Build wolfSSL
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
@ -52,16 +53,20 @@ jobs:
|
||||
${{ env.wolf_debug_flags }} ${{ matrix.wolf_extra_config }}
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.build_id }}
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
build_uml_linux:
|
||||
name: Build UML (UserMode Linux)
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
@ -84,7 +89,7 @@ jobs:
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: torvalds/linux
|
||||
repository: torvalds/linux
|
||||
path: linux
|
||||
|
||||
- name: Compile linux
|
||||
@ -137,7 +142,8 @@ jobs:
|
||||
}
|
||||
name: hwsim test
|
||||
# For openssl 1.1
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 45
|
||||
needs: [build_wolfssl, build_uml_linux]
|
||||
@ -178,7 +184,9 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.config.build_id }}
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@ -194,7 +202,7 @@ jobs:
|
||||
- name: Checkout hostap
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: julek-wolfssl/hostap-mirror
|
||||
repository: julek-wolfssl/hostap-mirror
|
||||
path: hostap
|
||||
ref: ${{ matrix.config.hostap_ref }}
|
||||
|
||||
@ -228,7 +236,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- if: ${{ matrix.hostapd }}
|
||||
name: Setup hostapd config file
|
||||
name: Setup hostapd config file
|
||||
run: |
|
||||
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/hostapd.config \
|
||||
hostap/hostapd/.config
|
||||
@ -238,7 +246,7 @@ jobs:
|
||||
EOF
|
||||
|
||||
- if: ${{ matrix.wpa_supplicant }}
|
||||
name: Setup wpa_supplicant config file
|
||||
name: Setup wpa_supplicant config file
|
||||
run: |
|
||||
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/wpa_supplicant.config \
|
||||
hostap/wpa_supplicant/.config
|
||||
|
83
.github/workflows/ipmitool.yml
vendored
Normal file
83
.github/workflows/ipmitool.yml
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
name: ipmitool Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-all
|
||||
install: true
|
||||
# Don't run tests as this config is tested in many other places
|
||||
check: false
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-ipmitool
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
build_ipmitool:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
git_ref: [ c3939dac2c060651361fc71516806f9ab8c38901 ]
|
||||
name: ${{ matrix.git_ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-ipmitool
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Build ipmitool
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
repository: ipmitool/ipmitool
|
||||
ref: ${{ matrix.git_ref }}
|
||||
path: ipmitool
|
||||
patch-file: $GITHUB_WORKSPACE/osp/ipmitool/*-${{ matrix.git_ref }}.patch
|
||||
configure: --with-wolfssl=$GITHUB_WORKSPACE/build-dir
|
||||
# No checks included and not running since it depends on hardware
|
||||
check: false
|
||||
|
||||
- name: Confirm built with wolfSSL
|
||||
working-directory: ipmitool
|
||||
run: |
|
||||
ldd src/ipmitool | grep wolfssl
|
||||
ldd src/ipmievd | grep wolfssl
|
92
.github/workflows/jwt-cpp.yml
vendored
Normal file
92
.github/workflows/jwt-cpp.yml
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
name: jwt-cpp Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-all
|
||||
install: true
|
||||
# Don't run tests as this config is tested in many other places
|
||||
check: false
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-jwt-cpp
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
build_pam-ipmi:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ref: [ 0.6.0 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# Don't prompt for anything
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install libgtest-dev
|
||||
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-jwt-cpp
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Checkout jwt-cpp
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: Thalhammer/jwt-cpp
|
||||
path: jwt-cpp
|
||||
ref: v${{ matrix.ref }}
|
||||
|
||||
- name: Build pam-ipmi
|
||||
working-directory: jwt-cpp
|
||||
run: |
|
||||
patch -p1 < ../osp/jwt-cpp/${{ matrix.ref }}.patch
|
||||
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
|
||||
cmake -B build -DJWT_SSL_LIBRARY:STRING=wolfSSL -DJWT_BUILD_TESTS=ON .
|
||||
make -j -C build
|
||||
ldd ./build/tests/jwt-cpp-test | grep wolfssl
|
||||
|
||||
- name: Run jwt-cpp tests
|
||||
working-directory: jwt-cpp
|
||||
run: ./build/tests/jwt-cpp-test
|
15
.github/workflows/krb5.yml
vendored
15
.github/workflows/krb5.yml
vendored
@ -16,7 +16,8 @@ jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
@ -31,11 +32,14 @@ jobs:
|
||||
configure: --enable-krb CC='gcc -fsanitize=address'
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-krb5
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
krb5_check:
|
||||
@ -45,7 +49,8 @@ jobs:
|
||||
# List of releases to test
|
||||
ref: [ 1.21.1 ]
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 8
|
||||
needs: build_wolfssl
|
||||
@ -54,7 +59,9 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-krb5
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
|
15
.github/workflows/libssh2.yml
vendored
15
.github/workflows/libssh2.yml
vendored
@ -16,7 +16,8 @@ jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
@ -28,11 +29,14 @@ jobs:
|
||||
check: false # config is already tested in many other PRB's
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-libssh2
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
libssh2_check:
|
||||
@ -42,7 +46,8 @@ jobs:
|
||||
# List of releases to test
|
||||
ref: [ 1.11.0 ]
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 8
|
||||
needs: build_wolfssl
|
||||
@ -51,7 +56,9 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-libssh2
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Build and test libssh2
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
|
86
.github/workflows/libvncserver.yml
vendored
Normal file
86
.github/workflows/libvncserver.yml
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
name: libvncserver Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-all
|
||||
install: true
|
||||
# Don't run tests as this config is tested in many other places
|
||||
check: false
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-libvncserver
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
build_libvncserver:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ref: [ 0.9.13 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-libvncserver
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Checkout libvncserver
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: LibVNC/libvncserver
|
||||
path: libvncserver
|
||||
ref: LibVNCServer-${{ matrix.ref }}
|
||||
|
||||
- name: Build libvncserver
|
||||
working-directory: libvncserver
|
||||
run: |
|
||||
patch -p1 < ../osp/libvncserver/${{ matrix.ref }}.patch
|
||||
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
|
||||
cmake -B build -DWITH_GNUTLS=OFF -DWITH_OPENSSL=OFF -DWITH_GCRYPT=OFF -DWITH_WOLFSSL=ON .
|
||||
make -j -C build VERBOSE=1
|
||||
ldd build/libvncclient.so | grep wolfssl
|
||||
ldd build/libvncserver.so | grep wolfssl
|
||||
|
||||
- name: Run libvncserver tests
|
||||
working-directory: libvncserver
|
||||
run: make -C build test
|
15
.github/workflows/memcached.yml
vendored
15
.github/workflows/memcached.yml
vendored
@ -16,7 +16,8 @@ jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
@ -28,11 +29,14 @@ jobs:
|
||||
- name: Bundle Docker entry point
|
||||
run: cp wolfssl/.github/workflows/memcached.sh build-dir/bin
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-memcached
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
memcached_check:
|
||||
@ -43,14 +47,17 @@ jobs:
|
||||
include:
|
||||
- ref: 1.6.22
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-memcached
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
|
100
.github/workflows/mosquitto.yml
vendored
Normal file
100
.github/workflows/mosquitto.yml
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
name: mosquitto Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-mosquitto CFLAGS="-DALLOW_INVALID_CERTSIGN"
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-mosquitto
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
mosquitto_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ref: [ 2.0.18 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-mosquitto
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential libev-dev libssl-dev automake python3-docutils libcunit1 libcunit1-doc libcunit1-dev pkg-config make
|
||||
sudo pip install --upgrade psutil
|
||||
|
||||
- name: Checkout mosquitto
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: eclipse/mosquitto
|
||||
ref: v${{ matrix.ref }}
|
||||
path: mosquitto
|
||||
|
||||
- name: Configure and build mosquitto
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/mosquitto/
|
||||
patch -p1 < $GITHUB_WORKSPACE/osp/mosquitto/${{ matrix.ref }}.patch
|
||||
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir
|
||||
|
||||
- name: Run mosquitto tests
|
||||
working-directory: ./mosquitto
|
||||
run: |
|
||||
# Retry up to five times
|
||||
for i in {1..5}; do
|
||||
TEST_RES=0
|
||||
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest || TEST_RES=$?
|
||||
if [ "$TEST_RES" -eq "0" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$TEST_RES" -ne "0" ]; then
|
||||
exit $TEST_RES
|
||||
fi
|
5
.github/workflows/multi-arch.yml
vendored
5
.github/workflows/multi-arch.yml
vendored
@ -36,7 +36,8 @@ jobs:
|
||||
CFLAGS: -marm -DWOLFSSL_SP_ARM_ARCH=6
|
||||
ARCH: armel
|
||||
EXTRA_OPTS: --enable-sp-asm
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
@ -51,7 +52,7 @@ jobs:
|
||||
CFLAGS: ${{ matrix.CFLAGS }}
|
||||
QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
|
||||
run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples ${{ matrix.EXTRA_OPTS }} && make
|
||||
- name: Print errors
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
if [ -f config.log ] ; then
|
||||
|
13
.github/workflows/multi-compiler.yml
vendored
13
.github/workflows/multi-compiler.yml
vendored
@ -21,16 +21,16 @@ jobs:
|
||||
include:
|
||||
- CC: gcc-9
|
||||
CXX: g++-9
|
||||
OS: ubuntu-latest
|
||||
OS: ubuntu-22.04
|
||||
- CC: gcc-10
|
||||
CXX: g++-10
|
||||
OS: ubuntu-latest
|
||||
OS: ubuntu-22.04
|
||||
- CC: gcc-11
|
||||
CXX: g++-11
|
||||
OS: ubuntu-latest
|
||||
OS: ubuntu-22.04
|
||||
- CC: gcc-12
|
||||
CXX: g++-12
|
||||
OS: ubuntu-latest
|
||||
OS: ubuntu-22.04
|
||||
- CC: clang-10
|
||||
CXX: clang++-10
|
||||
OS: ubuntu-20.04
|
||||
@ -42,10 +42,11 @@ jobs:
|
||||
OS: ubuntu-20.04
|
||||
- CC: clang-13
|
||||
CXX: clang++-13
|
||||
OS: ubuntu-latest
|
||||
OS: ubuntu-22.04
|
||||
- CC: clang-14
|
||||
CXX: clang++-14
|
||||
OS: ubuntu-latest
|
||||
OS: ubuntu-22.04
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ${{ matrix.OS }}
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
|
84
.github/workflows/net-snmp.yml
vendored
Normal file
84
.github/workflows/net-snmp.yml
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
name: net-snmp Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-net-snmp
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-net-snmp
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
net-snmp_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of releases to test
|
||||
include:
|
||||
- ref: 5.9.3
|
||||
test_opts: -e 'agentxperl'
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-net-snmp
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Build net-snmp
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
repository: net-snmp/net-snmp
|
||||
ref: v${{ matrix.ref }}
|
||||
path: net-snmp
|
||||
patch-file: $GITHUB_WORKSPACE/osp/net-snmp/${{ matrix.ref }}.patch
|
||||
configure: --disable-shared --with-wolfssl=$GITHUB_WORKSPACE/build-dir
|
||||
check: false
|
||||
|
||||
- name: Run net-snmp tests
|
||||
working-directory: net-snmp
|
||||
run: |
|
||||
autoconf --version | grep -P '2\.\d\d' -o > dist/autoconf-version
|
||||
make -j test TESTOPTS="${{ matrix.test_opts }}"
|
19
.github/workflows/nginx.yml
vendored
19
.github/workflows/nginx.yml
vendored
@ -15,8 +15,9 @@ concurrency:
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
@ -33,11 +34,14 @@ jobs:
|
||||
configure: --enable-nginx ${{ env.wolf_debug_flags }}
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-nginx
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
nginx_check:
|
||||
@ -93,7 +97,7 @@ jobs:
|
||||
stream_ssl_preread.t stream_ssl_realip.t stream_ssl_session_reuse.t stream_ssl.t
|
||||
stream_ssl_variables.t stream_ssl_verify_client.t stream_upstream_zone_ssl.t
|
||||
upstream_zone_ssl.t uwsgi_ssl_certificate.t uwsgi_ssl_certificate_vars.t
|
||||
uwsgi_ssl.t uwsgi_ssl_verify.t
|
||||
uwsgi_ssl.t uwsgi_ssl_verify.t
|
||||
# Following tests do not pass with sanitizer on (with OpenSSL too)
|
||||
sanitize-not-ok: >-
|
||||
grpc_ssl.t h2_proxy_request_buffering_ssl.t h2_proxy_ssl.t
|
||||
@ -102,7 +106,8 @@ jobs:
|
||||
stream_proxy_protocol_ssl.t stream_proxy_ssl_conf_command.t stream_proxy_ssl.t
|
||||
stream_proxy_ssl_verify.t
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 6
|
||||
needs: build_wolfssl
|
||||
@ -111,7 +116,9 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-nginx
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@ -216,4 +223,4 @@ jobs:
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib \
|
||||
TMPDIR=$GITHUB_WORKSPACE TEST_NGINX_BINARY=../nginx/objs/nginx \
|
||||
prove ${{ matrix.sanitize-ok }}
|
||||
|
||||
|
||||
|
7
.github/workflows/no-malloc.yml
vendored
7
.github/workflows/no-malloc.yml
vendored
@ -18,10 +18,11 @@ jobs:
|
||||
matrix:
|
||||
config: [
|
||||
# Add new configs here
|
||||
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC"',
|
||||
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC -DRSA_MIN_SIZE=1024"',
|
||||
]
|
||||
name: make check
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 6
|
||||
steps:
|
||||
@ -35,7 +36,7 @@ jobs:
|
||||
make
|
||||
./wolfcrypt/test/testwolfcrypt
|
||||
|
||||
- name: Print errors
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
if [ -f test-suite.log ] ; then
|
||||
|
93
.github/workflows/ntp.yml
vendored
Normal file
93
.github/workflows/ntp.yml
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
name: ntp Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-all
|
||||
install: true
|
||||
check: false
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-ntp
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
ntp_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of releases to test
|
||||
ref: [ 4.2.8p15 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 10
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-ntp
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
# Avoid DoS'ing ntp site so cache the tar.gz
|
||||
- name: Check if we have ntp
|
||||
uses: actions/cache@v4
|
||||
id: cache
|
||||
with:
|
||||
path: ntp-${{ matrix.ref }}.tar.gz
|
||||
key: ntp-${{ matrix.ref }}.tar.gz
|
||||
|
||||
- name: Download ntp
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
wget https://downloads.nwtime.org/ntp/4.2.8/ntp-${{ matrix.ref }}.tar.gz
|
||||
|
||||
- name: Extract ntp
|
||||
run: |
|
||||
tar -xf ntp-${{ matrix.ref }}.tar.gz
|
||||
|
||||
- name: Build and test ntp
|
||||
working-directory: ntp-${{ matrix.ref }}
|
||||
run: |
|
||||
patch -p1 < $GITHUB_WORKSPACE/osp/ntp/${{ matrix.ref }}/ntp-${{ matrix.ref }}.patch
|
||||
./bootstrap
|
||||
./configure --with-wolfssl=$GITHUB_WORKSPACE/build-dir
|
||||
make -j
|
||||
make -j check
|
3
.github/workflows/ocsp.yml
vendored
3
.github/workflows/ocsp.yml
vendored
@ -15,7 +15,8 @@ concurrency:
|
||||
jobs:
|
||||
ocsp_stapling:
|
||||
name: ocsp stapling
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout wolfSSL
|
||||
|
89
.github/workflows/openldap.yml
vendored
Normal file
89
.github/workflows/openldap.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
name: openldap Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-openldap CPPFLAGS=-DWOLFSSL_NO_ASN_STRICT
|
||||
install: true
|
||||
check: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-openldap
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
openldap_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# List of releases to test
|
||||
- osp_ref: 2.5.13
|
||||
git_ref: OPENLDAP_REL_ENG_2_5_13
|
||||
name: ${{ matrix.osp_ref }}
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 20
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-openldap
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Checkout openldap
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: openldap/openldap
|
||||
path: openldap
|
||||
ref: ${{ matrix.git_ref }}
|
||||
|
||||
- name: Build and test OpenLDAP
|
||||
working-directory: openldap
|
||||
run: |
|
||||
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
|
||||
patch -p1 < $GITHUB_WORKSPACE/osp/openldap/${{ matrix.osp_ref }}/openldap-${{ matrix.osp_ref }}.patch
|
||||
rm aclocal.m4
|
||||
autoreconf -ivf
|
||||
./configure --with-tls=wolfssl --disable-bdb --disable-hdb \
|
||||
CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include \
|
||||
-I$GITHUB_WORKSPACE/build-dir/include/wolfssl \
|
||||
-L$GITHUB_WORKSPACE/build-dir/lib"
|
||||
make -j depend
|
||||
make -j
|
||||
make -j check
|
19
.github/workflows/openssh.yml
vendored
19
.github/workflows/openssh.yml
vendored
@ -15,8 +15,9 @@ concurrency:
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
@ -26,14 +27,17 @@ jobs:
|
||||
path: wolfssl
|
||||
configure: >-
|
||||
--enable-openssh --enable-dsa --with-max-rsa-bits=8192
|
||||
--enable-intelasm --enable-sp-asm
|
||||
--enable-intelasm --enable-sp-asm CFLAGS="-DRSA_MIN_SIZE=1024"
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-openssh
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
openssh_check:
|
||||
@ -44,14 +48,17 @@ jobs:
|
||||
- git_ref: 'V_9_6_P1'
|
||||
osp_ver: '9.6'
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-openssh
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
@ -69,7 +76,7 @@ jobs:
|
||||
configure: --with-wolfssl=$GITHUB_WORKSPACE/build-dir --with-rpath=-Wl,-rpath=
|
||||
check: false
|
||||
|
||||
# make tests take >20 minutes. Consider limiting?
|
||||
# make tests take >20 minutes. Consider limiting?
|
||||
- name: Run tests
|
||||
working-directory: ./openssh
|
||||
run: |
|
||||
|
17
.github/workflows/openvpn.yml
vendored
17
.github/workflows/openvpn.yml
vendored
@ -15,8 +15,9 @@ concurrency:
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
@ -27,11 +28,14 @@ jobs:
|
||||
configure: --enable-openvpn
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-openvpn
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
openvpn_check:
|
||||
@ -39,9 +43,10 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of refs to test
|
||||
ref: [ release/2.6, v2.6.0, master ]
|
||||
ref: [ release/2.6, master ]
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 10
|
||||
needs: build_wolfssl
|
||||
@ -50,7 +55,9 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-openvpn
|
||||
path: build-dir
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
41
.github/workflows/os-check.yml
vendored
41
.github/workflows/os-check.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest ]
|
||||
os: [ ubuntu-22.04, macos-latest ]
|
||||
config: [
|
||||
# Add new configs here
|
||||
'',
|
||||
@ -25,16 +25,24 @@ jobs:
|
||||
'--enable-all --enable-asn=original',
|
||||
'--enable-harden-tls',
|
||||
'--enable-tls13 --enable-session-ticket --enable-dtls --enable-dtls13
|
||||
--enable-opensslextra --enable-sessioncerts
|
||||
CPPFLAGS=''-DWOLFSSL_DTLS_NO_HVR_ON_RESUME -DHAVE_EXT_CACHE
|
||||
--enable-opensslextra --enable-sessioncerts
|
||||
CPPFLAGS=''-DWOLFSSL_DTLS_NO_HVR_ON_RESUME -DHAVE_EXT_CACHE
|
||||
-DWOLFSSL_TICKET_HAVE_ID -DHAVE_EX_DATA -DSESSION_CACHE_DYNAMIC_MEM'' ',
|
||||
'--enable-all --enable-secure-renegotiation',
|
||||
'--enable-all --enable-haproxy --enable-quic',
|
||||
'--enable-dtls --enable-dtls13 --enable-earlydata
|
||||
--enable-session-ticket --enable-psk
|
||||
'--enable-dtls --enable-dtls13 --enable-earlydata
|
||||
--enable-session-ticket --enable-psk
|
||||
CPPFLAGS=''-DWOLFSSL_DTLS13_NO_HRR_ON_RESUME'' ',
|
||||
'--enable-experimental --enable-kyber --enable-dtls --enable-dtls13
|
||||
--enable-dtls-frag-ch',
|
||||
'--enable-all --enable-dtls13 --enable-dtls-frag-ch',
|
||||
'--enable-dtls --enable-dtls13 --enable-dtls-frag-ch
|
||||
--enable-dtls-mtu',
|
||||
'--enable-dtls --enable-dtlscid --enable-dtls13 --enable-secure-renegotiation
|
||||
--enable-psk --enable-aesccm --enable-nullcipher CPPFLAGS=-DWOLFSSL_STATIC_RSA',
|
||||
]
|
||||
name: make check
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ${{ matrix.os }}
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 14
|
||||
@ -49,12 +57,13 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest ]
|
||||
os: [ ubuntu-22.04, macos-latest ]
|
||||
user-settings: [
|
||||
# Add new user_settings.h here
|
||||
'examples/configs/user_settings_all.h',
|
||||
]
|
||||
name: make user_setting.h
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ${{ matrix.os }}
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 14
|
||||
@ -70,15 +79,17 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest ]
|
||||
os: [ ubuntu-22.04, macos-latest ]
|
||||
user-settings: [
|
||||
# Add new user_settings.h here
|
||||
'examples/configs/user_settings_min_ecc.h',
|
||||
'examples/configs/user_settings_wolfboot_keytools.h',
|
||||
'examples/configs/user_settings_wolftpm.h',
|
||||
'examples/configs/user_settings_wolfssh.h',
|
||||
'examples/configs/user_settings_tls12.h',
|
||||
]
|
||||
name: make user_setting.h (testwolfcrypt only)
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ${{ matrix.os }}
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 14
|
||||
@ -98,8 +109,9 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest ]
|
||||
os: [ ubuntu-22.04, macos-latest ]
|
||||
name: make user_setting.h (with sed)
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ${{ matrix.os }}
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 14
|
||||
@ -118,7 +130,12 @@ jobs:
|
||||
|
||||
windows_build:
|
||||
name: Windows Build Test
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [ x64, Win32, ARM64 ]
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 6
|
||||
env:
|
||||
@ -129,7 +146,6 @@ jobs:
|
||||
# You can convert this to a build matrix if you need coverage of multiple configuration types.
|
||||
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
BUILD_CONFIGURATION: Release
|
||||
BUILD_PLATFORM: x64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@ -144,8 +160,9 @@ jobs:
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
# Add additional options to the MSBuild command line here (like platform or verbosity level).
|
||||
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
||||
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
|
||||
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{matrix.arch}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
|
||||
|
||||
- name: Run Test
|
||||
- if: ${{ matrix.arch != 'ARM64' }}
|
||||
name: Run Test
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
run: Release/x64/testsuite.exe
|
||||
run: Release/${{matrix.arch}}/testsuite.exe
|
||||
|
19
.github/workflows/packaging.yml
vendored
19
.github/workflows/packaging.yml
vendored
@ -15,7 +15,8 @@ concurrency:
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Package wolfSSL
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
@ -37,8 +38,9 @@ jobs:
|
||||
- name: Build wolfSSL .deb
|
||||
run: make deb-docker
|
||||
|
||||
- name: Build wolfSSL .rpm
|
||||
run: make rpm-docker
|
||||
# disabled 20240919 -- broken target.
|
||||
# - name: Build wolfSSL .rpm
|
||||
# run: make rpm-docker
|
||||
|
||||
- name: Confirm packages built
|
||||
run: |
|
||||
@ -47,8 +49,9 @@ jobs:
|
||||
echo Did not find exactly two deb packages!!!
|
||||
exit 1
|
||||
fi
|
||||
RPM_COUNT=$(find -name 'wolfssl*.rpm' | wc -l)
|
||||
if [ "$RPM_COUNT" != "4" ]; then
|
||||
echo Did not find exactly four rpm packages!!!
|
||||
exit 1
|
||||
fi
|
||||
# disabled 20240919 -- broken target.
|
||||
# RPM_COUNT=$(find -name 'wolfssl*.rpm' | wc -l)
|
||||
# if [ "$RPM_COUNT" != "4" ]; then
|
||||
# echo Did not find exactly four rpm packages!!!
|
||||
# exit 1
|
||||
# fi
|
||||
|
93
.github/workflows/pam-ipmi.yml
vendored
Normal file
93
.github/workflows/pam-ipmi.yml
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
name: pam-ipmi Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-all
|
||||
install: true
|
||||
# Don't run tests as this config is tested in many other places
|
||||
check: false
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-pam-ipmi
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
build_pam-ipmi:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
git_ref: [ e4b13e6725abb178f62ee897fe1c0e81b06a9431 ]
|
||||
name: ${{ matrix.git_ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# Don't prompt for anything
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install libpam-dev ninja-build
|
||||
sudo pip3 install meson
|
||||
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-pam-ipmi
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Checkout pam-ipmi
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: openbmc/pam-ipmi
|
||||
path: pam-ipmi
|
||||
ref: ${{ matrix.git_ref }}
|
||||
|
||||
- name: Build pam-ipmi
|
||||
working-directory: pam-ipmi
|
||||
run: |
|
||||
patch -p1 < ../osp/pam-ipmi/*-${{ matrix.git_ref }}.patch
|
||||
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig meson setup build
|
||||
ninja -C build
|
||||
|
||||
- name: Confirm built with wolfSSL
|
||||
working-directory: pam-ipmi
|
||||
run: |
|
||||
ldd ./build/src/pam_ipmisave/pam_ipmisave.so | grep wolfssl
|
116
.github/workflows/rng-tools.yml
vendored
Normal file
116
.github/workflows/rng-tools.yml
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
name: rng-tools Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-all
|
||||
install: true
|
||||
check: false
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-rng-tools
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
rng-tools_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of releases to test
|
||||
ref: [ 6.16 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# Don't prompt for anything
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libcurl4-openssl-dev libjansson-dev libp11-dev librtlsdr-dev libcap-dev
|
||||
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-rng-tools
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Checkout jitterentropy-library
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: smuellerDD/jitterentropy-library
|
||||
path: jitterentropy-library
|
||||
ref: v3.5.0
|
||||
|
||||
- name: Build jitterentropy-library
|
||||
working-directory: jitterentropy-library
|
||||
run: make -j
|
||||
|
||||
- name: Build rng-tools
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
repository: nhorman/rng-tools
|
||||
ref: v${{ matrix.ref }}
|
||||
path: rng-tools
|
||||
patch-file: $GITHUB_WORKSPACE/osp/rng-tools/${{ matrix.ref }}.patch
|
||||
configure: --without-pkcs11 --enable-jitterentropy=$GITHUB_WORKSPACE/jitterentropy-library --with-wolfssl=$GITHUB_WORKSPACE/build-dir
|
||||
check: false
|
||||
|
||||
- name: Testing rng-tools
|
||||
id: testing
|
||||
working-directory: rng-tools
|
||||
run: |
|
||||
# Retry up to five times
|
||||
for i in {1..5}; do
|
||||
TEST_RES=0
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib make check || TEST_RES=$?
|
||||
if [ "$TEST_RES" -eq "0" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$TEST_RES" -ne "0" ]; then
|
||||
exit $TEST_RES
|
||||
fi
|
||||
|
||||
- name: Print logs
|
||||
if: ${{ failure() && steps.testing.outcome == 'failure' }}
|
||||
working-directory: rng-tools/tests
|
||||
run: cat test-suite.log
|
81
.github/workflows/socat.yml
vendored
Normal file
81
.github/workflows/socat.yml
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
name: socat Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-maxfragment --enable-opensslall --enable-opensslextra --enable-dtls --enable-oldtls --enable-tlsv10 --enable-ipv6 'CPPFLAGS=-DWOLFSSL_NO_DTLS_SIZE_CHECK -DOPENSSL_COMPATIBLE_DEFAULTS'
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-socat
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
|
||||
socat_check:
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 30
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Install prereqs
|
||||
run:
|
||||
sudo apt-get install build-essential autoconf libtool pkg-config clang libc++-dev
|
||||
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-socat
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Download socat
|
||||
run: curl -O http://www.dest-unreach.org/socat/download/socat-1.8.0.0.tar.gz && tar xvf socat-1.8.0.0.tar.gz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Build socat
|
||||
working-directory: ./socat-1.8.0.0
|
||||
run: |
|
||||
patch -p1 < ../osp/socat/1.8.0.0/socat-1.8.0.0.patch
|
||||
autoreconf -vfi
|
||||
./configure --with-wolfssl=$GITHUB_WORKSPACE/build-dir
|
||||
make
|
||||
|
||||
- name: Run socat tests
|
||||
working-directory: ./socat-1.8.0.0
|
||||
run: |
|
||||
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
|
||||
export SHELL=/bin/bash
|
||||
SOCAT=$GITHUB_WORKSPACE/socat-1.8.0.0/socat ./test.sh -t 0.5 --expect-fail 146,216,309,310,386,399,402,459,460,467,468,478,492,528,530
|
94
.github/workflows/softhsm.yml
vendored
Normal file
94
.github/workflows/softhsm.yml
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
name: SoftHSMv2 Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-all CFLAGS=-DRSA_MIN_SIZE=1024
|
||||
install: true
|
||||
check: false
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-softhsm
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
softhsm_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of releases to test
|
||||
ref: [ 2.6.1 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-latest
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 20
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# Don't prompt for anything
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libcppunit-dev
|
||||
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-softhsm
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Checkout SoftHSMv2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: opendnssec/SoftHSMv2
|
||||
path: softhsm
|
||||
ref: ${{ matrix.ref }}
|
||||
|
||||
# Not using wolfSSL/actions-build-autotools-project@v1 because autogen.sh doesn't work
|
||||
- name: Build softhsm
|
||||
working-directory: softhsm
|
||||
run: |
|
||||
patch -p1 < $GITHUB_WORKSPACE/osp/softhsm/${{ matrix.ref }}.patch
|
||||
autoreconf -if
|
||||
./configure --with-crypto-backend=wolfssl WOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir
|
||||
make -j
|
||||
|
||||
- name: Test softhsm
|
||||
working-directory: softhsm
|
||||
run: make -j check
|
97
.github/workflows/sssd.yml
vendored
Normal file
97
.github/workflows/sssd.yml
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
name: sssd Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-all CFLAGS=-DWOLFSSL_NO_ASN_STRICT
|
||||
install: true
|
||||
check: false
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-sssd
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
sssd_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of releases to test
|
||||
ref: [ 2.9.1 ]
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: quay.io/sssd/ci-client-devel:ubuntu-latest
|
||||
env:
|
||||
LD_LIBRARY_PATH: /usr/local/lib
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 20
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# Don't prompt for anything
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential autoconf libldb-dev libldb2 python3-ldb bc
|
||||
|
||||
- name: Setup env
|
||||
run: |
|
||||
ln -s samba-4.0/ldb.h /usr/include/ldb.h
|
||||
ln -s samba-4.0/ldb_errors.h /usr/include/ldb_errors.h
|
||||
ln -s samba-4.0/ldb_handlers.h /usr/include/ldb_handlers.h
|
||||
ln -s samba-4.0/ldb_module.h /usr/include/ldb_module.h
|
||||
ln -s samba-4.0/ldb_version.h /usr/include/ldb_version.h
|
||||
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-sssd
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Build and test sssd
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
repository: SSSD/sssd
|
||||
ref: ${{ matrix.ref }}
|
||||
path: sssd
|
||||
patch-file: $GITHUB_WORKSPACE/osp/sssd/${{ matrix.ref }}.patch
|
||||
configure: >-
|
||||
--without-samba --without-nfsv4-idmapd-plugin --with-oidc-child=no
|
||||
--without-manpages WOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir
|
||||
check: true
|
||||
|
17
.github/workflows/stunnel.yml
vendored
17
.github/workflows/stunnel.yml
vendored
@ -15,8 +15,9 @@ concurrency:
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
@ -27,11 +28,14 @@ jobs:
|
||||
configure: --enable-stunnel
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-stunnel
|
||||
path: build-dir
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
stunnel_check:
|
||||
@ -41,7 +45,8 @@ jobs:
|
||||
# List of releases to test
|
||||
ref: [ 5.67 ]
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
needs: build_wolfssl
|
||||
@ -50,8 +55,10 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-stunnel
|
||||
path: build-dir
|
||||
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
58
.github/workflows/win-csharp-test.yml
vendored
Normal file
58
.github/workflows/win-csharp-test.yml
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
name: Windows CSharp Build Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: windows-latest
|
||||
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 6
|
||||
|
||||
env:
|
||||
# Path to the solution file relative to the root of the project.
|
||||
SOLUTION_FILE_PATH: wolfssl\wrapper\CSharp\wolfSSL_CSharp.sln
|
||||
|
||||
# Configuration type to build.
|
||||
# You can convert this to a build matrix if you need coverage of multiple configuration types.
|
||||
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
BUILD_CONFIGURATION: Debug
|
||||
BUILD_PLATFORM: x64
|
||||
|
||||
steps:
|
||||
- name: Pull wolfssl
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
repository: wolfssl/wolfssl
|
||||
path: wolfssl
|
||||
|
||||
- name: Create FIPS stub files (autogen)
|
||||
working-directory: wolfssl
|
||||
run: |
|
||||
echo $null >> wolfcrypt\src\fips.c
|
||||
echo $null >> wolfcrypt\src\fips_test.c
|
||||
echo $null >> wolfcrypt\src\wolfcrypt_first.c
|
||||
echo $null >> wolfcrypt\src\wolfcrypt_last.c
|
||||
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
# Add additional options to the MSBuild command line here (like platform or verbosity level).
|
||||
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
||||
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
|
||||
|
||||
- name: Run wolfCrypt test
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}wolfssl\wrapper\CSharp\Debug\x64\
|
||||
run: ./wolfCrypt-test.exe
|
||||
|
||||
- name: Run wolfSSL client/server example
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}wolfssl\wrapper\CSharp\Debug\x64\
|
||||
run: ./wolfSSL-TLS-Server.exe && sleep 1 & ./wolfSSL-TLS-Client.exe
|
3
.github/workflows/zephyr.yml
vendored
3
.github/workflows/zephyr.yml
vendored
@ -25,7 +25,8 @@ jobs:
|
||||
zephyr-sdk: 0.16.3
|
||||
- zephyr-ref: v2.7.4
|
||||
zephyr-sdk: 0.16.3
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
|
16
.gitignore
vendored
16
.gitignore
vendored
@ -10,6 +10,7 @@ ctaocrypt/src/src/
|
||||
*.cache
|
||||
.dirstamp
|
||||
*.user
|
||||
!*-VS2022.vcxproj.user
|
||||
configure
|
||||
config.*
|
||||
!cmake/config.in
|
||||
@ -245,6 +246,7 @@ linuxkm/libwolfssl.mod.c
|
||||
linuxkm/libwolfssl.lds
|
||||
linuxkm/module_exports.c
|
||||
linuxkm/linuxkm/get_thread_size
|
||||
*.nds
|
||||
|
||||
# autotools generated
|
||||
scripts/unit.test
|
||||
@ -413,6 +415,14 @@ user_settings_asm.h
|
||||
/IDE/Espressif/**/sdkconfig
|
||||
/IDE/Espressif/**/sdkconfig.old
|
||||
|
||||
# ESP8266 RTOS SDK has a slightly different sdkconfig filename to exclude:
|
||||
/IDE/Espressif/**/sdkconfig.debug
|
||||
/IDE/Espressif/**/sdkconfig.release
|
||||
|
||||
# Always include Espressif makefiles (typically only used for ESP8266)
|
||||
!/IDE/Espressif/**/Makefile
|
||||
!/IDE/Espressif/**/component.mk
|
||||
|
||||
# MPLAB
|
||||
/IDE/MPLABX16/wolfssl.X/dist/default/
|
||||
/IDE/MPLABX16/wolfssl.X/.generated_files
|
||||
@ -434,6 +444,12 @@ debian/changelog
|
||||
debian/control
|
||||
*.deb
|
||||
|
||||
# Ada/Alire files
|
||||
wrapper/Ada/alire/
|
||||
wrapper/Ada/config/
|
||||
wrapper/Ada/lib/
|
||||
wrapper/Ada/obj/
|
||||
|
||||
# PlatformIO
|
||||
/**/.pio
|
||||
/**/.vscode/.browse.c_cpp.db*
|
||||
|
100
CMakeLists.txt
100
CMakeLists.txt
@ -34,7 +34,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
You must delete them, or cmake will refuse to work.")
|
||||
endif()
|
||||
|
||||
project(wolfssl VERSION 5.7.0 LANGUAGES C ASM)
|
||||
project(wolfssl VERSION 5.7.4 LANGUAGES C ASM)
|
||||
|
||||
# Set WOLFSSL_ROOT if not already defined
|
||||
if ("${WOLFSSL_ROOT}" STREQUAL "")
|
||||
@ -53,7 +53,7 @@ set(WOLFSSL_LIBRARY_VERSION_FIRST 42)
|
||||
|
||||
# increment if interfaces have been added
|
||||
# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented
|
||||
set(WOLFSSL_LIBRARY_VERSION_SECOND 1)
|
||||
set(WOLFSSL_LIBRARY_VERSION_SECOND 3)
|
||||
|
||||
# increment if source code has changed
|
||||
# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented or
|
||||
@ -131,6 +131,7 @@ check_type_size("__uint128_t" __UINT128_T)
|
||||
check_type_size("long long" SIZEOF_LONG_LONG)
|
||||
check_type_size("long" SIZEOF_LONG)
|
||||
check_type_size("time_t" SIZEOF_TIME_T)
|
||||
check_type_size("uintptr_t" HAVE_UINTPTR_T)
|
||||
|
||||
# By default, HAVE___UINT128_T gets defined as TRUE,
|
||||
# but we want it as 1.
|
||||
@ -284,6 +285,8 @@ if(NOT WOLFSSL_SINGLE_THREADED)
|
||||
"-DHAVE_PTHREAD"
|
||||
"-D_POSIX_THREADS")
|
||||
endif()
|
||||
else()
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DSINGLE_THREADED")
|
||||
endif()
|
||||
|
||||
# DTLS-SRTP
|
||||
@ -417,16 +420,17 @@ if(WOLFSSL_CURL)
|
||||
set(WOLFSSL_MD4 "yes")
|
||||
set(WOLFSSL_DES3 "yes")
|
||||
set(WOLFSSL_ALPN "yes")
|
||||
set(WOLFSSL_WOLFSSH "yes")
|
||||
set(WOLFSSL_OPENSSLEXTRA "yes")
|
||||
set(WOLFSSL_CRL "yes")
|
||||
set(WOLFSSL_OCSP "yes")
|
||||
set(WOLFSSL_OCSPSTAPLING "yes")
|
||||
set(WOLFSSL_OCSPSTAPLING_V2 "yes")
|
||||
# Note: OCSP sets requisite HAVE_TLS_EXTENSIONS and HAVE_CERTIFICATE_STATUS_REQUEST(_V2)
|
||||
set(WOLFSSL_SNI "yes")
|
||||
set(WOLFSSL_ALT_CERT_CHAINS "yes")
|
||||
set(WOLFSSL_IP_ALT_NAME "yes")
|
||||
set(WOLFSSL_SESSION_TICKET "yes")
|
||||
set(WOLFSSL_WOLFSSH "yes")
|
||||
list(APPEND WOLFSSL_DEFINITIONS
|
||||
"-DNO_SESSION_CACHE_REF" "-DWOLFSSL_DES_ECB")
|
||||
endif()
|
||||
@ -437,7 +441,7 @@ add_option(WOLFSSL_ALPN
|
||||
"no" "yes;no")
|
||||
|
||||
if(WOLFSSL_ALPN)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ALPN" "-DHAVE_TLS_EXTENSIONS")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ALPN" "-DHAVE_TLS_EXTENSIONS")
|
||||
endif()
|
||||
|
||||
# altcertchains
|
||||
@ -536,6 +540,15 @@ if (WOLFSSL_OPENSSLALL)
|
||||
"-DWOLFSSL_ERROR_CODE_OPENSSL" "-DWOLFSSL_CERT_NAME_ALL")
|
||||
endif()
|
||||
|
||||
add_option(WOLFSSL_NO_STUB
|
||||
"Removes OpenSSL compatibility stub functions (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
if (WOLFSSL_NO_STUB)
|
||||
list(APPEND WOLFSSL_DEFINITIONS
|
||||
"-DNO_WOLFSSL_STUB")
|
||||
endif()
|
||||
|
||||
# TODO: - IPv6 test apps
|
||||
|
||||
set(WOLFSSL_SLOW_MATH "yes")
|
||||
@ -934,13 +947,29 @@ if(WOLFSSL_ECC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# TODO: - ECC custom curves
|
||||
# - Compressed key
|
||||
# TODO: - Compressed key
|
||||
# - FP ECC, fixed point cache ECC
|
||||
# - ECC encrypt
|
||||
# - PSK
|
||||
# - Single PSK identity
|
||||
|
||||
# ECC custom curves
|
||||
add_option("WOLFSSL_ECCCUSTCURVES"
|
||||
"Enable ECC Custom Curves (default: disabled)"
|
||||
"no" "yes;no;all")
|
||||
|
||||
if(WOLFSSL_ECCCUSTCURVES)
|
||||
if("${WOLFSSL_ECCCUSTCURVES}" STREQUAL "all")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_SECPR2")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_SECPR3")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_BRAINPOOL")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_KOBLITZ")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_ECC_CDH")
|
||||
endif()
|
||||
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_CUSTOM_CURVES")
|
||||
endif()
|
||||
|
||||
# CURVE25519
|
||||
set(WOLFSSL_CURVE25519_SMALL "no")
|
||||
add_option("WOLFSSL_CURVE25519"
|
||||
@ -1533,6 +1562,15 @@ add_option(WOLFSSL_SNI ${WOLFSSL_SNI_HELP_STRING} ${SNI_DEFAULT} "yes;no")
|
||||
set(WOLFSSL_TLSX_HELP_STRING "Enable all TLS Extensions (default: disabled)")
|
||||
add_option(WOLFSSL_TLSX ${WOLFSSL_TLSX_HELP_STRING} "no" "yes;no")
|
||||
|
||||
add_option(WOLFSSL_EX_DATA
|
||||
"Enable app data (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
if (WOLFSSL_EX_DATA)
|
||||
list(APPEND WOLFSSL_DEFINITIONS
|
||||
"-DHAVE_EX_DATA")
|
||||
endif()
|
||||
|
||||
# Supported elliptic curves extensions
|
||||
add_option("WOLFSSL_SUPPORTED_CURVES"
|
||||
"Enable Supported Elliptic Curves (default: enabled)"
|
||||
@ -1857,6 +1895,10 @@ add_option("WOLFSSL_CRYPTOCB"
|
||||
"Enable crypto callbacks (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
add_option("WOLFSSL_CRYPTOCB_NO_SW_TEST"
|
||||
"Disable crypto callback SW testing (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
add_option("WOLFSSL_PKCALLBACKS"
|
||||
"Enable public key callbacks (default: disabled)"
|
||||
"no" "yes;no")
|
||||
@ -2060,6 +2102,10 @@ if(WOLFSSL_CRYPTOCB)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLF_CRYPTO_CB")
|
||||
endif()
|
||||
|
||||
if(WOLFSSL_CRYPTOCB_NO_SW_TEST)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DWC_TEST_NO_CRYPTOCB_SW_TEST")
|
||||
endif()
|
||||
|
||||
# Public Key Callbacks
|
||||
if(WOLFSSL_PKCALLBACKS)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_PK_CALLBACKS")
|
||||
@ -2236,32 +2282,6 @@ endif()
|
||||
|
||||
file(REMOVE ${OPTION_FILE})
|
||||
|
||||
file(APPEND ${OPTION_FILE} "/* wolfssl options.h\n")
|
||||
file(APPEND ${OPTION_FILE} " * generated from configure options\n")
|
||||
file(APPEND ${OPTION_FILE} " *\n")
|
||||
file(APPEND ${OPTION_FILE} " * Copyright (C) 2006-2023 wolfSSL Inc.\n")
|
||||
file(APPEND ${OPTION_FILE} " *\n")
|
||||
file(APPEND ${OPTION_FILE} " * This file is part of wolfSSL. (formerly known as CyaSSL)\n")
|
||||
file(APPEND ${OPTION_FILE} " *\n")
|
||||
file(APPEND ${OPTION_FILE} " */\n\n")
|
||||
file(APPEND ${OPTION_FILE} "#ifndef WOLFSSL_OPTIONS_H\n")
|
||||
file(APPEND ${OPTION_FILE} "#define WOLFSSL_OPTIONS_H\n\n\n")
|
||||
file(APPEND ${OPTION_FILE} "#ifdef __cplusplus\n")
|
||||
file(APPEND ${OPTION_FILE} "extern \"C\" {\n")
|
||||
file(APPEND ${OPTION_FILE} "#endif\n\n")
|
||||
|
||||
add_to_options_file("${WOLFSSL_DEFINITIONS}" "${OPTION_FILE}")
|
||||
# CMAKE_C_FLAGS is just a string of space-separated flags to pass to the C
|
||||
# compiler. We need to replace those spaces with semicolons in order to treat it
|
||||
# as a CMake list.
|
||||
string(REPLACE " " ";" CMAKE_C_FLAGS_LIST "${CMAKE_C_FLAGS}")
|
||||
add_to_options_file("${CMAKE_C_FLAGS_LIST}" "${OPTION_FILE}")
|
||||
|
||||
file(APPEND ${OPTION_FILE} "\n#ifdef __cplusplus\n")
|
||||
file(APPEND ${OPTION_FILE} "}\n")
|
||||
file(APPEND ${OPTION_FILE} "#endif\n\n\n")
|
||||
file(APPEND ${OPTION_FILE} "#endif /* WOLFSSL_OPTIONS_H */\n\n")
|
||||
|
||||
####################################################
|
||||
# Library Target
|
||||
####################################################
|
||||
@ -2339,6 +2359,20 @@ if(WOLFSSL_ARIA)
|
||||
message(STATUS "ARIA Check: WOLFSSL_LINK_LIBS = ${WOLFSSL_LINK_LIBS}")
|
||||
endif()
|
||||
|
||||
foreach(DEF IN LISTS WOLFSSL_DEFINITIONS)
|
||||
string(REGEX MATCH "^(-D)?([^=]+)(=(.*))?$" DEF_MATCH ${DEF})
|
||||
if (NOT "${CMAKE_MATCH_4}" STREQUAL "")
|
||||
set(${CMAKE_MATCH_2} ${CMAKE_MATCH_4})
|
||||
# message("set(${CMAKE_MATCH_2} ${CMAKE_MATCH_4})")
|
||||
else()
|
||||
set(${CMAKE_MATCH_2} 1)
|
||||
# message("set(${CMAKE_MATCH_2} 1)")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# If new build options are added please update the cmake/options.h.in
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/options.h.in ${OPTION_FILE})
|
||||
|
||||
set_target_properties(wolfssl
|
||||
PROPERTIES
|
||||
SOVERSION ${WOLFSSL_LIBRARY_VERSION_FIRST}
|
||||
@ -2437,7 +2471,7 @@ if(WOLFSSL_EXAMPLES)
|
||||
PROPERTY RUNTIME_OUTPUT_DIRECTORY
|
||||
${WOLFSSL_OUTPUT_BASE}/examples/echoserver)
|
||||
|
||||
if(NOT WIN32)
|
||||
if(NOT WIN32 AND NOT WOLFSSL_SINGLE_THREADED)
|
||||
# Build TLS benchmark example
|
||||
add_executable(tls_bench
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/benchmark/tls_bench.c)
|
||||
|
333
ChangeLog.md
333
ChangeLog.md
@ -1,3 +1,304 @@
|
||||
# wolfSSL Release 5.7.4 (Oct 24, 2024)
|
||||
|
||||
Release 5.7.4 has been developed according to wolfSSL's development and QA
|
||||
process (see link below) and successfully passed the quality criteria.
|
||||
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
|
||||
|
||||
NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024
|
||||
|
||||
PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request
|
||||
number where the code change was added.
|
||||
|
||||
|
||||
## Vulnerabilities
|
||||
* [Low] When the OpenSSL compatibility layer is enabled, certificate
|
||||
verification behaved differently in wolfSSL than OpenSSL, in the
|
||||
X509_STORE_add_cert() and X509_STORE_load_locations() implementations.
|
||||
Previously, in cases where an application explicitly loaded an intermediate
|
||||
certificate, wolfSSL was verifying only up to that intermediate certificate,
|
||||
rather than verifying up to the root CA. This only affects use cases where the
|
||||
API is called directly, and does not affect TLS connections. Users that call
|
||||
the API X509_STORE_add_cert() or X509_STORE_load_locations() directly in their
|
||||
applications are recommended to update the version of wolfSSL used or to have
|
||||
additional sanity checks on certificates loaded into the X509_STORE when
|
||||
verifying a certificate. (https://github.com/wolfSSL/wolfssl/pull/8087)
|
||||
|
||||
|
||||
## PQC TLS Experimental Build Fix
|
||||
* When using TLS with post quantum algorithms enabled, the connection uses a
|
||||
smaller EC curve than agreed on. Users building with --enable-experimental and
|
||||
enabling PQC cipher suites with TLS connections are recommended to update the
|
||||
version of wolfSSL used. Thanks to Daniel Correa for the report.
|
||||
(https://github.com/wolfSSL/wolfssl/pull/8084)
|
||||
|
||||
|
||||
## New Feature Additions
|
||||
* RISC-V 64 new assembly optimizations added for SHA-256, SHA-512, ChaCha20,
|
||||
Poly1305, and SHA-3 (PR 7758,7833,7818,7873,7916)
|
||||
* Implement support for Connection ID (CID) with DTLS 1.2 (PR 7995)
|
||||
* Add support for (DevkitPro)libnds (PR 7990)
|
||||
* Add port for Mosquitto OSP (Open Source Project) (PR 6460)
|
||||
* Add port for init sssd (PR 7781)
|
||||
* Add port for eXosip2 (PR 7648)
|
||||
* Add support for STM32G4 (PR 7997)
|
||||
* Add support for MAX32665 and MAX32666 TPU HW and ARM ASM Crypto Callback
|
||||
Support (PR 7777)
|
||||
* Add support for building wolfSSL to be used in libspdm (PR 7869)
|
||||
* Add port for use with Nucleus Plus 2.3 (PR 7732)
|
||||
* Initial support for RFC5755 x509 attribute certificates (acerts). Enabled with
|
||||
--enable-acert (PR 7926)
|
||||
* PKCS#11 RSA Padding offload allows tokens to perform CKM_RSA_PKCS
|
||||
(sign/encrypt), CKM_RSA_PKCS_PSS (sign), and CKM_RSA_PKCS_OAEP (encrypt).
|
||||
(PR 7750)
|
||||
* Added “new” and “delete” style functions for heap/pool allocation and freeing
|
||||
of low level crypto structures (PR 3166 and 8089)
|
||||
|
||||
|
||||
## Enhancements and Optimizations
|
||||
* Increase default max alt. names from 128 to 1024 (PR 7762)
|
||||
* Added new constant time DH agree function wc_DhAgree_ct (PR 7802)
|
||||
* Expanded compatibility layer with the API EVP_PKEY_is_a (PR 7804)
|
||||
* Add option to disable cryptocb test software test using
|
||||
--disable-cryptocb-sw-test (PR 7862)
|
||||
* Add a call to certificate verify callback before checking certificate dates
|
||||
(PR 7895)
|
||||
* Expanded algorithms supported with the wolfCrypt CSharp wrapper. Adding
|
||||
support for RNG, ECC(ECIES and ECDHE), RSA, ED25519/Curve25519, AES-GCM, and
|
||||
Hashing (PR 3166)
|
||||
* Expand MMCAU support for use with DES ECB (PR 7960)
|
||||
* Update AES SIV to handle multiple associated data inputs (PR 7911)
|
||||
* Remove HAVE_NULL_CIPHER from --enable-openssh (PR 7811)
|
||||
* Removed duplicate if(NULL) checks when calling XFREE (macro does) (PR 7839)
|
||||
* Set RSA_MIN_SIZE default to 2048 bits (PR 7923)
|
||||
* Added support for wolfSSL to be used as the default TLS in the zephyr kernel
|
||||
(PR 7731)
|
||||
* Add enable provider build using --enable-wolfprovider with autotools (PR 7550)
|
||||
* Renesas RX TSIP ECDSA support (PR 7685)
|
||||
* Support DTLS1.3 downgrade when the server supports CID (PR 7841)
|
||||
* Server-side checks OCSP even if it uses v2 multi (PR 7828)
|
||||
* Add handling of absent hash params in PKCS7 bundle parsing and creation
|
||||
(PR 7845)
|
||||
* Add the use of w64wrapper for Poly1305, enabling Poly1305 to be used in
|
||||
environments that do not have a word64 type (PR 7759)
|
||||
* Update to the maxq10xx support (PR 7824)
|
||||
* Add support for parsing over optional PKCS8 attributes (PR 7944)
|
||||
* Add support for either side method with DTLS 1.3 (PR 8012)
|
||||
* Added PKCS7 PEM support for parsing PEM data with BEGIN/END PKCS7 (PR 7704)
|
||||
* Add CMake support for WOLFSSL_CUSTOM_CURVES (PR 7962)
|
||||
* Add left-most wildcard matching support to X509_check_host() (PR 7966)
|
||||
* Add option to set custom SKID with PKCS7 bundle creation (PR 7954)
|
||||
* Building wolfSSL as a library with Ada and corrections to Alire manifest
|
||||
(PR 7303,7940)
|
||||
* Renesas RX72N support updated (PR 7849)
|
||||
* New option WOLFSSL_COPY_KEY added to always copy the key to the SSL object
|
||||
(PR 8005)
|
||||
* Add the new option WOLFSSL_COPY_CERT to always copy the cert buffer for each
|
||||
SSL object (PR 7867)
|
||||
* Add an option to use AES-CBC with HMAC for default session ticket enc/dec.
|
||||
Defaults to AES-128-CBC with HMAC-SHA256 (PR 7703)
|
||||
* Memory usage improvements in wc_PRF, sha256 (for small code when many
|
||||
registers are available) and sp_int objects (PR 7901)
|
||||
* Change in the configure script to work around ">>" with no command. In older
|
||||
/bin/sh it can be ambiguous, as used in OS’s such as FreeBSD 9.2 (PR 7876)
|
||||
* Don't attempt to include system headers when not required (PR 7813)
|
||||
* Certificates: DER encoding of ECC signature algorithm parameter is now
|
||||
allowed to be NULL with a define (PR 7903)
|
||||
* SP x86_64 asm: check for AVX2 support for VMs (PR 7979)
|
||||
* Update rx64n support on gr-rose (PR 7889)
|
||||
* Update FSP version to v5.4.0 for RA6M4 (PR 7994)
|
||||
* Update TSIP driver version to v1.21 for RX65N RSK (PR 7993)
|
||||
* Add a new crypto callback for RSA with padding (PR 7907)
|
||||
* Replaced the use of pqm4 with wolfSSL implementations of Kyber/MLDSA
|
||||
(PR 7924)
|
||||
* Modernized memory fence support for C11 and clang (PR 7938)
|
||||
* Add a CRL error override callback (PR 7986)
|
||||
* Extend the X509 unknown extension callback for use with a user context
|
||||
(PR 7730)
|
||||
* Additional debug error tracing added with TLS (PR 7917)
|
||||
* Added runtime support for library call stack traces with
|
||||
–enable-debug-trace-errcodes=backtrace, using libbacktrace (PR 7846)
|
||||
* Expanded C89 conformance (PR 8077)
|
||||
* Expanded support for WOLFSSL_NO_MALLOC (PR 8065)
|
||||
* Added support for cross-compilation of Linux kernel module (PR 7746)
|
||||
* Updated Linux kernel module with support for kernel 6.11 and 6.12 (PR 7826)
|
||||
* Introduce WOLFSSL_ASN_ALLOW_0_SERIAL to allow parsing of certificates with a
|
||||
serial number of 0 (PR 7893)
|
||||
* Add conditional repository_owner to all wolfSSL GitHub workflows (PR 7871)
|
||||
|
||||
### Espressif / Arduino Updates
|
||||
* Update wolfcrypt settings.h for Espressif ESP-IDF, template update (PR 7953)
|
||||
* Update Espressif sha, util, mem, time helpers (PR 7955)
|
||||
* Espressif _thread_local_start and _thread_local_end fix (PR 8030)
|
||||
* Improve benchmark for Espressif devices (PR 8037)
|
||||
* Introduce Espressif common CONFIG_WOLFSSL_EXAMPLE_NAME, Kconfig (PR 7866)
|
||||
* Add wolfSSL esp-tls and Certificate Bundle Support for Espressif ESP-IDF
|
||||
(PR 7936)
|
||||
* Update wolfssl Release for Arduino (PR 7775)
|
||||
|
||||
### Post Quantum Crypto Updates
|
||||
* Dilithium: support fixed size arrays in dilithium_key (PR 7727)
|
||||
* Dilithium: add option to use precalc with small sign (PR 7744)
|
||||
* Allow Kyber to be built with FIPS (PR 7788)
|
||||
* Allow Kyber asm to be used in the Linux kernel module (PR 7872)
|
||||
* Dilithium, Kyber: Update to final specification (PR 7877)
|
||||
* Dilithium: Support FIPS 204 Draft and Final Draft (PR 7909,8016)
|
||||
|
||||
### ARM Assembly Optimizations
|
||||
* ARM32 assembly optimizations added for ChaCha20 and Poly1305 (PR 8020)
|
||||
* Poly1305 assembly optimizations improvements for Aarch64 (PR 7859)
|
||||
* Poly1305 assembly optimizations added for Thumb-2 (PR 7939)
|
||||
* Adding ARM ASM build option to STM32CubePack (PR 7747)
|
||||
* Add ARM64 to Visual Studio Project (PR 8010)
|
||||
* Kyber assembly optimizations for ARM32 and Aarch64 (PR 8040,7998)
|
||||
* Kyber assembly optimizations for ARMv7E-M/ARMv7-M (PR 7706)
|
||||
|
||||
|
||||
## Fixes
|
||||
* ECC key load: fixes for certificates with parameters that are not default for
|
||||
size (PR 7751)
|
||||
* Fixes for building x86 in Visual Studio for non-windows OS (PR 7884)
|
||||
* Fix for TLS v1.2 secret callback, incorrectly detecting bad master secret
|
||||
(PR 7812)
|
||||
* Fixes for PowerPC assembly use with Darwin and SP math all (PR 7931)
|
||||
* Fix for detecting older versions of Mac OS when trying to link with
|
||||
libdispatch (PR 7932)
|
||||
* Fix for DTLS1.3 downgrade to DTLS1.2 when the server sends multiple handshake
|
||||
packets combined into a single transmission. (PR 7840)
|
||||
* Fix for OCSP to save the request if it was stored in ssl->ctx->certOcspRequest
|
||||
(PR 7779)
|
||||
* Fix to OCSP for searching for CA by key hash instead of ext. key id (PR 7934)
|
||||
* Fix for staticmemory and singlethreaded build (PR 7737)
|
||||
* Fix to not allow Shake128/256 with Xilinx AFALG (PR 7708)
|
||||
* Fix to support PKCS11 without RSA key generation (PR 7738)
|
||||
* Fix not calling the signing callback when using PK callbacks + TLS 1.3
|
||||
(PR 7761)
|
||||
* Cortex-M/Thumb2 ASM fix label for IAR compiler (PR 7753)
|
||||
* Fix with PKCS11 to iterate correctly over slotId (PR 7736)
|
||||
* Stop stripping out the sequence header on the AltSigAlg extension (PR 7710)
|
||||
* Fix ParseCRL_AuthKeyIdExt with ASN template to set extAuthKeyIdSet value
|
||||
(PR 7742)
|
||||
* Use max key length for PSK encrypt buffer size (PR 7707)
|
||||
* DTLS 1.3 fix for size check to include headers and CID fixes (PR 7912,7951)
|
||||
* Fix STM32 Hash FIFO and add support for STM32U5A9xx (PR 7787)
|
||||
* Fix CMake build error for curl builds (PR 8021)
|
||||
* SP Maths: PowerPC ASM fix to use XOR instead of LI (PR 8038)
|
||||
* SSL loading of keys/certs: testing and fixes (PR 7789)
|
||||
* Misc. fixes for Dilithium and Kyber (PR 7721,7765,7803,8027,7904)
|
||||
* Fixes for building wolfBoot sources for PQ LMS/XMSS (PR 7868)
|
||||
* Fixes for building with Kyber enabled using CMake and zephyr port (PR 7773)
|
||||
* Fix for edge cases with session resumption with TLS 1.2 (PR 8097)
|
||||
* Fix issue with ARM ASM with AES CFB/OFB not initializing the "left" member
|
||||
(PR 8099)
|
||||
|
||||
|
||||
# wolfSSL Release 5.7.2 (July 08, 2024)
|
||||
|
||||
Release 5.7.2 has been developed according to wolfSSL's development and QA
|
||||
process (see link below) and successfully passed the quality criteria.
|
||||
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
|
||||
|
||||
NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024
|
||||
|
||||
## Vulnerabilities
|
||||
* [Medium] CVE-2024-1544
|
||||
Potential ECDSA nonce side channel attack in versions of wolfSSL before 5.6.6 with wc_ecc_sign_hash calls. Generating the ECDSA nonce k samples a random number r and then truncates this randomness with a modular reduction mod n where n is the order of the elliptic curve. Analyzing the division through a control-flow revealing side-channel reveals a bias in the most significant bits of k. Depending on the curve this is either a negligible bias or a significant bias large enough to reconstruct k with lattice reduction methods. Thanks to Luca Wilke, Florian Sieck and Thomas Eisenbarth (University of Lübeck) for reporting the vulnerability. Details will appear in the proceedings of CCS 24.
|
||||
Fixed https://github.com/wolfSSL/wolfssl/pull/7020
|
||||
|
||||
|
||||
* [Medium] CVE-2024-5288
|
||||
A private key blinding operation, enabled by defining the macro WOLFSSL_BLIND_PRIVATE_KEY, was added to mitigate a potential row hammer attack on ECC operations. If performing ECC private key operations in an environment where a malicious user could gain fine control over the device and perform row hammer style attacks it is recommended to update the version of wolfSSL used and to build with WOLFSSL_BLIND_PRIVATE_KEY defined. Thanks to Kemal Derya, M. Caner Tol, Berk Sunar for the report (Vernam Applied Cryptography and Cybersecurity Lab at Worcester Polytechnic Institute)
|
||||
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7416
|
||||
|
||||
|
||||
* [Low] When parsing a provided maliciously crafted certificate directly using wolfSSL API, outside of a TLS connection, a certificate with an excessively large number of extensions could lead to a potential DoS. There are existing sanity checks during a TLS handshake with wolfSSL which mitigate this issue. Thanks to Bing Shi for the report.
|
||||
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7597
|
||||
|
||||
* [Low] CVE-2024-5991
|
||||
In the function MatchDomainName(), input param str is treated as a NULL terminated string despite being user provided and unchecked. Specifically, the Openssl compatibility function X509_check_host() takes in a pointer and length to check against, with no requirements that it be NULL terminated. While calling without a NULL terminated string is very uncommon, it is still technically allowed. If a caller was attempting to do a name check on a non*NULL terminated buffer, the code would read beyond the bounds of the input array until it found a NULL terminator.
|
||||
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7604
|
||||
|
||||
* [Medium] CVE-2024-5814
|
||||
A malicious TLS1.2 server can force a TLS1.3 client with downgrade capability to use a ciphersuite that it did not agree to and achieve a successful connection. This is because, aside from the extensions, the client was skipping fully parsing the server hello when downgrading from TLS 1.3.
|
||||
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7619
|
||||
|
||||
* [Medium] OCSP stapling version 2 response verification bypass issue when a crafted response of length 0 is received. Found with internal testing.
|
||||
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7702
|
||||
|
||||
* [Medium] OCSP stapling version 2 revocation bypass with a retry of a TLS connection attempt. A revoked CA certificate could incorrectly be loaded into the trusted signers list and used in a repeat connection attempt. Found with internal testing.
|
||||
Fixed in github pull request https://github.com/wolfSSL/wolfssl/pull/7702
|
||||
|
||||
|
||||
## New Feature Additions
|
||||
* Added Dilithium/ML-DSA: Implementation of ML-DSA-44/65/87 (PR 7622)
|
||||
* AES RISC-V 64-bit ASM: ECB/CBC/CTR/GCM/CCM (PR 7569)
|
||||
* Added CUDA support for AES encryption (PR 7436)
|
||||
* Added support for gRPC (PR 7445)
|
||||
* Added function wc_RsaPrivateKeyDecodeRaw to import raw RSA private keys (PR 7608)
|
||||
* Added crypto callback for SHA-3 (PR 7670)
|
||||
* Support for Infineon Modus Toolbox with wolfSSL (PR 7369)
|
||||
* Allow user to send a user_canceled alert by calling wolfSSL_SendUserCanceled (PR 7590)
|
||||
* C# wrapper SNI support added (PR 7610)
|
||||
* Quantum-safe algorithm support added to the Linux kernel module (PR 7574)
|
||||
* Support for NIST 800-56C Option 1 KDF, using the macro WC_KDF_NIST_SP_800_56C added (PR 7589)
|
||||
* AES-XTS streaming mode added, along with hardware acceleration and kernel module use (PR 7522, 7560, 7424)
|
||||
* PlatformIO FreeRTOS with ESP build and addition of benchmark and test example applications (PR 7528, 7413, 7559, 7542)
|
||||
|
||||
|
||||
## Enhancements and Optimizations
|
||||
* Expanded STM32 AES hardware acceleration support for use with STM32H5 (PR 7578)
|
||||
* Adjusted wc_xmss and wc_lms settings to support use with wolfBoot (PR 7393)
|
||||
* Added the --enable-rpk option to autotools build for using raw public key support (PR 7379)
|
||||
* SHA-3 Thumb2, ARM32 assembly implementation added (PR 7667)
|
||||
* Improvements to RSA padding to expose Pad/Unpad APIs (PR 7612)
|
||||
* Updates and API additions for supporting socat version 1.8.0.0 (PR 7594)
|
||||
* cmake build improvements, expanding build options with SINGLE_THREADED and post-quantum algorithms, adjusting the generation of options.h file and using “yes;no” boolean instead of strings (PR 7611, 7546, 7479, 7480, 7380)
|
||||
* Improvements for Renesas RZ support (PR 7474)
|
||||
* Improvements to dual algorithm certificates for post-quantum keys (PR 7286)
|
||||
* Added wolfSSL_SessionIsSetup so the user can check if a session ticket has been sent by the server (PR 7430)
|
||||
* hostap updates: Implement PACs for EAP-FAST and filter cipher list on TLS version change (PR 7446)
|
||||
* Changed subject name comparison to match different upper and lower cases (PR 7420)
|
||||
* Support for DTLS 1.3 downgrade when using PSK (PR 7367)
|
||||
* Update to static memory build for more generic memory pools used (PR 7418)
|
||||
* Improved performance of Kyber C implementation (PR 7654)
|
||||
* Support for ECC_CACHE_CURVE with no malloc (PR 7490)
|
||||
* Added the configure option --enable-debug-trace-errcodes (macro WOLFSSL_DEBUG_TRACE_ERROR_CODES) which enables more debug tracking of error code values (PR 7634)
|
||||
* Enhanced wc_MakeRsaKey and wc_RsaKeyToDer to work with WOLFSSL_NO_MALLOC (PR 7362)
|
||||
* Improvements to assembly implementations of ChaCha20 and Poly1305 ASM for use with MSVC (PR 7319)
|
||||
* Cortex-M inline assembly labels with unique number appended (PR 7649)
|
||||
* Added secret logging callback to TLS <= 1.2, enabled with the macro HAVE_SECRET_CALLBACK (PR 7372)
|
||||
* Made wc_RNG_DRBG_Reseed() a public wolfCrypt API (PR 7386)
|
||||
* Enabled DES3 support without the DES3 ciphers. To re-enable DES3 cipher suites, use the configure flag --enable-des3-tls-suites (PR 7315)
|
||||
* Added stubs required for latest nginx (1.25.5) (PR 7449)
|
||||
* Added option for using a custom salt with the function wc_ecc_ctx_set_own_salt (PR 7552)
|
||||
* Added PQ files for Windows (PR 7419)
|
||||
* Enhancements to static memory feature, adding the option for a global heap hint (PR 7478) and build options for a lean or debug setting, enabled with --enable-staticmemory=small or --enable-staticmemory=debug (PR 7597)
|
||||
* Updated --enable-jni to define SESSION_CERTS for wolfJSSE (PR 7557)
|
||||
* Exposed DTLS in Ada wrapper and updated examples (PR 7397)
|
||||
* Added additional minimum TLS extension size sanity checks (PR 7602)
|
||||
* ESP improvements: updating the examples and libraries, updates for Apple HomeKit SHA/SRP, and fix for endianness with SHA512 software fallback (PR 7607, 7392, 7505, 7535)
|
||||
* Made the wc_CheckCertSigPubKey API publicly available with the define of the macro WOLFSSL_SMALL_CERT_VERIFY (PR 7599)
|
||||
* Added an alpha/preview of additional FIPS 140-3 full submission, bringing additional algorithms such as SRTP-KDF, AES-XTS, GCM streaming, AES-CFB, ED25519, and ED448 into the FIPS module boundary (PR 7295)
|
||||
* XCODE support for v5.2.3 of the FIPS module (PR 7140)
|
||||
* Expanded OpenSSL compatibility layer and added EC_POINT_hex2point (PR 7191)
|
||||
|
||||
## Fixes
|
||||
* Fixed Kyber control-flow timing leak. Thanks to Antoon Purnal from PQShield for the report
|
||||
* Fixed the NXP MMCAU HW acceleration for SHA-256 (PR 7389)
|
||||
* Fixed AES-CFB1 encrypt/decrypt on size (8*x-1) bits (PR 7431)
|
||||
* Fixed use of %rip with SHA-256 x64 assembly (PR 7409)
|
||||
* Fixed OCSP response message build for DTLS (PR 7671)
|
||||
* Handled edge case in wc_ecc_mulmod() with zero (PR 7532)
|
||||
* Fixed RPK (Raw Public Key) to follow certificate use correctly (PR 7375)
|
||||
* Added sanity check on record header with QUIC use (PR 7638)
|
||||
* Added sanity check for empty directory strings in X.509 when parsing (PR 7669)
|
||||
* Added sanity check on non-conforming serial number of 0 in certificates being parsed (PR 7625)
|
||||
* Fixed wolfSSL_CTX_set1_sigalgs_list() to make the TLS connection conform to the selected sig hash algorithm (PR 7693)
|
||||
* Various fixes for dual algorithm certificates including small stack use and support for Certificate Signing Requests (PR 7577)
|
||||
* Added sanity check for critical policy extension when wolfSSL is built without policy extension support enabled (PR 7388)
|
||||
* Added sanity check that the ed25519 signature is smaller than the order (PR 7513)
|
||||
* Fixed Segger emNet to handle non-blocking want read/want write (PR 7581)
|
||||
|
||||
|
||||
# wolfSSL Release 5.7.0 (Mar 20, 2024)
|
||||
|
||||
Release 5.7.0 has been developed according to wolfSSL's development and QA
|
||||
@ -112,7 +413,7 @@ fixed this omission in several PRs for this release.
|
||||
|
||||
* [Low] CVE-2023-6936: A potential heap overflow read is possible in servers connecting over TLS 1.3 when the optional `WOLFSSL_CALLBACKS` has been defined. The out of bounds read can occur when a server receives a malicious malformed ClientHello. Users should either discontinue use of `WOLFSSL_CALLBACKS` on the server side or update versions of wolfSSL to 5.6.6. Thanks to the tlspuffin fuzzer team for the report which was designed and developed by; Lucca Hirschi (Inria, LORIA), Steve Kremer (Inria, LORIA), and Max Ammann (Trail of Bits). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6949.
|
||||
|
||||
* [Low] A side channel vulnerability with AES T-Tables is possible in a very controlled environment where precision sub-cache-line inspection can happen, such as inside an Intel SGX enclave. This can lead to recovery of the AES key. To prevent this type of attack, wolfSSL added an AES bitsliced implementation which can be enabled with the “`--enable-aes-bitsliced`” configure option. Thanks to Florian Sieck, Zhiyuan Zhang, Sebastian Berndt, Chitchanok Chuengsatiansup, Thomas Eisenbarth, and Yuval Yarom for the report (Universities of Lübeck, Melbourne, Adelaide and Bochum). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6854.
|
||||
* [Low] CVE-2024-1543: A side channel vulnerability with AES T-Tables is possible in a very controlled environment where precision sub-cache-line inspection can happen, such as inside an Intel SGX enclave. This can lead to recovery of the AES key. To prevent this type of attack, wolfSSL added an AES bitsliced implementation which can be enabled with the “`--enable-aes-bitsliced`” configure option. Thanks to Florian Sieck, Zhiyuan Zhang, Sebastian Berndt, Chitchanok Chuengsatiansup, Thomas Eisenbarth, and Yuval Yarom for the report (Universities of Lübeck, Melbourne, Adelaide and Bochum). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6854.
|
||||
|
||||
* [Low] CVE-2023-6937: wolfSSL prior to 5.6.6 did not check that messages in a single (D)TLS record do not span key boundaries. As a result, it was possible to combine (D)TLS messages using different keys into one (D)TLS record. The most extreme edge case is that, in (D)TLS 1.3, it was possible that an unencrypted (D)TLS 1.3 record from the server containing first a ServerHello message and then the rest of the first server flight would be accepted by a wolfSSL client. In (D)TLS 1.3 the handshake is encrypted after the ServerHello but a wolfSSL client would accept an unencrypted flight from the server. This does not compromise key negotiation and authentication so it is assigned a low severity rating. Thanks to Johannes Wilson for the report (Sectra Communications and Linköping University). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/7029.
|
||||
|
||||
@ -766,9 +1067,9 @@ Release 5.5.1 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
|
||||
## Enhancements
|
||||
* DTLSv1.3: Do HRR Cookie exchange by default
|
||||
* Add wolfSSL_EVP_PKEY_new_CMAC_key to OpenSSL compatible API
|
||||
* Update ide win10 build files to add missing sp source files
|
||||
* Improve Workbench docs
|
||||
* Add wolfSSL_EVP_PKEY_new_CMAC_key to OpenSSL compatible API
|
||||
* Update ide win10 build files to add missing sp source files
|
||||
* Improve Workbench docs
|
||||
* Improve EVP support for CHACHA20_POLY1305
|
||||
* Improve `wc_SetCustomExtension` documentation
|
||||
* RSA-PSS with OCSP and add simple OCSP response DER verify test case
|
||||
@ -776,23 +1077,23 @@ Release 5.5.1 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
* Don't over-allocate memory for DTLS fragments
|
||||
* Add WOLFSSL_ATECC_TFLXTLS for Atmel port
|
||||
* SHA-3 performance improvements with x86_64 assembly
|
||||
* Add code to fallback to S/W if TSIP cannot handle
|
||||
* Add code to fallback to S/W if TSIP cannot handle
|
||||
* Improves entropy with VxWorks
|
||||
* Make time in milliseconds 64-bits for longer session ticket lives
|
||||
* Support for setting cipher list with bytes
|
||||
* wolfSSL_set1_curves_list(), wolfSSL_CTX_set1_curves_list() improvements
|
||||
* Add to RSAES-OAEP key parsing for pkcs7
|
||||
* Add missing DN nid to work with PrintName()
|
||||
* SP int: default to 16 bit word size when NO_64BIT defined
|
||||
* SP int: default to 16 bit word size when NO_64BIT defined
|
||||
* Limit the amount of fragments we store per a DTLS connection and error out when max limit is reached
|
||||
* Detect when certificate's RSA public key size is too big and fail on loading of certificate
|
||||
|
||||
## Fixes
|
||||
* Fix for async with OCSP non-blocking in `ProcessPeerCerts`
|
||||
* Fixes for building with 32-bit and socket size sign/unsigned mismatch
|
||||
* Fix Windows CMakeList compiler options
|
||||
* TLS 1.3 Middle-Box compat: fix missing brace
|
||||
* Configuration consistency fixes for RSA keys and way to force disable of private keys
|
||||
* Fix Windows CMakeList compiler options
|
||||
* TLS 1.3 Middle-Box compat: fix missing brace
|
||||
* Configuration consistency fixes for RSA keys and way to force disable of private keys
|
||||
* Fix for Aarch64 Mac M1 SP use
|
||||
* Fix build errors and warnings for MSVC with DTLS 1.3
|
||||
* Fix HMAC compat layer function for SHA-1
|
||||
@ -800,9 +1101,9 @@ Release 5.5.1 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
* Check return from call to wc_Time
|
||||
* SP math: fix build configuration with opensslall
|
||||
* Fix for async session tickets
|
||||
* SP int mp_init_size fixes when SP_WORD_SIZE == 8
|
||||
* SP int mp_init_size fixes when SP_WORD_SIZE == 8
|
||||
* Ed. function to make public key now checks for if the private key flag is set
|
||||
* Fix HashRaw WC_SHA256_DIGEST_SIZE for wc_Sha256GetHash
|
||||
* Fix HashRaw WC_SHA256_DIGEST_SIZE for wc_Sha256GetHash
|
||||
* Fix for building with PSK only
|
||||
* Set correct types in wolfSSL_sk_*_new functions
|
||||
* Sanity check that size passed to mp_init_size() is no more than SP_INT_DIGITS
|
||||
@ -916,7 +1217,7 @@ CVE-2020-12966 https://www.amd.com/en/corporate/product-security/bulletin/amd-sb
|
||||
* Update SP math all to not use sp_int_word when SQR_MUL_ASM is available
|
||||
### SP Math Fixes
|
||||
* Fixes for constant time with div function
|
||||
* Fix casting warnings for Windows builds and assembly changes to support XMM6-15 being non-volatile
|
||||
* Fix casting warnings for Windows builds and assembly changes to support XMM6-15 being non-volatile
|
||||
* Fix for div_word when not using div function
|
||||
* Fixes for user settings with SP ASM and ED/Curve25519 small
|
||||
* Additional Wycheproof tests ran and fixes
|
||||
@ -1096,7 +1397,7 @@ Release 5.3.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
### Math Library Fixes
|
||||
* Sanity check with SP math that ECC points ordinates are not greater than modulus length
|
||||
* Additional sanity checks that _sp_add_d does not error due to overflow
|
||||
* Wycheproof fixes, testing integration, and fixes for AVX / AArch64 ASM edge case tests
|
||||
* Wycheproof fixes, testing integration, and fixes for AVX / AArch64 ASM edge case tests
|
||||
* TFM fp_div_2_ct rework to avoid potential overflow
|
||||
|
||||
### Misc.
|
||||
@ -1337,7 +1638,7 @@ Release 5.1.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
###### PORT Fixes
|
||||
* Building with Android wpa_supplicant and KeyStore
|
||||
* Setting initial value of CA certificate with TSIP enabled
|
||||
* Cryptocell ECC build fix and fix with RSA disabled
|
||||
* Cryptocell ECC build fix and fix with RSA disabled
|
||||
* IoT-SAFE improvement for Key/File slot ID size, fix for C++ compile, and fixes for retrieving the public key after key generation
|
||||
|
||||
###### Math Library Fixes
|
||||
@ -1476,7 +1777,7 @@ Release 5.0.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
- SSL_SESSION_has_ticket()
|
||||
- SSL_SESSION_get_ticket_lifetime_hint()
|
||||
- DIST_POINT_new
|
||||
- DIST_POINT_free
|
||||
- DIST_POINT_free
|
||||
- DIST_POINTS_free
|
||||
- CRL_DIST_POINTS_free
|
||||
- sk_DIST_POINT_push
|
||||
@ -1639,7 +1940,7 @@ Release 4.8.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
|
||||
### Vulnerabilities
|
||||
* [Low] CVE-2021-37155: OCSP request/response verification issue. In the case that the serial number in the OCSP request differs from the serial number in the OCSP response the error from the comparison was not resulting in a failed verification. We recommend users that have wolfSSL version 4.6.0 and 4.7.0 with OCSP enabled update their version of wolfSSL. Version 4.5.0 and earlier are not affected by this report. Thanks to Rainer Mueller-Amersdorffer, Roee Yankelevsky, Barak Gutman, Hila Cohen and Shoshi Berko (from CYMOTIVE Technologies and CARIAD) for the report.
|
||||
* [Low] CVE-2021-24116: Side-Channel cache look up vulnerability in base64 PEM decoding for versions of wolfSSL 4.5.0 and earlier. Versions 4.6.0 and up contain a fix and do not need to be updated for this report. If decoding a PEM format private key using version 4.5.0 and older of wolfSSL then we recommend updating the version of wolfSSL used. Thanks to Florian Sieck, Jan Wichelmann, Sebastian Berndt and Thomas Eisenbarth for the report.
|
||||
* [Low] CVE-2021-24116: Side-Channel cache look up vulnerability in base64 PEM decoding for versions of wolfSSL 4.5.0 and earlier. Versions 4.6.0 and up contain a fix and do not need to be updated for this report. If decoding a PEM format private key using version 4.5.0 and older of wolfSSL then we recommend updating the version of wolfSSL used. Thanks to Florian Sieck, Jan Wichelmann, Sebastian Berndt and Thomas Eisenbarth for the report.
|
||||
|
||||
### New Feature Additions
|
||||
###### New Product
|
||||
|
@ -6,11 +6,11 @@ USER root
|
||||
# Set timezone to UTC
|
||||
RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone
|
||||
|
||||
ARG DEPS_WOLFSSL="build-essential autoconf libtool clang clang-tools zlib1g-dev libuv1-dev libpam0g-dev valgrind git linux-headers-generic gcc-multilib g++-multilib libpcap-dev bubblewrap gdb iputils-ping lldb bsdmainutils netcat binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu"
|
||||
ARG DEPS_WOLFSSL="build-essential autoconf libtool clang clang-tools zlib1g-dev libuv1-dev libpam0g-dev valgrind git linux-headers-generic gcc-multilib g++-multilib libpcap-dev bubblewrap gdb iputils-ping lldb bsdmainutils netcat-traditional binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu"
|
||||
ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git"
|
||||
ARG DEPS_UDP_PROXY="wget libevent-dev"
|
||||
ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev tcpdump libpsl-dev python3-pandas python3-tabulate libnl-genl-3-dev libcap-ng-dev"
|
||||
ARG DEPS_TOOLS="ccache clang-tidy maven"
|
||||
ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev tcpdump libpsl-dev python3-pandas python3-tabulate libnl-genl-3-dev libcap-ng-dev python3-virtualenv curl jq"
|
||||
ARG DEPS_TOOLS="ccache clang-tidy maven libfile-util-perl"
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
|
||||
&& apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} ${DEPS_UDP_PROXY} ${DEPS_TESTS} ${DEPS_TOOLS} \
|
||||
&& apt clean -y && rm -rf /var/lib/apt/lists/*
|
||||
@ -40,10 +40,12 @@ RUN cd /opt/sources && git clone --single-branch https://github.com/cisco/hash-s
|
||||
|
||||
# Install pkixssh to /opt/pkixssh for X509 interop testing with wolfSSH
|
||||
RUN mkdir /var/empty
|
||||
RUN cd /opt/sources && wget -q -O- https://roumenpetrov.info/secsh/src/pkixssh-14.1.1.tar.gz | tar xzf - && cd pkixssh-14.1.1 && ./configure --prefix=/opt/pkixssh/ --exec-prefix=/opt/pkixssh/ && make install
|
||||
RUN cd /opt/sources && wget -q -O- https://roumenpetrov.info/secsh/src/pkixssh-15.1.tar.gz | tar xzf - && cd pkixssh-15.1 && ./configure --prefix=/opt/pkixssh/ --exec-prefix=/opt/pkixssh/ && make install
|
||||
|
||||
# Install udp/tcp-proxy
|
||||
RUN cd /opt/sources && git clone --depth=1 --single-branch --branch=main http://github.com/wolfssl/udp-proxy && cd udp-proxy && make && cp tcp_proxy udp_proxy /bin/.
|
||||
# Install libbacktrace
|
||||
RUN cd /opt/sources && git clone --depth=1 --single-branch https://github.com/ianlancetaylor/libbacktrace.git && cd libbacktrace && mkdir build && cd build && ../configure && make && make install
|
||||
|
||||
# Allow non-root to use tcpdump (will need NET_RAW and NET_ADMIN capability when running the container)
|
||||
RUN setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/tcpdump
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Assume we're in wolfssl/Docker
|
||||
WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/..; pwd)
|
||||
@ -18,18 +18,37 @@ docker build -t wolfssl/wolfssl-builder:${CUR_DATE} ${DOCKER_BUILD_OPTIONS} "${W
|
||||
docker tag wolfssl/testing-cross-compiler:${CUR_DATE} wolfssl/testing-cross-compiler:latest
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Pushing containers to DockerHub"
|
||||
docker push wolfssl/wolfssl-builder:${CUR_DATE} && docker push wolfssl/wolfssl-builder:latest && \
|
||||
docker push wolfssl/testing-cross-compiler:${CUR_DATE} && docker push wolfssl/testing-cross-compiler:latest
|
||||
echo "Push containers to DockerHub [y/N]? "
|
||||
read val
|
||||
if [ "$val" = "y" ]; then
|
||||
docker push wolfssl/wolfssl-builder:${CUR_DATE} && docker push wolfssl/wolfssl-builder:latest && \
|
||||
docker push wolfssl/testing-cross-compiler:${CUR_DATE} && docker push wolfssl/testing-cross-compiler:latest
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Warning: push failed. Continuing"
|
||||
((NUM_FAILURES++))
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Warning: Build wolfssl/wolfssl-builder failed. Continuing"
|
||||
((NUM_FAILURES++))
|
||||
fi
|
||||
|
||||
echo "Building wolfssl/wolfCLU:${CUR_DATE}"
|
||||
docker buildx build --pull --push --build-arg DUMMY=${CUR_DATE} -t wolfssl/wolfclu:${CUR_DATE} --platform=linux/amd64,linux/arm64,linux/arm/v7 "${WOLFSSL_DIR}/Docker/wolfCLU" && \
|
||||
docker buildx build --pull --push --build-arg DUMMY=${CUR_DATE} -t wolfssl/wolfclu:latest --platform=linux/amd64,linux/arm64,linux/arm/v7 "${WOLFSSL_DIR}/Docker/wolfCLU"
|
||||
if [ $? -ne 0 ]; then
|
||||
DOCKER_ARGS="--pull --build-arg DUMMY=${CUR_DATE} --platform=linux/amd64,linux/arm64,linux/arm/v7 ${WOLFSSL_DIR}/Docker/wolfCLU"
|
||||
docker buildx build -t wolfssl/wolfclu:${CUR_DATE} ${DOCKER_ARGS} && \
|
||||
docker buildx build -t wolfssl/wolfclu:latest ${DOCKER_ARGS}
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Push containers to DockerHub [y/N]? "
|
||||
read val
|
||||
if [ "$val" = "y" ]; then
|
||||
docker buildx build ${DOCKER_ARGS} --push -t wolfssl/wolfclu:${CUR_DATE} && \
|
||||
docker buildx build ${DOCKER_ARGS} --push -t wolfssl/wolfclu:latest
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Warning: push failed. Continuing"
|
||||
((NUM_FAILURES++))
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Warning: Build wolfssl/wolfclu failed. Continuing"
|
||||
((NUM_FAILURES++))
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "Running with \"${*}\"..."
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
ARG DOCKER_BASE_IMAGE=ubuntu
|
||||
FROM ubuntu as BUILDER
|
||||
|
||||
ARG DEPS_WOLFSSL="build-essential autoconf libtool zlib1g-dev libuv1-dev libpam0g-dev git libpcap-dev libcurl4-openssl-dev bsdmainutils netcat iputils-ping bubblewrap"
|
||||
ARG DEPS_WOLFSSL="build-essential autoconf libtool zlib1g-dev libuv1-dev libpam0g-dev git libpcap-dev libcurl4-openssl-dev bsdmainutils netcat-traditional iputils-ping bubblewrap"
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
|
||||
&& apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \
|
||||
&& apt install -y ${DEPS_WOLFSSL} \
|
||||
&& apt clean -y && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG NUM_CPU=16
|
||||
|
@ -1,6 +1,6 @@
|
||||
This is a small container that has wolfCLU installed for quick access. To build your own run the following:
|
||||
```
|
||||
docker build --pull --build-arg DUMMY=$(date +%s) -t wolfclu .
|
||||
docker build --pull --build-arg DUMMY=$(date +%s) -t wolfclu .
|
||||
```
|
||||
|
||||
To run the container, you can use:
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Assume we're in wolfssl/Docker/yocto
|
||||
WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/../..; pwd)
|
||||
|
@ -10,4 +10,6 @@ See the [Arduino-wolfSSL logs](https://downloads.arduino.cc/libraries/logs/githu
|
||||
|
||||
The first Official wolfSSL Arduino Library is `5.6.6-Arduino.1`: a slightly modified, post [release 5.6.6](https://github.com/wolfSSL/wolfssl/releases/tag/v5.6.6-stable) version update.
|
||||
|
||||
The next Official wolfSSL Arduino Library is [5.7.0](https://github.com/wolfSSL/wolfssl/releases/tag/v5.7.0-stable)
|
||||
|
||||
See other [wolfSSL releases versions](https://github.com/wolfSSL/wolfssl/releases). The `./wolfssl-arduino.sh INSTALL` [script](https://github.com/wolfSSL/wolfssl/tree/master/IDE/ARDUINO) can be used to install specific GitHub versions as needed.
|
||||
|
@ -27,7 +27,7 @@ This option will allow wolfSSL to be installed directly using the native Arduino
|
||||
|
||||
## Manually Reformatting wolfSSL as a Compatible Arduino Library
|
||||
|
||||
Use [this](./wolfssl-arduino.sh) shell script that will re-organize the wolfSSL library to be
|
||||
Use [this](./wolfssl-arduino.sh) shell script that will re-organize the wolfSSL library to be
|
||||
compatible with [Arduino Library Specification](https://arduino.github.io/arduino-cli/0.35/library-specification/)
|
||||
for projects that use Arduino IDE 1.5.0 or newer.
|
||||
|
||||
@ -55,8 +55,8 @@ from within the `wolfssl/IDE/ARDUINO` directory:
|
||||
3. `./wolfssl-arduino.sh INSTALL /path/to/repository` (Used to update [arduino-wolfSSL](https://github.com/wolfSSL/arduino-wolfSSL))
|
||||
- Creates an Arduino Library in `wolfSSL` directory
|
||||
- Copies that directory contents to the specified `/path/to/repository`
|
||||
- Adds the [default](../../examples/configs/user_settings_arduino.h) as `user_settings.h`.
|
||||
|
||||
- Adds the [default](../../examples/configs/user_settings_arduino.h) as `user_settings.h`.
|
||||
|
||||
4. `./wolfssl-arduino.sh INSTALL /path/to/any/other/directory`
|
||||
- Creates an Arduino Library in `wolfSSL` directory
|
||||
- Copies that directory contents to the specified `/path/to/any/other/directory`
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* wolfssl_client.ino
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -13,7 +13,7 @@ Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.co
|
||||
|
||||
## Connect with an Arduino Sketch
|
||||
|
||||
See the companion [Arduino Sketch Client](../wolfssl_client/wolfssl_client.ino).
|
||||
See the companion [Arduino Sketch Client](../wolfssl_client/wolfssl_client.ino).
|
||||
|
||||
## Connect with Linux Client
|
||||
|
||||
@ -35,7 +35,7 @@ press the reset button or power cycle the Arduino before making a connection.
|
||||
Here's one possible script to test the server from a command-line client:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
echo "client log " > client_log.txt
|
||||
counter=1
|
||||
THIS_ERR=0
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* wolfssl_server.ino
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
||||
# Reminder there's typically no $USER for GitHub actions, but:
|
||||
# ROOT_DIR="/mnt/c/Users/$USER/Documents/Arduino/libraries"
|
||||
#
|
||||
# The company name is "wolfSSL Inc."; There’s a space, no comma, and a period after "Inc."
|
||||
# The company name is "wolfSSL Inc."; There's a space, no comma, and a period after "Inc."
|
||||
# The Arduino library name is "wolfssl" (all lower case)
|
||||
# The Arduino library directory name is "wolfssl" (all lower case)
|
||||
# The Arduino library include file is "wolfssl.h" (all lower case)
|
||||
@ -29,7 +29,7 @@
|
||||
ROOT_DIR="/wolfssl"
|
||||
|
||||
# The Arduino Version will initially have a suffix appended during fine tuning stage.
|
||||
WOLFSSL_VERSION_ARUINO_SUFFIX="-Arduino.3"
|
||||
WOLFSSL_VERSION_ARUINO_SUFFIX=""
|
||||
|
||||
# For verbose copy, set CP_CMD="-v", otherwise clear it: CP_CMD="cp"
|
||||
# Do not set to empty string, as copy will fail with this: CP_CMD=""
|
||||
@ -65,6 +65,11 @@ if ! [ "$CP_CMD" = "cp " ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$ROOT_DIR" = "" ]; then
|
||||
echo "ERROR: ROOT_DIR cannot be blank"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check environment
|
||||
if [ -n "$WSL_DISTRO_NAME" ]; then
|
||||
# we found a non-blank WSL environment distro name
|
||||
@ -84,6 +89,11 @@ if [ $# -gt 0 ]; then
|
||||
if [ "$THIS_OPERATION" = "INSTALL" ]; then
|
||||
THIS_INSTALL_DIR=$2
|
||||
|
||||
if [ "$THIS_INSTALL_DIR" = "/" ]; then
|
||||
echo "ERROR: THIS_INSTALL_DIR cannot be /"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Install is active."
|
||||
|
||||
if [ "$THIS_INSTALL_DIR" = "" ]; then
|
||||
@ -300,20 +310,22 @@ echo ""
|
||||
# Note we should have exited above if a problem was encountered,
|
||||
# as we'll never want to install a bad library.
|
||||
if [ "$THIS_OPERATION" = "INSTALL" ]; then
|
||||
echo "Config:"
|
||||
echo "cp ../../examples/configs/user_settings_arduino.h ".${ROOT_SRC_DIR}"/user_settings.h"
|
||||
# Nearly an ordinary copy, but we remove any lines with ">>" (typically edit with caution warning in comments)
|
||||
grep -v '>>' ../../examples/configs/user_settings_arduino.h > ".${ROOT_SRC_DIR}"/user_settings.h || exit 1
|
||||
|
||||
# Show the user_settings.h revision string:
|
||||
grep "WOLFSSL_USER_SETTINGS_ID" ."${ROOT_SRC_DIR}/user_settings.h"
|
||||
echo ""
|
||||
|
||||
if [ "$THIS_INSTALL_IS_GITHUB" = "true" ]; then
|
||||
echo "Installing to GitHub directory: $THIS_INSTALL_DIR"
|
||||
cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1
|
||||
echo "Removing workspace library directory: .$ROOT_DIR"
|
||||
rm -rf ".$ROOT_DIR"
|
||||
else
|
||||
echo "Config:"
|
||||
echo "cp ../../examples/configs/user_settings_arduino.h ".${ROOT_SRC_DIR}"/user_settings.h"
|
||||
# Nearly an ordinary copy, but we remove any lines with ">>" (typically edit with caution warning in comments)
|
||||
grep -v '>>' ../../examples/configs/user_settings_arduino.h > ".${ROOT_SRC_DIR}"/user_settings.h || exit 1
|
||||
|
||||
# Show the user_settings.h revision string:
|
||||
grep "WOLFSSL_USER_SETTINGS_ID" ."${ROOT_SRC_DIR}/user_settings.h"
|
||||
echo ""
|
||||
|
||||
echo "Install:"
|
||||
echo "Installing to local directory:"
|
||||
echo "mv .$ROOT_DIR $ARDUINO_ROOT"
|
||||
mv ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Cpu0_Main.c
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@ -63,7 +63,7 @@ int fputc(int ch, FILE *f)
|
||||
if (ch == (int)'\n') {
|
||||
int chcr = (int)'\r';
|
||||
count = 1;
|
||||
IfxAsclin_Asc_write(&g_asc, &chcr, &count, TIME_INFINITE);
|
||||
IfxAsclin_Asc_write(&g_asc, &chcr, &count, TIME_INFINITE);
|
||||
}
|
||||
count = 1;
|
||||
IfxAsclin_Asc_write(&g_asc, &ch, &count, TIME_INFINITE);
|
||||
|
@ -9,7 +9,7 @@ Tested Platform:
|
||||
|
||||
## Running wolfCrypt on TriCore
|
||||
|
||||
1) Add the wolfSSL source and headers to `Libraries/wolfssl`.
|
||||
1) Add the wolfSSL source and headers to `Libraries/wolfssl`.
|
||||
- Only the following folders are required: `src`, `wolfcrypt` and `wolfssl`.
|
||||
- See script to help with producing bundle here: https://github.com/wolfSSL/wolfssl/blob/master/scripts/makedistsmall.sh
|
||||
2) Add `WOLFSSL_USER_SETTINGS` to the Preprocessing symbols list. C/C++ Build -> Settings -> TASKING C/C++ Compiler -> Preprocessing.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* wolf_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@ -18,8 +18,8 @@
|
||||
* 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 <wolfcrypt/test/test.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
@ -63,4 +63,3 @@ int main(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@ -401,6 +401,7 @@ extern "C" {
|
||||
|
||||
/* prototypes for user heap override functions */
|
||||
/* Note: Realloc only required for normal math */
|
||||
/* Note2: XFREE(NULL) must be properly handled */
|
||||
#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);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* deos_malloc.c
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -240,9 +240,9 @@
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/fe_operations.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/fe_x25519_128.i</name>
|
||||
<name>wolfcrypt/src/fe_x25519_128.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/fe_x25519_128.i</locationURI>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/fe_x25519_128.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/fp_mont_small.i</name>
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* tls_wolfssl.c
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* tls_wolfssl.h
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* user_setting.h
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* client_wolfssl.c
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* client_wolfssl.h
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* server_wolfssl.c
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* server_wolfssl.h
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* user_setting.h
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* wolfsslRunTests.c
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* user_setting.h
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* wolfsslRunTests.c
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1 +1 @@
|
||||
This folder has moved to `IDE/RISCV/SIFIVE-HIFIVE1`.
|
||||
This folder has moved to `IDE/RISCV/SIFIVE-HIFIVE1`.
|
||||
|
@ -1,11 +1,12 @@
|
||||
# ESP-IDF Port
|
||||
|
||||
These Espressif examples have been created and tested with the latest stable release branch of
|
||||
[ESP-IDF V5.2](https://docs.espressif.com/projects/esp-idf/en/release-v5.2/esp32/get-started/index.html).
|
||||
The prior version 4.4 ESP-IDF is still supported, however version 5.2 or greater is recommended.
|
||||
Espressif has [a list of all ESP-IDF versions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/versions.html).
|
||||
These Espressif examples have been created and tested with the latest stable release branch of
|
||||
ESP-IDF v5.2, v5.3 and the master branch
|
||||
|
||||
See the latest [Espressif Migration Guides](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/index.html).
|
||||
The prior version 4.4 ESP-IDF is still supported, however version 5.2 or greater is recommended.
|
||||
Espressif has [a list of all ESP-IDF versions](Espressifversions.html).
|
||||
|
||||
See the latest Espressif Migration Guides.
|
||||
|
||||
## Examples
|
||||
|
||||
@ -34,7 +35,7 @@ looks for the wolfSSL `user_settings.h` in the project as described below.
|
||||
### File: `sdkconfig.h`
|
||||
|
||||
The Espressif `sdkconfig.h`, generated automatically from your `sdkconfig`
|
||||
file at [build](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html)
|
||||
file at [build](Espressif api-guides/build-system.html)
|
||||
time, should be included before any other files.
|
||||
|
||||
### File: `user_settings.h`
|
||||
@ -101,7 +102,7 @@ of your source code, particularly before the `#include <wolfssl/wolfcrypt/settin
|
||||
|
||||
## Requirements
|
||||
|
||||
1. [ESP-IDF development framework](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/)
|
||||
1. [ESP-IDF development framework](https://github.com/espressif/esp-idf)
|
||||
|
||||
## wolfSSL as an Espressif component
|
||||
|
||||
@ -113,7 +114,7 @@ There are various methods available for using wolfSSL as a component:
|
||||
|
||||
## Espressif Managed Components
|
||||
|
||||
Visit https://components.espressif.com/components/wolfssl/wolfssl and see the instructions. Typically:
|
||||
Visit https://www.wolfssl.com/wolfssl-now-available-in-espressif-component-registry/ and see the instructions. Typically:
|
||||
|
||||
```
|
||||
idf.py add-dependency "wolfssl/wolfssl^5.6.0-stable"
|
||||
@ -140,10 +141,18 @@ See the specific examples for additional details.
|
||||
|
||||
This is an alternate method for installation. It is recommended to use the new `CMakeLists.txt` to point to wolfSSL source code.
|
||||
|
||||
1. Run `setup.sh` at _/path/to_`/wolfssl/IDE/Espressif/ESP-IDF/` to deploy files into ESP-IDF tree
|
||||
1. Run `setup.sh` at _/path/to_`/wolfssl/IDE/Espressif/ESP-IDF/` to deploy files into ESP-IDF tree
|
||||
2. Find Wolfssl files at _/path/to/esp_`/esp-idf/components/wolfssl/`
|
||||
3. Find [Example Programs](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples) under _/path/to/esp_`/esp-idf/examples/protocols/wolfssl_xxx` (where xxx is the project name)
|
||||
|
||||
|
||||
```
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.2
|
||||
. $WRK_IDF_PATH/export.sh
|
||||
|
||||
./setup.sh
|
||||
```
|
||||
|
||||
## Setup for Windows
|
||||
|
||||
This is an alternate method for installation. It is recommended to use the new `CMakeLists.txt` to point to wolfSSL source code.
|
||||
@ -169,7 +178,7 @@ C:\SysGCC\esp32\esp-idf>git clone -b v5.0.2 --recursive https://github.com/espre
|
||||
|
||||
## Configuration
|
||||
|
||||
1. The `user_settings.h` can be found in `[project]/components/wolfssl/include/user_settings.h`.
|
||||
1. The `user_settings.h` can be found in `[project]/components/wolfssl/include/user_settings.h`.
|
||||
|
||||
## Configuration (Legacy IDF install)
|
||||
|
||||
@ -183,13 +192,13 @@ C:\SysGCC\esp32\esp-idf>git clone -b v5.0.2 --recursive https://github.com/espre
|
||||
|
||||
For question please email [support@wolfssl.com]
|
||||
|
||||
Note: This is tested with :
|
||||
Note: This is tested with :
|
||||
- OS: Ubuntu 20.04.3 LTS
|
||||
- Microsoft Windows 10 Pro 10.0.19041 / Windows 11 Pro 22H2 22621.2715
|
||||
- Visual Studio 2022 17.7.6 with VisualGDB 5.6R9 (build 4777)
|
||||
- WSL 1 Ubuntu 22.04.3 LTS
|
||||
- ESP-IDF: ESP-IDF v5.1
|
||||
- SoC Module : all those supported in ESP-IDF v5.1
|
||||
- ESP-IDF: ESP-IDF v5.2
|
||||
- SoC Module : all those supported in ESP-IDF v5.2
|
||||
|
||||
## JTAG Debugging Notes
|
||||
|
||||
@ -226,3 +235,15 @@ ftdi layout_signal nSRST -data 0x0020
|
||||
reset_config srst_push_pull trst_push_pull
|
||||
|
||||
```
|
||||
|
||||
## Windows long paths
|
||||
|
||||
Check "Long Paths Enabled" in Windows registry.
|
||||
|
||||
Please set registry HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled to 1.
|
||||
|
||||
The operation requires Administrator privileges. Command:
|
||||
|
||||
```powershell
|
||||
powershell -Command "&{ Start-Process -FilePath reg 'ADD HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f' -Verb runAs}"
|
||||
```
|
||||
|
@ -10,7 +10,7 @@ Including the following examples:
|
||||
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/
|
||||
1. ESP-IDF development framework: https://github.com/espressif/esp-idf
|
||||
|
||||
2. Microchip CryptoAuthentication Library: https://github.com/MicrochipTech/cryptoauthlib
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# testing script: compileAllExamples
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* config.h - dummy
|
||||
*
|
||||
* Copyright (C) 2006-2023 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -12,7 +12,7 @@ These are the core examples for wolfSSL:
|
||||
|
||||
- [TLS Client](./wolfssl_client/README.md). See also [CLI Client](https://github.com/wolfSSL/wolfssl/tree/master/examples/client) and [more TLS examples](https://github.com/wolfSSL/wolfssl-examples/tree/master/tls).
|
||||
|
||||
- [TLS Server](./wolfssl_server/README.md). See also [CLI Server](https://github.com/wolfSSL/wolfssl/tree/master/examples/server)
|
||||
- [TLS Server](./wolfssl_server/README.md). See also [CLI Server](https://github.com/wolfSSL/wolfssl/tree/master/examples/server)
|
||||
|
||||
## Other Espressif wolfSSL Examples
|
||||
|
||||
@ -44,7 +44,7 @@ TLS1.3 Linux Client to Linux Server: `TLS_AES_128_GCM_SHA256` (default)
|
||||
./examples/client/client -v 4 -h 127.0.0.1 -p 11111 -A ./certs/ca-cert.pem
|
||||
```
|
||||
|
||||
TLS1.2 Linux Server
|
||||
TLS1.2 Linux Server
|
||||
```
|
||||
./examples/server/server -v 3 -b -d -p 11111 -c ./certs/server-cert.pem -k ./certs/server-key.pem
|
||||
```
|
||||
@ -71,14 +71,14 @@ There's an additional example that uses wolfSSL installed as a component to the
|
||||
|
||||
## Installing wolfSSL for Espressif projects
|
||||
|
||||
[Core examples](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples)
|
||||
have a local `components/wolfssl` directory with a special CMakeFile.txt that does not require
|
||||
[Core examples](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples)
|
||||
have a local `components/wolfssl` directory with a special CMakeFile.txt that does not require
|
||||
wolfSSL to be installed.
|
||||
|
||||
If you want to install wolfSSL, see the setup for [wolfSSL](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF#setup-for-linux)
|
||||
If you want to install wolfSSL, see the setup for [wolfSSL](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF#setup-for-linux)
|
||||
and [wolfSSH](https://github.com/wolfSSL/wolfssh/tree/master/ide/Espressif#setup-for-linux).
|
||||
|
||||
The [Espressif Managed Component for wolfSSL](https://components.espressif.com/components/wolfssl/wolfssl)
|
||||
The [Espressif Managed Component for wolfSSL](https://www.wolfssl.com/wolfssl-now-available-in-espressif-component-registry/)
|
||||
also installs source code locally, instead of pointing to a source repository.
|
||||
|
||||
## VisualGDB
|
||||
@ -114,7 +114,4 @@ It may be helpful to also delete the `sdkconfig` file. (Save a backup if you've
|
||||
|
||||
- esp32.com: [GPIO6,GPIO7,GPIO8,and GPIO9 changed for ESP32-WROOM-32E](https://esp32.com/viewtopic.php?t=29058)
|
||||
|
||||
See also [this ESP-FAQ Handbook](https://docs.espressif.com/projects/esp-faq/en/latest/esp-faq-en-master.pdf).
|
||||
|
||||
|
||||
|
||||
See also the `ESP-FAQ Handbook`.
|
||||
|
@ -1,10 +1,13 @@
|
||||
# wolfSSL Espressif Example Project CMakeLists.txt
|
||||
# v1.0
|
||||
# v1.3
|
||||
#
|
||||
# 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.16)
|
||||
|
||||
# Optional no watchdog typically used for test & benchmark
|
||||
add_compile_options(-DWOLFSSL_ESP_NO_WATCHDOG=1)
|
||||
|
||||
# The wolfSSL CMake file should be able to find the source code.
|
||||
# Otherwise, assign an environment variable or set it here:
|
||||
#
|
||||
@ -68,6 +71,12 @@ else()
|
||||
message(STATUS "No conflicting wolfSSL components found.")
|
||||
endif()
|
||||
|
||||
# Ensure the this wolfSSL component directory is included
|
||||
set(WOLFSSL_PATH "${CMAKE_HOME_DIRECTORY}/components/wolfssl")
|
||||
list(APPEND EXTRA_COMPONENT_DIRS ${WOLFSSL_PATH})
|
||||
|
||||
# Not only is a project-level "set(COMPONENTS" not needed here, this will cause
|
||||
# an unintuitive error about Unknown CMake command "esptool_py_flash_project_args".
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
project(wolfssl_template)
|
||||
|
@ -7,11 +7,11 @@ For general information on [wolfSSL examples for Espressif](../README.md), see t
|
||||
|
||||
### Prerequisites
|
||||
|
||||
It is assumed the [ESP-IDF environment](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/) has been installed.
|
||||
It is assumed the [ESP-IDF environment](Espressifget-started/) has been installed.
|
||||
|
||||
### Files Included
|
||||
|
||||
- [main.c](./main/main.c) with a simple call to an Espressif library (`ESP_LOGI`) and a call to a wolfSSL library (`esp_ShowExtendedSystemInfo`) .
|
||||
- [main.c](./main/main.c) with a simple call to an Espressif library (`ESP_LOGI`) and a call to a wolfSSL library (`esp_ShowExtendedSystemInfo`) .
|
||||
|
||||
- See [components/wolfssl/include](./components/wolfssl/include/user_settings.h) directory to edit the wolfSSL `user_settings.h`.
|
||||
|
||||
@ -19,7 +19,7 @@ It is assumed the [ESP-IDF environment](https://docs.espressif.com/projects/esp-
|
||||
|
||||
- The [components/wolfssl/CMakeLists.txt](./components/wolfssl/CMakeLists.txt) typically does not need to be changed.
|
||||
|
||||
- Optional [VisualGDB Project](./VisualGDB/wolfssl_template_IDF_v5.1_ESP32.vgdbproj) for Visual Studio using ESP32 and ESP-IDF v5.1.
|
||||
- Optional [VisualGDB Project](./VisualGDB/README.md) for Visual Studio using ESP32 and ESP-IDF v5.2. See also [template](../template/VisualGDB/README.md) for other devices.
|
||||
|
||||
- Edit the project [CMakeLists.txt](./CMakeLists.txt) to optionally point this project's wolfSSL component source code at a different directory:
|
||||
|
||||
@ -30,12 +30,12 @@ set(WOLFSSL_ROOT "~/workspace/wolfssl-other-source")
|
||||
|
||||
## Getting Started:
|
||||
|
||||
Here's an example using the command-line [idf.py](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-py.html).
|
||||
Here's an example using the command-line [idf.py](Espressifapi-guides/tools/idf-py.html).
|
||||
|
||||
Edit your `WRK_IDF_PATH`to point to your ESP-IDF install directory.
|
||||
|
||||
```
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.1
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.2
|
||||
|
||||
echo "Run export.sh from ${WRK_IDF_PATH}"
|
||||
. ${WRK_IDF_PATH}/export.sh
|
||||
@ -53,7 +53,7 @@ idf.py flash -p /dev/ttyS19 -b 115200
|
||||
idf.py flash -p /dev/ttyS19 -b 115200 monitor
|
||||
```
|
||||
|
||||
Press `Ctrl+]` to exit `idf.py monitor`. See [additional monitor keyboard commands](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-monitor.html).
|
||||
Press `Ctrl+]` to exit `idf.py monitor`. See [additional monitor keyboard commands](Espressifapi-guides/tools/idf-monitor.html).
|
||||
|
||||
## Other Examples:
|
||||
|
||||
|
@ -1,34 +1,163 @@
|
||||
#
|
||||
# Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
# Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
#
|
||||
# This file is part of wolfSSL.
|
||||
# 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 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.
|
||||
# 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
|
||||
# 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
|
||||
#
|
||||
# cmake for wolfssl Espressif projects
|
||||
#
|
||||
# Version 5.6.0.011 for detect test/benchmark
|
||||
# Version 5.7.2 Espressif ESP-IDF integration
|
||||
#
|
||||
# See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
|
||||
#
|
||||
|
||||
message(STATUS "Begin wolfssl ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}")
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
set(VERBOSE_COMPONENT_MESSAGES 1)
|
||||
|
||||
# Optional requires include:
|
||||
# set(THIS_ESP_TLS "esp-tls")
|
||||
set(THIS_ESP_TLS "")
|
||||
|
||||
# function: IS_ESP_IDF_COMPONENT
|
||||
# output: RESULT = 1 (true) if this component is located in the ESP-IDF components
|
||||
# otherwise 0 (false)
|
||||
function( IS_ESP_IDF_COMPONENT RESULT )
|
||||
# NOTE: Component location is based on the location of the CMakeList.txt
|
||||
# and *not* the location of the wolfSSL source code. (which may be anywhere)
|
||||
|
||||
# Normalize the paths to remove any trailing slashes
|
||||
get_filename_component(NORMALIZED_IDF_PATH "${IDF_PATH}" REALPATH)
|
||||
get_filename_component(NORMALIZED_TEST_PATH "${COMPONENT_DIR}" REALPATH)
|
||||
|
||||
# Check if the test path starts with the IDF_PATH
|
||||
string(FIND "${NORMALIZED_TEST_PATH}" "${NORMALIZED_IDF_PATH}" pos)
|
||||
|
||||
if(${pos} EQUAL 0)
|
||||
message(STATUS "${COMPONENT_DIR} is within IDF_PATH.")
|
||||
set(${RESULT} 1 PARENT_SCOPE)
|
||||
else()
|
||||
message(STATUS "${COMPONENT_DIR} is not within IDF_PATH.")
|
||||
set(${RESULT} 0 PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Determine if this cmake file is located in the ESP-IDF component directory or not,
|
||||
# and if so, if it is being ignored (allowing the use of a local project one, instead).
|
||||
IS_ESP_IDF_COMPONENT( IS_WOLSSL_ESP_IDF_COMPONENT )
|
||||
if( IS_WOLSSL_ESP_IDF_COMPONENT )
|
||||
message(STATUS "This wolfSSL is a component in ESP-IDF.")
|
||||
if ( CONFIG_IGNORE_ESP_IDF_WOLFSSL_COMPONENT )
|
||||
idf_component_register()
|
||||
message(STATUS "Warning: wolfSSL component in ESP-IDF is being ignored.")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if( "${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}" STREQUAL "" )
|
||||
# nothing to do
|
||||
else()
|
||||
# Only forward slashes, or double backslashes are supported.
|
||||
# By the time we get here the sdkconfig file has a value for wolfSSL source code root.
|
||||
string(REPLACE "\\" "/" CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT})
|
||||
message(STATUS "Cleaned wolfssl path: ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}")
|
||||
endif()
|
||||
|
||||
# The scope of this CMAKE_C_FLAGS is just this component:
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
|
||||
set(CMAKE_CURRENT_SOURCE_DIR ".")
|
||||
set(COMPONENT_REQUIRES lwip) # we typically don't need lwip directly in wolfssl component
|
||||
set(WOLFSSL_ROOT "$ENV{WOLFSSL_ROOT}" )
|
||||
# set(COMPONENT_REQUIRES lwip) # we typically don't need lwip directly in wolfssl component
|
||||
|
||||
# Optionally set your source to wolfSSL in your project CMakeLists.txt like this:
|
||||
# set(WOLFSSL_ROOT "c:/test/my_wolfssl" )
|
||||
|
||||
if ( "${WOLFSSL_ROOT}" STREQUAL "")
|
||||
set(WOLFSSL_ROOT "$ENV{WOLFSSL_ROOT}" )
|
||||
endif()
|
||||
|
||||
if( "$ENV{IDF_PATH}" STREQUAL "" )
|
||||
message(FATAL_ERROR "IDF_PATH Environment variable not set!")
|
||||
else()
|
||||
string(REPLACE "\\" "/" THIS_IDF_PATH "$ENV{IDF_PATH}")
|
||||
endif()
|
||||
|
||||
# Optional compiler definitions to help with system name detection (typically printed by app diagnostics)
|
||||
if(VERBOSE_COMPONENT_MESSAGES)
|
||||
if(WIN32)
|
||||
# Windows-specific configuration here
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_WINDOWS")
|
||||
message("Detected Windows")
|
||||
endif()
|
||||
if(CMAKE_HOST_UNIX)
|
||||
message("Detected UNIX")
|
||||
endif()
|
||||
if(APPLE)
|
||||
message("Detected APPLE")
|
||||
endif()
|
||||
if(CMAKE_HOST_UNIX AND (NOT APPLE) AND EXISTS "/proc/sys/fs/binfmt_misc/WSLInterop")
|
||||
# Windows-specific configuration here
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_WSL")
|
||||
message("Detected WSL")
|
||||
endif()
|
||||
if(CMAKE_HOST_UNIX AND (NOT APPLE) AND (NOT WIN32))
|
||||
# Windows-specific configuration here
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_LINUX")
|
||||
message("Detected Linux")
|
||||
endif()
|
||||
if(APPLE)
|
||||
# Windows-specific configuration here
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_APPLE")
|
||||
message("Detected Apple")
|
||||
endif()
|
||||
endif() # End optional WOLFSSL_CMAKE_SYSTEM_NAME
|
||||
|
||||
message(STATUS "CONFIG_TARGET_PLATFORM = ${CONFIG_TARGET_PLATFORM}")
|
||||
|
||||
# Check that there are not conflicting wolfSSL components
|
||||
# The ESP Registry Component will be in ./managed_components/wolfssl__wolfssl
|
||||
# The local component wolfSSL directory will be in ./components/wolfssl
|
||||
if( EXISTS "${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl" AND EXISTS "${CMAKE_HOME_DIRECTORY}/components/wolfssl" )
|
||||
# These exclude statements don't seem to be honored by the $ENV{IDF_PATH}/tools/cmake/project.cmake'
|
||||
# add_subdirectory("${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl" EXCLUDE_FROM_ALL)
|
||||
# add_subdirectory("${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl/include" EXCLUDE_FROM_ALL)
|
||||
# So we'll error out and let the user decide how to proceed:
|
||||
message(WARNING "\nFound wolfSSL components in\n"
|
||||
"./managed_components/wolfssl__wolfssl\n"
|
||||
"and\n"
|
||||
"./components/wolfssl\n"
|
||||
"in project directory: \n"
|
||||
"${CMAKE_HOME_DIRECTORY}")
|
||||
message(FATAL_ERROR "\nPlease use either the ESP Registry Managed Component or the wolfSSL component directory but not both.\n"
|
||||
"If removing the ./managed_components/wolfssl__wolfssl directory, remember to also remove "
|
||||
"or rename the idf_component.yml file typically found in ./main/")
|
||||
else()
|
||||
message(STATUS "No conflicting wolfSSL components found.")
|
||||
endif()
|
||||
|
||||
|
||||
# Don't include lwip requirement for benchmark and test apps.
|
||||
if( ("${CMAKE_PROJECT_NAME}" STREQUAL "wolfssl_benchmark") OR ("${CMAKE_PROJECT_NAME}" STREQUAL "wolfssl_test") )
|
||||
message(STATUS "Not including lwip for ${CMAKE_PROJECT_NAME}")
|
||||
else()
|
||||
# benchmark and test do not need wifi, everything else probably does:
|
||||
set(COMPONENT_REQUIRES lwip "${THIS_ESP_TLS}") # we typically don't need lwip directly in wolfssl component
|
||||
endif()
|
||||
|
||||
# find the user name to search for possible "wolfssl-username"
|
||||
message(STATUS "USERNAME = $ENV{USERNAME}")
|
||||
@ -51,6 +180,25 @@ else()
|
||||
string(REPLACE "\\" "/" THIS_IDF_PATH "$ENV{IDF_PATH}")
|
||||
endif()
|
||||
|
||||
# ENVIRONMENT_VAR_TO_MACRO
|
||||
# Check environment variable name EVARPARAM as [name]
|
||||
# If defined, and has a value of EVARVALUE as [value],
|
||||
# then assign a compiler definition "-D[name]=[value]"
|
||||
function(ENVIRONMENT_VAR_TO_MACRO EVARPARAM EVARVALUE)
|
||||
# If the EVARPARAM environment variable name is set to EVARVALUE,
|
||||
# set the compiler flag definition to enable CSV output.
|
||||
if ( "$ENV{${EVARPARAM}}" STREQUAL "${EVARVALUE}")
|
||||
message(STATUS "Appending compile definition: -D${EVARPARAM}=${EVARVALUE}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D${EVARPARAM}=${EVARVALUE}")
|
||||
else()
|
||||
if(DEFINED ENV{${EVARPARAM}})
|
||||
message(STATUS "Environment variable ${EVARPARAM} detected but set to $ENV{${EVARPARAM}}, not appending compile definition.")
|
||||
else()
|
||||
message(STATUS "Environment variable ${EVARPARAM} not detected, not appending compile definition.")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# COMPONENT_NAME = wolfssl
|
||||
# The component name is the directory name. "No feature to change this".
|
||||
# See https://github.com/espressif/esp-idf/issues/8978#issuecomment-1129892685
|
||||
@ -68,7 +216,8 @@ endif()
|
||||
# function: IS_WOLFSSL_SOURCE
|
||||
# parameter: DIRECTORY_PARAMETER - the directory to test
|
||||
# output: RESULT = contains contents of DIRECTORY_PARAMETER for wolfssl directory, otherwise blank.
|
||||
function(IS_WOLFSSL_SOURCE DIRECTORY_PARAMETER RESULT)
|
||||
function( IS_WOLFSSL_SOURCE DIRECTORY_PARAMETER
|
||||
RESULT )
|
||||
if (EXISTS "${DIRECTORY_PARAMETER}/wolfcrypt/src")
|
||||
set(${RESULT} "${DIRECTORY_PARAMETER}" PARENT_SCOPE)
|
||||
else()
|
||||
@ -76,27 +225,71 @@ function(IS_WOLFSSL_SOURCE DIRECTORY_PARAMETER RESULT)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# *********************************************************************************************
|
||||
# function: FIND_WOLFSSL_DIRECTORY
|
||||
# parameter: OUTPUT_FOUND_WOLFSSL_DIRECTORY contains root of source code, otherwise blank
|
||||
#
|
||||
# Example usage:
|
||||
# FIND_WOLFSSL_DIRECTORY(WOLFSSL_ROOT)
|
||||
# *********************************************************************************************
|
||||
function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
message(STATUS "Starting FIND_WOLFSSL_DIRECTORY")
|
||||
set(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}")
|
||||
if( "${CURRENT_SEARCH_DIR}" STREQUAL "" )
|
||||
message(STATUS "The WOLFSSL_ROOT environment variable is not set. Searching...")
|
||||
message(STATUS "Starting FIND_WOLFSSL_DIRECTORY: ${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
|
||||
if ( "${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}" STREQUAL "" )
|
||||
# The parameter is empty, so we certainly need to search.
|
||||
# First, see if there's an environment variable. This takes highest priority (unless already found as hard-coded, above)
|
||||
set(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}")
|
||||
if( "${CURRENT_SEARCH_DIR}" STREQUAL "" )
|
||||
message(STATUS "The WOLFSSL_ROOT environment variable is not set. Searching...")
|
||||
# Next, if not found, see if wolfSSL was selected for ESP-TLS Kconfig
|
||||
if(CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT)
|
||||
set(CURRENT_SEARCH_DIR ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT})
|
||||
get_filename_component(CURRENT_SEARCH_DIR "${CURRENT_SEARCH_DIR}" ABSOLUTE)
|
||||
message(STATUS "WOLFSSL_ROOT found in sdkconfig/KConfig: ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}")
|
||||
else()
|
||||
message(STATUS "wolfSSL not defined in [Component Config] [wolfssl]. Continuing search...")
|
||||
# If not specified as a search hint in OUTPUT_FOUND_WOLFSSL_DIRECTORY:
|
||||
# This wolfSSL component CMakeLists.txt may be found EITHER in:
|
||||
# 1) local project component
|
||||
# 2) ESP-IDF share components
|
||||
# We'll start in the CMAKE_CURRENT_SOURCE_DIR, typically [something]/projectname/components/wolfssl
|
||||
# That option might find wolfSSL source code as a copy in the component directory (e.g. Managed Components)
|
||||
# Unless cmake is in the ESP-IDF, in which case it is unlikely to find wolfSSL source in any parent.
|
||||
message(STATUS "CMAKE_CURRENT_SOURCE_DIR = ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
get_filename_component(CURRENT_SEARCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
|
||||
message(STATUS "CURRENT_SEARCH_DIR = ${CURRENT_SEARCH_DIR}")
|
||||
string(LENGTH ${CURRENT_SEARCH_DIR} CURRENT_SEARCH_DIR_LENGTH)
|
||||
endif() # CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT
|
||||
endif() # check environment var blank
|
||||
else()
|
||||
get_filename_component(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}" ABSOLUTE)
|
||||
message(STATUS "Parameter found for FIND_WOLFSSL_DIRECTORY")
|
||||
message(STATUS "Setting wolfSSL search directory to: ${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
set(CURRENT_SEARCH_DIR "${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
endif() # parameter empty
|
||||
|
||||
# Check to see if we found a path in environment or config settings, above.
|
||||
if( "${CURRENT_SEARCH_DIR}" STREQUAL "" )
|
||||
message(STATUS "Source for wolfSSL not specified in path nor config settings.")
|
||||
# We'll continue the search by recursing up the directory tree, below.
|
||||
else()
|
||||
# Setting found! Does it contain a valid path?
|
||||
string(REPLACE "\\" "/" CURRENT_SEARCH_DIR ${CURRENT_SEARCH_DIR})
|
||||
get_filename_component(CURRENT_SEARCH_DIR "${CURRENT_SEARCH_DIR}" ABSOLUTE)
|
||||
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR}" FOUND_WOLFSSL)
|
||||
if( FOUND_WOLFSSL )
|
||||
message(STATUS "Found WOLFSSL_ROOT via Environment Variable: ${CURRENT_SEARCH_DIR}")
|
||||
message(STATUS "Found wolfSSL source code via setting: ${CURRENT_SEARCH_DIR}")
|
||||
set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
|
||||
return()
|
||||
else()
|
||||
message(FATAL_ERROR "WOLFSSL_ROOT Environment Variable defined, but path not found:")
|
||||
message(STATUS "$ENV{WOLFSSL_ROOT}")
|
||||
if(WIN32)
|
||||
message(STATUS "When specifying a path for Windows, use forward slahes, or double backslashes.")
|
||||
endif()
|
||||
message(STATUS "CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT sdkconfig setting = ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}")
|
||||
message(STATUS "WOLFSSL_ROOT Variable defined, but source code not found: ${CURRENT_SEARCH_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# we'll start in the CMAKE_CURRENT_SOURCE_DIR, typically [something]/projectname/components/wolfssl
|
||||
message(STATUS "CMAKE_CURRENT_SOURCE_DIR = ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
get_filename_component(CURRENT_SEARCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
|
||||
@ -114,16 +307,47 @@ function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Maintain CURRENT_SEARCH_DIR, but check various suffixes with CURRENT_SEARCH_DIR_ALT
|
||||
if( THIS_USER )
|
||||
# Check for "wolfssl-[username]" subdirectory as we recurse up the directory tree
|
||||
set(CURRENT_SEARCH_DIR_ALT ${CURRENT_SEARCH_DIR}/wolfssl-${THIS_USER})
|
||||
message(STATUS "Looking in ${CURRENT_SEARCH_DIR}")
|
||||
message(STATUS "Looking in ${CURRENT_SEARCH_DIR_ALT}")
|
||||
|
||||
#if(EXISTS ${CURRENT_SEARCH_DIR_ALT} AND IS_DIRECTORY ${CURRENT_SEARCH_DIR_ALT} AND EXISTS "${CURRENT_SEARCH_DIR_ALT}/wolfcrypt/src")
|
||||
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR_ALT}" FOUND_WOLFSSL )
|
||||
if ( FOUND_WOLFSSL )
|
||||
message(STATUS "Found wolfssl in user-suffix CURRENT_SEARCH_DIR_ALT = ${CURRENT_SEARCH_DIR_ALT}")
|
||||
set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR_ALT} PARENT_SCOPE)
|
||||
message(STATUS "Found wolfssl in user-suffix CURRENT_SEARCH_DIR_ALT = ${CURRENT_SEARCH_DIR_ALT}")
|
||||
set(CURRENT_SEARCH_DIR "${CURRENT_SEARCH_DIR_ALT}")
|
||||
set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ( FOUND_WOLFSSL )
|
||||
# if we already found the source, skip attempt of "wolfssl-master"
|
||||
else()
|
||||
set(CURRENT_SEARCH_DIR_ALT ${CURRENT_SEARCH_DIR}/wolfssl-master)
|
||||
message(STATUS "Looking in ${CURRENT_SEARCH_DIR_ALT}")
|
||||
|
||||
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR_ALT}" FOUND_WOLFSSL )
|
||||
if ( FOUND_WOLFSSL )
|
||||
message(STATUS "Found wolfssl in master-suffix CURRENT_SEARCH_DIR_ALT = ${CURRENT_SEARCH_DIR_ALT}")
|
||||
set(CURRENT_SEARCH_DIR "${CURRENT_SEARCH_DIR_ALT}")
|
||||
set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ( FOUND_WOLFSSL )
|
||||
# if we already found the source, skip attempt of "wolfssl"
|
||||
else()
|
||||
set(CURRENT_SEARCH_DIR_ALT ${CURRENT_SEARCH_DIR}/wolfssl)
|
||||
message(STATUS "Looking in ${CURRENT_SEARCH_DIR_ALT}")
|
||||
|
||||
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR_ALT}" FOUND_WOLFSSL )
|
||||
if ( FOUND_WOLFSSL )
|
||||
message(STATUS "Found wolfssl in CURRENT_SEARCH_DIR_ALT = ${CURRENT_SEARCH_DIR_ALT}")
|
||||
set(CURRENT_SEARCH_DIR "${CURRENT_SEARCH_DIR_ALT}")
|
||||
set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
@ -143,7 +367,8 @@ function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
get_filename_component(CURRENT_SEARCH_DIR "${CURRENT_SEARCH_DIR}" DIRECTORY)
|
||||
message(STATUS "Next CURRENT_SEARCH_DIR = ${CURRENT_SEARCH_DIR}")
|
||||
if( "${PRIOR_SEARCH_DIR}" STREQUAL "${CURRENT_SEARCH_DIR}" )
|
||||
# when the search directory is empty, we'll give up
|
||||
# When the parent is current directory, cannot go any further. We didn't find wolfssl.
|
||||
# When the search directory is empty, we'll give up.
|
||||
set(CURRENT_SEARCH_DIR "")
|
||||
endif()
|
||||
endwhile()
|
||||
@ -154,17 +379,58 @@ endfunction()
|
||||
|
||||
|
||||
# Example usage:
|
||||
#
|
||||
# Simply find the WOLFSSL_DIRECTORY by searching parent directories:
|
||||
# FIND_WOLFSSL_DIRECTORY(WOLFSSL_ROOT)
|
||||
#
|
||||
|
||||
message(STATUS "CONFIG_TARGET_PLATFORM = ${CONFIG_TARGET_PLATFORM}")
|
||||
|
||||
# Check for environment variable that may be assigned to macros
|
||||
ENVIRONMENT_VAR_TO_MACRO("GENERATE_MACHINE_PARSEABLE_REPORT" "1")
|
||||
ENVIRONMENT_VAR_TO_MACRO("WOLFSSL_BENCHMARK_FIXED_CSV" "1")
|
||||
|
||||
# Optional variable inspection
|
||||
if (0)
|
||||
get_cmake_property(_variableNames VARIABLES)
|
||||
list (SORT _variableNames)
|
||||
message(STATUS "")
|
||||
message(STATUS "ALL VARIABLES BEGIN")
|
||||
message(STATUS "")
|
||||
foreach (_variableName ${_variableNames})
|
||||
message(STATUS "${_variableName}=${${_variableName}}")
|
||||
endforeach()
|
||||
message(STATUS "")
|
||||
message(STATUS "ALL VARIABLES END")
|
||||
message(STATUS "")
|
||||
endif()
|
||||
|
||||
if ( ("${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266") OR ("${IDF_TARGET}" STREQUAL "esp8266") )
|
||||
# There's no esp_timer, no driver components for the ESP8266
|
||||
message(STATUS "Early expansion EXCLUDES esp_timer for esp8266: ${THIS_INCLUDE_TIMER}")
|
||||
message(STATUS "Early expansion EXCLUDES driver for esp8266: ${THIS_INCLUDE_DRIVER}")
|
||||
set(THIS_INCLUDE_TIMER "")
|
||||
set(THIS_INCLUDE_DRIVER "")
|
||||
set(THIS_ESP_TLS "")
|
||||
else()
|
||||
message(STATUS "Early expansion includes esp_timer: ${THIS_INCLUDE_TIMER}")
|
||||
message(STATUS "Early expansion includes driver: ${THIS_INCLUDE_DRIVER}")
|
||||
set(THIS_INCLUDE_TIMER "esp_timer")
|
||||
set(THIS_INCLUDE_DRIVER "driver")
|
||||
set(THIS_ESP_TLS "esp-tls")
|
||||
# Let the app know that we've included the esp-tls component requirement.
|
||||
# This is critical for use the the esp-tls component. See wolfssl esp_crt_bundle.c file.
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_REQUIRED_ESP_TLS=1")
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_EARLY_EXPANSION)
|
||||
message(STATUS "wolfssl component CMAKE_BUILD_EARLY_EXPANSION:")
|
||||
idf_component_register(
|
||||
REQUIRES "${COMPONENT_REQUIRES}"
|
||||
PRIV_REQUIRES # esp_hw_support
|
||||
# esp_timer
|
||||
# driver # this will typically only be needed for wolfSSL benchmark
|
||||
"${THIS_ESP_TLS}"
|
||||
"${THIS_INCLUDE_TIMER}"
|
||||
"${THIS_INCLUDE_DRIVER}" # this will typically only be needed for wolfSSL benchmark
|
||||
)
|
||||
|
||||
else()
|
||||
@ -173,48 +439,99 @@ else()
|
||||
message(STATUS "wolfssl component config:")
|
||||
message(STATUS "************************************************************************************************")
|
||||
|
||||
if ( "${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266")
|
||||
# There's no esp_timer, no driver components for the ESP8266
|
||||
set(THIS_INCLUDE_TIMER "")
|
||||
set(THIS_INCLUDE_DRIVER "")
|
||||
else()
|
||||
set(THIS_INCLUDE_TIMER "esp_timer")
|
||||
set(THIS_INCLUDE_DRIVER "driver")
|
||||
endif()
|
||||
|
||||
# search for wolfSSL
|
||||
FIND_WOLFSSL_DIRECTORY(WOLFSSL_ROOT)
|
||||
if(WOLFSSL_ROOT)
|
||||
message(STATUS "NEW Found wolfssl directory at: ${WOLFSSL_ROOT}")
|
||||
IS_WOLFSSL_SOURCE("${WOLFSSL_ROOT}" FOUND_WOLFSSL)
|
||||
if(FOUND_WOLFSSL)
|
||||
message(STATUS "Found WOLFSSL_ROOT via CMake specification.")
|
||||
else()
|
||||
# WOLFSSL_ROOT Path specified in CMakeLists.txt is not a valid path
|
||||
message(FATAL_ERROR "WOLFSSL_ROOT CMake Variable defined, but path not found: ${WOLFSSL_ROOT}\n"
|
||||
"Try correcting WOLFSSL_ROOT in your project CMakeFile.txt or setting environment variable.")
|
||||
# Abort CMake after fatal error.
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "NEW wolfssl directory not found.")
|
||||
message(STATUS "Source code for wolfSSL still not found.")
|
||||
message(STATUS "Searching from project home: ${CMAKE_HOME_DIRECTORY} ...")
|
||||
set(WOLFSSL_ROOT "${CMAKE_HOME_DIRECTORY}")
|
||||
FIND_WOLFSSL_DIRECTORY(WOLFSSL_ROOT)
|
||||
endif()
|
||||
|
||||
|
||||
if(WOLFSSL_ROOT)
|
||||
message(STATUS "Confirmed wolfssl directory at: ${WOLFSSL_ROOT}")
|
||||
else()
|
||||
# Try to allow a more intuitive error that the source code was not found in cmake:
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_WARNING_SOURCE_NOT_FOUND")
|
||||
|
||||
message(STATUS "Failed: wolfssl source code directory not found.")
|
||||
# Abort. We need wolfssl _somewhere_.
|
||||
message(FATAL_ERROR "Could not find wolfssl in ${WOLFSSL_ROOT}.\n"
|
||||
"Try setting WOLFSSL_ROOT environment variable or git clone.")
|
||||
message(STATUS "")
|
||||
message(STATUS "")
|
||||
message(STATUS "Could not find wolfssl in any parent directory named wolfssl-${THIS_USER}, wolfssl-master, or wolfssl.\n"
|
||||
"Try setting WOLFSSL_ROOT environment variable, cmake variable in project, copy source, or use managed components.")
|
||||
message(STATUS "")
|
||||
message(STATUS "")
|
||||
# Abort CMake after fatal error. (or not?)
|
||||
endif()
|
||||
|
||||
set(INCLUDE_PATH ${WOLFSSL_ROOT})
|
||||
|
||||
set(WOLFSSL_EXTRA_PROJECT_DIR "${WOLFSSL_ROOT}/src/")
|
||||
|
||||
if( ${CMAKE_PROJECT_NAME} STREQUAL "wolfssl_benchmark" )
|
||||
set(WOLFSSL_EXTRA_PROJECT_DIR "${WOLFSSL_ROOT}/wolfcrypt/benchmark")
|
||||
endif()
|
||||
|
||||
if( ${CMAKE_PROJECT_NAME} STREQUAL "wolfssl_test" )
|
||||
set(WOLFSSL_EXTRA_PROJECT_DIR "${WOLFSSL_ROOT}/wolfcrypt/test")
|
||||
# During regression tests, optionally copy source locally and use: set(USE_LOCAL_TEST_BENCH 1)
|
||||
set(USE_LOCAL_TEST_BENCH 0)
|
||||
if(NOT USE_LOCAL_TEST_BENCH)
|
||||
if( "${CMAKE_PROJECT_NAME}" STREQUAL "hello-world" )
|
||||
message(STATUS "Include ${WOLFSSL_ROOT}/wolfcrypt/benchmark")
|
||||
set(WOLFSSL_EXTRA_PROJECT_DIR "${WOLFSSL_ROOT}/wolfcrypt/benchmark")
|
||||
endif()
|
||||
|
||||
if( "${CMAKE_PROJECT_NAME}" STREQUAL "wolfssl_benchmark" )
|
||||
message(STATUS "Include ${WOLFSSL_ROOT}/wolfcrypt/benchmark")
|
||||
set(WOLFSSL_EXTRA_PROJECT_DIR "${WOLFSSL_ROOT}/wolfcrypt/benchmark")
|
||||
endif()
|
||||
|
||||
if( "${CMAKE_PROJECT_NAME}" STREQUAL "wolfssl_test" )
|
||||
message(STATUS "Include ${WOLFSSL_ROOT}/wolfcrypt/test")
|
||||
set(WOLFSSL_EXTRA_PROJECT_DIR "${WOLFSSL_ROOT}/wolfcrypt/test")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "WOLFSSL_EXTRA_PROJECT_DIR = ${WOLFSSL_EXTRA_PROJECT_DIR}")
|
||||
set(COMPONENT_SRCDIRS "\"${WOLFSSL_ROOT}/src/\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/port/Espressif\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/port/Espressif/esp_crt_bundle\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/port/atmel\""
|
||||
"\"${WOLFSSL_EXTRA_PROJECT_DIR}\""
|
||||
) # COMPONENT_SRCDIRS
|
||||
|
||||
message(STATUS "This COMPONENT_SRCDIRS = ${COMPONENT_SRCDIRS}")
|
||||
|
||||
# wolfSSL user_settings.h may be in the local project.
|
||||
# TODO check if exists and possibly set to ESP-IDF
|
||||
set(WOLFSSL_PROJECT_DIR "${CMAKE_HOME_DIRECTORY}/components/wolfssl")
|
||||
add_definitions(-DWOLFSSL_USER_SETTINGS_DIR="${WOLFSSL_PROJECT_DIR}/include/user_settings.h")
|
||||
|
||||
|
||||
string(REPLACE "/" "//" STR_WOLFSSL_PROJECT_DIR "${WOLFSSL_PROJECT_DIR}")
|
||||
add_definitions(-DWOLFSSL_USER_SETTINGS_DIR="${STR_WOLFSSL_PROJECT_DIR}/include/user_settings.h")
|
||||
message(STATUS "Added definition for user_settings.h: -DWOLFSSL_USER_SETTINGS_DIR=\"${STR_WOLFSSL_PROJECT_DIR}//include//user_settings.h\"")
|
||||
# Espressif may take several passes through this makefile. Check to see if we found IDF
|
||||
string(COMPARE EQUAL "${PROJECT_SOURCE_DIR}" "" WOLFSSL_FOUND_IDF)
|
||||
|
||||
# get a list of all wolfcrypt assembly files; we'll exclude them as they don't target Xtensa
|
||||
file(GLOB EXCLUDE_ASM *.S)
|
||||
file(GLOB_RECURSE EXCLUDE_ASM ${CMAKE_SOURCE_DIR} "${WOLFSSL_ROOT}/wolfcrypt/src/*.S")
|
||||
file(GLOB EXCLUDE_ASM ${CMAKE_SOURCE_DIR} "${WOLFSSL_ROOT}/wolfcrypt/src/*.S")
|
||||
|
||||
message(STATUS "IDF_PATH = $ENV{IDF_PATH}")
|
||||
message(STATUS "PROJECT_SOURCE_DIR = ${PROJECT_SOURCE_DIR}")
|
||||
@ -237,11 +554,12 @@ else()
|
||||
message(STATUS "Remove either the local project component: ${WOLFSSL_PROJECT_DIR} ")
|
||||
message(STATUS "or the Espressif shared component installed at: $ENV{IDF_PATH}/components/wolfssl/ ")
|
||||
message(STATUS "")
|
||||
message(FATAL_ERROR "Please use wolfSSL in either local project or Espressif components, but not both.")
|
||||
message(STATUS "")
|
||||
message(STATUS "**************************************************************************************")
|
||||
message(STATUS "")
|
||||
|
||||
message(STATUS "Please use wolfSSL in either local project or Espressif components, but not both.")
|
||||
|
||||
# Optional: if you change the above FATAL_ERROR to STATUS you can warn at runtime with this macro definition:
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_MULTI_INSTALL_WARNING")
|
||||
|
||||
@ -291,6 +609,7 @@ else()
|
||||
message(FATAL_ERROR "Found stray wolfSSL user_settings.h in "
|
||||
"${WOLFSSL_ROOT}/include/user_settings.h "
|
||||
" (please move it to ${WOLFSSL_PROJECT_DIR}/include/user_settings.h )")
|
||||
# Abort CMake after fatal error.
|
||||
else()
|
||||
# we won't overwrite an existing user settings file, just note that we already have one:
|
||||
if( EXISTS "${WOLFSSL_PROJECT_DIR}/include/user_settings.h" )
|
||||
@ -347,7 +666,9 @@ else()
|
||||
# depending on the environment, we may need to swap backslashes with forward slashes
|
||||
string(REPLACE "\\" "/" RTOS_IDF_PATH "$ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos")
|
||||
|
||||
string(REPLACE "\\" "/" WOLFSSL_ROOT ${WOLFSSL_ROOT})
|
||||
if(WOLFSSL_ROOT)
|
||||
string(REPLACE "\\" "/" WOLFSSL_ROOT ${WOLFSSL_ROOT})
|
||||
endif()
|
||||
|
||||
if(IS_DIRECTORY "${RTOS_IDF_PATH}")
|
||||
message(STATUS "Found current RTOS path: ${RTOS_IDF_PATH}")
|
||||
@ -360,13 +681,14 @@ else()
|
||||
message(STATUS "Could not find RTOS path")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
message(STATUS "THIS_IDF_PATH = $THIS_IDF_PATH")
|
||||
# wolfSSL-specific include directories
|
||||
set(COMPONENT_ADD_INCLUDEDIRS
|
||||
"./include" # this is the location of wolfssl user_settings.h
|
||||
"./include" # this is the location of local project wolfssl user_settings.h
|
||||
"\"${WOLFSSL_ROOT}/\""
|
||||
"\"${WOLFSSL_ROOT}/wolfssl/\""
|
||||
"\"${WOLFSSL_ROOT}/wolfssl/wolfcrypt/\""
|
||||
"\"${WOLFSSL_ROOT}/wolfssl/wolfcrypt/port/Espressif\""
|
||||
"\"${RTOS_IDF_PATH}/\""
|
||||
# wolfSSL release after v5.7 includes WiFi, time, and mem/debug helpers
|
||||
"${THIS_IDF_PATH}/components/esp_event/include"
|
||||
@ -374,7 +696,7 @@ else()
|
||||
"${THIS_IDF_PATH}/components/esp_wifi/include"
|
||||
)
|
||||
|
||||
|
||||
# Optionally include cryptoauthlib if present
|
||||
if(IS_DIRECTORY ${IDF_PATH}/components/cryptoauthlib)
|
||||
list(APPEND COMPONENT_ADD_INCLUDEDIRS "../cryptoauthlib/lib")
|
||||
endif()
|
||||
@ -383,7 +705,7 @@ else()
|
||||
list(APPEND COMPONENT_ADD_INCLUDEDIRS "\"${WOLFSSL_ROOT}/wolfssl/wolfcrypt/\"")
|
||||
|
||||
|
||||
|
||||
# Some files are known to be included elsewhere, or not used for Espressif
|
||||
set(COMPONENT_SRCEXCLUDE
|
||||
"\"${WOLFSSL_ROOT}/src/bio.c\""
|
||||
"\"${WOLFSSL_ROOT}/src/conf.c\""
|
||||
@ -399,6 +721,8 @@ else()
|
||||
"\"${WOLFSSL_ROOT}/src/ssl_sess.c\"" # included by ssl.c
|
||||
"\"${WOLFSSL_ROOT}/src/x509.c\""
|
||||
"\"${WOLFSSL_ROOT}/src/x509_str.c\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/ext_kyber.c\"" # external non-wolfssl Kyber disabled by default
|
||||
"\"${WOLFSSL_ROOT}/wolfssl/wolfcrypt/ext_kyber.h\"" # external non-wolfssl Kyber disabled by default
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/evp.c\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/misc.c\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/sp_sm2_arm32.c\""
|
||||
@ -409,6 +733,7 @@ else()
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/sp_sm2_cortexm.c\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/sp_sm2_x86_64.c\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/sp_sm2_x86_64_asm.S\""
|
||||
"\"${WOLFSSL_ROOT}/examples\"" # Examples are distributed in Managed Components, but not part of a project.
|
||||
"\"${EXCLUDE_ASM}\""
|
||||
)
|
||||
|
||||
@ -430,22 +755,144 @@ else()
|
||||
# see https://docs.espressif.com/projects/esp-idf/en/stable/esp32/migration-guides/release-5.x/build-system.html?highlight=space%20path
|
||||
#
|
||||
set(EXTRA_COMPONENT_DIRS "${COMPONENT_SRCDIRS}")
|
||||
idf_component_register(
|
||||
SRC_DIRS "${COMPONENT_SRCDIRS}"
|
||||
INCLUDE_DIRS "${COMPONENT_ADD_INCLUDEDIRS}"
|
||||
REQUIRES "${COMPONENT_REQUIRES}"
|
||||
EXCLUDE_SRCS "${COMPONENT_SRCEXCLUDE}"
|
||||
PRIV_REQUIRES esp_timer driver # this will typically only be needed for wolfSSL benchmark
|
||||
)
|
||||
# some optional diagnostics
|
||||
if (1)
|
||||
|
||||
if(WOLFSSL_ROOT)
|
||||
# Only register the component if we found wolfSSL source.
|
||||
# This is important to allow Cmake to finish to completion, otherwise the UI
|
||||
# may not be able to display the Kconfig settings to fix a bad or missing source.
|
||||
idf_component_register(
|
||||
SRC_DIRS "${COMPONENT_SRCDIRS}"
|
||||
INCLUDE_DIRS "${COMPONENT_ADD_INCLUDEDIRS}"
|
||||
REQUIRES "${COMPONENT_REQUIRES}"
|
||||
EXCLUDE_SRCS "${COMPONENT_SRCEXCLUDE}"
|
||||
PRIV_REQUIRES
|
||||
"${THIS_ESP_TLS}"
|
||||
"${THIS_INCLUDE_TIMER}"
|
||||
"${THIS_INCLUDE_DRIVER}" # this will typically only be needed for wolfSSL benchmark
|
||||
)
|
||||
else()
|
||||
# Register the component simply to allow CMake to complete, but there's no wolfSSL source.
|
||||
# Expect many other errors, but the project should at least be loadable and UI can edit Kconfig settings.
|
||||
idf_component_register()
|
||||
message(STATUS "Warning: wolfSSL component not registered as no source code found (WOLFSSL_ROOT is blank)")
|
||||
endif()
|
||||
|
||||
# function(WOLFSSL_INIT_CERT_BUNDLE)
|
||||
if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
AND NOT CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
|
||||
AND NOT ("${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266")
|
||||
)
|
||||
if (CMAKE_BUILD_EARLY_EXPANSION)
|
||||
message(ERROR "Bundle Cert initialization must occur during CMAKE_BUILD_EARLY_EXPANSION")
|
||||
endif()
|
||||
# reminder: we need a value for wolfSSL root first!
|
||||
if( "${WOLFSSL_ROOT}" STREQUAL "" )
|
||||
message(ERROR "Certificate bundles need a value for WOLFSSL_ROOT")
|
||||
endif()
|
||||
set(WOLFSSL_ESP_CRT_BUNDLE_DIR ${WOLFSSL_ROOT}/wolfcrypt/src/port/Espressif/esp_crt_bundle)
|
||||
message(STATUS "WOLFSSL_ESP_CRT_BUNDLE_DIR=${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
if(EXISTS "${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
set(bundle_name "x509_crt_bundle_wolfssl")
|
||||
|
||||
# For now the certs are in the same directory
|
||||
set(DEFAULT_CRT_DIR "${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
|
||||
# Generate custom certificate bundle using the generate_cert_bundle utility
|
||||
set(GENERATE_CERT_BUNDLEPY ${python} ${WOLFSSL_ESP_CRT_BUNDLE_DIR}/gen_crt_bundle.py)
|
||||
|
||||
if(CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_FULL)
|
||||
list(APPEND crt_paths ${DEFAULT_CRT_DIR}/cacrt_all.pem ${DEFAULT_CRT_DIR}/cacrt_local.pem)
|
||||
elseif(CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_CMN)
|
||||
list(APPEND crt_paths ${DEFAULT_CRT_DIR}/cacrt_all.pem ${DEFAULT_CRT_DIR}/cacrt_local.pem)
|
||||
list(APPEND args --filter ${DEFAULT_CRT_DIR}/cmn_crt_authorities.csv)
|
||||
endif()
|
||||
|
||||
# Add deprecated root certs if enabled. This config is not visible if the default cert
|
||||
# bundle is not selected
|
||||
if(CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEPRECATED_LIST)
|
||||
list(APPEND crt_paths ${DEFAULT_CRT_DIR}/cacrt_deprecated.pem)
|
||||
endif()
|
||||
|
||||
if(CONFIG_WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE)
|
||||
get_filename_component(custom_bundle_path
|
||||
${CONFIG_WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE_PATH} ABSOLUTE BASE_DIR "${project_dir}")
|
||||
list(APPEND crt_paths ${custom_bundle_path})
|
||||
message(STATUS "Using a custom wolfSSL bundle path: ${custom_bundle_path}")
|
||||
else()
|
||||
message(STATUS "Not using a custom wolfSSL bundle path.")
|
||||
endif()
|
||||
list(APPEND args --input ${crt_paths} -q)
|
||||
|
||||
message(STATUS "CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
|
||||
get_filename_component(crt_bundle
|
||||
${bundle_name}
|
||||
ABSOLUTE BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
message(STATUS "Setting up bundle generate: ${GENERATE_CERT_BUNDLEPY} ${args}")
|
||||
message(STATUS "Depends on custom bundle path: ${custom_bundle_path}")
|
||||
message(STATUS "crt_bundle ${crt_bundle}")
|
||||
message(STATUS "COMPONENT_LIB ${COMPONENT_LIB}")
|
||||
message(STATUS "GENERATE_CERT_BUNDLEPY ${GENERATE_CERT_BUNDLEPY}")
|
||||
message(STATUS "args ${args}")
|
||||
message(STATUS "cert_bundle ${cert_bundle}")
|
||||
|
||||
# Generate bundle according to config
|
||||
# File is generated at build time, not cmake load
|
||||
add_custom_command(OUTPUT ${crt_bundle}
|
||||
COMMAND ${GENERATE_CERT_BUNDLEPY} ARGS ${args}
|
||||
DEPENDS ${custom_bundle_path}
|
||||
VERBATIM)
|
||||
|
||||
if(EXISTS "${crt_bundle}")
|
||||
message(STATUS "Bundle file exists from prior build: ${crt_bundle}")
|
||||
else()
|
||||
message(STATUS "Bundle file expected during next build: ${crt_bundle}")
|
||||
endif()
|
||||
|
||||
# Reminder the file is generated at build time, not cmake load time.
|
||||
message(STATUS "wolfSSL Cert Bundle File to be created at build time in: ${crt_bundle}")
|
||||
|
||||
add_custom_target(custom_wolfssl_bundle DEPENDS ${cert_bundle})
|
||||
|
||||
# the wolfSSL crtificate bundle is baked into wolfSSL
|
||||
add_dependencies(${COMPONENT_LIB} custom_wolfssl_bundle)
|
||||
|
||||
# COMPONENT_LIB may vary: __idf_wolfssl, __idf_esp_wolfssl, etc
|
||||
# target_add_binary_data(__idf_wolfssl ${crt_bundle} BINARY)
|
||||
target_add_binary_data(${COMPONENT_LIB} ${crt_bundle} BINARY)
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
APPEND PROPERTY ADDITIONAL_CLEAN_FILES
|
||||
"${crt_bundle}")
|
||||
else()
|
||||
message(STATUS "WARNING: CONFIG_WOLFSSL_CERTIFICATE_BUNDLE enabled but directory not found: ${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# endfunction() # WOLFSSL_INIT_CERT_BUNDLE
|
||||
|
||||
# Some optional diagnostics. Verbose ones are truncated.
|
||||
if (VERBOSE_COMPONENT_MESSAGES)
|
||||
get_cmake_property(_variableNames VARIABLES)
|
||||
list (SORT _variableNames)
|
||||
message(STATUS "")
|
||||
message(STATUS "ALL VARIABLES BEGIN")
|
||||
message(STATUS "")
|
||||
foreach (_variableName ${_variableNames})
|
||||
message(STATUS "${_variableName}=${${_variableName}}")
|
||||
if ( ("${_variableName}" STREQUAL "bootloader_binary_files")
|
||||
OR ("${_variableName}" STREQUAL "Component paths")
|
||||
OR ("${_variableName}" STREQUAL "component_targets")
|
||||
OR ("${_variableName}" STREQUAL "__COMPONENT_TARGETS")
|
||||
OR ("${_variableName}" STREQUAL "CONFIGS_LIST")
|
||||
OR ("${_variableName}" STREQUAL "__CONFIG_VARIABLES")
|
||||
OR ("${_variableName}" STREQUAL "val")
|
||||
OR ("${_variableName}" MATCHES "^__idf_")
|
||||
)
|
||||
# Truncate the displayed value:
|
||||
string(SUBSTRING "${${_variableName}}" 0 70 truncatedValue)
|
||||
message(STATUS "${_variableName} = ${truncatedValue} ... (truncated)")
|
||||
else()
|
||||
message(STATUS "${_variableName}=${${_variableName}}")
|
||||
endif()
|
||||
endforeach()
|
||||
message(STATUS "")
|
||||
message(STATUS "ALL VARIABLES END")
|
||||
@ -453,6 +900,12 @@ else()
|
||||
endif()
|
||||
|
||||
# target_sources(wolfssl PRIVATE "\"${WOLFSSL_ROOT}/wolfssl/\"" "\"${WOLFSSL_ROOT}/wolfssl/wolfcrypt\"")
|
||||
message(STATUS "DETECTED_PROJECT_NAME=${CMAKE_PROJECT_NAME}")
|
||||
message(STATUS "COMPONENT_TARGET=${COMPONENT_TARGET}")
|
||||
target_compile_definitions(${COMPONENT_TARGET} PRIVATE DETECTED_PROJECT_NAME="${CMAKE_PROJECT_NAME}")
|
||||
if( "${CMAKE_PROJECT_NAME}" STREQUAL "esp_http_client_example" )
|
||||
target_compile_definitions(${COMPONENT_TARGET} PRIVATE APP_ESP_HTTP_CLIENT_EXAMPLE="y")
|
||||
endif()
|
||||
|
||||
endif() # CMAKE_BUILD_EARLY_EXPANSION
|
||||
|
||||
@ -508,31 +961,80 @@ endfunction() # LIBWOLFSSL_SAVE_INFO
|
||||
|
||||
# create some programmatic #define values that will be used by ShowExtendedSystemInfo().
|
||||
# see wolfcrypt\src\port\Espressif\esp32_utl.c
|
||||
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
|
||||
if(NOT CMAKE_BUILD_EARLY_EXPANSION AND WOLFSSL_ROOT)
|
||||
set (git_cmd "git")
|
||||
message(STATUS "Adding macro definitions:")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_ORIGIN: git config --get remote.origin.url
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "config" "--get" "remote.origin.url" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "config" "--get" "remote.origin.url"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_ORIGIN "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_BRANCH: git rev-parse --abbrev-ref HEAD
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "--abbrev-ref" "HEAD" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "--abbrev-ref" "HEAD"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_BRANCH "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_HASH: git rev-parse HEAD
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "HEAD" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "HEAD"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_HASH "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_SHORT_HASH: git rev-parse --short HEAD
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "--short" "HEAD" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "--short" "HEAD"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_SHORT_HASH "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_HASH_DATE git show --no-patch --no-notes --pretty=\'\%cd\'
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "show" "--no-patch" "--no-notes" "--pretty=\'\%cd\'" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd}
|
||||
"show" "--no-patch" "--no-notes" "--pretty=\'\%cd\'"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_HASH_DATE "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
message(STATUS "************************************************************************************************")
|
||||
message(STATUS "wolfssl component config complete!")
|
||||
message(STATUS "************************************************************************************************")
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_WOLFSSL_ROOT "${WOLFSSL_ROOT}" "${TMP_RES}")
|
||||
|
||||
endif()
|
||||
|
||||
# Ensure flag "-DWOLFSSL_ESPIDF" is already in CMAKE_C_FLAGS if not yet found from project
|
||||
string(FIND "${CMAKE_C_FLAGS}" "-DWOLFSSL_ESPIDF" FLAG_ALRREADY_FOUND_WOLFSSL_ESPIDF)
|
||||
|
||||
if(FLAG_ALRREADY_FOUND_WOLFSSL_ESPIDF EQUAL -1)
|
||||
# Flag not found, append it
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_ESPIDF")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
endif()
|
||||
|
||||
if(WOLFSSL_ROOT)
|
||||
message(STATUS "Using wolfSSL in ${WOLFSSL_ROOT}")
|
||||
|
||||
# PlatformIO does not process script from from the Espressif cmake process.
|
||||
# We need to know where wolfSSL source code was found, so save it in the
|
||||
# PIO_WOLFSSL_ROOT environment variable to later be read by extra_script.py
|
||||
|
||||
set(ENV{PIO_WOLFSSL_ROOT} "${WOLFSSL_ROOT}")
|
||||
message(STATUS "PIO_WOLFSSL_ROOT = $ENV{PIO_WOLFSSL_ROOT}")
|
||||
message(STATUS "PLATFORMIO_BUILD_DIR = $ENV{PLATFORMIO_BUILD_DIR}")
|
||||
# See esp-tls Kconfig; menu "ESP-TLS", ESP_TLS_LIBRARY_CHOOSE
|
||||
if(CONFIG_ESP_TLS_USING_WOLFSSL)
|
||||
if ( ("${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266") OR ("${IDF_TARGET}" STREQUAL "esp8266") )
|
||||
message(STATUS "This version of wolfSSL is not supported on the ESP8266 esp-tls at this time. Check ESP-TLS config")
|
||||
else()
|
||||
message(STATUS "wolfSSL will be used for ESP-TLS")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "WARNING: wolfSSL NOT selected for ESP-TLS. Features and performance will be limited.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "")
|
||||
message(STATUS "Consider setting WOLFSSL_ROOT environment variable, use Kconfig setting, or set manually in this cmake file, above.")
|
||||
message(STATUS "")
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
message(STATUS "ERROR: Could not find wolfSSL Source Code")
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
endif()
|
||||
|
||||
message(STATUS "************************************************************************************************")
|
||||
message(STATUS "wolfSSL component config complete!")
|
||||
message(STATUS "************************************************************************************************")
|
||||
|
@ -0,0 +1,523 @@
|
||||
# Kconfig template
|
||||
#
|
||||
# Copyright (C) 2006-2024 wolfSSL Inc. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
# Kconfig File Version 5.7.2.001 for esp-idf integration
|
||||
|
||||
# Kconfig Format Rules
|
||||
#
|
||||
# See:
|
||||
# https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig.html
|
||||
#
|
||||
# Format rules for Kconfig files are as follows:
|
||||
#
|
||||
# Option names in any menus should have consistent prefixes. The prefix
|
||||
# currently should have at least 3 characters.
|
||||
#
|
||||
# The unit of indentation should be 4 spaces. All sub-items belonging to a
|
||||
# parent item are indented by one level deeper. For example, menu is indented
|
||||
# by 0 spaces, config menu by 4 spaces, help in config by 8 spaces, and the
|
||||
# text under help by 12 spaces.
|
||||
#
|
||||
# No trailing spaces are allowed at the end of the lines.
|
||||
#
|
||||
# The maximum length of options is NOT 50 characters as documented.
|
||||
# kconfcheck will complain that options should be 40 at most.
|
||||
#
|
||||
# Fix option lengths first. Superflous errors on other lines may occur.
|
||||
#
|
||||
# The maximum length of lines is 120 characters.
|
||||
#
|
||||
# python -m kconfcheck <path_to_kconfig_file>
|
||||
#
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# Begin main wolfSSL configuration menu
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# See ESP-IDF esp-tls component for config TLS_STACK_WOLFSSL
|
||||
|
||||
menu "wolfSSL"
|
||||
|
||||
menu "Hardening"
|
||||
config ESP_WOLFSSL_WC_NO_HARDEN
|
||||
bool "Disable wolfSSL hardening"
|
||||
default n
|
||||
help
|
||||
Sets WC_NO_HARDEN
|
||||
|
||||
config ESP_WOLFSSL_TFM_TIMING_RESISTANT
|
||||
bool "Enable TFM Timing Resistant Code"
|
||||
default n
|
||||
help
|
||||
Sets TFM_TIMING_RESISTANT.
|
||||
|
||||
endmenu # Hardening
|
||||
|
||||
config ESP_WOLFSSL_ENABLE_BENCHMARK
|
||||
bool "Enable wolfSSL Benchmark Library"
|
||||
default n
|
||||
help
|
||||
Enables wolfcrypt/benchmark/benchmark.c code for benchmark metrics. Disables NO_CRYPT_BENCHMARK.
|
||||
|
||||
|
||||
menu "Benchmark Debug"
|
||||
config ESP_DEBUG_WOLFSSL_BENCHMARK_TIMING
|
||||
bool "Enable benchmark timing debug"
|
||||
depends on ESP_WOLFSSL_ENABLE_BENCHMARK
|
||||
default n
|
||||
help
|
||||
Enable wolfssl debug for benchmark metric timing (CPU Cycles, RTOS ticks, etc).
|
||||
|
||||
config ESP_WOLFSSL_BENCHMARK_TIMER_DEBUG
|
||||
bool "Enable benchmark timer debug"
|
||||
depends on ESP_WOLFSSL_ENABLE_BENCHMARK
|
||||
default n
|
||||
help
|
||||
Turn on timer debugging (used when CPU cycles not available)
|
||||
|
||||
endmenu # Benchmark Debug
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
# wolfCrypt Test
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
config ESP_WOLFSSL_ENABLE_TEST
|
||||
bool "Enable wolfCrypt Test Library"
|
||||
default n
|
||||
help
|
||||
Enables wolfcrypt/test/test.c code for testing. Disables NO_CRYPT_TEST.
|
||||
|
||||
menu "wolfCrypt tests"
|
||||
config WOLFSSL_HAVE_WOLFCRYPT_TEST_OPTIONS
|
||||
bool "Enable wolfCrypt Test Options"
|
||||
depends on ESP_WOLFSSL_ENABLE_TEST
|
||||
default n
|
||||
help
|
||||
Enables HAVE_WOLFCRYPT_TEST_OPTIONS
|
||||
|
||||
config TEST_ESPIDF_ALL_WOLFSSL
|
||||
bool "Enable all features to use in tests"
|
||||
depends on ESP_WOLFSSL_ENABLE_TEST
|
||||
default n
|
||||
help
|
||||
Enables TEST_ESPIDF_ALL_WOLFSSL
|
||||
|
||||
endmenu # wolfCrypt tests
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
# Apple HomeKit Options
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "Apple HomeKit"
|
||||
config WOLFSSL_APPLE_HOMEKIT
|
||||
bool "Enable Apple HomeKit options"
|
||||
default n
|
||||
help
|
||||
Enables FP_MAX_BITS (8192 * 2), SRP, ChaCha, Poly1305, Base64 encoding needed for Apple HomeKit.
|
||||
endmenu # Apple HomeKit
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
config ESP_WOLFSSL_DISABLE_MY_ECC
|
||||
bool "Disable ECC in my project"
|
||||
default "n"
|
||||
help
|
||||
ECC is enabled by default. Select this option to disable.
|
||||
|
||||
config ESP_WOLFSSL_ENABLE_MY_USE_RSA
|
||||
bool "Enable RSA in my project"
|
||||
default "n"
|
||||
help
|
||||
RSA is disabled by default. Select this option to enable.
|
||||
|
||||
config ESP_WOLFSSL_BENCHMARK
|
||||
bool "Enable wolfSSL Benchmark"
|
||||
default n
|
||||
help
|
||||
Enables user settings relevant to benchmark code
|
||||
|
||||
config ESP_TLS_USING_WOLFSSL_SPECIFIED
|
||||
bool "Use the specified wolfssl for ESP-TLS"
|
||||
default Y
|
||||
help
|
||||
Includes wolfSSL from specified directory (not using esp-wolfssl).
|
||||
|
||||
config ESP_WOLFSSL_NO_USE_FAST_MATH
|
||||
bool "Disable FAST_MATH library and all ESP32 Hardware Acceleration"
|
||||
select ESP_WOLFSSL_NO_HW
|
||||
select ESP_WOLFSSL_NO_HW_AES
|
||||
select ESP_WOLFSSL_NO_HW_HASH
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
|
||||
default n
|
||||
help
|
||||
When disabling all hardware acceleration for smaller memory footprint,
|
||||
disabling TFM fast math provides faster wolfSSL software algorithms in an
|
||||
even smaller flash memory footprint.
|
||||
|
||||
menu "Protocol Config"
|
||||
config WOLFSSL_HAVE_ALPN
|
||||
bool "Enable ALPN (Application Layer Protocol Negotiation) in wolfSSL"
|
||||
default y
|
||||
|
||||
config WOLFSSL_ALLOW_TLS13
|
||||
bool "Allow TLS 1.3"
|
||||
default y
|
||||
help
|
||||
Allow TLS to fallback to TLS1.2. Memory footprint will likely be larger for TLS1.2.
|
||||
When disabled HTTPS and MQTT over TLS connections will fail if TLS1.3 not accepted.
|
||||
|
||||
config WOLFSSL_ALLOW_TLS12
|
||||
bool "Allow TLS 1.2"
|
||||
default n
|
||||
help
|
||||
Allow TLS to fallback to TLS1.2. Memory footprint will likely be larger for TLS1.2.
|
||||
When disabled HTTPS and MQTT over TLS connections will fail if TLS1.3 not accepted.
|
||||
|
||||
config WOLFSSL_HAVE_TLS_EXTENSIONS
|
||||
bool "Enable TLS Extensions"
|
||||
default y
|
||||
help
|
||||
Sets HAVE_TLS_EXTENSIONS which is needed for TLS 1.3, SNI, ALPN, and more.
|
||||
|
||||
config WOLFSSL_ALT_CERT_CHAINS
|
||||
bool "Enable Alternate Certificate Chains"
|
||||
default n
|
||||
help
|
||||
The option relaxes the default strict wolfSSL certificate chain processing. This
|
||||
will typically need to be enabled when loading only a CA file. Typically solves
|
||||
the -188 ASN_NO_SIGNER_E error. Use with caution.
|
||||
|
||||
config WOLFSSL_HAVE_OCSP
|
||||
bool "Enable OCSP (Online Certificate Status Protocol) in wolfSSL"
|
||||
default n
|
||||
help
|
||||
Sets HAVE_OCSP
|
||||
|
||||
endmenu # Protocol Config
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
config TLS_STACK_WOLFSSL
|
||||
# Invisible option that locks TLS_STACK_WOLFSSL to ESP_TLS_USING_WOLFSSL
|
||||
bool
|
||||
default n
|
||||
select FREERTOS_ENABLE_BACKWARD_COMPATIBILITY
|
||||
help
|
||||
Includes wolfSSL in ESP-TLS so that it can be compiled with wolfSSL as its SSL/TLS library.
|
||||
Enabled when wolfSSL is selected in ESP_TLS_LIBRARY_CHOOSE.
|
||||
|
||||
menu "wolfSSL ESP-TLS"
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
|
||||
menu "Certificate Bundle"
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE
|
||||
bool "Enable trusted root certificate bundle"
|
||||
default y if ESP_TLS_USING_WOLFSSL
|
||||
default n
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
help
|
||||
Enable support for large number of default root certificates
|
||||
|
||||
When enabled this option allows user to store default as well
|
||||
as customer specific root certificates in compressed format rather
|
||||
than storing full certificate. For the root certificates the public key and the subject name
|
||||
will be stored.
|
||||
|
||||
config WOLFSSL_NO_ASN_STRICT
|
||||
bool "Relax Certificate ASN Strict Checks"
|
||||
default n
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
help
|
||||
Allows sub-optimal certificate ASN checks. Unless using a bundle with known issues,
|
||||
it is recommended to NOT enable this.
|
||||
|
||||
config WOLFSSL_ASN_ALLOW_0_SERIAL
|
||||
bool "Allow cert missing an ASN Serial Number"
|
||||
default y
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
help
|
||||
Although not recommended, there may be certificates in the bundle that are missing
|
||||
a serial number. This option allows the missing value without having to fully
|
||||
disable strict ASN checking with WOLFSSL_NO_ASN_STRICT.
|
||||
|
||||
choice WOLFSSL_DEFAULT_CERTIFICATE_BUNDLE
|
||||
bool "Default certificate bundle options"
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
default WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_FULL
|
||||
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_FULL
|
||||
bool "Use the full default certificate bundle"
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_CMN
|
||||
bool "Use only the most common certificates from the default bundles"
|
||||
help
|
||||
Use only the most common certificates from the default bundles, reducing the size with 50%,
|
||||
while still having around 99% coverage.
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
|
||||
bool "Do not use the default certificate bundle"
|
||||
endchoice
|
||||
|
||||
config WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
default n
|
||||
bool "Add custom certificates to the default bundle"
|
||||
config WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE_PATH
|
||||
depends on WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
string "Custom certificate bundle path"
|
||||
help
|
||||
Name of the custom certificate directory or file. This path is evaluated
|
||||
relative to the project root directory.
|
||||
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_DEPRECATED_LIST
|
||||
bool "Add deprecated root certificates"
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL && !WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
|
||||
help
|
||||
Include the deprecated list of root certificates in the bundle.
|
||||
This list gets updated when a certificate is removed from the Mozilla's
|
||||
NSS root certificate store. This config can be enabled if you would like
|
||||
to ensure that none of the certificates that were deployed in the product
|
||||
are affected because of the update to bundle. In turn, enabling this
|
||||
config keeps expired, retracted certificates in the bundle and it may
|
||||
pose a security risk.
|
||||
|
||||
- Deprecated cert list may grow based based on sync with upstream bundle
|
||||
- Deprecated certs would be be removed in ESP-IDF (next) major release
|
||||
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_MAX_CERTS
|
||||
int "Maximum no of certificates allowed in certificate bundle"
|
||||
default 200
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
|
||||
endmenu
|
||||
endmenu # wolfSSL ESP-TLS
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
config ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
bool "Modify default hardware acceleration settings"
|
||||
default n
|
||||
help
|
||||
When disabling all hardware acceleration for smaller memory footprint,
|
||||
disabling TFM fast math provides faster wolfSSL software algorithms in an
|
||||
even smaller flash memory footprint.
|
||||
Typically used for debugging, analysis, or optimizations. The default
|
||||
hardware acceleration features can be each manually adjusted.
|
||||
|
||||
menu "wolfSSL Hardware Acceleration"
|
||||
|
||||
config ESP_WOLFSSL_NO_ESP32_CRYPT
|
||||
bool "Disable all ESP32 Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
select ESP_WOLFSSL_NO_HW_AES
|
||||
select ESP_WOLFSSL_NO_HW_HASH
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_ESP32_CRYPT.
|
||||
Consider disabling FASTMATH (other libraries are faster in software and smaller)
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_AES
|
||||
bool "Disable all ESP32 AES Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default.When selected defines: NO_HW_AES
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_HASH
|
||||
bool "Disable all ESP32 SHA Hash Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_HW_HASH
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_RSA_PRI
|
||||
bool "Disable all ESP32 RSA Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
select ESP_WOLFSSL_NO_HW_PRI_MP_MUL
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_HW_RSA_PRI
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
|
||||
bool "Disable all ESP32 Multiplication Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_HW_RSA_PRI_MP_MUL
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
|
||||
bool "Disable all ESP32 Modular Multiplication Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_HW_RSA_PRI_MULMOD
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
|
||||
bool "Disable all ESP32 RSA Exponential Math Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default.
|
||||
Select this option to force disable: NO_HW_RSA_PRI_EXPTMOD
|
||||
|
||||
config ESP_WOLFSSL_DEBUG_ESP_HW_MULTI_RSAMAX_BITS
|
||||
bool "Enable debugging of RSA Multiplication operand length"
|
||||
default n
|
||||
help
|
||||
Prints an esp log warning to the default console UART when one of the
|
||||
multiplication operands exceeds the maximum size supported by hardware,
|
||||
requiring fallback to software. This can be helpful to pick key sizes
|
||||
when performance is critical. See also metrics for counting instances.
|
||||
|
||||
config ESP_WOLFSSL_DEBUG_ESP_HW_MOD_RSAMAX_BITS
|
||||
bool "Enable debugging of RSA Modular operand length"
|
||||
default n
|
||||
help
|
||||
Prints an esp log warning to the default console UART when one of the
|
||||
modular math operands exceeds the maximum size supported by hardware,
|
||||
requiring fallback to software. This can be helpful to pick key sizes
|
||||
when performance is critical. See also metrics for counting instances.
|
||||
|
||||
endmenu # wolfSSL Hardware Acceleration
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSL Experimental Options"
|
||||
|
||||
config ESP_WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
bool "Enable wolfSSL Experimental Settings"
|
||||
default n
|
||||
help
|
||||
Enables experimental settings for wolfSSL. See documentation.
|
||||
|
||||
config ESP_WOLFSSL_ENABLE_KYBER
|
||||
bool "Enable wolfSSL Kyber"
|
||||
default n
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
|
||||
endmenu # wolfSSL Experimental Options
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSL Debug Options"
|
||||
config ESP_WOLFSSL_DEBUG_WOLFSSL
|
||||
bool "Enable wolfSSL Debugging"
|
||||
default n
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
|
||||
config ESP_WOLFSSL_TEST_LOOP
|
||||
bool "Run test apps in a loop until failure"
|
||||
default y
|
||||
help
|
||||
Enable a loop wrapper for benchmark, http_client, and wolfssl test apps.
|
||||
|
||||
endmenu # wolfSSL Debug Options
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSL Customization"
|
||||
config CUSTOM_SETTING_WOLFSSL_ROOT
|
||||
string "Enter a path for wolfSSL source code"
|
||||
default "~/workspace/wolfssl"
|
||||
help
|
||||
This option lets you specify a directory for the wolfSSL source code (typically a git clone).
|
||||
Enter the path using forward slashes (e.g., C:/myfolder/mysubfolder) or double backslashes
|
||||
(e.g., C:\\myfolder\\mysubfolder).
|
||||
|
||||
endmenu # wolfSSL Customization
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "Component Config"
|
||||
config IGNORE_ESP_IDF_WOLFSSL_COMPONENT
|
||||
bool "Ignore the ESP-IDF component of wolfSSL (if present)"
|
||||
default n
|
||||
help
|
||||
Ignores wolfSSL present in the esp-idf/components directory. Requires wolfssl as a local component.
|
||||
|
||||
config IGNORE_LOCAL_WOLFSSL_COMPONENT
|
||||
bool "Ignore the local component of wolfSSL (if present)"
|
||||
default n
|
||||
help
|
||||
Ignores wolfSSL present in the local project components directory.
|
||||
Requires wolfssl as a ESP-IDF component.
|
||||
|
||||
endmenu # Component Config
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "Utility Config"
|
||||
config USE_WOLFSSL_ESP_SDK_TIME
|
||||
bool "Enable wolfSSL time helper functions"
|
||||
default n
|
||||
help
|
||||
Enables use of various time and date setting functions found in the esp-sdk-lib.h file.
|
||||
|
||||
config USE_WOLFSSL_ESP_SDK_WIFI
|
||||
bool "Enable wolfSSL WiFi helper functions"
|
||||
default n
|
||||
help
|
||||
Enables use of various time and date setting functions found in the esp-sdk-lib.h file.
|
||||
|
||||
endmenu # Utility Config
|
||||
endmenu # wolfSSL
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSH"
|
||||
config ESP_ENABLE_WOLFSSH
|
||||
bool "Enable wolfSSH options"
|
||||
default n
|
||||
help
|
||||
Enables WOLFSSH_TERM, WOLFSSL_KEY_GEN, WOLFSSL_PTHREADS, WOLFSSH_TEST_SERVER, WOLFSSH_TEST_THREADING
|
||||
|
||||
config ESP_WOLFSSL_DEBUG_WOLFSSH
|
||||
bool "Enable wolfSSH debugging"
|
||||
default n
|
||||
help
|
||||
Enable wolfSSH debugging macro. See user_settings.h
|
||||
|
||||
endmenu # wolfSSH
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfMQTT"
|
||||
config ESP_ENABLE_WOLFMQTT
|
||||
bool "Enable wolfMQTT options"
|
||||
default n
|
||||
help
|
||||
Enables WOLFMQTT
|
||||
|
||||
config ESP_WOLFSSL_DEBUG_WOLFMQTT
|
||||
bool "Enable wolfMQTT debugging"
|
||||
default n
|
||||
help
|
||||
Enable wolfMQTT debugging macro. See user_settings.h
|
||||
|
||||
endmenu # wolfMQTT
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
@ -0,0 +1,162 @@
|
||||
# wolfSSL Espressif Component
|
||||
|
||||
This is the directory for wolfSSL as an Espressif ESP-IDF component.
|
||||
|
||||
Other options are available, such as installing wolfSSL as a local _project_ component using the [Managed Component](https://www.wolfssl.com/wolfssl-now-available-in-espressif-component-registry/).
|
||||
|
||||
Enabling this wolfSSL ESP-IDF component allows other ESP-IDF libraries such as those that depend on [ESP-TLS](https://github.com/espressif/esp-idf/tree/master/components/esp-tls)
|
||||
to also use the wolfSSL library. (See [github.com/wolfSSL/wolfssl](https://github.com/wolfSSL/wolfssl))
|
||||
|
||||
The wolfSSL source code is not included here. Instead, the `idf.py menuconfig` option can be used to configure the
|
||||
`sdkconfig` file setting: `CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT` to point to the desired wolfSSL code.
|
||||
|
||||
## Directory Contents
|
||||
|
||||
This directory must contain, at a minimum:
|
||||
|
||||
- `CMakeLists.txt`
|
||||
- `./include/user_settings.h`
|
||||
|
||||
The directory should also contain:
|
||||
- `Kconfig`
|
||||
- `component.mk`
|
||||
|
||||
The directory may contain wolfSSL source, for example with a [Managed Component](https://www.wolfssl.com/wolfssl-now-available-in-espressif-component-registry/),
|
||||
or if the `setup.sh` script was used from [wolfSSL/IDE/Espressif/ESP-IDF](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF).
|
||||
|
||||
|
||||
Under normal circumstances when the wolfSSL source is not included here, the `CMakeLists.txt` will search for it in this order:
|
||||
|
||||
- A hard-coded `WOLFSSL_ROOT` cmake variable.
|
||||
- `WOLFSSL_ROOT` Environment Variable
|
||||
- The `CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT` value in the `sdkconfig` file, from the `Kconfig` option.
|
||||
- Any parent directories, up to the root (if this directory is in the ESP-IDF components)
|
||||
- Any parent directories, up to the root (if this directory is a project component)
|
||||
|
||||
While recursing up the directory tree, the following names of wolfSSL directories will be considered:
|
||||
|
||||
- `wolfssl-[current user name]`
|
||||
- `wolfssl-master`
|
||||
- `wolfssl`
|
||||
|
||||
## Getting Started
|
||||
|
||||
See the `Espressif Getting Started Guide`.
|
||||
|
||||
```
|
||||
# Set environment variable to ESP-IDF location
|
||||
# For example, VisualGDB in WSL
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.2
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32-master/esp-idf/v5.3-master
|
||||
|
||||
# Or wherever the ESP-IDF is installed:
|
||||
WRK_IDF_PATH=~/esp/esp-idf
|
||||
|
||||
echo "Run export.sh from ${WRK_IDF_PATH}"
|
||||
. ${WRK_IDF_PATH}/export.sh
|
||||
|
||||
cd [your project]
|
||||
|
||||
idf.py menuconfig
|
||||
```
|
||||
|
||||
Enable wolfSSL to be used in the ESP-TLS:
|
||||
|
||||
```
|
||||
Component config --->
|
||||
ESP-TLS --->
|
||||
Choose SSL/TLS library for ESP-TLS (See help for more Info)
|
||||
(X) wolfSSL (License info in wolfSSL directory README)
|
||||
```
|
||||
|
||||
Adjust wolfSSL settings, such as path to source code as needed:
|
||||
|
||||
```
|
||||
Component config --->
|
||||
wolfSSL --->
|
||||
[*] Include wolfSSL in ESP-TLS
|
||||
[*] Use the specified wolfssl for ESP-TLS
|
||||
(~/workspace/wolfssl) Enter a path for wolfSSL source code
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
All settings for wolfSSL are adjusted in the [include/user_settings.h](./include/user_settings.h) file.
|
||||
|
||||
The `user_settings.h` file should not be included directly. Instead, `#include <wolfssl/wolfcrypt/settings.h>`
|
||||
before any other wolfSSL headers, like this:
|
||||
|
||||
|
||||
```c
|
||||
/* ESP-IDF */
|
||||
#include <esp_log.h>
|
||||
#include "sdkconfig.h"
|
||||
|
||||
/* wolfSSL */
|
||||
/* Always include wolfcrypt/settings.h before any other wolfSSL file. */
|
||||
/* Reminder: settings.h pulls in user_settings.h; don't include it here. */
|
||||
#if defined(WOLFSSL_USER_SETTINGS)
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#if defined(WOLFSSL_ESPIDF)
|
||||
#include <wolfssl/version.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
#include <wolfcrypt/test/test.h>
|
||||
#include <wolfssl/wolfcrypt/port/Espressif/esp-sdk-lib.h>
|
||||
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
|
||||
#else
|
||||
#error "Problem with wolfSSL user_settings. " \
|
||||
"Check components/wolfssl/include " \
|
||||
"and confirm WOLFSSL_USER_SETTINGS is defined, " \
|
||||
"typically in the component CMakeLists.txt"
|
||||
#endif
|
||||
#else
|
||||
/* Define WOLFSSL_USER_SETTINGS project wide for settings.h to include */
|
||||
/* wolfSSL user settings in ./components/wolfssl/include/user_settings.h */
|
||||
#error "Missing WOLFSSL_USER_SETTINGS in CMakeLists or Makefile:\
|
||||
CFLAGS +=-DWOLFSSL_USER_SETTINGS"
|
||||
#endif
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
See the wolfSSL examples:
|
||||
|
||||
- [wolfSSL Core Examples](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples)
|
||||
- [wolfSSL Additional Examples](https://github.com/wolfSSL/wolfssl-examples/tree/master/ESP32)
|
||||
- [wolfSSH Core Examples](https://github.com/wolfSSL/wolfssh/tree/master/ide/Espressif/ESP-IDF/examples)
|
||||
- [wolfSSH Additional Examples](https://github.com/wolfSSL/wolfssh-examples/tree/main/Espressif)
|
||||
- [wolfMQTT Examples](https://github.com/wolfSSL/wolfMQTT/tree/master/IDE/Espressif/ESP-IDF/examples)
|
||||
|
||||
## Platforms
|
||||
|
||||
The ESP-IDF wolfSSL is also available for PlatformIO:
|
||||
|
||||
- [Release wolfSSL](https://registry.platformio.org/search?q=owner%3Awolfssl)
|
||||
- [Staging / Preview wolfSSL](https://registry.platformio.org/search?q=owner%3Awolfssl-staging)
|
||||
|
||||
The wolfSSL library can also be used for Espressif with Arduino:
|
||||
|
||||
- [arduino.cc/reference/en/libraries/wolfssl](https://www.arduino.cc/reference/en/libraries/wolfssl/)
|
||||
- [github.com/wolfSSL/Arduino-wolfSSL](https://github.com/wolfSSL/Arduino-wolfSSL)
|
||||
|
||||
|
||||
## Additional Information
|
||||
|
||||
- [wolfSSL Documentation](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html) and [docs/espressif](https://www.wolfssl.com/docs/espressif/)
|
||||
- [wolfSSL FAQ](https://www.wolfssl.com/docs/frequently-asked-questions-faq/)
|
||||
- [wolfSSL Products](https://www.wolfssl.com/products/)
|
||||
- [www.wolfssl.com/espressif](https://www.wolfssl.com/espressif/)
|
||||
- [More...](https://www.wolfssl.com/?s=espressif)
|
||||
|
||||
## Contact
|
||||
|
||||
Have a specific request or questions? We'd love to hear from you! Please contact us at support@wolfssl.com or open an issue on GitHub.
|
||||
|
||||
## Licensing and Support
|
||||
|
||||
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use under the GPLv2 (or at your option any later version) or a standard commercial license. For our users who cannot use wolfSSL under GPLv2 (or any later version), a commercial license to wolfSSL and wolfCrypt is available.
|
||||
|
||||
See the LICENSE.txt, visit wolfssl.com/license, contact us at licensing@wolfssl.com or call +1 425 245 8247
|
||||
|
||||
View Commercial Support Options: [wolfssl.com/products/support-and-maintenance](wolfssl.com/products/support-and-maintenance)
|
||||
|
@ -0,0 +1,296 @@
|
||||
#
|
||||
# Copyright (C) 2006-2024 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
|
||||
#
|
||||
|
||||
$(info *********** wolfssl component ************)
|
||||
|
||||
#
|
||||
# Component Makefile
|
||||
#
|
||||
#
|
||||
# The Espressif Managed Components are only for newer versions of the ESP-IDF
|
||||
# Typically only for ESP32[-x] targets and only for ESP-IDF v4.3 or later:
|
||||
# See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html
|
||||
# https://components.espressif.com/
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# make flash
|
||||
#
|
||||
# make flash ESPPORT=/dev/ttyS55
|
||||
#
|
||||
# make flash ESPBAUD=9600
|
||||
#
|
||||
# make monitor ESPPORT=COM1
|
||||
#
|
||||
# make monitor ESPPORT=/dev/ttyS55 MONITORBAUD=115200
|
||||
#
|
||||
# export ESPPORT=/dev/ttyS55
|
||||
#
|
||||
# https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/get-started/index.html
|
||||
#
|
||||
|
||||
# Although the project should define WOLFSSL_USER_SETTINGS, we'll also
|
||||
# define it here:
|
||||
CFLAGS +=-DWOLFSSL_USER_SETTINGS
|
||||
|
||||
# Note that 4 source files created by autogen are excluded here.
|
||||
#
|
||||
# See these files commented out, below. Adjust as needed for your application:
|
||||
#
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/async.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/selftest.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_first.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_last.o
|
||||
|
||||
|
||||
# NOTICE: the WOLFSSL_ROOT setting MUST be relative!
|
||||
# See https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/api-guides/build-system.html?highlight=must+relative#optional-component-specific-variables
|
||||
# In the wolfSSL GitHub examples for Espressif:
|
||||
# https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples
|
||||
# When this wolfssl component.mk makefile is in [project]/components/wolfssl
|
||||
# The root is 7 directories up from here (the location of of this component.mk):
|
||||
WOLFSSL_ROOT := ../../../../../../..
|
||||
|
||||
# To set the location of a different location, it is best to use relative paths.
|
||||
#
|
||||
# Set WOLFSSL_ROOT to a relative path from the current component directory.
|
||||
# For example, if the wolfssl_client is copied from the examples to test:
|
||||
#
|
||||
# cp -r /IDE/Espressif/ESP-IDF/examples/wolfssl_client/* /mnt/c/test/demo
|
||||
#
|
||||
# we run make in /mnt/c/test/demo
|
||||
# component is in /mnt/c/test/demo/components/wolfssl
|
||||
# wolfssl is in /mnt/c/workspace/wolfssl-master
|
||||
#
|
||||
# "/mnt/c" is 4 directories up:
|
||||
# 2 for `./test/demo` from where we run `make`, plus
|
||||
# 2 more from the location of `component.mk` located
|
||||
# in `[currect directory]/components/wolfssl`.
|
||||
#
|
||||
# Thus we need 4 parent reference to find the relative path to wolfSSL:
|
||||
# WOLFSSL_ROOT := ../../../../workspace/wolfssl-master
|
||||
|
||||
# Optional CFLAGS (make works without these; for reference only)
|
||||
# CFLAGS += -I$(WOLFSSL_ROOT)/wolfssl
|
||||
# CFLAGS += -I$(WOLFSSL_ROOT)/wolfssl/wolfcrypt
|
||||
# CFLAGS += -I$(WOLFSSL_ROOT)/wolfssl/wolfcrypt/port/Espressif
|
||||
|
||||
abs_WOLFSSL_ROOT := $(shell realpath $(WOLFSSL_ROOT))
|
||||
|
||||
# print-wolfssl-path-value:
|
||||
# @echo "WOLFSSL_ROOT defined: $(WOLFSSL_ROOT)"
|
||||
# @echo "WOLFSSL_ROOT actual: $(abs_WOLFSSL_ROOT)"
|
||||
|
||||
$(info WOLFSSL_ROOT defined: $(WOLFSSL_ROOT))
|
||||
$(info WOLFSSL_ROOT actual: $(abs_WOLFSSL_ROOT))
|
||||
|
||||
# NOTE: The wolfSSL include directory (e.g. user_settings.h) is
|
||||
# located HERE in THIS project, and *not* in the wolfSSL root.
|
||||
COMPONENT_ADD_INCLUDEDIRS := .
|
||||
COMPONENT_ADD_INCLUDEDIRS += include
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/.
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfssl
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfssl/wolfcrypt
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfssl/wolfcrypt/port/Espressif
|
||||
# COMPONENT_ADD_INCLUDEDIRS += $ENV(IDF_PATH)/components/freertos/include/freertos
|
||||
# COMPONENT_ADD_INCLUDEDIRS += "$ENV(IDF_PATH)/soc/esp32s3/include/soc"
|
||||
|
||||
# wolfSSL
|
||||
COMPONENT_SRCDIRS := $(WOLFSSL_ROOT)/src
|
||||
|
||||
# wolfcrypt
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src
|
||||
|
||||
# Espressif
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/atmel
|
||||
|
||||
COMPONENT_OBJEXCLUDE := $(WOLFSSL_ROOT)/wolfcrypt/src/aes_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/evp.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/misc.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/sha512_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_x25519_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/aes_gcm_x86_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/src/bio.o
|
||||
|
||||
|
||||
##
|
||||
## wolfSSL
|
||||
##
|
||||
COMPONENT_OBJS := $(WOLFSSL_ROOT)/src/bio.o
|
||||
# COMPONENT_OBJS += src/conf.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/crl.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/dtls.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/dtls13.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/internal.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/keys.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/ocsp.o
|
||||
# COMPONENT_OBJS += src/pk.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/quic.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/sniffer.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/ssl.o
|
||||
# COMPONENT_OBJS += src/ssl_asn1.o
|
||||
# COMPONENT_OBJS += src/ssl_bn.o
|
||||
# COMPONENT_OBJS += src/ssl_certman.o
|
||||
# COMPONENT_OBJS += src/ssl_crypto.o
|
||||
# COMPONENT_OBJS += src/ssl_misc.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/tls.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/tls13.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/wolfio.o
|
||||
# COMPONENT_OBJS += src/x509.o
|
||||
# COMPONENT_OBJS += src/x509_str.o
|
||||
|
||||
##
|
||||
## wolfcrypt
|
||||
##
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/aes.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/arc4.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/asm.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/asn.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/async.o # autogen exclusion
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/blake2b.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/blake2s.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/camellia.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/chacha.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/chacha20_poly1305.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/cmac.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/coding.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/compress.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/cpuid.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/cryptocb.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/curve25519.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/curve448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/des3.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/dh.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/dilithium.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/dsa.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ecc.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/eccsi.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ecc_fp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ed25519.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ed448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/error.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/evp.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ext_kyber.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ext_lms.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ext_xmss.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/falcon.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_low_mem.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_operations.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fips.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fips_test.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ge_448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ge_low_mem.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ge_operations.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/hash.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/hmac.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/hpke.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/integer.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/kdf.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/logging.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/md2.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/md4.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/md5.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/memory.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/misc.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/pkcs12.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/pkcs7.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/poly1305.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/pwdbased.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/random.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/rc2.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ripemd.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/rsa.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sakke.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/selftest.o # autogen exclusion
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha256.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha3.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha512.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/signature.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/siphash.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sm2.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sm3.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sm4.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sphincs.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_arm32.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_arm64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_armthumb.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_c32.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_c64.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_cortexm.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_dsp32.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_int.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_arm32.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_arm64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_armthumb.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_c32.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_c64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_cortexm.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_x86_64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_x86_64.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/srp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/tfm.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_dsp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_encrypt.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_kyber.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_kyber_poly.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_lms.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_pkcs11.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_port.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_xmss.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_first.o # autogen exclusion
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_last.o # autogen exclusion
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfevent.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfmath.o
|
||||
|
||||
##
|
||||
## Espressif
|
||||
##
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_aes.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_mp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_sha.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_util.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp_sdk_time_lib.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp_sdk_wifi_lib.o
|
||||
|
||||
##
|
||||
## wolfcrypt benchmark (optional)
|
||||
##
|
||||
## COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/benchmark/benchmark.o
|
||||
## COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/benchmark
|
||||
## COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfcrypt/benchmark
|
||||
|
||||
|
||||
##
|
||||
## wolfcrypt test (optional)
|
||||
##
|
||||
## COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/test/test.o
|
||||
## COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/test
|
||||
|
||||
##
|
||||
## wolfcrypt
|
||||
##
|
||||
## COMPONENT_PRIV_INCLUDEDIRS += $(PROJECT_PATH)/components/wolfssl/include
|
||||
## COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src
|
||||
|
||||
$(info ********** end wolfssl component **********)
|
@ -1,4 +1,4 @@
|
||||
/* user_settings.h
|
||||
/* wolfssl-component include/user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
@ -18,19 +18,52 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#define WOLFSSL_ESPIDF_COMPONENT_VERSION 0x01
|
||||
|
||||
/* The Espressif project config file. See also sdkconfig.defaults */
|
||||
#include "sdkconfig.h"
|
||||
|
||||
/* This user_settings.h is for Espressif ESP-IDF
|
||||
*
|
||||
* Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.7.0-1
|
||||
*
|
||||
* Do not include any wolfssl headers here
|
||||
* Do not include any wolfssl headers here.
|
||||
*
|
||||
* When editing this file:
|
||||
* ensure wolfssl_test and wolfssl_benchmark settings match.
|
||||
* ensure all examples match. The template example is the reference.
|
||||
*/
|
||||
|
||||
/* The Espressif project config file. See also sdkconfig.defaults */
|
||||
#include "sdkconfig.h"
|
||||
/* Naming convention: (see also esp32-crypt.h for the reference source).
|
||||
*
|
||||
* CONFIG_
|
||||
* This prefix indicates the setting came from the sdkconfig / Kconfig.
|
||||
*
|
||||
* May or may not be related to wolfSSL.
|
||||
*
|
||||
* The name after this prefix must exactly match that in the Kconfig file.
|
||||
*
|
||||
* WOLFSSL_
|
||||
* Typical of many, but not all wolfSSL macro names.
|
||||
*
|
||||
* Applies to all wolfSSL products such as wolfSSH, wolfMQTT, etc.
|
||||
*
|
||||
* May or may not have a corresponding sdkconfig / Kconfig control.
|
||||
*
|
||||
* ESP_WOLFSSL_
|
||||
* These are NOT valid wolfSSL macro names. These are names only used in
|
||||
* the ESP-IDF Kconfig files. When parsed, they will have a "CONFIG_"
|
||||
* suffix added. See next section.
|
||||
*
|
||||
* CONFIG_ESP_WOLFSSL_
|
||||
* This is a wolfSSL-specific macro that has been defined in the ESP-IDF
|
||||
* via the sdkconfig / menuconfig. Any text after this prefix should
|
||||
* exactly match an existing wolfSSL macro name.
|
||||
*
|
||||
* Applies to all wolfSSL products such as wolfSSH, wolfMQTT, etc.
|
||||
*
|
||||
* These macros may also be specific to only the project or environment,
|
||||
* and possibly not used anywhere else in the wolfSSL libraries.
|
||||
*/
|
||||
|
||||
/* The Espressif sdkconfig will have chipset info.
|
||||
**
|
||||
@ -46,33 +79,250 @@
|
||||
#undef WOLFSSL_ESPIDF
|
||||
#define WOLFSSL_ESPIDF
|
||||
|
||||
/* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
#define NO_ESP_SDK_WIFI
|
||||
/* Test various user_settings between applications by selecting example apps
|
||||
* in `idf.py menuconfig` for Example wolfSSL Configuration settings: */
|
||||
|
||||
/* Turn on messages that are useful to see only in examples. */
|
||||
#define WOLFSSL_EXAMPLE_VERBOSITY
|
||||
|
||||
/* Paths can be long, ensure the entire value printed during debug */
|
||||
#define WOLFSSL_MAX_ERROR_SZ 500
|
||||
|
||||
/* wolfSSL Examples: set macros used in example applications.
|
||||
*
|
||||
* These Settings NOT available in ESP-IDF (e.g. esp-tls)
|
||||
*
|
||||
* Any settings needed by ESP-IDF components should be explicitly set,
|
||||
* and not by these example-specific settings via CONFIG_WOLFSSL_EXAMPLE_n
|
||||
*
|
||||
* ESP-IDF settings should be Kconfig "CONFIG_[name]" values when possible. */
|
||||
#if defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TEMPLATE)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/template */
|
||||
/* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
/* #define USE_WOLFSSL_ESP_SDK_WIFI */
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TEST)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_test */
|
||||
/* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
/* #define USE_WOLFSSL_ESP_SDK_WIFI */
|
||||
#define TEST_ESPIDF_ALL_WOLFSSL
|
||||
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_BENCHMARK)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark */
|
||||
/* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
/* #define USE_WOLFSSL_ESP_SDK_WIFI */
|
||||
#define WOLFSSL_BENCHMARK_FIXED_UNITS_KB
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_CLIENT)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_client */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_SERVER)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_server */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* wolfSSH Examples */
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSH_TEMPLATE)
|
||||
/* See https://github.com/wolfSSL/wolfssh/tree/master/ide/Espressif/ESP-IDF/examples/wolfssh_template */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER)
|
||||
/* See https://github.com/wolfSSL/wolfssh/tree/master/ide/Espressif/ESP-IDF/examples/wolfssh_echoserver */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_ESP32_SSH_SERVER)
|
||||
/* See https://github.com/wolfSSL/wolfssh-examples/tree/main/Espressif/ESP32/ESP32-SSH-Server */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_ESP8266_SSH_SERVER)
|
||||
/* See https://github.com/wolfSSL/wolfssh-examples/tree/main/Espressif/ESP8266/ESP8266-SSH-Server */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* wolfMQTT Examples */
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFMQTT_TEMPLATE)
|
||||
/* See https://github.com/wolfSSL/wolfMQTT/tree/master/IDE/Espressif/ESP-IDF/examples/wolfmqtt_template */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFMQTT_AWS_IOT_MQTT)
|
||||
/* See https://github.com/wolfSSL/wolfMQTT/tree/master/IDE/Espressif/ESP-IDF/examples/AWS_IoT_MQTT */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* wolfTPM Examples */
|
||||
#elif defined(CONFIG_WOLFTPM_EXAMPLE_NAME_ESPRESSIF)
|
||||
/* See https://github.com/wolfSSL/wolfTPM/tree/master/IDE/Espressif */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* Apple HomeKit Examples */
|
||||
#elif defined(CONFIG_WOLFSSL_APPLE_HOMEKIT)
|
||||
/* See https://github.com/AchimPieters/esp32-homekit-demo */
|
||||
|
||||
/* no example selected */
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_NONE)
|
||||
/* We'll assume the app needs to use wolfSSL sdk lib function */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* Other applications detected by cmake */
|
||||
#elif defined(APP_ESP_HTTP_CLIENT_EXAMPLE)
|
||||
/* The wolfSSL Version of the client example */
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
/* Less memory available, so smaller key sizes: */
|
||||
#define FP_MAX_BITS (4096 * 2)
|
||||
#else
|
||||
#define FP_MAX_BITS (8192 * 2)
|
||||
#endif
|
||||
#define HAVE_ALPN
|
||||
#define HAVE_SNI
|
||||
#define OPENSSL_EXTRA_X509_SMALL
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define OPENSSL_EXTRA
|
||||
#ifndef WOLFSSL_ALWAYS_VERIFY_CB
|
||||
#define WOLFSSL_ALWAYS_VERIFY_CB
|
||||
#endif
|
||||
#ifndef WOLFSSL_VERIFY_CB_ALL_CERTS
|
||||
#define WOLFSSL_VERIFY_CB_ALL_CERTS
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
|
||||
#elif defined(APP_ESP_HTTP_CLIENT)
|
||||
/* The ESP-IDF Version */
|
||||
#define FP_MAX_BITS (8192 * 2)
|
||||
#define HAVE_ALPN
|
||||
#define HAVE_SNI
|
||||
#define OPENSSL_EXTRA_X509_SMALL
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define OPENSSL_EXTRA
|
||||
#ifndef WOLFSSL_ALWAYS_VERIFY_CB
|
||||
#define WOLFSSL_ALWAYS_VERIFY_CB
|
||||
#endif
|
||||
#ifndef WOLFSSL_VERIFY_CB_ALL_CERTS
|
||||
#define WOLFSSL_VERIFY_CB_ALL_CERTS
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
#else
|
||||
#ifdef WOLFSSL_ESPIDF
|
||||
/* #warning "App config undetected" */
|
||||
#endif
|
||||
/* the code is older or does not have application name defined. */
|
||||
#endif /* Example wolfSSL Configuration app settings */
|
||||
|
||||
/* Experimental Kyber */
|
||||
#if 0
|
||||
#ifdef CONFIG_WOLFSSL_ENABLE_KYBER
|
||||
/* Kyber typically needs a minimum 10K stack */
|
||||
#define WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
#define WOLFSSL_HAVE_KYBER
|
||||
#define WOLFSSL_WC_KYBER
|
||||
#define WOLFSSL_SHA3
|
||||
#if defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
/* With limited RAM, we'll disable some of the Kyber sizes: */
|
||||
#define WOLFSSL_NO_KYBER1024
|
||||
#define WOLFSSL_NO_KYBER768
|
||||
#define NO_SESSION_CACHE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Pick a cert buffer size: */
|
||||
/* #define USE_CERT_BUFFERS_2048 */
|
||||
/* #define USE_CERT_BUFFERS_1024 */
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
/* The Espressif sdkconfig will have chipset info.
|
||||
**
|
||||
** Some possible values:
|
||||
**
|
||||
** CONFIG_IDF_TARGET_ESP32
|
||||
** CONFIG_IDF_TARGET_ESP32S2
|
||||
** CONFIG_IDF_TARGET_ESP32S3
|
||||
** CONFIG_IDF_TARGET_ESP32C3
|
||||
** CONFIG_IDF_TARGET_ESP32C6
|
||||
*/
|
||||
|
||||
/* Optionally enable Apple HomeKit from compiler directive or Kconfig setting */
|
||||
#if defined(WOLFSSL_APPLE_HOMEKIT) || defined(CONFIG_WOLFSSL_APPLE_HOMEKIT)
|
||||
/* SRP is known to need 8K; slow on some devices */
|
||||
#define FP_MAX_BITS (8192 * 2)
|
||||
#define WOLFCRYPT_HAVE_SRP
|
||||
#define HAVE_CHACHA
|
||||
#define HAVE_POLY1305
|
||||
#define WOLFSSL_BASE64_ENCODE
|
||||
#endif /* Apple HomeKit settings */
|
||||
|
||||
/* Used by ESP-IDF components: */
|
||||
#if defined(CONFIG_ESP_TLS_USING_WOLFSSL)
|
||||
/* The ESP-TLS */
|
||||
#ifndef FP_MAX_BITS
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32C2) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP8684) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
/* Optionally set smaller size here */
|
||||
#define FP_MAX_BITS MIN_FFDHE_FP_MAX_BITS
|
||||
#else
|
||||
#define FP_MAX_BITS (4096 * 2)
|
||||
#endif
|
||||
#endif
|
||||
#define HAVE_ALPN
|
||||
#ifndef CONFIG_IDF_TARGET_ESP8266
|
||||
/* Unless installed in the ESP8266 RTOS SDK locally, the wolfSSL
|
||||
* API for SNI will not be seen in the components/esp-tls layer.
|
||||
* Only enable SNI for non-ESP8266 targets by default: */
|
||||
#define HAVE_SNI
|
||||
#endif
|
||||
#define OPENSSL_EXTRA_X509_SMALL
|
||||
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#endif
|
||||
|
||||
/* Optionally enable some wolfSSH settings */
|
||||
#if defined(ESP_ENABLE_WOLFSSH) || defined(CONFIG_ESP_ENABLE_WOLFSSH)
|
||||
/* The default SSH Windows size is massive for an embedded target.
|
||||
* Limit it: */
|
||||
#define DEFAULT_WINDOW_SZ 2000
|
||||
|
||||
/* These may be defined in cmake for other examples: */
|
||||
#undef WOLFSSH_TERM
|
||||
#define WOLFSSH_TERM
|
||||
|
||||
/* optional debug */
|
||||
/* #undef DEBUG_WOLFSSH */
|
||||
/* #define DEBUG_WOLFSSH */
|
||||
|
||||
#undef WOLFSSL_KEY_GEN
|
||||
#define WOLFSSL_KEY_GEN
|
||||
|
||||
#undef WOLFSSL_PTHREADS
|
||||
#define WOLFSSL_PTHREADS
|
||||
|
||||
#define WOLFSSH_TEST_SERVER
|
||||
#define WOLFSSH_TEST_THREADING
|
||||
#endif /* ESP_ENABLE_WOLFSSH */
|
||||
|
||||
|
||||
/* Not yet using WiFi lib, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
/* #define USE_WOLFSSL_ESP_SDK_WIFI */
|
||||
|
||||
/*
|
||||
* ONE of these Espressif chip families will be detected from sdkconfig:
|
||||
*
|
||||
* WOLFSSL_ESP32
|
||||
* WOLFSSL_ESPWROOM32SE
|
||||
* WOLFSSL_ESP8266
|
||||
*
|
||||
* following ifdef detection only for syntax highlighting:
|
||||
*/
|
||||
#undef WOLFSSL_ESPWROOM32SE
|
||||
#undef WOLFSSL_ESP8266
|
||||
#undef WOLFSSL_ESP32
|
||||
#ifdef WOLFSSL_ESPWROOM32SE
|
||||
#undef WOLFSSL_ESPWROOM32SE
|
||||
#endif
|
||||
#ifdef WOLFSSL_ESP8266
|
||||
#undef WOLFSSL_ESP8266
|
||||
#endif
|
||||
#ifdef WOLFSSL_ESP32
|
||||
#undef WOLFSSL_ESP32
|
||||
#endif
|
||||
/* See below for chipset detection from sdkconfig.h */
|
||||
|
||||
/* when you want to use SINGLE THREAD. Note Default ESP-IDF is FreeRTOS */
|
||||
/* #define SINGLE_THREADED */
|
||||
#define SINGLE_THREADED
|
||||
|
||||
/* SMALL_SESSION_CACHE saves a lot of RAM for ClientCache and SessionCache.
|
||||
/* Small session cache saves a lot of RAM for ClientCache and SessionCache.
|
||||
* Memory requirement is about 5KB, otherwise 20K is needed when not specified.
|
||||
* If extra small footprint is needed, try MICRO_SESSION_CACHE (< 1K)
|
||||
* When really desperate or no TLS used, try NO_SESSION_CACHE. */
|
||||
@ -92,9 +342,6 @@
|
||||
/* RSA_LOW_MEM: Half as much memory but twice as slow. */
|
||||
#define RSA_LOW_MEM
|
||||
|
||||
|
||||
|
||||
|
||||
/* optionally turn off SHA512/224 SHA512/256 */
|
||||
/* #define WOLFSSL_NOSHA512_224 */
|
||||
/* #define WOLFSSL_NOSHA512_256 */
|
||||
@ -109,14 +356,40 @@
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
/* TLS 1.3 */
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_HKDF
|
||||
#define HAVE_AEAD
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#ifdef CONFIG_WOLFSSL_ALLOW_TLS13
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_HKDF
|
||||
|
||||
#define WOLFSSL_BENCHMARK_FIXED_UNITS_KB
|
||||
/* May be required */
|
||||
#ifndef HAVE_AEAD
|
||||
#endif
|
||||
|
||||
/* Required for ECC */
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
/* Required for RSA */
|
||||
#define WC_RSA_PSS
|
||||
|
||||
/* TLS 1.3 normally requires HAVE_FFDHE */
|
||||
#if defined(HAVE_FFDHE_2048) || \
|
||||
defined(HAVE_FFDHE_3072) || \
|
||||
defined(HAVE_FFDHE_4096) || \
|
||||
defined(HAVE_FFDHE_6144) || \
|
||||
defined(HAVE_FFDHE_8192)
|
||||
#else
|
||||
#define HAVE_FFDHE_2048
|
||||
/* #error "TLS 1.3 requires HAVE_FFDHE_[nnnn]" */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32C2) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP8684)
|
||||
/* Optionally set smaller size here */
|
||||
#define HAVE_FFDHE_4096
|
||||
#else
|
||||
#define HAVE_FFDHE_4096
|
||||
#endif
|
||||
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
@ -133,29 +406,64 @@
|
||||
/* when you want to use SHA384 */
|
||||
#define WOLFSSL_SHA384
|
||||
|
||||
/* when you want to use SHA512 */
|
||||
#define WOLFSSL_SHA512
|
||||
|
||||
/* when you want to use SHA3 */
|
||||
#define WOLFSSL_SHA3
|
||||
|
||||
/* ED25519 requires SHA512 */
|
||||
#define HAVE_ED25519
|
||||
|
||||
/* Some features not enabled for ESP8266: */
|
||||
#if defined(CONFIG_IDF_TARGET_ESP8266) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
/* Some known low-memory devices have features not enabled by default. */
|
||||
/* TODO determine low memory configuration for ECC. */
|
||||
#else
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
/* when you want to use SHA512 */
|
||||
#define WOLFSSL_SHA512
|
||||
|
||||
/* when you want to use SHA3 */
|
||||
/* #define WOLFSSL_SHA3 */
|
||||
|
||||
/* ED25519 requires SHA512 */
|
||||
#define HAVE_ED25519
|
||||
#endif
|
||||
|
||||
#define HAVE_ED25519
|
||||
#if defined(CONFIG_IDF_TARGET_ESP8266) || defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
#define MY_USE_ECC 0
|
||||
#define MY_USE_RSA 1
|
||||
#else
|
||||
#define MY_USE_ECC 1
|
||||
#define MY_USE_RSA 0
|
||||
#endif
|
||||
|
||||
/* Optional OPENSSL compatibility */
|
||||
#define OPENSSL_EXTRA
|
||||
/* We can use either or both ECC and RSA, but must use at least one. */
|
||||
#if MY_USE_ECC || MY_USE_RSA
|
||||
#if MY_USE_ECC
|
||||
/* ---- ECDSA / ECC ---- */
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define HAVE_ED25519
|
||||
#define WOLFSSL_SHA512
|
||||
/*
|
||||
#define HAVE_ECC384
|
||||
#define CURVE25519_SMALL
|
||||
*/
|
||||
#else
|
||||
#define WOLFSSH_NO_ECC
|
||||
/* WOLFSSH_NO_ECDSA is typically defined automatically,
|
||||
* here for clarity: */
|
||||
#define WOLFSSH_NO_ECDSA
|
||||
#endif
|
||||
|
||||
#if MY_USE_RSA
|
||||
/* ---- RSA ----- */
|
||||
/* #define RSA_LOW_MEM */
|
||||
|
||||
/* DH disabled by default, needed if ECDSA/ECC also turned off */
|
||||
#define HAVE_DH
|
||||
#else
|
||||
#define WOLFSSH_NO_RSA
|
||||
#endif
|
||||
#else
|
||||
#error "Either RSA or ECC must be enabled"
|
||||
#endif
|
||||
|
||||
/* Optional OpenSSL compatibility */
|
||||
/* #define OPENSSL_EXTRA */
|
||||
|
||||
/* #Optional HAVE_PKCS7 */
|
||||
/* #define HAVE_PKCS7 */
|
||||
@ -198,8 +506,11 @@
|
||||
/* #define XTIME time */
|
||||
|
||||
|
||||
/* adjust wait-timeout count if you see timeout in RSA HW acceleration */
|
||||
#define ESP_RSA_TIMEOUT_CNT 0x349F00
|
||||
/* Adjust wait-timeout count if you see timeout in RSA HW acceleration.
|
||||
* Set to very large number and enable WOLFSSL_HW_METRICS to determine max. */
|
||||
#ifndef ESP_RSA_TIMEOUT_CNT
|
||||
#define ESP_RSA_TIMEOUT_CNT 0xFF0000
|
||||
#endif
|
||||
|
||||
/* hash limit for test.c */
|
||||
#define HASH_SIZE_LIMIT
|
||||
@ -208,7 +519,7 @@
|
||||
#define USE_FAST_MATH
|
||||
|
||||
/***** Use SP_MATH *****/
|
||||
/* #undef USE_FAST_MATH */
|
||||
/* #undef USE_FAST_MATH */
|
||||
/* #define SP_MATH */
|
||||
/* #define WOLFSSL_SP_MATH_ALL */
|
||||
/* #define WOLFSSL_SP_RISCV32 */
|
||||
@ -217,6 +528,14 @@
|
||||
/* #undef USE_FAST_MATH */
|
||||
/* #define USE_INTEGER_HEAP_MATH */
|
||||
|
||||
/* Just syntax highlighting to check math libraries: */
|
||||
#if defined(SP_MATH) || \
|
||||
defined(USE_INTEGER_HEAP_MATH) || \
|
||||
defined(USE_INTEGER_HEAP_MATH) || \
|
||||
defined(USE_FAST_MATH) || \
|
||||
defined(WOLFSSL_SP_MATH_ALL) || \
|
||||
defined(WOLFSSL_SP_RISCV32)
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
|
||||
@ -224,18 +543,32 @@
|
||||
#define HAVE_VERSION_EXTENDED_INFO
|
||||
/* #define HAVE_WC_INTROSPECTION */
|
||||
|
||||
#define HAVE_SESSION_TICKET
|
||||
#ifndef NO_SESSION_CACHE
|
||||
#define HAVE_SESSION_TICKET
|
||||
#endif
|
||||
|
||||
/* #define HAVE_HASHDRBG */
|
||||
|
||||
#if 0
|
||||
/* Example for additional cert functions */
|
||||
#define WOLFSSL_KEY_GEN
|
||||
#define WOLFSSL_CERT_REQ
|
||||
#define WOLFSSL_CERT_GEN
|
||||
#define WOLFSSL_CERT_EXT
|
||||
#define WOLFSSL_SYS_CA_CERTS
|
||||
#define WOLFSSL_CERT_REQ
|
||||
#define WOLFSSL_CERT_GEN
|
||||
#define WOLFSSL_CERT_EXT
|
||||
#define WOLFSSL_SYS_CA_CERTS
|
||||
|
||||
|
||||
#define WOLFSSL_CERT_TEXT
|
||||
#define WOLFSSL_CERT_TEXT
|
||||
|
||||
/* command-line options
|
||||
--enable-keygen
|
||||
--enable-certgen
|
||||
--enable-certreq
|
||||
--enable-certext
|
||||
--enable-asn-template
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_ASN_TEMPLATE
|
||||
|
||||
@ -255,10 +588,62 @@
|
||||
--enable-asn-template
|
||||
*/
|
||||
|
||||
/* optional SM4 Ciphers. See https://github.com/wolfSSL/wolfsm */
|
||||
/*
|
||||
#define WOLFSSL_SM2
|
||||
#define WOLFSSL_SM3
|
||||
#define WOLFSSL_SM4
|
||||
*/
|
||||
|
||||
#if defined(WOLFSSL_SM2) || defined(WOLFSSL_SM3) || defined(WOLFSSL_SM4)
|
||||
/* SM settings, possible cipher suites:
|
||||
|
||||
TLS13-AES128-GCM-SHA256
|
||||
TLS13-CHACHA20-POLY1305-SHA256
|
||||
TLS13-SM4-GCM-SM3
|
||||
TLS13-SM4-CCM-SM3
|
||||
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "TLS13-SM4-GCM-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "TLS13-SM4-CCM-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "ECDHE-ECDSA-SM4-CBC-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "ECDHE-ECDSA-SM4-GCM-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "ECDHE-ECDSA-SM4-CCM-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "TLS13-SM4-GCM-SM3:" \
|
||||
"TLS13-SM4-CCM-SM3:"
|
||||
*/
|
||||
|
||||
#undef WOLFSSL_BASE16
|
||||
#define WOLFSSL_BASE16 /* required for WOLFSSL_SM2 */
|
||||
|
||||
#undef WOLFSSL_SM4_ECB
|
||||
#define WOLFSSL_SM4_ECB
|
||||
|
||||
#undef WOLFSSL_SM4_CBC
|
||||
#define WOLFSSL_SM4_CBC
|
||||
|
||||
#undef WOLFSSL_SM4_CTR
|
||||
#define WOLFSSL_SM4_CTR
|
||||
|
||||
#undef WOLFSSL_SM4_GCM
|
||||
#define WOLFSSL_SM4_GCM
|
||||
|
||||
#undef WOLFSSL_SM4_CCM
|
||||
#define WOLFSSL_SM4_CCM
|
||||
|
||||
#define HAVE_POLY1305
|
||||
#define HAVE_CHACHA
|
||||
|
||||
#undef HAVE_AESGCM
|
||||
#define HAVE_AESGCM
|
||||
#else
|
||||
/* default settings */
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#endif
|
||||
|
||||
/* Chipset detection from sdkconfig.h
|
||||
* Default is HW enabled unless turned off.
|
||||
* Uncomment lines to force SW instead of HW acceleration */
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(WOLFSSL_ESPWROOM32SE)
|
||||
#define WOLFSSL_ESP32
|
||||
/* Alternatively, if there's an ECC Secure Element present: */
|
||||
/* #define WOLFSSL_ESPWROOM32SE */
|
||||
@ -380,12 +765,16 @@
|
||||
#define WOLFSSL_ESP8266
|
||||
|
||||
/* There's no hardware encryption on the ESP8266 */
|
||||
/* Consider using the ESP32-C2/C3/C6
|
||||
* See https://www.espressif.com/en/products/socs/esp32-c2 */
|
||||
/* Consider using the ESP32-C2/C3/C6 */
|
||||
#define NO_ESP32_CRYPT
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_HASH
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_AES
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
|
||||
#ifndef FP_MAX_BITS
|
||||
/* FP_MAX_BITS matters in wolfssl_test, not just TLS setting. */
|
||||
/* MIN_FFDHE_FP_MAX_BITS = (MIN_FFDHE_BITS * 2); see settings.h */
|
||||
#define FP_MAX_BITS MIN_FFDHE_FP_MAX_BITS
|
||||
#endif
|
||||
/***** END CONFIG_IDF_TARGET_ESP266 *****/
|
||||
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP8684)
|
||||
@ -435,18 +824,33 @@
|
||||
/* Debug options:
|
||||
See wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h for details on debug options
|
||||
|
||||
optionally increase error message size for very long paths.
|
||||
#define WOLFSSL_MAX_ERROR_SZ 500
|
||||
|
||||
Turn wolfSSL debugging on/off:
|
||||
wolfSSL_Debugging_ON();
|
||||
wolfSSL_Debugging_OFF();
|
||||
|
||||
#define ESP_VERIFY_MEMBLOCK
|
||||
#define DEBUG_WOLFSSL
|
||||
#define DEBUG_WOLFSSL_VERBOSE
|
||||
#define DEBUG_WOLFSSL_SHA_MUTEX
|
||||
#define WOLFSSL_DEBUG_IGNORE_ASN_TIME
|
||||
#define WOLFSSL_DEBUG_CERT_BUNDLE
|
||||
#define WOLFSSL_DEBUG_CERT_BUNDLE_NAME
|
||||
#define WOLFSSL_ESP32_CRYPT_DEBUG
|
||||
#define WOLFSSL_ESP32_CRYPT_HASH_SHA224_DEBUG
|
||||
#define NO_RECOVER_SOFTWARE_CALC
|
||||
#define WOLFSSL_TEST_STRAY 1
|
||||
#define USE_ESP_DPORT_ACCESS_READ_BUFFER
|
||||
#define WOLFSSL_ESP32_HW_LOCK_DEBUG
|
||||
#define WOLFSSL_DEBUG_MUTEX
|
||||
#define WOLFSSL_DEBUG_ESP_RSA_MULM_BITS
|
||||
#define WOLFSSL_DEBUG_ESP_HW_MOD_RSAMAX_BITS
|
||||
#define WOLFSSL_DEBUG_ESP_HW_MULTI_RSAMAX_BITS
|
||||
#define ESP_DISABLE_HW_TASK_LOCK
|
||||
#define ESP_MONITOR_HW_TASK_LOCK
|
||||
#define USE_ESP_DPORT_ACCESS_READ_BUFFER
|
||||
|
||||
See wolfcrypt/benchmark/benchmark.c for debug and other settings:
|
||||
|
||||
@ -458,7 +862,8 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
*/
|
||||
|
||||
/* Pause in a loop rather than exit. */
|
||||
#define WOLFSSL_ESPIDF_ERROR_PAUSE
|
||||
/* #define WOLFSSL_ESPIDF_ERROR_PAUSE */
|
||||
/* #define WOLFSSL_ESP32_HW_LOCK_DEBUG */
|
||||
|
||||
#define WOLFSSL_HW_METRICS
|
||||
|
||||
@ -507,6 +912,12 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
* There are various certificate examples in this header file:
|
||||
* https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/certs_test.h
|
||||
*
|
||||
* To use the sample certificates in code (not recommended for production!):
|
||||
*
|
||||
* #if defined(USE_CERT_BUFFERS_2048) || defined(USE_CERT_BUFFERS_1024)
|
||||
* #include <wolfssl/certs_test.h>
|
||||
* #endif
|
||||
*
|
||||
* To use the sets of macros below, define *one* of these:
|
||||
*
|
||||
* USE_CERT_BUFFERS_1024 - ECC 1024 bit encoded ASN1
|
||||
@ -584,7 +995,8 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define WOLFSSL_BASE16
|
||||
#else
|
||||
#if defined(USE_CERT_BUFFERS_2048)
|
||||
/* Be sure to include in app when using example certs: */
|
||||
#define USE_CERT_BUFFERS_256
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#define CTX_CA_CERT ca_cert_der_2048
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
|
||||
@ -605,7 +1017,8 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
|
||||
#elif defined(USE_CERT_BUFFERS_1024)
|
||||
/* Be sure to include in app when using example certs: */
|
||||
#define USE_CERT_BUFFERS_256
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#define CTX_CA_CERT ca_cert_der_1024
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024
|
||||
@ -629,3 +1042,34 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024"
|
||||
#endif
|
||||
#endif /* Conditional key and cert constant names */
|
||||
|
||||
/******************************************************************************
|
||||
** Sanity Checks
|
||||
******************************************************************************/
|
||||
#if defined(CONFIG_ESP_MAIN_TASK_STACK_SIZE)
|
||||
#if defined(WOLFCRYPT_HAVE_SRP)
|
||||
#if defined(FP_MAX_BITS)
|
||||
#if FP_MAX_BITS < (8192 * 2)
|
||||
#define ESP_SRP_MINIMUM_STACK_8K (24 * 1024)
|
||||
#else
|
||||
#define ESP_SRP_MINIMUM_STACK_8K (28 * 1024)
|
||||
#endif
|
||||
#else
|
||||
#error "Please define FP_MAX_BITS when using WOLFCRYPT_HAVE_SRP."
|
||||
#endif
|
||||
|
||||
#if (CONFIG_ESP_MAIN_TASK_STACK_SIZE < ESP_SRP_MINIMUM_STACK)
|
||||
#warning "WOLFCRYPT_HAVE_SRP enabled with small stack size"
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#warning "CONFIG_ESP_MAIN_TASK_STACK_SIZE not defined!"
|
||||
#endif
|
||||
/* See settings.h for some of the possible hardening options:
|
||||
*
|
||||
* #define NO_ESPIDF_DEFAULT
|
||||
* #define WC_NO_CACHE_RESISTANT
|
||||
* #define WC_AES_BITSLICED
|
||||
* #define HAVE_AES_ECB
|
||||
* #define HAVE_AES_DIRECT
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
# wolfSSL Espressif Example Project/main CMakeLists.txt
|
||||
# v1.0
|
||||
# v1.1
|
||||
#
|
||||
# wolfssl template
|
||||
#
|
||||
|
123
IDE/Espressif/ESP-IDF/examples/template/main/Kconfig.projbuild
Normal file
123
IDE/Espressif/ESP-IDF/examples/template/main/Kconfig.projbuild
Normal file
@ -0,0 +1,123 @@
|
||||
# Kconfig main
|
||||
#
|
||||
# Copyright (C) 2006-2024 wolfSSL Inc. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
# Kconfig File Version 5.7.2.001 for wolfssl_template
|
||||
|
||||
menu "Example wolfSSL Configuration"
|
||||
|
||||
choice WOLFSSL_EXAMPLE_CHOOSE
|
||||
prompt "Choose Example (See wolfssl/include/user_settings.h)"
|
||||
default WOLFSSL_EXAMPLE_NAME_NONE
|
||||
help
|
||||
The user settings file can be adjusted to specific wolfSSL examples.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_TEMPLATE
|
||||
bool "wolfSSL Template"
|
||||
help
|
||||
The sample template app compiles in wolfSSL and prints the current wolfSSL Version. Nothing more.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_TEST
|
||||
bool "wolfSSL Test"
|
||||
help
|
||||
This app tests all cryptographic functions currently enabled. See also Benchmark performance app.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_BENCHMARK
|
||||
bool "wolfSSL Benchmark"
|
||||
help
|
||||
Benchmark performance app. See also cryptographic test.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_TLS_CLIENT
|
||||
bool "TLS Client"
|
||||
help
|
||||
TLS Client Example app. Needs WiFi and a listening server on port 11111.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_TLS_SERVER
|
||||
bool "TLS Server"
|
||||
help
|
||||
TLS Server Example app. Needs WiFi. More interesting with a TLS client using port 11111.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_WOLFSSH_TEMPLATE
|
||||
bool "SSH Template App"
|
||||
help
|
||||
Bare-bones Hellow World app that only compiles in wolfSSL and wolfSSH.
|
||||
See wolfSSL/wolfssh on GitHub.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER
|
||||
bool "SSH Echo Server"
|
||||
help
|
||||
See wolfSSL/wolfssh on GitHub.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER
|
||||
bool "SSH Echo Server"
|
||||
help
|
||||
See wolfSSL/wolfssh on GitHub.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_ESP32_SSH_SERVER
|
||||
bool "SSH to UART Server for the ESP32"
|
||||
help
|
||||
See wolfSSL/wolfssh-examples on GitHub.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_ESP8266_SSH_SERVER
|
||||
bool "SSH to UART Server for the ESP8266"
|
||||
help
|
||||
See wolfSSL/wolfssh-examples on GitHub.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_WOLFMQTT_TEMPLATE
|
||||
bool "MQTT Template"
|
||||
help
|
||||
See wolfSSL/wolfmqtt on GitHub.
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_WOLFMQTT_AWS_IOT_MQTT
|
||||
bool "MQTT AWS IoT"
|
||||
help
|
||||
See wolfSSL/wolfmqtt on GitHub.
|
||||
|
||||
config WOLFTPM_EXAMPLE_NAME_ESPRESSIF
|
||||
bool "TPM Test Example for the ESP32"
|
||||
help
|
||||
See wolfSSL/wolfTPM on GitHub.
|
||||
|
||||
config WOLFSSL_APPLE_HOMEKIT
|
||||
bool "Apple HomeKit for the ESP32"
|
||||
help
|
||||
See AchimPieters/esp32-homekit-demo on GitHub.
|
||||
|
||||
|
||||
config WOLFSSL_EXAMPLE_NAME_NONE
|
||||
bool "Other"
|
||||
help
|
||||
A specific example app is not defined.
|
||||
|
||||
endchoice
|
||||
|
||||
config WOLFSSL_TARGET_HOST
|
||||
string "Target host"
|
||||
default "127.0.0.1"
|
||||
help
|
||||
host address for the example to connect
|
||||
|
||||
config WOLFSSL_TARGET_PORT
|
||||
int "Target port"
|
||||
default 11111
|
||||
help
|
||||
host port for the example to connect
|
||||
|
||||
endmenu
|
@ -18,7 +18,10 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef _MAIN_H_
|
||||
#define _MAIN_H_
|
||||
|
||||
void app_main(void);
|
||||
|
||||
#endif
|
||||
|
@ -50,6 +50,11 @@ void app_main(void)
|
||||
#ifdef WOLFSSL_ESPIDF_VERBOSE_EXIT_MESSAGE
|
||||
int ret = 0;
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TEMPLATE)
|
||||
ESP_LOGW(TAG, "Warning: Example wolfSSL misconfigured? Check menuconfig.");
|
||||
#endif
|
||||
|
||||
ESP_LOGI(TAG, "Hello wolfSSL!");
|
||||
|
||||
#ifdef HAVE_VERSION_EXTENDED_INFO
|
||||
|
@ -1,25 +1,142 @@
|
||||
# Set the known example app config to template example (see user_settings.h)
|
||||
CONFIG_WOLFSSL_EXAMPLE_NAME_TEMPLATE=y
|
||||
|
||||
# Some wolfSSL helpers
|
||||
CONFIG_USE_WOLFSSL_ESP_SDK_TIME=y
|
||||
|
||||
|
||||
# FreeRTOS ticks at 1ms interval
|
||||
CONFIG_FREERTOS_UNICORE=y
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
|
||||
|
||||
#
|
||||
# Default main stack size
|
||||
# Default main stack size. See user_settings.h
|
||||
#
|
||||
# This is typically way bigger than needed for stack size. See user_settings.h
|
||||
# This is typically bigger than needed for stack size.
|
||||
# Units are words, not bytes. See user_settings.h
|
||||
#
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=10500
|
||||
|
||||
# For wolfSSL SMALL_STACK, 3072 bytes should be sufficient for benchmark app.
|
||||
# When using RSA, assign at least 10500 bytes, otherwise 5500 usually works for others
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584
|
||||
# Legacy stack size for older ESP-IDF versions
|
||||
CONFIG_MAIN_TASK_STACK_SIZE=10500
|
||||
CONFIG_MAIN_TASK_STACK_SIZE=3584
|
||||
|
||||
#
|
||||
# Benchmark must not have CONFIG_NEWLIB_NANO_FORMAT enabled
|
||||
CONFIG_NEWLIB_NANO_FORMAT=n
|
||||
#
|
||||
# Watchdog Timers
|
||||
#
|
||||
# We don't want to have the watchdog timeout during tests & benchmarks
|
||||
#
|
||||
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=n
|
||||
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=n
|
||||
# Panic & Watchdog
|
||||
CONFIG_ESP_INT_WDT_TIMEOUT_MS=10000
|
||||
CONFIG_ESP_TASK_WDT_EN=n
|
||||
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
|
||||
CONFIG_ESP_INT_WDT=n
|
||||
|
||||
# ESP8266 Watchdog:
|
||||
CONFIG_TASK_WDT=n
|
||||
CONFIG_TASK_WDT_PANIC=n
|
||||
|
||||
# ESP8266 WDT
|
||||
# CONFIG_ESP_PANIC_PRINT_REBOOT is not set
|
||||
CONFIG_ESP_PANIC_PRINT_REBOOT=n
|
||||
CONFIG_ESP_PANIC_PRINT_HALT=y
|
||||
|
||||
# CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is not set
|
||||
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=n
|
||||
|
||||
# ESP8266 Memory
|
||||
CONFIG_FREERTOS_GLOBAL_DATA_LINK_IRAM=y
|
||||
CONFIG_HEAP_DISABLE_IRAM=y
|
||||
|
||||
# Performance
|
||||
# CONFIG_COMPILER_OPTIMIZATION_PERF=y
|
||||
|
||||
# Set max CPU frequency (falls back as needed for lower maximum)
|
||||
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
|
||||
|
||||
# Enable wolfSSL TLS in esp-tls
|
||||
CONFIG_ESP_TLS_USING_WOLFSSL=y
|
||||
CONFIG_TLS_STACK_WOLFSSL=y
|
||||
|
||||
# Bundles take up flash space and are disabled unless otherwise known to be needed
|
||||
CONFIG_WOLFSSL_CERTIFICATE_BUNDLE=n
|
||||
# CONFIG_WOLFSSL_CERTIFICATE_BUNDLE=y
|
||||
# CONFIG_ESP_WOLFSSL_SMALL_CERT_VERIFY=y
|
||||
# CONFIG_ESP_TLS_INSECURE=y
|
||||
|
||||
# Disable mbedTLS
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=n
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=n
|
||||
|
||||
# Some wolfSSL helpers
|
||||
CONFIG_USE_WOLFSSL_ESP_SDK_TIME=n
|
||||
|
||||
# CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is not set
|
||||
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=n
|
||||
|
||||
# ESP8266 Memory
|
||||
CONFIG_FREERTOS_GLOBAL_DATA_LINK_IRAM=y
|
||||
CONFIG_HEAP_DISABLE_IRAM=y
|
||||
|
||||
# Performance
|
||||
# CONFIG_COMPILER_OPTIMIZATION_PERF=y
|
||||
|
||||
# Ensure mbedTLS options are disabled
|
||||
# CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=n
|
||||
# CONFIG_MBEDTLS_TLS_CLIENT_ONLY=n
|
||||
# CONFIG_MBEDTLS_TLS_SERVER=n
|
||||
# CONFIG_MBEDTLS_TLS_CLIENT=n
|
||||
# CONFIG_MBEDTLS_HARDWARE_AES=n
|
||||
# CONFIG_MBEDTLS_HARDWARE_MPI=n
|
||||
# CONFIG_MBEDTLS_HARDWARE_SHA=n
|
||||
# CONFIG_MBEDTLS_ROM_MD5=n
|
||||
# CONFIG_MBEDTLS_SSL_RENEGOTIATION=n
|
||||
# CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=n
|
||||
# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1=n
|
||||
# CONFIG_MBEDTLS_SSL_ALPN=n
|
||||
# CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=n
|
||||
# CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=n
|
||||
|
||||
# The same-name config is used for both WiFi and client/server TLS, so we cannot disable:
|
||||
# CONFIG_MBEDTLS_TLS_ENABLED=n
|
||||
# CONFIG_MBEDTLS_TLS_DISABLED=y
|
||||
|
||||
#
|
||||
# Compiler options
|
||||
#
|
||||
CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y
|
||||
# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_PERF is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_NONE is not set
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
|
||||
CONFIG_COMPILER_FLOAT_LIB_FROM_GCCLIB=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2
|
||||
# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set
|
||||
CONFIG_COMPILER_HIDE_PATHS_MACROS=y
|
||||
# CONFIG_COMPILER_CXX_EXCEPTIONS is not set
|
||||
# CONFIG_COMPILER_CXX_RTTI is not set
|
||||
# CONFIG_COMPILER_STACK_CHECK_MODE_NONE is not set
|
||||
CONFIG_COMPILER_STACK_CHECK_MODE_NORM=y
|
||||
# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set
|
||||
# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set
|
||||
CONFIG_COMPILER_STACK_CHECK=y
|
||||
# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set
|
||||
# CONFIG_COMPILER_SAVE_RESTORE_LIBCALLS is not set
|
||||
# CONFIG_COMPILER_DISABLE_GCC12_WARNINGS is not set
|
||||
# CONFIG_COMPILER_DUMP_RTL_FILES is not set
|
||||
# end of Compiler options
|
||||
|
||||
# We don't know that the min is actually v2,
|
||||
# but this is the earliest tested.
|
||||
CONFIG_ESP32C3_REV_MIN_2=y
|
||||
|
||||
#
|
||||
# Partition Table
|
||||
|
@ -0,0 +1,30 @@
|
||||
# ESP8266 WDT
|
||||
# CONFIG_ESP_PANIC_PRINT_REBOOT is not set
|
||||
CONFIG_ESP_PANIC_PRINT_REBOOT=n
|
||||
CONFIG_ESP_PANIC_PRINT_HALT=y
|
||||
|
||||
# Enable wolfSSL TLS in esp-tls (not yet supported in RTOS SDK 3.4
|
||||
CONFIG_ESP_TLS_USING_WOLFSSL=n
|
||||
CONFIG_TLS_STACK_WOLFSSL=n
|
||||
|
||||
# Bundles take up flash space and are disabled unless otherwise known to be needed
|
||||
CONFIG_WOLFSSL_CERTIFICATE_BUNDLE=n
|
||||
# CONFIG_ESP_WOLFSSL_SMALL_CERT_VERIFY=y
|
||||
# CONFIG_ESP_TLS_INSECURE=y
|
||||
|
||||
# Disable mbedTLS
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=n
|
||||
|
||||
# ESP8266 Memory
|
||||
CONFIG_FREERTOS_GLOBAL_DATA_LINK_IRAM=y
|
||||
CONFIG_HEAP_DISABLE_IRAM=y
|
||||
|
||||
# ESP8266 Watchdog:
|
||||
CONFIG_TASK_WDT=n
|
||||
CONFIG_TASK_WDT_PANIC=n
|
||||
|
||||
# ESP8266 WDT
|
||||
# CONFIG_ESP_PANIC_PRINT_REBOOT is not set
|
||||
CONFIG_ESP_PANIC_PRINT_REBOOT=n
|
||||
CONFIG_ESP_PANIC_PRINT_HALT=y
|
@ -1,11 +1,13 @@
|
||||
# wolfSSL Espressif Example Project CMakeLists.txt
|
||||
# v1.0
|
||||
# v1.3
|
||||
#
|
||||
# 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.16)
|
||||
|
||||
# Optional no watchdog typically used for test & benchmark
|
||||
add_compile_options(-DWOLFSSL_ESP_NO_WATCHDOG=1)
|
||||
|
||||
# The wolfSSL CMake file should be able to find the source code.
|
||||
# Otherwise, assign an environment variable or set it here:
|
||||
#
|
||||
@ -20,19 +22,58 @@ add_compile_options(-DWOLFSSL_ESP_NO_WATCHDOG=1)
|
||||
# Linux: ~/workspace
|
||||
# Windows: C:\workspace
|
||||
#
|
||||
if(WIN32)
|
||||
# Windows-specific configuration here
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_WINDOWS")
|
||||
message("Detected Windows")
|
||||
endif()
|
||||
if(CMAKE_HOST_UNIX)
|
||||
message("Detected UNIX")
|
||||
endif()
|
||||
if(APPLE)
|
||||
message("Detected APPLE")
|
||||
endif()
|
||||
if(CMAKE_HOST_UNIX AND (NOT APPLE) AND EXISTS "/proc/sys/fs/binfmt_misc/WSLInterop")
|
||||
# Windows-specific configuration here
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_WSL")
|
||||
message("Detected WSL")
|
||||
endif()
|
||||
if(CMAKE_HOST_UNIX AND (NOT APPLE) AND (NOT WIN32))
|
||||
# Windows-specific configuration here
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_LINUX")
|
||||
message("Detected Linux")
|
||||
endif()
|
||||
if(APPLE)
|
||||
# Windows-specific configuration here
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_APPLE")
|
||||
message("Detected Apple")
|
||||
endif()
|
||||
# End optional WOLFSSL_CMAKE_SYSTEM_NAME
|
||||
|
||||
# Optionally specify a location for wolfSSL component source code
|
||||
# set(WOLFSSL_ROOT "c:/mydir/wolfssl" )
|
||||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
# set (PROTOCOL_EXAMPLES_DIR $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
#
|
||||
#if (EXISTS "${PROTOCOL_EXAMPLES_DIR}")
|
||||
# message("Found PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}")
|
||||
# set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFOUND_PROTOCOL_EXAMPLES_DIR")
|
||||
#else()
|
||||
# message("NOT FOUND: PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}")
|
||||
#endif()
|
||||
# Check that there are not conflicting wolfSSL components
|
||||
# The ESP Registry Component will be in ./managed_components/wolfssl__wolfssl
|
||||
# The local component wolfSSL directory will be in ./components/wolfssl
|
||||
if( EXISTS "${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl" AND EXISTS "${CMAKE_HOME_DIRECTORY}/components/wolfssl" )
|
||||
# These exclude statements don't seem to be honored by the $ENV{IDF_PATH}/tools/cmake/project.cmake'
|
||||
# add_subdirectory("${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl" EXCLUDE_FROM_ALL)
|
||||
# add_subdirectory("${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl/include" EXCLUDE_FROM_ALL)
|
||||
# So we'll error out and let the user decide how to proceed:
|
||||
message(WARNING "\nFound wolfSSL components in\n"
|
||||
"./managed_components/wolfssl__wolfssl\n"
|
||||
"and\n"
|
||||
"./components/wolfssl\n"
|
||||
"in project directory: \n"
|
||||
"${CMAKE_HOME_DIRECTORY}")
|
||||
message(FATAL_ERROR "\nPlease use either the ESP Registry Managed Component or the wolfSSL component directory but not both.\n"
|
||||
"If removing the ./managed_components/wolfssl__wolfssl directory, remember to also remove "
|
||||
"or rename the idf_component.yml file typically found in ./main/")
|
||||
else()
|
||||
message(STATUS "No conflicting wolfSSL components found.")
|
||||
endif()
|
||||
|
||||
# Ensure the this wolfSSL component directory is included
|
||||
set(WOLFSSL_PATH "${CMAKE_HOME_DIRECTORY}/components/wolfssl")
|
||||
list(APPEND EXTRA_COMPONENT_DIRS ${WOLFSSL_PATH})
|
||||
|
||||
# Not only is a project-level "set(COMPONENTS" not needed here, this will cause
|
||||
# an unintuitive error about Unknown CMake command "esptool_py_flash_project_args".
|
||||
|
@ -7,8 +7,9 @@ For general information on [wolfSSL examples for Espressif](../README.md), see t
|
||||
|
||||
## Espressif ESP Component Registry
|
||||
|
||||
See the wolfSSL namespace at [components.espressif.com](https://components.espressif.com/components?q=wolfssl)
|
||||
See the wolfSSL namespace and additional details:
|
||||
|
||||
https://www.wolfssl.com/wolfssl-now-available-in-espressif-component-registry/
|
||||
|
||||
## Windows COM Port
|
||||
|
||||
@ -38,9 +39,7 @@ using the VisualGDB extension.
|
||||
|
||||
The naming convention for project files is: `[project name]_IDF_[Version]_[chipset].vgdbproj`. The solution files (filename[.sln]) often will contain shortcuts to commonly used source and configuration files used by the respective project.
|
||||
|
||||
|
||||
-------- |------------- |------------- |
|
||||
ChipSet | ESP-IDF v4.4 | ESP-IDF v5.1 |
|
||||
ChipSet | ESP-IDF v4.4 | ESP-IDF v5.2 |
|
||||
-------- |------------- |------------- |
|
||||
ESP32 | x | |
|
||||
ESP32-S2 | | |
|
||||
@ -62,11 +61,12 @@ See the [feature request](https://sysprogs.com/w/forums/topic/feature-request-sh
|
||||
|
||||
## ESP-IDF Commandline
|
||||
|
||||
1. `idf.py menuconfig` to configure the program.
|
||||
1. `idf.py 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.
|
||||
BENCH_ARG : argument that you want to use. Default is "-lng 0"
|
||||
The list of arguments can be found in help. See [benchmark/README.md](https://github.com/wolfSSL/wolfssl/blob/master/wolfcrypt/benchmark/README.md)
|
||||
Features to be benchmarked are enabled in the `user_settings.h`.
|
||||
|
||||
When you want to run the benchmark program
|
||||
|
||||
@ -89,14 +89,34 @@ git fetch
|
||||
git pull
|
||||
git submodule update --init --recursive
|
||||
|
||||
cd /mnt/c/workspace/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark
|
||||
# pick your workspace location
|
||||
# cd ~/workspace/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark
|
||||
# cd /mnt/c/workspace/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark
|
||||
# cd /mnt/c/workspace/wolfssl-master/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark
|
||||
cd /mnt/c/workspace/wolfssl-$USER/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark
|
||||
|
||||
# Pick ESP-IDF install directory, this one for v5.1 in VisualGDB
|
||||
# The ESP8266 uses a completely different toolchain:
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp8266/rtos-sdk/v3.4
|
||||
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.1
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32-8.4/esp-idf/v4.4.1
|
||||
# Pick ESP-IDF toolchain install directory
|
||||
WRK_IDF_PATH=~/esp/esp-idf
|
||||
|
||||
# ESP-IDF v4.x uses toolchain v8.4
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32-8.4/esp-idf/v4.4.1
|
||||
|
||||
# ESP-IDF v5.0 with toolchain v12.4
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32-12.4/esp-idf/v5.0
|
||||
|
||||
# ESP-IDF v5.0 to v5.2.1 uses toolchain v12.4
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32-12.4/esp-idf/v5.0
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32-12.4/esp-idf/v5.1
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32-12.4/esp-idf/v5.2.1
|
||||
|
||||
# The most recent version:
|
||||
# ESP-IDF v5.2 uses toolchain v13.2
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.2
|
||||
|
||||
|
||||
. $WRK_IDF_PATH/export.sh
|
||||
|
||||
# Set target SoC
|
||||
@ -110,9 +130,9 @@ idf.py build flash -p /dev/ttyS20 -b 115200 monitor
|
||||
|
||||
## Example Output
|
||||
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
compatible across the widest ranges of targets. Contact wolfSSL at support@wolfssl.com
|
||||
for help in optimizing for your particular application, or see the
|
||||
for help in optimizing for your particular application, or see the
|
||||
[docs](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html).
|
||||
|
||||
Compiled and flashed with `idf.py build flash -p /dev/ttyS7 -b 115200 monitor`:
|
||||
|
@ -1,35 +1,85 @@
|
||||
#
|
||||
# Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
# Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
#
|
||||
# This file is part of wolfSSL.
|
||||
# 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 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.
|
||||
# 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
|
||||
# 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
|
||||
#
|
||||
# cmake for wolfssl Espressif projects
|
||||
#
|
||||
# Version 5.7.0 template update + THIS_IDF_PATH
|
||||
# Version 5.7.2 Espressif ESP-IDF integration
|
||||
#
|
||||
# See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
|
||||
#
|
||||
|
||||
message(STATUS "Begin wolfssl ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}")
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
set(VERBOSE_COMPONENT_MESSAGES 1)
|
||||
|
||||
# Optional requires include:
|
||||
# set(THIS_ESP_TLS "esp-tls")
|
||||
set(THIS_ESP_TLS "")
|
||||
|
||||
# function: IS_ESP_IDF_COMPONENT
|
||||
# output: RESULT = 1 (true) if this component is located in the ESP-IDF components
|
||||
# otherwise 0 (false)
|
||||
function( IS_ESP_IDF_COMPONENT RESULT )
|
||||
# NOTE: Component location is based on the location of the CMakeList.txt
|
||||
# and *not* the location of the wolfSSL source code. (which may be anywhere)
|
||||
|
||||
# Normalize the paths to remove any trailing slashes
|
||||
get_filename_component(NORMALIZED_IDF_PATH "${IDF_PATH}" REALPATH)
|
||||
get_filename_component(NORMALIZED_TEST_PATH "${COMPONENT_DIR}" REALPATH)
|
||||
|
||||
# Check if the test path starts with the IDF_PATH
|
||||
string(FIND "${NORMALIZED_TEST_PATH}" "${NORMALIZED_IDF_PATH}" pos)
|
||||
|
||||
if(${pos} EQUAL 0)
|
||||
message(STATUS "${COMPONENT_DIR} is within IDF_PATH.")
|
||||
set(${RESULT} 1 PARENT_SCOPE)
|
||||
else()
|
||||
message(STATUS "${COMPONENT_DIR} is not within IDF_PATH.")
|
||||
set(${RESULT} 0 PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Determine if this cmake file is located in the ESP-IDF component directory or not,
|
||||
# and if so, if it is being ignored (allowing the use of a local project one, instead).
|
||||
IS_ESP_IDF_COMPONENT( IS_WOLSSL_ESP_IDF_COMPONENT )
|
||||
if( IS_WOLSSL_ESP_IDF_COMPONENT )
|
||||
message(STATUS "This wolfSSL is a component in ESP-IDF.")
|
||||
if ( CONFIG_IGNORE_ESP_IDF_WOLFSSL_COMPONENT )
|
||||
idf_component_register()
|
||||
message(STATUS "Warning: wolfSSL component in ESP-IDF is being ignored.")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if( "${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}" STREQUAL "" )
|
||||
# nothing to do
|
||||
else()
|
||||
# Only forward slashes, or double backslashes are supported.
|
||||
# By the time we get here the sdkconfig file has a value for wolfSSL source code root.
|
||||
string(REPLACE "\\" "/" CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT})
|
||||
message(STATUS "Cleaned wolfssl path: ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}")
|
||||
endif()
|
||||
|
||||
# The scope of this CMAKE_C_FLAGS is just this component:
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
|
||||
set(CMAKE_CURRENT_SOURCE_DIR ".")
|
||||
# set(COMPONENT_REQUIRES lwip) # we typically don't need lwip directly in wolfssl component
|
||||
@ -42,7 +92,7 @@ if ( "${WOLFSSL_ROOT}" STREQUAL "")
|
||||
endif()
|
||||
|
||||
if( "$ENV{IDF_PATH}" STREQUAL "" )
|
||||
message(FATAL_ERROR "IDF_PATH Environment variable not set!")
|
||||
message(FATAL_ERROR "IDF_PATH Environment variable not set!")
|
||||
else()
|
||||
string(REPLACE "\\" "/" THIS_IDF_PATH "$ENV{IDF_PATH}")
|
||||
endif()
|
||||
@ -106,7 +156,7 @@ if( ("${CMAKE_PROJECT_NAME}" STREQUAL "wolfssl_benchmark") OR ("${CMAKE_PROJECT_
|
||||
message(STATUS "Not including lwip for ${CMAKE_PROJECT_NAME}")
|
||||
else()
|
||||
# benchmark and test do not need wifi, everything else probably does:
|
||||
set(COMPONENT_REQUIRES lwip) # we typically don't need lwip directly in wolfssl component
|
||||
set(COMPONENT_REQUIRES lwip "${THIS_ESP_TLS}") # we typically don't need lwip directly in wolfssl component
|
||||
endif()
|
||||
|
||||
# find the user name to search for possible "wolfssl-username"
|
||||
@ -130,6 +180,25 @@ else()
|
||||
string(REPLACE "\\" "/" THIS_IDF_PATH "$ENV{IDF_PATH}")
|
||||
endif()
|
||||
|
||||
# ENVIRONMENT_VAR_TO_MACRO
|
||||
# Check environment variable name EVARPARAM as [name]
|
||||
# If defined, and has a value of EVARVALUE as [value],
|
||||
# then assign a compiler definition "-D[name]=[value]"
|
||||
function(ENVIRONMENT_VAR_TO_MACRO EVARPARAM EVARVALUE)
|
||||
# If the EVARPARAM environment variable name is set to EVARVALUE,
|
||||
# set the compiler flag definition to enable CSV output.
|
||||
if ( "$ENV{${EVARPARAM}}" STREQUAL "${EVARVALUE}")
|
||||
message(STATUS "Appending compile definition: -D${EVARPARAM}=${EVARVALUE}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D${EVARPARAM}=${EVARVALUE}")
|
||||
else()
|
||||
if(DEFINED ENV{${EVARPARAM}})
|
||||
message(STATUS "Environment variable ${EVARPARAM} detected but set to $ENV{${EVARPARAM}}, not appending compile definition.")
|
||||
else()
|
||||
message(STATUS "Environment variable ${EVARPARAM} not detected, not appending compile definition.")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# COMPONENT_NAME = wolfssl
|
||||
# The component name is the directory name. "No feature to change this".
|
||||
# See https://github.com/espressif/esp-idf/issues/8978#issuecomment-1129892685
|
||||
@ -147,7 +216,8 @@ endif()
|
||||
# function: IS_WOLFSSL_SOURCE
|
||||
# parameter: DIRECTORY_PARAMETER - the directory to test
|
||||
# output: RESULT = contains contents of DIRECTORY_PARAMETER for wolfssl directory, otherwise blank.
|
||||
function(IS_WOLFSSL_SOURCE DIRECTORY_PARAMETER RESULT)
|
||||
function( IS_WOLFSSL_SOURCE DIRECTORY_PARAMETER
|
||||
RESULT )
|
||||
if (EXISTS "${DIRECTORY_PARAMETER}/wolfcrypt/src")
|
||||
set(${RESULT} "${DIRECTORY_PARAMETER}" PARENT_SCOPE)
|
||||
else()
|
||||
@ -166,26 +236,56 @@ function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
message(STATUS "Starting FIND_WOLFSSL_DIRECTORY: ${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
|
||||
if ( "${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}" STREQUAL "" )
|
||||
# The parameter is empty, so we certainly need to search.
|
||||
# First, see if there's an environment variable. This takes highest priority (unless already found as hard-coded, above)
|
||||
set(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}")
|
||||
if( "${CURRENT_SEARCH_DIR}" STREQUAL "" )
|
||||
message(STATUS "The WOLFSSL_ROOT environment variable is not set. Searching...")
|
||||
else()
|
||||
get_filename_component(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}" ABSOLUTE)
|
||||
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR}" FOUND_WOLFSSL)
|
||||
if( FOUND_WOLFSSL )
|
||||
message(STATUS "Found WOLFSSL_ROOT via Environment Variable:")
|
||||
# Next, if not found, see if wolfSSL was selected for ESP-TLS Kconfig
|
||||
if(CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT)
|
||||
set(CURRENT_SEARCH_DIR ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT})
|
||||
get_filename_component(CURRENT_SEARCH_DIR "${CURRENT_SEARCH_DIR}" ABSOLUTE)
|
||||
message(STATUS "WOLFSSL_ROOT found in sdkconfig/KConfig: ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}")
|
||||
else()
|
||||
message(FATAL_ERROR "WOLFSSL_ROOT Environment Variable defined, but path not found:")
|
||||
message(STATUS "$ENV{WOLFSSL_ROOT}")
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "wolfSSL not defined in [Component Config] [wolfssl]. Continuing search...")
|
||||
# If not specified as a search hint in OUTPUT_FOUND_WOLFSSL_DIRECTORY:
|
||||
# This wolfSSL component CMakeLists.txt may be found EITHER in:
|
||||
# 1) local project component
|
||||
# 2) ESP-IDF share components
|
||||
# We'll start in the CMAKE_CURRENT_SOURCE_DIR, typically [something]/projectname/components/wolfssl
|
||||
# That option might find wolfSSL source code as a copy in the component directory (e.g. Managed Components)
|
||||
# Unless cmake is in the ESP-IDF, in which case it is unlikely to find wolfSSL source in any parent.
|
||||
message(STATUS "CMAKE_CURRENT_SOURCE_DIR = ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
get_filename_component(CURRENT_SEARCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
|
||||
message(STATUS "CURRENT_SEARCH_DIR = ${CURRENT_SEARCH_DIR}")
|
||||
string(LENGTH ${CURRENT_SEARCH_DIR} CURRENT_SEARCH_DIR_LENGTH)
|
||||
endif() # CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT
|
||||
endif() # check environment var blank
|
||||
else()
|
||||
get_filename_component(CURRENT_SEARCH_DIR "${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}" ABSOLUTE)
|
||||
message(STATUS "Parameter found for FIND_WOLFSSL_DIRECTORY")
|
||||
message(STATUS "Setting wolfSSL search directory to: ${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
set(CURRENT_SEARCH_DIR "${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
endif() # parameter empty
|
||||
|
||||
# Check to see if we found a path in environment or config settings, above.
|
||||
if( "${CURRENT_SEARCH_DIR}" STREQUAL "" )
|
||||
message(STATUS "Source for wolfSSL not specified in path nor config settings.")
|
||||
# We'll continue the search by recursing up the directory tree, below.
|
||||
else()
|
||||
# Setting found! Does it contain a valid path?
|
||||
string(REPLACE "\\" "/" CURRENT_SEARCH_DIR ${CURRENT_SEARCH_DIR})
|
||||
get_filename_component(CURRENT_SEARCH_DIR "${CURRENT_SEARCH_DIR}" ABSOLUTE)
|
||||
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR}" FOUND_WOLFSSL)
|
||||
if( FOUND_WOLFSSL )
|
||||
message(STATUS "Found WOLFSSL_ROOT via prior specification.")
|
||||
message(STATUS "Found wolfSSL source code via setting: ${CURRENT_SEARCH_DIR}")
|
||||
set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
|
||||
return()
|
||||
else()
|
||||
message(FATAL_ERROR "WOLFSSL_ROOT Variable defined, but path not found: ${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
if(WIN32)
|
||||
message(STATUS "When specifying a path for Windows, use forward slahes, or double backslashes.")
|
||||
endif()
|
||||
message(STATUS "CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT sdkconfig setting = ${CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT}")
|
||||
message(STATUS "WOLFSSL_ROOT Variable defined, but source code not found: ${CURRENT_SEARCH_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -286,6 +386,11 @@ endfunction()
|
||||
|
||||
message(STATUS "CONFIG_TARGET_PLATFORM = ${CONFIG_TARGET_PLATFORM}")
|
||||
|
||||
# Check for environment variable that may be assigned to macros
|
||||
ENVIRONMENT_VAR_TO_MACRO("GENERATE_MACHINE_PARSEABLE_REPORT" "1")
|
||||
ENVIRONMENT_VAR_TO_MACRO("WOLFSSL_BENCHMARK_FIXED_CSV" "1")
|
||||
|
||||
# Optional variable inspection
|
||||
if (0)
|
||||
get_cmake_property(_variableNames VARIABLES)
|
||||
list (SORT _variableNames)
|
||||
@ -302,15 +407,20 @@ endif()
|
||||
|
||||
if ( ("${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266") OR ("${IDF_TARGET}" STREQUAL "esp8266") )
|
||||
# There's no esp_timer, no driver components for the ESP8266
|
||||
message(STATUS "Early expansion EXCLUDES esp_timer: ${THIS_INCLUDE_TIMER}")
|
||||
message(STATUS "Early expansion EXCLUDES driver: ${THIS_INCLUDE_DRIVER}")
|
||||
message(STATUS "Early expansion EXCLUDES esp_timer for esp8266: ${THIS_INCLUDE_TIMER}")
|
||||
message(STATUS "Early expansion EXCLUDES driver for esp8266: ${THIS_INCLUDE_DRIVER}")
|
||||
set(THIS_INCLUDE_TIMER "")
|
||||
set(THIS_INCLUDE_DRIVER "")
|
||||
set(THIS_ESP_TLS "")
|
||||
else()
|
||||
message(STATUS "Early expansion includes esp_timer: ${THIS_INCLUDE_TIMER}")
|
||||
message(STATUS "Early expansion includes driver: ${THIS_INCLUDE_DRIVER}")
|
||||
set(THIS_INCLUDE_TIMER "esp_timer")
|
||||
set(THIS_INCLUDE_DRIVER "driver")
|
||||
set(THIS_ESP_TLS "esp-tls")
|
||||
# Let the app know that we've included the esp-tls component requirement.
|
||||
# This is critical for use the the esp-tls component. See wolfssl esp_crt_bundle.c file.
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_REQUIRED_ESP_TLS=1")
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_EARLY_EXPANSION)
|
||||
@ -318,8 +428,9 @@ if(CMAKE_BUILD_EARLY_EXPANSION)
|
||||
idf_component_register(
|
||||
REQUIRES "${COMPONENT_REQUIRES}"
|
||||
PRIV_REQUIRES # esp_hw_support
|
||||
${THIS_INCLUDE_TIMER}
|
||||
${THIS_INCLUDE_DRIVER} # this will typically only be needed for wolfSSL benchmark
|
||||
"${THIS_ESP_TLS}"
|
||||
"${THIS_INCLUDE_TIMER}"
|
||||
"${THIS_INCLUDE_DRIVER}" # this will typically only be needed for wolfSSL benchmark
|
||||
)
|
||||
|
||||
else()
|
||||
@ -328,6 +439,15 @@ else()
|
||||
message(STATUS "wolfssl component config:")
|
||||
message(STATUS "************************************************************************************************")
|
||||
|
||||
if ( "${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266")
|
||||
# There's no esp_timer, no driver components for the ESP8266
|
||||
set(THIS_INCLUDE_TIMER "")
|
||||
set(THIS_INCLUDE_DRIVER "")
|
||||
else()
|
||||
set(THIS_INCLUDE_TIMER "esp_timer")
|
||||
set(THIS_INCLUDE_DRIVER "driver")
|
||||
endif()
|
||||
|
||||
# search for wolfSSL
|
||||
FIND_WOLFSSL_DIRECTORY(WOLFSSL_ROOT)
|
||||
if(WOLFSSL_ROOT)
|
||||
@ -341,7 +461,9 @@ else()
|
||||
# Abort CMake after fatal error.
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Searching for wolfSL source code...")
|
||||
message(STATUS "Source code for wolfSSL still not found.")
|
||||
message(STATUS "Searching from project home: ${CMAKE_HOME_DIRECTORY} ...")
|
||||
set(WOLFSSL_ROOT "${CMAKE_HOME_DIRECTORY}")
|
||||
FIND_WOLFSSL_DIRECTORY(WOLFSSL_ROOT)
|
||||
endif()
|
||||
|
||||
@ -349,11 +471,18 @@ else()
|
||||
if(WOLFSSL_ROOT)
|
||||
message(STATUS "Confirmed wolfssl directory at: ${WOLFSSL_ROOT}")
|
||||
else()
|
||||
message(STATUS "Failed: wolfssl directory not found.")
|
||||
# Try to allow a more intuitive error that the source code was not found in cmake:
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_WARNING_SOURCE_NOT_FOUND")
|
||||
|
||||
message(STATUS "Failed: wolfssl source code directory not found.")
|
||||
# Abort. We need wolfssl _somewhere_.
|
||||
message(FATAL_ERROR "Could not find wolfssl in any parent directory named wolfssl-${THIS_USER}, wolfssl-master, or wolfssl.\n"
|
||||
"Try setting WOLFSSL_ROOT environment variable, cmake variable in project, copy source, or use managed components.")
|
||||
# Abort CMake after fatal error.
|
||||
message(STATUS "")
|
||||
message(STATUS "")
|
||||
message(STATUS "Could not find wolfssl in any parent directory named wolfssl-${THIS_USER}, wolfssl-master, or wolfssl.\n"
|
||||
"Try setting WOLFSSL_ROOT environment variable, cmake variable in project, copy source, or use managed components.")
|
||||
message(STATUS "")
|
||||
message(STATUS "")
|
||||
# Abort CMake after fatal error. (or not?)
|
||||
endif()
|
||||
|
||||
set(INCLUDE_PATH ${WOLFSSL_ROOT})
|
||||
@ -379,22 +508,24 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "WOLFSSL_EXTRA_PROJECT_DIR = ${WOLFSSL_EXTRA_PROJECT_DIR}")
|
||||
set(COMPONENT_SRCDIRS "\"${WOLFSSL_ROOT}/src/\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/port/Espressif\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/port/Espressif/esp_crt_bundle\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/port/atmel\""
|
||||
"\"${WOLFSSL_EXTRA_PROJECT_DIR}\""
|
||||
) # COMPONENT_SRCDIRS
|
||||
|
||||
message(STATUS "This COMPONENT_SRCDIRS = ${COMPONENT_SRCDIRS}")
|
||||
|
||||
# wolfSSL user_settings.h is in the local project.
|
||||
# wolfSSL user_settings.h may be in the local project.
|
||||
# TODO check if exists and possibly set to ESP-IDF
|
||||
set(WOLFSSL_PROJECT_DIR "${CMAKE_HOME_DIRECTORY}/components/wolfssl")
|
||||
# add_definitions(-DWOLFSSL_USER_SETTINGS_DIR="${WOLFSSL_PROJECT_DIR}/include/user_settings.h")
|
||||
|
||||
string(REPLACE "/" "//" STR_WOLFSSL_PROJECT_DIR "${WOLFSSL_PROJECT_DIR}")
|
||||
add_definitions(-DWOLFSSL_USER_SETTINGS_DIR="${STR_WOLFSSL_PROJECT_DIR}//include//user_settings.h")
|
||||
|
||||
add_definitions(-DWOLFSSL_USER_SETTINGS_DIR="${STR_WOLFSSL_PROJECT_DIR}/include/user_settings.h")
|
||||
message(STATUS "Added definition for user_settings.h: -DWOLFSSL_USER_SETTINGS_DIR=\"${STR_WOLFSSL_PROJECT_DIR}//include//user_settings.h\"")
|
||||
# Espressif may take several passes through this makefile. Check to see if we found IDF
|
||||
string(COMPARE EQUAL "${PROJECT_SOURCE_DIR}" "" WOLFSSL_FOUND_IDF)
|
||||
|
||||
@ -427,8 +558,7 @@ else()
|
||||
message(STATUS "**************************************************************************************")
|
||||
message(STATUS "")
|
||||
|
||||
message(FATAL_ERROR "Please use wolfSSL in either local project or Espressif components, but not both.")
|
||||
# Abort CMake after fatal error.
|
||||
message(STATUS "Please use wolfSSL in either local project or Espressif components, but not both.")
|
||||
|
||||
# Optional: if you change the above FATAL_ERROR to STATUS you can warn at runtime with this macro definition:
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_MULTI_INSTALL_WARNING")
|
||||
@ -536,7 +666,9 @@ else()
|
||||
# depending on the environment, we may need to swap backslashes with forward slashes
|
||||
string(REPLACE "\\" "/" RTOS_IDF_PATH "$ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos")
|
||||
|
||||
string(REPLACE "\\" "/" WOLFSSL_ROOT ${WOLFSSL_ROOT})
|
||||
if(WOLFSSL_ROOT)
|
||||
string(REPLACE "\\" "/" WOLFSSL_ROOT ${WOLFSSL_ROOT})
|
||||
endif()
|
||||
|
||||
if(IS_DIRECTORY "${RTOS_IDF_PATH}")
|
||||
message(STATUS "Found current RTOS path: ${RTOS_IDF_PATH}")
|
||||
@ -552,7 +684,7 @@ else()
|
||||
message(STATUS "THIS_IDF_PATH = $THIS_IDF_PATH")
|
||||
# wolfSSL-specific include directories
|
||||
set(COMPONENT_ADD_INCLUDEDIRS
|
||||
"./include" # this is the location of wolfssl user_settings.h
|
||||
"./include" # this is the location of local project wolfssl user_settings.h
|
||||
"\"${WOLFSSL_ROOT}/\""
|
||||
"\"${WOLFSSL_ROOT}/wolfssl/\""
|
||||
"\"${WOLFSSL_ROOT}/wolfssl/wolfcrypt/\""
|
||||
@ -601,6 +733,7 @@ else()
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/sp_sm2_cortexm.c\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/sp_sm2_x86_64.c\""
|
||||
"\"${WOLFSSL_ROOT}/wolfcrypt/src/sp_sm2_x86_64_asm.S\""
|
||||
"\"${WOLFSSL_ROOT}/examples\"" # Examples are distributed in Managed Components, but not part of a project.
|
||||
"\"${EXCLUDE_ASM}\""
|
||||
)
|
||||
|
||||
@ -622,15 +755,120 @@ else()
|
||||
# see https://docs.espressif.com/projects/esp-idf/en/stable/esp32/migration-guides/release-5.x/build-system.html?highlight=space%20path
|
||||
#
|
||||
set(EXTRA_COMPONENT_DIRS "${COMPONENT_SRCDIRS}")
|
||||
idf_component_register(
|
||||
SRC_DIRS "${COMPONENT_SRCDIRS}"
|
||||
INCLUDE_DIRS "${COMPONENT_ADD_INCLUDEDIRS}"
|
||||
REQUIRES "${COMPONENT_REQUIRES}"
|
||||
EXCLUDE_SRCS "${COMPONENT_SRCEXCLUDE}"
|
||||
PRIV_REQUIRES
|
||||
"${THIS_INCLUDE_TIMER}"
|
||||
"${THIS_INCLUDE_DRIVER}" # this will typically only be needed for wolfSSL benchmark
|
||||
)
|
||||
|
||||
if(WOLFSSL_ROOT)
|
||||
# Only register the component if we found wolfSSL source.
|
||||
# This is important to allow Cmake to finish to completion, otherwise the UI
|
||||
# may not be able to display the Kconfig settings to fix a bad or missing source.
|
||||
idf_component_register(
|
||||
SRC_DIRS "${COMPONENT_SRCDIRS}"
|
||||
INCLUDE_DIRS "${COMPONENT_ADD_INCLUDEDIRS}"
|
||||
REQUIRES "${COMPONENT_REQUIRES}"
|
||||
EXCLUDE_SRCS "${COMPONENT_SRCEXCLUDE}"
|
||||
PRIV_REQUIRES
|
||||
"${THIS_ESP_TLS}"
|
||||
"${THIS_INCLUDE_TIMER}"
|
||||
"${THIS_INCLUDE_DRIVER}" # this will typically only be needed for wolfSSL benchmark
|
||||
)
|
||||
else()
|
||||
# Register the component simply to allow CMake to complete, but there's no wolfSSL source.
|
||||
# Expect many other errors, but the project should at least be loadable and UI can edit Kconfig settings.
|
||||
idf_component_register()
|
||||
message(STATUS "Warning: wolfSSL component not registered as no source code found (WOLFSSL_ROOT is blank)")
|
||||
endif()
|
||||
|
||||
# function(WOLFSSL_INIT_CERT_BUNDLE)
|
||||
if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
AND NOT CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
|
||||
AND NOT ("${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266")
|
||||
)
|
||||
if (CMAKE_BUILD_EARLY_EXPANSION)
|
||||
message(ERROR "Bundle Cert initialization must occur during CMAKE_BUILD_EARLY_EXPANSION")
|
||||
endif()
|
||||
# reminder: we need a value for wolfSSL root first!
|
||||
if( "${WOLFSSL_ROOT}" STREQUAL "" )
|
||||
message(ERROR "Certificate bundles need a value for WOLFSSL_ROOT")
|
||||
endif()
|
||||
set(WOLFSSL_ESP_CRT_BUNDLE_DIR ${WOLFSSL_ROOT}/wolfcrypt/src/port/Espressif/esp_crt_bundle)
|
||||
message(STATUS "WOLFSSL_ESP_CRT_BUNDLE_DIR=${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
if(EXISTS "${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
set(bundle_name "x509_crt_bundle_wolfssl")
|
||||
|
||||
# For now the certs are in the same directory
|
||||
set(DEFAULT_CRT_DIR "${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
|
||||
# Generate custom certificate bundle using the generate_cert_bundle utility
|
||||
set(GENERATE_CERT_BUNDLEPY ${python} ${WOLFSSL_ESP_CRT_BUNDLE_DIR}/gen_crt_bundle.py)
|
||||
|
||||
if(CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_FULL)
|
||||
list(APPEND crt_paths ${DEFAULT_CRT_DIR}/cacrt_all.pem ${DEFAULT_CRT_DIR}/cacrt_local.pem)
|
||||
elseif(CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_CMN)
|
||||
list(APPEND crt_paths ${DEFAULT_CRT_DIR}/cacrt_all.pem ${DEFAULT_CRT_DIR}/cacrt_local.pem)
|
||||
list(APPEND args --filter ${DEFAULT_CRT_DIR}/cmn_crt_authorities.csv)
|
||||
endif()
|
||||
|
||||
# Add deprecated root certs if enabled. This config is not visible if the default cert
|
||||
# bundle is not selected
|
||||
if(CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEPRECATED_LIST)
|
||||
list(APPEND crt_paths ${DEFAULT_CRT_DIR}/cacrt_deprecated.pem)
|
||||
endif()
|
||||
|
||||
if(CONFIG_WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE)
|
||||
get_filename_component(custom_bundle_path
|
||||
${CONFIG_WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE_PATH} ABSOLUTE BASE_DIR "${project_dir}")
|
||||
list(APPEND crt_paths ${custom_bundle_path})
|
||||
message(STATUS "Using a custom wolfSSL bundle path: ${custom_bundle_path}")
|
||||
else()
|
||||
message(STATUS "Not using a custom wolfSSL bundle path.")
|
||||
endif()
|
||||
list(APPEND args --input ${crt_paths} -q)
|
||||
|
||||
message(STATUS "CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
|
||||
get_filename_component(crt_bundle
|
||||
${bundle_name}
|
||||
ABSOLUTE BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
message(STATUS "Setting up bundle generate: ${GENERATE_CERT_BUNDLEPY} ${args}")
|
||||
message(STATUS "Depends on custom bundle path: ${custom_bundle_path}")
|
||||
message(STATUS "crt_bundle ${crt_bundle}")
|
||||
message(STATUS "COMPONENT_LIB ${COMPONENT_LIB}")
|
||||
message(STATUS "GENERATE_CERT_BUNDLEPY ${GENERATE_CERT_BUNDLEPY}")
|
||||
message(STATUS "args ${args}")
|
||||
message(STATUS "cert_bundle ${cert_bundle}")
|
||||
|
||||
# Generate bundle according to config
|
||||
# File is generated at build time, not cmake load
|
||||
add_custom_command(OUTPUT ${crt_bundle}
|
||||
COMMAND ${GENERATE_CERT_BUNDLEPY} ARGS ${args}
|
||||
DEPENDS ${custom_bundle_path}
|
||||
VERBATIM)
|
||||
|
||||
if(EXISTS "${crt_bundle}")
|
||||
message(STATUS "Bundle file exists from prior build: ${crt_bundle}")
|
||||
else()
|
||||
message(STATUS "Bundle file expected during next build: ${crt_bundle}")
|
||||
endif()
|
||||
|
||||
# Reminder the file is generated at build time, not cmake load time.
|
||||
message(STATUS "wolfSSL Cert Bundle File to be created at build time in: ${crt_bundle}")
|
||||
|
||||
add_custom_target(custom_wolfssl_bundle DEPENDS ${cert_bundle})
|
||||
|
||||
# the wolfSSL crtificate bundle is baked into wolfSSL
|
||||
add_dependencies(${COMPONENT_LIB} custom_wolfssl_bundle)
|
||||
|
||||
# COMPONENT_LIB may vary: __idf_wolfssl, __idf_esp_wolfssl, etc
|
||||
# target_add_binary_data(__idf_wolfssl ${crt_bundle} BINARY)
|
||||
target_add_binary_data(${COMPONENT_LIB} ${crt_bundle} BINARY)
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
APPEND PROPERTY ADDITIONAL_CLEAN_FILES
|
||||
"${crt_bundle}")
|
||||
else()
|
||||
message(STATUS "WARNING: CONFIG_WOLFSSL_CERTIFICATE_BUNDLE enabled but directory not found: ${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# endfunction() # WOLFSSL_INIT_CERT_BUNDLE
|
||||
|
||||
# Some optional diagnostics. Verbose ones are truncated.
|
||||
if (VERBOSE_COMPONENT_MESSAGES)
|
||||
@ -662,6 +900,12 @@ else()
|
||||
endif()
|
||||
|
||||
# target_sources(wolfssl PRIVATE "\"${WOLFSSL_ROOT}/wolfssl/\"" "\"${WOLFSSL_ROOT}/wolfssl/wolfcrypt\"")
|
||||
message(STATUS "DETECTED_PROJECT_NAME=${CMAKE_PROJECT_NAME}")
|
||||
message(STATUS "COMPONENT_TARGET=${COMPONENT_TARGET}")
|
||||
target_compile_definitions(${COMPONENT_TARGET} PRIVATE DETECTED_PROJECT_NAME="${CMAKE_PROJECT_NAME}")
|
||||
if( "${CMAKE_PROJECT_NAME}" STREQUAL "esp_http_client_example" )
|
||||
target_compile_definitions(${COMPONENT_TARGET} PRIVATE APP_ESP_HTTP_CLIENT_EXAMPLE="y")
|
||||
endif()
|
||||
|
||||
endif() # CMAKE_BUILD_EARLY_EXPANSION
|
||||
|
||||
@ -717,33 +961,80 @@ endfunction() # LIBWOLFSSL_SAVE_INFO
|
||||
|
||||
# create some programmatic #define values that will be used by ShowExtendedSystemInfo().
|
||||
# see wolfcrypt\src\port\Espressif\esp32_utl.c
|
||||
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
|
||||
if(NOT CMAKE_BUILD_EARLY_EXPANSION AND WOLFSSL_ROOT)
|
||||
set (git_cmd "git")
|
||||
message(STATUS "Adding macro definitions:")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_ORIGIN: git config --get remote.origin.url
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "config" "--get" "remote.origin.url" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "config" "--get" "remote.origin.url"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_ORIGIN "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_BRANCH: git rev-parse --abbrev-ref HEAD
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "--abbrev-ref" "HEAD" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "--abbrev-ref" "HEAD"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_BRANCH "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_HASH: git rev-parse HEAD
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "HEAD" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "HEAD"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_HASH "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_SHORT_HASH: git rev-parse --short HEAD
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "--short" "HEAD" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "rev-parse" "--short" "HEAD"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES ERROR_QUIET )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_SHORT_HASH "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
# LIBWOLFSSL_VERSION_GIT_HASH_DATE git show --no-patch --no-notes --pretty=\'\%cd\'
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd} "show" "--no-patch" "--no-notes" "--pretty=\'\%cd\'" OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES )
|
||||
execute_process(WORKING_DIRECTORY ${WOLFSSL_ROOT} COMMAND ${git_cmd}
|
||||
"show" "--no-patch" "--no-notes" "--pretty=\'\%cd\'"
|
||||
OUTPUT_VARIABLE TMP_OUT RESULT_VARIABLE TMP_RES )
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_GIT_HASH_DATE "${TMP_OUT}" "${TMP_RES}")
|
||||
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_VERSION_WOLFSSL_ROOT "${WOLFSSL_ROOT}" "${TMP_RES}")
|
||||
|
||||
message(STATUS "************************************************************************************************")
|
||||
message(STATUS "wolfssl component config complete!")
|
||||
message(STATUS "************************************************************************************************")
|
||||
endif()
|
||||
|
||||
# Ensure flag "-DWOLFSSL_ESPIDF" is already in CMAKE_C_FLAGS if not yet found from project
|
||||
string(FIND "${CMAKE_C_FLAGS}" "-DWOLFSSL_ESPIDF" FLAG_ALRREADY_FOUND_WOLFSSL_ESPIDF)
|
||||
|
||||
if(FLAG_ALRREADY_FOUND_WOLFSSL_ESPIDF EQUAL -1)
|
||||
# Flag not found, append it
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_ESPIDF")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
|
||||
endif()
|
||||
|
||||
if(WOLFSSL_ROOT)
|
||||
message(STATUS "Using wolfSSL in ${WOLFSSL_ROOT}")
|
||||
|
||||
# PlatformIO does not process script from from the Espressif cmake process.
|
||||
# We need to know where wolfSSL source code was found, so save it in the
|
||||
# PIO_WOLFSSL_ROOT environment variable to later be read by extra_script.py
|
||||
|
||||
set(ENV{PIO_WOLFSSL_ROOT} "${WOLFSSL_ROOT}")
|
||||
message(STATUS "PIO_WOLFSSL_ROOT = $ENV{PIO_WOLFSSL_ROOT}")
|
||||
message(STATUS "PLATFORMIO_BUILD_DIR = $ENV{PLATFORMIO_BUILD_DIR}")
|
||||
# See esp-tls Kconfig; menu "ESP-TLS", ESP_TLS_LIBRARY_CHOOSE
|
||||
if(CONFIG_ESP_TLS_USING_WOLFSSL)
|
||||
if ( ("${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266") OR ("${IDF_TARGET}" STREQUAL "esp8266") )
|
||||
message(STATUS "This version of wolfSSL is not supported on the ESP8266 esp-tls at this time. Check ESP-TLS config")
|
||||
else()
|
||||
message(STATUS "wolfSSL will be used for ESP-TLS")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "WARNING: wolfSSL NOT selected for ESP-TLS. Features and performance will be limited.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "")
|
||||
message(STATUS "Consider setting WOLFSSL_ROOT environment variable, use Kconfig setting, or set manually in this cmake file, above.")
|
||||
message(STATUS "")
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
message(STATUS "ERROR: Could not find wolfSSL Source Code")
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
endif()
|
||||
|
||||
message(STATUS "************************************************************************************************")
|
||||
message(STATUS "wolfSSL component config complete!")
|
||||
message(STATUS "************************************************************************************************")
|
||||
|
@ -0,0 +1,523 @@
|
||||
# Kconfig template
|
||||
#
|
||||
# Copyright (C) 2006-2024 wolfSSL Inc. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
# Kconfig File Version 5.7.2.001 for esp-idf integration
|
||||
|
||||
# Kconfig Format Rules
|
||||
#
|
||||
# See:
|
||||
# https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig.html
|
||||
#
|
||||
# Format rules for Kconfig files are as follows:
|
||||
#
|
||||
# Option names in any menus should have consistent prefixes. The prefix
|
||||
# currently should have at least 3 characters.
|
||||
#
|
||||
# The unit of indentation should be 4 spaces. All sub-items belonging to a
|
||||
# parent item are indented by one level deeper. For example, menu is indented
|
||||
# by 0 spaces, config menu by 4 spaces, help in config by 8 spaces, and the
|
||||
# text under help by 12 spaces.
|
||||
#
|
||||
# No trailing spaces are allowed at the end of the lines.
|
||||
#
|
||||
# The maximum length of options is NOT 50 characters as documented.
|
||||
# kconfcheck will complain that options should be 40 at most.
|
||||
#
|
||||
# Fix option lengths first. Superflous errors on other lines may occur.
|
||||
#
|
||||
# The maximum length of lines is 120 characters.
|
||||
#
|
||||
# python -m kconfcheck <path_to_kconfig_file>
|
||||
#
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# Begin main wolfSSL configuration menu
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# See ESP-IDF esp-tls component for config TLS_STACK_WOLFSSL
|
||||
|
||||
menu "wolfSSL"
|
||||
|
||||
menu "Hardening"
|
||||
config ESP_WOLFSSL_WC_NO_HARDEN
|
||||
bool "Disable wolfSSL hardening"
|
||||
default n
|
||||
help
|
||||
Sets WC_NO_HARDEN
|
||||
|
||||
config ESP_WOLFSSL_TFM_TIMING_RESISTANT
|
||||
bool "Enable TFM Timing Resistant Code"
|
||||
default n
|
||||
help
|
||||
Sets TFM_TIMING_RESISTANT.
|
||||
|
||||
endmenu # Hardening
|
||||
|
||||
config ESP_WOLFSSL_ENABLE_BENCHMARK
|
||||
bool "Enable wolfSSL Benchmark Library"
|
||||
default n
|
||||
help
|
||||
Enables wolfcrypt/benchmark/benchmark.c code for benchmark metrics. Disables NO_CRYPT_BENCHMARK.
|
||||
|
||||
|
||||
menu "Benchmark Debug"
|
||||
config ESP_DEBUG_WOLFSSL_BENCHMARK_TIMING
|
||||
bool "Enable benchmark timing debug"
|
||||
depends on ESP_WOLFSSL_ENABLE_BENCHMARK
|
||||
default n
|
||||
help
|
||||
Enable wolfssl debug for benchmark metric timing (CPU Cycles, RTOS ticks, etc).
|
||||
|
||||
config ESP_WOLFSSL_BENCHMARK_TIMER_DEBUG
|
||||
bool "Enable benchmark timer debug"
|
||||
depends on ESP_WOLFSSL_ENABLE_BENCHMARK
|
||||
default n
|
||||
help
|
||||
Turn on timer debugging (used when CPU cycles not available)
|
||||
|
||||
endmenu # Benchmark Debug
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
# wolfCrypt Test
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
config ESP_WOLFSSL_ENABLE_TEST
|
||||
bool "Enable wolfCrypt Test Library"
|
||||
default n
|
||||
help
|
||||
Enables wolfcrypt/test/test.c code for testing. Disables NO_CRYPT_TEST.
|
||||
|
||||
menu "wolfCrypt tests"
|
||||
config WOLFSSL_HAVE_WOLFCRYPT_TEST_OPTIONS
|
||||
bool "Enable wolfCrypt Test Options"
|
||||
depends on ESP_WOLFSSL_ENABLE_TEST
|
||||
default n
|
||||
help
|
||||
Enables HAVE_WOLFCRYPT_TEST_OPTIONS
|
||||
|
||||
config TEST_ESPIDF_ALL_WOLFSSL
|
||||
bool "Enable all features to use in tests"
|
||||
depends on ESP_WOLFSSL_ENABLE_TEST
|
||||
default n
|
||||
help
|
||||
Enables TEST_ESPIDF_ALL_WOLFSSL
|
||||
|
||||
endmenu # wolfCrypt tests
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
# Apple HomeKit Options
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "Apple HomeKit"
|
||||
config WOLFSSL_APPLE_HOMEKIT
|
||||
bool "Enable Apple HomeKit options"
|
||||
default n
|
||||
help
|
||||
Enables FP_MAX_BITS (8192 * 2), SRP, ChaCha, Poly1305, Base64 encoding needed for Apple HomeKit.
|
||||
endmenu # Apple HomeKit
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
config ESP_WOLFSSL_DISABLE_MY_ECC
|
||||
bool "Disable ECC in my project"
|
||||
default "n"
|
||||
help
|
||||
ECC is enabled by default. Select this option to disable.
|
||||
|
||||
config ESP_WOLFSSL_ENABLE_MY_USE_RSA
|
||||
bool "Enable RSA in my project"
|
||||
default "n"
|
||||
help
|
||||
RSA is disabled by default. Select this option to enable.
|
||||
|
||||
config ESP_WOLFSSL_BENCHMARK
|
||||
bool "Enable wolfSSL Benchmark"
|
||||
default n
|
||||
help
|
||||
Enables user settings relevant to benchmark code
|
||||
|
||||
config ESP_TLS_USING_WOLFSSL_SPECIFIED
|
||||
bool "Use the specified wolfssl for ESP-TLS"
|
||||
default Y
|
||||
help
|
||||
Includes wolfSSL from specified directory (not using esp-wolfssl).
|
||||
|
||||
config ESP_WOLFSSL_NO_USE_FAST_MATH
|
||||
bool "Disable FAST_MATH library and all ESP32 Hardware Acceleration"
|
||||
select ESP_WOLFSSL_NO_HW
|
||||
select ESP_WOLFSSL_NO_HW_AES
|
||||
select ESP_WOLFSSL_NO_HW_HASH
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
|
||||
default n
|
||||
help
|
||||
When disabling all hardware acceleration for smaller memory footprint,
|
||||
disabling TFM fast math provides faster wolfSSL software algorithms in an
|
||||
even smaller flash memory footprint.
|
||||
|
||||
menu "Protocol Config"
|
||||
config WOLFSSL_HAVE_ALPN
|
||||
bool "Enable ALPN (Application Layer Protocol Negotiation) in wolfSSL"
|
||||
default y
|
||||
|
||||
config WOLFSSL_ALLOW_TLS13
|
||||
bool "Allow TLS 1.3"
|
||||
default y
|
||||
help
|
||||
Allow TLS to fallback to TLS1.2. Memory footprint will likely be larger for TLS1.2.
|
||||
When disabled HTTPS and MQTT over TLS connections will fail if TLS1.3 not accepted.
|
||||
|
||||
config WOLFSSL_ALLOW_TLS12
|
||||
bool "Allow TLS 1.2"
|
||||
default n
|
||||
help
|
||||
Allow TLS to fallback to TLS1.2. Memory footprint will likely be larger for TLS1.2.
|
||||
When disabled HTTPS and MQTT over TLS connections will fail if TLS1.3 not accepted.
|
||||
|
||||
config WOLFSSL_HAVE_TLS_EXTENSIONS
|
||||
bool "Enable TLS Extensions"
|
||||
default y
|
||||
help
|
||||
Sets HAVE_TLS_EXTENSIONS which is needed for TLS 1.3, SNI, ALPN, and more.
|
||||
|
||||
config WOLFSSL_ALT_CERT_CHAINS
|
||||
bool "Enable Alternate Certificate Chains"
|
||||
default n
|
||||
help
|
||||
The option relaxes the default strict wolfSSL certificate chain processing. This
|
||||
will typically need to be enabled when loading only a CA file. Typically solves
|
||||
the -188 ASN_NO_SIGNER_E error. Use with caution.
|
||||
|
||||
config WOLFSSL_HAVE_OCSP
|
||||
bool "Enable OCSP (Online Certificate Status Protocol) in wolfSSL"
|
||||
default n
|
||||
help
|
||||
Sets HAVE_OCSP
|
||||
|
||||
endmenu # Protocol Config
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
config TLS_STACK_WOLFSSL
|
||||
# Invisible option that locks TLS_STACK_WOLFSSL to ESP_TLS_USING_WOLFSSL
|
||||
bool
|
||||
default n
|
||||
select FREERTOS_ENABLE_BACKWARD_COMPATIBILITY
|
||||
help
|
||||
Includes wolfSSL in ESP-TLS so that it can be compiled with wolfSSL as its SSL/TLS library.
|
||||
Enabled when wolfSSL is selected in ESP_TLS_LIBRARY_CHOOSE.
|
||||
|
||||
menu "wolfSSL ESP-TLS"
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
|
||||
menu "Certificate Bundle"
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE
|
||||
bool "Enable trusted root certificate bundle"
|
||||
default y if ESP_TLS_USING_WOLFSSL
|
||||
default n
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
help
|
||||
Enable support for large number of default root certificates
|
||||
|
||||
When enabled this option allows user to store default as well
|
||||
as customer specific root certificates in compressed format rather
|
||||
than storing full certificate. For the root certificates the public key and the subject name
|
||||
will be stored.
|
||||
|
||||
config WOLFSSL_NO_ASN_STRICT
|
||||
bool "Relax Certificate ASN Strict Checks"
|
||||
default n
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
help
|
||||
Allows sub-optimal certificate ASN checks. Unless using a bundle with known issues,
|
||||
it is recommended to NOT enable this.
|
||||
|
||||
config WOLFSSL_ASN_ALLOW_0_SERIAL
|
||||
bool "Allow cert missing an ASN Serial Number"
|
||||
default y
|
||||
depends on ESP_TLS_USING_WOLFSSL
|
||||
help
|
||||
Although not recommended, there may be certificates in the bundle that are missing
|
||||
a serial number. This option allows the missing value without having to fully
|
||||
disable strict ASN checking with WOLFSSL_NO_ASN_STRICT.
|
||||
|
||||
choice WOLFSSL_DEFAULT_CERTIFICATE_BUNDLE
|
||||
bool "Default certificate bundle options"
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
default WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_FULL
|
||||
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_FULL
|
||||
bool "Use the full default certificate bundle"
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_CMN
|
||||
bool "Use only the most common certificates from the default bundles"
|
||||
help
|
||||
Use only the most common certificates from the default bundles, reducing the size with 50%,
|
||||
while still having around 99% coverage.
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
|
||||
bool "Do not use the default certificate bundle"
|
||||
endchoice
|
||||
|
||||
config WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
default n
|
||||
bool "Add custom certificates to the default bundle"
|
||||
config WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE_PATH
|
||||
depends on WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
string "Custom certificate bundle path"
|
||||
help
|
||||
Name of the custom certificate directory or file. This path is evaluated
|
||||
relative to the project root directory.
|
||||
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_DEPRECATED_LIST
|
||||
bool "Add deprecated root certificates"
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL && !WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
|
||||
help
|
||||
Include the deprecated list of root certificates in the bundle.
|
||||
This list gets updated when a certificate is removed from the Mozilla's
|
||||
NSS root certificate store. This config can be enabled if you would like
|
||||
to ensure that none of the certificates that were deployed in the product
|
||||
are affected because of the update to bundle. In turn, enabling this
|
||||
config keeps expired, retracted certificates in the bundle and it may
|
||||
pose a security risk.
|
||||
|
||||
- Deprecated cert list may grow based based on sync with upstream bundle
|
||||
- Deprecated certs would be be removed in ESP-IDF (next) major release
|
||||
|
||||
config WOLFSSL_CERTIFICATE_BUNDLE_MAX_CERTS
|
||||
int "Maximum no of certificates allowed in certificate bundle"
|
||||
default 200
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
|
||||
endmenu
|
||||
endmenu # wolfSSL ESP-TLS
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
config ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
bool "Modify default hardware acceleration settings"
|
||||
default n
|
||||
help
|
||||
When disabling all hardware acceleration for smaller memory footprint,
|
||||
disabling TFM fast math provides faster wolfSSL software algorithms in an
|
||||
even smaller flash memory footprint.
|
||||
Typically used for debugging, analysis, or optimizations. The default
|
||||
hardware acceleration features can be each manually adjusted.
|
||||
|
||||
menu "wolfSSL Hardware Acceleration"
|
||||
|
||||
config ESP_WOLFSSL_NO_ESP32_CRYPT
|
||||
bool "Disable all ESP32 Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
select ESP_WOLFSSL_NO_HW_AES
|
||||
select ESP_WOLFSSL_NO_HW_HASH
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_ESP32_CRYPT.
|
||||
Consider disabling FASTMATH (other libraries are faster in software and smaller)
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_AES
|
||||
bool "Disable all ESP32 AES Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default.When selected defines: NO_HW_AES
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_HASH
|
||||
bool "Disable all ESP32 SHA Hash Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_HW_HASH
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_RSA_PRI
|
||||
bool "Disable all ESP32 RSA Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
select ESP_WOLFSSL_NO_HW_PRI_MP_MUL
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
|
||||
select ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_HW_RSA_PRI
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
|
||||
bool "Disable all ESP32 Multiplication Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_HW_RSA_PRI_MP_MUL
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
|
||||
bool "Disable all ESP32 Modular Multiplication Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default. When selected defines: NO_HW_RSA_PRI_MULMOD
|
||||
|
||||
config ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
|
||||
bool "Disable all ESP32 RSA Exponential Math Hardware Acceleration"
|
||||
depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
|
||||
default n
|
||||
help
|
||||
Hardware acceleration enabled by default.
|
||||
Select this option to force disable: NO_HW_RSA_PRI_EXPTMOD
|
||||
|
||||
config ESP_WOLFSSL_DEBUG_ESP_HW_MULTI_RSAMAX_BITS
|
||||
bool "Enable debugging of RSA Multiplication operand length"
|
||||
default n
|
||||
help
|
||||
Prints an esp log warning to the default console UART when one of the
|
||||
multiplication operands exceeds the maximum size supported by hardware,
|
||||
requiring fallback to software. This can be helpful to pick key sizes
|
||||
when performance is critical. See also metrics for counting instances.
|
||||
|
||||
config ESP_WOLFSSL_DEBUG_ESP_HW_MOD_RSAMAX_BITS
|
||||
bool "Enable debugging of RSA Modular operand length"
|
||||
default n
|
||||
help
|
||||
Prints an esp log warning to the default console UART when one of the
|
||||
modular math operands exceeds the maximum size supported by hardware,
|
||||
requiring fallback to software. This can be helpful to pick key sizes
|
||||
when performance is critical. See also metrics for counting instances.
|
||||
|
||||
endmenu # wolfSSL Hardware Acceleration
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSL Experimental Options"
|
||||
|
||||
config ESP_WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
bool "Enable wolfSSL Experimental Settings"
|
||||
default n
|
||||
help
|
||||
Enables experimental settings for wolfSSL. See documentation.
|
||||
|
||||
config ESP_WOLFSSL_ENABLE_KYBER
|
||||
bool "Enable wolfSSL Kyber"
|
||||
default n
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
|
||||
endmenu # wolfSSL Experimental Options
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSL Debug Options"
|
||||
config ESP_WOLFSSL_DEBUG_WOLFSSL
|
||||
bool "Enable wolfSSL Debugging"
|
||||
default n
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
|
||||
config ESP_WOLFSSL_TEST_LOOP
|
||||
bool "Run test apps in a loop until failure"
|
||||
default y
|
||||
help
|
||||
Enable a loop wrapper for benchmark, http_client, and wolfssl test apps.
|
||||
|
||||
endmenu # wolfSSL Debug Options
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSL Customization"
|
||||
config CUSTOM_SETTING_WOLFSSL_ROOT
|
||||
string "Enter a path for wolfSSL source code"
|
||||
default "~/workspace/wolfssl"
|
||||
help
|
||||
This option lets you specify a directory for the wolfSSL source code (typically a git clone).
|
||||
Enter the path using forward slashes (e.g., C:/myfolder/mysubfolder) or double backslashes
|
||||
(e.g., C:\\myfolder\\mysubfolder).
|
||||
|
||||
endmenu # wolfSSL Customization
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "Component Config"
|
||||
config IGNORE_ESP_IDF_WOLFSSL_COMPONENT
|
||||
bool "Ignore the ESP-IDF component of wolfSSL (if present)"
|
||||
default n
|
||||
help
|
||||
Ignores wolfSSL present in the esp-idf/components directory. Requires wolfssl as a local component.
|
||||
|
||||
config IGNORE_LOCAL_WOLFSSL_COMPONENT
|
||||
bool "Ignore the local component of wolfSSL (if present)"
|
||||
default n
|
||||
help
|
||||
Ignores wolfSSL present in the local project components directory.
|
||||
Requires wolfssl as a ESP-IDF component.
|
||||
|
||||
endmenu # Component Config
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "Utility Config"
|
||||
config USE_WOLFSSL_ESP_SDK_TIME
|
||||
bool "Enable wolfSSL time helper functions"
|
||||
default n
|
||||
help
|
||||
Enables use of various time and date setting functions found in the esp-sdk-lib.h file.
|
||||
|
||||
config USE_WOLFSSL_ESP_SDK_WIFI
|
||||
bool "Enable wolfSSL WiFi helper functions"
|
||||
default n
|
||||
help
|
||||
Enables use of various time and date setting functions found in the esp-sdk-lib.h file.
|
||||
|
||||
endmenu # Utility Config
|
||||
endmenu # wolfSSL
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSH"
|
||||
config ESP_ENABLE_WOLFSSH
|
||||
bool "Enable wolfSSH options"
|
||||
default n
|
||||
help
|
||||
Enables WOLFSSH_TERM, WOLFSSL_KEY_GEN, WOLFSSL_PTHREADS, WOLFSSH_TEST_SERVER, WOLFSSH_TEST_THREADING
|
||||
|
||||
config ESP_WOLFSSL_DEBUG_WOLFSSH
|
||||
bool "Enable wolfSSH debugging"
|
||||
default n
|
||||
help
|
||||
Enable wolfSSH debugging macro. See user_settings.h
|
||||
|
||||
endmenu # wolfSSH
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfMQTT"
|
||||
config ESP_ENABLE_WOLFMQTT
|
||||
bool "Enable wolfMQTT options"
|
||||
default n
|
||||
help
|
||||
Enables WOLFMQTT
|
||||
|
||||
config ESP_WOLFSSL_DEBUG_WOLFMQTT
|
||||
bool "Enable wolfMQTT debugging"
|
||||
default n
|
||||
help
|
||||
Enable wolfMQTT debugging macro. See user_settings.h
|
||||
|
||||
endmenu # wolfMQTT
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
@ -0,0 +1,162 @@
|
||||
# wolfSSL Espressif Component
|
||||
|
||||
This is the directory for wolfSSL as an Espressif ESP-IDF component.
|
||||
|
||||
Other options are available, such as installing wolfSSL as a local _project_ component using the [Managed Component](https://www.wolfssl.com/wolfssl-now-available-in-espressif-component-registry/).
|
||||
|
||||
Enabling this wolfSSL ESP-IDF component allows other ESP-IDF libraries such as those that depend on [ESP-TLS](https://github.com/espressif/esp-idf/tree/master/components/esp-tls)
|
||||
to also use the wolfSSL library. (See [github.com/wolfSSL/wolfssl](https://github.com/wolfSSL/wolfssl))
|
||||
|
||||
The wolfSSL source code is not included here. Instead, the `idf.py menuconfig` option can be used to configure the
|
||||
`sdkconfig` file setting: `CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT` to point to the desired wolfSSL code.
|
||||
|
||||
## Directory Contents
|
||||
|
||||
This directory must contain, at a minimum:
|
||||
|
||||
- `CMakeLists.txt`
|
||||
- `./include/user_settings.h`
|
||||
|
||||
The directory should also contain:
|
||||
- `Kconfig`
|
||||
- `component.mk`
|
||||
|
||||
The directory may contain wolfSSL source, for example with a [Managed Component](https://www.wolfssl.com/wolfssl-now-available-in-espressif-component-registry/),
|
||||
or if the `setup.sh` script was used from [wolfSSL/IDE/Espressif/ESP-IDF](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF).
|
||||
|
||||
|
||||
Under normal circumstances when the wolfSSL source is not included here, the `CMakeLists.txt` will search for it in this order:
|
||||
|
||||
- A hard-coded `WOLFSSL_ROOT` cmake variable.
|
||||
- `WOLFSSL_ROOT` Environment Variable
|
||||
- The `CONFIG_CUSTOM_SETTING_WOLFSSL_ROOT` value in the `sdkconfig` file, from the `Kconfig` option.
|
||||
- Any parent directories, up to the root (if this directory is in the ESP-IDF components)
|
||||
- Any parent directories, up to the root (if this directory is a project component)
|
||||
|
||||
While recursing up the directory tree, the following names of wolfSSL directories will be considered:
|
||||
|
||||
- `wolfssl-[current user name]`
|
||||
- `wolfssl-master`
|
||||
- `wolfssl`
|
||||
|
||||
## Getting Started
|
||||
|
||||
See the `Espressif Getting Started Guide`.
|
||||
|
||||
```
|
||||
# Set environment variable to ESP-IDF location
|
||||
# For example, VisualGDB in WSL
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.2
|
||||
WRK_IDF_PATH=/mnt/c/SysGCC/esp32-master/esp-idf/v5.3-master
|
||||
|
||||
# Or wherever the ESP-IDF is installed:
|
||||
WRK_IDF_PATH=~/esp/esp-idf
|
||||
|
||||
echo "Run export.sh from ${WRK_IDF_PATH}"
|
||||
. ${WRK_IDF_PATH}/export.sh
|
||||
|
||||
cd [your project]
|
||||
|
||||
idf.py menuconfig
|
||||
```
|
||||
|
||||
Enable wolfSSL to be used in the ESP-TLS:
|
||||
|
||||
```
|
||||
Component config --->
|
||||
ESP-TLS --->
|
||||
Choose SSL/TLS library for ESP-TLS (See help for more Info)
|
||||
(X) wolfSSL (License info in wolfSSL directory README)
|
||||
```
|
||||
|
||||
Adjust wolfSSL settings, such as path to source code as needed:
|
||||
|
||||
```
|
||||
Component config --->
|
||||
wolfSSL --->
|
||||
[*] Include wolfSSL in ESP-TLS
|
||||
[*] Use the specified wolfssl for ESP-TLS
|
||||
(~/workspace/wolfssl) Enter a path for wolfSSL source code
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
All settings for wolfSSL are adjusted in the [include/user_settings.h](./include/user_settings.h) file.
|
||||
|
||||
The `user_settings.h` file should not be included directly. Instead, `#include <wolfssl/wolfcrypt/settings.h>`
|
||||
before any other wolfSSL headers, like this:
|
||||
|
||||
|
||||
```c
|
||||
/* ESP-IDF */
|
||||
#include <esp_log.h>
|
||||
#include "sdkconfig.h"
|
||||
|
||||
/* wolfSSL */
|
||||
/* Always include wolfcrypt/settings.h before any other wolfSSL file. */
|
||||
/* Reminder: settings.h pulls in user_settings.h; don't include it here. */
|
||||
#if defined(WOLFSSL_USER_SETTINGS)
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#if defined(WOLFSSL_ESPIDF)
|
||||
#include <wolfssl/version.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
#include <wolfcrypt/test/test.h>
|
||||
#include <wolfssl/wolfcrypt/port/Espressif/esp-sdk-lib.h>
|
||||
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
|
||||
#else
|
||||
#error "Problem with wolfSSL user_settings. " \
|
||||
"Check components/wolfssl/include " \
|
||||
"and confirm WOLFSSL_USER_SETTINGS is defined, " \
|
||||
"typically in the component CMakeLists.txt"
|
||||
#endif
|
||||
#else
|
||||
/* Define WOLFSSL_USER_SETTINGS project wide for settings.h to include */
|
||||
/* wolfSSL user settings in ./components/wolfssl/include/user_settings.h */
|
||||
#error "Missing WOLFSSL_USER_SETTINGS in CMakeLists or Makefile:\
|
||||
CFLAGS +=-DWOLFSSL_USER_SETTINGS"
|
||||
#endif
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
See the wolfSSL examples:
|
||||
|
||||
- [wolfSSL Core Examples](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples)
|
||||
- [wolfSSL Additional Examples](https://github.com/wolfSSL/wolfssl-examples/tree/master/ESP32)
|
||||
- [wolfSSH Core Examples](https://github.com/wolfSSL/wolfssh/tree/master/ide/Espressif/ESP-IDF/examples)
|
||||
- [wolfSSH Additional Examples](https://github.com/wolfSSL/wolfssh-examples/tree/main/Espressif)
|
||||
- [wolfMQTT Examples](https://github.com/wolfSSL/wolfMQTT/tree/master/IDE/Espressif/ESP-IDF/examples)
|
||||
|
||||
## Platforms
|
||||
|
||||
The ESP-IDF wolfSSL is also available for PlatformIO:
|
||||
|
||||
- [Release wolfSSL](https://registry.platformio.org/search?q=owner%3Awolfssl)
|
||||
- [Staging / Preview wolfSSL](https://registry.platformio.org/search?q=owner%3Awolfssl-staging)
|
||||
|
||||
The wolfSSL library can also be used for Espressif with Arduino:
|
||||
|
||||
- [arduino.cc/reference/en/libraries/wolfssl](https://www.arduino.cc/reference/en/libraries/wolfssl/)
|
||||
- [github.com/wolfSSL/Arduino-wolfSSL](https://github.com/wolfSSL/Arduino-wolfSSL)
|
||||
|
||||
|
||||
## Additional Information
|
||||
|
||||
- [wolfSSL Documentation](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html) and [docs/espressif](https://www.wolfssl.com/docs/espressif/)
|
||||
- [wolfSSL FAQ](https://www.wolfssl.com/docs/frequently-asked-questions-faq/)
|
||||
- [wolfSSL Products](https://www.wolfssl.com/products/)
|
||||
- [www.wolfssl.com/espressif](https://www.wolfssl.com/espressif/)
|
||||
- [More...](https://www.wolfssl.com/?s=espressif)
|
||||
|
||||
## Contact
|
||||
|
||||
Have a specific request or questions? We'd love to hear from you! Please contact us at support@wolfssl.com or open an issue on GitHub.
|
||||
|
||||
## Licensing and Support
|
||||
|
||||
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use under the GPLv2 (or at your option any later version) or a standard commercial license. For our users who cannot use wolfSSL under GPLv2 (or any later version), a commercial license to wolfSSL and wolfCrypt is available.
|
||||
|
||||
See the LICENSE.txt, visit wolfssl.com/license, contact us at licensing@wolfssl.com or call +1 425 245 8247
|
||||
|
||||
View Commercial Support Options: [wolfssl.com/products/support-and-maintenance](wolfssl.com/products/support-and-maintenance)
|
||||
|
@ -18,6 +18,8 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
#
|
||||
|
||||
$(info *********** wolfssl component ************)
|
||||
|
||||
#
|
||||
# Component Makefile
|
||||
#
|
||||
@ -48,193 +50,246 @@
|
||||
# define it here:
|
||||
CFLAGS +=-DWOLFSSL_USER_SETTINGS
|
||||
|
||||
# In the wolfSSL GitHub examples for Espressif,
|
||||
# the root is 7 directories up from here:
|
||||
WOLFSSL_ROOT := ../../../../../../../
|
||||
# Note that 4 source files created by autogen are excluded here.
|
||||
#
|
||||
# See these files commented out, below. Adjust as needed for your application:
|
||||
#
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/async.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/selftest.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_first.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_last.o
|
||||
|
||||
# NOTE: The wolfSSL include diretory (e.g. user_settings.h) is
|
||||
|
||||
# NOTICE: the WOLFSSL_ROOT setting MUST be relative!
|
||||
# See https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/api-guides/build-system.html?highlight=must+relative#optional-component-specific-variables
|
||||
# In the wolfSSL GitHub examples for Espressif:
|
||||
# https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples
|
||||
# When this wolfssl component.mk makefile is in [project]/components/wolfssl
|
||||
# The root is 7 directories up from here (the location of of this component.mk):
|
||||
WOLFSSL_ROOT := ../../../../../../..
|
||||
|
||||
# To set the location of a different location, it is best to use relative paths.
|
||||
#
|
||||
# Set WOLFSSL_ROOT to a relative path from the current component directory.
|
||||
# For example, if the wolfssl_client is copied from the examples to test:
|
||||
#
|
||||
# cp -r /IDE/Espressif/ESP-IDF/examples/wolfssl_client/* /mnt/c/test/demo
|
||||
#
|
||||
# we run make in /mnt/c/test/demo
|
||||
# component is in /mnt/c/test/demo/components/wolfssl
|
||||
# wolfssl is in /mnt/c/workspace/wolfssl-master
|
||||
#
|
||||
# "/mnt/c" is 4 directories up:
|
||||
# 2 for `./test/demo` from where we run `make`, plus
|
||||
# 2 more from the location of `component.mk` located
|
||||
# in `[currect directory]/components/wolfssl`.
|
||||
#
|
||||
# Thus we need 4 parent reference to find the relative path to wolfSSL:
|
||||
# WOLFSSL_ROOT := ../../../../workspace/wolfssl-master
|
||||
|
||||
# Optional CFLAGS (make works without these; for reference only)
|
||||
# CFLAGS += -I$(WOLFSSL_ROOT)/wolfssl
|
||||
# CFLAGS += -I$(WOLFSSL_ROOT)/wolfssl/wolfcrypt
|
||||
# CFLAGS += -I$(WOLFSSL_ROOT)/wolfssl/wolfcrypt/port/Espressif
|
||||
|
||||
abs_WOLFSSL_ROOT := $(shell realpath $(WOLFSSL_ROOT))
|
||||
|
||||
# print-wolfssl-path-value:
|
||||
# @echo "WOLFSSL_ROOT defined: $(WOLFSSL_ROOT)"
|
||||
# @echo "WOLFSSL_ROOT actual: $(abs_WOLFSSL_ROOT)"
|
||||
|
||||
$(info WOLFSSL_ROOT defined: $(WOLFSSL_ROOT))
|
||||
$(info WOLFSSL_ROOT actual: $(abs_WOLFSSL_ROOT))
|
||||
|
||||
# NOTE: The wolfSSL include directory (e.g. user_settings.h) is
|
||||
# located HERE in THIS project, and *not* in the wolfSSL root.
|
||||
COMPONENT_ADD_INCLUDEDIRS := .
|
||||
COMPONENT_ADD_INCLUDEDIRS += include
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT).
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)wolfssl
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)wolfssl/wolfcrypt
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)wolfssl/wolfcrypt/port/Espressif
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)wolfcrypt/benchmark
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/.
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfssl
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfssl/wolfcrypt
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfssl/wolfcrypt/port/Espressif
|
||||
# COMPONENT_ADD_INCLUDEDIRS += $ENV(IDF_PATH)/components/freertos/include/freertos
|
||||
# COMPONENT_ADD_INCLUDEDIRS += "$ENV(IDF_PATH)/soc/esp32s3/include/soc"
|
||||
|
||||
# wolfSSL
|
||||
COMPONENT_SRCDIRS := $(WOLFSSL_ROOT)/src
|
||||
|
||||
# WOLFSSL_ROOT := ""
|
||||
COMPONENT_SRCDIRS := $(WOLFSSL_ROOT)src
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)wolfcrypt/src/port/Espressif
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)wolfcrypt/src/port/atmel
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)wolfcrypt/benchmark
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)wolfcrypt/test
|
||||
COMPONENT_SRCDIRS += include
|
||||
# wolfcrypt
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src
|
||||
|
||||
COMPONENT_OBJEXCLUDE := $(WOLFSSL_ROOT)wolfcrypt/src/aes_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)wolfcrypt/src/evp.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)wolfcrypt/src/misc.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)wolfcrypt/src/sha512_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)wolfcrypt/src/fe_x25519_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)wolfcrypt/src/aes_gcm_x86_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)src/bio.o
|
||||
# Espressif
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/atmel
|
||||
|
||||
COMPONENT_OBJEXCLUDE := $(WOLFSSL_ROOT)/wolfcrypt/src/aes_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/evp.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/misc.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/sha512_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_x25519_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/aes_gcm_x86_asm.o
|
||||
COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/src/bio.o
|
||||
|
||||
|
||||
##
|
||||
## wolfSSL
|
||||
##
|
||||
COMPONENT_OBJS := $(WOLFSSL_ROOT)src/bio.o
|
||||
COMPONENT_OBJS := $(WOLFSSL_ROOT)/src/bio.o
|
||||
# COMPONENT_OBJS += src/conf.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/crl.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/dtls.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/dtls13.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/internal.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/keys.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/ocsp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/crl.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/dtls.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/dtls13.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/internal.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/keys.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/ocsp.o
|
||||
# COMPONENT_OBJS += src/pk.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/quic.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/sniffer.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/ssl.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/quic.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/sniffer.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/ssl.o
|
||||
# COMPONENT_OBJS += src/ssl_asn1.o
|
||||
# COMPONENT_OBJS += src/ssl_bn.o
|
||||
# COMPONENT_OBJS += src/ssl_certman.o
|
||||
# COMPONENT_OBJS += src/ssl_crypto.o
|
||||
# COMPONENT_OBJS += src/ssl_misc.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/tls.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/tls13.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)src/wolfio.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/tls.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/tls13.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/wolfio.o
|
||||
# COMPONENT_OBJS += src/x509.o
|
||||
# COMPONENT_OBJS += src/x509_str.o
|
||||
|
||||
##
|
||||
## wolfcrypt
|
||||
##
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/aes.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/arc4.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/asm.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/asn.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/async.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/blake2b.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/blake2s.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/camellia.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/chacha.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/chacha20_poly1305.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/cmac.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/coding.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/compress.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/cpuid.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/cryptocb.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/curve25519.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/curve448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/des3.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/dh.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/dilithium.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/dsa.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ecc.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/eccsi.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ecc_fp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ed25519.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ed448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/error.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/evp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ext_kyber.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ext_lms.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ext_xmss.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/falcon.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/fe_448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/fe_low_mem.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/fe_operations.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/fips.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/fips_test.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ge_448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ge_low_mem.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ge_operations.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/hash.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/hmac.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/hpke.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/integer.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/kdf.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/logging.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/md2.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/md4.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/md5.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/memory.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/misc.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/pkcs12.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/pkcs7.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/poly1305.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/pwdbased.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/random.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/rc2.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/ripemd.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/rsa.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sakke.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/selftest.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sha.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sha256.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sha3.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sha512.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/signature.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/siphash.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sm2.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sm3.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sm4.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sphincs.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_arm32.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_arm64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_armthumb.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_c32.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_c64.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_cortexm.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_dsp32.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_int.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_sm2_arm32.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_sm2_arm64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_sm2_armthumb.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_sm2_c32.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_sm2_c64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_sm2_cortexm.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_sm2_x86_64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/sp_x86_64.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/srp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/tfm.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wc_dsp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wc_encrypt.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wc_kyber.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wc_kyber_poly.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wc_lms.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wc_pkcs11.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wc_port.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wc_xmss.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wolfcrypt_first.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wolfcrypt_last.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wolfevent.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/wolfmath.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/aes.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/arc4.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/asm.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/asn.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/async.o # autogen exclusion
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/blake2b.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/blake2s.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/camellia.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/chacha.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/chacha20_poly1305.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/cmac.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/coding.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/compress.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/cpuid.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/cryptocb.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/curve25519.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/curve448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/des3.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/dh.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/dilithium.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/dsa.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ecc.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/eccsi.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ecc_fp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ed25519.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ed448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/error.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/evp.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ext_kyber.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ext_lms.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ext_xmss.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/falcon.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_low_mem.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_operations.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fips.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fips_test.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ge_448.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ge_low_mem.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ge_operations.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/hash.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/hmac.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/hpke.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/integer.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/kdf.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/logging.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/md2.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/md4.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/md5.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/memory.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/misc.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/pkcs12.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/pkcs7.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/poly1305.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/pwdbased.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/random.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/rc2.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ripemd.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/rsa.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sakke.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/selftest.o # autogen exclusion
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha256.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha3.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha512.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/signature.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/siphash.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sm2.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sm3.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sm4.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sphincs.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_arm32.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_arm64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_armthumb.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_c32.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_c64.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_cortexm.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_dsp32.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_int.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_arm32.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_arm64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_armthumb.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_c32.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_c64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_cortexm.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_x86_64.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_x86_64.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/srp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/tfm.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_dsp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_encrypt.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_kyber.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_kyber_poly.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_lms.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_pkcs11.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_port.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_xmss.o
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_first.o # autogen exclusion
|
||||
# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_last.o # autogen exclusion
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfevent.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfmath.o
|
||||
|
||||
##
|
||||
## Espressif
|
||||
##
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/port/Espressif/esp32_aes.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/port/Espressif/esp32_mp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/port/Espressif/esp32_sha.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/port/Espressif/esp32_util.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/port/Espressif/esp_sdk_time_lib.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/src/port/Espressif/esp_sdk_wifi_lib.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_aes.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_mp.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_sha.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_util.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp_sdk_time_lib.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp_sdk_wifi_lib.o
|
||||
|
||||
##
|
||||
## wolfcrypt benchmark (optional)
|
||||
##
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/benchmark/benchmark.o
|
||||
COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/benchmark/benchmark.o
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/benchmark
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfcrypt/benchmark
|
||||
|
||||
|
||||
##
|
||||
## wolfcrypt test (optional)
|
||||
##
|
||||
## COMPONENT_OBJS += $(WOLFSSL_ROOT)wolfcrypt/test/test.o
|
||||
## COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/test/test.o
|
||||
## COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/test
|
||||
|
||||
##
|
||||
## wolfcrypt
|
||||
##
|
||||
# COMPONENT_PRIV_INCLUDEDIRS += $(PROJECT_PATH)/components/wolfssl/include
|
||||
COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)wolfcrypt/src
|
||||
$(info ********** end wolfssl component **********)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* user_settings.h
|
||||
/* wolfssl-component include/user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
@ -18,19 +18,52 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#define WOLFSSL_ESPIDF_COMPONENT_VERSION 0x01
|
||||
|
||||
/* The Espressif project config file. See also sdkconfig.defaults */
|
||||
#include "sdkconfig.h"
|
||||
|
||||
/* This user_settings.h is for Espressif ESP-IDF
|
||||
*
|
||||
* Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.7.0-1
|
||||
*
|
||||
* Do not include any wolfssl headers here
|
||||
* Do not include any wolfssl headers here.
|
||||
*
|
||||
* When editing this file:
|
||||
* ensure wolfssl_test and wolfssl_benchmark settings match.
|
||||
* ensure all examples match. The template example is the reference.
|
||||
*/
|
||||
|
||||
/* The Espressif project config file. See also sdkconfig.defaults */
|
||||
#include "sdkconfig.h"
|
||||
/* Naming convention: (see also esp32-crypt.h for the reference source).
|
||||
*
|
||||
* CONFIG_
|
||||
* This prefix indicates the setting came from the sdkconfig / Kconfig.
|
||||
*
|
||||
* May or may not be related to wolfSSL.
|
||||
*
|
||||
* The name after this prefix must exactly match that in the Kconfig file.
|
||||
*
|
||||
* WOLFSSL_
|
||||
* Typical of many, but not all wolfSSL macro names.
|
||||
*
|
||||
* Applies to all wolfSSL products such as wolfSSH, wolfMQTT, etc.
|
||||
*
|
||||
* May or may not have a corresponding sdkconfig / Kconfig control.
|
||||
*
|
||||
* ESP_WOLFSSL_
|
||||
* These are NOT valid wolfSSL macro names. These are names only used in
|
||||
* the ESP-IDF Kconfig files. When parsed, they will have a "CONFIG_"
|
||||
* suffix added. See next section.
|
||||
*
|
||||
* CONFIG_ESP_WOLFSSL_
|
||||
* This is a wolfSSL-specific macro that has been defined in the ESP-IDF
|
||||
* via the sdkconfig / menuconfig. Any text after this prefix should
|
||||
* exactly match an existing wolfSSL macro name.
|
||||
*
|
||||
* Applies to all wolfSSL products such as wolfSSH, wolfMQTT, etc.
|
||||
*
|
||||
* These macros may also be specific to only the project or environment,
|
||||
* and possibly not used anywhere else in the wolfSSL libraries.
|
||||
*/
|
||||
|
||||
/* The Espressif sdkconfig will have chipset info.
|
||||
**
|
||||
@ -46,33 +79,250 @@
|
||||
#undef WOLFSSL_ESPIDF
|
||||
#define WOLFSSL_ESPIDF
|
||||
|
||||
/* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
#define NO_ESP_SDK_WIFI
|
||||
/* Test various user_settings between applications by selecting example apps
|
||||
* in `idf.py menuconfig` for Example wolfSSL Configuration settings: */
|
||||
|
||||
/* Turn on messages that are useful to see only in examples. */
|
||||
#define WOLFSSL_EXAMPLE_VERBOSITY
|
||||
|
||||
/* Paths can be long, ensure the entire value printed during debug */
|
||||
#define WOLFSSL_MAX_ERROR_SZ 500
|
||||
|
||||
/* wolfSSL Examples: set macros used in example applications.
|
||||
*
|
||||
* These Settings NOT available in ESP-IDF (e.g. esp-tls)
|
||||
*
|
||||
* Any settings needed by ESP-IDF components should be explicitly set,
|
||||
* and not by these example-specific settings via CONFIG_WOLFSSL_EXAMPLE_n
|
||||
*
|
||||
* ESP-IDF settings should be Kconfig "CONFIG_[name]" values when possible. */
|
||||
#if defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TEMPLATE)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/template */
|
||||
/* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
/* #define USE_WOLFSSL_ESP_SDK_WIFI */
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TEST)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_test */
|
||||
/* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
/* #define USE_WOLFSSL_ESP_SDK_WIFI */
|
||||
#define TEST_ESPIDF_ALL_WOLFSSL
|
||||
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_BENCHMARK)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark */
|
||||
/* We don't use WiFi, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
/* #define USE_WOLFSSL_ESP_SDK_WIFI */
|
||||
#define WOLFSSL_BENCHMARK_FIXED_UNITS_KB
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_CLIENT)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_client */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_TLS_SERVER)
|
||||
/* See https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/wolfssl_server */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* wolfSSH Examples */
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSH_TEMPLATE)
|
||||
/* See https://github.com/wolfSSL/wolfssh/tree/master/ide/Espressif/ESP-IDF/examples/wolfssh_template */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSH_ECHOSERVER)
|
||||
/* See https://github.com/wolfSSL/wolfssh/tree/master/ide/Espressif/ESP-IDF/examples/wolfssh_echoserver */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_ESP32_SSH_SERVER)
|
||||
/* See https://github.com/wolfSSL/wolfssh-examples/tree/main/Espressif/ESP32/ESP32-SSH-Server */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_ESP8266_SSH_SERVER)
|
||||
/* See https://github.com/wolfSSL/wolfssh-examples/tree/main/Espressif/ESP8266/ESP8266-SSH-Server */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* wolfMQTT Examples */
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFMQTT_TEMPLATE)
|
||||
/* See https://github.com/wolfSSL/wolfMQTT/tree/master/IDE/Espressif/ESP-IDF/examples/wolfmqtt_template */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFMQTT_AWS_IOT_MQTT)
|
||||
/* See https://github.com/wolfSSL/wolfMQTT/tree/master/IDE/Espressif/ESP-IDF/examples/AWS_IoT_MQTT */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* wolfTPM Examples */
|
||||
#elif defined(CONFIG_WOLFTPM_EXAMPLE_NAME_ESPRESSIF)
|
||||
/* See https://github.com/wolfSSL/wolfTPM/tree/master/IDE/Espressif */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* Apple HomeKit Examples */
|
||||
#elif defined(CONFIG_WOLFSSL_APPLE_HOMEKIT)
|
||||
/* See https://github.com/AchimPieters/esp32-homekit-demo */
|
||||
|
||||
/* no example selected */
|
||||
#elif defined(CONFIG_WOLFSSL_EXAMPLE_NAME_NONE)
|
||||
/* We'll assume the app needs to use wolfSSL sdk lib function */
|
||||
#define USE_WOLFSSL_ESP_SDK_WIFI
|
||||
|
||||
/* Other applications detected by cmake */
|
||||
#elif defined(APP_ESP_HTTP_CLIENT_EXAMPLE)
|
||||
/* The wolfSSL Version of the client example */
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
/* Less memory available, so smaller key sizes: */
|
||||
#define FP_MAX_BITS (4096 * 2)
|
||||
#else
|
||||
#define FP_MAX_BITS (8192 * 2)
|
||||
#endif
|
||||
#define HAVE_ALPN
|
||||
#define HAVE_SNI
|
||||
#define OPENSSL_EXTRA_X509_SMALL
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define OPENSSL_EXTRA
|
||||
#ifndef WOLFSSL_ALWAYS_VERIFY_CB
|
||||
#define WOLFSSL_ALWAYS_VERIFY_CB
|
||||
#endif
|
||||
#ifndef WOLFSSL_VERIFY_CB_ALL_CERTS
|
||||
#define WOLFSSL_VERIFY_CB_ALL_CERTS
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
|
||||
#elif defined(APP_ESP_HTTP_CLIENT)
|
||||
/* The ESP-IDF Version */
|
||||
#define FP_MAX_BITS (8192 * 2)
|
||||
#define HAVE_ALPN
|
||||
#define HAVE_SNI
|
||||
#define OPENSSL_EXTRA_X509_SMALL
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define OPENSSL_EXTRA
|
||||
#ifndef WOLFSSL_ALWAYS_VERIFY_CB
|
||||
#define WOLFSSL_ALWAYS_VERIFY_CB
|
||||
#endif
|
||||
#ifndef WOLFSSL_VERIFY_CB_ALL_CERTS
|
||||
#define WOLFSSL_VERIFY_CB_ALL_CERTS
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
#else
|
||||
#ifdef WOLFSSL_ESPIDF
|
||||
/* #warning "App config undetected" */
|
||||
#endif
|
||||
/* the code is older or does not have application name defined. */
|
||||
#endif /* Example wolfSSL Configuration app settings */
|
||||
|
||||
/* Experimental Kyber */
|
||||
#if 0
|
||||
#ifdef CONFIG_WOLFSSL_ENABLE_KYBER
|
||||
/* Kyber typically needs a minimum 10K stack */
|
||||
#define WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
#define WOLFSSL_HAVE_KYBER
|
||||
#define WOLFSSL_WC_KYBER
|
||||
#define WOLFSSL_SHA3
|
||||
#if defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
/* With limited RAM, we'll disable some of the Kyber sizes: */
|
||||
#define WOLFSSL_NO_KYBER1024
|
||||
#define WOLFSSL_NO_KYBER768
|
||||
#define NO_SESSION_CACHE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Pick a cert buffer size: */
|
||||
/* #define USE_CERT_BUFFERS_2048 */
|
||||
/* #define USE_CERT_BUFFERS_1024 */
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
/* The Espressif sdkconfig will have chipset info.
|
||||
**
|
||||
** Some possible values:
|
||||
**
|
||||
** CONFIG_IDF_TARGET_ESP32
|
||||
** CONFIG_IDF_TARGET_ESP32S2
|
||||
** CONFIG_IDF_TARGET_ESP32S3
|
||||
** CONFIG_IDF_TARGET_ESP32C3
|
||||
** CONFIG_IDF_TARGET_ESP32C6
|
||||
*/
|
||||
|
||||
/* Optionally enable Apple HomeKit from compiler directive or Kconfig setting */
|
||||
#if defined(WOLFSSL_APPLE_HOMEKIT) || defined(CONFIG_WOLFSSL_APPLE_HOMEKIT)
|
||||
/* SRP is known to need 8K; slow on some devices */
|
||||
#define FP_MAX_BITS (8192 * 2)
|
||||
#define WOLFCRYPT_HAVE_SRP
|
||||
#define HAVE_CHACHA
|
||||
#define HAVE_POLY1305
|
||||
#define WOLFSSL_BASE64_ENCODE
|
||||
#endif /* Apple HomeKit settings */
|
||||
|
||||
/* Used by ESP-IDF components: */
|
||||
#if defined(CONFIG_ESP_TLS_USING_WOLFSSL)
|
||||
/* The ESP-TLS */
|
||||
#ifndef FP_MAX_BITS
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32C2) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP8684) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
/* Optionally set smaller size here */
|
||||
#define FP_MAX_BITS MIN_FFDHE_FP_MAX_BITS
|
||||
#else
|
||||
#define FP_MAX_BITS (4096 * 2)
|
||||
#endif
|
||||
#endif
|
||||
#define HAVE_ALPN
|
||||
#ifndef CONFIG_IDF_TARGET_ESP8266
|
||||
/* Unless installed in the ESP8266 RTOS SDK locally, the wolfSSL
|
||||
* API for SNI will not be seen in the components/esp-tls layer.
|
||||
* Only enable SNI for non-ESP8266 targets by default: */
|
||||
#define HAVE_SNI
|
||||
#endif
|
||||
#define OPENSSL_EXTRA_X509_SMALL
|
||||
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#endif
|
||||
|
||||
/* Optionally enable some wolfSSH settings */
|
||||
#if defined(ESP_ENABLE_WOLFSSH) || defined(CONFIG_ESP_ENABLE_WOLFSSH)
|
||||
/* The default SSH Windows size is massive for an embedded target.
|
||||
* Limit it: */
|
||||
#define DEFAULT_WINDOW_SZ 2000
|
||||
|
||||
/* These may be defined in cmake for other examples: */
|
||||
#undef WOLFSSH_TERM
|
||||
#define WOLFSSH_TERM
|
||||
|
||||
/* optional debug */
|
||||
/* #undef DEBUG_WOLFSSH */
|
||||
/* #define DEBUG_WOLFSSH */
|
||||
|
||||
#undef WOLFSSL_KEY_GEN
|
||||
#define WOLFSSL_KEY_GEN
|
||||
|
||||
#undef WOLFSSL_PTHREADS
|
||||
#define WOLFSSL_PTHREADS
|
||||
|
||||
#define WOLFSSH_TEST_SERVER
|
||||
#define WOLFSSH_TEST_THREADING
|
||||
#endif /* ESP_ENABLE_WOLFSSH */
|
||||
|
||||
|
||||
/* Not yet using WiFi lib, so don't compile in the esp-sdk-lib WiFi helpers: */
|
||||
/* #define USE_WOLFSSL_ESP_SDK_WIFI */
|
||||
|
||||
/*
|
||||
* ONE of these Espressif chip families will be detected from sdkconfig:
|
||||
*
|
||||
* WOLFSSL_ESP32
|
||||
* WOLFSSL_ESPWROOM32SE
|
||||
* WOLFSSL_ESP8266
|
||||
*
|
||||
* following ifdef detection only for syntax highlighting:
|
||||
*/
|
||||
#undef WOLFSSL_ESPWROOM32SE
|
||||
#undef WOLFSSL_ESP8266
|
||||
#undef WOLFSSL_ESP32
|
||||
#ifdef WOLFSSL_ESPWROOM32SE
|
||||
#undef WOLFSSL_ESPWROOM32SE
|
||||
#endif
|
||||
#ifdef WOLFSSL_ESP8266
|
||||
#undef WOLFSSL_ESP8266
|
||||
#endif
|
||||
#ifdef WOLFSSL_ESP32
|
||||
#undef WOLFSSL_ESP32
|
||||
#endif
|
||||
/* See below for chipset detection from sdkconfig.h */
|
||||
|
||||
/* when you want to use SINGLE THREAD. Note Default ESP-IDF is FreeRTOS */
|
||||
/* #define SINGLE_THREADED */
|
||||
#define SINGLE_THREADED
|
||||
|
||||
/* SMALL_SESSION_CACHE saves a lot of RAM for ClientCache and SessionCache.
|
||||
/* Small session cache saves a lot of RAM for ClientCache and SessionCache.
|
||||
* Memory requirement is about 5KB, otherwise 20K is needed when not specified.
|
||||
* If extra small footprint is needed, try MICRO_SESSION_CACHE (< 1K)
|
||||
* When really desperate or no TLS used, try NO_SESSION_CACHE. */
|
||||
@ -92,130 +342,6 @@
|
||||
/* RSA_LOW_MEM: Half as much memory but twice as slow. */
|
||||
#define RSA_LOW_MEM
|
||||
|
||||
/* Uncommon settings for testing only */
|
||||
#define TEST_ESPIDF_ALL_WOLFSSL
|
||||
#ifdef TEST_ESPIDF_ALL_WOLFSSL
|
||||
#define WOLFSSL_MD2
|
||||
#define HAVE_BLAKE2
|
||||
#define HAVE_BLAKE2B
|
||||
#define HAVE_BLAKE2S
|
||||
|
||||
#define WC_RC2
|
||||
#define WOLFSSL_ALLOW_RC4
|
||||
|
||||
#define HAVE_POLY1305
|
||||
|
||||
#define WOLFSSL_AES_128
|
||||
#define WOLFSSL_AES_OFB
|
||||
#define WOLFSSL_AES_CFB
|
||||
#define WOLFSSL_AES_XTS
|
||||
|
||||
/* #define WC_SRTP_KDF */
|
||||
/* TODO Causes failure with Espressif AES HW Enabled */
|
||||
/* #define HAVE_AES_ECB */
|
||||
/* #define HAVE_AESCCM */
|
||||
/* TODO sanity check when missing HAVE_AES_ECB */
|
||||
#define WOLFSSL_WOLFSSH
|
||||
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_AES_COUNTER
|
||||
|
||||
#define HAVE_FFDHE
|
||||
#define HAVE_FFDHE_2048
|
||||
#if defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
/* TODO Full size SRP is disabled on the ESP8266 at this time.
|
||||
* Low memory issue? */
|
||||
#define WOLFCRYPT_HAVE_SRP
|
||||
/* MIN_FFDHE_FP_MAX_BITS = (MIN_FFDHE_BITS * 2); see settings.h */
|
||||
#define FP_MAX_BITS MIN_FFDHE_FP_MAX_BITS
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP32S2) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
/* TODO: SRP Not enabled, known to fail on this target
|
||||
* See https://github.com/wolfSSL/wolfssl/issues/7210 */
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32C3) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP32H2)
|
||||
/* SRP Known to be working on this target::*/
|
||||
#define WOLFCRYPT_HAVE_SRP
|
||||
#define FP_MAX_BITS (8192 * 2)
|
||||
#else
|
||||
/* For everything else, give a try and see if SRP working: */
|
||||
#define WOLFCRYPT_HAVE_SRP
|
||||
#define FP_MAX_BITS (8192 * 2)
|
||||
#endif
|
||||
|
||||
#define HAVE_DH
|
||||
|
||||
/* TODO: there may be a problem with HAVE_CAMELLIA with HW AES disabled.
|
||||
* Do not define NO_WOLFSSL_ESP32_CRYPT_AES when enabled: */
|
||||
/* #define HAVE_CAMELLIA */
|
||||
|
||||
/* DSA requires old SHA */
|
||||
#define HAVE_DSA
|
||||
|
||||
/* Needs SHA512 ? */
|
||||
#define HAVE_HPKE
|
||||
|
||||
/* Not for Espressif? */
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32C2) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP8684) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP32H2) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
#undef HAVE_ECC
|
||||
#undef HAVE_ECC_CDH
|
||||
#undef HAVE_CURVE25519
|
||||
|
||||
/* TODO does CHACHA also need alignment? Failing on ESP8266
|
||||
* See SHA256 __attribute__((aligned(4))); and WC_SHA256_ALIGN */
|
||||
#ifdef HAVE_CHACHA
|
||||
#error "HAVE_CHACHA not supported on ESP8266"
|
||||
#endif
|
||||
#ifdef HAVE_XCHACHA
|
||||
#error "HAVE_XCHACHA not supported on ESP8266"
|
||||
#endif
|
||||
#else
|
||||
#define HAVE_XCHACHA
|
||||
#define HAVE_CHACHA
|
||||
/* TODO Not enabled at this time, needs further testing:
|
||||
* #define WC_SRTP_KDF
|
||||
* #define HAVE_COMP_KEY
|
||||
* #define WOLFSSL_HAVE_XMSS
|
||||
*/
|
||||
#endif
|
||||
/* TODO AES-EAX not working on this platform */
|
||||
|
||||
/* Optionally disable DH
|
||||
* #undef HAVE_DH
|
||||
* #undef HAVE_FFDHE
|
||||
*/
|
||||
|
||||
/* ECC_SHAMIR out of memory on ESP32-C2 during ECC */
|
||||
#ifndef HAVE_ECC
|
||||
#define ECC_SHAMIR
|
||||
#endif
|
||||
#else
|
||||
#define WOLFSSL_AES_EAX
|
||||
|
||||
#define ECC_SHAMIR
|
||||
#endif
|
||||
|
||||
/* Only for WOLFSSL_IMX6_CAAM / WOLFSSL_QNX_CAAM ? */
|
||||
/* #define WOLFSSL_CAAM */
|
||||
/* #define WOLFSSL_CAAM_BLOB */
|
||||
|
||||
#define WOLFSSL_AES_SIV
|
||||
#define WOLFSSL_CMAC
|
||||
|
||||
#define WOLFSSL_CERT_PIV
|
||||
|
||||
/* HAVE_SCRYPT may turn on HAVE_PBKDF2 see settings.h */
|
||||
/* #define HAVE_SCRYPT */
|
||||
#define SCRYPT_TEST_ALL
|
||||
#define HAVE_X963_KDF
|
||||
#endif
|
||||
|
||||
/* optionally turn off SHA512/224 SHA512/256 */
|
||||
/* #define WOLFSSL_NOSHA512_224 */
|
||||
/* #define WOLFSSL_NOSHA512_256 */
|
||||
@ -230,14 +356,40 @@
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
/* TLS 1.3 */
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_HKDF
|
||||
#define HAVE_AEAD
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#ifdef CONFIG_WOLFSSL_ALLOW_TLS13
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_HKDF
|
||||
|
||||
#define WOLFSSL_BENCHMARK_FIXED_UNITS_KB
|
||||
/* May be required */
|
||||
#ifndef HAVE_AEAD
|
||||
#endif
|
||||
|
||||
/* Required for ECC */
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
/* Required for RSA */
|
||||
#define WC_RSA_PSS
|
||||
|
||||
/* TLS 1.3 normally requires HAVE_FFDHE */
|
||||
#if defined(HAVE_FFDHE_2048) || \
|
||||
defined(HAVE_FFDHE_3072) || \
|
||||
defined(HAVE_FFDHE_4096) || \
|
||||
defined(HAVE_FFDHE_6144) || \
|
||||
defined(HAVE_FFDHE_8192)
|
||||
#else
|
||||
#define HAVE_FFDHE_2048
|
||||
/* #error "TLS 1.3 requires HAVE_FFDHE_[nnnn]" */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32C2) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP8684)
|
||||
/* Optionally set smaller size here */
|
||||
#define HAVE_FFDHE_4096
|
||||
#else
|
||||
#define HAVE_FFDHE_4096
|
||||
#endif
|
||||
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
@ -254,32 +406,67 @@
|
||||
/* when you want to use SHA384 */
|
||||
#define WOLFSSL_SHA384
|
||||
|
||||
/* when you want to use SHA512 */
|
||||
#define WOLFSSL_SHA512
|
||||
|
||||
/* when you want to use SHA3 */
|
||||
#define WOLFSSL_SHA3
|
||||
|
||||
/* ED25519 requires SHA512 */
|
||||
#define HAVE_ED25519
|
||||
|
||||
/* Some features not enabled for ESP8266: */
|
||||
#if defined(CONFIG_IDF_TARGET_ESP8266) || \
|
||||
defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
/* Some known low-memory devices have features not enabled by default. */
|
||||
/* TODO determine low memory configuration for ECC. */
|
||||
#else
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
/* when you want to use SHA512 */
|
||||
#define WOLFSSL_SHA512
|
||||
|
||||
/* when you want to use SHA3 */
|
||||
/* #define WOLFSSL_SHA3 */
|
||||
|
||||
/* ED25519 requires SHA512 */
|
||||
#define HAVE_ED25519
|
||||
#endif
|
||||
|
||||
#define HAVE_ED25519
|
||||
#if defined(CONFIG_IDF_TARGET_ESP8266) || defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
#define MY_USE_ECC 0
|
||||
#define MY_USE_RSA 1
|
||||
#else
|
||||
#define MY_USE_ECC 1
|
||||
#define MY_USE_RSA 0
|
||||
#endif
|
||||
|
||||
/* Optional OPENSSL compatibility */
|
||||
#define OPENSSL_EXTRA
|
||||
/* We can use either or both ECC and RSA, but must use at least one. */
|
||||
#if MY_USE_ECC || MY_USE_RSA
|
||||
#if MY_USE_ECC
|
||||
/* ---- ECDSA / ECC ---- */
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define HAVE_ED25519
|
||||
#define WOLFSSL_SHA512
|
||||
/*
|
||||
#define HAVE_ECC384
|
||||
#define CURVE25519_SMALL
|
||||
*/
|
||||
#else
|
||||
#define WOLFSSH_NO_ECC
|
||||
/* WOLFSSH_NO_ECDSA is typically defined automatically,
|
||||
* here for clarity: */
|
||||
#define WOLFSSH_NO_ECDSA
|
||||
#endif
|
||||
|
||||
#if MY_USE_RSA
|
||||
/* ---- RSA ----- */
|
||||
/* #define RSA_LOW_MEM */
|
||||
|
||||
/* DH disabled by default, needed if ECDSA/ECC also turned off */
|
||||
#define HAVE_DH
|
||||
#else
|
||||
#define WOLFSSH_NO_RSA
|
||||
#endif
|
||||
#else
|
||||
#error "Either RSA or ECC must be enabled"
|
||||
#endif
|
||||
|
||||
/* Optional OpenSSL compatibility */
|
||||
/* #define OPENSSL_EXTRA */
|
||||
|
||||
/* #Optional HAVE_PKCS7 */
|
||||
#define HAVE_PKCS7
|
||||
/* #define HAVE_PKCS7 */
|
||||
|
||||
#if defined(HAVE_PKCS7)
|
||||
/* HAVE_PKCS7 may enable HAVE_PBKDF2 see settings.h */
|
||||
@ -319,8 +506,11 @@
|
||||
/* #define XTIME time */
|
||||
|
||||
|
||||
/* adjust wait-timeout count if you see timeout in RSA HW acceleration */
|
||||
#define ESP_RSA_TIMEOUT_CNT 0x349F00
|
||||
/* Adjust wait-timeout count if you see timeout in RSA HW acceleration.
|
||||
* Set to very large number and enable WOLFSSL_HW_METRICS to determine max. */
|
||||
#ifndef ESP_RSA_TIMEOUT_CNT
|
||||
#define ESP_RSA_TIMEOUT_CNT 0xFF0000
|
||||
#endif
|
||||
|
||||
/* hash limit for test.c */
|
||||
#define HASH_SIZE_LIMIT
|
||||
@ -329,7 +519,7 @@
|
||||
#define USE_FAST_MATH
|
||||
|
||||
/***** Use SP_MATH *****/
|
||||
/* #undef USE_FAST_MATH */
|
||||
/* #undef USE_FAST_MATH */
|
||||
/* #define SP_MATH */
|
||||
/* #define WOLFSSL_SP_MATH_ALL */
|
||||
/* #define WOLFSSL_SP_RISCV32 */
|
||||
@ -338,6 +528,14 @@
|
||||
/* #undef USE_FAST_MATH */
|
||||
/* #define USE_INTEGER_HEAP_MATH */
|
||||
|
||||
/* Just syntax highlighting to check math libraries: */
|
||||
#if defined(SP_MATH) || \
|
||||
defined(USE_INTEGER_HEAP_MATH) || \
|
||||
defined(USE_INTEGER_HEAP_MATH) || \
|
||||
defined(USE_FAST_MATH) || \
|
||||
defined(WOLFSSL_SP_MATH_ALL) || \
|
||||
defined(WOLFSSL_SP_RISCV32)
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
|
||||
@ -345,18 +543,32 @@
|
||||
#define HAVE_VERSION_EXTENDED_INFO
|
||||
/* #define HAVE_WC_INTROSPECTION */
|
||||
|
||||
#define HAVE_SESSION_TICKET
|
||||
#ifndef NO_SESSION_CACHE
|
||||
#define HAVE_SESSION_TICKET
|
||||
#endif
|
||||
|
||||
/* #define HAVE_HASHDRBG */
|
||||
|
||||
#if 0
|
||||
/* Example for additional cert functions */
|
||||
#define WOLFSSL_KEY_GEN
|
||||
#define WOLFSSL_CERT_REQ
|
||||
#define WOLFSSL_CERT_GEN
|
||||
#define WOLFSSL_CERT_EXT
|
||||
#define WOLFSSL_SYS_CA_CERTS
|
||||
#define WOLFSSL_CERT_REQ
|
||||
#define WOLFSSL_CERT_GEN
|
||||
#define WOLFSSL_CERT_EXT
|
||||
#define WOLFSSL_SYS_CA_CERTS
|
||||
|
||||
|
||||
#define WOLFSSL_CERT_TEXT
|
||||
#define WOLFSSL_CERT_TEXT
|
||||
|
||||
/* command-line options
|
||||
--enable-keygen
|
||||
--enable-certgen
|
||||
--enable-certreq
|
||||
--enable-certext
|
||||
--enable-asn-template
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_ASN_TEMPLATE
|
||||
|
||||
@ -376,10 +588,62 @@
|
||||
--enable-asn-template
|
||||
*/
|
||||
|
||||
/* optional SM4 Ciphers. See https://github.com/wolfSSL/wolfsm */
|
||||
/*
|
||||
#define WOLFSSL_SM2
|
||||
#define WOLFSSL_SM3
|
||||
#define WOLFSSL_SM4
|
||||
*/
|
||||
|
||||
#if defined(WOLFSSL_SM2) || defined(WOLFSSL_SM3) || defined(WOLFSSL_SM4)
|
||||
/* SM settings, possible cipher suites:
|
||||
|
||||
TLS13-AES128-GCM-SHA256
|
||||
TLS13-CHACHA20-POLY1305-SHA256
|
||||
TLS13-SM4-GCM-SM3
|
||||
TLS13-SM4-CCM-SM3
|
||||
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "TLS13-SM4-GCM-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "TLS13-SM4-CCM-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "ECDHE-ECDSA-SM4-CBC-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "ECDHE-ECDSA-SM4-GCM-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "ECDHE-ECDSA-SM4-CCM-SM3"
|
||||
#define WOLFSSL_ESP32_CIPHER_SUITE "TLS13-SM4-GCM-SM3:" \
|
||||
"TLS13-SM4-CCM-SM3:"
|
||||
*/
|
||||
|
||||
#undef WOLFSSL_BASE16
|
||||
#define WOLFSSL_BASE16 /* required for WOLFSSL_SM2 */
|
||||
|
||||
#undef WOLFSSL_SM4_ECB
|
||||
#define WOLFSSL_SM4_ECB
|
||||
|
||||
#undef WOLFSSL_SM4_CBC
|
||||
#define WOLFSSL_SM4_CBC
|
||||
|
||||
#undef WOLFSSL_SM4_CTR
|
||||
#define WOLFSSL_SM4_CTR
|
||||
|
||||
#undef WOLFSSL_SM4_GCM
|
||||
#define WOLFSSL_SM4_GCM
|
||||
|
||||
#undef WOLFSSL_SM4_CCM
|
||||
#define WOLFSSL_SM4_CCM
|
||||
|
||||
#define HAVE_POLY1305
|
||||
#define HAVE_CHACHA
|
||||
|
||||
#undef HAVE_AESGCM
|
||||
#define HAVE_AESGCM
|
||||
#else
|
||||
/* default settings */
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#endif
|
||||
|
||||
/* Chipset detection from sdkconfig.h
|
||||
* Default is HW enabled unless turned off.
|
||||
* Uncomment lines to force SW instead of HW acceleration */
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(WOLFSSL_ESPWROOM32SE)
|
||||
#define WOLFSSL_ESP32
|
||||
/* Alternatively, if there's an ECC Secure Element present: */
|
||||
/* #define WOLFSSL_ESPWROOM32SE */
|
||||
@ -501,12 +765,16 @@
|
||||
#define WOLFSSL_ESP8266
|
||||
|
||||
/* There's no hardware encryption on the ESP8266 */
|
||||
/* Consider using the ESP32-C2/C3/C6
|
||||
* See https://www.espressif.com/en/products/socs/esp32-c2 */
|
||||
/* Consider using the ESP32-C2/C3/C6 */
|
||||
#define NO_ESP32_CRYPT
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_HASH
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_AES
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
|
||||
#ifndef FP_MAX_BITS
|
||||
/* FP_MAX_BITS matters in wolfssl_test, not just TLS setting. */
|
||||
/* MIN_FFDHE_FP_MAX_BITS = (MIN_FFDHE_BITS * 2); see settings.h */
|
||||
#define FP_MAX_BITS MIN_FFDHE_FP_MAX_BITS
|
||||
#endif
|
||||
/***** END CONFIG_IDF_TARGET_ESP266 *****/
|
||||
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP8684)
|
||||
@ -556,18 +824,33 @@
|
||||
/* Debug options:
|
||||
See wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h for details on debug options
|
||||
|
||||
optionally increase error message size for very long paths.
|
||||
#define WOLFSSL_MAX_ERROR_SZ 500
|
||||
|
||||
Turn wolfSSL debugging on/off:
|
||||
wolfSSL_Debugging_ON();
|
||||
wolfSSL_Debugging_OFF();
|
||||
|
||||
#define ESP_VERIFY_MEMBLOCK
|
||||
#define DEBUG_WOLFSSL
|
||||
#define DEBUG_WOLFSSL_VERBOSE
|
||||
#define DEBUG_WOLFSSL_SHA_MUTEX
|
||||
#define WOLFSSL_DEBUG_IGNORE_ASN_TIME
|
||||
#define WOLFSSL_DEBUG_CERT_BUNDLE
|
||||
#define WOLFSSL_DEBUG_CERT_BUNDLE_NAME
|
||||
#define WOLFSSL_ESP32_CRYPT_DEBUG
|
||||
#define WOLFSSL_ESP32_CRYPT_HASH_SHA224_DEBUG
|
||||
#define NO_RECOVER_SOFTWARE_CALC
|
||||
#define WOLFSSL_TEST_STRAY 1
|
||||
#define USE_ESP_DPORT_ACCESS_READ_BUFFER
|
||||
#define WOLFSSL_ESP32_HW_LOCK_DEBUG
|
||||
#define WOLFSSL_DEBUG_MUTEX
|
||||
#define WOLFSSL_DEBUG_ESP_RSA_MULM_BITS
|
||||
#define WOLFSSL_DEBUG_ESP_HW_MOD_RSAMAX_BITS
|
||||
#define WOLFSSL_DEBUG_ESP_HW_MULTI_RSAMAX_BITS
|
||||
#define ESP_DISABLE_HW_TASK_LOCK
|
||||
#define ESP_MONITOR_HW_TASK_LOCK
|
||||
#define USE_ESP_DPORT_ACCESS_READ_BUFFER
|
||||
|
||||
See wolfcrypt/benchmark/benchmark.c for debug and other settings:
|
||||
|
||||
@ -579,7 +862,8 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
*/
|
||||
|
||||
/* Pause in a loop rather than exit. */
|
||||
#define WOLFSSL_ESPIDF_ERROR_PAUSE
|
||||
/* #define WOLFSSL_ESPIDF_ERROR_PAUSE */
|
||||
/* #define WOLFSSL_ESP32_HW_LOCK_DEBUG */
|
||||
|
||||
#define WOLFSSL_HW_METRICS
|
||||
|
||||
@ -628,6 +912,12 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
* There are various certificate examples in this header file:
|
||||
* https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/certs_test.h
|
||||
*
|
||||
* To use the sample certificates in code (not recommended for production!):
|
||||
*
|
||||
* #if defined(USE_CERT_BUFFERS_2048) || defined(USE_CERT_BUFFERS_1024)
|
||||
* #include <wolfssl/certs_test.h>
|
||||
* #endif
|
||||
*
|
||||
* To use the sets of macros below, define *one* of these:
|
||||
*
|
||||
* USE_CERT_BUFFERS_1024 - ECC 1024 bit encoded ASN1
|
||||
@ -705,7 +995,8 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define WOLFSSL_BASE16
|
||||
#else
|
||||
#if defined(USE_CERT_BUFFERS_2048)
|
||||
/* Be sure to include in app when using example certs: */
|
||||
#define USE_CERT_BUFFERS_256
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#define CTX_CA_CERT ca_cert_der_2048
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
|
||||
@ -726,7 +1017,8 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
|
||||
#elif defined(USE_CERT_BUFFERS_1024)
|
||||
/* Be sure to include in app when using example certs: */
|
||||
#define USE_CERT_BUFFERS_256
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#define CTX_CA_CERT ca_cert_der_1024
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024
|
||||
@ -750,3 +1042,34 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024"
|
||||
#endif
|
||||
#endif /* Conditional key and cert constant names */
|
||||
|
||||
/******************************************************************************
|
||||
** Sanity Checks
|
||||
******************************************************************************/
|
||||
#if defined(CONFIG_ESP_MAIN_TASK_STACK_SIZE)
|
||||
#if defined(WOLFCRYPT_HAVE_SRP)
|
||||
#if defined(FP_MAX_BITS)
|
||||
#if FP_MAX_BITS < (8192 * 2)
|
||||
#define ESP_SRP_MINIMUM_STACK_8K (24 * 1024)
|
||||
#else
|
||||
#define ESP_SRP_MINIMUM_STACK_8K (28 * 1024)
|
||||
#endif
|
||||
#else
|
||||
#error "Please define FP_MAX_BITS when using WOLFCRYPT_HAVE_SRP."
|
||||
#endif
|
||||
|
||||
#if (CONFIG_ESP_MAIN_TASK_STACK_SIZE < ESP_SRP_MINIMUM_STACK)
|
||||
#warning "WOLFCRYPT_HAVE_SRP enabled with small stack size"
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#warning "CONFIG_ESP_MAIN_TASK_STACK_SIZE not defined!"
|
||||
#endif
|
||||
/* See settings.h for some of the possible hardening options:
|
||||
*
|
||||
* #define NO_ESPIDF_DEFAULT
|
||||
* #define WC_NO_CACHE_RESISTANT
|
||||
* #define WC_AES_BITSLICED
|
||||
* #define HAVE_AES_ECB
|
||||
* #define HAVE_AES_DIRECT
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
# wolfSSL Espressif Example Project/main CMakeLists.txt
|
||||
# v1.1
|
||||
#
|
||||
# wolfssl benchmark test
|
||||
#
|
||||
@ -19,7 +21,7 @@ if( EXISTS "${CMAKE_HOME_DIRECTORY}/components/wolfssl/" AND EXISTS "$ENV{IDF_PA
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS main.c
|
||||
INCLUDE_DIRS "."
|
||||
INCLUDE_DIRS "."
|
||||
"./include")
|
||||
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* benchmark main.h
|
||||
/* wolfssl_benchmark main.h
|
||||
*
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
@ -19,12 +19,9 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef _MAIN_
|
||||
#define _MAIN_
|
||||
#ifndef _MAIN_H_
|
||||
#define _MAIN_H_
|
||||
|
||||
void app_main(void);
|
||||
|
||||
/* see wolfssl/wolfcrypt/benchmark/benchmark.h */
|
||||
extern void wolf_benchmark_task();
|
||||
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user