Compare commits
997 Commits
pr-8603
...
v5.8.2-sta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
decea12e22 | ||
|
|
c34e6ab8d9 | ||
|
|
fa1842e56d | ||
|
|
c8a9e9ea12 | ||
|
|
8bde512676 | ||
|
|
8d1289c1d7 | ||
|
|
01313cc0c8 | ||
|
|
2c90d1585a | ||
|
|
c341a9fc05 | ||
|
|
e06f1bbf02 | ||
|
|
9430c8a5a1 | ||
|
|
049e88b525 | ||
|
|
2c341a5806 | ||
|
|
91321fccec | ||
|
|
9c2ea12563 | ||
|
|
efdca85aec | ||
|
|
1f71e6d246 | ||
|
|
bbc5dc528b | ||
|
|
80c9212dd9 | ||
|
|
ee3b459e16 | ||
|
|
99d26f0347 | ||
|
|
607d5d798b | ||
|
|
d90394efa6 | ||
|
|
70bdd9f990 | ||
|
|
a36f9085c1 | ||
|
|
0001bf7983 | ||
|
|
1e3966f06d | ||
|
|
388eea3cf2 | ||
|
|
046e46a67f | ||
|
|
8d68977e33 | ||
|
|
e65647faa8 | ||
|
|
4d4228caa1 | ||
|
|
629c5b4cf6 | ||
|
|
362f0a2cfd | ||
|
|
3ce8c6e4fa | ||
|
|
f776c95e54 | ||
|
|
f942990113 | ||
|
|
2df674bd59 | ||
|
|
047d1bd69f | ||
|
|
c7ff47d5ee | ||
|
|
aa3a325add | ||
|
|
c9d451e857 | ||
|
|
a00cfcb55f | ||
|
|
b4137fe2f8 | ||
|
|
ed6d189f1a | ||
|
|
ae48ee408e | ||
|
|
6d51b73626 | ||
|
|
3f65846e67 | ||
|
|
783ab14afb | ||
|
|
f49e583721 | ||
|
|
e73fa74f14 | ||
|
|
0aacffd6a2 | ||
|
|
b2143a815f | ||
|
|
2b07b9143b | ||
|
|
98adb330ef | ||
|
|
7ba6f836c4 | ||
|
|
c3518e473b | ||
|
|
b0a5d2fdf0 | ||
|
|
cf35abccb8 | ||
|
|
ae19c55182 | ||
|
|
01e8815762 | ||
|
|
7c6afeb106 | ||
|
|
f733ade6a2 | ||
|
|
3f83ed2815 | ||
|
|
3c00e26274 | ||
|
|
5d89ca6706 | ||
|
|
e37082e496 | ||
|
|
97b3364720 | ||
|
|
c83a452a3c | ||
|
|
d2ab6edbab | ||
|
|
ebeb95e47b | ||
|
|
6de2557748 | ||
|
|
7b7c658668 | ||
|
|
703bd6d0ba | ||
|
|
0407ea131b | ||
|
|
f62d0fa256 | ||
|
|
d6a72e2480 | ||
|
|
88da86e900 | ||
|
|
f44178ca1b | ||
|
|
08ec3642f0 | ||
|
|
9b92b4c902 | ||
|
|
0d14ec3547 | ||
|
|
de00bf259d | ||
|
|
de59e9d25e | ||
|
|
61e4142fe0 | ||
|
|
65f9cdb498 | ||
|
|
51c9448aa1 | ||
|
|
f0041cd761 | ||
|
|
e649e1047f | ||
|
|
ee8be22a3f | ||
|
|
70e53d1a34 | ||
|
|
a40b56ccb5 | ||
|
|
ef3a1a28d9 | ||
|
|
d1893dbdec | ||
|
|
688bc168de | ||
|
|
fb691fac94 | ||
|
|
41eef2ef71 | ||
|
|
478bfafea3 | ||
|
|
d8caa8493f | ||
|
|
519d1430d0 | ||
|
|
3fe84bf3c0 | ||
|
|
5615993f48 | ||
|
|
01de7cc04b | ||
|
|
7abaa131d3 | ||
|
|
c0837cb073 | ||
|
|
2ddd98927f | ||
|
|
1d1a87b0a2 | ||
|
|
bdd2056645 | ||
|
|
a1fa897572 | ||
|
|
c925ba2fe1 | ||
|
|
6be8a3710d | ||
|
|
b60a05f45e | ||
|
|
c48dd28741 | ||
|
|
7f50cd537e | ||
|
|
59061aebec | ||
|
|
dd69d56e33 | ||
|
|
adc3f1b3d7 | ||
|
|
f7ea8fca67 | ||
|
|
0160af0a0d | ||
|
|
d2083db6de | ||
|
|
6275f1f7e6 | ||
|
|
f0662e0578 | ||
|
|
dc05c4c01b | ||
|
|
3a43109208 | ||
|
|
b3944a73c2 | ||
|
|
b25d484a4e | ||
|
|
8cc2ba7153 | ||
|
|
221330df0b | ||
|
|
9e811b5bd5 | ||
|
|
fa9e122f1c | ||
|
|
9ac480a60d | ||
|
|
af05fa874f | ||
|
|
ff80d62db2 | ||
|
|
33510ad714 | ||
|
|
c06fa48e75 | ||
|
|
f2abadb777 | ||
|
|
a8fc68d81b | ||
|
|
8fa0f6b3df | ||
|
|
77792ace65 | ||
|
|
9cf5bbcd35 | ||
|
|
fd1954babf | ||
|
|
709581061e | ||
|
|
7c4de54e73 | ||
|
|
574de4b234 | ||
|
|
7fb750962b | ||
|
|
5db7fc05d8 | ||
|
|
ae9ba6627c | ||
|
|
6c8ab11f5f | ||
|
|
1127dabe98 | ||
|
|
89148f98b0 | ||
|
|
018ee9754f | ||
|
|
d1c1bca9e4 | ||
|
|
7621612eb8 | ||
|
|
68cf96e7f6 | ||
|
|
d998d01a0c | ||
|
|
1db3dbcc28 | ||
|
|
4421f8bd84 | ||
|
|
3a200387c0 | ||
|
|
22c8a014e3 | ||
|
|
9a2c8840e2 | ||
|
|
8b61cd6c4a | ||
|
|
295d90655b | ||
|
|
20a2ec0fc1 | ||
|
|
edacf0434c | ||
|
|
a7430b3f70 | ||
|
|
f713882c54 | ||
|
|
81e1eb4600 | ||
|
|
0302dbcb31 | ||
|
|
5eceb4faf4 | ||
|
|
a0cd18daea | ||
|
|
8ab08f7b17 | ||
|
|
9b6b41627e | ||
|
|
1321e00e45 | ||
|
|
79b6e62668 | ||
|
|
7c44f14e77 | ||
|
|
d3b30f8d51 | ||
|
|
877bade216 | ||
|
|
7232b3a6bb | ||
|
|
f1cb4d579c | ||
|
|
b734c47cc9 | ||
|
|
981ba4b14c | ||
|
|
41e2d920a5 | ||
|
|
d49eb5f2c4 | ||
|
|
6fb1c54c29 | ||
|
|
6bfd2632db | ||
|
|
23a37b2ebc | ||
|
|
d6d124bb85 | ||
|
|
29f534f3b0 | ||
|
|
38892fdd07 | ||
|
|
6b7fe091bf | ||
|
|
f119086d3e | ||
|
|
80a234a0c5 | ||
|
|
e9e00c47ab | ||
|
|
9ae221444c | ||
|
|
7b5e3e2551 | ||
|
|
6bba48d89c | ||
|
|
39cef87e43 | ||
|
|
caaa4fbc5d | ||
|
|
3e774f8074 | ||
|
|
4275b66211 | ||
|
|
4fd0029f18 | ||
|
|
f33d1d69bb | ||
|
|
495324d4dc | ||
|
|
07f76723e2 | ||
|
|
1c1c556e5e | ||
|
|
e223da457c | ||
|
|
d76386f38c | ||
|
|
05c8bc7514 | ||
|
|
6cf3b51333 | ||
|
|
5c9ad359d1 | ||
|
|
fe7d458d29 | ||
|
|
1c5e531332 | ||
|
|
c33035e6a6 | ||
|
|
838636c76b | ||
|
|
1e0e4932ca | ||
|
|
33972e3678 | ||
|
|
f5f0bdf61e | ||
|
|
41591e7eb9 | ||
|
|
191165a021 | ||
|
|
dc57adcfed | ||
|
|
c7ff3b99b7 | ||
|
|
ad9d068174 | ||
|
|
111feedadc | ||
|
|
c7f6673e53 | ||
|
|
ebe8816c2a | ||
|
|
78362bc346 | ||
|
|
33584550e8 | ||
|
|
803edb0fa4 | ||
|
|
bfebeae533 | ||
|
|
b8aa4bd84b | ||
|
|
5503ea8e6d | ||
|
|
5d7cb2ec07 | ||
|
|
72ec4029d1 | ||
|
|
423ecf8b1f | ||
|
|
a0f6b779a5 | ||
|
|
bf928795b3 | ||
|
|
1dff76782b | ||
|
|
43df11c9c1 | ||
|
|
8c1298a1d8 | ||
|
|
d05790ed89 | ||
|
|
fc1d281268 | ||
|
|
f8bb889712 | ||
|
|
978a29da0b | ||
|
|
9ee212cacc | ||
|
|
c4428a432f | ||
|
|
d45e42e2e6 | ||
|
|
6385999ae9 | ||
|
|
aec13923a7 | ||
|
|
f1005c33fb | ||
|
|
caf8494d65 | ||
|
|
d4c827bc5e | ||
|
|
b361c62372 | ||
|
|
47a8242093 | ||
|
|
bcdce75b08 | ||
|
|
f36f86ee98 | ||
|
|
afa22dfc2b | ||
|
|
b9455bc94b | ||
|
|
1be303866e | ||
|
|
f30c54abdd | ||
|
|
af78ed8b6f | ||
|
|
7977a605c5 | ||
|
|
e1fe186753 | ||
|
|
0f119ab8e2 | ||
|
|
b98cf8882b | ||
|
|
380e068df6 | ||
|
|
9f900d4b8a | ||
|
|
4c6279c6c7 | ||
|
|
17f3da11d2 | ||
|
|
9b50708741 | ||
|
|
7610b4e2f5 | ||
|
|
96a3591f98 | ||
|
|
8f0106a7fe | ||
|
|
64bc41a3c3 | ||
|
|
f7fb68dedc | ||
|
|
7289687b44 | ||
|
|
62721f4d51 | ||
|
|
16aab18ae9 | ||
|
|
cdd02f9665 | ||
|
|
9c35c0de65 | ||
|
|
7dfb782c9e | ||
|
|
74de689941 | ||
|
|
27176a5eeb | ||
|
|
e5a9c7039c | ||
|
|
9528aaf238 | ||
|
|
cdbc4cb3b3 | ||
|
|
c39f1fe721 | ||
|
|
dc70cfa3b3 | ||
|
|
6f78c26bff | ||
|
|
c724c6560d | ||
|
|
feaae9fc58 | ||
|
|
0b6c53c8b0 | ||
|
|
7d77446964 | ||
|
|
d39295166f | ||
|
|
6b68797b4f | ||
|
|
7e864c177d | ||
|
|
fe5ae0cbdf | ||
|
|
a035b045a4 | ||
|
|
7e4ec84124 | ||
|
|
9c9465aa23 | ||
|
|
05aa4f5f08 | ||
|
|
2366718d5a | ||
|
|
304019d28d | ||
|
|
e8c110d2ac | ||
|
|
6633b52e28 | ||
|
|
83954100d6 | ||
|
|
9defad0b24 | ||
|
|
9c54032159 | ||
|
|
5e6c1ba05f | ||
|
|
d28045daa8 | ||
|
|
3e5e470005 | ||
|
|
037ccbaa05 | ||
|
|
842e2366e3 | ||
|
|
5151a2297a | ||
|
|
cafb1f5fd7 | ||
|
|
f865e0de97 | ||
|
|
60f442b04e | ||
|
|
bab7677273 | ||
|
|
3b198babe3 | ||
|
|
172728bf7f | ||
|
|
5696582add | ||
|
|
375af753aa | ||
|
|
2f210b3907 | ||
|
|
296bfd258c | ||
|
|
0eecfbfb35 | ||
|
|
cd76615e49 | ||
|
|
7c1980fe01 | ||
|
|
b13fdaa05e | ||
|
|
5664507e65 | ||
|
|
385be1c08a | ||
|
|
3da72fb9b6 | ||
|
|
9a576d9e2e | ||
|
|
e82c099bec | ||
|
|
72db5e5108 | ||
|
|
aca6da66f6 | ||
|
|
3bd9b2e0bc | ||
|
|
ce61f0d517 | ||
|
|
b1b49c9ffb | ||
|
|
509491f554 | ||
|
|
d5ce9744a4 | ||
|
|
89e51025ab | ||
|
|
e852c090c0 | ||
|
|
05ff12969e | ||
|
|
37554a13db | ||
|
|
ff1baf0ae7 | ||
|
|
8bde5e6982 | ||
|
|
e74214ded0 | ||
|
|
8181561f0f | ||
|
|
1549425411 | ||
|
|
b6b58a957b | ||
|
|
bb5291aa5e | ||
|
|
41965750c8 | ||
|
|
6cb0c8513d | ||
|
|
b78f8a4ed6 | ||
|
|
c5e63b84ca | ||
|
|
2fc1110a13 | ||
|
|
701e3ba64e | ||
|
|
bfdce3a345 | ||
|
|
6571f42cb9 | ||
|
|
abdcf4dbc5 | ||
|
|
394a25b376 | ||
|
|
8ee1f8f287 | ||
|
|
675ff71b0b | ||
|
|
1c85a76ddd | ||
|
|
d66863d0ac | ||
|
|
ae87afa677 | ||
|
|
47cf634965 | ||
|
|
4207affc72 | ||
|
|
d0134f2212 | ||
|
|
a7a5062c7a | ||
|
|
fbbb6b7707 | ||
|
|
31490ab813 | ||
|
|
d138c48a00 | ||
|
|
2d892f07eb | ||
|
|
047f0bb5fc | ||
|
|
eb3c324ea4 | ||
|
|
94f5948f20 | ||
|
|
81852e7425 | ||
|
|
cb90b78688 | ||
|
|
1c6e3d729a | ||
|
|
106bcb22d3 | ||
|
|
4ae8ca03ac | ||
|
|
587d5c783b | ||
|
|
133e238359 | ||
|
|
496b0911be | ||
|
|
3e6703e1fb | ||
|
|
1024bf0109 | ||
|
|
92b6e2f2e9 | ||
|
|
519b314cf2 | ||
|
|
59ff71f936 | ||
|
|
7b0b2e9f0c | ||
|
|
2da1b4e6b2 | ||
|
|
5e6cb2b0b6 | ||
|
|
0260ff789b | ||
|
|
c1c1929e55 | ||
|
|
eeb3961b6f | ||
|
|
0404447bd8 | ||
|
|
1f8efc3c14 | ||
|
|
ae15693fa8 | ||
|
|
10b3cc8dd2 | ||
|
|
3254f56d32 | ||
|
|
0bac2c2b34 | ||
|
|
8e9e671a5a | ||
|
|
369f9f0339 | ||
|
|
0fe8fa7645 | ||
|
|
ae7509e746 | ||
|
|
9ffca6b39c | ||
|
|
45306e9378 | ||
|
|
8a4200eb31 | ||
|
|
f4821eb0f4 | ||
|
|
570c1fc390 | ||
|
|
0c12337194 | ||
|
|
bfc55d9016 | ||
|
|
04a1a3fec7 | ||
|
|
407a1259af | ||
|
|
efc36655e6 | ||
|
|
4572dcf9f9 | ||
|
|
7eca4fb331 | ||
|
|
3ecc58cc0e | ||
|
|
736a5e1f89 | ||
|
|
53f3e74bf1 | ||
|
|
edfc5360d4 | ||
|
|
0ac6ca3cf7 | ||
|
|
761f0f1d1f | ||
|
|
a160ba1379 | ||
|
|
9d342bae83 | ||
|
|
888407e40b | ||
|
|
3c1c4792da | ||
|
|
a413be1984 | ||
|
|
f2584fd5fa | ||
|
|
c207e2d198 | ||
|
|
e51702043f | ||
|
|
a17b3b4985 | ||
|
|
307840388b | ||
|
|
dbc34352c7 | ||
|
|
29cf3eb84e | ||
|
|
fbc483e23a | ||
|
|
89be92f1a8 | ||
|
|
1f78923590 | ||
|
|
640b060792 | ||
|
|
0e2a3fd0b6 | ||
|
|
a6580d3916 | ||
|
|
80c6ac141a | ||
|
|
bc8eeea703 | ||
|
|
50471342b3 | ||
|
|
a29d12fd3f | ||
|
|
02a49693e2 | ||
|
|
7c33096398 | ||
|
|
e633dd7537 | ||
|
|
4aea2a1cd2 | ||
|
|
8445e66ceb | ||
|
|
6d2a8b3f4c | ||
|
|
7898823d42 | ||
|
|
c1b683f307 | ||
|
|
9864959e41 | ||
|
|
b34fd2f685 | ||
|
|
a9db6d08f7 | ||
|
|
1aa97a9070 | ||
|
|
e635afd26a | ||
|
|
ecb8cb744e | ||
|
|
66b0a5bd02 | ||
|
|
30490f9650 | ||
|
|
8c33f47a85 | ||
|
|
a6e9bd73e4 | ||
|
|
316681be2a | ||
|
|
dd6e6015ea | ||
|
|
0bdf8b54db | ||
|
|
8256e42178 | ||
|
|
6a5dc482fd | ||
|
|
8f347e68f5 | ||
|
|
22a4cf2422 | ||
|
|
698ca29326 | ||
|
|
5c21551808 | ||
|
|
9bd58344d9 | ||
|
|
165f868be1 | ||
|
|
aeae9cb3b6 | ||
|
|
0b64a5549c | ||
|
|
245042a342 | ||
|
|
429ed8d0be | ||
|
|
4d19f55c3f | ||
|
|
daf5d4b015 | ||
|
|
7e25669e6f | ||
|
|
2a9269e654 | ||
|
|
8ce0a3bf83 | ||
|
|
18aab1a883 | ||
|
|
5c0a278c7f | ||
|
|
5c82757eb4 | ||
|
|
b9ef6c583a | ||
|
|
1c45d155d1 | ||
|
|
7212fd0483 | ||
|
|
8ea01056c3 | ||
|
|
3032e977a8 | ||
|
|
6de7bb74ed | ||
|
|
482f2bdd2a | ||
|
|
71a9e48701 | ||
|
|
8179367412 | ||
|
|
0f2d965d81 | ||
|
|
2eddc32eed | ||
|
|
7696e33d7d | ||
|
|
6c7edeba38 | ||
|
|
6f48851862 | ||
|
|
7b8f30bb25 | ||
|
|
da9410565d | ||
|
|
ec842be582 | ||
|
|
2ec6b92b41 | ||
|
|
999641d9b1 | ||
|
|
db0b0e28d2 | ||
|
|
d1312c87bb | ||
|
|
2ecd4d75e3 | ||
|
|
fb6f0c8b73 | ||
|
|
607d7489bc | ||
|
|
5352e100db | ||
|
|
b06a921697 | ||
|
|
d0085834cd | ||
|
|
7e9460c377 | ||
|
|
402ebec3b7 | ||
|
|
b366f814c7 | ||
|
|
95007de18a | ||
|
|
807e95f35f | ||
|
|
cc78e3f5d1 | ||
|
|
9fdb40caa4 | ||
|
|
85a4e34705 | ||
|
|
2398a94cf8 | ||
|
|
005ce08380 | ||
|
|
54104887ca | ||
|
|
d396987863 | ||
|
|
8fef82cc59 | ||
|
|
08f063d8b3 | ||
|
|
4d63d7dedf | ||
|
|
be5b62b1a1 | ||
|
|
e2def987d4 | ||
|
|
a170624118 | ||
|
|
dfe0684bc7 | ||
|
|
a01fb2a61c | ||
|
|
5e7ef142e8 | ||
|
|
c619c19a1d | ||
|
|
cbcd7bca2c | ||
|
|
3666851589 | ||
|
|
83ce63ac1a | ||
|
|
cbe1fb2c62 | ||
|
|
23b73bb298 | ||
|
|
80bdd1736a | ||
|
|
05bc7e0d2f | ||
|
|
3ab16257b0 | ||
|
|
4495da457a | ||
|
|
7ae2c24ac4 | ||
|
|
91af9073b0 | ||
|
|
e67536cb15 | ||
|
|
56b43e5948 | ||
|
|
5abe5df498 | ||
|
|
25e3a2d34f | ||
|
|
69ae36a1b6 | ||
|
|
e998a4c2fc | ||
|
|
229141fd51 | ||
|
|
77bebff341 | ||
|
|
8a8a2b5bb1 | ||
|
|
2940a16c10 | ||
|
|
081b8397c0 | ||
|
|
401868908a | ||
|
|
a1b644202c | ||
|
|
63c3c547b6 | ||
|
|
c13be21a90 | ||
|
|
22f41a8dbb | ||
|
|
6790c95e94 | ||
|
|
a613fc28d6 | ||
|
|
2ac4be3f22 | ||
|
|
baaab4ccac | ||
|
|
c201006a26 | ||
|
|
a814683684 | ||
|
|
c8b507d246 | ||
|
|
55bbd84445 | ||
|
|
f0f4084f94 | ||
|
|
49d9bfa160 | ||
|
|
4af0e14e7b | ||
|
|
40c9a03ebe | ||
|
|
6270429089 | ||
|
|
4fd76dae95 | ||
|
|
7a936d731d | ||
|
|
813e36a823 | ||
|
|
88ae4266cf | ||
|
|
8035667d9b | ||
|
|
c5021c0690 | ||
|
|
9b7a95e338 | ||
|
|
cd79be4928 | ||
|
|
9d722b3a6c | ||
|
|
55460a5261 | ||
|
|
5a4c1d99a3 | ||
|
|
336b374b9c | ||
|
|
5f2a43f01f | ||
|
|
2151a1b8a1 | ||
|
|
e09e3f6098 | ||
|
|
ed6f853b9c | ||
|
|
110504acd6 | ||
|
|
af29a59325 | ||
|
|
e19295bb64 | ||
|
|
b1cf5df2c2 | ||
|
|
001a5ef897 | ||
|
|
5a911f6af0 | ||
|
|
8410d922db | ||
|
|
c967dd2a30 | ||
|
|
d232680e9c | ||
|
|
79f214f73c | ||
|
|
8e0aefd321 | ||
|
|
3d92eb6d2e | ||
|
|
68b83bfa14 | ||
|
|
407efd3c5d | ||
|
|
7cd080b421 | ||
|
|
0adb6eb788 | ||
|
|
b6f6d8ffda | ||
|
|
76fd5319d4 | ||
|
|
9d1bf83a43 | ||
|
|
707505d31d | ||
|
|
82cb83abee | ||
|
|
4f07f6a9c1 | ||
|
|
96c15b3a87 | ||
|
|
77c0f79cbe | ||
|
|
9fb34d76c2 | ||
|
|
6f1fe2e4b9 | ||
|
|
f96e493790 | ||
|
|
ea03decf60 | ||
|
|
ae4a4236cc | ||
|
|
b3d330258f | ||
|
|
0532df5ce1 | ||
|
|
ac7326d272 | ||
|
|
42fb041890 | ||
|
|
49f1725620 | ||
|
|
9e7a4f6518 | ||
|
|
7ff4ada692 | ||
|
|
e044ec45b7 | ||
|
|
2e0ada9836 | ||
|
|
c2528d48d7 | ||
|
|
18818415d9 | ||
|
|
3f9fe491cc | ||
|
|
d3ce45fbfb | ||
|
|
cdeac13c87 | ||
|
|
72bff7d01e | ||
|
|
760178c7dc | ||
|
|
bc6b5598c5 | ||
|
|
1e3718ea7b | ||
|
|
36d8298602 | ||
|
|
cbc4cba263 | ||
|
|
060d4d5ecc | ||
|
|
eae4005884 | ||
|
|
ed2c20a3b2 | ||
|
|
5e5f486a4c | ||
|
|
4b73e70515 | ||
|
|
a69039b40d | ||
|
|
112351667a | ||
|
|
d100898e92 | ||
|
|
8a3a5929b8 | ||
|
|
6eb8dfb769 | ||
|
|
213c43b0fc | ||
|
|
1ee954a38c | ||
|
|
05a3557b2b | ||
|
|
d04ab3757e | ||
|
|
602f4a7b05 | ||
|
|
982a7600c2 | ||
|
|
579e22f843 | ||
|
|
25db14f50c | ||
|
|
654812679b | ||
|
|
d82d8a53ef | ||
|
|
1c0e5af3a4 | ||
|
|
428915e492 | ||
|
|
dfec168402 | ||
|
|
3819c352e8 | ||
|
|
219902149e | ||
|
|
c2f1563144 | ||
|
|
629d812eb3 | ||
|
|
751dcdf3df | ||
|
|
0f4ce03c28 | ||
|
|
e487685d7d | ||
|
|
6296dfdb1e | ||
|
|
3d4e89c2ca | ||
|
|
2c0ca1cacb | ||
|
|
aa840f9c94 | ||
|
|
c402d7bd94 | ||
|
|
d5cca9d7c9 | ||
|
|
aad15b27a2 | ||
|
|
a341333589 | ||
|
|
68682f155c | ||
|
|
efd5405d0e | ||
|
|
b9b66042d7 | ||
|
|
baa7efa8af | ||
|
|
203758695f | ||
|
|
e233ead7f6 | ||
|
|
9587b7b12e | ||
|
|
5fbe23cfd9 | ||
|
|
3acf3ef3c5 | ||
|
|
1075ce8cf4 | ||
|
|
aa50cfc92c | ||
|
|
fea5694e1d | ||
|
|
a18a8ced23 | ||
|
|
937fb03f05 | ||
|
|
ac139dfe49 | ||
|
|
5633a2fa76 | ||
|
|
1b59bc25d1 | ||
|
|
273b7fc0da | ||
|
|
4450167ab0 | ||
|
|
bb9f3c9f9d | ||
|
|
d8ab66b39a | ||
|
|
03ad93f4eb | ||
|
|
2ce7c2ac4c | ||
|
|
f6f3b0a1ee | ||
|
|
b4d94429d1 | ||
|
|
e6e64515c7 | ||
|
|
b077c81eb6 | ||
|
|
e4cb69caef | ||
|
|
9be6a81bab | ||
|
|
81cd5df263 | ||
|
|
3a1178f71c | ||
|
|
c22505a71a | ||
|
|
204d933f9f | ||
|
|
5fe086b388 | ||
|
|
882eaa5df8 | ||
|
|
68eec91f04 | ||
|
|
1f9d0b1612 | ||
|
|
d4fc8c3791 | ||
|
|
43cdc1be74 | ||
|
|
66b9256f86 | ||
|
|
e6f8de7d31 | ||
|
|
a1cb6e5ba5 | ||
|
|
25cd009a42 | ||
|
|
9da9817f89 | ||
|
|
b22cc12c8d | ||
|
|
33da20c3ec | ||
|
|
3ca444e0e1 | ||
|
|
bbbed009b2 | ||
|
|
9e5c064d5d | ||
|
|
543ba268a4 | ||
|
|
3cdc521d33 | ||
|
|
2e31cad4f6 | ||
|
|
fe244fb41b | ||
|
|
d481086910 | ||
|
|
69a4607f84 | ||
|
|
f834b9b08a | ||
|
|
73c286ae46 | ||
|
|
a21542cdfc | ||
|
|
c41407111a | ||
|
|
43c564d48b | ||
|
|
74232f5fe7 | ||
|
|
8c0b931459 | ||
|
|
0430d25cfb | ||
|
|
f7407e4065 | ||
|
|
1f88ab58c1 | ||
|
|
2e02274be7 | ||
|
|
1b240e2cbc | ||
|
|
039ff1b460 | ||
|
|
645da33176 | ||
|
|
5e1f713995 | ||
|
|
038eab61d0 | ||
|
|
686ae22af2 | ||
|
|
00a6c3953c | ||
|
|
e709cb4cf2 | ||
|
|
cb1a35ac7d | ||
|
|
f6f295e29f | ||
|
|
775bbacce6 | ||
|
|
3cba5c6dc1 | ||
|
|
3f560036d6 | ||
|
|
b533d082b0 | ||
|
|
1b80c03fe9 | ||
|
|
44adc4a71d | ||
|
|
ce67d8cd07 | ||
|
|
28091e8842 | ||
|
|
429f435593 | ||
|
|
da2c48fef5 | ||
|
|
5b3e19c1b6 | ||
|
|
90f30fd15e | ||
|
|
3fcd3cdb99 | ||
|
|
4906974fad | ||
|
|
404fafd598 | ||
|
|
a66fb123b4 | ||
|
|
a9e2146f06 | ||
|
|
2ce415c464 | ||
|
|
62f7ff9ec2 | ||
|
|
57ccabb25c | ||
|
|
62f28759d8 | ||
|
|
4f3ce188b6 | ||
|
|
4c7fb1f428 | ||
|
|
a34284e0a2 | ||
|
|
78a9cd7c58 | ||
|
|
bfab68f40c | ||
|
|
91cd0e96fa | ||
|
|
049c4a8910 | ||
|
|
257fd17ea4 | ||
|
|
9b3b874aba | ||
|
|
290dbaa18e | ||
|
|
ff93e6d5d4 | ||
|
|
f7ca8237b8 | ||
|
|
3ac05dea09 | ||
|
|
5e8d018ff7 | ||
|
|
c05c827d6b | ||
|
|
1646a4b274 | ||
|
|
f458930d24 | ||
|
|
b1aa11d42e | ||
|
|
6bf93c93d4 | ||
|
|
fbc6190752 | ||
|
|
f6434cf712 | ||
|
|
d9fd1072a2 | ||
|
|
e95fb9c116 | ||
|
|
10c1fc1edb | ||
|
|
cf1f8e14ff | ||
|
|
b000d7382f | ||
|
|
43389b248a | ||
|
|
10f0999c21 | ||
|
|
f987478937 | ||
|
|
6d3673a6ec | ||
|
|
4ae057e79f | ||
|
|
2ec8e72579 | ||
|
|
42644a55fb | ||
|
|
9106d1275f | ||
|
|
6b66149edb | ||
|
|
43e68add96 | ||
|
|
ecf9982a0f | ||
|
|
755fa1a701 | ||
|
|
e320b3c90d | ||
|
|
bbe956cc0c | ||
|
|
b77bd78b5c | ||
|
|
5f106adc14 | ||
|
|
eca0318fe8 | ||
|
|
57baae90f1 | ||
|
|
1de73200ab | ||
|
|
b38ab8a064 | ||
|
|
241a1ed360 | ||
|
|
1252d69a9a | ||
|
|
e7577bc2e9 | ||
|
|
29482a3e4d | ||
|
|
770b6cb9e7 | ||
|
|
85c71dacb1 | ||
|
|
75501fd728 | ||
|
|
4ef7ef02d6 | ||
|
|
380c3613ed | ||
|
|
ed5d8f8e6b | ||
|
|
ed2122256c | ||
|
|
fb4970b7e0 | ||
|
|
1f34b71017 | ||
|
|
8ee7d381ec | ||
|
|
704e97bca6 | ||
|
|
11001c86f0 | ||
|
|
7acc3360fc | ||
|
|
62bf90c09c | ||
|
|
29dcf42309 | ||
|
|
cfd93b1bd4 | ||
|
|
a3862f0e59 | ||
|
|
1fb8f5f0c4 | ||
|
|
38f951b7a1 | ||
|
|
77692a814a | ||
|
|
368dcf51af | ||
|
|
e8656d0d22 | ||
|
|
4808ce1b8c | ||
|
|
f609d423d7 | ||
|
|
8cf6195426 | ||
|
|
3919491a6a | ||
|
|
83d134e0be | ||
|
|
e37dc29c1c | ||
|
|
a22bcc3667 | ||
|
|
3787dbde2b | ||
|
|
099eaf582c | ||
|
|
56263d9577 | ||
|
|
8b7e1be694 | ||
|
|
5f13aebd5f | ||
|
|
7cbc71b024 | ||
|
|
ab64597b62 | ||
|
|
a240a58605 | ||
|
|
89e392f1e8 | ||
|
|
f15ff6861c | ||
|
|
2c585d73c8 | ||
|
|
75ca54889c | ||
|
|
6761dbb2ed | ||
|
|
16a6818614 | ||
|
|
e5c275ab02 | ||
|
|
a2ca1fe31f | ||
|
|
f29f928dee | ||
|
|
a221b5108b | ||
|
|
791bda3323 | ||
|
|
de04d8a486 | ||
|
|
a1442cf3a1 | ||
|
|
8e1cfb8b8b | ||
|
|
1750325c0b | ||
|
|
e2a7f40148 | ||
|
|
65b1bf2c03 | ||
|
|
99144ee58b | ||
|
|
c3dbe29f21 | ||
|
|
e1ece63942 | ||
|
|
1f0a28e3f1 | ||
|
|
c0f27e7066 | ||
|
|
831ea90c6d | ||
|
|
fb6cbdd5be | ||
|
|
0171024c4b | ||
|
|
bf95f80c6d | ||
|
|
17953d064f | ||
|
|
6d299ea943 | ||
|
|
35f8c3b75c | ||
|
|
18ed67a27d | ||
|
|
8c0ef0b1f5 | ||
|
|
0e27b3e8c8 | ||
|
|
69688c223b | ||
|
|
a3c3996c08 | ||
|
|
6cd1d7f3c9 | ||
|
|
40c52bd844 | ||
|
|
3465dde0bb | ||
|
|
c401f5caf2 | ||
|
|
217440c885 | ||
|
|
29ce716615 | ||
|
|
57e00e5147 | ||
|
|
04dce0e223 | ||
|
|
8b0650d0fb | ||
|
|
a626ec242e | ||
|
|
3625391589 | ||
|
|
bb9e6e3fd6 | ||
|
|
3ff4e5e303 | ||
|
|
10a1126624 | ||
|
|
d62c65231b | ||
|
|
b7af89acdb | ||
|
|
97d86b873d | ||
|
|
827516c040 | ||
|
|
2c001ccec1 | ||
|
|
96118b416d | ||
|
|
cc223d1904 | ||
|
|
87e63a0f21 | ||
|
|
ce73c1dfd1 | ||
|
|
0e8d3ad3d9 | ||
|
|
47ed447987 | ||
|
|
151b9f0e74 | ||
|
|
4f87a8980f | ||
|
|
f6894a3949 | ||
|
|
c4fcd5fd54 | ||
|
|
b5d999779d | ||
|
|
87aa6ec977 | ||
|
|
971dafb1c2 | ||
|
|
a2eddc889f | ||
|
|
5ecacfd8eb | ||
|
|
50ef56ab7a | ||
|
|
05ac52085d | ||
|
|
71ebad1fc7 | ||
|
|
2f01c9d715 | ||
|
|
c29fba5b7e | ||
|
|
2210ec8839 | ||
|
|
ca371b05a5 | ||
|
|
3e87c4465c | ||
|
|
aef224d53e | ||
|
|
13c73a9691 | ||
|
|
e0a74420f1 | ||
|
|
140e18c063 | ||
|
|
c2b486ce53 | ||
|
|
51c6848340 | ||
|
|
8705d28d48 | ||
|
|
8092ff915c | ||
|
|
3c16722538 | ||
|
|
6d92dae632 | ||
|
|
9d931d45de | ||
|
|
9bcb3f71d0 | ||
|
|
91e9e8f65f | ||
|
|
a3d0ffb1ed | ||
|
|
0a4599133c | ||
|
|
b8ece68b17 | ||
|
|
fafc333e93 | ||
|
|
8a9e125756 | ||
|
|
dcdaeabc40 | ||
|
|
5083b41d1b | ||
|
|
83e1cfcf01 | ||
|
|
c5dadd6f8d | ||
|
|
8e9a986e0b | ||
|
|
e6f09b8372 | ||
|
|
307d746653 | ||
|
|
151a156581 | ||
|
|
d035bfeb99 | ||
|
|
b0f65a85ab | ||
|
|
b803a03ddd | ||
|
|
98eda78857 | ||
|
|
bf5009b544 | ||
|
|
db4ebfb77e | ||
|
|
a8384bb426 | ||
|
|
04a3f1c206 | ||
|
|
803a160808 | ||
|
|
5d0c3f7c27 | ||
|
|
e1ec90a886 | ||
|
|
3969dd5a11 | ||
|
|
d235013fe9 | ||
|
|
25dc3f08e9 | ||
|
|
f313edb4cf | ||
|
|
eb3b4751ac | ||
|
|
ac2df1420b | ||
|
|
53f30b3c47 | ||
|
|
6daaaec6e2 | ||
|
|
a911f70049 | ||
|
|
6910f80e3d | ||
|
|
21c0d7803a | ||
|
|
ea677dd30d | ||
|
|
a59075b908 | ||
|
|
cfab666369 | ||
|
|
50304cfb1c | ||
|
|
295ba3b416 | ||
|
|
2d01363e57 | ||
|
|
5ad5ba2299 | ||
|
|
fc1390d0aa | ||
|
|
9851e5d801 | ||
|
|
47557279a2 | ||
|
|
07a45ab8ef |
34
.github/workflows/ada.yml
vendored
Normal file
34
.github/workflows/ada.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: WolfSSL Ada Build Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Install gnat
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gnat gprbuild
|
||||
|
||||
- name: Checkout wolfssl
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
repository: wolfssl/wolfssl
|
||||
path: wolfssl
|
||||
|
||||
- name: Build wolfssl Ada
|
||||
working-directory: ./wolfssl/wrapper/Ada
|
||||
run: |
|
||||
mkdir obj
|
||||
gprbuild default.gpr
|
||||
gprbuild examples.gpr
|
||||
6
.github/workflows/async.yml
vendored
6
.github/workflows/async.yml
vendored
@@ -18,9 +18,9 @@ jobs:
|
||||
matrix:
|
||||
config: [
|
||||
# Add new configs here
|
||||
'--enable-asynccrypt --enable-all --enable-dtls13',
|
||||
'--enable-asynccrypt-sw --enable-ocspstapling --enable-ocspstapling2',
|
||||
'--enable-ocsp CFLAGS="-DTEST_NONBLOCK_CERTS"',
|
||||
'--enable-asynccrypt --enable-all --enable-dtls13 CFLAGS="-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFCRYPT_TEST_LINT"',
|
||||
'--enable-asynccrypt-sw --enable-ocspstapling --enable-ocspstapling2 CFLAGS="-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
|
||||
'--enable-ocsp CFLAGS="-DTEST_NONBLOCK_CERTS -pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
|
||||
]
|
||||
name: make check
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
|
||||
2
.github/workflows/bind.yml
vendored
2
.github/workflows/bind.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of releases to test
|
||||
ref: [ 9.18.0, 9.18.28 ]
|
||||
ref: [ 9.18.0, 9.18.28, 9.18.33 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
3
.github/workflows/cmake.yml
vendored
3
.github/workflows/cmake.yml
vendored
@@ -8,7 +8,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -77,6 +77,7 @@ jobs:
|
||||
-DWOLFSSL_TICKET_NONCE_MALLOC:BOOL=yes -DWOLFSSL_TLS13:BOOL=yes -DWOLFSSL_TLSV12:BOOL=yes \
|
||||
-DWOLFSSL_TLSX:BOOL=yes -DWOLFSSL_TPM:BOOL=yes -DWOLFSSL_CLU:BOOL=yes -DWOLFSSL_USER_SETTINGS:BOOL=no \
|
||||
-DWOLFSSL_USER_SETTINGS_ASM:BOOL=no -DWOLFSSL_WOLFSSH:BOOL=ON -DWOLFSSL_X86_64_BUILD_ASM:BOOL=yes \
|
||||
-DWOLFSSL_MLKEM=1 -DWOLFSSL_LMS=1 -DWOLFSSL_LMSSHA256192=1 -DWOLFSSL_EXPERIMENTAL=1 \
|
||||
-DWOLFSSL_X963KDF:BOOL=yes \
|
||||
-DCMAKE_C_FLAGS="-DWOLFSSL_DTLS_CH_FRAG" \
|
||||
..
|
||||
|
||||
4
.github/workflows/codespell.yml
vendored
4
.github/workflows/codespell.yml
vendored
@@ -23,8 +23,8 @@ jobs:
|
||||
check_filenames: true
|
||||
check_hidden: true
|
||||
# Add comma separated list of words that occur multiple times that should be ignored (sorted alphabetically, case sensitive)
|
||||
ignore_words_list: adin,aNULL,brunch,carryIn,chainG,ciph,cLen,cliKs,dout,haveA,inCreated,inOut,inout,larg,LEAPYEAR,Merget,optionA,parm,parms,repid,rIn,userA,ser,siz,te,Te
|
||||
ignore_words_list: adin,aNULL,brunch,carryIn,chainG,ciph,cLen,cliKs,dout,haveA,inCreated,inOut,inout,larg,LEAPYEAR,Merget,optionA,parm,parms,repid,rIn,userA,ser,siz,te,Te,
|
||||
# The exclude_file contains lines of code that should be ignored. This is useful for individual lines which have non-words that can safely be ignored.
|
||||
exclude_file: '.codespellexcludelines'
|
||||
# To skip files entirely from being processed, add it to the following list:
|
||||
skip: '*.cproject,*.der,*.mtpj,*.pem,*.vcxproj,.git,*.launch,*.scfg,*.revoked'
|
||||
skip: '*.cproject,*.der,*.mtpj,*.pem,*.vcxproj,.git,*.launch,*.scfg,*.revoked,./examples/asn1/dumpasn1.cfg,./examples/asn1/oid_names.h'
|
||||
|
||||
63
.github/workflows/disable-pk-algs.yml
vendored
Normal file
63
.github/workflows/disable-pk-algs.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: disable-pk-algs 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:
|
||||
make_check:
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
# Add new configs here
|
||||
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-rsa --enable-dh',
|
||||
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ecc',
|
||||
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-rsa --enable-curve25519',
|
||||
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ecc --enable-curve25519',
|
||||
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-rsa --enable-curve448',
|
||||
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ecc --enable-curve448',
|
||||
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-curve25519 --enable-ed25519',
|
||||
'--disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-curve448 --enable-ed448',
|
||||
'-enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-rsa',
|
||||
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-dh',
|
||||
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ecc',
|
||||
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-curve25519',
|
||||
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ed25519',
|
||||
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-curve448',
|
||||
'--enable-cryptonly --disable-rsa --disable-dh --disable-ecc --disable-curve25519 --disable-ed25519 --disable-curve448 --disable-ed448 --enable-ed448',
|
||||
]
|
||||
name: make check
|
||||
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:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout wolfSSL
|
||||
|
||||
- name: Test wolfSSL
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure ${{ matrix.config }}
|
||||
make -j 4
|
||||
make check
|
||||
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
for file in scripts/*.log
|
||||
do
|
||||
if [ -f "$file" ]; then
|
||||
echo "${file}:"
|
||||
cat "$file"
|
||||
echo "========================================================================"
|
||||
fi
|
||||
done
|
||||
7
.github/workflows/grpc.yml
vendored
7
.github/workflows/grpc.yml
vendored
@@ -71,6 +71,11 @@ jobs:
|
||||
with:
|
||||
name: wolf-install-grpc
|
||||
|
||||
- name: Setup cmake version
|
||||
uses: jwlawson/actions-setup-cmake@v2
|
||||
with:
|
||||
cmake-version: '3.25.x'
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
@@ -94,7 +99,7 @@ jobs:
|
||||
git submodule update --init
|
||||
mkdir cmake/build
|
||||
cd cmake/build
|
||||
cmake -DgRPC_BUILD_TESTS=ON -DgRPC_SSL_PROVIDER=wolfssl \
|
||||
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.1 -DgRPC_BUILD_TESTS=ON -DgRPC_SSL_PROVIDER=wolfssl \
|
||||
-DWOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir ../..
|
||||
make -j $(nproc) ${{ matrix.tests }}
|
||||
|
||||
|
||||
2
.github/workflows/hostap-vm.yml
vendored
2
.github/workflows/hostap-vm.yml
vendored
@@ -217,6 +217,7 @@ jobs:
|
||||
sudo apt-get install -y libpcap0.8 libpcap-dev curl libcurl4-openssl-dev \
|
||||
libnl-3-dev binutils-dev libssl-dev libiberty-dev libnl-genl-3-dev \
|
||||
libnl-route-3-dev libdbus-1-dev bridge-utils tshark python3-pycryptodome
|
||||
sudo pip install pycryptodome
|
||||
|
||||
- name: Checking if we have hostap in cache
|
||||
uses: actions/cache/restore@v4
|
||||
@@ -312,6 +313,7 @@ jobs:
|
||||
KERNELDIR=$GITHUB_WORKSPACE/linux
|
||||
KVMARGS="-cpu host"
|
||||
EOF
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE/hostap
|
||||
# Run tests in increments of 200 to not stall out the parallel-vm script
|
||||
while mapfile -t -n 200 ary && ((${#ary[@]})); do
|
||||
TESTS=$(printf '%s\n' "${ary[@]}" | tr '\n' ' ')
|
||||
|
||||
2
.github/workflows/intelasm-c-fallback.yml
vendored
2
.github/workflows/intelasm-c-fallback.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
matrix:
|
||||
config: [
|
||||
# Add new configs here
|
||||
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -DWC_AES_C_DYNAMIC_FALLBACK -DWC_C_DYNAMIC_FALLBACK -DDEBUG_VECTOR_REGISTER_ACCESS -DDEBUG_VECTOR_REGISTER_ACCESS_FUZZING -DWC_DEBUG_CIPHER_LIFECYCLE"'
|
||||
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -DWC_C_DYNAMIC_FALLBACK -DDEBUG_VECTOR_REGISTER_ACCESS -DDEBUG_VECTOR_REGISTER_ACCESS_FUZZING -DWC_DEBUG_CIPHER_LIFECYCLE"'
|
||||
]
|
||||
name: make check
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
|
||||
2
.github/workflows/ipmitool.yml
vendored
2
.github/workflows/ipmitool.yml
vendored
@@ -16,9 +16,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-22.04
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
|
||||
7
.github/workflows/jwt-cpp.yml
vendored
7
.github/workflows/jwt-cpp.yml
vendored
@@ -66,6 +66,11 @@ jobs:
|
||||
with:
|
||||
name: wolf-install-jwt-cpp
|
||||
|
||||
- name: Setup cmake version
|
||||
uses: jwlawson/actions-setup-cmake@v2
|
||||
with:
|
||||
cmake-version: '3.25.x'
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
@@ -87,7 +92,7 @@ jobs:
|
||||
run: |
|
||||
patch -p1 < ../osp/jwt-cpp/${{ matrix.config.ref }}.patch
|
||||
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
|
||||
cmake -B build -DJWT_SSL_LIBRARY:STRING=wolfSSL -DJWT_BUILD_TESTS=ON .
|
||||
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -B build -DJWT_SSL_LIBRARY:STRING=wolfSSL -DJWT_BUILD_TESTS=ON .
|
||||
make -j -C build
|
||||
ldd ./build/tests/jwt-cpp-test | grep wolfssl
|
||||
|
||||
|
||||
2
.github/workflows/libspdm.yml
vendored
2
.github/workflows/libspdm.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of releases to test
|
||||
ref: [ 3.3.0 ]
|
||||
ref: [ 3.7.0 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
21
.github/workflows/libssh2.yml
vendored
21
.github/workflows/libssh2.yml
vendored
@@ -60,14 +60,27 @@ jobs:
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Build and test libssh2
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
- name: Clone libssh2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: libssh2/libssh2
|
||||
ref: libssh2-${{ matrix.ref }}
|
||||
path: libssh2
|
||||
configure: --with-crypto=wolfssl --with-libwolfssl-prefix=$GITHUB_WORKSPACE/build-dir
|
||||
check: true
|
||||
|
||||
- name: Build libssh2
|
||||
working-directory: libssh2
|
||||
run: |
|
||||
autoreconf -fi
|
||||
./configure --with-crypto=wolfssl --with-libwolfssl-prefix=$GITHUB_WORKSPACE/build-dir
|
||||
|
||||
- name: Update libssh2 test to use a stable version of debian
|
||||
working-directory: libssh2
|
||||
run: |
|
||||
sed -i 's/testing-slim/stable-slim/' tests/openssh_server/Dockerfile
|
||||
|
||||
- name: Run libssh2 tests
|
||||
working-directory: libssh2
|
||||
run: make check
|
||||
|
||||
- name: Confirm libssh2 built with wolfSSL
|
||||
run: ldd libssh2/src/.libs/libssh2.so | grep wolfssl
|
||||
|
||||
7
.github/workflows/libvncserver.yml
vendored
7
.github/workflows/libvncserver.yml
vendored
@@ -55,6 +55,11 @@ jobs:
|
||||
with:
|
||||
name: wolf-install-libvncserver
|
||||
|
||||
- name: Setup cmake version
|
||||
uses: jwlawson/actions-setup-cmake@v2
|
||||
with:
|
||||
cmake-version: '3.25.x'
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
@@ -76,7 +81,7 @@ jobs:
|
||||
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 .
|
||||
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -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
|
||||
|
||||
27
.github/workflows/macos-apple-native-cert-validation.yml
vendored
Normal file
27
.github/workflows/macos-apple-native-cert-validation.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: MacOS apple native cert validation 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:
|
||||
make_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: macos-latest
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Build and configure wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
configure: CFLAGS='-DWOLFSSL_APPLE_NATIVE_CERT_VALIDATION -DWOLFSSL_TEST_APPLE_NATIVE_CERT_VALIDATION -DRSA_MIN_SIZE=2048 -DNO_WOLFSSL_CIPHER_SUITE_TEST'
|
||||
|
||||
2
.github/workflows/mbedtls.yml
vendored
2
.github/workflows/mbedtls.yml
vendored
@@ -54,10 +54,10 @@ jobs:
|
||||
|
||||
mbedtls_test:
|
||||
name: Test interop with mbedtls
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-latest
|
||||
needs: build_mbedtls
|
||||
timeout-minutes: 10
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
steps:
|
||||
- name: Disable IPv6 (IMPORTANT, OTHERWISE DTLS MBEDTLS CLIENT WON'T CONNECT)
|
||||
run: echo 1 | sudo tee /proc/sys/net/ipv6/conf/lo/disable_ipv6
|
||||
|
||||
@@ -14,27 +14,23 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
msys2:
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { sys: ucrt64, compiler: mingw-w64-ucrt-x86_64-gcc }
|
||||
- { sys: mingw64, compiler: mingw-w64-x86_64-gcc }
|
||||
- { sys: msys, compiler: gcc }
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
msystem: msys
|
||||
update: true
|
||||
install: git ${{matrix.compiler}} autotools base-devel autoconf netcat
|
||||
install: git gcc autotools base-devel autoconf netcat
|
||||
- name: configure wolfSSL
|
||||
run: ./autogen.sh && ./configure CFLAGS="-DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256 -DNO_WRITE_TEMP_FILES"
|
||||
run: ./autogen.sh && ./configure --disable-sys-ca-certs CFLAGS="-DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256 -DNO_WRITE_TEMP_FILES"
|
||||
- name: build wolfSSL
|
||||
run: make
|
||||
- name: run tests
|
||||
run: make check
|
||||
- name: Display log
|
||||
if: always()
|
||||
3
.github/workflows/multi-arch.yml
vendored
3
.github/workflows/multi-arch.yml
vendored
@@ -30,6 +30,7 @@ jobs:
|
||||
- HOST: riscv64-linux-gnu
|
||||
CC: riscv64-linux-gnu-gcc
|
||||
ARCH: riscv64
|
||||
EXTRA_OPTS: --enable-riscv-asm
|
||||
# Config to ensure CPUs without Thumb instructions compiles
|
||||
- HOST: arm-linux-gnueabi
|
||||
CC: arm-linux-gnueabi-gcc
|
||||
@@ -51,7 +52,7 @@ jobs:
|
||||
CC: ${{ matrix.CC }}
|
||||
CFLAGS: ${{ matrix.CFLAGS }}
|
||||
QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
|
||||
run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples ${{ matrix.EXTRA_OPTS }} && make
|
||||
run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples CPPFLAGS="-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE -DWOLFCRYPT_TEST_LINT" ${{ matrix.EXTRA_OPTS }} && make
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
|
||||
19
.github/workflows/multi-compiler.yml
vendored
19
.github/workflows/multi-compiler.yml
vendored
@@ -21,31 +21,28 @@ jobs:
|
||||
include:
|
||||
- CC: gcc-9
|
||||
CXX: g++-9
|
||||
OS: ubuntu-22.04
|
||||
OS: ubuntu-24.04
|
||||
- CC: gcc-10
|
||||
CXX: g++-10
|
||||
OS: ubuntu-22.04
|
||||
OS: ubuntu-24.04
|
||||
- CC: gcc-11
|
||||
CXX: g++-11
|
||||
OS: ubuntu-22.04
|
||||
OS: ubuntu-24.04
|
||||
- CC: gcc-12
|
||||
CXX: g++-12
|
||||
OS: ubuntu-22.04
|
||||
- CC: clang-10
|
||||
CXX: clang++-10
|
||||
OS: ubuntu-20.04
|
||||
OS: ubuntu-24.04
|
||||
- CC: clang-11
|
||||
CXX: clang++-11
|
||||
OS: ubuntu-20.04
|
||||
OS: ubuntu-22.04
|
||||
- CC: clang-12
|
||||
CXX: clang++-12
|
||||
OS: ubuntu-20.04
|
||||
OS: ubuntu-22.04
|
||||
- CC: clang-13
|
||||
CXX: clang++-13
|
||||
OS: ubuntu-22.04
|
||||
- CC: clang-14
|
||||
CXX: clang++-14
|
||||
OS: ubuntu-22.04
|
||||
OS: ubuntu-24.04
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ${{ matrix.OS }}
|
||||
# This should be a safe limit for the tests to run.
|
||||
@@ -58,7 +55,7 @@ jobs:
|
||||
env:
|
||||
CC: ${{ matrix.CC }}
|
||||
CXX: ${{ matrix.CXX }}
|
||||
run: ./autogen.sh && ./configure && make && make dist
|
||||
run: ./autogen.sh && ./configure CFLAGS="-pedantic -Wdeclaration-after-statement" && make && make dist
|
||||
- name: Show log on errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
|
||||
23
.github/workflows/nginx.yml
vendored
23
.github/workflows/nginx.yml
vendored
@@ -122,7 +122,28 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo cpan -iT Proc::Find Net::SSLeay IO::Socket::SSL
|
||||
sudo cpan -iT Proc::Find
|
||||
|
||||
# Locking in the version of SSLeay used with testing
|
||||
- name: Download and install Net::SSLeay 1.94 manually
|
||||
run: |
|
||||
curl -LO https://www.cpan.org/modules/by-module/Net/CHRISN/Net-SSLeay-1.94.tar.gz
|
||||
tar -xzf Net-SSLeay-1.94.tar.gz
|
||||
cd Net-SSLeay-1.94
|
||||
perl Makefile.PL
|
||||
make
|
||||
sudo make install
|
||||
|
||||
# SSL version 2.091 changes '' return to undef causing test case to fail.
|
||||
# Locking in the test version to use as 2.090
|
||||
- name: Download and install IO::Socket::SSL 2.090 manually
|
||||
run: |
|
||||
curl -LO https://www.cpan.org/modules/by-module/IO/IO-Socket-SSL-2.090.tar.gz
|
||||
tar -xzf IO-Socket-SSL-2.090.tar.gz
|
||||
cd IO-Socket-SSL-2.090
|
||||
perl Makefile.PL
|
||||
make
|
||||
sudo make install
|
||||
|
||||
- name: Checkout wolfssl-nginx
|
||||
uses: actions/checkout@v4
|
||||
|
||||
2
.github/workflows/no-malloc.yml
vendored
2
.github/workflows/no-malloc.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
matrix:
|
||||
config: [
|
||||
# Add new configs here
|
||||
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC -DRSA_MIN_SIZE=1024"',
|
||||
'--enable-rsa --enable-keygen --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC -DRSA_MIN_SIZE=1024 -pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
|
||||
]
|
||||
name: make check
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
|
||||
49
.github/workflows/no-tls.yml
vendored
Normal file
49
.github/workflows/no-tls.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: --disable-tls 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:
|
||||
make_check:
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
# Add new configs here
|
||||
'--disable-tls --enable-all CFLAGS="-pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
|
||||
]
|
||||
name: make check
|
||||
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:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout wolfSSL
|
||||
|
||||
- name: Test wolfSSL
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure ${{ matrix.config }}
|
||||
make -j 4
|
||||
make check
|
||||
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
for file in scripts/*.log
|
||||
do
|
||||
if [ -f "$file" ]; then
|
||||
echo "${file}:"
|
||||
cat "$file"
|
||||
echo "========================================================================"
|
||||
fi
|
||||
done
|
||||
2
.github/workflows/nss.yml
vendored
2
.github/workflows/nss.yml
vendored
@@ -59,10 +59,10 @@ jobs:
|
||||
|
||||
nss_test:
|
||||
name: Test interop with nss
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build_nss
|
||||
timeout-minutes: 10
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
steps:
|
||||
- name: Checking if we have nss in cache
|
||||
uses: actions/cache/restore@v4
|
||||
|
||||
2
.github/workflows/openldap.yml
vendored
2
.github/workflows/openldap.yml
vendored
@@ -15,6 +15,7 @@ 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-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
@@ -49,6 +50,7 @@ jobs:
|
||||
- osp_ref: 2.6.7
|
||||
git_ref: OPENLDAP_REL_ENG_2_6_7
|
||||
name: ${{ matrix.osp_ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 20
|
||||
|
||||
27
.github/workflows/openssh.yml
vendored
27
.github/workflows/openssh.yml
vendored
@@ -45,9 +45,31 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# A good way to measure how much each test takes is to create a bash script
|
||||
# in the openssh root like this (make it executable):
|
||||
# time-measure.sh
|
||||
# #!/bin/bash
|
||||
# /usr/bin/time -a -o /tmp/LTESTS-times.txt -f '%e %C' /usr/bin/bash "$@"
|
||||
# And invoke the openssh tests like this:
|
||||
# rm -f /tmp/LTESTS-times.txt && \
|
||||
# make tests TEST_SHELL=$(pwd)/time-measure.sh SKIP_UNIT=yes && \
|
||||
# grep test-exec.sh /tmp/LTESTS-times.txt
|
||||
- git_ref: 'V_9_6_P1'
|
||||
osp_ver: '9.6'
|
||||
name: ${{ matrix.ref }}
|
||||
SKIP_LTESTS: >-
|
||||
exit-status rekey multiplex cert-userkey forward-control integrity
|
||||
channel-timeout connection-timeout
|
||||
- git_ref: 'V_9_9_P2'
|
||||
osp_ver: '9.9p2'
|
||||
SKIP_LTESTS: >-
|
||||
exit-status rekey multiplex cert-userkey forward-control integrity
|
||||
channel-timeout connection-timeout
|
||||
- git_ref: 'V_10_0_P2'
|
||||
osp_ver: '10.0p2'
|
||||
SKIP_LTESTS: >-
|
||||
exit-status rekey multiplex forward-control channel-timeout
|
||||
connection-timeout
|
||||
name: ${{ matrix.osp_ver }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build_wolfssl
|
||||
@@ -80,5 +102,4 @@ jobs:
|
||||
- name: Run tests
|
||||
working-directory: ./openssh
|
||||
run: |
|
||||
# Run all the tests except (t-exec) as it takes too long
|
||||
make file-tests interop-tests extra-tests unit
|
||||
make tests SKIP_LTESTS='${{ matrix.SKIP_LTESTS }}'
|
||||
|
||||
4
.github/workflows/opensslcoexist.yml
vendored
4
.github/workflows/opensslcoexist.yml
vendored
@@ -18,8 +18,8 @@ jobs:
|
||||
matrix:
|
||||
config: [
|
||||
# Add new configs here
|
||||
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic"',
|
||||
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic -DTEST_OPENSSL_COEXIST"'
|
||||
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
|
||||
'--verbose --enable-all --disable-all-osp --disable-opensslall --enable-opensslcoexist CPPFLAGS="-DNO_WOLFSSL_CIPHER_SUITE_TEST -pedantic -DTEST_OPENSSL_COEXIST -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"'
|
||||
]
|
||||
name: make check
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
|
||||
20
.github/workflows/os-check.yml
vendored
20
.github/workflows/os-check.yml
vendored
@@ -23,6 +23,8 @@ jobs:
|
||||
'',
|
||||
'--enable-all --enable-asn=template',
|
||||
'--enable-all --enable-asn=original',
|
||||
'--enable-all --enable-asn=template CPPFLAGS=-DWOLFSSL_OLD_OID_SUM',
|
||||
'--enable-all --enable-asn=original CPPFLAGS=-DWOLFSSL_OLD_OID_SUM',
|
||||
'--enable-harden-tls',
|
||||
'--enable-tls13 --enable-session-ticket --enable-dtls --enable-dtls13
|
||||
--enable-opensslextra --enable-sessioncerts
|
||||
@@ -39,9 +41,23 @@ jobs:
|
||||
'--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',
|
||||
--enable-psk --enable-aesccm --enable-nullcipher
|
||||
CPPFLAGS=-DWOLFSSL_STATIC_RSA',
|
||||
'--enable-ascon --enable-experimental',
|
||||
'--enable-ascon CPPFLAGS=-DWOLFSSL_ASCON_UNROLL --enable-experimental',
|
||||
'--enable-all CPPFLAGS=''-DNO_AES_192 -DNO_AES_256'' ',
|
||||
'--enable-sniffer --enable-curve25519 --enable-curve448 --enable-enckeys
|
||||
CPPFLAGS=-DWOLFSSL_DH_EXTRA',
|
||||
'--enable-dtls --enable-dtls13 --enable-dtls-frag-ch
|
||||
--enable-dtls-mtu CPPFLAGS=-DWOLFSSL_DTLS_RECORDS_CAN_SPAN_DATAGRAMS',
|
||||
'--enable-opensslall --enable-opensslextra CPPFLAGS=-DWC_RNG_SEED_CB',
|
||||
'--enable-opensslall --enable-opensslextra
|
||||
CPPFLAGS=''-DWC_RNG_SEED_CB -DWOLFSSL_NO_GETPID'' ',
|
||||
'--enable-opensslextra CPPFLAGS=''-DWOLFSSL_NO_CA_NAMES'' ',
|
||||
'--enable-opensslextra=x509small',
|
||||
'CPPFLAGS=''-DWOLFSSL_EXTRA'' ',
|
||||
'--enable-lms=small,verify-only --enable-xmss=small,verify-only',
|
||||
'--disable-sys-ca-certs'
|
||||
]
|
||||
name: make check
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
@@ -52,7 +68,7 @@ jobs:
|
||||
- name: Build and test wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
configure: ${{ matrix.config }}
|
||||
configure: CFLAGS="-pedantic -Wno-overlength-strings -Wdeclaration-after-statement -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" ${{ matrix.config }}
|
||||
check: true
|
||||
|
||||
make_user_settings:
|
||||
|
||||
5
.github/workflows/pq-all.yml
vendored
5
.github/workflows/pq-all.yml
vendored
@@ -18,7 +18,10 @@ jobs:
|
||||
matrix:
|
||||
config: [
|
||||
# Add new configs here
|
||||
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST"'
|
||||
'--enable-intelasm --enable-sp-asm --enable-mlkem=yes,kyber,ml-kem CPPFLAGS="-DWOLFSSL_ML_KEM_USE_OLD_IDS"',
|
||||
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
|
||||
'--enable-smallstack --enable-smallstackcache --enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
|
||||
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" CC=c++'
|
||||
]
|
||||
name: make check
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
|
||||
51
.github/workflows/psk.yml
vendored
Normal file
51
.github/workflows/psk.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: PSK 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:
|
||||
make_check:
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
# Add new configs here
|
||||
'--enable-psk C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-rsa --disable-ecc --disable-dh',
|
||||
'--disable-oldtls --disable-tls13 --enable-psk -disable-rsa --disable-dh -disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --enable-lowresource --enable-singlethreaded --disable-asm --disable-errorstrings --disable-pkcs12 --disable-sha3 --disable-sha224 --disable-sha384 --disable-sha512 --disable-sha --disable-md5 -disable-aescbc --disable-chacha --disable-poly1305 --disable-coding --disable-sp-math-all',
|
||||
'--disable-oldtls --disable-tlsv12 --enable-tls13 --enable-psk -disable-rsa --disable-dh -disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --enable-lowresource --enable-singlethreaded --disable-asm --disable-errorstrings --disable-pkcs12 --disable-sha3 --disable-sha224 --disable-sha384 --disable-sha512 --disable-sha --disable-md5 -disable-aescbc --disable-chacha --disable-poly1305 --disable-coding --disable-sp-math-all'
|
||||
]
|
||||
name: make check
|
||||
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:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout wolfSSL
|
||||
|
||||
- name: Test wolfSSL
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure ${{ matrix.config }}
|
||||
make -j 4
|
||||
make check
|
||||
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
for file in scripts/*.log
|
||||
do
|
||||
if [ -f "$file" ]; then
|
||||
echo "${file}:"
|
||||
cat "$file"
|
||||
echo "========================================================================"
|
||||
fi
|
||||
done
|
||||
53
.github/workflows/smallStackSize.yml
vendored
Normal file
53
.github/workflows/smallStackSize.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Stack Size warnings
|
||||
|
||||
# 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_library:
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
# defaults, noasm
|
||||
'--disable-asm',
|
||||
|
||||
# defaults + native PQ, no asm
|
||||
'--disable-asm --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium',
|
||||
|
||||
# all-crypto + native PQ, no asm
|
||||
'--disable-asm --enable-all-crypto --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium',
|
||||
|
||||
# defaults, intelasm + sp-asm
|
||||
'--enable-intelasm --enable-sp-asm',
|
||||
|
||||
# defaults + native PQ, intelasm + sp-asm
|
||||
'--enable-intelasm --enable-sp-asm --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium',
|
||||
|
||||
# all-crypto + native PQ, intelasm + sp-asm
|
||||
'--enable-intelasm --enable-sp-asm --enable-all-crypto --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium'
|
||||
]
|
||||
name: build library
|
||||
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:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout wolfSSL
|
||||
|
||||
- name: Build wolfCrypt with smallstack and stack depth warnings, and run testwolfcrypt
|
||||
run: |
|
||||
./autogen.sh || $(exit 2)
|
||||
echo "running ./configure ... ${{ matrix.config }}"
|
||||
./configure --enable-cryptonly --disable-cryptocb --disable-testcert --enable-smallstack --enable-smallstackcache --enable-crypttests --disable-benchmark --disable-examples --with-max-rsa-bits=16384 --enable-stacksize=verbose CFLAGS="-Wframe-larger-than=2048 -Wstack-usage=4096 -DWOLFSSL_TEST_MAX_RELATIVE_STACK_BYTES=8192 -DTEST_ALWAYS_RUN_TO_END" ${{ matrix.config }} || $(exit 3)
|
||||
make -j 4 || $(exit 4)
|
||||
./wolfcrypt/test/testwolfcrypt
|
||||
2
.github/workflows/sssd.yml
vendored
2
.github/workflows/sssd.yml
vendored
@@ -40,13 +40,13 @@ jobs:
|
||||
retention-days: 5
|
||||
|
||||
sssd_check:
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# List of releases to test
|
||||
ref: [ 2.9.1 ]
|
||||
name: ${{ matrix.ref }}
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: quay.io/sssd/ci-client-devel:ubuntu-latest
|
||||
|
||||
9
.github/workflows/wolfCrypt-Wconversion.yml
vendored
9
.github/workflows/wolfCrypt-Wconversion.yml
vendored
@@ -22,7 +22,8 @@ jobs:
|
||||
'--enable-intelasm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
|
||||
'--enable-smallstack --disable-asm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
|
||||
'--enable-smallstack --enable-intelasm --enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion"',
|
||||
'--enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion -DNO_INT128"'
|
||||
'--enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion -DNO_INT128"',
|
||||
'--enable-cryptonly --enable-all-crypto --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-Wdeclaration-after-statement -Wconversion -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion" --enable-32bit CFLAGS=-m32'
|
||||
]
|
||||
name: build library
|
||||
if: github.repository_owner == 'wolfssl'
|
||||
@@ -33,6 +34,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout wolfSSL
|
||||
|
||||
- name: install_multilib
|
||||
run: |
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc-multilib
|
||||
|
||||
- name: Build wolfCrypt with extra type conversion warnings
|
||||
run: |
|
||||
./autogen.sh || $(exit 2)
|
||||
|
||||
5
.github/workflows/zephyr.yml
vendored
5
.github/workflows/zephyr.yml
vendored
@@ -49,6 +49,11 @@ jobs:
|
||||
python3-ply python3-setuptools python-is-python3 qemu-kvm rsync socat srecord sudo \
|
||||
texinfo unzip wget ovmf xz-utils
|
||||
|
||||
- name: Setup cmake version
|
||||
uses: jwlawson/actions-setup-cmake@v2
|
||||
with:
|
||||
cmake-version: '3.25.x'
|
||||
|
||||
- name: Install west
|
||||
run: sudo pip install west
|
||||
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -3,7 +3,6 @@ ctaocrypt/src/src/
|
||||
*.lo
|
||||
*.la
|
||||
*.o
|
||||
*.patch
|
||||
*.deps
|
||||
*.d
|
||||
*.libs
|
||||
@@ -246,6 +245,9 @@ linuxkm/libwolfssl.mod.c
|
||||
linuxkm/libwolfssl.lds
|
||||
linuxkm/module_exports.c
|
||||
linuxkm/linuxkm/get_thread_size
|
||||
linuxkm/linuxkm
|
||||
linuxkm/src
|
||||
linuxkm/patches/src
|
||||
*.nds
|
||||
|
||||
# autotools generated
|
||||
|
||||
@@ -9,9 +9,17 @@ APP_ESP_HTTP_CLIENT_EXAMPLE
|
||||
APSTUDIO_INVOKED
|
||||
ARCH_sim
|
||||
ARDUINO
|
||||
ARDUINO_ARCH_ESP32
|
||||
ARDUINO_ARCH_ESP8266
|
||||
ARDUINO_ARCH_MBED
|
||||
ARDUINO_ARCH_NRF52
|
||||
ARDUINO_ARCH_RP2040
|
||||
ARDUINO_ARCH_SAMD
|
||||
ARDUINO_ARCH_STM32
|
||||
ARDUINO_SAMD_NANO_33_IOT
|
||||
ARDUINO_SAM_DUE
|
||||
ARDUINO_SEEED_XIAO
|
||||
ARDUINO_TEENSY41
|
||||
ASN_DUMP_OID
|
||||
ASN_TEMPLATE_SKIP_ISCA_CHECK
|
||||
ATCAPRINTF
|
||||
@@ -44,8 +52,25 @@ CONFIG_COMPILER_OPTIMIZATION_DEFAULT
|
||||
CONFIG_COMPILER_OPTIMIZATION_NONE
|
||||
CONFIG_COMPILER_OPTIMIZATION_PERF
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE
|
||||
CONFIG_CRYPTO_AES
|
||||
CONFIG_CRYPTO_CBC
|
||||
CONFIG_CRYPTO_CTR
|
||||
CONFIG_CRYPTO_DH
|
||||
CONFIG_CRYPTO_DH_RFC7919_GROUPS
|
||||
CONFIG_CRYPTO_ECB
|
||||
CONFIG_CRYPTO_ECDH
|
||||
CONFIG_CRYPTO_ECDSA
|
||||
CONFIG_CRYPTO_FIPS
|
||||
CONFIG_CRYPTO_GCM
|
||||
CONFIG_CRYPTO_HMAC
|
||||
CONFIG_CRYPTO_MANAGER
|
||||
CONFIG_CRYPTO_RSA
|
||||
CONFIG_CRYPTO_SELFTESTS_FULL
|
||||
CONFIG_CRYPTO_SHA1
|
||||
CONFIG_CRYPTO_SHA256
|
||||
CONFIG_CRYPTO_SHA3
|
||||
CONFIG_CRYPTO_SHA512
|
||||
CONFIG_CRYPTO_XTS
|
||||
CONFIG_CSPRNG_ENABLED
|
||||
CONFIG_ESP32C2_DEFAULT_CPU_FREQ_MHZ
|
||||
CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ
|
||||
@@ -71,6 +96,7 @@ CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI
|
||||
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
|
||||
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
|
||||
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
|
||||
CONFIG_ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING
|
||||
CONFIG_FREERTOS_HZ
|
||||
CONFIG_FREERTOS_UNICORE
|
||||
CONFIG_IDF_TARGET
|
||||
@@ -81,10 +107,13 @@ CONFIG_IDF_TARGET_ESP32C2
|
||||
CONFIG_IDF_TARGET_ESP32C3
|
||||
CONFIG_IDF_TARGET_ESP32C6
|
||||
CONFIG_IDF_TARGET_ESP32H2
|
||||
CONFIG_IDF_TARGET_ESP32P4
|
||||
CONFIG_IDF_TARGET_ESP32S2
|
||||
CONFIG_IDF_TARGET_ESP32S3
|
||||
CONFIG_IDF_TARGET_ESP8266
|
||||
CONFIG_IDF_TARGET_ESP8684
|
||||
CONFIG_KASAN
|
||||
CONFIG_KPROBES
|
||||
CONFIG_MAIN_TASK_STACK_SIZE
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
|
||||
CONFIG_MBEDTLS_PSA_CRYPTO_C
|
||||
@@ -155,6 +184,7 @@ CRYP_KEYSIZE_192B
|
||||
CSM_UNSUPPORTED_ALGS
|
||||
CTYPE_USER
|
||||
CURVED448_SMALL
|
||||
CUSTOM_ENTROPY_TIMEHIRES
|
||||
CY_USING_HAL
|
||||
DCP_USE_DCACHE
|
||||
DILITHIUM_MUL_11_SLOW
|
||||
@@ -175,7 +205,9 @@ ESP_IDF_VERSION_MAJOR
|
||||
ESP_IDF_VERSION_MINOR
|
||||
ESP_PLATFORM
|
||||
ESP_TASK_MAIN_STACK
|
||||
ETHERNET_AVAILABLE
|
||||
EV_TRIGGER
|
||||
FORCE_FAILURE_GETRANDOM
|
||||
FP_ECC_CONTROL
|
||||
FREERTOS_TCP_WINSIM
|
||||
FREESCALE
|
||||
@@ -244,6 +276,7 @@ HSM_KEY_TYPE_HMAC_512
|
||||
HSM_OP_KEY_GENERATION_FLAGS_CREATE
|
||||
HSM_OP_KEY_GENERATION_FLAGS_UPDATE
|
||||
HSM_SVC_KEY_STORE_FLAGS_UPDATE
|
||||
HWCAP_ASIMDRDM
|
||||
IDIRECT_DEV_RANDOM
|
||||
IDIRECT_DEV_TIME
|
||||
ID_TRNG
|
||||
@@ -262,7 +295,7 @@ LIBWOLFSSL_VERSION_GIT_HASH_DATE
|
||||
LIBWOLFSSL_VERSION_GIT_ORIGIN
|
||||
LIBWOLFSSL_VERSION_GIT_SHORT_HASH
|
||||
LIBWOLFSSL_VERSION_GIT_TAG
|
||||
LINUXKM_FPU_STATES_FOLLOW_THREADS
|
||||
LINUXKM_DONT_FORCE_FIPS_ENABLED
|
||||
LINUXKM_LKCAPI_PRIORITY_ALLOW_MASKING
|
||||
LINUX_CYCLE_COUNT
|
||||
LINUX_RUSAGE_UTIME
|
||||
@@ -273,6 +306,7 @@ MAXQ10XX_PRODUCTION_KEY
|
||||
MAXQ_EXPORT_TLS_KEYS
|
||||
MAXQ_SHA1
|
||||
MAXSEG_64K
|
||||
MAX_OID_SZ
|
||||
MAX_WOLFSSL_FILE_SIZE
|
||||
MDK_CONF_BARE_METAL
|
||||
MDK_CONF_FS
|
||||
@@ -335,6 +369,8 @@ NO_GETENV
|
||||
NO_HANDSHAKE_DONE_CB
|
||||
NO_IMX6_CAAM_AES
|
||||
NO_IMX6_CAAM_HASH
|
||||
NO_KEEP_PEER_CERT
|
||||
NO_LINUXKM_DRBG_GET_RANDOM_BYTES
|
||||
NO_OLD_NAMES
|
||||
NO_OLD_POLY1305
|
||||
NO_OLD_TIMEVAL_NAME
|
||||
@@ -385,6 +421,7 @@ NO_WOLFSSL_SHA256_INTERLEAVE
|
||||
NO_WOLFSSL_SHA512_INTERLEAVE
|
||||
NO_WOLFSSL_SKIP_TRAILING_PAD
|
||||
NO_WOLFSSL_SMALL_STACK_STATIC
|
||||
NO_WOLFSSL_USE_ASM_CERT
|
||||
NO_WOLFSSL_XILINX_TAG_MALLOC
|
||||
NRF52
|
||||
NRF52_SERIES
|
||||
@@ -414,6 +451,7 @@ REDIRECTION_OUT1_KEYID
|
||||
REDIRECTION_OUT2_KEYELMID
|
||||
REDIRECTION_OUT2_KEYID
|
||||
RENESAS_T4_USE
|
||||
RHEL_MAJOR
|
||||
RTC_ALARMSUBSECONDMASK_ALL
|
||||
RTE_CMSIS_RTOS_RTX
|
||||
RTOS_MODULE_NET_AVAIL
|
||||
@@ -436,6 +474,7 @@ SL_SE_KEY_TYPE_ECC_P521
|
||||
SL_SE_KEY_TYPE_ECC_X25519
|
||||
SL_SE_KEY_TYPE_ECC_X448
|
||||
SL_SE_PRF_HMAC_SHA1
|
||||
SNIFFER_SINGLE_SESSION_CACHE
|
||||
SOFTDEVICE_PRESENT
|
||||
SO_NOSIGPIPE
|
||||
SO_REUSEPORT
|
||||
@@ -452,6 +491,7 @@ STM32F217xx
|
||||
STM32F401xE
|
||||
STM32F407xx
|
||||
STM32F437xx
|
||||
STM32F439xx
|
||||
STM32F756xx
|
||||
STM32F777xx
|
||||
STM32G071xx
|
||||
@@ -467,6 +507,7 @@ STM32L4A6xx
|
||||
STM32L552xx
|
||||
STM32L562xx
|
||||
STM32MP135Fxx
|
||||
STM32N657xx
|
||||
STM32U575xx
|
||||
STM32U585xx
|
||||
STM32U5A9xx
|
||||
@@ -481,9 +522,18 @@ TCP_NODELAY
|
||||
TFM_ALREADY_SET
|
||||
TFM_SMALL_MONT_SET
|
||||
THREADED_SNIFFTEST
|
||||
TIF_NEED_FPU_LOAD
|
||||
TIME_T_NOT_LONG
|
||||
TI_DUMMY_BUILD
|
||||
TLS13_RSA_PSS_SIGN_CB_NO_PREHASH
|
||||
TSIP_AES_128_CTR
|
||||
TSIP_AES_256_CTR
|
||||
TSIP_ECDSA_P256
|
||||
TSIP_ECDSA_P384
|
||||
TSIP_RSAES_1024
|
||||
TSIP_RSAES_2048
|
||||
TSIP_RSASSA_1024
|
||||
TSIP_RSASSA_2048
|
||||
UNICODE
|
||||
USER_CA_CB
|
||||
USER_CUSTOM_SNIFFX
|
||||
@@ -492,6 +542,7 @@ USE_ALT_MPRIME
|
||||
USE_ANY_ADDR
|
||||
USE_CERT_BUFFERS_25519
|
||||
USE_CERT_BUFFERS_3072
|
||||
USE_CONTESTMUTEX
|
||||
USE_ECDSA_KEYSZ_HASH_ALGO
|
||||
USE_FULL_ASSERT
|
||||
USE_HAL_DRIVER
|
||||
@@ -508,6 +559,7 @@ WC_AESXTS_STREAM_NO_REQUEST_ACCOUNTING
|
||||
WC_AES_BS_WORD_SIZE
|
||||
WC_AES_GCM_DEC_AUTH_EARLY
|
||||
WC_ASN_HASH_SHA256
|
||||
WC_ASN_RUNTIME_DATE_CHECK_CONTROL
|
||||
WC_ASYNC_ENABLE_3DES
|
||||
WC_ASYNC_ENABLE_AES
|
||||
WC_ASYNC_ENABLE_ARC4
|
||||
@@ -526,6 +578,7 @@ WC_ASYNC_ENABLE_SHA384
|
||||
WC_ASYNC_ENABLE_SHA512
|
||||
WC_ASYNC_NO_CRYPT
|
||||
WC_ASYNC_NO_HASH
|
||||
WC_CACHE_RESISTANT_BASE64_TABLE
|
||||
WC_DILITHIUM_CACHE_PRIV_VECTORS
|
||||
WC_DILITHIUM_CACHE_PUB_VECTORS
|
||||
WC_DILITHIUM_FIXED_ARRAY
|
||||
@@ -547,7 +600,10 @@ WC_SHA384_DIGEST_SIZE
|
||||
WC_SHA512
|
||||
WC_SSIZE_TYPE
|
||||
WC_STRICT_SIG
|
||||
WC_WANT_FLAG_DONT_USE_AESNI
|
||||
WC_XMSS_FULL_HASH
|
||||
WIFI_AVAILABLE
|
||||
WIN_REUSE_CRYPT_HANDLE
|
||||
WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE
|
||||
WOLFSENTRY_H
|
||||
WOLFSENTRY_NO_JSON
|
||||
@@ -555,12 +611,12 @@ WOLFSSL_32BIT_MILLI_TIME
|
||||
WOLFSSL_AARCH64_PRIVILEGE_MODE
|
||||
WOLFSSL_AESNI_BY4
|
||||
WOLFSSL_AESNI_BY6
|
||||
WOLFSSL_AES_CTR_EXAMPLE
|
||||
WOLFSSL_AFTER_DATE_CLOCK_SKEW
|
||||
WOLFSSL_ALGO_HW_MUTEX
|
||||
WOLFSSL_ALLOW_CRIT_AIA
|
||||
WOLFSSL_ALLOW_CRIT_AKID
|
||||
WOLFSSL_ALLOW_CRIT_SKID
|
||||
WOLFSSL_ALLOW_ENCODING_CA_FALSE
|
||||
WOLFSSL_ALLOW_MAX_FRAGMENT_ADJUST
|
||||
WOLFSSL_ALLOW_NO_CN_IN_SAN
|
||||
WOLFSSL_ALLOW_NO_SUITES
|
||||
@@ -572,7 +628,6 @@ WOLFSSL_ARM_ARCH_NEON_64BIT
|
||||
WOLFSSL_ASCON_UNROLL
|
||||
WOLFSSL_ASNC_CRYPT
|
||||
WOLFSSL_ASN_EXTRA
|
||||
WOLFSSL_ASN_INT_LEAD_0_ANY
|
||||
WOLFSSL_ASN_TEMPLATE_NEED_SET_INT32
|
||||
WOLFSSL_ASN_TEMPLATE_TYPE_CHECK
|
||||
WOLFSSL_ATECC508
|
||||
@@ -601,10 +656,9 @@ WOLFSSL_CHECK_DESKEY
|
||||
WOLFSSL_CHECK_MEM_ZERO
|
||||
WOLFSSL_CHIBIOS
|
||||
WOLFSSL_CLANG_TIDY
|
||||
WOLFSSL_COMMERCIAL_LICENSE
|
||||
WOLFSSL_CLIENT_EXAMPLE
|
||||
WOLFSSL_CONTIKI
|
||||
WOLFSSL_CRL_ALLOW_MISSING_CDP
|
||||
WOLFSSL_CURVE25519_BLINDING
|
||||
WOLFSSL_CUSTOM_CONFIG
|
||||
WOLFSSL_DILITHIUM_ASSIGN_KEY
|
||||
WOLFSSL_DILITHIUM_MAKE_KEY_SMALL_MEM
|
||||
@@ -618,10 +672,10 @@ WOLFSSL_DILITHIUM_SIGN_CHECK_Y
|
||||
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC
|
||||
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC_A
|
||||
WOLFSSL_DILITHIUM_SMALL_MEM_POLY64
|
||||
WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC
|
||||
WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM
|
||||
WOLFSSL_DISABLE_EARLY_SANITY_CHECKS
|
||||
WOLFSSL_DTLS_DISALLOW_FUTURE
|
||||
WOLFSSL_DTLS_RECORDS_CAN_SPAN_DATAGRAMS
|
||||
WOLFSSL_DTLS_RESEND_ONLY_TIMEOUT
|
||||
WOLFSSL_DUMP_MEMIO_STREAM
|
||||
WOLFSSL_DUP_CERTPOL
|
||||
@@ -639,7 +693,6 @@ WOLFSSL_ESPWROOM32
|
||||
WOLFSSL_EVP_PRINT
|
||||
WOLFSSL_EXPORT_INT
|
||||
WOLFSSL_EXPORT_SPC_SZ
|
||||
WOLFSSL_EXTRA
|
||||
WOLFSSL_FORCE_OCSP_NONCE_CHECK
|
||||
WOLFSSL_FRDM_K64
|
||||
WOLFSSL_FRDM_K64_JENKINS
|
||||
@@ -669,6 +722,9 @@ WOLFSSL_KYBER_NO_DECAPSULATE
|
||||
WOLFSSL_KYBER_NO_ENCAPSULATE
|
||||
WOLFSSL_KYBER_NO_MAKE_KEY
|
||||
WOLFSSL_LIB
|
||||
WOLFSSL_LINUXKM_USE_GET_RANDOM_KPROBES
|
||||
WOLFSSL_LINUXKM_USE_GET_RANDOM_USER_KRETPROBE
|
||||
WOLFSSL_LINUXKM_USE_MUTEXES
|
||||
WOLFSSL_LMS_CACHE_BITS
|
||||
WOLFSSL_LMS_FULL_HASH
|
||||
WOLFSSL_LMS_LARGE_CACHES
|
||||
@@ -701,13 +757,14 @@ WOLFSSL_NO_COPY_CERT
|
||||
WOLFSSL_NO_COPY_KEY
|
||||
WOLFSSL_NO_CRL_DATE_CHECK
|
||||
WOLFSSL_NO_CRL_NEXT_DATE
|
||||
WOLFSSL_NO_CT_MAX_MIN
|
||||
WOLFSSL_NO_DECODE_EXTRA
|
||||
WOLFSSL_NO_DER_TO_PEM
|
||||
WOLFSSL_NO_DH186
|
||||
WOLFSSL_NO_DH_GEN_PUB
|
||||
WOLFSSL_NO_DTLS_SIZE_CHECK
|
||||
WOLFSSL_NO_ETM_ALERT
|
||||
WOLFSSL_NO_FENCE
|
||||
WOLFSSL_NO_FSEEK
|
||||
WOLFSSL_NO_INIT_CTX_KEY
|
||||
WOLFSSL_NO_ISSUERHASH_TDPEER
|
||||
WOLFSSL_NO_KCAPI_AES_CBC
|
||||
@@ -720,7 +777,6 @@ WOLFSSL_NO_KCAPI_SHA224
|
||||
WOLFSSL_NO_OCSP_DATE_CHECK
|
||||
WOLFSSL_NO_OCSP_ISSUER_CHAIN_CHECK
|
||||
WOLFSSL_NO_OCSP_OPTIONAL_CERTS
|
||||
WOLFSSL_NO_PUBLIC_FFDHE
|
||||
WOLFSSL_NO_RSA_KEY_CHECK
|
||||
WOLFSSL_NO_SERVER_GROUPS_EXT
|
||||
WOLFSSL_NO_SESSION_STATS
|
||||
@@ -730,6 +786,7 @@ WOLFSSL_NO_SPHINCS
|
||||
WOLFSSL_NO_STRICT_CIPHER_SUITE
|
||||
WOLFSSL_NO_TICKET_EXPIRE
|
||||
WOLFSSL_NO_TRUSTED_CERTS_VERIFY
|
||||
WOLFSSL_NO_WORD64_OPS
|
||||
WOLFSSL_NO_XOR_OPS
|
||||
WOLFSSL_NRF51_AES
|
||||
WOLFSSL_OLDTLS_AEAD_CIPHERSUITES
|
||||
@@ -762,6 +819,7 @@ WOLFSSL_RENESAS_RSIP
|
||||
WOLFSSL_RENESAS_RZN2L
|
||||
WOLFSSL_RENESAS_TLS
|
||||
WOLFSSL_RENESAS_TSIP_IAREWRX
|
||||
WOLFSSL_REQUIRE_TCA
|
||||
WOLFSSL_RSA_CHECK_D_ON_DECRYPT
|
||||
WOLFSSL_RSA_DECRYPT_TO_0_LEN
|
||||
WOLFSSL_RW_THREADED
|
||||
@@ -774,6 +832,7 @@ WOLFSSL_SE050_INIT
|
||||
WOLFSSL_SE050_NO_RSA
|
||||
WOLFSSL_SE050_NO_TRNG
|
||||
WOLFSSL_SECURE_RENEGOTIATION_ON_BY_DEFAULT
|
||||
WOLFSSL_SERVER_EXAMPLE
|
||||
WOLFSSL_SETTINGS_FILE
|
||||
WOLFSSL_SH224
|
||||
WOLFSSL_SHA256_ALT_CH_MAJ
|
||||
@@ -782,7 +841,6 @@ WOLFSSL_SILABS_TRNG
|
||||
WOLFSSL_SM4_EBC
|
||||
WOLFSSL_SNIFFER_NO_RECOVERY
|
||||
WOLFSSL_SP_ARM32_UDIV
|
||||
WOLFSSL_SP_DH
|
||||
WOLFSSL_SP_FAST_NCT_EXPTMOD
|
||||
WOLFSSL_SP_INT_SQR_VOLATILE
|
||||
WOLFSSL_STACK_CHECK
|
||||
@@ -791,6 +849,7 @@ WOLFSSL_STM32_RNG_NOLIB
|
||||
WOLFSSL_STRONGEST_HASH_SIG
|
||||
WOLFSSL_STSAFE_TAKES_SLOT
|
||||
WOLFSSL_TELIT_M2MB
|
||||
WOLFSSL_TEMPLATE_EXAMPLE
|
||||
WOLFSSL_THREADED_CRYPT
|
||||
WOLFSSL_TICKET_DECRYPT_NO_CREATE
|
||||
WOLFSSL_TICKET_ENC_AES128_GCM
|
||||
@@ -818,6 +877,7 @@ WOLFSSL_USE_FLASHMEM
|
||||
WOLFSSL_USE_OPTIONS_H
|
||||
WOLFSSL_USE_POPEN_HOST
|
||||
WOLFSSL_VALIDATE_DH_KEYGEN
|
||||
WOLFSSL_WC_LMS_SERIALIZE_STATE
|
||||
WOLFSSL_WC_XMSS_NO_SHA256
|
||||
WOLFSSL_WC_XMSS_NO_SHAKE256
|
||||
WOLFSSL_WICED_PSEUDO_UNIX_EPOCH_TIME
|
||||
@@ -836,6 +896,7 @@ WOLF_CRYPTO_CB_ONLY_ECC
|
||||
WOLF_CRYPTO_CB_ONLY_RSA
|
||||
WOLF_CRYPTO_DEV
|
||||
WOLF_NO_TRAILING_ENUM_COMMAS
|
||||
WindowsCE
|
||||
XGETPASSWD
|
||||
XMSS_CALL_PRF_KEYGEN
|
||||
XPAR_VERSAL_CIPS_0_PSPMC_0_PSV_CORTEXA72_0_TIMESTAMP_CLK_FREQ
|
||||
@@ -845,6 +906,8 @@ _ABIO64
|
||||
_ARCH_PPC64
|
||||
_COMPILER_VERSION
|
||||
_INTPTR_T_DECLARED
|
||||
_LINUX_REFCOUNT_H
|
||||
_LINUX_REFCOUNT_TYPES_H
|
||||
_LP64
|
||||
_MSC_VER
|
||||
_MSVC_LANG
|
||||
@@ -885,6 +948,7 @@ __BIG_ENDIAN__
|
||||
__BORLANDC__
|
||||
__CCRX__
|
||||
__COMPILER_VER__
|
||||
__COUNTER__
|
||||
__CYGWIN__
|
||||
__DATE__
|
||||
__DCACHE_PRESENT
|
||||
@@ -938,6 +1002,7 @@ __SDCC_VERSION_MINOR
|
||||
__SDCC_VERSION_PATCH
|
||||
__SIZEOF_INT128__
|
||||
__SIZEOF_LONG_LONG__
|
||||
__STDC_NO_ATOMICS__
|
||||
__STDC_VERSION__
|
||||
__STDC__
|
||||
__STM32__
|
||||
|
||||
137
CMakeLists.txt
137
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.6 LANGUAGES C ASM)
|
||||
project(wolfssl VERSION 5.8.2 LANGUAGES C ASM)
|
||||
|
||||
# Set WOLFSSL_ROOT if not already defined
|
||||
if ("${WOLFSSL_ROOT}" STREQUAL "")
|
||||
@@ -49,7 +49,7 @@ endif()
|
||||
|
||||
# shared library versioning
|
||||
# increment if interfaces have been removed or changed
|
||||
set(WOLFSSL_LIBRARY_VERSION_FIRST 43)
|
||||
set(WOLFSSL_LIBRARY_VERSION_FIRST 44)
|
||||
|
||||
# increment if interfaces have been added
|
||||
# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented
|
||||
@@ -124,6 +124,10 @@ check_function_exists("memset" HAVE_MEMSET)
|
||||
check_function_exists("socket" HAVE_SOCKET)
|
||||
check_function_exists("strftime" HAVE_STRFTIME)
|
||||
check_function_exists("__atomic_fetch_add" HAVE_C___ATOMIC)
|
||||
check_function_exists("getpid" HAVE_GETPID)
|
||||
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(isascii "ctype.h" HAVE_ISASCII)
|
||||
|
||||
include(CheckTypeSize)
|
||||
|
||||
@@ -431,6 +435,7 @@ if(WOLFSSL_CURL)
|
||||
set(WOLFSSL_MD4 "yes")
|
||||
set(WOLFSSL_DES3 "yes")
|
||||
set(WOLFSSL_ALPN "yes")
|
||||
set(WOLFSSL_EX_DATA "yes")
|
||||
set(WOLFSSL_WOLFSSH "yes")
|
||||
set(WOLFSSL_OPENSSLEXTRA "yes")
|
||||
set(WOLFSSL_CRL "yes")
|
||||
@@ -570,10 +575,19 @@ add_option(WOLFSSL_OQS
|
||||
"no" "yes;no")
|
||||
|
||||
# ML-KEM/Kyber
|
||||
add_option(WOLFSSL_MMLKEM
|
||||
add_option(WOLFSSL_MLKEM
|
||||
"Enable the wolfSSL PQ ML-KEM library (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
# LMS
|
||||
add_option(WOLFSSL_LMS
|
||||
"Enable the PQ LMS Stateful Hash-based Signature Scheme (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
add_option(WOLFSSL_LMSSHA256192
|
||||
"Enable the LMS SHA_256_192 truncated variant (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
# Experimental features
|
||||
add_option(WOLFSSL_EXPERIMENTAL
|
||||
"Enable experimental features (default: disabled)"
|
||||
@@ -587,7 +601,7 @@ if (WOLFSSL_EXPERIMENTAL)
|
||||
# check if any experimental features are also enabled:
|
||||
set(WOLFSSL_FOUND_EXPERIMENTAL_FEATURE 0)
|
||||
|
||||
set_wolfssl_definitions("WOLFSSL_EXPERIMENTAL_SETTINGS" RESUlT)
|
||||
set_wolfssl_definitions("WOLFSSL_EXPERIMENTAL_SETTINGS" RESULT)
|
||||
|
||||
# Checking for experimental feature: OQS
|
||||
message(STATUS "Looking for WOLFSSL_OQS")
|
||||
@@ -602,9 +616,9 @@ if (WOLFSSL_EXPERIMENTAL)
|
||||
list(APPEND WOLFSSL_LINK_LIBS ${OQS_LIBRARY})
|
||||
list(APPEND WOLFSSL_INCLUDE_DIRS ${OQS_INCLUDE_DIR})
|
||||
|
||||
set_wolfssl_definitions("HAVE_LIBOQS" RESUlT)
|
||||
set_wolfssl_definitions("HAVE_TLS_EXTENSIONS" RESUlT)
|
||||
set_wolfssl_definitions("OPENSSL_EXTRA" RESUlT)
|
||||
set_wolfssl_definitions("HAVE_LIBOQS" RESULT)
|
||||
set_wolfssl_definitions("HAVE_TLS_EXTENSIONS" RESULT)
|
||||
set_wolfssl_definitions("OPENSSL_EXTRA" RESULT)
|
||||
|
||||
else()
|
||||
message(STATUS "Checking OQS - not found")
|
||||
@@ -614,20 +628,52 @@ if (WOLFSSL_EXPERIMENTAL)
|
||||
message(STATUS "Looking for WOLFSSL_OQS - not found")
|
||||
endif()
|
||||
|
||||
# Checking for experimental feature: Kyber
|
||||
message(STATUS "Looking for WOLFSSL_KYBER")
|
||||
if (WOLFSSL_KYBER)
|
||||
# Checking for experimental feature: WOLFSSL_MLKEM
|
||||
message(STATUS "Looking for WOLFSSL_MLKEM")
|
||||
if (WOLFSSL_MLKEM)
|
||||
set(WOLFSSL_FOUND_EXPERIMENTAL_FEATURE 1)
|
||||
|
||||
message(STATUS "Automatically set related requirements for Kyber:")
|
||||
set_wolfssl_definitions("WOLFSSL_HAVE_MLKEM" RESUlT)
|
||||
set_wolfssl_definitions("WOLFSSL_WC_MLKEM" RESUlT)
|
||||
set_wolfssl_definitions("WOLFSSL_SHA3" RESUlT)
|
||||
set_wolfssl_definitions("WOLFSSL_SHAKE128" RESUlT)
|
||||
set_wolfssl_definitions("WOLFSSL_SHAKE256" RESUlT)
|
||||
message(STATUS "Looking for WOLFSSL_KYBER - found")
|
||||
message(STATUS "Automatically set related requirements for ML-KEM:")
|
||||
add_definitions("-DWOLFSSL_HAVE_MLKEM")
|
||||
add_definitions("-DWOLFSSL_WC_MLKEM")
|
||||
add_definitions("-DWOLFSSL_SHA3")
|
||||
add_definitions("-DWOLFSSL_SHAKE128")
|
||||
add_definitions("-DWOLFSSL_SHAKE256")
|
||||
|
||||
set_wolfssl_definitions("WOLFSSL_HAVE_MLKEM" RESULT)
|
||||
set_wolfssl_definitions("WOLFSSL_WC_MLKEM" RESULT)
|
||||
set_wolfssl_definitions("WOLFSSL_SHA3" RESULT)
|
||||
set_wolfssl_definitions("WOLFSSL_SHAKE128" RESULT)
|
||||
set_wolfssl_definitions("WOLFSSL_SHAKE256" RESULT)
|
||||
message(STATUS "Looking for WOLFSSL_MLKEM - found")
|
||||
else()
|
||||
message(STATUS "Looking for WOLFSSL_KYBER - not found")
|
||||
message(STATUS "Looking for WOLFSSL_MLKEM - not found")
|
||||
endif()
|
||||
|
||||
# Checking for experimental feature: WOLFSSL_LMS
|
||||
message(STATUS "Looking for WOLFSSL_LMS")
|
||||
if (WOLFSSL_LMS)
|
||||
set(WOLFSSL_FOUND_EXPERIMENTAL_FEATURE 2)
|
||||
|
||||
message(STATUS "Automatically set related requirements for LMS")
|
||||
add_definitions("-DWOLFSSL_HAVE_LMS")
|
||||
add_definitions("-DWOLFSSL_WC_LMS")
|
||||
set_wolfssl_definitions("WOLFSSL_HAVE_LMS" RESULT)
|
||||
set_wolfssl_definitions("WOLFSSL_WC_LMS" RESULT)
|
||||
message(STATUS "Looking for WOLFSSL_LMS - found")
|
||||
# Checking for experimental feature: WOLFSSL_LMSSHA256192
|
||||
if (WOLFSSL_LMSSHA256192)
|
||||
message(STATUS "Automatically set related requirements for LMS SHA256-192")
|
||||
add_definitions("-DWOLFSSL_LMS_SHA256_192")
|
||||
add_definitions("-DWOLFSSL_NO_LMS_SHA256_256")
|
||||
set_wolfssl_definitions("WOLFSSL_LMS_SHA256_192" RESULT)
|
||||
set_wolfssl_definitions("WOLFSSL_NO_LMS_SHA256_256" RESULT)
|
||||
message(STATUS "Looking for WOLFSSL_LMSSHA256192 - found")
|
||||
else()
|
||||
message(STATUS "Looking for WOLFSSL_LMSSHA256192 - not found")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Looking for WOLFSSL_LMS - not found")
|
||||
endif()
|
||||
|
||||
# Other experimental feature detection can be added here...
|
||||
@@ -640,8 +686,8 @@ if (WOLFSSL_EXPERIMENTAL)
|
||||
endif()
|
||||
|
||||
# Sanity checks
|
||||
if(WOLFSSL_OQS AND WOLFSSL_KYBER)
|
||||
message(FATAL_ERROR "Error: cannot enable both WOLFSSL_OQS and WOLFSSL_KYBER at the same time.")
|
||||
if(WOLFSSL_OQS AND WOLFSSL_MLKEM)
|
||||
message(FATAL_ERROR "Error: cannot enable both WOLFSSL_OQS and WOLFSSL_MLKEM at the same time.")
|
||||
endif()
|
||||
|
||||
else()
|
||||
@@ -650,8 +696,8 @@ else()
|
||||
if (WOLFSSL_OQS)
|
||||
message(FATAL_ERROR "Error: WOLFSSL_OQS requires WOLFSSL_EXPERIMENTAL at this time.")
|
||||
endif()
|
||||
if(WOLFSSL_KYBER)
|
||||
message(FATAL_ERROR "Error: WOLFSSL_KYBER requires WOLFSSL_EXPERIMENTAL at this time.")
|
||||
if(WOLFSSL_MLKEM)
|
||||
message(FATAL_ERROR "Error: WOLFSSL_MLKEM requires WOLFSSL_EXPERIMENTAL at this time.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -893,7 +939,7 @@ endif()
|
||||
# - SEP
|
||||
|
||||
add_option("WOLFSSL_KEYGEN"
|
||||
"Enable key generation (default: disabled)])"
|
||||
"Enable key generation (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
add_option("WOLFSSL_CERTGEN"
|
||||
@@ -1111,8 +1157,8 @@ endif()
|
||||
|
||||
# Old TLS
|
||||
add_option("WOLFSSL_OLD_TLS"
|
||||
"Enable old TLS versions < 1.2 (default: enabled)"
|
||||
"yes" "yes;no")
|
||||
"Enable old TLS versions < 1.2 (default: disabled)"
|
||||
"no" "yes;no")
|
||||
|
||||
if(NOT WOLFSSL_OLD_TLS)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DNO_OLD_TLS")
|
||||
@@ -1363,17 +1409,25 @@ if(WOLFSSL_OPENSSH OR WOLFSSL_WPAS)
|
||||
endif()
|
||||
|
||||
# MD5
|
||||
set(WOLFSSL_MD5_HELP_STRING "Enable MD5 (default: enabled)")
|
||||
add_option("WOLFSSL_MD5" ${WOLFSSL_MD5_HELP_STRING} "yes" "yes;no")
|
||||
set(WOLFSSL_MD5_HELP_STRING "Enable MD5 (default: disabled)")
|
||||
add_option("WOLFSSL_MD5" ${WOLFSSL_MD5_HELP_STRING} "no" "yes;no")
|
||||
|
||||
if(WOLFSSL_WPAS OR
|
||||
WOLFSSL_HAPROXY OR
|
||||
WOLFSSL_NGINX OR
|
||||
WOLFSSL_OPENSSH OR
|
||||
WOLFSSL_OPENSSLEXTRA OR
|
||||
WOLFSSL_OPENVPN OR
|
||||
WOLFSSL_OLD_TLS OR
|
||||
WOLFSSL_FORTRESS OR
|
||||
WOLFSSL_LIGHTY OR
|
||||
WOLFSSL_DES3 OR
|
||||
WOLFSSL_OPENSSLALL)
|
||||
override_cache(WOLFSSL_MD5 "yes")
|
||||
endif()
|
||||
|
||||
if(NOT WOLFSSL_MD5)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DNO_MD5" "-DNO_OLD_TLS")
|
||||
else()
|
||||
# turn off MD5 if leanpsk or leantls on
|
||||
if(WOLFSSL_LEAN_PSK OR WOLFSSL_LEAN_TLS)
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DNO_MD5" "-DNO_OLD_TLS")
|
||||
override_cache(WOLFSSL_MD5 "no")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# SHA
|
||||
@@ -2040,6 +2094,7 @@ if(WOLFSSL_TPM)
|
||||
override_cache(WOLFSSL_CERTEXT "yes")
|
||||
override_cache(WOLFSSL_PKCS7 "yes")
|
||||
override_cache(WOLFSSL_AESCFB "yes")
|
||||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_ALLOW_ENCODING_CA_FALSE")
|
||||
endif()
|
||||
|
||||
if(WOLFSSL_CLU)
|
||||
@@ -2320,6 +2375,18 @@ if (ENABLE_SCCACHE AND (NOT WOLFSSL_SCCACHE_ALREADY_SET_FLAG))
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_option("WOLFSSL_KEYLOG_EXPORT"
|
||||
"Enable insecure export of TLS secrets to an NSS keylog file (default: disabled)"
|
||||
"no" "yes;no")
|
||||
if(WOLFSSL_KEYLOG_EXPORT)
|
||||
message(WARNING "Keylog export enabled -- Sensitive key data will be stored insecurely.")
|
||||
list(APPEND WOLFSSL_DEFINITIONS
|
||||
"-DSHOW_SECRETS"
|
||||
"-DHAVE_SECRET_CALLBACK"
|
||||
"-DWOLFSSL_SSLKEYLOGFILE"
|
||||
"-DWOLFSSL_KEYLOG_EXPORT_WARNED")
|
||||
endif()
|
||||
|
||||
|
||||
file(REMOVE ${OPTION_FILE})
|
||||
|
||||
@@ -2576,6 +2643,10 @@ if(WOLFSSL_EXAMPLES)
|
||||
tests/api/test_dtls.c
|
||||
tests/api/test_ocsp.c
|
||||
tests/api/test_evp.c
|
||||
tests/api/test_tls_ext.c
|
||||
tests/api/test_tls.c
|
||||
tests/api/test_x509.c
|
||||
tests/api/test_asn.c
|
||||
tests/srp.c
|
||||
tests/suites.c
|
||||
tests/w64wrapper.c
|
||||
|
||||
20
CMakePresets.json
Normal file
20
CMakePresets.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 22,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "vs2022-x64",
|
||||
"displayName": "Visual Studio 2022 x64",
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"architecture": "x64",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
9
CMakeSettings.json
Normal file
9
CMakeSettings.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "No-CMake",
|
||||
"generator": "Ninja",
|
||||
"buildCommandArgs": "echo 'No build command'"
|
||||
}
|
||||
]
|
||||
}
|
||||
833
COPYING
833
COPYING
@@ -1,281 +1,622 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
0. Definitions.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
1. Source Code.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
2. Basic Permissions.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
14. Revised Versions of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
NO WARRANTY
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
@@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
This program 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
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
@@ -303,37 +644,31 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
411
ChangeLog.md
411
ChangeLog.md
@@ -1,3 +1,414 @@
|
||||
# wolfSSL Release 5.8.2 (July 17, 2025)
|
||||
|
||||
Release 5.8.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: * wolfSSL is now GPLv3 instead of GPLv2
|
||||
* --enable-heapmath is deprecated
|
||||
* MD5 is now disabled by default
|
||||
|
||||
|
||||
PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request number where the code change was added.
|
||||
|
||||
## Vulnerabilities
|
||||
|
||||
* [Low] There is the potential for a fault injection attack on ECC and Ed25519 verify operations. In versions of wolfSSL 5.7.6 and later the --enable-faultharden option is available to help mitigate against potential fault injection attacks. The mitigation added in wolfSSL version 5.7.6 is to help harden applications relying on the results of the verify operations, such as when used with wolfBoot. If doing ECC or Ed25519 verify operations on a device at risk for fault injection attacks then --enable-faultharden could be used to help mitigate it. Thanks to Kevin from Fraunhofer AISEC for the report.
|
||||
|
||||
Hardening option added in PR https://github.com/wolfSSL/wolfssl/pull/8289
|
||||
|
||||
|
||||
* [High CVE-2025-7395] When using WOLFSSL_SYS_CA_CERTS and WOLFSSL_APPLE_NATIVE_CERT_VALIDATION on an Apple platform, the native trust store verification routine overrides errors produced elsewhere in the wolfSSL certificate verification process including failures due to hostname matching/SNI, OCSP, CRL, etc. This allows any trusted cert chain to override other errors detected during chain verification that should have resulted in termination of the TLS connection. If building wolfSSL on versions after 5.7.6 and before 5.8.2 with use of the system CA support and the apple native cert validation feature enabled on Apple devices (on by default for non-macOS Apple targets when using autotools or CMake) we recommend updating to the latest version of wolfSSL. Thanks to Thomas Leong from ExpressVPN for the report.
|
||||
|
||||
Fixed in PR https://github.com/wolfSSL/wolfssl/pull/8833
|
||||
|
||||
|
||||
* [Med. CVE-2025-7394] In the OpenSSL compatibility layer implementation, the function RAND_poll() was not behaving as expected and leading to the potential for predictable values returned from RAND_bytes() after fork() is called. This can lead to weak or predictable random numbers generated in applications that are both using RAND_bytes() and doing fork() operations. This only affects applications explicitly calling RAND_bytes() after fork() and does not affect any internal TLS operations. Although RAND_bytes() documentation in OpenSSL calls out not being safe for use with fork() without first calling RAND_poll(), an additional code change was also made in wolfSSL to make RAND_bytes() behave similar to OpenSSL after a fork() call without calling RAND_poll(). Now the Hash-DRBG used gets reseeded after detecting running in a new process. If making use of RAND_bytes() and calling fork() we recommend updating to the latest version of wolfSSL. Thanks to Per Allansson from Appgate for the report.
|
||||
|
||||
Fixed in the following PR’s
|
||||
https://github.com/wolfSSL/wolfssl/pull/8849
|
||||
https://github.com/wolfSSL/wolfssl/pull/8867
|
||||
https://github.com/wolfSSL/wolfssl/pull/8898
|
||||
|
||||
|
||||
|
||||
* [Low CVE-2025-7396] In wolfSSL 5.8.0 the option of hardening the C implementation of Curve25519 private key operations was added with the addition of blinding support (https://www.wolfssl.com/curve25519-blinding-support-added-in-wolfssl-5-8-0/). In wolfSSL release 5.8.2 that blinding support is turned on by default in applicable builds. The blinding configure option is only for the base C implementation of Curve25519. It is not needed, or available with; ARM assembly builds, Intel assembly builds, and the small Curve25519 feature. While the attack would be very difficult to execute in practice, enabling blinding provides an additional layer of protection for devices that may be more susceptible to physical access or side-channel observation. Thanks to Arnaud Varillon, Laurent Sauvage, and Allan Delautre from Telecom Paris for the report.
|
||||
|
||||
Blinding enabled by default in PR https://github.com/wolfSSL/wolfssl/pull/8736
|
||||
|
||||
|
||||
## New Features
|
||||
* Multiple sessions are now supported in the sniffer due to the removal of a cached check. (PR #8723)
|
||||
* New API ssl_RemoveSession() has been implemented for sniffer cleanup operations. (PR #8768)
|
||||
* The new ASN X509 API, `wc_GetSubjectPubKeyInfoDerFromCert`, has been introduced for retrieving public key information from certificates. (PR #8758)
|
||||
* `wc_PKCS12_create()` has been enhanced to support PBE_AES(256|128)_CBC key and certificate encryptions. (PR #8782, PR #8822, PR #8859)
|
||||
* `wc_PKCS7_DecodeEncryptedKeyPackage()` has been added for decoding encrypted key packages. (PR #8976)
|
||||
* All AES, SHA, and HMAC functionality has been implemented within the Linux Kernel Module. (PR #8998)
|
||||
* Additions to the compatibility layer have been introduced for X.509 extensions and RSA PSS. Adding the API i2d_PrivateKey_bio, BN_ucmp and X509v3_get_ext_by_NID. (PR #8897)
|
||||
* Added support for STM32N6. (PR #8914)
|
||||
* Implemented SHA-256 for PPC 32 assembly. (PR #8894)
|
||||
|
||||
## Improvements / Optimizations
|
||||
|
||||
### Linux Kernel Module (LinuxKM) Enhancements
|
||||
* Registered DH and FFDHE for the Linux Kernel Module. (PR #8707)
|
||||
* Implemented fixes for standard RNG in the Linux Kernel Module. (PR #8718)
|
||||
* Added an ECDSA workaround for the Linux Kernel Module. (PR #8727)
|
||||
* Added more PKCS1 pad SHA variants for RSA in the Linux Kernel Module. (PR #8730)
|
||||
* Set default priority to 100000 for LKCAPI in the Linux Kernel Module. (PR #8740)
|
||||
* Ensured ECDH never has FIPS enabled in the Linux Kernel Module. (PR #8751)
|
||||
* Implemented further Linux Kernel Module and SP tweaks. (PR #8773)
|
||||
* Added sig_alg support for Linux 6.13 RSA in the Linux Kernel Module. (PR #8796)
|
||||
* Optimized wc_linuxkm_fpu_state_assoc. (PR #8828)
|
||||
* Ensured DRBG is multithread-round-1 in the Linux Kernel Module. (PR #8840)
|
||||
* Prevented toggling of fips_enabled in the Linux Kernel Module. (PR #8873)
|
||||
* Refactored drbg_ctx clear in the Linux Kernel Module. (PR #8876)
|
||||
* Set sig_alg max_size and digest_size callbacks for RSA in the Linux Kernel Module. (PR #8915)
|
||||
* Added get_random_bytes for the Linux Kernel Module. (PR #8943)
|
||||
* Implemented distro fix for the Linux Kernel Module. (PR #8994)
|
||||
* Fixed page-flags-h in the Linux Kernel Module. (PR #9001)
|
||||
* Added MODULE_LICENSE for the Linux Kernel Module. (PR #9005)
|
||||
* Post-Quantum Cryptography (PQC) & Asymmetric Algorithms
|
||||
* Kyber has been updated to the MLKEM ARM file for Zephyr (PR #8781)
|
||||
* Backward compatibility has been implemented for ML_KEM IDs (PR #8827)
|
||||
* ASN.1 is now ensured to be enabled when only building PQ algorithms (PR #8884)
|
||||
* Building LMS with verify-only has been fixed (PR #8913)
|
||||
* Parameters for LMS SHA-256_192 have been corrected (PR #8912)
|
||||
* State can now be saved with the private key for LMS (PR #8836)
|
||||
* Support for OpenSSL format has been added for ML-DSA/Dilithium (PR #8947)
|
||||
* `dilithium_coeff_eta2[]` has been explicitly declared as signed (PR #8955)
|
||||
|
||||
### Build System & Portability
|
||||
* Prepared for the inclusion of v5.8.0 in the Ada Alire index. (PR #8714)
|
||||
* Introduced a new build option to allow reuse of the Windows crypt provider handle. (PR #8706)
|
||||
* Introduced general fixes for various build configurations. (PR #8763)
|
||||
* Made improvements for portability using older GCC 4.8.2. (PR #8753)
|
||||
* Macro guards updated to allow tests to build with opensslall and no server. (PR #8776)
|
||||
* Added a check for STDC_NO_ATOMICS macro before use of atomics. (PR #8885)
|
||||
* Introduced CMakePresets.json and CMakeSettings.json. (PR #8905)
|
||||
* Added an option to not use constant time code with min/max. (PR #8830)
|
||||
* Implemented proper MacOS dispatch for conditional signal/wait. (PR #8928)
|
||||
* Disabled MD5 by default for both general and CMake builds. (PR #8895, PR #8948)
|
||||
* Improved to allow building OPENSSL_EXTRA without KEEP_PEER_CERT. (PR #8926)
|
||||
* Added introspection for Intel and ARM assembly speedups. (PR #8954)
|
||||
* Fixed cURL config to set HAVE_EX_DATA and HAVE_ALPN. (PR #8973)
|
||||
* Moved FREESCALE forced algorithm HAVE_ECC to IDE/MQX/user_settings.h. (PR #8977)
|
||||
|
||||
### Testing & Debugging
|
||||
* Fixed the exit status for testwolfcrypt. (PR #8762)
|
||||
* Added WOLFSSL_DEBUG_PRINTF and WOLFSSL_DEBUG_CERTIFICATE_LOADS for improved debugging output. (PR #8769, PR #8770)
|
||||
* Guarded some benchmark tests with NO_SW_BENCH. (PR #8760)
|
||||
* Added an additional unit test for wolfcrypt PKCS12 file to improve code coverage. (PR #8831)
|
||||
* Added an additional unit test for increased DH code coverage. (PR #8837)
|
||||
* Adjusted for warnings with NO_TLS build and added GitHub actions test. (PR #8851)
|
||||
* Added additional compatibility layer RAND tests. (PR #8852)
|
||||
* Added an API unit test for checking domain name. (PR #8863)
|
||||
* Added bind v9.18.33 testing. (PR #8888)
|
||||
* Fixed issue with benchmark help options and descriptions not lining up. (PR #8957)
|
||||
|
||||
### Certificates & ASN.1
|
||||
* Changed the algorithm for sum in ASN.1 OIDs. (PR #8655)
|
||||
* Updated PKCS7 to use X509 STORE for internal verification. (PR #8748)
|
||||
* Improved handling of temporary buffer size for X509 extension printing. (PR #8710)
|
||||
* Marked IP address as WOLFSSL_V_ASN1_OCTET_STRING for ALT_NAMES_OID. (PR #8842)
|
||||
* Fixed printing empty names in certificates. (PR #8880)
|
||||
* Allowed CA:FALSE on wolftpm. (PR #8925)
|
||||
* Fixed several inconsistent function prototype parameter names in wc/asn. (PR #8949)
|
||||
* Accounted for custom extensions when creating a Cert from a WOLFSSL_X509. (PR #8960)
|
||||
|
||||
### TLS/DTLS & Handshake
|
||||
* Checked group correctness outside of TLS 1.3 too for TLSX_UseSupportedCurve. (PR #8785)
|
||||
* Dropped records that span datagrams in DTLS. (PR #8642)
|
||||
* Implemented WC_NID_netscape_cert_type. (PR #8800)
|
||||
* Refactored GetHandshakeHeader/GetHandShakeHeader into one function. (PR #8787)
|
||||
* Correctly set the current peer in dtlsProcessPendingPeer. (PR #8848)
|
||||
* Fixed set_groups for TLS. (PR #8824)
|
||||
* Allowed trusted_ca_keys with TLSv1.3. (PR #8860)
|
||||
* Moved Dtls13NewEpoch into DeriveTls13Keys. (PR #8858)
|
||||
* Cleared tls1_3 on downgrade. (PR #8861)
|
||||
* Always sent ACKs on detected retransmission for DTLS1.3. (PR #8882)
|
||||
* Removed DTLS from echo examples. (PR #8889)
|
||||
* Recalculated suites at SSL initialization. (PR #8757)
|
||||
* No longer using BIO for ALPN. (PR #8969)
|
||||
* Fixed wolfSSL_BIO_new_connect's handling of IPV6 addresses. (PR #8815)
|
||||
* Memory Management & Optimizations
|
||||
* Performed small stack refactors, improved stack size with mlkem and dilithium, and added additional tests. (PR #8779)
|
||||
* Implemented FREE_MP_INT_SIZE in heap math. (PR #8881)
|
||||
* Detected correct MAX_ENCODED_SIG_SZ based on max support in math lib. (PR #8931)
|
||||
* Fixed improper access of sp_int_minimal using sp_int. (PR #8985)
|
||||
|
||||
### Cryptography & Hash Functions
|
||||
* Implemented WC_SIPHASH_NO_ASM for not using assembly optimizations with siphash. (PR #8789, PR #8791)
|
||||
* Added missing DH_MAX_SIZE define for FIPS and corrected wolfssl.rc FILETYPE to VFT_DLL. (PR #8794)
|
||||
* Implemented WC_SHA3_NO_ASM for not using assembly with SHA3. (PR #8817)
|
||||
* Improved Aarch64 XFENCE. (PR #8832)
|
||||
* Omitted frame pointer for ARM32/Thumb2/RISC-V 64 assembly. (PR #8893)
|
||||
* Fixed branch instruction in ARMv7a ASM. (PR #8933)
|
||||
* Enabled EVP HMAC to work with WOLFSSL_HMAC_COPY_HASH. (PR #8944)
|
||||
* Platform-Specific & Hardware Integration
|
||||
* Added HAVE_HKDF for wolfssl_test and explicit support for ESP32P4. (PR #8742)
|
||||
* Corrected Espressif default time setting. (PR #8829)
|
||||
* Made wc_tsip_* APIs public. (PR #8717)
|
||||
* Improved PlatformIO Certificate Bundle Support. (PR #8847)
|
||||
* Fixed the TSIP TLS example program. (PR #8857)
|
||||
* Added crypto callback functions for TROPIC01 secure element. (PR #8812)
|
||||
* Added Renesas RX TSIP AES CTR support. (PR #8854)
|
||||
* Fixed TSIP port using crypto callback. (PR #8937)
|
||||
|
||||
### General Improvements & Refactoring
|
||||
* Attempted wolfssl_read_bio_file in read_bio even when XFSEEK is available. (PR #8703)
|
||||
* Refactored GetHandshakeHeader/GetHandShakeHeader into one function. (PR #8787)
|
||||
* Updated libspdm from 3.3.0 to 3.7.0. (PR #8906)
|
||||
* Fixed missing dashes on the end of header and footer for Falcon PEM key. (PR #8904)
|
||||
* Fixed minor code typos for macos signal and types.h max block size. (PR #8934)
|
||||
* Make the API wolfSSL_X509_STORE_CTX_get_error accessible to more build configurations for ease of getting the "store" error code and depth with certificate failure callback implementations. (PR #8903)
|
||||
|
||||
## Bug Fixes
|
||||
* Fixed issues to support _WIN32_WCE (VS 2008 with WinCE 6.0/7.0). (PR #8709)
|
||||
* Fixed STM32 Hash with IRQ enabled. (PR #8705)
|
||||
* Fixed raw hash when using crypto instructions on RISC-V 64-bit. (PR #8733)
|
||||
* Fixed ECDH decode secret in the Linux Kernel Module. (PR #8729)
|
||||
* Passed in the correct hash type to wolfSSL_RSA_verify_ex. (PR #8726)
|
||||
* Fixed issues for Intel QuickAssist latest driver (4.28). (PR #8728)
|
||||
* Speculative fix for CodeSonar overflow issue in ssl_certman.c. (PR #8715)
|
||||
* Fixed Arduino progmem print and AVR WOLFSSL_USER_IO. (PR #8668)
|
||||
* Correctly advanced the index in wc_HKDF_Expand_ex. (PR #8737)
|
||||
* Fixed STM32 hash status check logic, including NO_AES_192 and NO_AES_256. (PR #8732)
|
||||
* Added missing call to wolfSSL_RefFree in FreeCRL to prevent memory leaks. (PR #8750)
|
||||
* Fixed sanity check on --group with unit test app and null sanity check with des decrypt. (PR #8711)
|
||||
* Fixed Curve25519 and static ephemeral issue with blinding. (PR #8766)
|
||||
* Fixed edge case issue with STM32 AES GCM auth padding. (PR #8745)
|
||||
* Removed redefinition of MlKemKey and fixed build issue in benchmark. (PR #8755)
|
||||
* Used proper heap hint when freeing CRL in error case. (PR #8713)
|
||||
* Added support for no malloc with wc_CheckCertSigPubKey. (PR #8725)
|
||||
* Fixed C# wrapper Release build. (PR #8802)
|
||||
* Handled malformed CCS and CCS before CH in TLS1.3. (PR #8788)
|
||||
* Fixed ML-DSA with WOLFSSL_DILITHIUM_NO_SIGN. (PR #8798)
|
||||
* Fixed AesGcmCrypt_1 no-stream in the Linux Kernel Module. (PR #8814)
|
||||
* Fixed return value usage for crypto_sig_sign in the Linux Kernel Module. (PR #8816)
|
||||
* Fixed issue with CSharp and Windows CE with conversion of ASCII and Unicode. (PR #8799)
|
||||
* Fixed Renesas SCE on RA6M4. (PR #8838)
|
||||
* Fixed tests for different configs for ML-DSA. (PR #8865)
|
||||
* Fixed bug in ParseCRL_Extensions around the size of a CRL number handled and CRL number OID. (PR #8587)
|
||||
* Fixed uninitialized wc_FreeRng in prime_test. (PR #8886)
|
||||
* Fixed ECC configuration issues with ECC verify only and no RNG. (PR #8901)
|
||||
* Fixed issues with max size, openssl.test netcat, and clang-tidy. (PR #8909)
|
||||
* Fixed for casting down and uninit issues in Dilithium/ML-DSA. (PR #8868)
|
||||
* Fixed memory allocation failure testing and related unit test cases. (PR #8945, PR #8952)
|
||||
* Fixed build issue with ML-DSA 44 only. (PR #8981)
|
||||
* Fixed possible memory leak with X509 reference counter when using x509small. (PR #8982)
|
||||
|
||||
|
||||
# wolfSSL Release 5.8.0 (Apr 24, 2025)
|
||||
|
||||
Release 5.8.0 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 deprecated
|
||||
|
||||
PR stands for Pull Request, and PR <NUMBER> references a GitHub pull request
|
||||
number where the code change was added.
|
||||
|
||||
|
||||
## New Feature Additions
|
||||
* Algorithm registration in the Linux kernel module for all supported FIPS AES,
|
||||
SHA, HMAC, ECDSA, ECDH, and RSA modes, key sizes, and digest sizes.
|
||||
* Implemented various fixes to support building for Open Watcom including OS/2
|
||||
support and Open Watcom 1.9 compatibility (PR 8505, 8484)
|
||||
* Added support for STM32H7S (tested on NUCLEO-H7S3L8) (PR 8488)
|
||||
* Added support for STM32WBA (PR 8550)
|
||||
* Added Extended Master Secret Generation Callback to the --enable-pkcallbacks
|
||||
build (PR 8303)
|
||||
* Implement AES-CTS (configure flag --enable-aescts) in wolfCrypt (PR 8594)
|
||||
* Added support for libimobiledevice commit 860ffb (PR 8373)
|
||||
* Initial ASCON hash256 and AEAD128 support based on NIST SP 800-232 IPD
|
||||
(PR 8307)
|
||||
* Added blinding option when using a Curve25519 private key by defining the
|
||||
macro WOLFSSL_CURVE25519_BLINDING (PR 8392)
|
||||
|
||||
|
||||
## Linux Kernel Module
|
||||
* Production-ready LKCAPI registration for cbc(aes), cfb(aes), gcm(aes),
|
||||
rfc4106 (gcm(aes)), ctr(aes), ofb(aes), and ecb(aes), ECDSA with P192, P256,
|
||||
P384, and P521 curves, ECDH with P192, P256, and P384 curves, and RSA with
|
||||
bare and PKCS1 padding
|
||||
* Various fixes for LKCAPI wrapper for AES-CBC and AES-CFB (PR 8534, 8552)
|
||||
* Adds support for the legacy one-shot AES-GCM back end (PR 8614, 8567) for
|
||||
compatibility with FIPS 140-3 Cert #4718.
|
||||
* On kernel >=6.8, for CONFIG_FORTIFY_SOURCE, use 5-arg fortify_panic() override
|
||||
macro (PR 8654)
|
||||
* Update calls to scatterwalk_map() and scatterwalk_unmap() for linux commit
|
||||
7450ebd29c (merged for Linux 6.15) (PR 8667)
|
||||
* Inhibit LINUXKM_LKCAPI_REGISTER_ECDH on kernel <5.13 (PR 8673)
|
||||
* Fix for uninitialized build error with fedora (PR 8569)
|
||||
* Register ecdsa, ecdh, and rsa for use with linux kernel crypto (PR 8637, 8663,
|
||||
8646)
|
||||
* Added force zero shared secret buffer, and clear of old key with ecdh
|
||||
(PR 8685)
|
||||
* Update fips-check.sh script to pickup XTS streaming support on aarch64 and
|
||||
disable XTS-384 as an allowed use in FIPS mode (PR 8509, 8546)
|
||||
|
||||
|
||||
## Enhancements and Optimizations
|
||||
|
||||
### Security & Cryptography
|
||||
* Add constant-time implementation improvements for encoding functions. We thank
|
||||
Zhiyuan and Gilles for sharing a new constant-time analysis tool (CT-LLVM) and
|
||||
reporting several non-constant-time implementations. (PR 8396, 8617)
|
||||
* Additional support for PKCS7 verify and decode with indefinite lengths
|
||||
(PR 8520, 834, 8645)
|
||||
* Add more PQC hybrid key exchange algorithms such as support for combinations
|
||||
with X25519 and X448 enabling compatibility with the PQC key exchange support
|
||||
in Chromium browsers and Mozilla Firefox (PR 7821)
|
||||
* Add short-circuit comparisons to DH key validation for RFC 7919 parameters
|
||||
(PR 8335)
|
||||
* Improve FIPS compatibility with various build configurations for more resource
|
||||
constrained builds (PR 8370)
|
||||
* Added option to disable ECC public key order checking (PR 8581)
|
||||
* Allow critical alt and basic constraints extensions (PR 8542)
|
||||
* New codepoint for MLDSA to help with interoperability (PR 8393)
|
||||
* Add support for parsing trusted PEM certs having the header
|
||||
“BEGIN_TRUSTED_CERT” (PR 8400)
|
||||
* Add support for parsing only of DoD certificate policy and Comodo Ltd PKI OIDs
|
||||
(PR 8599, 8686)
|
||||
* Update ssl code in `src/*.c` to be consistent with wolfcrypt/src/asn.c
|
||||
handling of ML_DSA vs Dilithium and add dual alg. test (PR 8360, 8425)
|
||||
|
||||
### Build System, Configuration, CI & Protocols
|
||||
* Internal refactor for include of config.h and when building with
|
||||
BUILDING_WOLFSSL macro. This refactor will give a warning of “deprecated
|
||||
function” when trying to improperly use an internal API of wolfSSL in an
|
||||
external application. (PR 8640, 8647, 8660, 8662, 8664)
|
||||
* Add WOLFSSL_CLU option to CMakeLists.txt (PR 8548)
|
||||
* Add CMake and Zephyr support for XMSS and LMS (PR 8494)
|
||||
* Added GitHub CI for CMake builds (PR 8439)
|
||||
* Added necessary macros when building wolfTPM Zephyr with wolfSSL (PR 8382)
|
||||
* Add MSYS2 build continuous integration test (PR 8504)
|
||||
* Update DevKitPro doc to list calico dependency with build commands (PR 8607)
|
||||
* Conversion compiler warning fixes and additional continuous integration test
|
||||
added (PR 8538)
|
||||
* Enable DTLS 1.3 by default in --enable-jni builds (PR 8481)
|
||||
* Enabled TLS 1.3 middlebox compatibility by default for --enable-jni builds
|
||||
(PR 8526)
|
||||
|
||||
### Performance Improvements
|
||||
* Performance improvements AES-GCM and HMAC (in/out hash copy) (PR 8429)
|
||||
* LMS fixes and improvements adding API to get Key ID from raw private key,
|
||||
change to identifiers to match standard, and fix for when
|
||||
WOLFSSL_LMS_MAX_LEVELS is 1 (PR 8390, 8684, 8613, 8623)
|
||||
* ML-KEM/Kyber improvements and fixes; no malloc builds, small memory usage,
|
||||
performance improvement, fix for big-endian (PR 8397, 8412, 8436, 8467, 8619,
|
||||
8622, 8588)
|
||||
* Performance improvements for AES-GCM and when doing multiple HMAC operations
|
||||
(PR 8445)
|
||||
|
||||
### Assembly and Platform-Specific Enhancements
|
||||
* Poly1305 arm assembly changes adding ARM32 NEON implementation and fix for
|
||||
Aarch64 use (PR 8344, 8561, 8671)
|
||||
* Aarch64 assembly enhancement to use more CPU features, fix for FreeBSD/OpenBSD
|
||||
(PR 8325, 8348)
|
||||
* Only perform ARM assembly CPUID checks if support was enabled at build time
|
||||
(PR 8566)
|
||||
* Optimizations for ARM32 assembly instructions on platforms less than ARMv7
|
||||
(PR 8395)
|
||||
* Improve MSVC feature detection for static assert macros (PR 8440)
|
||||
* Improve Espressif make and CMake for ESP8266 and ESP32 series (PR 8402)
|
||||
* Espressif updates for Kconfig, ESP32P4 and adding a sample user_settings.h
|
||||
(PR 8422, PR 8641)
|
||||
|
||||
### OpenSSL Compatibility Layer
|
||||
* Modification to the push/pop to/from in OpenSSL compatibility layer. This is
|
||||
a pretty major API change in the OpenSSL compatibility stack functions.
|
||||
Previously the API would push/pop from the beginning of the list but now they
|
||||
operate on the tail of the list. This matters when using the sk_value with
|
||||
index values. (PR 8616)
|
||||
* OpenSSL Compat Layer: OCSP response improvements (PR 8408, 8498)
|
||||
* Expand the OpenSSL compatibility layer to include an implementation of
|
||||
BN_CTX_get (PR 8388)
|
||||
|
||||
### API Additions and Modifications
|
||||
* Refactor Hpke to allow multiple uses of a context instead of just one shot
|
||||
mode (PR 6805)
|
||||
* Add support for PSK client callback with Ada and use with Alire (thanks
|
||||
@mgrojo, PR 8332, 8606)
|
||||
* Change wolfSSL_CTX_GenerateEchConfig to generate multiple configs and add
|
||||
functions wolfSSL_CTX_SetEchConfigs and wolfSSL_CTX_SetEchConfigsBase64 to
|
||||
rotate the server's echConfigs (PR 8556)
|
||||
* Added the public API wc_PkcsPad to do PKCS padding (PR 8502)
|
||||
* Add NULL_CIPHER_TYPE support to wolfSSL_EVP_CipherUpdate (PR 8518)
|
||||
* Update Kyber APIs to ML-KEM APIs (PR 8536)
|
||||
* Add option to disallow automatic use of "default" devId using the macro
|
||||
WC_NO_DEFAULT_DEVID (PR 8555)
|
||||
* Detect unknown key format on ProcessBufferTryDecode() and handle RSA-PSSk
|
||||
format (PR 8630)
|
||||
|
||||
### Porting and Language Support
|
||||
* Update Python port to support version 3.12.6 (PR 8345)
|
||||
* New additions for MAXQ with wolfPKCS11 (PR 8343)
|
||||
* Port to ntp 4.2.8p17 additions (PR 8324)
|
||||
* Add version 0.9.14 to tested libvncserver builds (PR 8337)
|
||||
|
||||
### General Improvements and Cleanups
|
||||
* Cleanups for STM32 AES GCM (PR 8584)
|
||||
* Improvements to isascii() and the CMake key log option (PR 8596)
|
||||
* Arduino documentation updates, comments and spelling corrections (PR 8381,
|
||||
8384, 8514)
|
||||
* Expanding builds with WOLFSSL_NO_REALLOC for use with --enable-opensslall and
|
||||
--enable-all builds (PR 8369, 8371)
|
||||
|
||||
|
||||
## Fixes
|
||||
* Fix a use after free caused by an early free on error in the X509 store
|
||||
(PR 8449)
|
||||
* Fix to account for existing PKCS8 header with
|
||||
wolfSSL_PEM_write_PKCS8PrivateKey (PR 8612)
|
||||
* Fixed failing CMake build issue when standard threads support is not found in
|
||||
the system (PR 8485)
|
||||
* Fix segmentation fault in SHA-512 implementation for AVX512 targets built with
|
||||
gcc -march=native -O2 (PR 8329)
|
||||
* Fix Windows socket API compatibility warning with mingw32 build (PR 8424)
|
||||
* Fix potential null pointer increments in cipher list parsing (PR 8420)
|
||||
* Fix for possible stack buffer overflow read with wolfSSL_SMIME_write_PKCS7.
|
||||
Thanks to the team at Code Intelligence for the report. (PR 8466)
|
||||
* Fix AES ECB implementation for Aarch64 ARM assembly (PR 8379)
|
||||
* Fixed building with VS2008 and .NET 3.5 (PR 8621)
|
||||
* Fixed possible error case memory leaks in CRL and EVP_Sign_Final (PR 8447)
|
||||
* Fixed SSL_set_mtu compatibility function return code (PR 8330)
|
||||
* Fixed Renesas RX TSIP (PR 8595)
|
||||
* Fixed ECC non-blocking tests (PR 8533)
|
||||
* Fixed CMake on MINGW and MSYS (PR 8377)
|
||||
* Fixed Watcom compiler and added new CI test (PR 8391)
|
||||
* Fixed STM32 PKA ECC 521-bit support (PR 8450)
|
||||
* Fixed STM32 PKA with P521 and shared secret (PR 8601)
|
||||
* Fixed crypto callback macro guards with `DEBUG_CRYPTOCB` (PR 8602)
|
||||
* Fix outlen return for RSA private decrypt with WOLF_CRYPTO_CB_RSA_PAD
|
||||
(PR 8575)
|
||||
* Additional sanity check on r and s lengths in DecodeECC_DSA_Sig_Bin (PR 8350)
|
||||
* Fix compat. layer ASN1_TIME_diff to accept NULL output params (PR 8407)
|
||||
* Fix CMake lean_tls build (PR 8460)
|
||||
* Fix for QUIC callback failure (PR 8475)
|
||||
* Fix missing alert types in AlertTypeToString for print out with debugging
|
||||
enabled (PR 8572)
|
||||
* Fixes for MSVS build issues with PQC configure (PR 8568)
|
||||
* Fix for SE050 port and minor improvements (PR 8431, 8437)
|
||||
* Fix for missing rewind function in zephyr and add missing files for compiling
|
||||
with assembly optimizations (PR 8531, 8541)
|
||||
* Fix for quic_record_append to return the correct code (PR 8340, 8358)
|
||||
* Fixes for Bind 9.18.28 port (PR 8331)
|
||||
* Fix to adhere more closely with RFC8446 Appendix D and set haveEMS when
|
||||
negotiating TLS 1.3 (PR 8487)
|
||||
* Fix to properly check for signature_algorithms from the client in a TLS 1.3
|
||||
server (PR 8356)
|
||||
* Fix for when BIO data is less than seq buffer size. Thanks to the team at Code
|
||||
Intelligence for the report (PR 8426)
|
||||
* ARM32/Thumb2 fixes for WOLFSSL_NO_VAR_ASSIGN_REG and td4 variable declarations
|
||||
(PR 8590, 8635)
|
||||
* Fix for Intel AVX1/SSE2 assembly to not use vzeroupper instructions unless ymm
|
||||
or zmm registers are used (PR 8479)
|
||||
* Entropy MemUse fix for when block size less than update bits (PR 8675)
|
||||
|
||||
|
||||
# wolfSSL Release 5.7.6 (Dec 31, 2024)
|
||||
|
||||
Release 5.7.6 has been developed according to wolfSSL's development and QA
|
||||
|
||||
@@ -2,8 +2,19 @@
|
||||
|
||||
See the [example sketches](./sketches/README.md):
|
||||
|
||||
- [sketches/wolfssl_server](./sketches/wolfssl_server/README.md)
|
||||
- [sketches/wolfssl_client](./sketches/wolfssl_client/README.md)
|
||||
NOTE: Moving; See https://github.com/wolfSSL/wolfssl-examples/pull/499
|
||||
|
||||
Bare-bones templates:
|
||||
|
||||
- [sketches/wolfssl_version](./sketches/wolfssl_version/README.md) single file.
|
||||
- [sketches/template](./sketches/template/README.md) multiple file example.
|
||||
|
||||
Functional examples:
|
||||
- [sketches/wolfssl_AES_CTR](./sketches/wolfssl_AES_CTR/README.md) AES CTR Encrypt / decrypt.
|
||||
- [sketches/wolfssl_client](./sketches/wolfssl_client/README.md) TLS Client.
|
||||
- [sketches/wolfssl_server](./sketches/wolfssl_server/README.md) TLS Server.
|
||||
|
||||
Both the `template` and `wolfssl_AES_CTR` examples include VisualGDB project files.
|
||||
|
||||
When publishing a new version to the Arduino Registry, be sure to edit `WOLFSSL_VERSION_ARUINO_SUFFIX` in the `wolfssl-arduino.sh` script.
|
||||
|
||||
@@ -62,7 +73,7 @@ from within the `wolfssl/IDE/ARDUINO` directory:
|
||||
|
||||
1. `./wolfssl-arduino.sh`
|
||||
- Creates an Arduino Library directory structure in the local `wolfSSL` directory of `IDE/ARDUINO`.
|
||||
- You can add your own `user_settings.h`, or copy/rename the [default](../../examples/configs/user_settings_arduino.h).
|
||||
- You can add your own `user_settings.h`, or copy/rename the [default](https://github.com/wolfSSL/wolfssl/blob/master/examples/configs/user_settings_arduino.h).
|
||||
|
||||
2. `./wolfssl-arduino.sh INSTALL` (The most common option)
|
||||
- Creates an Arduino Library in the local `wolfSSL` directory
|
||||
|
||||
@@ -2,16 +2,32 @@
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
# Library files:
|
||||
EXTRA_DIST+= IDE/ARDUINO/README.md
|
||||
|
||||
# There's an Arduino-specific Arduino_README_prepend.md that will be prepended to wolfSSL README.md
|
||||
# Not to be confused with the interim PREPENDED_README.md that is created by script.
|
||||
EXTRA_DIST+= IDE/ARDUINO/Arduino_README_prepend.md
|
||||
|
||||
# Core library files
|
||||
EXTRA_DIST+= IDE/ARDUINO/wolfssl.h
|
||||
EXTRA_DIST+= IDE/ARDUINO/wolfssl.h
|
||||
EXTRA_DIST+= IDE/ARDUINO/wolfssl-arduino.cpp
|
||||
|
||||
EXTRA_DIST+= IDE/ARDUINO/keywords.txt
|
||||
EXTRA_DIST+= IDE/ARDUINO/library.properties.template
|
||||
|
||||
# Sketch Examples
|
||||
EXTRA_DIST+= IDE/ARDUINO/sketches/README.md
|
||||
|
||||
# wolfssl_client example sketch
|
||||
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_client/README.md
|
||||
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino
|
||||
|
||||
# wolfssl_server example sketch
|
||||
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_server/README.md
|
||||
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino
|
||||
|
||||
# wolfssl_version example sketch
|
||||
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_version/README.md
|
||||
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_version/wolfssl_version.ino
|
||||
EXTRA_DIST+= IDE/ARDUINO/wolfssl.h
|
||||
|
||||
# Publishing script, either local install or to github.com/wolfSSL/Arduino-wolfSSL clone directory.
|
||||
EXTRA_DIST+= IDE/ARDUINO/wolfssl-arduino.sh
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
# wolfSSL Arduino Examples
|
||||
|
||||
There are currently two example Arduino sketches:
|
||||
There are currently five example Arduino sketches:
|
||||
|
||||
* [wolfssl_client](./wolfssl_client/README.md): Basic TLS listening client.
|
||||
* [wolfssl_server](./wolfssl_server/README.md): Basic TLS server.
|
||||
NOTE: Moving; See https://github.com/wolfSSL/wolfssl-examples/pull/499
|
||||
|
||||
* `template`: Reference template wolfSSL example, including optional VisualGDB project files.
|
||||
* `wolfssl_AES_CTR`: Basic AES CTR Encryption / Decryption example.
|
||||
* `wolfssl_client`: Basic TLS listening client.
|
||||
* `wolfssl_server`: Basic TLS server.
|
||||
* `wolfssl_version`: Bare-bones wolfSSL example.
|
||||
|
||||
Examples have been most recently confirmed operational on the
|
||||
[Arduino IDE](https://www.arduino.cc/en/software) 2.2.1.
|
||||
|
||||
For examples on other platforms, see the [IDE directory](https://github.com/wolfssl/wolfssl/tree/master/IDE).
|
||||
Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.com/wolfSSL/wolfssl-examples/).
|
||||
Additional wolfssl examples can be found at [wolfSSL/wolfssl-examples](https://github.com/wolfSSL/wolfssl-examples/).
|
||||
|
||||
## Using wolfSSL
|
||||
|
||||
@@ -20,7 +25,7 @@ The typical include will look something like this:
|
||||
|
||||
/* wolfSSL user_settings.h must be included from settings.h
|
||||
* Make all configurations changes in user_settings.h
|
||||
* Do not edit wolfSSL `settings.h` or `configh.h` files.
|
||||
* Do not edit wolfSSL `settings.h` or `config.h` files.
|
||||
* Do not explicitly include user_settings.h in any source code.
|
||||
* Each Arduino sketch that uses wolfSSL must have: #include "wolfssl.h"
|
||||
* C/C++ source files can use: #include <wolfssl/wolfcrypt/settings.h>
|
||||
@@ -28,7 +33,43 @@ The typical include will look something like this:
|
||||
* The wolfSSL "settings.h" must appear before any other wolfSSL include.
|
||||
*/
|
||||
#include <wolfssl.h>
|
||||
|
||||
/* settings.h is typically included in wolfssl.h, but here as a reminder: */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
/* Any other wolfSSL includes follow:*
|
||||
#include <wolfssl/version.h>
|
||||
```
|
||||
|
||||
## Configuring wolfSSL
|
||||
|
||||
See the `user_settings.h` in the Arduino library `wolfssl/src` directory. For Windows users this is typically:
|
||||
|
||||
```
|
||||
C:\Users\%USERNAME%\Documents\Arduino\libraries\wolfssl\src
|
||||
```
|
||||
|
||||
WARNING: Changes to the library `user_settings.h` file will be lost when upgrading wolfSSL using the Arduino IDE.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If compile problems are encountered, for example:
|
||||
|
||||
```
|
||||
ctags: cannot open temporary file : File exists
|
||||
exit status 1
|
||||
|
||||
Compilation error: exit status 1
|
||||
```
|
||||
|
||||
Try deleting the Arduino cache directory:
|
||||
|
||||
```
|
||||
C:\Users\%USERNAME%\AppData\Local\arduino\sketches
|
||||
```
|
||||
|
||||
For VisualGDB users, delete the project `.vs`, `Output`, and `TraceReports` directories.
|
||||
|
||||
## More Information
|
||||
|
||||
For more details, see [IDE/ARDUINO/README.md](https://github.com/wolfSSL/wolfssl/blob/master/IDE/ARDUINO/README.md)
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
# Arduino Basic TLS Listening Client
|
||||
|
||||
Open the [wolfssl_client.ino](./wolfssl_client.ino) file in the Arduino IDE.
|
||||
Open the `wolfssl_client.ino` file in the Arduino IDE.
|
||||
|
||||
NOTE: Moving; See https://github.com/wolfSSL/wolfssl-examples/pull/499
|
||||
|
||||
If using WiFi, be sure to set `ssid` and `password` values.
|
||||
|
||||
May need "Ethernet by Various" library to be installed. Tested with v2.0.2 and v2.8.1.
|
||||
|
||||
See the `#define WOLFSSL_TLS_SERVER_HOST` to set your own server address.
|
||||
|
||||
Other IDE products are also supported, such as:
|
||||
|
||||
|
||||
@@ -1,903 +0,0 @@
|
||||
/* wolfssl_client.ino
|
||||
*
|
||||
* Copyright (C) 2006-2025 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
|
||||
*/
|
||||
|
||||
/*
|
||||
Tested with:
|
||||
|
||||
1) Intel Galileo acting as the Client, with a laptop acting as a server using
|
||||
the server example provided in examples/server.
|
||||
Legacy Arduino v1.86 was used to compile and program the Galileo
|
||||
|
||||
2) Espressif ESP32 WiFi
|
||||
|
||||
3) Arduino Due, Nano33 IoT, Nano RP-2040
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note to code editors: the Arduino client and server examples are edited in
|
||||
* parallel for side-by-side comparison between examples.
|
||||
*/
|
||||
|
||||
/* If you have a private include, define it here, otherwise edit WiFi params */
|
||||
#define MY_PRIVATE_CONFIG "/workspace/my_private_config.h"
|
||||
|
||||
/* set REPEAT_CONNECTION to a non-zero value to continually run the example. */
|
||||
#define REPEAT_CONNECTION 0
|
||||
|
||||
/* Edit this with your other TLS host server address to connect to: */
|
||||
#define WOLFSSL_TLS_SERVER_HOST "192.168.1.39"
|
||||
|
||||
/* wolfssl TLS examples communicate on port 11111 */
|
||||
#define WOLFSSL_PORT 11111
|
||||
|
||||
/* Choose a monitor serial baud rate: 9600, 14400, 19200, 57600, 74880, etc. */
|
||||
#define SERIAL_BAUD 115200
|
||||
|
||||
/* We'll wait up to 2000 milliseconds to properly shut down connection */
|
||||
#define SHUTDOWN_DELAY_MS 2000
|
||||
|
||||
/* Number of times to retry connection. */
|
||||
#define RECONNECT_ATTEMPTS 20
|
||||
|
||||
/* Optional stress test. Define to consume memory until exhausted: */
|
||||
/* #define MEMORY_STRESS_TEST */
|
||||
|
||||
/* Choose client or server example, not both. */
|
||||
#define WOLFSSL_CLIENT_EXAMPLE
|
||||
/* #define WOLFSSL_SERVER_EXAMPLE */
|
||||
|
||||
#if defined(MY_PRIVATE_CONFIG)
|
||||
/* the /workspace directory may contain a private config
|
||||
* excluded from GitHub with items such as WiFi passwords */
|
||||
#include MY_PRIVATE_CONFIG
|
||||
static const char* ssid PROGMEM = MY_ARDUINO_WIFI_SSID;
|
||||
static const char* password PROGMEM = MY_ARDUINO_WIFI_PASSWORD;
|
||||
#else
|
||||
/* when using WiFi capable boards: */
|
||||
static const char* ssid PROGMEM = "your_SSID";
|
||||
static const char* password PROGMEM = "your_PASSWORD";
|
||||
#endif
|
||||
|
||||
#define BROADCAST_ADDRESS "255.255.255.255"
|
||||
|
||||
/* There's an optional 3rd party NTPClient library by Fabrice Weinberg.
|
||||
* If it is installed, uncomment define USE_NTP_LIB here: */
|
||||
/* #define USE_NTP_LIB */
|
||||
#ifdef USE_NTP_LIB
|
||||
#include <NTPClient.h>
|
||||
#endif
|
||||
|
||||
/* wolfSSL user_settings.h must be included from settings.h
|
||||
* Make all configurations changes in user_settings.h
|
||||
* Do not edit wolfSSL `settings.h` or `config.h` files.
|
||||
* Do not explicitly include user_settings.h in any source code.
|
||||
* Each Arduino sketch that uses wolfSSL must have: #include "wolfssl.h"
|
||||
* C/C++ source files can use: #include <wolfssl/wolfcrypt/settings.h>
|
||||
* The wolfSSL "settings.h" must be included in each source file using wolfSSL.
|
||||
* The wolfSSL "settings.h" must appear before any other wolfSSL include.
|
||||
*/
|
||||
#include <wolfssl.h>
|
||||
/* Important: make sure settings.h appears before any other wolfSSL headers */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
/* Reminder: settings.h includes user_settings.h
|
||||
* For ALL project wolfSSL settings, see:
|
||||
* [your path]/Arduino\libraries\wolfSSL\src\user_settings.h */
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/certs_test.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
|
||||
/* Define DEBUG_WOLFSSL in user_settings.h for more verbose logging. */
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
#define PROGRESS_DOT F("")
|
||||
#else
|
||||
#define PROGRESS_DOT F(".")
|
||||
#endif
|
||||
|
||||
/* Convert a macro to a string */
|
||||
#define xstr(x) str(x)
|
||||
#define str(x) #x
|
||||
|
||||
/* optional board-specific networking includes */
|
||||
#if defined(ESP32)
|
||||
#define USING_WIFI
|
||||
#include <WiFi.h>
|
||||
#include <WiFiUdp.h>
|
||||
#ifdef USE_NTP_LIB
|
||||
WiFiUDP ntpUDP;
|
||||
#endif
|
||||
/* Ensure the F() flash macro is defined */
|
||||
#ifndef F
|
||||
#define F
|
||||
#endif
|
||||
WiFiClient client;
|
||||
|
||||
#elif defined(ESP8266)
|
||||
#define USING_WIFI
|
||||
#include <ESP8266WiFi.h>
|
||||
WiFiClient client;
|
||||
|
||||
#elif defined(ARDUINO_SAM_DUE)
|
||||
#include <SPI.h>
|
||||
/* There's no WiFi/Ethernet on the Due. Requires Ethernet Shield.
|
||||
/* Needs "Ethernet by Various" library to be installed. Tested with V2.0.2 */
|
||||
#include <Ethernet.h>
|
||||
EthernetClient client;
|
||||
|
||||
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
|
||||
#define USING_WIFI
|
||||
#include <SPI.h>
|
||||
#include <WiFiNINA.h> /* Needs Arduino WiFiNINA library installed manually */
|
||||
WiFiClient client;
|
||||
|
||||
#elif defined(ARDUINO_ARCH_RP2040)
|
||||
#define USING_WIFI
|
||||
#include <SPI.h>
|
||||
#include <WiFiNINA.h>
|
||||
WiFiClient client;
|
||||
|
||||
#elif defined(USING_WIFI)
|
||||
#define USING_WIFI
|
||||
#include <WiFi.h>
|
||||
#include <WiFiUdp.h>
|
||||
#ifdef USE_NTP_LIB
|
||||
WiFiUDP ntpUDP;
|
||||
#endif
|
||||
WiFiClient client;
|
||||
|
||||
/* TODO
|
||||
#elif defined(OTHER_BOARD)
|
||||
*/
|
||||
#else
|
||||
#define USING_WIFI
|
||||
WiFiClient client;
|
||||
|
||||
#endif
|
||||
|
||||
/* Only for syntax highlighters to show interesting options enabled: */
|
||||
#if defined(HAVE_SNI) \
|
||||
|| defined(HAVE_MAX_FRAGMENT) \
|
||||
|| defined(HAVE_TRUSTED_CA) \
|
||||
|| defined(HAVE_TRUNCATED_HMAC) \
|
||||
|| defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
|
||||
|| defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2) \
|
||||
|| defined(HAVE_SUPPORTED_CURVES) \
|
||||
|| defined(HAVE_ALPN) \
|
||||
|| defined(HAVE_SESSION_TICKET) \
|
||||
|| defined(HAVE_SECURE_RENEGOTIATION) \
|
||||
|| defined(HAVE_SERVER_RENEGOTIATION_INFO)
|
||||
#endif
|
||||
|
||||
static const char host[] PROGMEM = WOLFSSL_TLS_SERVER_HOST; /* server to connect to */
|
||||
static const int port PROGMEM = WOLFSSL_PORT; /* port on server to connect to */
|
||||
|
||||
static WOLFSSL_CTX* ctx = NULL;
|
||||
static WOLFSSL* ssl = NULL;
|
||||
static char* wc_error_message = (char*)malloc(80 + 1);
|
||||
static char errBuf[80];
|
||||
|
||||
#if defined(MEMORY_STRESS_TEST)
|
||||
#define MEMORY_STRESS_ITERATIONS 100
|
||||
#define MEMORY_STRESS_BLOCK_SIZE 1024
|
||||
#define MEMORY_STRESS_INITIAL (4*1024)
|
||||
static char* memory_stress[MEMORY_STRESS_ITERATIONS]; /* typically 1K per item */
|
||||
static int mem_ctr = 0;
|
||||
#endif
|
||||
|
||||
static int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
|
||||
static int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
|
||||
static int reconnect = RECONNECT_ATTEMPTS;
|
||||
static int lng_index PROGMEM = 0; /* 0 = English */
|
||||
|
||||
#if defined(__arm__)
|
||||
#include <malloc.h>
|
||||
extern char _end;
|
||||
extern "C" char *sbrk(int i);
|
||||
static char *ramstart=(char *)0x20070000;
|
||||
static char *ramend=(char *)0x20088000;
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/* fail_wait - in case of unrecoverable error */
|
||||
/*****************************************************************************/
|
||||
int fail_wait(void) {
|
||||
show_memory();
|
||||
|
||||
Serial.println(F("Failed. Halt."));
|
||||
while (1) {
|
||||
delay(1000);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* show_memory() to optionally view during debugging. */
|
||||
/*****************************************************************************/
|
||||
int show_memory(void)
|
||||
{
|
||||
#if defined(__arm__)
|
||||
struct mallinfo mi = mallinfo();
|
||||
|
||||
char *heapend=sbrk(0);
|
||||
register char * stack_ptr asm("sp");
|
||||
#if defined(DEBUG_WOLFSSL_VERBOSE)
|
||||
Serial.print(" arena=");
|
||||
Serial.println(mi.arena);
|
||||
Serial.print(" ordblks=");
|
||||
Serial.println(mi.ordblks);
|
||||
Serial.print(" uordblks=");
|
||||
Serial.println(mi.uordblks);
|
||||
Serial.print(" fordblks=");
|
||||
Serial.println(mi.fordblks);
|
||||
Serial.print(" keepcost=");
|
||||
Serial.println(mi.keepcost);
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_WOLFSSL) || defined(MEMORY_STRESS_TEST)
|
||||
Serial.print("Estimated free memory: ");
|
||||
Serial.print(stack_ptr - heapend + mi.fordblks);
|
||||
Serial.println(F(" bytes"));
|
||||
#endif
|
||||
|
||||
#if (0)
|
||||
/* Experimental: not supported on all devices: */
|
||||
Serial.print("RAM Start %lx\n", (unsigned long)ramstart);
|
||||
Serial.print("Data/Bss end %lx\n", (unsigned long)&_end);
|
||||
Serial.print("Heap End %lx\n", (unsigned long)heapend);
|
||||
Serial.print("Stack Ptr %lx\n",(unsigned long)stack_ptr);
|
||||
Serial.print("RAM End %lx\n", (unsigned long)ramend);
|
||||
|
||||
Serial.print("Heap RAM Used: ",mi.uordblks);
|
||||
Serial.print("Program RAM Used ",&_end - ramstart);
|
||||
Serial.print("Stack RAM Used ",ramend - stack_ptr);
|
||||
|
||||
Serial.print("Estimated Free RAM: %d\n\n",stack_ptr - heapend + mi.fordblks);
|
||||
#endif
|
||||
#else
|
||||
Serial.println(F("show_memory() not implemented for this platform"));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* EthernetSend() to send a message string. */
|
||||
/*****************************************************************************/
|
||||
int EthernetSend(WOLFSSL* ssl, char* message, int sz, void* ctx) {
|
||||
int sent = 0;
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
|
||||
sent = client.write((byte*)message, sz);
|
||||
return sent;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* EthernetReceive() to receive a reply string. */
|
||||
/*****************************************************************************/
|
||||
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx) {
|
||||
int ret = 0;
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
|
||||
while (client.available() > 0 && ret < sz) {
|
||||
reply[ret++] = client.read();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_hardware() */
|
||||
/*****************************************************************************/
|
||||
int setup_hardware(void) {
|
||||
int ret = 0;
|
||||
|
||||
#if defined(ARDUINO_SAMD_NANO_33_IOT)
|
||||
Serial.println(F("Detected known tested and working Arduino Nano 33 IoT"));
|
||||
#elif defined(ARDUINO_ARCH_RP2040)
|
||||
Serial.println(F("Detected known tested and working Arduino RP-2040"));
|
||||
#elif defined(__arm__) && defined(ID_TRNG) && defined(TRNG)
|
||||
/* need to manually turn on random number generator on Arduino Due, etc. */
|
||||
pmc_enable_periph_clk(ID_TRNG);
|
||||
trng_enable(TRNG);
|
||||
Serial.println(F("Enabled ARM TRNG"));
|
||||
#endif
|
||||
|
||||
show_memory();
|
||||
randomSeed(analogRead(0));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_datetime() */
|
||||
/* The device needs to have a valid date within the valid range of certs. */
|
||||
/*****************************************************************************/
|
||||
int setup_datetime(void) {
|
||||
int ret = 0;
|
||||
int ntp_tries = 20;
|
||||
|
||||
/* we need a date in the range of cert expiration */
|
||||
#ifdef USE_NTP_LIB
|
||||
#if defined(ESP32)
|
||||
NTPClient timeClient(ntpUDP, "pool.ntp.org");
|
||||
|
||||
timeClient.begin();
|
||||
timeClient.update();
|
||||
delay(1000);
|
||||
while (!timeClient.isTimeSet() && (ntp_tries > 0)) {
|
||||
timeClient.forceUpdate();
|
||||
Serial.println(F("Waiting for NTP update"));
|
||||
delay(2000);
|
||||
ntp_tries--;
|
||||
}
|
||||
if (ntp_tries <= 0) {
|
||||
Serial.println(F("Warning: gave up waiting on NTP"));
|
||||
}
|
||||
Serial.println(timeClient.getFormattedTime());
|
||||
Serial.println(timeClient.getEpochTime());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(ESP32)
|
||||
/* see esp32-hal-time.c */
|
||||
ntp_tries = 5;
|
||||
/* Replace "pool.ntp.org" with your preferred NTP server */
|
||||
configTime(0, 0, "pool.ntp.org");
|
||||
|
||||
/* Wait for time to be set */
|
||||
while ((time(nullptr) <= 100000) && ntp_tries > 0) {
|
||||
Serial.println(F("Waiting for time to be set..."));
|
||||
delay(2000);
|
||||
ntp_tries--;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
} /* setup_datetime */
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_network() */
|
||||
/*****************************************************************************/
|
||||
int setup_network(void) {
|
||||
int ret = 0;
|
||||
|
||||
#if defined(USING_WIFI)
|
||||
int status = WL_IDLE_STATUS;
|
||||
|
||||
/* The ESP8266 & ESP32 support both AP and STA. We'll use STA: */
|
||||
#if defined(ESP8266) || defined(ESP32)
|
||||
WiFi.mode(WIFI_STA);
|
||||
#else
|
||||
String fv;
|
||||
if (WiFi.status() == WL_NO_MODULE) {
|
||||
Serial.println("Communication with WiFi module failed!");
|
||||
/* don't continue if no network */
|
||||
while (true) ;
|
||||
}
|
||||
|
||||
fv = WiFi.firmwareVersion();
|
||||
if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
|
||||
Serial.println("Please upgrade the firmware");
|
||||
}
|
||||
#endif
|
||||
|
||||
Serial.print(F("Connecting to WiFi "));
|
||||
Serial.print(ssid);
|
||||
status = WiFi.begin(ssid, password);
|
||||
while (status != WL_CONNECTED) {
|
||||
delay(1000);
|
||||
Serial.print(F("."));
|
||||
Serial.print(status);
|
||||
status = WiFi.status();
|
||||
}
|
||||
|
||||
Serial.println(F(" Connected!"));
|
||||
#else
|
||||
/* Newer Ethernet shields have a
|
||||
* MAC address printed on a sticker on the shield */
|
||||
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
||||
IPAddress ip(192, 168, 1, 42);
|
||||
IPAddress myDns(192, 168, 1, 1);
|
||||
Ethernet.init(10); /* Most Arduino shields */
|
||||
/* Ethernet.init(5); * MKR ETH Shield */
|
||||
/* Ethernet.init(0); * Teensy 2.0 */
|
||||
/* Ethernet.init(20); * Teensy++ 2.0 */
|
||||
/* Ethernet.init(15); * ESP8266 with Adafruit FeatherWing Ethernet */
|
||||
/* Ethernet.init(33); * ESP32 with Adafruit FeatherWing Ethernet */
|
||||
Serial.println(F("Initialize Ethernet with DHCP:"));
|
||||
if (Ethernet.begin(mac) == 0) {
|
||||
Serial.println(F("Failed to configure Ethernet using DHCP"));
|
||||
/* Check for Ethernet hardware present */
|
||||
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
|
||||
Serial.println(F("Ethernet shield was not found."));
|
||||
while (true) {
|
||||
delay(1); /* do nothing */
|
||||
}
|
||||
}
|
||||
if (Ethernet.linkStatus() == LinkOFF) {
|
||||
Serial.println(F("Ethernet cable is not connected."));
|
||||
}
|
||||
/* try to configure using IP address instead of DHCP : */
|
||||
Ethernet.begin(mac, ip, myDns);
|
||||
}
|
||||
else {
|
||||
Serial.print(F(" DHCP assigned IP "));
|
||||
Serial.println(Ethernet.localIP());
|
||||
}
|
||||
/* We'll assume the Ethernet connection is ready to go. */
|
||||
#endif
|
||||
|
||||
Serial.println(F("********************************************************"));
|
||||
Serial.print(F(" wolfSSL Example Client IP = "));
|
||||
#if defined(USING_WIFI)
|
||||
Serial.println(WiFi.localIP());
|
||||
#else
|
||||
Serial.println(Ethernet.localIP());
|
||||
#endif
|
||||
Serial.print(F(" Configured Server Host to connect to: "));
|
||||
Serial.println(host);
|
||||
Serial.println(F("********************************************************"));
|
||||
Serial.println(F("Setup network complete."));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_wolfssl() */
|
||||
/*****************************************************************************/
|
||||
int setup_wolfssl(void) {
|
||||
int ret = 0;
|
||||
WOLFSSL_METHOD* method;
|
||||
|
||||
/* Show a revision of wolfssl user_settings.h file in use when available: */
|
||||
#if defined(WOLFSSL_USER_SETTINGS_ID)
|
||||
Serial.print(F("WOLFSSL_USER_SETTINGS_ID: "));
|
||||
Serial.println(F(WOLFSSL_USER_SETTINGS_ID));
|
||||
#else
|
||||
Serial.println(F("No WOLFSSL_USER_SETTINGS_ID found."));
|
||||
#endif
|
||||
|
||||
#if defined(NO_WOLFSSL_SERVER)
|
||||
Serial.println(F("wolfSSL server code disabled to save space."));
|
||||
#endif
|
||||
#if defined(NO_WOLFSSL_CLIENT)
|
||||
Serial.println(F("wolfSSL client code disabled to save space."));
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
wolfSSL_Debugging_ON();
|
||||
Serial.println(F("wolfSSL Debugging is On!"));
|
||||
#else
|
||||
Serial.println(F("wolfSSL Debugging is Off! (enable with DEBUG_WOLFSSL)"));
|
||||
#endif
|
||||
|
||||
/* See ssl.c for TLS cache settings. Larger cache = use more RAM. */
|
||||
#if defined(NO_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS NO_SESSION_CACHE"));
|
||||
#elif defined(MICRO_SESSION_CACHEx)
|
||||
Serial.println(F("wolfSSL TLS MICRO_SESSION_CACHE"));
|
||||
#elif defined(SMALL_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS SMALL_SESSION_CACHE"));
|
||||
#elif defined(MEDIUM_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS MEDIUM_SESSION_CACHE"));
|
||||
#elif defined(BIG_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS BIG_SESSION_CACHE"));
|
||||
#elif defined(HUGE_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS HUGE_SESSION_CACHE"));
|
||||
#elif defined(HUGE_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS HUGE_SESSION_CACHE"));
|
||||
#else
|
||||
Serial.println(F("WARNING: Unknown or no TLS session cache setting."));
|
||||
/* See wolfssl/src/ssl.c for amount of memory used.
|
||||
* It is best on embedded devices to choose a TLS session cache size. */
|
||||
#endif
|
||||
|
||||
ret = wolfSSL_Init();
|
||||
if (ret == WOLFSSL_SUCCESS) {
|
||||
Serial.println("Successfully called wolfSSL_Init");
|
||||
}
|
||||
else {
|
||||
Serial.println("ERROR: wolfSSL_Init failed");
|
||||
}
|
||||
|
||||
/* See companion server example with wolfSSLv23_server_method here.
|
||||
* method = wolfSSLv23_client_method()); SSL 3.0 - TLS 1.3.
|
||||
* method = wolfTLSv1_2_client_method(); only TLS 1.2
|
||||
* method = wolfTLSv1_3_client_method(); only TLS 1.3
|
||||
*
|
||||
* see Arduino\libraries\wolfssl\src\user_settings.h */
|
||||
|
||||
Serial.println("Here we go!");
|
||||
|
||||
method = wolfSSLv23_client_method();
|
||||
if (method == NULL) {
|
||||
Serial.println(F("unable to get wolfssl client method"));
|
||||
fail_wait();
|
||||
}
|
||||
ctx = wolfSSL_CTX_new(method);
|
||||
if (ctx == NULL) {
|
||||
Serial.println(F("unable to get ctx"));
|
||||
fail_wait();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_certificates() */
|
||||
/*****************************************************************************/
|
||||
int setup_certificates(void) {
|
||||
int ret = 0;
|
||||
|
||||
Serial.println(F("Initializing certificates..."));
|
||||
show_memory();
|
||||
|
||||
/* Use built-in validation, No verification callback function: */
|
||||
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, 0);
|
||||
|
||||
/* Certificate */
|
||||
Serial.println("Initializing certificates...");
|
||||
ret = wolfSSL_CTX_use_certificate_buffer(ctx,
|
||||
CTX_CLIENT_CERT,
|
||||
CTX_CLIENT_CERT_SIZE,
|
||||
CTX_CLIENT_CERT_TYPE);
|
||||
if (ret == WOLFSSL_SUCCESS) {
|
||||
Serial.print("Success: use certificate: ");
|
||||
Serial.println(xstr(CTX_SERVER_CERT));
|
||||
}
|
||||
else {
|
||||
Serial.println(F("Error: wolfSSL_CTX_use_certificate_buffer failed: "));
|
||||
wc_ErrorString(ret, wc_error_message);
|
||||
Serial.println(wc_error_message);
|
||||
fail_wait();
|
||||
}
|
||||
|
||||
/* Setup private client key */
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx,
|
||||
CTX_CLIENT_KEY,
|
||||
CTX_CLIENT_KEY_SIZE,
|
||||
CTX_CLIENT_KEY_TYPE);
|
||||
if (ret == WOLFSSL_SUCCESS) {
|
||||
Serial.print("Success: use private key buffer: ");
|
||||
Serial.println(xstr(CTX_SERVER_KEY));
|
||||
}
|
||||
else {
|
||||
Serial.println(F("Error: wolfSSL_CTX_use_PrivateKey_buffer failed: "));
|
||||
wc_ErrorString(ret, wc_error_message);
|
||||
Serial.println(wc_error_message);
|
||||
fail_wait();
|
||||
}
|
||||
|
||||
ret = wolfSSL_CTX_load_verify_buffer(ctx,
|
||||
CTX_CA_CERT,
|
||||
CTX_CA_CERT_SIZE,
|
||||
CTX_CA_CERT_TYPE);
|
||||
if (ret == WOLFSSL_SUCCESS) {
|
||||
Serial.println(F("Success: load_verify CTX_CA_CERT"));
|
||||
}
|
||||
else {
|
||||
Serial.println(F("Error: wolfSSL_CTX_load_verify_buffer failed: "));
|
||||
wc_ErrorString(ret, wc_error_message);
|
||||
Serial.println(wc_error_message);
|
||||
fail_wait();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return ret;
|
||||
} /* Arduino setup */
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup() */
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
void setup(void) {
|
||||
int i = 0;
|
||||
Serial.begin(SERIAL_BAUD);
|
||||
while (!Serial && (i < 10)) {
|
||||
/* wait for serial port to connect. Needed for native USB port only */
|
||||
delay(1000);
|
||||
i++;
|
||||
}
|
||||
Serial.println(F(""));
|
||||
Serial.println(F(""));
|
||||
Serial.println(F("wolfSSL TLS Client Example Startup."));
|
||||
|
||||
/* define DEBUG_WOLFSSL in wolfSSL user_settings.h for diagnostics */
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* Optionally pre-allocate a large block of memory for testing */
|
||||
#if defined(MEMORY_STRESS_TEST)
|
||||
Serial.println(F("WARNING: Memory Stress Test Active!"));
|
||||
Serial.print(F("Allocating extra memory: "));
|
||||
Serial.print(MEMORY_STRESS_INITIAL);
|
||||
Serial.println(F(" bytes..."));
|
||||
memory_stress[mem_ctr] = (char*)malloc(MEMORY_STRESS_INITIAL);
|
||||
show_memory();
|
||||
#endif
|
||||
|
||||
setup_hardware();
|
||||
|
||||
setup_network();
|
||||
|
||||
setup_datetime();
|
||||
|
||||
setup_wolfssl();
|
||||
|
||||
setup_certificates();
|
||||
|
||||
/* Initialize wolfSSL using callback functions. */
|
||||
wolfSSL_SetIOSend(ctx, EthernetSend);
|
||||
wolfSSL_SetIORecv(ctx, EthernetReceive);
|
||||
|
||||
Serial.println(F("Completed Arduino setup!"));
|
||||
/* See companion wolfssl_server.ino code; server begins listening here
|
||||
* https://github.com/wolfSSL/wolfssl/tree/master/IDE/ARDUINO/sketches/wolfssl_server
|
||||
* Any other server will work. See also:
|
||||
* https://github.com/wolfSSL/wolfssl/tree/master/examples/client
|
||||
*/
|
||||
/* See companion wolfssl_server.ino code */
|
||||
return;
|
||||
} /* Arduino setup */
|
||||
|
||||
/*****************************************************************************/
|
||||
/* wolfSSL error_check() */
|
||||
/*****************************************************************************/
|
||||
int error_check(int this_ret, bool halt_on_error,
|
||||
const __FlashStringHelper* message) {
|
||||
int ret = 0;
|
||||
if (this_ret == WOLFSSL_SUCCESS) {
|
||||
Serial.print(F("Success: "));
|
||||
Serial.println(message);
|
||||
}
|
||||
else {
|
||||
Serial.print(F("ERROR: return = "));
|
||||
Serial.print(this_ret);
|
||||
Serial.print(F(": "));
|
||||
Serial.println(message);
|
||||
Serial.println(wc_GetErrorString(this_ret));
|
||||
if (halt_on_error) {
|
||||
fail_wait();
|
||||
}
|
||||
}
|
||||
show_memory();
|
||||
|
||||
return ret;
|
||||
} /* error_check */
|
||||
|
||||
/*****************************************************************************/
|
||||
/* wolfSSL error_check_ssl */
|
||||
/* Parameters: */
|
||||
/* ssl is the current WOLFSSL object pointer */
|
||||
/* halt_on_error set to true to suspend operations for critical error */
|
||||
/* message is expected to be a memory-efficient F("") macro string */
|
||||
/*****************************************************************************/
|
||||
int error_check_ssl(WOLFSSL* ssl, int this_ret, bool halt_on_error,
|
||||
const __FlashStringHelper* message) {
|
||||
int err = 0;
|
||||
|
||||
if (ssl == NULL) {
|
||||
Serial.println(F("ssl is Null; Unable to allocate SSL object?"));
|
||||
#ifndef DEBUG_WOLFSSL
|
||||
Serial.println(F("Define DEBUG_WOLFSSL in user_settings.h for more."));
|
||||
#else
|
||||
Serial.println(F("See wolfssl/wolfcrypt/error-crypt.h for codes."));
|
||||
#endif
|
||||
Serial.print(F("ERROR: "));
|
||||
Serial.println(message);
|
||||
show_memory();
|
||||
if (halt_on_error) {
|
||||
fail_wait();
|
||||
}
|
||||
}
|
||||
else {
|
||||
err = wolfSSL_get_error(ssl, this_ret);
|
||||
if (err == WOLFSSL_SUCCESS) {
|
||||
Serial.print(F("Success m: "));
|
||||
Serial.println(message);
|
||||
}
|
||||
else {
|
||||
if (err < 0) {
|
||||
wolfSSL_ERR_error_string(err, errBuf);
|
||||
Serial.print(F("WOLFSSL Error: "));
|
||||
Serial.print(err);
|
||||
Serial.print(F("; "));
|
||||
Serial.println(errBuf);
|
||||
}
|
||||
else {
|
||||
Serial.println(F("Success: ssl object."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/* Arduino loop() */
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
void loop() {
|
||||
char reply[80];
|
||||
char msg[32] = "hello wolfssl!";
|
||||
const char* cipherName;
|
||||
int retry_shutdown = SHUTDOWN_DELAY_MS; /* max try, once per millisecond */
|
||||
int total_input = 0;
|
||||
int msgSz = 0;
|
||||
int input = 0;
|
||||
int ret = 0;
|
||||
int err = 0;
|
||||
msgSz = (int)strlen(msg);
|
||||
Serial.println(F(""));
|
||||
Serial.println(F("Starting Arduino loop() ..."));
|
||||
|
||||
if (reconnect) {
|
||||
reconnect--;
|
||||
/* WiFi client returns true if connection succeeds, false if not. */
|
||||
/* Wired client returns int (1,-1,-2,-3,-4) for connection status. */
|
||||
Serial.print(F("Connecting to "));
|
||||
Serial.print(host);
|
||||
Serial.print(F(":"));
|
||||
Serial.println(port);
|
||||
/* can also use: IPAddress server(192,168,1,37); */
|
||||
Serial.println(F("Here we go..."));
|
||||
ret = client.connect(host, port);
|
||||
Serial.println(F("Ok, checking..."));
|
||||
if (ret > 0) {
|
||||
Serial.println(F("Connected!"));
|
||||
|
||||
/* initialize wolfSSL */
|
||||
ret = wolfSSL_Init();
|
||||
error_check(ret, false, F("calling wolfSSL_Init") );
|
||||
|
||||
/* create secure connection object. see setup for ctx certs. */
|
||||
Serial.println(F("Calling ssl = wolfSSL_new(ctx)"));
|
||||
ssl = wolfSSL_new(ctx);
|
||||
error_check_ssl(ssl, 0, true, F("Create WOLFSSL object from ctx"));
|
||||
|
||||
Serial.print(F("Connecting to wolfSSL TLS Secure Server..."));
|
||||
do {
|
||||
err = 0; /* reset error */
|
||||
Serial.println(F("wolfSSL_connect ..."));
|
||||
ret = wolfSSL_connect(ssl);
|
||||
Serial.print("wolfSSL_connect return result =");
|
||||
Serial.println(ret);
|
||||
if ((ret != WOLFSSL_SUCCESS) && (ret != WC_PENDING_E)) {
|
||||
Serial.println(F("Failed connection, checking error."));
|
||||
err = error_check_ssl(ssl, ret, true,
|
||||
F("Create WOLFSSL object from ctx"));
|
||||
Serial.print("err =");
|
||||
Serial.println(err);
|
||||
}
|
||||
else {
|
||||
Serial.print(PROGRESS_DOT);
|
||||
}
|
||||
} while (err == WC_PENDING_E);
|
||||
|
||||
Serial.println();
|
||||
Serial.println(F("Connected!"));
|
||||
Serial.print(F("SSL version is "));
|
||||
Serial.println(wolfSSL_get_version(ssl));
|
||||
|
||||
cipherName = wolfSSL_get_cipher(ssl);
|
||||
Serial.print(F("SSL cipher suite is "));
|
||||
Serial.println(cipherName);
|
||||
|
||||
/* see test.h
|
||||
* TODO: test.h needs a little bit of Arduino work for these:
|
||||
showPeerEx(ssl, lng_index);
|
||||
showPeerPEM(ssl);
|
||||
*/
|
||||
|
||||
Serial.print(F("Sending secure message to server: "));
|
||||
Serial.println(msg);
|
||||
ret = wolfSSL_write(ssl, msg, msgSz);
|
||||
if (ret == msgSz) {
|
||||
Serial.print(F("Waiting for Server response..."));
|
||||
|
||||
while (!client.available()) {
|
||||
/* wait for data */
|
||||
delay(1); /* 1 ms delay */
|
||||
}
|
||||
|
||||
Serial.print(F("Reading response.."));
|
||||
/* read data */
|
||||
do {
|
||||
ret = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
|
||||
if (ret < 0) {
|
||||
error_check_ssl(ssl, ret, false,
|
||||
F("during TLS Read"));
|
||||
}
|
||||
else {
|
||||
Serial.print(PROGRESS_DOT);
|
||||
}
|
||||
} while (err == WC_PENDING_E);
|
||||
Serial.println();
|
||||
|
||||
Serial.println();
|
||||
Serial.println(reply); /* typically: I hear you fa shizzle! */
|
||||
Serial.println();
|
||||
|
||||
} /* wolfSSL_write message size matched */
|
||||
else {
|
||||
error_check_ssl(ssl, ret, false,
|
||||
F("during TLS Write"));
|
||||
} /* any wolfSSL_write message size mismatch is an error */
|
||||
|
||||
Serial.print(F("Shutting down.."));
|
||||
do {
|
||||
delay(1);
|
||||
Serial.print(PROGRESS_DOT);
|
||||
retry_shutdown--;
|
||||
ret = wolfSSL_shutdown(ssl);
|
||||
} while ( (ret == WOLFSSL_SHUTDOWN_NOT_DONE)
|
||||
&& (retry_shutdown > 0)
|
||||
); /* There may be pending data, so wait until done. */
|
||||
Serial.println();
|
||||
|
||||
if (retry_shutdown <= 0) {
|
||||
/* if wolfSSL_free is called before properly shutting down the
|
||||
* ssl object, undesired results may occur. */
|
||||
Serial.println(F("Warning! Shutdown did not properly complete."));
|
||||
}
|
||||
|
||||
wolfSSL_free(ssl);
|
||||
client.stop();
|
||||
Serial.println(F("Connection complete."));
|
||||
if (REPEAT_CONNECTION) {
|
||||
reconnect = RECONNECT_ATTEMPTS;
|
||||
}
|
||||
else {
|
||||
reconnect = 0;
|
||||
}
|
||||
} /* client.connect(host, port) */
|
||||
else {
|
||||
Serial.println(F("Problem sending message. Trying to reconnect..."));
|
||||
}
|
||||
}
|
||||
delay(1000);
|
||||
if ((reconnect > 0) && (REPEAT_CONNECTION)) {
|
||||
Serial.println(F("Arduino loop repeating..."));
|
||||
Serial.println();
|
||||
}
|
||||
else {
|
||||
printf("wow");
|
||||
Serial.println(F("Done!"));
|
||||
while(1) {
|
||||
/* wait forever */
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(MEMORY_STRESS_TEST)
|
||||
if (mem_ctr < MEMORY_STRESS_ITERATIONS) {
|
||||
/* reminder: mem_ctr == 0 is MEMORY_STRESS_INITIAL allocation */
|
||||
mem_ctr++;
|
||||
Serial.print(F("Memory stress increment: "));
|
||||
Serial.print(mem_ctr);
|
||||
Serial.print(F(". Allocating addition memory (bytes): "));
|
||||
Serial.println(MEMORY_STRESS_BLOCK_SIZE);
|
||||
memory_stress[mem_ctr] = (char*)malloc(MEMORY_STRESS_BLOCK_SIZE);
|
||||
show_memory();
|
||||
}
|
||||
#endif
|
||||
} /* Arduino loop repeats */
|
||||
@@ -1,6 +1,14 @@
|
||||
# Arduino Basic TLS Server
|
||||
|
||||
Open the [wolfssl_server.ino](./wolfssl_server.ino) file in the Arduino IDE.
|
||||
Open the `wolfssl_server.ino` file in the Arduino IDE.
|
||||
|
||||
NOTE: Moving; See https://github.com/wolfSSL/wolfssl-examples/pull/499
|
||||
|
||||
If using WiFi, be sure to set `ssid` and `password` values.
|
||||
|
||||
May need "Ethernet by Various" library to be installed. Tested with v2.0.2 and v2.8.1.
|
||||
|
||||
See the `#define WOLFSSL_TLS_SERVER_HOST` to set your own server address.
|
||||
|
||||
Other IDE products are also supported, such as:
|
||||
|
||||
|
||||
@@ -1,847 +0,0 @@
|
||||
/* wolfssl_server.ino
|
||||
*
|
||||
* Copyright (C) 2006-2025 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
|
||||
*/
|
||||
|
||||
/*
|
||||
Tested with:
|
||||
|
||||
1) Intel Galileo acting as the Client, with a laptop acting as a server using
|
||||
the server example provided in examples/server.
|
||||
Legacy Arduino v1.86 was used to compile and program the Galileo
|
||||
|
||||
2) Espressif ESP32 WiFi
|
||||
|
||||
3) Arduino Due, Nano33 IoT, Nano RP-2040
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note to code editors: the Arduino client and server examples are edited in
|
||||
* parallel for side-by-side comparison between examples.
|
||||
*/
|
||||
|
||||
/* If you have a private include, define it here, otherwise edit WiFi params */
|
||||
#define MY_PRIVATE_CONFIG "/workspace/my_private_config.h"
|
||||
|
||||
/* set REPEAT_CONNECTION to a non-zero value to continually run the example. */
|
||||
#define REPEAT_CONNECTION 1
|
||||
|
||||
/* Edit this with your other TLS host server address to connect to: */
|
||||
/* #define WOLFSSL_TLS_SERVER_HOST "192.168.1.34" */
|
||||
|
||||
/* wolfssl TLS examples communicate on port 11111 */
|
||||
#define WOLFSSL_PORT 11111
|
||||
|
||||
/* Choose a monitor serial baud rate: 9600, 14400, 19200, 57600, 74880, etc. */
|
||||
#define SERIAL_BAUD 115200
|
||||
|
||||
/* We'll wait up to 2000 milliseconds to properly shut down connection */
|
||||
#define SHUTDOWN_DELAY_MS 2000
|
||||
|
||||
/* Number of times to retry connection. */
|
||||
#define RECONNECT_ATTEMPTS 20
|
||||
|
||||
/* Optional stress test. Define to consume memory until exhausted: */
|
||||
/* #define MEMORY_STRESS_TEST */
|
||||
|
||||
/* Choose client or server example, not both. */
|
||||
/* #define WOLFSSL_CLIENT_EXAMPLE */
|
||||
#define WOLFSSL_SERVER_EXAMPLE
|
||||
|
||||
#if defined(MY_PRIVATE_CONFIG)
|
||||
/* the /workspace directory may contain a private config
|
||||
* excluded from GitHub with items such as WiFi passwords */
|
||||
#include MY_PRIVATE_CONFIG
|
||||
static const char* ssid PROGMEM = MY_ARDUINO_WIFI_SSID;
|
||||
static const char* password PROGMEM = MY_ARDUINO_WIFI_PASSWORD;
|
||||
#else
|
||||
/* when using WiFi capable boards: */
|
||||
static const char* ssid PROGMEM = "your_SSID";
|
||||
static const char* password PROGMEM = "your_PASSWORD";
|
||||
#endif
|
||||
|
||||
#define BROADCAST_ADDRESS "255.255.255.255"
|
||||
|
||||
/* There's an optional 3rd party NTPClient library by Fabrice Weinberg.
|
||||
* If it is installed, uncomment define USE_NTP_LIB here: */
|
||||
/* #define USE_NTP_LIB */
|
||||
#ifdef USE_NTP_LIB
|
||||
#include <NTPClient.h>
|
||||
#endif
|
||||
|
||||
/* wolfSSL user_settings.h must be included from settings.h
|
||||
* Make all configurations changes in user_settings.h
|
||||
* Do not edit wolfSSL `settings.h` or `config.h` files.
|
||||
* Do not explicitly include user_settings.h in any source code.
|
||||
* Each Arduino sketch that uses wolfSSL must have: #include "wolfssl.h"
|
||||
* C/C++ source files can use: #include <wolfssl/wolfcrypt/settings.h>
|
||||
* The wolfSSL "settings.h" must be included in each source file using wolfSSL.
|
||||
* The wolfSSL "settings.h" must appear before any other wolfSSL include.
|
||||
*/
|
||||
#include <wolfssl.h>
|
||||
/* Important: make sure settings.h appears before any other wolfSSL headers */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
/* Reminder: settings.h includes user_settings.h
|
||||
* For ALL project wolfSSL settings, see:
|
||||
* [your path]/Arduino\libraries\wolfSSL\src\user_settings.h */
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/certs_test.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
|
||||
/* Define DEBUG_WOLFSSL in user_settings.h for more verbose logging. */
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
#define PROGRESS_DOT F("")
|
||||
#else
|
||||
#define PROGRESS_DOT F(".")
|
||||
#endif
|
||||
|
||||
/* Convert a macro to a string */
|
||||
#define xstr(x) str(x)
|
||||
#define str(x) #x
|
||||
|
||||
/* optional board-specific networking includes */
|
||||
#if defined(ESP32)
|
||||
#define USING_WIFI
|
||||
#include <WiFi.h>
|
||||
#include <WiFiUdp.h>
|
||||
#ifdef USE_NTP_LIB
|
||||
WiFiUDP ntpUDP;
|
||||
#endif
|
||||
/* Ensure the F() flash macro is defined */
|
||||
#ifndef F
|
||||
#define F
|
||||
#endif
|
||||
WiFiClient client;
|
||||
WiFiServer server(WOLFSSL_PORT);
|
||||
#elif defined(ESP8266)
|
||||
#define USING_WIFI
|
||||
#include <ESP8266WiFi.h>
|
||||
WiFiClient client;
|
||||
WiFiServer server(WOLFSSL_PORT);
|
||||
#elif defined(ARDUINO_SAM_DUE)
|
||||
#include <SPI.h>
|
||||
/* There's no WiFi/Ethernet on the Due. Requires Ethernet Shield.
|
||||
/* Needs "Ethernet by Various" library to be installed. Tested with V2.0.2 */
|
||||
#include <Ethernet.h>
|
||||
EthernetClient client;
|
||||
EthernetClient server(WOLFSSL_PORT);
|
||||
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
|
||||
#define USING_WIFI
|
||||
#include <SPI.h>
|
||||
#include <WiFiNINA.h> /* Needs Arduino WiFiNINA library installed manually */
|
||||
WiFiClient client;
|
||||
WiFiServer server(WOLFSSL_PORT);
|
||||
#elif defined(ARDUINO_ARCH_RP2040)
|
||||
#define USING_WIFI
|
||||
#include <SPI.h>
|
||||
#include <WiFiNINA.h>
|
||||
WiFiClient client;
|
||||
WiFiServer server(WOLFSSL_PORT);
|
||||
#elif defined(USING_WIFI)
|
||||
#define USING_WIFI
|
||||
#include <WiFi.h>
|
||||
#include <WiFiUdp.h>
|
||||
#ifdef USE_NTP_LIB
|
||||
WiFiUDP ntpUDP;
|
||||
#endif
|
||||
WiFiClient client;
|
||||
WiFiServer server(WOLFSSL_PORT);
|
||||
/* TODO
|
||||
#elif defined(OTHER_BOARD)
|
||||
*/
|
||||
#else
|
||||
#define USING_WIFI
|
||||
WiFiClient client;
|
||||
WiFiServer server(WOLFSSL_PORT);
|
||||
#endif
|
||||
|
||||
/* Only for syntax highlighters to show interesting options enabled: */
|
||||
#if defined(HAVE_SNI) \
|
||||
|| defined(HAVE_MAX_FRAGMENT) \
|
||||
|| defined(HAVE_TRUSTED_CA) \
|
||||
|| defined(HAVE_TRUNCATED_HMAC) \
|
||||
|| defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
|
||||
|| defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2) \
|
||||
|| defined(HAVE_SUPPORTED_CURVES) \
|
||||
|| defined(HAVE_ALPN) \
|
||||
|| defined(HAVE_SESSION_TICKET) \
|
||||
|| defined(HAVE_SECURE_RENEGOTIATION) \
|
||||
|| defined(HAVE_SERVER_RENEGOTIATION_INFO)
|
||||
#endif
|
||||
|
||||
|
||||
/* we expect our IP address from DHCP */
|
||||
|
||||
static WOLFSSL_CTX* ctx = NULL;
|
||||
static WOLFSSL* ssl = NULL;
|
||||
static char* wc_error_message = (char*)malloc(80 + 1);
|
||||
static char errBuf[80];
|
||||
|
||||
#if defined(MEMORY_STRESS_TEST)
|
||||
#define MEMORY_STRESS_ITERATIONS 100
|
||||
#define MEMORY_STRESS_BLOCK_SIZE 1024
|
||||
#define MEMORY_STRESS_INITIAL (4*1024)
|
||||
static char* memory_stress[MEMORY_STRESS_ITERATIONS]; /* typically 1K per item */
|
||||
static int mem_ctr = 0;
|
||||
#endif
|
||||
|
||||
static int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
|
||||
static int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
|
||||
static int reconnect = RECONNECT_ATTEMPTS;
|
||||
static int lng_index PROGMEM = 0; /* 0 = English */
|
||||
|
||||
#if defined(__arm__)
|
||||
#include <malloc.h>
|
||||
extern char _end;
|
||||
extern "C" char *sbrk(int i);
|
||||
static char *ramstart=(char *)0x20070000;
|
||||
static char *ramend=(char *)0x20088000;
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/* fail_wait - in case of unrecoverable error */
|
||||
/*****************************************************************************/
|
||||
int fail_wait(void) {
|
||||
show_memory();
|
||||
|
||||
Serial.println(F("Failed. Halt."));
|
||||
while (1) {
|
||||
delay(1000);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* show_memory() to optionally view during debugging. */
|
||||
/*****************************************************************************/
|
||||
int show_memory(void)
|
||||
{
|
||||
#if defined(__arm__)
|
||||
struct mallinfo mi = mallinfo();
|
||||
|
||||
char *heapend=sbrk(0);
|
||||
register char * stack_ptr asm("sp");
|
||||
#if defined(DEBUG_WOLFSSL_VERBOSE)
|
||||
Serial.print(" arena=");
|
||||
Serial.println(mi.arena);
|
||||
Serial.print(" ordblks=");
|
||||
Serial.println(mi.ordblks);
|
||||
Serial.print(" uordblks=");
|
||||
Serial.println(mi.uordblks);
|
||||
Serial.print(" fordblks=");
|
||||
Serial.println(mi.fordblks);
|
||||
Serial.print(" keepcost=");
|
||||
Serial.println(mi.keepcost);
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_WOLFSSL) || defined(MEMORY_STRESS_TEST)
|
||||
Serial.print("Estimated free memory: ");
|
||||
Serial.print(stack_ptr - heapend + mi.fordblks);
|
||||
Serial.println(F(" bytes"));
|
||||
#endif
|
||||
|
||||
#if (0)
|
||||
/* Experimental: not supported on all devices: */
|
||||
Serial.print("RAM Start %lx\n", (unsigned long)ramstart);
|
||||
Serial.print("Data/Bss end %lx\n", (unsigned long)&_end);
|
||||
Serial.print("Heap End %lx\n", (unsigned long)heapend);
|
||||
Serial.print("Stack Ptr %lx\n",(unsigned long)stack_ptr);
|
||||
Serial.print("RAM End %lx\n", (unsigned long)ramend);
|
||||
|
||||
Serial.print("Heap RAM Used: ",mi.uordblks);
|
||||
Serial.print("Program RAM Used ",&_end - ramstart);
|
||||
Serial.print("Stack RAM Used ",ramend - stack_ptr);
|
||||
|
||||
Serial.print("Estimated Free RAM: %d\n\n",stack_ptr - heapend + mi.fordblks);
|
||||
#endif
|
||||
#else
|
||||
Serial.println(F("show_memory() not implemented for this platform"));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* EthernetSend() to send a message string. */
|
||||
/*****************************************************************************/
|
||||
int EthernetSend(WOLFSSL* ssl, char* message, int sz, void* ctx) {
|
||||
int sent = 0;
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
|
||||
sent = client.write((byte*)message, sz);
|
||||
return sent;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* EthernetReceive() to receive a reply string. */
|
||||
/*****************************************************************************/
|
||||
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx) {
|
||||
int ret = 0;
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
|
||||
while (client.available() > 0 && ret < sz) {
|
||||
reply[ret++] = client.read();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_hardware() */
|
||||
/*****************************************************************************/
|
||||
int setup_hardware(void) {
|
||||
int ret = 0;
|
||||
|
||||
#if defined(ARDUINO_SAMD_NANO_33_IOT)
|
||||
Serial.println(F("Detected known tested and working Arduino Nano 33 IoT"));
|
||||
#elif defined(ARDUINO_ARCH_RP2040)
|
||||
Serial.println(F("Detected known tested and working Arduino RP-2040"));
|
||||
#elif defined(__arm__) && defined(ID_TRNG) && defined(TRNG)
|
||||
/* need to manually turn on random number generator on Arduino Due, etc. */
|
||||
pmc_enable_periph_clk(ID_TRNG);
|
||||
trng_enable(TRNG);
|
||||
Serial.println(F("Enabled ARM TRNG"));
|
||||
#endif
|
||||
|
||||
show_memory();
|
||||
randomSeed(analogRead(0));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_datetime() */
|
||||
/* The device needs to have a valid date within the valid range of certs. */
|
||||
/*****************************************************************************/
|
||||
int setup_datetime(void) {
|
||||
int ret = 0;
|
||||
int ntp_tries = 20;
|
||||
|
||||
/* we need a date in the range of cert expiration */
|
||||
#ifdef USE_NTP_LIB
|
||||
#if defined(ESP32)
|
||||
NTPClient timeClient(ntpUDP, "pool.ntp.org");
|
||||
|
||||
timeClient.begin();
|
||||
timeClient.update();
|
||||
delay(1000);
|
||||
while (!timeClient.isTimeSet() && (ntp_tries > 0)) {
|
||||
timeClient.forceUpdate();
|
||||
Serial.println(F("Waiting for NTP update"));
|
||||
delay(2000);
|
||||
ntp_tries--;
|
||||
}
|
||||
if (ntp_tries <= 0) {
|
||||
Serial.println(F("Warning: gave up waiting on NTP"));
|
||||
}
|
||||
Serial.println(timeClient.getFormattedTime());
|
||||
Serial.println(timeClient.getEpochTime());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(ESP32)
|
||||
/* see esp32-hal-time.c */
|
||||
ntp_tries = 5;
|
||||
/* Replace "pool.ntp.org" with your preferred NTP server */
|
||||
configTime(0, 0, "pool.ntp.org");
|
||||
|
||||
/* Wait for time to be set */
|
||||
while ((time(nullptr) <= 100000) && ntp_tries > 0) {
|
||||
Serial.println(F("Waiting for time to be set..."));
|
||||
delay(2000);
|
||||
ntp_tries--;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
} /* setup_datetime */
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_network() */
|
||||
/*****************************************************************************/
|
||||
int setup_network(void) {
|
||||
int ret = 0;
|
||||
|
||||
#if defined(USING_WIFI)
|
||||
int status = WL_IDLE_STATUS;
|
||||
|
||||
/* The ESP8266 & ESP32 support both AP and STA. We'll use STA: */
|
||||
#if defined(ESP8266) || defined(ESP32)
|
||||
WiFi.mode(WIFI_STA);
|
||||
#else
|
||||
String fv;
|
||||
if (WiFi.status() == WL_NO_MODULE) {
|
||||
Serial.println("Communication with WiFi module failed!");
|
||||
/* don't continue if no network */
|
||||
while (true) ;
|
||||
}
|
||||
|
||||
fv = WiFi.firmwareVersion();
|
||||
if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
|
||||
Serial.println("Please upgrade the firmware");
|
||||
}
|
||||
#endif
|
||||
|
||||
Serial.print(F("Connecting to WiFi "));
|
||||
Serial.print(ssid);
|
||||
status = WiFi.begin(ssid, password);
|
||||
while (status != WL_CONNECTED) {
|
||||
delay(1000);
|
||||
Serial.print(F("."));
|
||||
Serial.print(status);
|
||||
status = WiFi.status();
|
||||
}
|
||||
|
||||
Serial.println(F(" Connected!"));
|
||||
#else
|
||||
/* Newer Ethernet shields have a
|
||||
* MAC address printed on a sticker on the shield */
|
||||
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
||||
IPAddress ip(192, 168, 1, 42);
|
||||
IPAddress myDns(192, 168, 1, 1);
|
||||
Ethernet.init(10); /* Most Arduino shields */
|
||||
/* Ethernet.init(5); * MKR ETH Shield */
|
||||
/* Ethernet.init(0); * Teensy 2.0 */
|
||||
/* Ethernet.init(20); * Teensy++ 2.0 */
|
||||
/* Ethernet.init(15); * ESP8266 with Adafruit FeatherWing Ethernet */
|
||||
/* Ethernet.init(33); * ESP32 with Adafruit FeatherWing Ethernet */
|
||||
Serial.println(F("Initialize Ethernet with DHCP:"));
|
||||
if (Ethernet.begin(mac) == 0) {
|
||||
Serial.println(F("Failed to configure Ethernet using DHCP"));
|
||||
/* Check for Ethernet hardware present */
|
||||
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
|
||||
Serial.println(F("Ethernet shield was not found."));
|
||||
while (true) {
|
||||
delay(1); /* do nothing */
|
||||
}
|
||||
}
|
||||
if (Ethernet.linkStatus() == LinkOFF) {
|
||||
Serial.println(F("Ethernet cable is not connected."));
|
||||
}
|
||||
/* try to configure using IP address instead of DHCP : */
|
||||
Ethernet.begin(mac, ip, myDns);
|
||||
}
|
||||
else {
|
||||
Serial.print(F(" DHCP assigned IP "));
|
||||
Serial.println(Ethernet.localIP());
|
||||
}
|
||||
/* We'll assume the Ethernet connection is ready to go. */
|
||||
#endif
|
||||
|
||||
Serial.println(F("********************************************************"));
|
||||
Serial.print(F(" wolfSSL Example Server IP = "));
|
||||
#if defined(USING_WIFI)
|
||||
Serial.println(WiFi.localIP());
|
||||
#else
|
||||
Serial.println(Ethernet.localIP());
|
||||
#endif
|
||||
/* In server mode, there's no host definition. */
|
||||
/* See companion example: wolfssl_client.ino */
|
||||
Serial.println(F("********************************************************"));
|
||||
Serial.println(F("Setup network complete."));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_wolfssl() */
|
||||
/*****************************************************************************/
|
||||
int setup_wolfssl(void) {
|
||||
int ret = 0;
|
||||
WOLFSSL_METHOD* method;
|
||||
|
||||
/* Show a revision of wolfssl user_settings.h file in use when available: */
|
||||
#if defined(WOLFSSL_USER_SETTINGS_ID)
|
||||
Serial.print(F("WOLFSSL_USER_SETTINGS_ID: "));
|
||||
Serial.println(F(WOLFSSL_USER_SETTINGS_ID));
|
||||
#else
|
||||
Serial.println(F("No WOLFSSL_USER_SETTINGS_ID found."));
|
||||
#endif
|
||||
|
||||
#if defined(NO_WOLFSSL_SERVER)
|
||||
Serial.println(F("wolfSSL server code disabled to save space."));
|
||||
#endif
|
||||
#if defined(NO_WOLFSSL_CLIENT)
|
||||
Serial.println(F("wolfSSL client code disabled to save space."));
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
wolfSSL_Debugging_ON();
|
||||
Serial.println(F("wolfSSL Debugging is On!"));
|
||||
#else
|
||||
Serial.println(F("wolfSSL Debugging is Off! (enable with DEBUG_WOLFSSL)"));
|
||||
#endif
|
||||
|
||||
/* See ssl.c for TLS cache settings. Larger cache = use more RAM. */
|
||||
#if defined(NO_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS NO_SESSION_CACHE"));
|
||||
#elif defined(MICRO_SESSION_CACHEx)
|
||||
Serial.println(F("wolfSSL TLS MICRO_SESSION_CACHE"));
|
||||
#elif defined(SMALL_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS SMALL_SESSION_CACHE"));
|
||||
#elif defined(MEDIUM_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS MEDIUM_SESSION_CACHE"));
|
||||
#elif defined(BIG_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS BIG_SESSION_CACHE"));
|
||||
#elif defined(HUGE_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS HUGE_SESSION_CACHE"));
|
||||
#elif defined(HUGE_SESSION_CACHE)
|
||||
Serial.println(F("wolfSSL TLS HUGE_SESSION_CACHE"));
|
||||
#else
|
||||
Serial.println(F("WARNING: Unknown or no TLS session cache setting."));
|
||||
/* See wolfssl/src/ssl.c for amount of memory used.
|
||||
* It is best on embedded devices to choose a TLS session cache size. */
|
||||
#endif
|
||||
|
||||
ret = wolfSSL_Init();
|
||||
if (ret == WOLFSSL_SUCCESS) {
|
||||
Serial.println("Successfully called wolfSSL_Init");
|
||||
}
|
||||
else {
|
||||
Serial.println("ERROR: wolfSSL_Init failed");
|
||||
}
|
||||
|
||||
/* See companion server example with wolfSSLv23_server_method here.
|
||||
* method = wolfSSLv23_client_method()); SSL 3.0 - TLS 1.3.
|
||||
* method = wolfTLSv1_2_client_method(); only TLS 1.2
|
||||
* method = wolfTLSv1_3_client_method(); only TLS 1.3
|
||||
*
|
||||
* see Arduino\libraries\wolfssl\src\user_settings.h */
|
||||
|
||||
Serial.println("Here we go!");
|
||||
|
||||
method = wolfSSLv23_server_method();
|
||||
if (method == NULL) {
|
||||
Serial.println(F("unable to get wolfssl server method"));
|
||||
fail_wait();
|
||||
}
|
||||
ctx = wolfSSL_CTX_new(method);
|
||||
if (ctx == NULL) {
|
||||
Serial.println(F("unable to get ctx"));
|
||||
fail_wait();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup_certificates() */
|
||||
/*****************************************************************************/
|
||||
int setup_certificates(void) {
|
||||
int ret = 0;
|
||||
|
||||
Serial.println(F("Initializing certificates..."));
|
||||
show_memory();
|
||||
|
||||
/* Use built-in validation, No verification callback function: */
|
||||
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
|
||||
|
||||
/* Certificate */
|
||||
Serial.println("Initializing certificates...");
|
||||
ret = wolfSSL_CTX_use_certificate_buffer(ctx,
|
||||
CTX_SERVER_CERT,
|
||||
CTX_SERVER_CERT_SIZE,
|
||||
CTX_CA_CERT_TYPE);
|
||||
if (ret == WOLFSSL_SUCCESS) {
|
||||
Serial.print("Success: use certificate: ");
|
||||
Serial.println(xstr(CTX_SERVER_CERT));
|
||||
}
|
||||
else {
|
||||
Serial.print("Error: wolfSSL_CTX_use_certificate_buffer failed: ");
|
||||
wc_ErrorString(ret, wc_error_message);
|
||||
Serial.println(wc_error_message);
|
||||
fail_wait();
|
||||
}
|
||||
|
||||
/* Setup private server key */
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx,
|
||||
CTX_SERVER_KEY,
|
||||
CTX_SERVER_KEY_SIZE,
|
||||
CTX_SERVER_KEY_TYPE);
|
||||
if (ret == WOLFSSL_SUCCESS) {
|
||||
Serial.print("Success: use private key buffer: ");
|
||||
Serial.println(xstr(CTX_SERVER_KEY));
|
||||
}
|
||||
else {
|
||||
Serial.print("Error: wolfSSL_CTX_use_PrivateKey_buffer failed: ");
|
||||
wc_ErrorString(ret, wc_error_message);
|
||||
Serial.println(wc_error_message);
|
||||
fail_wait();
|
||||
}
|
||||
|
||||
return ret;
|
||||
} /* Arduino setup */
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/* Arduino setup() */
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
void setup(void) {
|
||||
int i = 0;
|
||||
Serial.begin(SERIAL_BAUD);
|
||||
while (!Serial && (i < 10)) {
|
||||
/* wait for serial port to connect. Needed for native USB port only */
|
||||
delay(1000);
|
||||
i++;
|
||||
}
|
||||
|
||||
Serial.println(F(""));
|
||||
Serial.println(F(""));
|
||||
Serial.println(F("wolfSSL TLS Server Example Startup."));
|
||||
|
||||
/* define DEBUG_WOLFSSL in wolfSSL user_settings.h for diagnostics */
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* Optionally pre-allocate a large block of memory for testing */
|
||||
#if defined(MEMORY_STRESS_TEST)
|
||||
Serial.println(F("WARNING: Memory Stress Test Active!"));
|
||||
Serial.print(F("Allocating extra memory: "));
|
||||
Serial.print(MEMORY_STRESS_INITIAL);
|
||||
Serial.println(F(" bytes..."));
|
||||
memory_stress[mem_ctr] = (char*)malloc(MEMORY_STRESS_INITIAL);
|
||||
show_memory();
|
||||
#endif
|
||||
|
||||
setup_hardware();
|
||||
|
||||
setup_network();
|
||||
|
||||
setup_datetime();
|
||||
|
||||
setup_wolfssl();
|
||||
|
||||
setup_certificates();
|
||||
|
||||
/* Initialize wolfSSL using callback functions. */
|
||||
wolfSSL_SetIOSend(ctx, EthernetSend);
|
||||
wolfSSL_SetIORecv(ctx, EthernetReceive);
|
||||
|
||||
#if defined THIS_USER_SETTINGS_VERSION
|
||||
Serial.print(F("This user_settings.h version:"))
|
||||
Serial.println(THIS_USER_SETTINGS_VERSION)
|
||||
#endif
|
||||
|
||||
/* Start the server
|
||||
* See https://www.arduino.cc/reference/en/libraries/ethernet/server.begin/
|
||||
*/
|
||||
|
||||
Serial.println(F("Completed Arduino setup()"));
|
||||
|
||||
server.begin();
|
||||
Serial.println("Begin Server... (waiting for remote client to connect)");
|
||||
|
||||
/* See companion wolfssl_client.ino code */
|
||||
return;
|
||||
} /* Arduino setup */
|
||||
|
||||
/*****************************************************************************/
|
||||
/* wolfSSL error_check() */
|
||||
/*****************************************************************************/
|
||||
int error_check(int this_ret, bool halt_on_error,
|
||||
const __FlashStringHelper* message) {
|
||||
int ret = 0;
|
||||
if (this_ret == WOLFSSL_SUCCESS) {
|
||||
Serial.print(F("Success: "));
|
||||
Serial.println(message);
|
||||
}
|
||||
else {
|
||||
Serial.print(F("ERROR: return = "));
|
||||
Serial.print(this_ret);
|
||||
Serial.print(F(": "));
|
||||
Serial.println(message);
|
||||
Serial.println(wc_GetErrorString(this_ret));
|
||||
if (halt_on_error) {
|
||||
fail_wait();
|
||||
}
|
||||
}
|
||||
show_memory();
|
||||
|
||||
return ret;
|
||||
} /* error_check */
|
||||
|
||||
/*****************************************************************************/
|
||||
/* wolfSSL error_check_ssl */
|
||||
/* Parameters: */
|
||||
/* ssl is the current WOLFSSL object pointer */
|
||||
/* halt_on_error set to true to suspend operations for critical error */
|
||||
/* message is expected to be a memory-efficient F("") macro string */
|
||||
/*****************************************************************************/
|
||||
int error_check_ssl(WOLFSSL* ssl, int this_ret, bool halt_on_error,
|
||||
const __FlashStringHelper* message) {
|
||||
int err = 0;
|
||||
|
||||
if (ssl == NULL) {
|
||||
Serial.println(F("ssl is Null; Unable to allocate SSL object?"));
|
||||
#ifndef DEBUG_WOLFSSL
|
||||
Serial.println(F("Define DEBUG_WOLFSSL in user_settings.h for more."));
|
||||
#else
|
||||
Serial.println(F("See wolfssl/wolfcrypt/error-crypt.h for codes."));
|
||||
#endif
|
||||
Serial.print(F("ERROR: "));
|
||||
Serial.println(message);
|
||||
show_memory();
|
||||
if (halt_on_error) {
|
||||
fail_wait();
|
||||
}
|
||||
}
|
||||
else {
|
||||
err = wolfSSL_get_error(ssl, this_ret);
|
||||
if (err == WOLFSSL_SUCCESS) {
|
||||
Serial.print(F("Success m: "));
|
||||
Serial.println(message);
|
||||
}
|
||||
else {
|
||||
if (err < 0) {
|
||||
wolfSSL_ERR_error_string(err, errBuf);
|
||||
Serial.print(F("WOLFSSL Error: "));
|
||||
Serial.print(err);
|
||||
Serial.print(F("; "));
|
||||
Serial.println(errBuf);
|
||||
}
|
||||
else {
|
||||
Serial.println(F("Success: ssl object."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/* Arduino loop() */
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
void loop() {
|
||||
char errBuf[80] = "(no error";
|
||||
char reply[80] = "(no reply)";
|
||||
const char msg[] = "I hear you fa shizzle!";
|
||||
const char* cipherName;
|
||||
int input = 0;
|
||||
int replySz = 0;
|
||||
int retry_shutdown = SHUTDOWN_DELAY_MS; /* max try, once per millisecond */
|
||||
int ret = 0;
|
||||
IPAddress broadcast_address(255, 255, 255, 255);
|
||||
|
||||
/* Listen for incoming client requests. */
|
||||
client = server.available();
|
||||
if (client) {
|
||||
Serial.println("Have Client");
|
||||
while (!client.connected()) {
|
||||
/* wait for the client to actually connect */
|
||||
delay(10);
|
||||
}
|
||||
Serial.print("Client connected from remote IP: ");
|
||||
Serial.println(client.remoteIP());
|
||||
|
||||
ssl = wolfSSL_new(ctx);
|
||||
if (ssl == NULL) {
|
||||
Serial.println("Unable to allocate SSL object");
|
||||
fail_wait();
|
||||
}
|
||||
|
||||
ret = wolfSSL_accept(ssl);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
ret = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(ret, errBuf);
|
||||
Serial.print("TLS Accept Error: ");
|
||||
Serial.println(errBuf);
|
||||
}
|
||||
|
||||
cipherName = wolfSSL_get_cipher(ssl);
|
||||
Serial.print("SSL cipher suite is ");
|
||||
Serial.println(cipherName);
|
||||
|
||||
Serial.print("Server Read: ");
|
||||
while (!client.available()) {
|
||||
/* wait for data */
|
||||
}
|
||||
|
||||
/* read data */
|
||||
while (wolfSSL_pending(ssl)) {
|
||||
input = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
|
||||
if (input < 0) {
|
||||
ret = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(ret, errBuf);
|
||||
Serial.print("TLS Read Error: ");
|
||||
Serial.println(errBuf);
|
||||
break;
|
||||
}
|
||||
else if (input > 0) {
|
||||
replySz = input;
|
||||
reply[input] = '\0';
|
||||
Serial.print(reply);
|
||||
}
|
||||
else {
|
||||
Serial.println("<end of reply, input == 0>");
|
||||
}
|
||||
}
|
||||
|
||||
/* Write our message into reply buffer to send */
|
||||
memset(reply, 0, sizeof(reply));
|
||||
memcpy(reply, msg, sizeof(msg));
|
||||
replySz = strnlen(reply, sizeof(reply));
|
||||
|
||||
Serial.println("Sending reply...");
|
||||
if ((wolfSSL_write(ssl, reply, replySz)) != replySz) {
|
||||
ret = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(ret, errBuf);
|
||||
Serial.print("TLS Write Error: ");
|
||||
Serial.println(errBuf);
|
||||
}
|
||||
else {
|
||||
Serial.println("Reply sent!");
|
||||
}
|
||||
|
||||
Serial.println("Shutdown!");
|
||||
do {
|
||||
delay(1);
|
||||
retry_shutdown--;
|
||||
ret = wolfSSL_shutdown(ssl);
|
||||
} while ((ret == WOLFSSL_SHUTDOWN_NOT_DONE) && (retry_shutdown > 0));
|
||||
|
||||
if (retry_shutdown <= 0) {
|
||||
/* if wolfSSL_free is called before properly shutting down the
|
||||
* ssl object, undesired results may occur. */
|
||||
Serial.println("Warning! Shutdown did not properly complete.");
|
||||
}
|
||||
|
||||
wolfSSL_free(ssl);
|
||||
Serial.println("Connection complete.");
|
||||
if (REPEAT_CONNECTION) {
|
||||
Serial.println();
|
||||
Serial.println("Waiting for next connection.");
|
||||
}
|
||||
else {
|
||||
client.stop();
|
||||
Serial.println("Done!");
|
||||
while (1) {
|
||||
/* wait forever if not repeating */
|
||||
delay(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Serial.println("Client not connected. Trying again..."); */
|
||||
}
|
||||
|
||||
delay(100);
|
||||
} /* Arduino loop repeats */
|
||||
@@ -1,3 +1,5 @@
|
||||
# Arduino Basic Hello World
|
||||
|
||||
This example simply compiles in wolfSSL and shows the current version number.
|
||||
|
||||
NOTE: Moving; See https://github.com/wolfSSL/wolfssl-examples/pull/499
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
/* wolfssl_server.ino
|
||||
*
|
||||
* Copyright (C) 2006-2025 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
/* wolfSSL user_settings.h must be included from settings.h
|
||||
* Make all configurations changes in user_settings.h
|
||||
* Do not edit wolfSSL `settings.h` or `config.h` files.
|
||||
* Do not explicitly include user_settings.h in any source code.
|
||||
* Each Arduino sketch that uses wolfSSL must have: #include "wolfssl.h"
|
||||
* C/C++ source files can use: #include <wolfssl/wolfcrypt/settings.h>
|
||||
* The wolfSSL "settings.h" must be included in each source file using wolfSSL.
|
||||
* The wolfSSL "settings.h" must appear before any other wolfSSL include.
|
||||
*/
|
||||
#include <wolfssl.h>
|
||||
#include <wolfssl/version.h>
|
||||
|
||||
/* Choose a monitor serial baud rate: 9600, 14400, 19200, 57600, 74880, etc. */
|
||||
#define SERIAL_BAUD 115200
|
||||
|
||||
/* Arduino setup */
|
||||
void setup() {
|
||||
Serial.begin(SERIAL_BAUD);
|
||||
while (!Serial) {
|
||||
/* wait for serial port to connect. Needed for native USB port only */
|
||||
}
|
||||
Serial.println(F(""));
|
||||
Serial.println(F(""));
|
||||
Serial.println(F("wolfSSL setup complete!"));
|
||||
}
|
||||
|
||||
/* Arduino main application loop. */
|
||||
void loop() {
|
||||
Serial.print("wolfSSL Version: ");
|
||||
Serial.println(LIBWOLFSSL_VERSION_STRING);
|
||||
delay(60000);
|
||||
}
|
||||
57
IDE/ARDUINO/wolfssl-arduino.cpp
Normal file
57
IDE/ARDUINO/wolfssl-arduino.cpp
Normal file
@@ -0,0 +1,57 @@
|
||||
/* wolfssl-arduino.cpp
|
||||
*
|
||||
* Copyright (C) 2006-2025 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "wolfssl.h"
|
||||
|
||||
/* Function to allow wolfcrypt to use Arduino Serial.print for debug messages.
|
||||
* See wolfssl/wolfcrypt/logging.c */
|
||||
|
||||
#if defined(__AVR__)
|
||||
#include <avr/pgmspace.h> /* Required for PROGMEM handling on AVR */
|
||||
#endif
|
||||
|
||||
int wolfSSL_Arduino_Serial_Print(const char* const s)
|
||||
{
|
||||
/* Reminder: Serial.print is only available in C++ */
|
||||
int is_progmem = 0;
|
||||
|
||||
#if defined(__AVR__)
|
||||
const char* t;
|
||||
t = s;
|
||||
|
||||
/* Safely check if `s` is in PROGMEM, 0x8000 is typical for AVR flash */
|
||||
if (reinterpret_cast<uint16_t>(t) >= 0x8000) {
|
||||
while (pgm_read_byte(t)) {
|
||||
Serial.write(pgm_read_byte(t++));
|
||||
}
|
||||
Serial.println();
|
||||
is_progmem = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Print normally for non-AVR boards or RAM-stored strings */
|
||||
if (!is_progmem) {
|
||||
Serial.println(s);
|
||||
}
|
||||
|
||||
return 0;
|
||||
};
|
||||
@@ -70,6 +70,9 @@ if [ "$ROOT_DIR" = "" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
ARDUINO_ROOT="$HOME/Arduino/libraries"
|
||||
|
||||
# Check environment
|
||||
if [ -n "$WSL_DISTRO_NAME" ]; then
|
||||
# we found a non-blank WSL environment distro name
|
||||
@@ -78,8 +81,6 @@ if [ -n "$WSL_DISTRO_NAME" ]; then
|
||||
if echo "$current_path" | grep -Eq "^$pattern"; then
|
||||
# if we are in WSL and shared Windows file system, 'ln' does not work.
|
||||
ARDUINO_ROOT="/mnt/c/Users/$USER/Documents/Arduino/libraries"
|
||||
else
|
||||
ARDUINO_ROOT="$HOME/Arduino/libraries"
|
||||
fi
|
||||
fi
|
||||
echo "The Arduino library root is: $ARDUINO_ROOT"
|
||||
@@ -116,11 +117,21 @@ if [ $# -gt 0 ]; then
|
||||
echo "Error: not a valid operation: $THIS_OPERATION"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "INSTALL parameter not specified. Installing to ROOT_DIR=$ROOT_DIR"
|
||||
fi
|
||||
|
||||
|
||||
ROOT_SRC_DIR="${ROOT_DIR}/src"
|
||||
EXAMPLES_DIR="${ROOT_DIR}/examples"
|
||||
|
||||
if [ -n "$WOLFSSL_EXAMPLES_ROOT" ]; then
|
||||
EXTRA_EXAMPLES_DIR="${WOLFSSL_EXAMPLES_ROOT}/Arduino"
|
||||
echo "EXTRA_EXAMPLES_DIR=$EXTRA_EXAMPLES_DIR"
|
||||
else
|
||||
echo "There are additional examples at https://github.com/wolfSSL/wolfssl-examples"
|
||||
echo "Set WOLFSSL_EXAMPLES_ROOT to your local directory to include those examples."
|
||||
fi
|
||||
WOLFSSL_SRC="${ROOT_SRC_DIR}/src"
|
||||
WOLFSSL_HEADERS="${ROOT_SRC_DIR}/wolfssl"
|
||||
WOLFCRYPT_ROOT="${ROOT_SRC_DIR}/wolfcrypt"
|
||||
@@ -141,8 +152,16 @@ OPENSSL_DIR_TOP="${WOLFSSL_HEADERS_TOP}/openssl"
|
||||
|
||||
WOLFSSL_VERSION=$(grep -i "LIBWOLFSSL_VERSION_STRING" ${TOP_DIR}/wolfssl/version.h | cut -d '"' -f 2)
|
||||
if [ "$WOLFSSL_VERSION" = "" ]; then
|
||||
echo "ERROR: Could not find wolfSSL Version in ${TOP_DIR}/wolfssl/version.h"
|
||||
exit 1
|
||||
echo "Current user: [$USER]"
|
||||
if [ "$USER" = "" ] || [ "$USER" = "runner" ]; then
|
||||
# Typically when there's no user, it is a GitHub workflow. It is not guaranteed to be "runner"
|
||||
echo "No USER found, no version.h found. Setting Version text to [GitHub] for assumed workflow."
|
||||
WOLFSSL_VERSION="GitHub"
|
||||
else
|
||||
echo "ERROR: Could not find wolfSSL Version in ${TOP_DIR}/wolfssl/version.h"
|
||||
echo "Check autogen.sh and configure"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Found wolfSSL version $WOLFSSL_VERSION"
|
||||
echo "# WOLFSSL_VERSION_ARUINO_SUFFIX $WOLFSSL_VERSION_ARUINO_SUFFIX"
|
||||
@@ -235,26 +254,54 @@ if [ "$THIS_DIR" = "ARDUINO" ]; then
|
||||
$CP_CMD "${OPENSSL_DIR_TOP}"/* ."${OPENSSL_DIR}" || exit 1
|
||||
|
||||
# Finally, copy the Arduino-specific wolfssl library files into place: [lib]/src
|
||||
$CP_CMD ./wolfssl.h ".${ROOT_SRC_DIR}"/wolfssl.h
|
||||
$CP_CMD ./wolfssl.h ".${ROOT_SRC_DIR}"/wolfssl.h || exit 1
|
||||
$CP_CMD ./wolfssl-arduino.cpp ".${ROOT_SRC_DIR}"/wolfssl-arduino.cpp || exit 1
|
||||
|
||||
unset NO_ARDUINO_EXAMPLES
|
||||
echo "Copy examples...."
|
||||
# Copy examples
|
||||
mkdir -p ".${ROOT_SRC_DIR}"/examples
|
||||
|
||||
echo "Copy wolfssl_client example...."
|
||||
mkdir -p ".${EXAMPLES_DIR}"/wolfssl_client
|
||||
$CP_CMD ./sketches/wolfssl_client/wolfssl_client.ino ".${EXAMPLES_DIR}"/wolfssl_client/wolfssl_client.ino || exit 1
|
||||
$CP_CMD ./sketches/wolfssl_client/README.md ".${EXAMPLES_DIR}"/wolfssl_client/README.md || exit 1
|
||||
EXAMPLES_DIR_REAL_PATH=$(realpath ".${EXAMPLES_DIR}")
|
||||
echo "Source WOLFSSL_EXAMPLES_ROOT=$WOLFSSL_EXAMPLES_ROOT"
|
||||
echo "Destination EXAMPLES_DIR=.${EXAMPLES_DIR}"
|
||||
echo "EXAMPLES_DIR_REAL_PATH=${EXAMPLES_DIR_REAL_PATH}"
|
||||
|
||||
echo "Copy wolfssl_server example...."
|
||||
mkdir -p .${EXAMPLES_DIR}/wolfssl_server
|
||||
$CP_CMD ./sketches/wolfssl_server/wolfssl_server.ino ".${EXAMPLES_DIR}"/wolfssl_server/wolfssl_server.ino || exit 1
|
||||
$CP_CMD ./sketches/wolfssl_server/README.md ".${EXAMPLES_DIR}"/wolfssl_server/README.md || exit 1
|
||||
if [ -n "$WOLFSSL_EXAMPLES_ROOT" ]; then
|
||||
echo "Copy template example...."
|
||||
mkdir -p ".${EXAMPLES_DIR}"/template/wolfssl_library/src
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/template/template.ino ".${EXAMPLES_DIR}"/template/template.ino || exit 1
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/template/README.md ".${EXAMPLES_DIR}"/template/README.md || exit 1
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/template/wolfssl_helper.c ".${EXAMPLES_DIR}"/template/wolfssl_helper.c || exit 1
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/template/wolfssl_helper.h ".${EXAMPLES_DIR}"/template/wolfssl_helper.h || exit 1
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/template/wolfssl_library/wolfssl_library.h ".${EXAMPLES_DIR}"/template/wolfssl_library/wolfssl_library.h || exit 1
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/template/wolfssl_library/src/wolfssl_library.cpp ".${EXAMPLES_DIR}"/template/wolfssl_library/src/wolfssl_library.cpp || exit 1
|
||||
|
||||
echo "Copy wolfssl_server example...."
|
||||
mkdir -p .${EXAMPLES_DIR}/wolfssl_version
|
||||
$CP_CMD ./sketches/wolfssl_version/wolfssl_version.ino ".${EXAMPLES_DIR}"/wolfssl_version/wolfssl_version.ino || exit 1
|
||||
$CP_CMD ./sketches/wolfssl_version/README.md ".${EXAMPLES_DIR}"/wolfssl_version/README.md || exit 1
|
||||
echo "Copy wolfssl_AES_CTR example...."
|
||||
mkdir -p ".${EXAMPLES_DIR}"/wolfssl_AES_CTR
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/wolfssl_AES_CTR.ino ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/wolfssl_AES_CTR.ino || exit 1
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_AES_CTR/README.md ".${EXAMPLES_DIR}"/wolfssl_AES_CTR/README.md || exit 1
|
||||
|
||||
echo "Copy wolfssl_client example...."
|
||||
mkdir -p ".${EXAMPLES_DIR}"/wolfssl_client
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/wolfssl_client.ino ".${EXAMPLES_DIR}"/wolfssl_client/wolfssl_client.ino || exit 1
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_client/README.md ".${EXAMPLES_DIR}"/wolfssl_client/README.md || exit 1
|
||||
|
||||
echo "Copy wolfssl_server example...."
|
||||
mkdir -p .${EXAMPLES_DIR}/wolfssl_server
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/wolfssl_server.ino ".${EXAMPLES_DIR}"/wolfssl_server/wolfssl_server.ino || exit 1
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_server/README.md ".${EXAMPLES_DIR}"/wolfssl_server/README.md || exit 1
|
||||
|
||||
echo "Copy wolfssl_version example...."
|
||||
mkdir -p .${EXAMPLES_DIR}/wolfssl_version
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/wolfssl_version.ino ".${EXAMPLES_DIR}"/wolfssl_version/wolfssl_version.ino || exit 1
|
||||
$CP_CMD "$WOLFSSL_EXAMPLES_ROOT"/Arduino/sketches/wolfssl_version/README.md ".${EXAMPLES_DIR}"/wolfssl_version/README.md || exit 1
|
||||
else
|
||||
NO_ARDUINO_EXAMPLES=1
|
||||
fi
|
||||
echo "Examples copied to .${EXAMPLES_DIR}"
|
||||
echo "ls ${EXAMPLES_DIR_REAL_PATH}"
|
||||
ls "${EXAMPLES_DIR_REAL_PATH}"
|
||||
else
|
||||
echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
|
||||
exit 1
|
||||
@@ -273,6 +320,8 @@ fi
|
||||
# as an Arduino-specific README.md file.
|
||||
VERSION_PLACEHOLDER="\${WOLFSSL_VERSION}"
|
||||
ARDUINO_VERSION_SUFFIX_PLACEHOLDER="\${WOLFSSL_VERSION_ARUINO_SUFFIX}"
|
||||
|
||||
# This is the SOURCE to prepend. Note the OUTPUT is PREPENDED_README.md later copied to README.md
|
||||
PREPEND_FILE="Arduino_README_prepend.md"
|
||||
PROPERTIES_FILE_TEMPLATE="library.properties.template"
|
||||
sed s/"$VERSION_PLACEHOLDER"/"$WOLFSSL_VERSION"/ "$PREPEND_FILE" > "$PREPEND_FILE.tmp"
|
||||
@@ -340,4 +389,9 @@ if [ "$THIS_OPERATION" = "INSTALL" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$NO_ARDUINO_EXAMPLES" ]; then
|
||||
echo ""
|
||||
echo "WARNING: No examples copied. Set WOLFSSL_EXAMPLES_ROOT as appropriate."
|
||||
echo ""
|
||||
fi
|
||||
echo "Done!"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -22,6 +22,7 @@
|
||||
/* Edit with caution. This is an Arduino-library specific header for wolfSSL */
|
||||
|
||||
#ifndef WOLFSSL_USER_SETTINGS
|
||||
/* Should already be defined in settings.h for #if defined(ARDUINO) */
|
||||
#define WOLFSSL_USER_SETTINGS
|
||||
#endif
|
||||
|
||||
@@ -39,9 +40,10 @@
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
int wolfSSL_Arduino_Serial_Print(const char *const s)
|
||||
{
|
||||
/* See wolfssl/wolfcrypt/logging.c */
|
||||
Serial.println(F(s));
|
||||
return 0;
|
||||
};
|
||||
#ifndef WOLFSSL_ARDUINO_H
|
||||
#define WOLFSSL_ARDUINO_H
|
||||
|
||||
/* Declare a helper function to be used in wolfssl/wolfcrypt/logging.c */
|
||||
int wolfSSL_Arduino_Serial_Print(const char* const s);
|
||||
|
||||
#endif /* WOLFSSL_ARDUINO_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -14,7 +14,6 @@ else()
|
||||
add_compile_definitions(WOLFSSL_ESP_NO_WATCHDOG=1)
|
||||
endif()
|
||||
|
||||
|
||||
# The wolfSSL CMake file should be able to find the source code.
|
||||
# Otherwise, assign an environment variable or set it here:
|
||||
#
|
||||
@@ -129,7 +128,7 @@ endif()
|
||||
# an unintuitive error about Unknown CMake command "esptool_py_flash_project_args".
|
||||
|
||||
if(0)
|
||||
message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include")
|
||||
message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include")
|
||||
# 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)
|
||||
|
||||
@@ -140,7 +139,7 @@ if(0)
|
||||
else()
|
||||
message(STATUS "NOT FOUND: PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}")
|
||||
endif()
|
||||
message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include")
|
||||
message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include")
|
||||
endif()
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -19,23 +19,62 @@
|
||||
#
|
||||
# cmake for wolfssl Espressif projects
|
||||
#
|
||||
# Version 5.7.2 Espressif ESP-IDF integration
|
||||
# Version 5.8.0 Espressif ESP-IDF + PlatformIO integration (2)
|
||||
#
|
||||
# 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)
|
||||
|
||||
# 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 ".")
|
||||
|
||||
# Optionally set your source to wolfSSL in your project CMakeLists.txt like this:
|
||||
# set(WOLFSSL_ROOT "c:/workspace/my_wolfssl" )
|
||||
|
||||
if ( "${WOLFSSL_ROOT}" STREQUAL "")
|
||||
set(WOLFSSL_ROOT "$ENV{WOLFSSL_ROOT}" )
|
||||
endif()
|
||||
|
||||
set(VERBOSE_COMPONENT_MESSAGES 1)
|
||||
|
||||
# Optional requires include:
|
||||
# set(THIS_ESP_TLS "esp-tls")
|
||||
set(THIS_ESP_TLS "")
|
||||
|
||||
# LIBWOLFSSL_CMAKE_OUTPUT can be printed at runtime
|
||||
set(LIBWOLFSSL_CMAKE_OUTPUT "")
|
||||
|
||||
|
||||
if(CMAKE_BUILD_EARLY_EXPANSION)
|
||||
message(STATUS "Skipping libwolfssl_output.h update during CMAKE_BUILD_EARLY_EXPANSION")
|
||||
else()
|
||||
# Initialize a new libwolfssl_output.h in the cmake build directory.
|
||||
if( EXISTS "${CMAKE_BINARY_DIR}/libwolfssl_output.h")
|
||||
# The next WRITE replaces a file.
|
||||
# This is here to remove any ambiguity on file removal & generation.
|
||||
file(REMOVE "${CMAKE_BINARY_DIR}/libwolfssl_output.h")
|
||||
endif()
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/libwolfssl_output.h"
|
||||
"/* libwolfssl_output.h generated by wolfssl component */\n"
|
||||
"#ifndef _LIBWOLFSSL_OUTPUT_H_\n"
|
||||
"\n"
|
||||
"#define _LIBWOLFSSL_OUTPUT_H_\n\n")
|
||||
endif()
|
||||
|
||||
# Append messages with:
|
||||
# LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_CMAKE_OUTPUT "${LIBWOLFSSL_CMAKE_OUTPUT}\n"message" "0")
|
||||
# See function: APPEND_LIBWOLFSSL_CMAKE_OUTPUT
|
||||
|
||||
# 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 )
|
||||
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)
|
||||
|
||||
@@ -55,6 +94,96 @@ function( IS_ESP_IDF_COMPONENT RESULT )
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# LIBWOLFSSL_SAVE_INFO(VAR_OUTPUT THIS_VAR VAR_RESULT)
|
||||
#
|
||||
# Save the THIS_VAR as a string in a macro called VAR_OUTPUT
|
||||
#
|
||||
# VAR_OUTPUT: the name of the macro to define
|
||||
# THIS_VAR: the OUTPUT_VARIABLE result from a execute_process()
|
||||
# VAR_RESULT: the RESULT_VARIABLE from a execute_process(); "0" if successful.
|
||||
#
|
||||
function ( LIBWOLFSSL_SAVE_INFO VAR_OUTPUT THIS_VAR VAR_RESULT )
|
||||
# is the RESULT_VARIABLE output value 0? If so, IS_VALID_VALUE is true.
|
||||
string(COMPARE EQUAL "${VAR_RESULT}" "0" IS_VALID_VALUE)
|
||||
|
||||
# if we had a successful operation, save the THIS_VAR in VAR_OUTPUT
|
||||
if(${IS_VALID_VALUE})
|
||||
|
||||
if(0)
|
||||
# Optional debug
|
||||
message(STATUS "Looking for LF in ${THIS_VAR}")
|
||||
endif()
|
||||
|
||||
# Check if the text to print in THIS_VAR is multi-line
|
||||
string(REPLACE "\n" ";" LINES "${THIS_VAR}")
|
||||
list(LENGTH LINES LINE_COUNT)
|
||||
|
||||
# Save var to "libwolfssl_output.h" header if multi-line, otherwise a simple compile def
|
||||
if(LINE_COUNT GREATER 1)
|
||||
message(STATUS "Setting HAVE_LIBWOLFSSL_OUTPUT_HEADER=1 for ${VAR_OUTPUT}")
|
||||
add_compile_definitions(HAVE_LIBWOLFSSL_OUTPUT_HEADER=1)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "#undef ${VAR_OUTPUT}\n")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "#define ${VAR_OUTPUT} \\\n")
|
||||
|
||||
# Split into lines
|
||||
string(REPLACE "\n" ";" LINES "${THIS_VAR}")
|
||||
foreach(LINE IN LISTS LINES)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "\"${LINE}\\n\" \\\n")
|
||||
endforeach()
|
||||
|
||||
# Final empty line to close the macro
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "\n")
|
||||
|
||||
message(STATUS "COMPONENT_LIB=${COMPONENT_LIB}")
|
||||
target_include_directories(${COMPONENT_LIB} PRIVATE "${CMAKE_BINARY_DIR}")
|
||||
else()
|
||||
message(STATUS "No HAS_LIBWOLFSSL_OUTPUT_HEADER")
|
||||
# We should not have any, but just to be sure:
|
||||
# Strip newline chars in THIS_VAR parameter and save in VAR_VALUE
|
||||
string(REPLACE "\n" "" VAR_VALUE "${THIS_VAR}")
|
||||
|
||||
# we'll could percolate the value to the parent for possible later use
|
||||
# set(${VAR_OUTPUT} ${VAR_VALUE} PARENT_SCOPE)
|
||||
|
||||
# but we're only using it here in this function
|
||||
set(${VAR_OUTPUT} ${VAR_VALUE})
|
||||
|
||||
# we'll print what we found to the console
|
||||
message(STATUS "Found ${VAR_OUTPUT}=${VAR_VALUE}")
|
||||
|
||||
# the interesting part is defining the VAR_OUTPUT name a value to use in the app
|
||||
add_compile_definitions(${VAR_OUTPUT}=\"${VAR_VALUE}\")
|
||||
|
||||
endif()
|
||||
else()
|
||||
# if we get here, check the execute_process command and parameters.
|
||||
message(STATUS "LIBWOLFSSL_SAVE_INFO encountered a non-zero VAR_RESULT")
|
||||
set(${VAR_OUTPUT} "Unknown")
|
||||
endif()
|
||||
|
||||
|
||||
endfunction() # LIBWOLFSSL_SAVE_INFO
|
||||
|
||||
#
|
||||
# APPEND_LIBWOLFSSL_CMAKE_OUTPUT(THIS_MESSAGE OUTPUT_VALUE)
|
||||
#
|
||||
# Append the text in THIS_MESSAGE to LIBWOLFSSL_CMAKE_OUTPUT.
|
||||
# String is available at runtime in app
|
||||
#
|
||||
|
||||
function( APPEND_LIBWOLFSSL_CMAKE_OUTPUT
|
||||
THIS_MESSAGE )
|
||||
# Normally, we'd simply print a message:
|
||||
message(STATUS "${THIS_MESSAGE}")
|
||||
|
||||
# But here we'll pass the entire LIBWOLFSSL_CMAKE_OUTPUT as a string definition to the app
|
||||
set(LIBWOLFSSL_CMAKE_OUTPUT "${LIBWOLFSSL_CMAKE_OUTPUT}\n${THIS_MESSAGE}" PARENT_SCOPE)
|
||||
|
||||
# We don't call LIBWOLFSSL_SAVE_INFO here as it would add duplicate definitions
|
||||
# See single instance at the end of this file.
|
||||
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 )
|
||||
@@ -77,20 +206,6 @@ else()
|
||||
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
|
||||
|
||||
# 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()
|
||||
@@ -185,7 +300,9 @@ endif()
|
||||
# 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)
|
||||
function( ENVIRONMENT_VAR_TO_MACRO
|
||||
EVARPARAM # Environment variable parameter name
|
||||
EVARVALUE) # Environment variable value
|
||||
# If the EVARPARAM environment variable name is set to EVARVALUE,
|
||||
# set the compiler flag definition to enable CSV output.
|
||||
if ( "$ENV{${EVARPARAM}}" STREQUAL "${EVARVALUE}")
|
||||
@@ -217,7 +334,8 @@ endfunction()
|
||||
# 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
|
||||
function( IS_WOLFSSL_SOURCE
|
||||
DIRECTORY_PARAMETER
|
||||
RESULT )
|
||||
if (EXISTS "${DIRECTORY_PARAMETER}/wolfcrypt/src")
|
||||
set(${RESULT} "${DIRECTORY_PARAMETER}" PARENT_SCOPE)
|
||||
@@ -233,7 +351,8 @@ endfunction()
|
||||
# Example usage:
|
||||
# FIND_WOLFSSL_DIRECTORY(WOLFSSL_ROOT)
|
||||
# *********************************************************************************************
|
||||
function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
function( FIND_WOLFSSL_DIRECTORY
|
||||
OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
message(STATUS "Starting FIND_WOLFSSL_DIRECTORY: ${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
|
||||
if ( "${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}" STREQUAL "" )
|
||||
@@ -673,9 +792,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")
|
||||
|
||||
if(WOLFSSL_ROOT)
|
||||
string(REPLACE "\\" "/" WOLFSSL_ROOT ${WOLFSSL_ROOT})
|
||||
endif()
|
||||
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}")
|
||||
@@ -789,16 +908,35 @@ if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
AND NOT CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
|
||||
AND NOT ("${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266")
|
||||
)
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("wolfSSL Certificate Bundles Enabled")
|
||||
|
||||
if (CMAKE_BUILD_EARLY_EXPANSION)
|
||||
message(ERROR "Bundle Cert initialization must occur during CMAKE_BUILD_EARLY_EXPANSION")
|
||||
message(FATAL_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")
|
||||
message(FATAL_ERROR "Certificate bundles need a value for WOLFSSL_ROOT")
|
||||
endif()
|
||||
|
||||
# Cert bundle in wolfSSL source unless otherwise specified later
|
||||
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}")
|
||||
|
||||
if(DEFINED ENV{PLATFORMIO_PROJECT_DIR})
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Detected PlatformIO")
|
||||
set(IS_PLATFORMIO 1)
|
||||
else()
|
||||
# Some environments may not have environment variable, so double check if we are in .pio
|
||||
if("${CMAKE_BINARY_DIR}" MATCHES "/\\.pio/")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Detected PlatformIO via CMAKE_BINARY_DIR")
|
||||
set(IS_PLATFORMIO 1)
|
||||
else()
|
||||
set(IS_PLATFORMIO 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EXISTS "${WOLFSSL_ESP_CRT_BUNDLE_DIR}" OR IS_PLATFORMIO)
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Special processing for wolfSSL Certificate Bundles")
|
||||
set(bundle_name "x509_crt_bundle_wolfssl")
|
||||
|
||||
# For now the certs are in the same directory
|
||||
@@ -824,9 +962,9 @@ if( CONFIG_WOLFSSL_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}")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Using a custom wolfSSL bundle path: ${custom_bundle_path}")
|
||||
else()
|
||||
message(STATUS "Not using a custom wolfSSL bundle path.")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Not using a custom wolfSSL bundle path")
|
||||
endif()
|
||||
list(APPEND args --input ${crt_paths} -q)
|
||||
|
||||
@@ -843,25 +981,107 @@ if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
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 (IS_PLATFORMIO)
|
||||
# PlatformIO cannot generate a Certificate Bundle at build time
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("PlatformIO is using a predefined bundle rather than generating one")
|
||||
|
||||
if(EXISTS "${crt_bundle}")
|
||||
message(STATUS "Bundle file exists from prior build: ${crt_bundle}")
|
||||
if ( "${WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}" STREQUAL "" OR "$(WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE)" STREQUAL "" OR "$(WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE)" STREQUAL "n")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Alternate Certificate Bundle Path and Name not enabled, assuming [project]/certs/x509_crt_bundle_wolfssl")
|
||||
# Reminder this CMakeLists.txt should be in [project]/components/wolfssl, so ./certs is two directories up
|
||||
set(crt_bundle_option "../../certs/x509_crt_bundle_wolfssl")
|
||||
else()
|
||||
string(SUBSTRING "${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}" 0 2 CERT_PATH_FIRST_TWO)
|
||||
if(CERT_PATH_FIRST_TWO STREQUAL "./" OR CERT_PATH_FIRST_TWO STREQUAL ".\\")
|
||||
set(IS_CERT_BUNDLE_RELATIVE_PATH 1)
|
||||
message(STATUS "Alternate Cert Path is relative to project.")
|
||||
else()
|
||||
set(IS_CERT_BUNDLE_RELATIVE_PATH 0)
|
||||
message(STATUS "Alternate Cert Path is not relative to project.")
|
||||
endif()
|
||||
|
||||
# The cert bundle is not a standard cert, so we con't add to the crt_paths.
|
||||
# Still, we may have an alternate location, particulatly needed for PlatformIO:
|
||||
if(IS_CERT_BUNDLE_RELATIVE_PATH)
|
||||
message(STATUS "CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME = ${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
message(STATUS "Relative alternate_bundle_path: ${alternate_bundle_path}")
|
||||
|
||||
SET(crt_bundle_option "${CMAKE_SOURCE_DIR}/${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
else()
|
||||
message(STATUS "alternate_bundle_path: ${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
message(STATUS "Not using an alternate wolfSSL bundle file.")
|
||||
SET(crt_bundle_option "${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Clean the path, removing any extra "./" etc.
|
||||
# Number of spaces in message strings is to align path value outputs
|
||||
message(STATUS "This crt_bundle_option value: ${crt_bundle_option}")
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.19")
|
||||
message("WARNING: CMake version is ${CMAKE_VERSION} ? file(REAL_PATH ...) is not supported. Falling back to manual path normalization.")
|
||||
# optional fallback logic here
|
||||
get_filename_component(crt_bundle_file_component "${crt_bundle_option}" ABSOLUTE)
|
||||
message(STATUS "Interim crt_bundle_file_component: ${crt_bundle_file_component}")
|
||||
file(TO_CMAKE_PATH "${crt_bundle_file_component}" crt_bundle)
|
||||
message(STATUS "TO_CMAKE_PATH crt_bundle result: ${crt_bundle}")
|
||||
# set(crt_bundle "C:/workspace/pio_wolfssl-upstream-test-wolfssl_cert_bundle/esp32-c6/certs/x509_crt_bundle_wolfssl")
|
||||
else()
|
||||
file(REAL_PATH "${crt_bundle_option}" crt_bundle)
|
||||
endif()
|
||||
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Certificate Bundle: ${crt_bundle}")
|
||||
message(STATUS "This cleaned crt_bundle value: ${crt_bundle}")
|
||||
message(STATUS "=============================================================================================================")
|
||||
message(STATUS "=============================================================================================================")
|
||||
message(STATUS "Reminder: platformio.ini will need this value set for board_build.embed_files =")
|
||||
message(STATUS "${crt_bundle}")
|
||||
message(STATUS "=============================================================================================================")
|
||||
message(STATUS "=============================================================================================================")
|
||||
|
||||
# e.g. SET(crt_bundle "C:/workspace/pio_wolfssl/esp32-c6/certs/x509_crt_bundle_wolfssl")
|
||||
#
|
||||
|
||||
# Normally x509_crt_bundle_wolfssl built by python script called from cmake.
|
||||
# See https://github.com/wolfSSL/wolfssl/blob/master/wolfcrypt/src/port/Espressif/esp_crt_bundle/gen_crt_bundle.py
|
||||
# Reminder ESP-IDF scripts are NOT called from CMake for PlatformIO builds.
|
||||
#
|
||||
# The easiest way to generate the default file is to build with ESP-IDF and copy the files to [project]/main
|
||||
#
|
||||
# for example:
|
||||
# build\VisualGDB\Debug\x509_crt_bundle_wolfssl.s
|
||||
# build\VisualGDB\Debug\esp-idf\wolfssl\x509_crt_bundle_wolfssl
|
||||
#
|
||||
message(STATUS "Confirming cert bundle exists...")
|
||||
if(EXISTS "${crt_bundle}")
|
||||
# Number of spaces is to align path value outputs
|
||||
message(STATUS "Bundle file found for PlatformIO: ${crt_bundle}")
|
||||
else()
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("ERROR: Failed to find bundle file found for PlatformIO: ${crt_bundle}")
|
||||
message(STATUS "Check for entry in platformio.ini: board_build.embed_files = certs/x509_crt_bundle_wolfssl ")
|
||||
message(FATAL_ERROR "WOLFSSL_CERTIFICATE_BUNDLE is enabled for PlatformIO, but predefined file not found: ${crt_bundle}")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Bundle file expected during next build: ${crt_bundle}")
|
||||
# APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Generate bundle: ${GENERATE_CERT_BUNDLEPY} ${args}")
|
||||
# Not PlatformIO
|
||||
# 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}")
|
||||
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 ${crt_bundle})
|
||||
|
||||
add_custom_target(custom_wolfssl_bundle DEPENDS ${cert_bundle})
|
||||
|
||||
# the wolfSSL crtificate bundle is baked into wolfSSL
|
||||
# the wolfSSL certificate bundle is baked into wolfSSL
|
||||
add_dependencies(${COMPONENT_LIB} custom_wolfssl_bundle)
|
||||
|
||||
# COMPONENT_LIB may vary: __idf_wolfssl, __idf_esp_wolfssl, etc
|
||||
@@ -871,7 +1091,12 @@ if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
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}")
|
||||
if(IS_PLATFORMIO)
|
||||
message(STATUS "WARNING: CONFIG_WOLFSSL_CERTIFICATE_BUNDLE enabled but cannot be generated in PlatformmIO")
|
||||
else()
|
||||
message(STATUS "WARNING: CONFIG_WOLFSSL_CERTIFICATE_BUNDLE enabled but directory not found: ${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
endif()
|
||||
message(FATAL_ERROR "not detected")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -930,42 +1155,6 @@ endif()
|
||||
# end multiple component check
|
||||
|
||||
|
||||
#
|
||||
# LIBWOLFSSL_SAVE_INFO(VAR_OUPUT THIS_VAR VAR_RESULT)
|
||||
#
|
||||
# Save the THIS_VAR as a string in a macro called VAR_OUPUT
|
||||
#
|
||||
# VAR_OUPUT: the name of the macro to define
|
||||
# THIS_VAR: the OUTPUT_VARIABLE result from a execute_process()
|
||||
# VAR_RESULT: the RESULT_VARIABLE from a execute_process(); "0" if successful.
|
||||
#
|
||||
function ( LIBWOLFSSL_SAVE_INFO VAR_OUPUT THIS_VAR VAR_RESULT )
|
||||
# is the RESULT_VARIABLE output value 0? If so, IS_VALID_VALUE is true.
|
||||
string(COMPARE EQUAL "${VAR_RESULT}" "0" IS_VALID_VALUE)
|
||||
|
||||
# if we had a successful operation, save the THIS_VAR in VAR_OUPUT
|
||||
if(${IS_VALID_VALUE})
|
||||
# strip newline chars in THIS_VAR parameter and save in VAR_VALUE
|
||||
string(REPLACE "\n" "" VAR_VALUE ${THIS_VAR})
|
||||
|
||||
# we'll could percolate the value to the parent for possible later use
|
||||
# set(${VAR_OUPUT} ${VAR_VALUE} PARENT_SCOPE)
|
||||
|
||||
# but we're only using it here in this function
|
||||
set(${VAR_OUPUT} ${VAR_VALUE})
|
||||
|
||||
# we'll print what we found to the console
|
||||
message(STATUS "Found ${VAR_OUPUT}=${VAR_VALUE}")
|
||||
|
||||
# the interesting part is defining the VAR_OUPUT name a value to use in the app
|
||||
add_compile_definitions(${VAR_OUPUT}=\"${VAR_VALUE}\")
|
||||
else()
|
||||
# if we get here, check the execute_process command and parameters.
|
||||
message(STATUS "LIBWOLFSSL_SAVE_INFO encountered a non-zero VAR_RESULT")
|
||||
set(${VAR_OUPUT} "Unknown")
|
||||
endif()
|
||||
endfunction() # LIBWOLFSSL_SAVE_INFO
|
||||
|
||||
execute_process(
|
||||
COMMAND ${git_cmd} "rev-parse" "--is-inside-work-tree"
|
||||
OUTPUT_VARIABLE IS_GIT_REPO
|
||||
@@ -1049,6 +1238,14 @@ else()
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
endif()
|
||||
|
||||
# A single instance of potentially multiple cmake messages to send to app:
|
||||
message(STATUS "LIBWOLFSSL_CMAKE_OUTPUT: ${LIBWOLFSSL_CMAKE_OUTPUT}")
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_CMAKE_OUTPUT "${LIBWOLFSSL_CMAKE_OUTPUT}" "0")
|
||||
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h"
|
||||
"\n"
|
||||
"#endif\n" )
|
||||
|
||||
message(STATUS "************************************************************************************************")
|
||||
message(STATUS "wolfSSL component config complete!")
|
||||
message(STATUS "************************************************************************************************")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -274,10 +274,28 @@ menu "wolfSSL"
|
||||
bool "Do not use the default certificate bundle"
|
||||
endchoice
|
||||
|
||||
config WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
default n
|
||||
bool "Use alternate certificate bundle"
|
||||
help
|
||||
Typically only used for PlatformIO which cannot generate a certificate bundle at build time.
|
||||
Enable this option to specify a fixed wolfSSL certificate file path and file name.
|
||||
|
||||
config WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME
|
||||
depends on WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
string "Default certificate bundle alternate path and name"
|
||||
default "./certs/x509_crt_bundle_wolfssl"
|
||||
help
|
||||
Name of the default certificate bundle directory. Typically used only with PlatformIO.
|
||||
Reminder PlatformIO cannot generate a bundle from cmake python script call. Relative
|
||||
paths are with respect to root of this project.
|
||||
|
||||
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"
|
||||
@@ -401,24 +419,25 @@ menu "wolfSSL"
|
||||
when performance is critical. See also metrics for counting instances.
|
||||
|
||||
endmenu # wolfSSL Hardware Acceleration
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSL Experimental Options"
|
||||
menu "wolfSSL Post Quantum Kyber KEM PQ"
|
||||
|
||||
config ESP_WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
bool "Enable wolfSSL Experimental Settings"
|
||||
config ESP_WOLFSSL_ENABLE_MLKEM
|
||||
bool "Enable ML-KEM (Kyber Post Quantum)"
|
||||
default n
|
||||
help
|
||||
Enables experimental settings for wolfSSL. See documentation.
|
||||
bool "Enable wolfSSL ML-KEM"
|
||||
|
||||
config ESP_WOLFSSL_ENABLE_KYBER
|
||||
bool "Enable wolfSSL Kyber"
|
||||
config WOLFSSL_ENABLE_KYBER
|
||||
bool "Enable Kyber (Round 3)"
|
||||
default n
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
Enable old compatibility with Kyber Round 3 (enables experimental settings)
|
||||
|
||||
endmenu # wolfSSL Experimental Options
|
||||
endmenu # wolfSSL Post Quantum Kyber KEM PQ
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
@@ -429,12 +448,23 @@ menu "wolfSSL"
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
|
||||
config ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING
|
||||
bool "Suppress build-time warnings for main stack size"
|
||||
default n
|
||||
help
|
||||
Useful only when wolfSSL is running in main task. See FreeRTOS stack size for custom tasks.
|
||||
|
||||
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.
|
||||
|
||||
config ESP_WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
bool "Enable wolfSSL Experimental Settings"
|
||||
default n
|
||||
help
|
||||
Enables experimental settings for wolfSSL. See documentation.
|
||||
endmenu # wolfSSL Debug Options
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ Have a specific request or questions? We'd love to hear from you! Please contact
|
||||
|
||||
## 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.
|
||||
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use under the GPLv3 (or at your option any later version) or a standard commercial license. For our users who cannot use wolfSSL under GPLv3 (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
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -110,7 +110,7 @@
|
||||
/* 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
|
||||
|
||||
#define HAVE_HKDF
|
||||
#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: */
|
||||
@@ -209,18 +209,40 @@
|
||||
/* the code is older or does not have application name defined. */
|
||||
#endif /* Example wolfSSL Configuration app settings */
|
||||
|
||||
/* Experimental Kyber */
|
||||
#ifdef CONFIG_WOLFSSL_ENABLE_KYBER
|
||||
/* Optional MLKEM (Kyber Post Quantum) */
|
||||
/* ./configure --enable-mlkem */
|
||||
/* See Kconfig / menuconfig ESP_WOLFSSL_ENABLE_MLKEM */
|
||||
#ifdef CONFIG_ESP_WOLFSSL_ENABLE_MLKEM
|
||||
/* Kyber typically needs a minimum 10K stack */
|
||||
#define WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
#define WOLFSSL_HAVE_MLKEM
|
||||
#define WOLFSSL_WC_MLKEM
|
||||
#define WOLFSSL_SHA3
|
||||
#define WOLFSSL_SHAKE128
|
||||
#define WOLFSSL_SHAKE256
|
||||
|
||||
/* Old code points to keep compatibility with Kyber Round 3. */
|
||||
/* ./configure --enable-kyber=all --enable-experimental */
|
||||
#if defined(CONFIG_WOLFSSL_ENABLE_KYBER)
|
||||
#define WOLFSSL_MLKEM_KYBER
|
||||
#define WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
#endif
|
||||
|
||||
#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 WOLFSSL_NO_ML_KEM_1024
|
||||
#define WOLFSSL_NO_ML_KEM_768
|
||||
#define NO_SESSION_CACHE
|
||||
#else
|
||||
/* Only needed for older wolfssl versions, see mlkem.h */
|
||||
#define WOLFSSL_KYBER1024
|
||||
/* optional alternative sizes: */
|
||||
/* #define WOLFSSL_KYBER768 */
|
||||
/* #define WOLFSSL_KYBER512 */
|
||||
/* -- or disable a specific one: */
|
||||
/* #define WOLFSSL_NO_ML_KEM_1024 */
|
||||
/* #define WOLFSSL_NO_ML_KEM_768 */
|
||||
/* #define WOLFSSL_NO_ML_KEM_512 */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -532,7 +554,7 @@
|
||||
/* 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
|
||||
#define ESP_RSA_TIMEOUT_CNT 0xFF0000
|
||||
#endif
|
||||
|
||||
/* hash limit for test.c */
|
||||
@@ -560,8 +582,6 @@
|
||||
defined(WOLFSSL_SP_RISCV32)
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
|
||||
|
||||
#define HAVE_VERSION_EXTENDED_INFO
|
||||
/* #define HAVE_WC_INTROSPECTION */
|
||||
@@ -784,6 +804,15 @@
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
|
||||
/***** END CONFIG_IDF_TARGET_ESP32H2 *****/
|
||||
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
#define WOLFSSL_ESP32
|
||||
/* wolfSSL Hardware Acceleration not yet implemented */
|
||||
#define NO_ESP32_CRYPT
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_HASH
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_AES
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
|
||||
/***** END CONFIG_IDF_TARGET_ESP32P4 *****/
|
||||
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
#define WOLFSSL_ESP8266
|
||||
|
||||
@@ -824,13 +853,18 @@
|
||||
#ifndef NO_RSA
|
||||
#define ESP32_USE_RSA_PRIMITIVE
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE
|
||||
#ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE
|
||||
/* See idf.py menuconfig for stack warning settings */
|
||||
#if !defined(CONFIG_ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING)
|
||||
#if CONFIG_ESP_MAIN_TASK_STACK_SIZE < 10500
|
||||
#warning "RSA may be difficult with less than 10KB Stack "/
|
||||
#warning "RSA may be difficult with less than 10KB Stack"
|
||||
#endif
|
||||
#else
|
||||
/* Implement your own stack warning here */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
/* NOTE HW unreliable for small values! */
|
||||
/* threshold for performance adjustment for HW primitive use */
|
||||
/* X bits of G^X mod P greater than */
|
||||
@@ -927,6 +961,8 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define ATCA_WOLFSSL
|
||||
*/
|
||||
|
||||
/* optional SM4 Ciphers. See github.com/wolfSSL/wolfsm */
|
||||
|
||||
/***************************** Certificate Macros *****************************
|
||||
*
|
||||
* The section below defines macros used in typically all of the wolfSSL
|
||||
@@ -1018,9 +1054,14 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define WOLFSSL_BASE16
|
||||
#else
|
||||
#if defined(USE_CERT_BUFFERS_2048)
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#ifdef USE_CERT_BUFFERS_1024
|
||||
#error "USE_CERT_BUFFERS_1024 is already defined. Pick one."
|
||||
#endif
|
||||
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#define CTX_CA_CERT ca_cert_der_2048
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
|
||||
#define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
@@ -1040,9 +1081,14 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
|
||||
#elif defined(USE_CERT_BUFFERS_1024)
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#ifdef USE_CERT_BUFFERS_2048
|
||||
#error "USE_CERT_BUFFERS_2048 is already defined. Pick one."
|
||||
#endif
|
||||
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#define CTX_CA_CERT ca_cert_der_1024
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024
|
||||
#define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -65,11 +65,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE
|
||||
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
|
||||
@@ -95,12 +90,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE
|
||||
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
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -19,23 +19,62 @@
|
||||
#
|
||||
# cmake for wolfssl Espressif projects
|
||||
#
|
||||
# Version 5.7.2 Espressif ESP-IDF integration
|
||||
# Version 5.8.0 Espressif ESP-IDF + PlatformIO integration (2)
|
||||
#
|
||||
# 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)
|
||||
|
||||
# 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 ".")
|
||||
|
||||
# Optionally set your source to wolfSSL in your project CMakeLists.txt like this:
|
||||
# set(WOLFSSL_ROOT "c:/workspace/my_wolfssl" )
|
||||
|
||||
if ( "${WOLFSSL_ROOT}" STREQUAL "")
|
||||
set(WOLFSSL_ROOT "$ENV{WOLFSSL_ROOT}" )
|
||||
endif()
|
||||
|
||||
set(VERBOSE_COMPONENT_MESSAGES 1)
|
||||
|
||||
# Optional requires include:
|
||||
# set(THIS_ESP_TLS "esp-tls")
|
||||
set(THIS_ESP_TLS "")
|
||||
|
||||
# LIBWOLFSSL_CMAKE_OUTPUT can be printed at runtime
|
||||
set(LIBWOLFSSL_CMAKE_OUTPUT "")
|
||||
|
||||
|
||||
if(CMAKE_BUILD_EARLY_EXPANSION)
|
||||
message(STATUS "Skipping libwolfssl_output.h update during CMAKE_BUILD_EARLY_EXPANSION")
|
||||
else()
|
||||
# Initialize a new libwolfssl_output.h in the cmake build directory.
|
||||
if( EXISTS "${CMAKE_BINARY_DIR}/libwolfssl_output.h")
|
||||
# The next WRITE replaces a file.
|
||||
# This is here to remove any ambiguity on file removal & generation.
|
||||
file(REMOVE "${CMAKE_BINARY_DIR}/libwolfssl_output.h")
|
||||
endif()
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/libwolfssl_output.h"
|
||||
"/* libwolfssl_output.h generated by wolfssl component */\n"
|
||||
"#ifndef _LIBWOLFSSL_OUTPUT_H_\n"
|
||||
"\n"
|
||||
"#define _LIBWOLFSSL_OUTPUT_H_\n\n")
|
||||
endif()
|
||||
|
||||
# Append messages with:
|
||||
# LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_CMAKE_OUTPUT "${LIBWOLFSSL_CMAKE_OUTPUT}\n"message" "0")
|
||||
# See function: APPEND_LIBWOLFSSL_CMAKE_OUTPUT
|
||||
|
||||
# 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 )
|
||||
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)
|
||||
|
||||
@@ -55,6 +94,96 @@ function( IS_ESP_IDF_COMPONENT RESULT )
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# LIBWOLFSSL_SAVE_INFO(VAR_OUTPUT THIS_VAR VAR_RESULT)
|
||||
#
|
||||
# Save the THIS_VAR as a string in a macro called VAR_OUTPUT
|
||||
#
|
||||
# VAR_OUTPUT: the name of the macro to define
|
||||
# THIS_VAR: the OUTPUT_VARIABLE result from a execute_process()
|
||||
# VAR_RESULT: the RESULT_VARIABLE from a execute_process(); "0" if successful.
|
||||
#
|
||||
function ( LIBWOLFSSL_SAVE_INFO VAR_OUTPUT THIS_VAR VAR_RESULT )
|
||||
# is the RESULT_VARIABLE output value 0? If so, IS_VALID_VALUE is true.
|
||||
string(COMPARE EQUAL "${VAR_RESULT}" "0" IS_VALID_VALUE)
|
||||
|
||||
# if we had a successful operation, save the THIS_VAR in VAR_OUTPUT
|
||||
if(${IS_VALID_VALUE})
|
||||
|
||||
if(0)
|
||||
# Optional debug
|
||||
message(STATUS "Looking for LF in ${THIS_VAR}")
|
||||
endif()
|
||||
|
||||
# Check if the text to print in THIS_VAR is multi-line
|
||||
string(REPLACE "\n" ";" LINES "${THIS_VAR}")
|
||||
list(LENGTH LINES LINE_COUNT)
|
||||
|
||||
# Save var to "libwolfssl_output.h" header if multi-line, otherwise a simple compile def
|
||||
if(LINE_COUNT GREATER 1)
|
||||
message(STATUS "Setting HAVE_LIBWOLFSSL_OUTPUT_HEADER=1 for ${VAR_OUTPUT}")
|
||||
add_compile_definitions(HAVE_LIBWOLFSSL_OUTPUT_HEADER=1)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "#undef ${VAR_OUTPUT}\n")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "#define ${VAR_OUTPUT} \\\n")
|
||||
|
||||
# Split into lines
|
||||
string(REPLACE "\n" ";" LINES "${THIS_VAR}")
|
||||
foreach(LINE IN LISTS LINES)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "\"${LINE}\\n\" \\\n")
|
||||
endforeach()
|
||||
|
||||
# Final empty line to close the macro
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "\n")
|
||||
|
||||
message(STATUS "COMPONENT_LIB=${COMPONENT_LIB}")
|
||||
target_include_directories(${COMPONENT_LIB} PRIVATE "${CMAKE_BINARY_DIR}")
|
||||
else()
|
||||
message(STATUS "No HAS_LIBWOLFSSL_OUTPUT_HEADER")
|
||||
# We should not have any, but just to be sure:
|
||||
# Strip newline chars in THIS_VAR parameter and save in VAR_VALUE
|
||||
string(REPLACE "\n" "" VAR_VALUE "${THIS_VAR}")
|
||||
|
||||
# we'll could percolate the value to the parent for possible later use
|
||||
# set(${VAR_OUTPUT} ${VAR_VALUE} PARENT_SCOPE)
|
||||
|
||||
# but we're only using it here in this function
|
||||
set(${VAR_OUTPUT} ${VAR_VALUE})
|
||||
|
||||
# we'll print what we found to the console
|
||||
message(STATUS "Found ${VAR_OUTPUT}=${VAR_VALUE}")
|
||||
|
||||
# the interesting part is defining the VAR_OUTPUT name a value to use in the app
|
||||
add_compile_definitions(${VAR_OUTPUT}=\"${VAR_VALUE}\")
|
||||
|
||||
endif()
|
||||
else()
|
||||
# if we get here, check the execute_process command and parameters.
|
||||
message(STATUS "LIBWOLFSSL_SAVE_INFO encountered a non-zero VAR_RESULT")
|
||||
set(${VAR_OUTPUT} "Unknown")
|
||||
endif()
|
||||
|
||||
|
||||
endfunction() # LIBWOLFSSL_SAVE_INFO
|
||||
|
||||
#
|
||||
# APPEND_LIBWOLFSSL_CMAKE_OUTPUT(THIS_MESSAGE OUTPUT_VALUE)
|
||||
#
|
||||
# Append the text in THIS_MESSAGE to LIBWOLFSSL_CMAKE_OUTPUT.
|
||||
# String is available at runtime in app
|
||||
#
|
||||
|
||||
function( APPEND_LIBWOLFSSL_CMAKE_OUTPUT
|
||||
THIS_MESSAGE )
|
||||
# Normally, we'd simply print a message:
|
||||
message(STATUS "${THIS_MESSAGE}")
|
||||
|
||||
# But here we'll pass the entire LIBWOLFSSL_CMAKE_OUTPUT as a string definition to the app
|
||||
set(LIBWOLFSSL_CMAKE_OUTPUT "${LIBWOLFSSL_CMAKE_OUTPUT}\n${THIS_MESSAGE}" PARENT_SCOPE)
|
||||
|
||||
# We don't call LIBWOLFSSL_SAVE_INFO here as it would add duplicate definitions
|
||||
# See single instance at the end of this file.
|
||||
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 )
|
||||
@@ -77,20 +206,6 @@ else()
|
||||
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
|
||||
|
||||
# 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()
|
||||
@@ -185,7 +300,9 @@ endif()
|
||||
# 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)
|
||||
function( ENVIRONMENT_VAR_TO_MACRO
|
||||
EVARPARAM # Environment variable parameter name
|
||||
EVARVALUE) # Environment variable value
|
||||
# If the EVARPARAM environment variable name is set to EVARVALUE,
|
||||
# set the compiler flag definition to enable CSV output.
|
||||
if ( "$ENV{${EVARPARAM}}" STREQUAL "${EVARVALUE}")
|
||||
@@ -217,7 +334,8 @@ endfunction()
|
||||
# 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
|
||||
function( IS_WOLFSSL_SOURCE
|
||||
DIRECTORY_PARAMETER
|
||||
RESULT )
|
||||
if (EXISTS "${DIRECTORY_PARAMETER}/wolfcrypt/src")
|
||||
set(${RESULT} "${DIRECTORY_PARAMETER}" PARENT_SCOPE)
|
||||
@@ -233,7 +351,8 @@ endfunction()
|
||||
# Example usage:
|
||||
# FIND_WOLFSSL_DIRECTORY(WOLFSSL_ROOT)
|
||||
# *********************************************************************************************
|
||||
function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
function( FIND_WOLFSSL_DIRECTORY
|
||||
OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
message(STATUS "Starting FIND_WOLFSSL_DIRECTORY: ${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
|
||||
if ( "${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}" STREQUAL "" )
|
||||
@@ -673,9 +792,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")
|
||||
|
||||
if(WOLFSSL_ROOT)
|
||||
string(REPLACE "\\" "/" WOLFSSL_ROOT ${WOLFSSL_ROOT})
|
||||
endif()
|
||||
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}")
|
||||
@@ -789,16 +908,35 @@ if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
AND NOT CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
|
||||
AND NOT ("${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266")
|
||||
)
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("wolfSSL Certificate Bundles Enabled")
|
||||
|
||||
if (CMAKE_BUILD_EARLY_EXPANSION)
|
||||
message(ERROR "Bundle Cert initialization must occur during CMAKE_BUILD_EARLY_EXPANSION")
|
||||
message(FATAL_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")
|
||||
message(FATAL_ERROR "Certificate bundles need a value for WOLFSSL_ROOT")
|
||||
endif()
|
||||
|
||||
# Cert bundle in wolfSSL source unless otherwise specified later
|
||||
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}")
|
||||
|
||||
if(DEFINED ENV{PLATFORMIO_PROJECT_DIR})
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Detected PlatformIO")
|
||||
set(IS_PLATFORMIO 1)
|
||||
else()
|
||||
# Some environments may not have environment variable, so double check if we are in .pio
|
||||
if("${CMAKE_BINARY_DIR}" MATCHES "/\\.pio/")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Detected PlatformIO via CMAKE_BINARY_DIR")
|
||||
set(IS_PLATFORMIO 1)
|
||||
else()
|
||||
set(IS_PLATFORMIO 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EXISTS "${WOLFSSL_ESP_CRT_BUNDLE_DIR}" OR IS_PLATFORMIO)
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Special processing for wolfSSL Certificate Bundles")
|
||||
set(bundle_name "x509_crt_bundle_wolfssl")
|
||||
|
||||
# For now the certs are in the same directory
|
||||
@@ -824,9 +962,9 @@ if( CONFIG_WOLFSSL_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}")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Using a custom wolfSSL bundle path: ${custom_bundle_path}")
|
||||
else()
|
||||
message(STATUS "Not using a custom wolfSSL bundle path.")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Not using a custom wolfSSL bundle path")
|
||||
endif()
|
||||
list(APPEND args --input ${crt_paths} -q)
|
||||
|
||||
@@ -843,25 +981,107 @@ if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
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 (IS_PLATFORMIO)
|
||||
# PlatformIO cannot generate a Certificate Bundle at build time
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("PlatformIO is using a predefined bundle rather than generating one")
|
||||
|
||||
if(EXISTS "${crt_bundle}")
|
||||
message(STATUS "Bundle file exists from prior build: ${crt_bundle}")
|
||||
if ( "${WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}" STREQUAL "" OR "$(WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE)" STREQUAL "" OR "$(WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE)" STREQUAL "n")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Alternate Certificate Bundle Path and Name not enabled, assuming [project]/certs/x509_crt_bundle_wolfssl")
|
||||
# Reminder this CMakeLists.txt should be in [project]/components/wolfssl, so ./certs is two directories up
|
||||
set(crt_bundle_option "../../certs/x509_crt_bundle_wolfssl")
|
||||
else()
|
||||
string(SUBSTRING "${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}" 0 2 CERT_PATH_FIRST_TWO)
|
||||
if(CERT_PATH_FIRST_TWO STREQUAL "./" OR CERT_PATH_FIRST_TWO STREQUAL ".\\")
|
||||
set(IS_CERT_BUNDLE_RELATIVE_PATH 1)
|
||||
message(STATUS "Alternate Cert Path is relative to project.")
|
||||
else()
|
||||
set(IS_CERT_BUNDLE_RELATIVE_PATH 0)
|
||||
message(STATUS "Alternate Cert Path is not relative to project.")
|
||||
endif()
|
||||
|
||||
# The cert bundle is not a standard cert, so we con't add to the crt_paths.
|
||||
# Still, we may have an alternate location, particulatly needed for PlatformIO:
|
||||
if(IS_CERT_BUNDLE_RELATIVE_PATH)
|
||||
message(STATUS "CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME = ${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
message(STATUS "Relative alternate_bundle_path: ${alternate_bundle_path}")
|
||||
|
||||
SET(crt_bundle_option "${CMAKE_SOURCE_DIR}/${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
else()
|
||||
message(STATUS "alternate_bundle_path: ${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
message(STATUS "Not using an alternate wolfSSL bundle file.")
|
||||
SET(crt_bundle_option "${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Clean the path, removing any extra "./" etc.
|
||||
# Number of spaces in message strings is to align path value outputs
|
||||
message(STATUS "This crt_bundle_option value: ${crt_bundle_option}")
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.19")
|
||||
message("WARNING: CMake version is ${CMAKE_VERSION} ? file(REAL_PATH ...) is not supported. Falling back to manual path normalization.")
|
||||
# optional fallback logic here
|
||||
get_filename_component(crt_bundle_file_component "${crt_bundle_option}" ABSOLUTE)
|
||||
message(STATUS "Interim crt_bundle_file_component: ${crt_bundle_file_component}")
|
||||
file(TO_CMAKE_PATH "${crt_bundle_file_component}" crt_bundle)
|
||||
message(STATUS "TO_CMAKE_PATH crt_bundle result: ${crt_bundle}")
|
||||
# set(crt_bundle "C:/workspace/pio_wolfssl-upstream-test-wolfssl_cert_bundle/esp32-c6/certs/x509_crt_bundle_wolfssl")
|
||||
else()
|
||||
file(REAL_PATH "${crt_bundle_option}" crt_bundle)
|
||||
endif()
|
||||
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Certificate Bundle: ${crt_bundle}")
|
||||
message(STATUS "This cleaned crt_bundle value: ${crt_bundle}")
|
||||
message(STATUS "=============================================================================================================")
|
||||
message(STATUS "=============================================================================================================")
|
||||
message(STATUS "Reminder: platformio.ini will need this value set for board_build.embed_files =")
|
||||
message(STATUS "${crt_bundle}")
|
||||
message(STATUS "=============================================================================================================")
|
||||
message(STATUS "=============================================================================================================")
|
||||
|
||||
# e.g. SET(crt_bundle "C:/workspace/pio_wolfssl/esp32-c6/certs/x509_crt_bundle_wolfssl")
|
||||
#
|
||||
|
||||
# Normally x509_crt_bundle_wolfssl built by python script called from cmake.
|
||||
# See https://github.com/wolfSSL/wolfssl/blob/master/wolfcrypt/src/port/Espressif/esp_crt_bundle/gen_crt_bundle.py
|
||||
# Reminder ESP-IDF scripts are NOT called from CMake for PlatformIO builds.
|
||||
#
|
||||
# The easiest way to generate the default file is to build with ESP-IDF and copy the files to [project]/main
|
||||
#
|
||||
# for example:
|
||||
# build\VisualGDB\Debug\x509_crt_bundle_wolfssl.s
|
||||
# build\VisualGDB\Debug\esp-idf\wolfssl\x509_crt_bundle_wolfssl
|
||||
#
|
||||
message(STATUS "Confirming cert bundle exists...")
|
||||
if(EXISTS "${crt_bundle}")
|
||||
# Number of spaces is to align path value outputs
|
||||
message(STATUS "Bundle file found for PlatformIO: ${crt_bundle}")
|
||||
else()
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("ERROR: Failed to find bundle file found for PlatformIO: ${crt_bundle}")
|
||||
message(STATUS "Check for entry in platformio.ini: board_build.embed_files = certs/x509_crt_bundle_wolfssl ")
|
||||
message(FATAL_ERROR "WOLFSSL_CERTIFICATE_BUNDLE is enabled for PlatformIO, but predefined file not found: ${crt_bundle}")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Bundle file expected during next build: ${crt_bundle}")
|
||||
# APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Generate bundle: ${GENERATE_CERT_BUNDLEPY} ${args}")
|
||||
# Not PlatformIO
|
||||
# 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}")
|
||||
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 ${crt_bundle})
|
||||
|
||||
add_custom_target(custom_wolfssl_bundle DEPENDS ${cert_bundle})
|
||||
|
||||
# the wolfSSL crtificate bundle is baked into wolfSSL
|
||||
# the wolfSSL certificate bundle is baked into wolfSSL
|
||||
add_dependencies(${COMPONENT_LIB} custom_wolfssl_bundle)
|
||||
|
||||
# COMPONENT_LIB may vary: __idf_wolfssl, __idf_esp_wolfssl, etc
|
||||
@@ -871,7 +1091,12 @@ if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
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}")
|
||||
if(IS_PLATFORMIO)
|
||||
message(STATUS "WARNING: CONFIG_WOLFSSL_CERTIFICATE_BUNDLE enabled but cannot be generated in PlatformmIO")
|
||||
else()
|
||||
message(STATUS "WARNING: CONFIG_WOLFSSL_CERTIFICATE_BUNDLE enabled but directory not found: ${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
endif()
|
||||
message(FATAL_ERROR "not detected")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -930,42 +1155,6 @@ endif()
|
||||
# end multiple component check
|
||||
|
||||
|
||||
#
|
||||
# LIBWOLFSSL_SAVE_INFO(VAR_OUPUT THIS_VAR VAR_RESULT)
|
||||
#
|
||||
# Save the THIS_VAR as a string in a macro called VAR_OUPUT
|
||||
#
|
||||
# VAR_OUPUT: the name of the macro to define
|
||||
# THIS_VAR: the OUTPUT_VARIABLE result from a execute_process()
|
||||
# VAR_RESULT: the RESULT_VARIABLE from a execute_process(); "0" if successful.
|
||||
#
|
||||
function ( LIBWOLFSSL_SAVE_INFO VAR_OUPUT THIS_VAR VAR_RESULT )
|
||||
# is the RESULT_VARIABLE output value 0? If so, IS_VALID_VALUE is true.
|
||||
string(COMPARE EQUAL "${VAR_RESULT}" "0" IS_VALID_VALUE)
|
||||
|
||||
# if we had a successful operation, save the THIS_VAR in VAR_OUPUT
|
||||
if(${IS_VALID_VALUE})
|
||||
# strip newline chars in THIS_VAR parameter and save in VAR_VALUE
|
||||
string(REPLACE "\n" "" VAR_VALUE ${THIS_VAR})
|
||||
|
||||
# we'll could percolate the value to the parent for possible later use
|
||||
# set(${VAR_OUPUT} ${VAR_VALUE} PARENT_SCOPE)
|
||||
|
||||
# but we're only using it here in this function
|
||||
set(${VAR_OUPUT} ${VAR_VALUE})
|
||||
|
||||
# we'll print what we found to the console
|
||||
message(STATUS "Found ${VAR_OUPUT}=${VAR_VALUE}")
|
||||
|
||||
# the interesting part is defining the VAR_OUPUT name a value to use in the app
|
||||
add_compile_definitions(${VAR_OUPUT}=\"${VAR_VALUE}\")
|
||||
else()
|
||||
# if we get here, check the execute_process command and parameters.
|
||||
message(STATUS "LIBWOLFSSL_SAVE_INFO encountered a non-zero VAR_RESULT")
|
||||
set(${VAR_OUPUT} "Unknown")
|
||||
endif()
|
||||
endfunction() # LIBWOLFSSL_SAVE_INFO
|
||||
|
||||
execute_process(
|
||||
COMMAND ${git_cmd} "rev-parse" "--is-inside-work-tree"
|
||||
OUTPUT_VARIABLE IS_GIT_REPO
|
||||
@@ -1049,6 +1238,14 @@ else()
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
endif()
|
||||
|
||||
# A single instance of potentially multiple cmake messages to send to app:
|
||||
message(STATUS "LIBWOLFSSL_CMAKE_OUTPUT: ${LIBWOLFSSL_CMAKE_OUTPUT}")
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_CMAKE_OUTPUT "${LIBWOLFSSL_CMAKE_OUTPUT}" "0")
|
||||
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h"
|
||||
"\n"
|
||||
"#endif\n" )
|
||||
|
||||
message(STATUS "************************************************************************************************")
|
||||
message(STATUS "wolfSSL component config complete!")
|
||||
message(STATUS "************************************************************************************************")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -274,10 +274,28 @@ menu "wolfSSL"
|
||||
bool "Do not use the default certificate bundle"
|
||||
endchoice
|
||||
|
||||
config WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
default n
|
||||
bool "Use alternate certificate bundle"
|
||||
help
|
||||
Typically only used for PlatformIO which cannot generate a certificate bundle at build time.
|
||||
Enable this option to specify a fixed wolfSSL certificate file path and file name.
|
||||
|
||||
config WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME
|
||||
depends on WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
string "Default certificate bundle alternate path and name"
|
||||
default "./certs/x509_crt_bundle_wolfssl"
|
||||
help
|
||||
Name of the default certificate bundle directory. Typically used only with PlatformIO.
|
||||
Reminder PlatformIO cannot generate a bundle from cmake python script call. Relative
|
||||
paths are with respect to root of this project.
|
||||
|
||||
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"
|
||||
@@ -401,24 +419,25 @@ menu "wolfSSL"
|
||||
when performance is critical. See also metrics for counting instances.
|
||||
|
||||
endmenu # wolfSSL Hardware Acceleration
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSL Experimental Options"
|
||||
menu "wolfSSL Post Quantum Kyber KEM PQ"
|
||||
|
||||
config ESP_WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
bool "Enable wolfSSL Experimental Settings"
|
||||
config ESP_WOLFSSL_ENABLE_MLKEM
|
||||
bool "Enable ML-KEM (Kyber Post Quantum)"
|
||||
default n
|
||||
help
|
||||
Enables experimental settings for wolfSSL. See documentation.
|
||||
bool "Enable wolfSSL ML-KEM"
|
||||
|
||||
config ESP_WOLFSSL_ENABLE_KYBER
|
||||
bool "Enable wolfSSL Kyber"
|
||||
config WOLFSSL_ENABLE_KYBER
|
||||
bool "Enable Kyber (Round 3)"
|
||||
default n
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
Enable old compatibility with Kyber Round 3 (enables experimental settings)
|
||||
|
||||
endmenu # wolfSSL Experimental Options
|
||||
endmenu # wolfSSL Post Quantum Kyber KEM PQ
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
@@ -429,12 +448,23 @@ menu "wolfSSL"
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
|
||||
config ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING
|
||||
bool "Suppress build-time warnings for main stack size"
|
||||
default n
|
||||
help
|
||||
Useful only when wolfSSL is running in main task. See FreeRTOS stack size for custom tasks.
|
||||
|
||||
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.
|
||||
|
||||
config ESP_WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
bool "Enable wolfSSL Experimental Settings"
|
||||
default n
|
||||
help
|
||||
Enables experimental settings for wolfSSL. See documentation.
|
||||
endmenu # wolfSSL Debug Options
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ Have a specific request or questions? We'd love to hear from you! Please contact
|
||||
|
||||
## 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.
|
||||
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use under the GPLv3 (or at your option any later version) or a standard commercial license. For our users who cannot use wolfSSL under GPLv3 (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
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -110,7 +110,7 @@
|
||||
/* 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
|
||||
|
||||
#define HAVE_HKDF
|
||||
#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: */
|
||||
@@ -209,18 +209,40 @@
|
||||
/* the code is older or does not have application name defined. */
|
||||
#endif /* Example wolfSSL Configuration app settings */
|
||||
|
||||
/* Experimental Kyber */
|
||||
#ifdef CONFIG_WOLFSSL_ENABLE_KYBER
|
||||
/* Optional MLKEM (Kyber Post Quantum) */
|
||||
/* ./configure --enable-mlkem */
|
||||
/* See Kconfig / menuconfig ESP_WOLFSSL_ENABLE_MLKEM */
|
||||
#ifdef CONFIG_ESP_WOLFSSL_ENABLE_MLKEM
|
||||
/* Kyber typically needs a minimum 10K stack */
|
||||
#define WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
#define WOLFSSL_HAVE_MLKEM
|
||||
#define WOLFSSL_WC_MLKEM
|
||||
#define WOLFSSL_SHA3
|
||||
#define WOLFSSL_SHAKE128
|
||||
#define WOLFSSL_SHAKE256
|
||||
|
||||
/* Old code points to keep compatibility with Kyber Round 3. */
|
||||
/* ./configure --enable-kyber=all --enable-experimental */
|
||||
#if defined(CONFIG_WOLFSSL_ENABLE_KYBER)
|
||||
#define WOLFSSL_MLKEM_KYBER
|
||||
#define WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
#endif
|
||||
|
||||
#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 WOLFSSL_NO_ML_KEM_1024
|
||||
#define WOLFSSL_NO_ML_KEM_768
|
||||
#define NO_SESSION_CACHE
|
||||
#else
|
||||
/* Only needed for older wolfssl versions, see mlkem.h */
|
||||
#define WOLFSSL_KYBER1024
|
||||
/* optional alternative sizes: */
|
||||
/* #define WOLFSSL_KYBER768 */
|
||||
/* #define WOLFSSL_KYBER512 */
|
||||
/* -- or disable a specific one: */
|
||||
/* #define WOLFSSL_NO_ML_KEM_1024 */
|
||||
/* #define WOLFSSL_NO_ML_KEM_768 */
|
||||
/* #define WOLFSSL_NO_ML_KEM_512 */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -532,7 +554,7 @@
|
||||
/* 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
|
||||
#define ESP_RSA_TIMEOUT_CNT 0xFF0000
|
||||
#endif
|
||||
|
||||
/* hash limit for test.c */
|
||||
@@ -560,8 +582,6 @@
|
||||
defined(WOLFSSL_SP_RISCV32)
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
|
||||
|
||||
#define HAVE_VERSION_EXTENDED_INFO
|
||||
/* #define HAVE_WC_INTROSPECTION */
|
||||
@@ -784,6 +804,15 @@
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
|
||||
/***** END CONFIG_IDF_TARGET_ESP32H2 *****/
|
||||
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
#define WOLFSSL_ESP32
|
||||
/* wolfSSL Hardware Acceleration not yet implemented */
|
||||
#define NO_ESP32_CRYPT
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_HASH
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_AES
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
|
||||
/***** END CONFIG_IDF_TARGET_ESP32P4 *****/
|
||||
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
#define WOLFSSL_ESP8266
|
||||
|
||||
@@ -824,13 +853,18 @@
|
||||
#ifndef NO_RSA
|
||||
#define ESP32_USE_RSA_PRIMITIVE
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE
|
||||
#ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE
|
||||
/* See idf.py menuconfig for stack warning settings */
|
||||
#if !defined(CONFIG_ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING)
|
||||
#if CONFIG_ESP_MAIN_TASK_STACK_SIZE < 10500
|
||||
#warning "RSA may be difficult with less than 10KB Stack "/
|
||||
#warning "RSA may be difficult with less than 10KB Stack"
|
||||
#endif
|
||||
#else
|
||||
/* Implement your own stack warning here */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
/* NOTE HW unreliable for small values! */
|
||||
/* threshold for performance adjustment for HW primitive use */
|
||||
/* X bits of G^X mod P greater than */
|
||||
@@ -927,6 +961,8 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define ATCA_WOLFSSL
|
||||
*/
|
||||
|
||||
/* optional SM4 Ciphers. See github.com/wolfSSL/wolfsm */
|
||||
|
||||
/***************************** Certificate Macros *****************************
|
||||
*
|
||||
* The section below defines macros used in typically all of the wolfSSL
|
||||
@@ -1018,9 +1054,14 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define WOLFSSL_BASE16
|
||||
#else
|
||||
#if defined(USE_CERT_BUFFERS_2048)
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#ifdef USE_CERT_BUFFERS_1024
|
||||
#error "USE_CERT_BUFFERS_1024 is already defined. Pick one."
|
||||
#endif
|
||||
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#define CTX_CA_CERT ca_cert_der_2048
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
|
||||
#define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
@@ -1040,9 +1081,14 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
|
||||
#elif defined(USE_CERT_BUFFERS_1024)
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#ifdef USE_CERT_BUFFERS_2048
|
||||
#error "USE_CERT_BUFFERS_2048 is already defined. Pick one."
|
||||
#endif
|
||||
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#define CTX_CA_CERT ca_cert_der_1024
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024
|
||||
#define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
|
||||
@@ -1,5 +1,102 @@
|
||||
# Kconfig main
|
||||
#
|
||||
# Copyright (C) 2006-2025 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 3 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 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 Hello 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_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_EXAMPLE_NAME_NONE
|
||||
bool "Other"
|
||||
help
|
||||
A specific example app is not defined.
|
||||
|
||||
endchoice
|
||||
|
||||
config BENCH_ARGV
|
||||
string "Arguments for benchmark test"
|
||||
default "-lng 0"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Set the known example app config to template example (see user_settings.h)
|
||||
CONFIG_WOLFSSL_EXAMPLE_NAME_WOLFSSL_BENCHMARK=y
|
||||
CONFIG_WOLFSSL_EXAMPLE_NAME_BENCHMARK=y
|
||||
|
||||
# CONFIG_EXAMPLE_WIFI_SSID="myssid"
|
||||
# CONFIG_EXAMPLE_WIFI_PASSWORD="mypassword"
|
||||
|
||||
@@ -14,7 +14,6 @@ else()
|
||||
add_compile_definitions(WOLFSSL_ESP_NO_WATCHDOG=1)
|
||||
endif()
|
||||
|
||||
|
||||
# The wolfSSL CMake file should be able to find the source code.
|
||||
# Otherwise, assign an environment variable or set it here:
|
||||
#
|
||||
@@ -129,7 +128,7 @@ endif()
|
||||
# an unintuitive error about Unknown CMake command "esptool_py_flash_project_args".
|
||||
|
||||
if(0)
|
||||
message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include")
|
||||
message(STATUS "Begin optional PROTOCOL_EXAMPLES_DIR include")
|
||||
# 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)
|
||||
|
||||
@@ -140,7 +139,7 @@ if(0)
|
||||
else()
|
||||
message(STATUS "NOT FOUND: PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}")
|
||||
endif()
|
||||
message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include")
|
||||
message(STATUS "End optional PROTOCOL_EXAMPLES_DIR include")
|
||||
endif()
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -19,23 +19,62 @@
|
||||
#
|
||||
# cmake for wolfssl Espressif projects
|
||||
#
|
||||
# Version 5.7.2 Espressif ESP-IDF integration
|
||||
# Version 5.8.0 Espressif ESP-IDF + PlatformIO integration (2)
|
||||
#
|
||||
# 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)
|
||||
|
||||
# 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 ".")
|
||||
|
||||
# Optionally set your source to wolfSSL in your project CMakeLists.txt like this:
|
||||
# set(WOLFSSL_ROOT "c:/workspace/my_wolfssl" )
|
||||
|
||||
if ( "${WOLFSSL_ROOT}" STREQUAL "")
|
||||
set(WOLFSSL_ROOT "$ENV{WOLFSSL_ROOT}" )
|
||||
endif()
|
||||
|
||||
set(VERBOSE_COMPONENT_MESSAGES 1)
|
||||
|
||||
# Optional requires include:
|
||||
# set(THIS_ESP_TLS "esp-tls")
|
||||
set(THIS_ESP_TLS "")
|
||||
|
||||
# LIBWOLFSSL_CMAKE_OUTPUT can be printed at runtime
|
||||
set(LIBWOLFSSL_CMAKE_OUTPUT "")
|
||||
|
||||
|
||||
if(CMAKE_BUILD_EARLY_EXPANSION)
|
||||
message(STATUS "Skipping libwolfssl_output.h update during CMAKE_BUILD_EARLY_EXPANSION")
|
||||
else()
|
||||
# Initialize a new libwolfssl_output.h in the cmake build directory.
|
||||
if( EXISTS "${CMAKE_BINARY_DIR}/libwolfssl_output.h")
|
||||
# The next WRITE replaces a file.
|
||||
# This is here to remove any ambiguity on file removal & generation.
|
||||
file(REMOVE "${CMAKE_BINARY_DIR}/libwolfssl_output.h")
|
||||
endif()
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/libwolfssl_output.h"
|
||||
"/* libwolfssl_output.h generated by wolfssl component */\n"
|
||||
"#ifndef _LIBWOLFSSL_OUTPUT_H_\n"
|
||||
"\n"
|
||||
"#define _LIBWOLFSSL_OUTPUT_H_\n\n")
|
||||
endif()
|
||||
|
||||
# Append messages with:
|
||||
# LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_CMAKE_OUTPUT "${LIBWOLFSSL_CMAKE_OUTPUT}\n"message" "0")
|
||||
# See function: APPEND_LIBWOLFSSL_CMAKE_OUTPUT
|
||||
|
||||
# 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 )
|
||||
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)
|
||||
|
||||
@@ -55,6 +94,96 @@ function( IS_ESP_IDF_COMPONENT RESULT )
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# LIBWOLFSSL_SAVE_INFO(VAR_OUTPUT THIS_VAR VAR_RESULT)
|
||||
#
|
||||
# Save the THIS_VAR as a string in a macro called VAR_OUTPUT
|
||||
#
|
||||
# VAR_OUTPUT: the name of the macro to define
|
||||
# THIS_VAR: the OUTPUT_VARIABLE result from a execute_process()
|
||||
# VAR_RESULT: the RESULT_VARIABLE from a execute_process(); "0" if successful.
|
||||
#
|
||||
function ( LIBWOLFSSL_SAVE_INFO VAR_OUTPUT THIS_VAR VAR_RESULT )
|
||||
# is the RESULT_VARIABLE output value 0? If so, IS_VALID_VALUE is true.
|
||||
string(COMPARE EQUAL "${VAR_RESULT}" "0" IS_VALID_VALUE)
|
||||
|
||||
# if we had a successful operation, save the THIS_VAR in VAR_OUTPUT
|
||||
if(${IS_VALID_VALUE})
|
||||
|
||||
if(0)
|
||||
# Optional debug
|
||||
message(STATUS "Looking for LF in ${THIS_VAR}")
|
||||
endif()
|
||||
|
||||
# Check if the text to print in THIS_VAR is multi-line
|
||||
string(REPLACE "\n" ";" LINES "${THIS_VAR}")
|
||||
list(LENGTH LINES LINE_COUNT)
|
||||
|
||||
# Save var to "libwolfssl_output.h" header if multi-line, otherwise a simple compile def
|
||||
if(LINE_COUNT GREATER 1)
|
||||
message(STATUS "Setting HAVE_LIBWOLFSSL_OUTPUT_HEADER=1 for ${VAR_OUTPUT}")
|
||||
add_compile_definitions(HAVE_LIBWOLFSSL_OUTPUT_HEADER=1)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "#undef ${VAR_OUTPUT}\n")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "#define ${VAR_OUTPUT} \\\n")
|
||||
|
||||
# Split into lines
|
||||
string(REPLACE "\n" ";" LINES "${THIS_VAR}")
|
||||
foreach(LINE IN LISTS LINES)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "\"${LINE}\\n\" \\\n")
|
||||
endforeach()
|
||||
|
||||
# Final empty line to close the macro
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h" "\n")
|
||||
|
||||
message(STATUS "COMPONENT_LIB=${COMPONENT_LIB}")
|
||||
target_include_directories(${COMPONENT_LIB} PRIVATE "${CMAKE_BINARY_DIR}")
|
||||
else()
|
||||
message(STATUS "No HAS_LIBWOLFSSL_OUTPUT_HEADER")
|
||||
# We should not have any, but just to be sure:
|
||||
# Strip newline chars in THIS_VAR parameter and save in VAR_VALUE
|
||||
string(REPLACE "\n" "" VAR_VALUE "${THIS_VAR}")
|
||||
|
||||
# we'll could percolate the value to the parent for possible later use
|
||||
# set(${VAR_OUTPUT} ${VAR_VALUE} PARENT_SCOPE)
|
||||
|
||||
# but we're only using it here in this function
|
||||
set(${VAR_OUTPUT} ${VAR_VALUE})
|
||||
|
||||
# we'll print what we found to the console
|
||||
message(STATUS "Found ${VAR_OUTPUT}=${VAR_VALUE}")
|
||||
|
||||
# the interesting part is defining the VAR_OUTPUT name a value to use in the app
|
||||
add_compile_definitions(${VAR_OUTPUT}=\"${VAR_VALUE}\")
|
||||
|
||||
endif()
|
||||
else()
|
||||
# if we get here, check the execute_process command and parameters.
|
||||
message(STATUS "LIBWOLFSSL_SAVE_INFO encountered a non-zero VAR_RESULT")
|
||||
set(${VAR_OUTPUT} "Unknown")
|
||||
endif()
|
||||
|
||||
|
||||
endfunction() # LIBWOLFSSL_SAVE_INFO
|
||||
|
||||
#
|
||||
# APPEND_LIBWOLFSSL_CMAKE_OUTPUT(THIS_MESSAGE OUTPUT_VALUE)
|
||||
#
|
||||
# Append the text in THIS_MESSAGE to LIBWOLFSSL_CMAKE_OUTPUT.
|
||||
# String is available at runtime in app
|
||||
#
|
||||
|
||||
function( APPEND_LIBWOLFSSL_CMAKE_OUTPUT
|
||||
THIS_MESSAGE )
|
||||
# Normally, we'd simply print a message:
|
||||
message(STATUS "${THIS_MESSAGE}")
|
||||
|
||||
# But here we'll pass the entire LIBWOLFSSL_CMAKE_OUTPUT as a string definition to the app
|
||||
set(LIBWOLFSSL_CMAKE_OUTPUT "${LIBWOLFSSL_CMAKE_OUTPUT}\n${THIS_MESSAGE}" PARENT_SCOPE)
|
||||
|
||||
# We don't call LIBWOLFSSL_SAVE_INFO here as it would add duplicate definitions
|
||||
# See single instance at the end of this file.
|
||||
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 )
|
||||
@@ -77,20 +206,6 @@ else()
|
||||
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
|
||||
|
||||
# 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()
|
||||
@@ -185,7 +300,9 @@ endif()
|
||||
# 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)
|
||||
function( ENVIRONMENT_VAR_TO_MACRO
|
||||
EVARPARAM # Environment variable parameter name
|
||||
EVARVALUE) # Environment variable value
|
||||
# If the EVARPARAM environment variable name is set to EVARVALUE,
|
||||
# set the compiler flag definition to enable CSV output.
|
||||
if ( "$ENV{${EVARPARAM}}" STREQUAL "${EVARVALUE}")
|
||||
@@ -217,7 +334,8 @@ endfunction()
|
||||
# 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
|
||||
function( IS_WOLFSSL_SOURCE
|
||||
DIRECTORY_PARAMETER
|
||||
RESULT )
|
||||
if (EXISTS "${DIRECTORY_PARAMETER}/wolfcrypt/src")
|
||||
set(${RESULT} "${DIRECTORY_PARAMETER}" PARENT_SCOPE)
|
||||
@@ -233,7 +351,8 @@ endfunction()
|
||||
# Example usage:
|
||||
# FIND_WOLFSSL_DIRECTORY(WOLFSSL_ROOT)
|
||||
# *********************************************************************************************
|
||||
function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
function( FIND_WOLFSSL_DIRECTORY
|
||||
OUTPUT_FOUND_WOLFSSL_DIRECTORY)
|
||||
message(STATUS "Starting FIND_WOLFSSL_DIRECTORY: ${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}")
|
||||
|
||||
if ( "${${OUTPUT_FOUND_WOLFSSL_DIRECTORY}}" STREQUAL "" )
|
||||
@@ -673,9 +792,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")
|
||||
|
||||
if(WOLFSSL_ROOT)
|
||||
string(REPLACE "\\" "/" WOLFSSL_ROOT ${WOLFSSL_ROOT})
|
||||
endif()
|
||||
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}")
|
||||
@@ -789,16 +908,35 @@ if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
AND NOT CONFIG_WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
|
||||
AND NOT ("${CONFIG_TARGET_PLATFORM}" STREQUAL "esp8266")
|
||||
)
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("wolfSSL Certificate Bundles Enabled")
|
||||
|
||||
if (CMAKE_BUILD_EARLY_EXPANSION)
|
||||
message(ERROR "Bundle Cert initialization must occur during CMAKE_BUILD_EARLY_EXPANSION")
|
||||
message(FATAL_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")
|
||||
message(FATAL_ERROR "Certificate bundles need a value for WOLFSSL_ROOT")
|
||||
endif()
|
||||
|
||||
# Cert bundle in wolfSSL source unless otherwise specified later
|
||||
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}")
|
||||
|
||||
if(DEFINED ENV{PLATFORMIO_PROJECT_DIR})
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Detected PlatformIO")
|
||||
set(IS_PLATFORMIO 1)
|
||||
else()
|
||||
# Some environments may not have environment variable, so double check if we are in .pio
|
||||
if("${CMAKE_BINARY_DIR}" MATCHES "/\\.pio/")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Detected PlatformIO via CMAKE_BINARY_DIR")
|
||||
set(IS_PLATFORMIO 1)
|
||||
else()
|
||||
set(IS_PLATFORMIO 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EXISTS "${WOLFSSL_ESP_CRT_BUNDLE_DIR}" OR IS_PLATFORMIO)
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Special processing for wolfSSL Certificate Bundles")
|
||||
set(bundle_name "x509_crt_bundle_wolfssl")
|
||||
|
||||
# For now the certs are in the same directory
|
||||
@@ -824,9 +962,9 @@ if( CONFIG_WOLFSSL_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}")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Using a custom wolfSSL bundle path: ${custom_bundle_path}")
|
||||
else()
|
||||
message(STATUS "Not using a custom wolfSSL bundle path.")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Not using a custom wolfSSL bundle path")
|
||||
endif()
|
||||
list(APPEND args --input ${crt_paths} -q)
|
||||
|
||||
@@ -843,25 +981,107 @@ if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
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 (IS_PLATFORMIO)
|
||||
# PlatformIO cannot generate a Certificate Bundle at build time
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("PlatformIO is using a predefined bundle rather than generating one")
|
||||
|
||||
if(EXISTS "${crt_bundle}")
|
||||
message(STATUS "Bundle file exists from prior build: ${crt_bundle}")
|
||||
if ( "${WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}" STREQUAL "" OR "$(WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE)" STREQUAL "" OR "$(WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE)" STREQUAL "n")
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Alternate Certificate Bundle Path and Name not enabled, assuming [project]/certs/x509_crt_bundle_wolfssl")
|
||||
# Reminder this CMakeLists.txt should be in [project]/components/wolfssl, so ./certs is two directories up
|
||||
set(crt_bundle_option "../../certs/x509_crt_bundle_wolfssl")
|
||||
else()
|
||||
string(SUBSTRING "${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}" 0 2 CERT_PATH_FIRST_TWO)
|
||||
if(CERT_PATH_FIRST_TWO STREQUAL "./" OR CERT_PATH_FIRST_TWO STREQUAL ".\\")
|
||||
set(IS_CERT_BUNDLE_RELATIVE_PATH 1)
|
||||
message(STATUS "Alternate Cert Path is relative to project.")
|
||||
else()
|
||||
set(IS_CERT_BUNDLE_RELATIVE_PATH 0)
|
||||
message(STATUS "Alternate Cert Path is not relative to project.")
|
||||
endif()
|
||||
|
||||
# The cert bundle is not a standard cert, so we con't add to the crt_paths.
|
||||
# Still, we may have an alternate location, particulatly needed for PlatformIO:
|
||||
if(IS_CERT_BUNDLE_RELATIVE_PATH)
|
||||
message(STATUS "CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME = ${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
message(STATUS "Relative alternate_bundle_path: ${alternate_bundle_path}")
|
||||
|
||||
SET(crt_bundle_option "${CMAKE_SOURCE_DIR}/${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
else()
|
||||
message(STATUS "alternate_bundle_path: ${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
message(STATUS "Not using an alternate wolfSSL bundle file.")
|
||||
SET(crt_bundle_option "${CONFIG_WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Clean the path, removing any extra "./" etc.
|
||||
# Number of spaces in message strings is to align path value outputs
|
||||
message(STATUS "This crt_bundle_option value: ${crt_bundle_option}")
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.19")
|
||||
message("WARNING: CMake version is ${CMAKE_VERSION} ? file(REAL_PATH ...) is not supported. Falling back to manual path normalization.")
|
||||
# optional fallback logic here
|
||||
get_filename_component(crt_bundle_file_component "${crt_bundle_option}" ABSOLUTE)
|
||||
message(STATUS "Interim crt_bundle_file_component: ${crt_bundle_file_component}")
|
||||
file(TO_CMAKE_PATH "${crt_bundle_file_component}" crt_bundle)
|
||||
message(STATUS "TO_CMAKE_PATH crt_bundle result: ${crt_bundle}")
|
||||
# set(crt_bundle "C:/workspace/pio_wolfssl-upstream-test-wolfssl_cert_bundle/esp32-c6/certs/x509_crt_bundle_wolfssl")
|
||||
else()
|
||||
file(REAL_PATH "${crt_bundle_option}" crt_bundle)
|
||||
endif()
|
||||
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Certificate Bundle: ${crt_bundle}")
|
||||
message(STATUS "This cleaned crt_bundle value: ${crt_bundle}")
|
||||
message(STATUS "=============================================================================================================")
|
||||
message(STATUS "=============================================================================================================")
|
||||
message(STATUS "Reminder: platformio.ini will need this value set for board_build.embed_files =")
|
||||
message(STATUS "${crt_bundle}")
|
||||
message(STATUS "=============================================================================================================")
|
||||
message(STATUS "=============================================================================================================")
|
||||
|
||||
# e.g. SET(crt_bundle "C:/workspace/pio_wolfssl/esp32-c6/certs/x509_crt_bundle_wolfssl")
|
||||
#
|
||||
|
||||
# Normally x509_crt_bundle_wolfssl built by python script called from cmake.
|
||||
# See https://github.com/wolfSSL/wolfssl/blob/master/wolfcrypt/src/port/Espressif/esp_crt_bundle/gen_crt_bundle.py
|
||||
# Reminder ESP-IDF scripts are NOT called from CMake for PlatformIO builds.
|
||||
#
|
||||
# The easiest way to generate the default file is to build with ESP-IDF and copy the files to [project]/main
|
||||
#
|
||||
# for example:
|
||||
# build\VisualGDB\Debug\x509_crt_bundle_wolfssl.s
|
||||
# build\VisualGDB\Debug\esp-idf\wolfssl\x509_crt_bundle_wolfssl
|
||||
#
|
||||
message(STATUS "Confirming cert bundle exists...")
|
||||
if(EXISTS "${crt_bundle}")
|
||||
# Number of spaces is to align path value outputs
|
||||
message(STATUS "Bundle file found for PlatformIO: ${crt_bundle}")
|
||||
else()
|
||||
APPEND_LIBWOLFSSL_CMAKE_OUTPUT("ERROR: Failed to find bundle file found for PlatformIO: ${crt_bundle}")
|
||||
message(STATUS "Check for entry in platformio.ini: board_build.embed_files = certs/x509_crt_bundle_wolfssl ")
|
||||
message(FATAL_ERROR "WOLFSSL_CERTIFICATE_BUNDLE is enabled for PlatformIO, but predefined file not found: ${crt_bundle}")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Bundle file expected during next build: ${crt_bundle}")
|
||||
# APPEND_LIBWOLFSSL_CMAKE_OUTPUT("Generate bundle: ${GENERATE_CERT_BUNDLEPY} ${args}")
|
||||
# Not PlatformIO
|
||||
# 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}")
|
||||
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 ${crt_bundle})
|
||||
|
||||
add_custom_target(custom_wolfssl_bundle DEPENDS ${cert_bundle})
|
||||
|
||||
# the wolfSSL crtificate bundle is baked into wolfSSL
|
||||
# the wolfSSL certificate bundle is baked into wolfSSL
|
||||
add_dependencies(${COMPONENT_LIB} custom_wolfssl_bundle)
|
||||
|
||||
# COMPONENT_LIB may vary: __idf_wolfssl, __idf_esp_wolfssl, etc
|
||||
@@ -871,7 +1091,12 @@ if( CONFIG_WOLFSSL_CERTIFICATE_BUNDLE
|
||||
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}")
|
||||
if(IS_PLATFORMIO)
|
||||
message(STATUS "WARNING: CONFIG_WOLFSSL_CERTIFICATE_BUNDLE enabled but cannot be generated in PlatformmIO")
|
||||
else()
|
||||
message(STATUS "WARNING: CONFIG_WOLFSSL_CERTIFICATE_BUNDLE enabled but directory not found: ${WOLFSSL_ESP_CRT_BUNDLE_DIR}")
|
||||
endif()
|
||||
message(FATAL_ERROR "not detected")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -930,42 +1155,6 @@ endif()
|
||||
# end multiple component check
|
||||
|
||||
|
||||
#
|
||||
# LIBWOLFSSL_SAVE_INFO(VAR_OUPUT THIS_VAR VAR_RESULT)
|
||||
#
|
||||
# Save the THIS_VAR as a string in a macro called VAR_OUPUT
|
||||
#
|
||||
# VAR_OUPUT: the name of the macro to define
|
||||
# THIS_VAR: the OUTPUT_VARIABLE result from a execute_process()
|
||||
# VAR_RESULT: the RESULT_VARIABLE from a execute_process(); "0" if successful.
|
||||
#
|
||||
function ( LIBWOLFSSL_SAVE_INFO VAR_OUPUT THIS_VAR VAR_RESULT )
|
||||
# is the RESULT_VARIABLE output value 0? If so, IS_VALID_VALUE is true.
|
||||
string(COMPARE EQUAL "${VAR_RESULT}" "0" IS_VALID_VALUE)
|
||||
|
||||
# if we had a successful operation, save the THIS_VAR in VAR_OUPUT
|
||||
if(${IS_VALID_VALUE})
|
||||
# strip newline chars in THIS_VAR parameter and save in VAR_VALUE
|
||||
string(REPLACE "\n" "" VAR_VALUE ${THIS_VAR})
|
||||
|
||||
# we'll could percolate the value to the parent for possible later use
|
||||
# set(${VAR_OUPUT} ${VAR_VALUE} PARENT_SCOPE)
|
||||
|
||||
# but we're only using it here in this function
|
||||
set(${VAR_OUPUT} ${VAR_VALUE})
|
||||
|
||||
# we'll print what we found to the console
|
||||
message(STATUS "Found ${VAR_OUPUT}=${VAR_VALUE}")
|
||||
|
||||
# the interesting part is defining the VAR_OUPUT name a value to use in the app
|
||||
add_compile_definitions(${VAR_OUPUT}=\"${VAR_VALUE}\")
|
||||
else()
|
||||
# if we get here, check the execute_process command and parameters.
|
||||
message(STATUS "LIBWOLFSSL_SAVE_INFO encountered a non-zero VAR_RESULT")
|
||||
set(${VAR_OUPUT} "Unknown")
|
||||
endif()
|
||||
endfunction() # LIBWOLFSSL_SAVE_INFO
|
||||
|
||||
execute_process(
|
||||
COMMAND ${git_cmd} "rev-parse" "--is-inside-work-tree"
|
||||
OUTPUT_VARIABLE IS_GIT_REPO
|
||||
@@ -1049,6 +1238,14 @@ else()
|
||||
message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
endif()
|
||||
|
||||
# A single instance of potentially multiple cmake messages to send to app:
|
||||
message(STATUS "LIBWOLFSSL_CMAKE_OUTPUT: ${LIBWOLFSSL_CMAKE_OUTPUT}")
|
||||
LIBWOLFSSL_SAVE_INFO(LIBWOLFSSL_CMAKE_OUTPUT "${LIBWOLFSSL_CMAKE_OUTPUT}" "0")
|
||||
|
||||
file(APPEND "${CMAKE_BINARY_DIR}/libwolfssl_output.h"
|
||||
"\n"
|
||||
"#endif\n" )
|
||||
|
||||
message(STATUS "************************************************************************************************")
|
||||
message(STATUS "wolfSSL component config complete!")
|
||||
message(STATUS "************************************************************************************************")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -274,10 +274,28 @@ menu "wolfSSL"
|
||||
bool "Do not use the default certificate bundle"
|
||||
endchoice
|
||||
|
||||
config WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE
|
||||
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
default n
|
||||
bool "Use alternate certificate bundle"
|
||||
help
|
||||
Typically only used for PlatformIO which cannot generate a certificate bundle at build time.
|
||||
Enable this option to specify a fixed wolfSSL certificate file path and file name.
|
||||
|
||||
config WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME
|
||||
depends on WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
|
||||
string "Default certificate bundle alternate path and name"
|
||||
default "./certs/x509_crt_bundle_wolfssl"
|
||||
help
|
||||
Name of the default certificate bundle directory. Typically used only with PlatformIO.
|
||||
Reminder PlatformIO cannot generate a bundle from cmake python script call. Relative
|
||||
paths are with respect to root of this project.
|
||||
|
||||
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"
|
||||
@@ -401,24 +419,25 @@ menu "wolfSSL"
|
||||
when performance is critical. See also metrics for counting instances.
|
||||
|
||||
endmenu # wolfSSL Hardware Acceleration
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
menu "wolfSSL Experimental Options"
|
||||
menu "wolfSSL Post Quantum Kyber KEM PQ"
|
||||
|
||||
config ESP_WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
bool "Enable wolfSSL Experimental Settings"
|
||||
config ESP_WOLFSSL_ENABLE_MLKEM
|
||||
bool "Enable ML-KEM (Kyber Post Quantum)"
|
||||
default n
|
||||
help
|
||||
Enables experimental settings for wolfSSL. See documentation.
|
||||
bool "Enable wolfSSL ML-KEM"
|
||||
|
||||
config ESP_WOLFSSL_ENABLE_KYBER
|
||||
bool "Enable wolfSSL Kyber"
|
||||
config WOLFSSL_ENABLE_KYBER
|
||||
bool "Enable Kyber (Round 3)"
|
||||
default n
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
Enable old compatibility with Kyber Round 3 (enables experimental settings)
|
||||
|
||||
endmenu # wolfSSL Experimental Options
|
||||
endmenu # wolfSSL Post Quantum Kyber KEM PQ
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
@@ -429,12 +448,23 @@ menu "wolfSSL"
|
||||
help
|
||||
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
|
||||
|
||||
config ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING
|
||||
bool "Suppress build-time warnings for main stack size"
|
||||
default n
|
||||
help
|
||||
Useful only when wolfSSL is running in main task. See FreeRTOS stack size for custom tasks.
|
||||
|
||||
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.
|
||||
|
||||
config ESP_WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
bool "Enable wolfSSL Experimental Settings"
|
||||
default n
|
||||
help
|
||||
Enables experimental settings for wolfSSL. See documentation.
|
||||
endmenu # wolfSSL Debug Options
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ Have a specific request or questions? We'd love to hear from you! Please contact
|
||||
|
||||
## 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.
|
||||
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use under the GPLv3 (or at your option any later version) or a standard commercial license. For our users who cannot use wolfSSL under GPLv3 (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
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -110,7 +110,7 @@
|
||||
/* 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
|
||||
|
||||
#define HAVE_HKDF
|
||||
#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: */
|
||||
@@ -209,18 +209,40 @@
|
||||
/* the code is older or does not have application name defined. */
|
||||
#endif /* Example wolfSSL Configuration app settings */
|
||||
|
||||
/* Experimental Kyber */
|
||||
#ifdef CONFIG_WOLFSSL_ENABLE_KYBER
|
||||
/* Optional MLKEM (Kyber Post Quantum) */
|
||||
/* ./configure --enable-mlkem */
|
||||
/* See Kconfig / menuconfig ESP_WOLFSSL_ENABLE_MLKEM */
|
||||
#ifdef CONFIG_ESP_WOLFSSL_ENABLE_MLKEM
|
||||
/* Kyber typically needs a minimum 10K stack */
|
||||
#define WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
#define WOLFSSL_HAVE_MLKEM
|
||||
#define WOLFSSL_WC_MLKEM
|
||||
#define WOLFSSL_SHA3
|
||||
#define WOLFSSL_SHAKE128
|
||||
#define WOLFSSL_SHAKE256
|
||||
|
||||
/* Old code points to keep compatibility with Kyber Round 3. */
|
||||
/* ./configure --enable-kyber=all --enable-experimental */
|
||||
#if defined(CONFIG_WOLFSSL_ENABLE_KYBER)
|
||||
#define WOLFSSL_MLKEM_KYBER
|
||||
#define WOLFSSL_EXPERIMENTAL_SETTINGS
|
||||
#endif
|
||||
|
||||
#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 WOLFSSL_NO_ML_KEM_1024
|
||||
#define WOLFSSL_NO_ML_KEM_768
|
||||
#define NO_SESSION_CACHE
|
||||
#else
|
||||
/* Only needed for older wolfssl versions, see mlkem.h */
|
||||
#define WOLFSSL_KYBER1024
|
||||
/* optional alternative sizes: */
|
||||
/* #define WOLFSSL_KYBER768 */
|
||||
/* #define WOLFSSL_KYBER512 */
|
||||
/* -- or disable a specific one: */
|
||||
/* #define WOLFSSL_NO_ML_KEM_1024 */
|
||||
/* #define WOLFSSL_NO_ML_KEM_768 */
|
||||
/* #define WOLFSSL_NO_ML_KEM_512 */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -532,7 +554,7 @@
|
||||
/* 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
|
||||
#define ESP_RSA_TIMEOUT_CNT 0xFF0000
|
||||
#endif
|
||||
|
||||
/* hash limit for test.c */
|
||||
@@ -560,8 +582,6 @@
|
||||
defined(WOLFSSL_SP_RISCV32)
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
|
||||
|
||||
#define HAVE_VERSION_EXTENDED_INFO
|
||||
/* #define HAVE_WC_INTROSPECTION */
|
||||
@@ -784,6 +804,15 @@
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
|
||||
/***** END CONFIG_IDF_TARGET_ESP32H2 *****/
|
||||
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
#define WOLFSSL_ESP32
|
||||
/* wolfSSL Hardware Acceleration not yet implemented */
|
||||
#define NO_ESP32_CRYPT
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_HASH
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_AES
|
||||
#define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
|
||||
/***** END CONFIG_IDF_TARGET_ESP32P4 *****/
|
||||
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP8266)
|
||||
#define WOLFSSL_ESP8266
|
||||
|
||||
@@ -824,13 +853,18 @@
|
||||
#ifndef NO_RSA
|
||||
#define ESP32_USE_RSA_PRIMITIVE
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE
|
||||
#ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE
|
||||
/* See idf.py menuconfig for stack warning settings */
|
||||
#if !defined(CONFIG_ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING)
|
||||
#if CONFIG_ESP_MAIN_TASK_STACK_SIZE < 10500
|
||||
#warning "RSA may be difficult with less than 10KB Stack "/
|
||||
#warning "RSA may be difficult with less than 10KB Stack"
|
||||
#endif
|
||||
#else
|
||||
/* Implement your own stack warning here */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
/* NOTE HW unreliable for small values! */
|
||||
/* threshold for performance adjustment for HW primitive use */
|
||||
/* X bits of G^X mod P greater than */
|
||||
@@ -927,6 +961,8 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define ATCA_WOLFSSL
|
||||
*/
|
||||
|
||||
/* optional SM4 Ciphers. See github.com/wolfSSL/wolfsm */
|
||||
|
||||
/***************************** Certificate Macros *****************************
|
||||
*
|
||||
* The section below defines macros used in typically all of the wolfSSL
|
||||
@@ -1018,9 +1054,14 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define WOLFSSL_BASE16
|
||||
#else
|
||||
#if defined(USE_CERT_BUFFERS_2048)
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#ifdef USE_CERT_BUFFERS_1024
|
||||
#error "USE_CERT_BUFFERS_1024 is already defined. Pick one."
|
||||
#endif
|
||||
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#define CTX_CA_CERT ca_cert_der_2048
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
|
||||
#define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
@@ -1040,9 +1081,14 @@ Turn on timer debugging (used when CPU cycles not available)
|
||||
#define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
|
||||
#elif defined(USE_CERT_BUFFERS_1024)
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#ifdef USE_CERT_BUFFERS_2048
|
||||
#error "USE_CERT_BUFFERS_2048 is already defined. Pick one."
|
||||
#endif
|
||||
|
||||
/* Be sure to include in app when using example certs: */
|
||||
/* #include <wolfssl/certs_test.h> */
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#define CTX_CA_CERT ca_cert_der_1024
|
||||
#define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024
|
||||
#define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -65,11 +65,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE
|
||||
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
|
||||
@@ -95,12 +90,6 @@ choice WOLFSSL_EXAMPLE_CHOOSE
|
||||
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
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
@@ -397,20 +397,47 @@ WOLFSSL_ESP_TASK tls_smp_client_task(void* args)
|
||||
ESP_LOGI(TAG, "tls_smp_client_task heap @ %p = %d",
|
||||
&this_heap, this_heap);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP_WOLFSSL_ENABLE_MLKEM)
|
||||
/* Kconfig ESP_WOLFSSL_ENABLE_MLKEM triggers settings in user_setting.h */
|
||||
ESP_LOGI(TAG, "Espressif CONFIG_ESP_WOLFSSL_ENABLE_MLKEM is defined");
|
||||
#endif
|
||||
#if defined(WOLFSSL_HAVE_MLKEM)
|
||||
#if defined(WOLFSSL_KYBER1024)
|
||||
ESP_LOGI(TAG, "WOLFSSL_HAVE_MLKEM is enabled, setting key share: "
|
||||
"WOLFSSL_P256_KYBER_LEVEL5");
|
||||
ret_i = wolfSSL_UseKeyShare(ssl, WOLFSSL_P521_KYBER_LEVEL5);
|
||||
#elif defined(WOLFSSL_KYBER768)
|
||||
ESP_LOGI(TAG, "WOLFSSL_HAVE_MLKEM is enabled, setting key share: "
|
||||
ESP_LOGI(TAG, "WOLFSSL_MLKEM_KYBER is defined");
|
||||
#if defined(WOLFSSL_KYBER1024) || !defined(WOLFSSL_NO_ML_KEM_1024)
|
||||
#if defined(WOLFSSL_MLKEM_KYBER)
|
||||
ESP_LOGW(TAG, "WOLFSSL_MLKEM_KYBER is enabled, setting key share: "
|
||||
"WOLFSSL_P521_KYBER_LEVEL5");
|
||||
ret_i = wolfSSL_UseKeyShare(ssl, WOLFSSL_P521_KYBER_LEVEL5);
|
||||
#else
|
||||
ESP_LOGI(TAG, "WOLFSSL_HAVE_MLKEM is enabled, setting key share: "
|
||||
"WOLFSSL_ML_KEM_1024");
|
||||
ESP_LOGW(TAG, "Note: Wireshark as of 4.4.6 reports as frodo976aes");
|
||||
ret_i = wolfSSL_UseKeyShare(ssl, WOLFSSL_ML_KEM_1024);
|
||||
#endif
|
||||
#elif defined(WOLFSSL_KYBER768) || !defined(WOLFSSL_NO_ML_KEM_768)
|
||||
#if defined(WOLFSSL_MLKEM_KYBER)
|
||||
ESP_LOGW(TAG, "WOLFSSL_MLKEM_KYBER is enabled, setting key share: "
|
||||
"WOLFSSL_P256_KYBER_LEVEL3");
|
||||
ret_i = wolfSSL_UseKeyShare(ssl, WOLFSSL_P256_KYBER_LEVEL3);
|
||||
#elif defined(WOLFSSL_KYBER512)
|
||||
ret_i = wolfSSL_UseKeyShare(ssl, WOLFSSL_P256_KYBER_LEVEL3);
|
||||
#else
|
||||
ESP_LOGI(TAG, "WOLFSSL_HAVE_MLKEM is enabled, setting key share: "
|
||||
"WOLFSSL_ML_KEM_768");
|
||||
ESP_LOGW(TAG, "Note: Wireshark as of 4.4.6 reports as frodo976aes");
|
||||
ret_i = wolfSSL_UseKeyShare(ssl, WOLFSSL_ML_KEM_768);
|
||||
#endif
|
||||
#elif defined(WOLFSSL_KYBER512) || !defined(WOLFSSL_NO_ML_KEM_512)
|
||||
/* This will typically be a low memory situation, such as ESP8266 */
|
||||
ESP_LOGI(TAG, "WOLFSSL_HAVE_MLKEM is enabled, setting key share: "
|
||||
#if defined(WOLFSSL_MLKEM_KYBER)
|
||||
ESP_LOGW(TAG, "WOLFSSL_MLKEM_KYBER is enabled, setting key share: "
|
||||
"WOLFSSL_P256_KYBER_LEVEL1");
|
||||
ret_i = wolfSSL_UseKeyShare(ssl, WOLFSSL_P256_KYBER_LEVEL1);
|
||||
ret_i = wolfSSL_UseKeyShare(ssl, WOLFSSL_P256_KYBER_LEVEL1);
|
||||
#else
|
||||
ESP_LOGI(TAG, "WOLFSSL_HAVE_MLKEM is enabled, setting key share: "
|
||||
"WOLFSSL_ML_KEM_512");
|
||||
ESP_LOGW(TAG, "Note: Wireshark as of 4.4.6 reports as frodo976aes");
|
||||
ret_i = wolfSSL_UseKeyShare(ssl, WOLFSSL_ML_KEM_512);
|
||||
#endif
|
||||
#else
|
||||
ESP_LOGW(TAG, "WOLFSSL_HAVE_MLKEM enabled but no key size available.");
|
||||
ret_i = ESP_FAIL;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user